/* Search-page adaptations for protected post-Skylar options and data. */
.phd-search-page {
  --ink-blue: #002FA7;
  --ink-blue-hover: #002783;
  --ink-blue-pale: #E9EEFF;
  --paper: #F5F1E8;
  --paper-light: #FAF8F2;
  --surface: #FFFDF8;
  --carbon: #20242C;
  --carbon-muted: #687080;
  --carbon-faint: #959BA6;
  --border-subtle: rgba(17, 24, 39, 0.10);
  --border-default: rgba(17, 24, 39, 0.16);
  --border-brand: rgba(0, 47, 167, 0.42);
  --shadow-float: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-menu: 0 8px 24px rgba(17, 24, 39, 0.12);
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --page-max: 1320px;
  --page-gutter-desktop: 56px;
  --page-gutter-tablet: 32px;
  --page-gutter-mobile: 20px;
  --control-height: 44px;
  --control-height-sm: 40px;
  --space-title: 40px;
  --space-header-content: 32px;
  --space-section: 48px;
  --space-section-title: 20px;
  --space-card: 16px;
  --space-field: 24px;
  --space-page-bottom: 80px;
  --color-brand-700: var(--ink-blue);
  --color-brand-600: var(--ink-blue-hover);
  --color-brand-100: var(--ink-blue-pale);
  --color-brand-050: var(--ink-blue-pale);
  --color-canvas: var(--paper);
  --color-surface: var(--surface);
  --color-surface-muted: var(--paper-light);
  --color-text-primary: var(--carbon);
  --color-text-secondary: var(--carbon-muted);
  --color-text-tertiary: var(--carbon-faint);
  --color-border: var(--border-subtle);
  --color-border-strong: var(--border-default);
  --color-success: #1F7A55;
  --color-success-bg: #EAF6EF;
  --color-warning: #A65321;
  --color-warning-bg: #FFF1E5;
  --color-danger: #B42318;
  --color-danger-bg: #FDECEA;
}

.phd-search-page .locus-header {
  padding: 0;
  flex-wrap: nowrap;
}

.phd-search-page .locus-header-inner {
  height: 64px;
  min-height: 64px;
  padding: 0;
  flex-wrap: nowrap;
}

.phd-search-page .locus-header .header-right {
  width: auto;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
}

.phd-search-page .locus-header .user-info {
  width: auto;
  flex-wrap: nowrap;
}

.phd-search-page .locus-header .username-label {
  flex: 0 1 auto;
  max-width: 120px;
}

#phd-app .search-method-control {
  flex-wrap: wrap;
}

#phd-app .direction-method-row {
  flex: 1 1 720px;
}

body.locus-shell #phd-app .direction-method-row .phd-prec-btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: normal;
}

#phd-app .direction-method-row .phd-prec-btn small {
  white-space: normal;
}

#phd-search-quota-status {
  flex: 1 0 100%;
  margin: 2px 0 0;
}

.rank-school-settings {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid #ded7c9;
  border-radius: 12px;
  background: #fbfaf7;
}

#phd-verification-settings {
  padding: 16px 20px;
}

.phd-verification-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-width: 0;
}

.phd-verification-controls .rank-school-field-label {
  margin: 0;
  white-space: nowrap;
}

.phd-verification-controls .rank-school-chip-row {
  min-width: 0;
}

#phd-verification-settings > .phd-opt-desc {
  max-width: 72ch;
  margin: 10px 0 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.rank-school-settings-head,
.rank-school-entity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rank-school-settings-head .phd-opt-desc { margin: 0; }
.rank-school-field { margin-top: 18px; }
.rank-school-field-label { margin: 0 0 8px; color: #666055; font-size: 13px; font-weight: 700; }
.rank-school-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.rank-school-chip {
  padding: 9px 13px;
  border: 1px solid #d8d2c7;
  border-radius: 8px;
  background: #fff;
  color: #2d2a25;
  cursor: pointer;
}

.rank-school-chip:hover:not(:disabled) { border-color: #4a90e2; }
.rank-school-chip.active { border-color: #2f6fcb; background: #edf4ff; color: #184d9b; }
.rank-school-chip:disabled { opacity: .45; cursor: not-allowed; }
.rank-school-institute-browser { width: 100%; }
.rank-school-institute-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rank-school-institute-filters input,
.rank-school-institute-filters select { min-width: 180px; padding: 9px 11px; border: 1px solid #d8d2c7; border-radius: 8px; background: #fff; }
.rank-school-institute-filters input { flex: 1 1 240px; }
.rank-school-institute-group { width: 100%; margin: 7px 0; border: 1px solid #e4dfd5; border-radius: 8px; background: #fff; }
.rank-school-institute-group summary { padding: 10px 12px; cursor: pointer; font-weight: 650; color: #484238; }
.rank-school-institute-group summary small { margin-left: 7px; color: #827a6c; font-weight: 400; }
.rank-school-institute-group-items { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 12px 12px; }
.rank-school-institute-group-items .rank-school-chip { max-width: 100%; text-align: left; white-space: normal; }
.rank-school-institute-english { display: block; margin-top: 3px; color: #777064; font-size: 12px; line-height: 1.4; }
.rank-school-entities .rank-school-institute-group { grid-column: 1 / -1; }
.rank-school-entities .rank-school-institute-group-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rank-school-entity-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e4dfd5; }
.rank-school-entity-toolbar { flex-wrap: wrap; font-size: 13px; color: #666055; }
.rank-school-entity-toolbar input { flex: 1 1 260px; min-width: 180px; padding: 9px 11px; border: 1px solid #d8d2c7; border-radius: 8px; background: #fff; }
.rank-school-selected-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: #666055; font-size: 13px; font-weight: 700; }
.rank-school-clear-selected { padding: 4px 6px; border: 0; background: transparent; color: #184d9b; cursor: pointer; font: inherit; }
.rank-school-clear-selected:hover:not(:disabled) { text-decoration: underline; }
.rank-school-clear-selected:disabled { color: #a39d92; cursor: default; }
.rank-school-selected-entities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rank-school-selected-entity { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border: 1px solid #b9cdeb; border-radius: 999px; background: #edf4ff; color: #184d9b; font-size: 12px; cursor: pointer; }
.rank-school-selected-entity:hover { border-color: #2f6fcb; background: #e0edff; }
.rank-school-selected-entity span { font-size: 16px; line-height: 1; }
.rank-school-selected-empty { color: #8c8578; font-size: 12px; }
.rank-school-list-head { margin-top: 16px; color: #565044; font-size: 13px; font-weight: 700; }
.rank-school-list-head small { margin-left: 6px; color: #827a6c; font-weight: 400; }
.rank-school-entities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 320px; margin-top: 12px; overflow: auto; }
.rank-school-entity { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border: 1px solid #e4dfd5; border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; }
.rank-school-entity small { display: block; margin-top: 3px; color: #777064; }

@media (max-width: 720px) {
  .rank-school-settings-head { align-items: flex-start; flex-direction: column; }
  .rank-school-entities { grid-template-columns: 1fr; }
  .rank-school-entities .rank-school-institute-group-items { grid-template-columns: 1fr; }

  #phd-verification-settings { padding: 14px 16px; }
  .phd-verification-controls { align-items: stretch; flex-direction: column; gap: 10px; }
  .phd-verification-controls .rank-school-chip-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .phd-verification-controls .rank-school-chip { min-width: 0; }
  #phd-verification-settings > .phd-opt-desc { margin-top: 10px; }
}

/* Keep stage-by-stage feedback; retire the redundant blue status banner. */
#phd-app #phd-progress {
  display: none !important;
}

.search-monitor {
  max-width: 980px;
  margin: 4px auto 26px;
  padding: 22px;
  border: 1px solid #DED7C9;
  border-radius: 12px;
  background: var(--surface);
  box-sizing: border-box;
}

.search-monitor-elapsed {
  max-width: 980px;
  margin: 0 auto 10px;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 1.6;
}

.search-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.search-monitor-intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.search-monitor-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin-top: 2px;
  border: 5px solid #C6D7F4;
  border-top-color: var(--ink-blue);
  border-radius: 50%;
  animation: search-monitor-spin .85s linear infinite;
}

.search-monitor-intro h2 {
  margin: 0;
  color: var(--carbon);
  font-size: 18px;
  line-height: 1.4;
}

.search-monitor-intro p {
  margin: 5px 0 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 1.6;
}

.search-monitor-stage-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 18px;
}

.search-monitor-stage-row span {
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 1.5;
}

.search-monitor-stage-row #search-monitor-eta {
  color: var(--carbon-faint);
  font-size: 12px;
}

.search-monitor-stage-row strong {
  color: var(--ink-blue);
}

.search-monitor-progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #E8E5DE;
}

.search-monitor-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ink-blue);
  transition: width .45s ease;
}

.search-monitor-activities {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin-top: 16px;
  color: var(--carbon-muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-monitor-dots {
  display: inline-flex;
  gap: 3px;
  flex: 0 0 auto;
}

.search-monitor-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-blue);
  animation: search-monitor-dot .9s ease-in-out infinite;
}

.search-monitor-dots i:nth-child(2) { animation-delay: .14s; }
.search-monitor-dots i:nth-child(3) { animation-delay: .28s; }

.search-monitor-activity-copy {
  min-width: 0;
}

.search-stage-state { display: none !important; }

.search-monitor.is-finished {
  padding: 20px 22px;
}

.search-monitor.is-finished .search-monitor-spinner,
.search-monitor.is-finished #search-monitor-summary,
.search-monitor.is-finished .search-monitor-stage-row,
.search-monitor.is-finished .search-monitor-progress,
.search-monitor.is-finished .search-monitor-activities {
  display: none;
}

.search-monitor.is-finished .search-monitor-head {
  display: block;
}

.search-monitor.is-finished .search-monitor-intro h2 {
  color: var(--color-success);
}

.search-monitor.is-complete .search-monitor-spinner,
.search-monitor.is-error .search-monitor-spinner,
.search-monitor.is-complete .search-monitor-dots i,
.search-monitor.is-error .search-monitor-dots i {
  animation-play-state: paused;
}

.search-monitor.is-complete .search-monitor-progress > span {
  background: var(--color-success);
}

@keyframes search-monitor-spin {
  to { transform: rotate(360deg); }
}

@keyframes search-monitor-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: 1; }
}

#phd-app .card-more-menu {
  right: 0;
  left: auto;
}

#phd-app #section-results,
#phd-app .opportunity-result-card {
  scroll-margin-top: 80px;
}

#phd-app .explore-list > *,
#phd-app .opportunity-result-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#phd-app .opportunity-result-card :where(a, .phd-row, .advisor-evidence, .advisor-evidence-papers) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#phd-app :where(.facet-chip, .card-more-btn, .phd-prec-btn, .phd-fav-star, .advisor-deep-verify-btn):focus-visible,
#phd-app :where(.text-link, .phd-source a, .advisor-evidence a):focus-visible,
#phd-app :where(.facet-chip, .card-more-btn, .phd-prec-btn, .phd-fav-star, .advisor-deep-verify-btn):focus,
#phd-app :where(.text-link, .phd-source a, .advisor-evidence a):focus {
  outline: 2px solid var(--ink-blue);
  outline-offset: 2px;
}

@media (min-width: 761px) and (max-width: 1100px) {
  body.locus-shell #phd-app {
    width: 100%;
  }
}

@media (max-width: 760px) {
  #phd-app .search-launch-row {
    grid-template-columns: 1fr;
  }

  #phd-app #phd-search-cta {
    width: 100%;
  }

  #phd-app .card-more-menu {
    right: auto;
    left: 0;
  }

  #phd-app .direction-method-row {
    flex-basis: auto;
  }

  .search-monitor {
    padding: 18px;
  }

  .search-monitor-head,
  .search-monitor-stage-row {
    flex-direction: column;
  }

}

@media (prefers-reduced-motion: reduce) {
  .search-monitor-spinner,
  .search-monitor-dots i {
    animation-duration: 1.8s;
  }

}

/* Opportunity Workspace — presentation and client-side decision tools only. */
body.locus-shell.phd-search-page .phd-workspace-main {
  width: 100%;
  max-width: none;
  padding: 0 0 64px;
}

body.locus-shell.phd-search-page #phd-app {
  width: min(calc(100% - 80px), 1680px);
  max-width: none;
}

.opportunity-hero {
  min-height: 250px;
  margin: 18px 0 28px;
  padding: 34px clamp(32px, 4vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background:
    radial-gradient(circle at 82% 25%, rgba(0, 47, 167, .055) 0 2px, transparent 2.5px) 0 0 / 18px 18px,
    linear-gradient(112deg, rgba(255, 253, 248, .98), rgba(250, 248, 242, .84));
  box-sizing: border-box;
}

.opportunity-kicker {
  margin: 0 0 10px;
  color: var(--ink-blue);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .24em;
}

.opportunity-hero h1 {
  margin: 0;
  color: #06378f;
  font-family: var(--font-ui);
  font-size: clamp(46px, 4.2vw, 72px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: .03em;
}

.opportunity-hero-copy > p:not(.opportunity-kicker) {
  max-width: 760px;
  margin: 13px 0 0;
  color: #31517f;
  font-size: 16px;
  line-height: 1.65;
}

.opportunity-hero-copy > p + p:not(.opportunity-kicker) { margin-top: 2px; }

.opportunity-hero-direction {
  min-width: 0;
  padding: 8px 0 8px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 2px solid var(--ink-blue);
}

.opportunity-hero-direction > span {
  color: var(--carbon-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.opportunity-hero-direction strong {
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
  color: #143d82;
  font-size: 22px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opportunity-hero-direction small {
  margin-top: 5px;
  color: var(--carbon-muted);
  font-size: 13px;
}

.opportunity-text-button {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-blue);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.opportunity-text-button b { margin-left: 7px; }

.opportunity-search-settings {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(255, 253, 248, .74);
}

.opportunity-search-settings.is-collapsed { display: none; }
.opportunity-search-settings .explore-page-head { margin-bottom: 18px !important; }
.opportunity-search-settings .search-launch-row { margin-bottom: 0 !important; }

#phd-app #section-results { margin-top: 0; }

.opportunity-status-banner {
  min-height: 72px;
  margin-bottom: 18px;
  padding: 13px 20px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(15, 129, 118, .22);
  border-radius: 10px;
  background: rgba(234, 245, 241, .62);
  box-sizing: border-box;
}

.opportunity-status-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0f8176;
  color: #fff;
  font-size: 18px;
}

.opportunity-status-banner strong,
.opportunity-status-banner small { display: block; }
.opportunity-status-banner strong { color: #173d6d; font-size: 16px; }
.opportunity-status-banner small { margin-top: 3px; color: #607086; font-size: 12px; }
.opportunity-status-banner .opportunity-text-button { margin: 0; }

#phd-app .results-toolbar {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#phd-app .results-toolbar .locus-section-title { display: none; }

#phd-app .opportunity-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 24px;
  align-items: start;
}

#phd-app .opportunity-workspace.hidden { display: none; }

#phd-app .explore-list-col { min-width: 0; }

#phd-app .explore-filters {
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  background: transparent;
}

#phd-app #explore-filter-controls {
  flex-wrap: wrap;
  gap: 8px;
}

#phd-app .facet-chip {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(255, 253, 248, .76);
  color: #31517f;
}

#phd-app .facet-chip.is-active {
  border-color: rgba(0, 47, 167, .54);
  background: rgba(255, 253, 248, .96);
  color: var(--ink-blue);
  box-shadow: inset 0 -2px 0 var(--ink-blue);
}

#phd-app .facet-chip:focus,
#phd-app .facet-chip:focus-visible {
  outline: none;
}

#phd-app .facet-count {
  margin-left: 7px;
  color: inherit;
}

#phd-app .explore-filters-advanced {
  position: relative;
  flex: 0 0 auto;
}

#phd-app .explore-filters-advanced > summary {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-blue);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

#phd-app .explore-filters-advanced > summary::-webkit-details-marker { display: none; }
#phd-app .explore-filters-advanced > .facet-row {
  position: absolute;
  right: 0;
  z-index: 8;
  width: min(520px, 72vw);
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.advanced-filter-group + .advanced-filter-group { margin-top: 13px; }
.advanced-filter-label { margin: 0 0 7px; color: var(--carbon-muted); font-size: 11px; font-weight: 650; }

.opportunity-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.opportunity-search-input {
  min-height: 42px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-blue);
}

.opportunity-search-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--carbon);
  font: inherit;
  font-size: 13px;
}

.opportunity-compare-count { color: var(--carbon-muted); font-size: 11px; white-space: nowrap; }

.opportunity-compare-button,
.opportunity-panel-compare,
.opportunity-detail-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(0, 47, 167, .24);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-blue);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.opportunity-compare-button:not(:disabled),
.opportunity-panel-compare.is-selected {
  border-color: var(--ink-blue);
  background: var(--ink-blue);
  color: #fff;
}

.opportunity-compare-button:disabled { opacity: .42; cursor: not-allowed; }

body.locus-shell #phd-app .explore-list {
  display: grid;
  gap: 10px;
}

body.locus-shell #phd-app .opportunity-result-card {
  min-height: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e6e9ec;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}

body.locus-shell #phd-app .opportunity-result-card[hidden],
body.locus-shell #phd-app .opportunity-result-card.is-filtered-out {
  display: none !important;
}

body.locus-shell #phd-app .opportunity-result-card:hover {
  border-color: var(--ws-accent-line, #ddccae);
  box-shadow: 0 4px 16px rgba(50, 45, 34, .045);
}

body.locus-shell #phd-app .opportunity-result-card.is-selected {
  border-color: var(--ws-accent, #765b30);
  box-shadow: inset 2px 0 0 var(--ws-accent, #765b30), 0 4px 16px rgba(50, 45, 34, .04);
}

.opportunity-card-header { min-height: 30px; display: flex; align-items: center; gap: 8px; }
.opportunity-card-header .phd-fav-star { position: static; width: 34px; height: 34px; margin-left: auto; border-radius: 9px; color: #8d969c; }
.opportunity-card-header .phd-fav-star:hover { color: #967137; border-color: #d8c6a2; background: #faf7ef; }
.opportunity-card-header .phd-fav-star.is-favorited { color: #967137; border-color: #d8c6a2; background: #f8f2e6; }
.opportunity-card-header .phd-fav-star.is-favorited .phd-fav-star-icon path { fill: currentColor; }
.opportunity-screen-button { padding: 8px 4px; border: 0; background: transparent; color: #808992; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.opportunity-screen-button:hover { color: #444f56; }
.opportunity-screen-button span { margin-right: 2px; font-size: 15px; }
#phd-app .opportunity-result-card button:focus-visible { outline: 2px solid var(--ws-accent, #765b30); outline-offset: 2px; }
.opportunity-card-rank { padding-top: 2px; color: #68777c; font-size: 12px; font-weight: 650; }
.opportunity-card-main { min-width: 0; flex: 1; padding: 3px 0 4px; }
.opportunity-card-topline { min-height: 24px; display: flex; align-items: center; gap: 8px; }

.opportunity-match-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9eeff;
  color: var(--ink-blue);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.opportunity-region { color: #51627b; font-size: 11px; }
.opportunity-supplemental-badge {
  color: var(--theme-accent, #715530);
  background: var(--theme-hover, #f5f1e8);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px;
  white-space: nowrap;
}
.opportunity-result-card .opportunity-match-badge { background: var(--ws-tint, #fcf9f1); color: var(--ws-accent-dark, #57421f); }
.opportunity-result-card .opportunity-university-avatar { background: #f5f6f4; color: var(--ws-accent-dark, #57421f); }
.opportunity-card-identity { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 12px; }

.opportunity-university-avatar {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  border-radius: 9px;
  background: linear-gradient(145deg, #eef3ff, #f7f9ff);
  color: var(--ink-blue);
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 600;
}

.opportunity-card-identity h3 { margin: 0; color: #252b2e; font-size: 17px; font-weight: 650; line-height: 1.4; }
.opportunity-card-identity p { margin: 2px 0 0; overflow: hidden; color: #718087; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.opportunity-card-identity .opportunity-card-people { color: #64717d; }
.opportunity-card-identity .opportunity-card-advisor {
  display: flex; flex-wrap: wrap; gap: 4px 8px; overflow: visible;
  white-space: normal; color: #42566b;
}
.opportunity-advisor-email { color: #174f80; overflow-wrap: anywhere; text-decoration: underline; }
.opportunity-detail-advisor { overflow-wrap: anywhere; }

.opportunity-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.opportunity-result-card .opportunity-tag-row > span { max-width: min(190px, 100%); padding: 4px 8px; overflow: hidden; border-radius: 6px; background: #f2f4f4; color: #5d6b72; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.opportunity-result-card .opportunity-tag-row .opportunity-tag-overflow { flex-shrink: 0; cursor: help; }
.opportunity-result-card .opportunity-rank-source { margin: 6px 0 0; color: #829097; font-size: 11px; line-height: 1.4; }
.opportunity-result-card .phd-degree-caveat { margin-top: 5px; color: #829097; font-size: 11px; }
.opportunity-card-reason { min-width: 0; margin: 7px 0 0; display: flex; align-items: baseline; gap: 7px; }
.opportunity-card-reason > span { flex: 0 0 auto; color: var(--ws-accent, #765b30); font-size: 11px; }
.opportunity-card-reason > p { min-width: 0; margin: 0; overflow: hidden; color: #53636c; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }

.opportunity-card-actions {
  width: 100%;
  min-width: 0;
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 0;
}

.opportunity-card-actions .opportunity-detail-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--ws-accent-line, #e8dcc2); border-radius: 9px; background: #fff; color: var(--ws-accent-dark, #57421f); font-size: 13px; white-space: nowrap; }
.opportunity-card-actions .opportunity-detail-button:hover { background: var(--ws-tint, #fcf9f1); border-color: var(--ws-accent, #765b30); }

.competitiveness-summary,
.competitiveness-band-guide,
.competitiveness-band-divider { display: none; }

.opportunity-detail-panel {
  position: sticky;
  top: 78px;
  min-height: 610px;
  max-height: calc(100vh - 94px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(28, 42, 65, .14);
  border-radius: 11px;
  background: rgba(255, 253, 248, .92);
}

.opportunity-detail-empty { margin: auto; padding: 40px; color: var(--carbon-faint); font-size: 13px; text-align: center; }
.opportunity-detail-head { padding: 20px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.opportunity-mobile-detail-close { display: none; }
.opportunity-detail-head h2 { margin: 1px 0 0; color: #153b76; font-size: 20px; line-height: 1.35; }
.opportunity-detail-head p { margin: 4px 0 0; color: var(--carbon-muted); font-size: 11px; }
.opportunity-detail-head a { display: inline-block; margin-top: 5px; color: var(--ink-blue); font-size: 11px; text-decoration: none; }
.opportunity-primary-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }

.opportunity-detail-tabs { padding: 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border-subtle); }
.opportunity-detail-tabs button { min-height: 42px; padding: 0 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #5f6d82; font: inherit; font-size: 11px; cursor: pointer; }
.opportunity-detail-tabs button[aria-selected="true"] { border-bottom-color: var(--ink-blue); color: var(--ink-blue); font-weight: 700; }

.opportunity-detail-body { flex: 1 1 auto; padding: 18px 20px; }
.opportunity-detail-section h4 { margin: 0 0 13px; color: #173d72; font-size: 14px; }
.opportunity-detail-section > p { color: #4f5f78; font-size: 12px; line-height: 1.7; }
.opportunity-detail-section dl { margin: 0; }
.opportunity-detail-row { padding: 9px 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid rgba(28, 42, 65, .08); }
.opportunity-detail-row dt { color: #294c7d; font-size: 11px; font-weight: 700; }
.opportunity-detail-row dd { margin: 0; color: #4f5f78; font-size: 11.5px; line-height: 1.55; overflow-wrap: anywhere; }
.opportunity-detail-muted { color: var(--carbon-faint) !important; }
.opportunity-reason-block { margin-top: 16px; padding: 13px; border-left: 2px solid var(--ink-blue); background: rgba(233, 238, 255, .38); }
.opportunity-reason-block strong { color: #173d72; font-size: 11px; }
.opportunity-reason-block p { margin: 5px 0 0; color: #4f5f78; font-size: 11.5px; line-height: 1.65; }

.opportunity-disclosures details { border-bottom: 1px solid var(--border-subtle); }
.opportunity-disclosures summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; color: #294c7d; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.opportunity-disclosures summary::-webkit-details-marker { display: none; }
.opportunity-disclosures details > div { padding: 0 0 14px; color: #57657b; font-size: 11.5px; line-height: 1.65; }
.opportunity-disclosures details > div p { margin: 5px 0; }
.opportunity-disclosures details > div > a { display: block; margin-top: 6px; color: var(--ink-blue); overflow-wrap: anywhere; }
.opportunity-evidence-links { display: grid; gap: 6px; }
.opportunity-evidence-links a { color: var(--ink-blue); font-size: 11px; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.opportunity-evidence-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.opportunity-detail-panel :where(.phd-score-grid,.phd-status-row,.phd-verification,.phd-language,.advisor-evidence) { margin-top: 14px; font-size: 11px; }

.opportunity-detail-footer { position: sticky; bottom: 0; padding: 13px 16px; display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; border-top: 1px solid var(--border-subtle); background: rgba(255, 253, 248, .96); }
.opportunity-detail-footer .phd-fav-star { position: static; width: auto; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(0, 47, 167, .24); border-radius: 8px; }

.opportunity-compare-dialog {
  position: fixed;
  inset: 0;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(28, 42, 65, .16);
  border-radius: 14px;
  background: var(--surface);
  color: var(--carbon);
  box-shadow: 0 24px 80px rgba(20, 31, 52, .2);
}
.opportunity-compare-dialog::backdrop { background: rgba(24, 31, 45, .32); backdrop-filter: blur(2px); }
.opportunity-compare-head { padding: 20px 24px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--border-subtle); }
.opportunity-compare-head .opportunity-kicker { margin-bottom: 4px; }
.opportunity-compare-head h2 { margin: 0; color: #173d72; font-size: 24px; }
.opportunity-dialog-close { width: 36px; height: 36px; border: 1px solid var(--border-subtle); border-radius: 50%; background: transparent; color: var(--ink-blue); font-size: 22px; cursor: pointer; }
#opportunity-compare-content { max-height: calc(100vh - 150px); overflow: auto; }
.opportunity-compare-table { min-width: 760px; display: grid; grid-template-columns: 150px repeat(var(--compare-columns), minmax(210px, 1fr)); }
.opportunity-compare-table > div { min-height: 54px; padding: 13px 15px; border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); color: #4f5f78; font-size: 11.5px; line-height: 1.55; box-sizing: border-box; }
.opportunity-compare-corner,.opportunity-compare-label { background: var(--paper-light); color: #294c7d !important; font-weight: 700; }
.opportunity-compare-school { display: flex; align-items: center; gap: 10px; color: #173d72 !important; }
.opportunity-compare-school .opportunity-university-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 15px; }
.opportunity-compare-school button,
.opportunity-compare-cards header button { margin-left: auto; padding: 5px 8px; border: 0; background: transparent; color: #7b514d; font: inherit; font-size: 10px; cursor: pointer; }
.opportunity-compare-table .opportunity-evidence-links,
.opportunity-compare-cards .opportunity-evidence-links { gap: 5px; }
.opportunity-compare-empty { color: var(--carbon-faint); }
.opportunity-compare-cards { display: grid; gap: 12px; padding: 12px; }
.opportunity-compare-cards article { padding: 16px; border: 1px solid var(--border-subtle); border-radius: 10px; }
.opportunity-compare-cards header { display: flex; align-items: center; gap: 12px; color: #173d72; }
.opportunity-compare-cards dl { margin: 14px 0 0; }
.opportunity-compare-cards dl > div { padding: 8px 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--border-subtle); }
.opportunity-compare-cards dt { color: #294c7d; font-size: 11px; font-weight: 700; }
.opportunity-compare-cards dd { margin: 0; color: #4f5f78; font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }
.opportunity-compare-detail { min-height: 34px; padding: 7px 13px; border: 1px solid rgba(0, 47, 167, .24); border-radius: 7px; background: transparent; color: var(--ink-blue); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.opportunity-compare-detail:hover { border-color: var(--ink-blue); background: rgba(0, 47, 167, .045); }
.opportunity-compare-cards .opportunity-compare-detail { margin-top: 14px; }

@media (max-width: 1180px) {
  body.locus-shell.phd-search-page #phd-app { width: min(calc(100% - 48px), 1040px); }
  .opportunity-hero { grid-template-columns: minmax(0, 1fr) 300px; }
  #phd-app .opportunity-workspace { grid-template-columns: 1fr; }
  .opportunity-detail-panel { position: relative; top: auto; min-height: 0; max-height: none; grid-row: 1; }
}

@media (max-width: 760px) {
  body.locus-shell.phd-search-page #phd-app { width: min(calc(100% - 28px), 680px); }
  .opportunity-hero { min-height: 0; margin-top: 12px; padding: 24px 20px; grid-template-columns: 1fr; gap: 24px; }
  .opportunity-hero h1 { font-size: 38px; }
  .opportunity-hero-copy > p:not(.opportunity-kicker) { font-size: 14px; }
  .opportunity-status-banner { grid-template-columns: 36px minmax(0, 1fr); }
  .opportunity-status-banner .opportunity-text-button { grid-column: 2; justify-self: start; }
  #phd-app .explore-filters { align-items: stretch; flex-direction: column; }
  #phd-app .explore-filters-advanced > .facet-row { right: auto; left: 0; width: min(520px, calc(100vw - 56px)); }
  .opportunity-toolbar { grid-template-columns: 1fr auto; }
  .opportunity-search-input { grid-column: 1 / -1; }
  .opportunity-compare-count { justify-self: start; }
  body.locus-shell #phd-app .opportunity-result-card { min-height: 0; padding: 15px; }
  .opportunity-card-identity { grid-template-columns: 46px minmax(0, 1fr); }
  .opportunity-university-avatar { width: 44px; height: 44px; flex-basis: 44px; font-size: 17px; }
  .opportunity-card-reason { white-space: normal; }
  .opportunity-detail-head { grid-template-columns: 48px minmax(0, 1fr); }
  .opportunity-detail-head > .opportunity-match-badge { grid-column: 2; justify-self: start; }
  .opportunity-detail-tabs { overflow-x: auto; grid-template-columns: repeat(4, minmax(78px, 1fr)); }
  .opportunity-detail-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: var(--surface);
  }
  .opportunity-detail-panel.is-mobile-open { display: flex; }
  .opportunity-mobile-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-blue);
    font-size: 22px;
  }
  .opportunity-detail-head { padding-top: 66px; }
  .opportunity-detail-body { overflow-y: auto; }
  .opportunity-detail-footer { position: sticky; }
  .opportunity-compare-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .opportunity-compare-table { display: block; min-width: 0; padding: 12px; }
  .opportunity-compare-table > div { border: 0; border-bottom: 1px solid var(--border-subtle); }
}
.opportunity-school-english {
  margin-top: 3px !important;
  color: #7d899b !important;
  font-size: 12px !important;
  font-weight: 450 !important;
}
