:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #687386;
  --line: #d9dee7;
  --accent: #176b87;
  --accent-2: #2d7d46;
  --warn: #a65f00;
  --danger: #a53f3f;
  --soft: #eef6f8;
  --shadow: 0 12px 30px rgba(24, 39, 75, 0.08);
}

/* Intake hubs: keep the primary page focused on the four universal inputs. */
body:not(.profile-overlays-ready) .essential-fields > #special-fields,
body:not(.profile-overlays-ready) .essential-fields > #single-recruit-fields,
body:not(.profile-overlays-ready) .essential-fields > #military-fields {
  display: none;
}

.profile-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-hub-entry {
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #ceddec;
  border-radius: 9px;
  background: #f8fbff;
  color: #244d76;
  text-align: left;
}

.profile-hub-entry:hover {
  border-color: #91b1d1;
  background: #f0f7ff;
}

.profile-hub-entry > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-hub-entry strong,
.profile-hub-entry small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-hub-entry strong {
  font-size: 12px;
}

.profile-hub-entry small {
  color: #70849a;
  font-size: 10px;
  font-weight: 560;
}

.profile-hub-entry > svg {
  width: 16px;
  height: 16px;
}

.profile-hub-entry-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #e7f1fc;
  color: #24649f;
}

.profile-hub-entry-icon svg {
  width: 16px;
  height: 16px;
}

.profile-hub-backdrop {
  position: fixed;
  z-index: 108;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 33, 50, 0.5);
  backdrop-filter: blur(8px);
}

.profile-hub-backdrop.hidden {
  display: none;
}

.profile-hub-modal {
  display: grid;
  width: min(850px, 100%);
  max-height: min(760px, calc(100dvh - 44px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(151, 177, 207, 0.78);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 38, 64, 0.3);
}

.profile-hub-modal--memory {
  width: min(650px, 100%);
}

.profile-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid #dce6f0;
  background: #f7faff;
}

.profile-hub-header h3 {
  margin: 3px 0 0;
  color: #173f69;
  font-size: 19px;
}

.profile-hub-header p {
  margin: 5px 0 0;
  color: #6b7d91;
  font-size: 11px;
  line-height: 1.5;
}

.profile-hub-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-hub-scroll .combined-option-content,
.profile-hub-scroll .device-memory-details {
  border: 0;
  border-radius: 0;
  background: #fff;
}

.candidate-specific-options {
  display: grid;
  margin-bottom: 14px;
  gap: 12px;
}

.candidate-specific-options:empty {
  display: none;
}

.candidate-specific-options > .conditional-fields,
.candidate-specific-options > #military-fields {
  margin: 0;
  padding: 12px;
  border: 1px solid #dce6f0;
  border-radius: 9px;
  background: #f8fbff;
}

.candidate-specific-options > .conditional-fields:not(.hidden) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.candidate-specific-options > #military-fields:not(.hidden) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.candidate-specific-options > #military-fields h3 {
  grid-column: 1 / -1;
  margin: 0;
}

body[data-app-stage="intake"] #advisor-form {
  gap: 12px;
}

@media (min-width: 721px) {
  body[data-app-stage="intake"] .essential-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }

  body[data-app-stage="intake"] .form-panel {
    max-width: 840px;
  }
}

@media (max-width: 720px) {
  body[data-app-stage="intake"] .form-panel .panel-title {
    margin-bottom: 12px;
    padding-top: 15px;
    padding-bottom: 12px;
  }

  body[data-app-stage="intake"] .form-panel .panel-title h2 {
    font-size: 20px;
  }

  body[data-app-stage="intake"] .intake-intro {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
  }

  body[data-app-stage="intake"] .essential-fields {
    gap: 9px;
  }

  body[data-app-stage="intake"] .essential-fields > label,
  body[data-app-stage="intake"] .subject-picker-field {
    margin: 0;
  }

  body[data-app-stage="intake"] .subject-picker-open {
    min-height: 54px;
  }

  .profile-entry-grid {
    gap: 7px;
  }

  .profile-hub-entry {
    min-height: 54px;
    grid-template-columns: 27px minmax(0, 1fr) 13px;
    gap: 6px;
    padding: 7px;
  }

  .profile-hub-entry-icon {
    width: 27px;
    height: 27px;
    border-radius: 7px;
  }

  .profile-hub-entry strong {
    font-size: 11px;
    white-space: normal;
  }

  .profile-hub-entry small {
    display: none;
  }

  .profile-hub-backdrop {
    padding: 10px;
  }

  .profile-hub-modal {
    max-height: calc(100dvh - 20px);
    border-radius: 12px;
  }

  .profile-hub-header {
    padding: 13px 13px 11px;
  }

  .profile-hub-header h3 {
    font-size: 17px;
  }

  .profile-hub-header p {
    display: none;
  }

  .profile-hub-scroll .combined-option-tabs {
    position: sticky;
    z-index: 3;
    top: 0;
  }

  .candidate-specific-options > .conditional-fields:not(.hidden),
  .candidate-specific-options > #military-fields:not(.hidden) {
    grid-template-columns: 1fr;
  }
}

/* School overview uses one modal with stable internal categories. */
.school-detail-workspace {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.school-detail-tabs {
  position: sticky;
  z-index: 4;
  top: -16px;
  display: flex;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #d7e3ef;
  border-radius: 9px;
  background: rgba(241, 246, 252, 0.97);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  isolation: isolate;
}

.school-detail-tabs::-webkit-scrollbar {
  display: none;
}

.school-detail-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: auto;
  min-height: 34px;
  min-width: max-content;
  flex: 0 0 auto;
  padding: 6px 10px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #597087;
  font-size: 11px;
  font-weight: 760;
  scroll-snap-align: center;
  white-space: nowrap;
}

.school-detail-tab:hover:not(:disabled),
.school-detail-tab:focus-visible {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.72);
  color: #185b96;
}

.school-detail-tab.active {
  border-color: transparent;
  background: transparent;
  color: #185b96;
}

.school-detail-tabs > .sliding-tab-indicator {
  border-color: #8fb7dc;
  background: #dfeefa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64), 0 2px 8px rgba(33, 91, 145, 0.1);
}

.school-detail-panel {
  position: relative;
  min-width: 0;
  min-height: 180px;
  overflow: hidden;
}

.school-card-details .mobile-school-details-toggle {
  cursor: pointer;
}

.school-card-details .mobile-school-details-toggle > svg:last-child {
  transform: none !important;
}

/* The mobile/tablet header only translates as one rigid surface. */
@media (max-width: 980px) {
  .recommendation-sticky-header {
    --recommendation-header-shift: 0px;
    overflow: visible !important;
    transform: translate3d(0, var(--recommendation-header-shift), 0) !important;
    transition: none !important;
    will-change: transform;
  }

  .recommendation-sticky-header > .panel-title,
  .recommendation-sticky-header .panel-subtitle,
  .recommendation-sticky-header .result-tools,
  .recommendation-sticky-header .admission-channel-filter,
  .recommendation-sticky-header .school-search,
  .recommendation-sticky-header .sort-controls,
  .recommendation-sticky-header .mobile-school-filter-toggle {
    max-height: none !important;
    overflow: visible;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .recommendation-sticky-header > .panel-title,
  .recommendation-sticky-header .admission-channel-filter,
  .recommendation-sticky-header .school-search,
  .recommendation-sticky-header .sort-controls,
  .recommendation-sticky-header .mobile-school-filter-toggle {
    min-height: initial;
    pointer-events: auto;
  }

  .recommendation-sticky-header .result-tools {
    gap: 6px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
}

.school-card-details .mobile-school-details-toggle {
  display: flex !important;
  width: 100%;
}

@media (max-width: 720px) {
  .recommendation-sticky-header .result-tools {
    gap: 4px !important;
    padding: 5px !important;
  }
}

/* Wage distribution: no horizontal scrolling on narrow professional pages. */
@media (max-width: 720px) {
  .occupation-wage-table-wrap {
    overflow-x: visible;
  }

  .occupation-wage-table {
    display: block;
    min-width: 0;
    border: 0;
  }

  .occupation-wage-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .occupation-wage-table tbody {
    display: grid;
    gap: 8px;
  }

  .occupation-wage-table tr {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #fff;
  }

  .occupation-wage-table th,
  .occupation-wage-table td {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 2px;
    padding: 6px 2px;
    border: 0;
    border-right: 1px solid #e4ebf2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .occupation-wage-table th:first-child {
    width: auto;
    grid-column: 1 / -1;
    justify-items: start;
    padding: 7px 8px;
    border-right: 0;
    border-bottom: 1px solid #dbe5ef;
    background: #f5f8fb;
    text-align: left;
  }

  .occupation-wage-table td:last-child {
    border-right: 0;
  }

  .occupation-wage-table td::before {
    color: #728398;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 700;
  }

  .occupation-wage-table td {
    color: #2f4c68;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
  }
}

@media (max-width: 360px) {
  .recommendation-sticky-header > .panel-title > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .recommendation-sticky-header .volunteer-open {
    width: 76px;
    min-width: 76px;
    flex: 0 0 76px;
    gap: 4px;
    padding-right: 6px;
    padding-left: 6px;
    overflow: hidden;
    font-size: 0;
  }

  .recommendation-sticky-header .volunteer-open > span {
    font-size: 10px;
  }
}

/* Production UI: restrained, dense, and decision-oriented. */
:root {
  --bg: #eef1ef;
  --panel: #fbfcfb;
  --panel-muted: #f5f7f6;
  --text: #17201e;
  --muted: #63706d;
  --line: #d5dcda;
  --line-strong: #bdc8c5;
  --accent: #145c57;
  --accent-hover: #0f4d49;
  --accent-2: #28704f;
  --warn: #9a641a;
  --danger: #a43f3f;
  --soft: #e8f2f0;
  --focus: #4e8f88;
  --shadow: 0 7px 22px rgba(24, 42, 38, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button,
summary,
input,
select,
.school-photo-button {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.school-photo-button:focus-visible {
  outline: 3px solid rgba(78, 143, 136, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 72px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.96);
  box-shadow: 0 1px 8px rgba(24, 42, 38, 0.04);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: flex;
  min-width: 264px;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #8eb3ae;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: SimSun, serif;
  font-size: 20px;
  font-weight: 700;
}

.product-kicker,
.section-kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin-top: 1px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.workflow-steps {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.workflow-steps li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.workflow-steps li + li::before {
  position: absolute;
  top: 50%;
  right: calc(100% + 7px);
  width: 14px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.workflow-steps li > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.workflow-steps li.active {
  color: var(--text);
}

.workflow-steps li.active > span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.status-pill {
  min-width: 124px;
  height: 42px;
  padding: 0 11px;
  border-color: var(--line);
  background: var(--panel-muted);
  color: var(--text);
}

.status-pill > span:last-child {
  display: grid;
  line-height: 1.15;
}

.status-pill strong {
  font-size: 12px;
}

.status-pill small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  background: #3e8c62;
  box-shadow: 0 0 0 3px rgba(62, 140, 98, 0.12);
}

.layout {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px 28px;
}

.panel {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-panel {
  top: 88px;
  max-height: calc(100vh - 104px);
  padding: 0 16px 16px;
  scrollbar-color: #bdc8c5 transparent;
  scrollbar-width: thin;
}

.form-panel .panel-title {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 0 -16px 14px;
  padding: 14px 16px 12px;
  background: var(--panel);
}

.panel-title {
  min-height: 72px;
  padding: 14px 18px;
}

.panel-title h2 {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.3;
}

.panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

form {
  gap: 11px;
}

label,
legend {
  color: #56625f;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
button {
  min-height: 40px;
  border-color: var(--line-strong);
  border-radius: 6px;
}

input,
select {
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

input:hover,
select:hover {
  border-color: #8fa09c;
}

input:focus,
select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(78, 143, 136, 0.12);
}

input[readonly] {
  background: #edf2f0;
  color: var(--accent);
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

fieldset {
  gap: 7px;
  padding: 10px 11px 11px;
  border-color: var(--line);
  background: #fafbfa;
}

.check {
  min-height: 26px;
  color: #35413e;
  font-size: 12px;
  font-weight: 500;
}

.choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}

.choice-grid.compact {
  max-height: 170px;
}

.conditional-fields {
  gap: 10px;
  padding: 11px;
  border-color: var(--line);
  background: var(--panel-muted);
}

.hint {
  color: #52706a;
  font-size: 11px;
}

form > .form-primary-action {
  position: sticky;
  z-index: 4;
  bottom: 0;
  min-height: 44px;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 -8px 16px rgba(251, 252, 251, 0.95);
}

.workspace {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.student-alert {
  min-height: 60px;
  padding: 12px 16px;
  border-color: #b8d2c5;
  background: #eef6f1;
  box-shadow: none;
}

.student-alert.danger {
  border-color: #dfc696;
  background: #fbf5e9;
}

.volunteer-open {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.volunteer-open > span:last-child {
  min-width: 22px;
  height: 22px;
  border-radius: 5px;
}

.result-tools {
  padding: 10px 14px;
  background: #f8faf9;
}

.tabs {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.tab {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tab:hover:not(:disabled) {
  border-color: transparent;
  background: #edf3f1;
  color: var(--text);
}

.tab.active {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(20, 92, 87, 0.15);
}

.sort-controls,
.sort-label {
  gap: 6px;
}

.sort-label {
  min-width: 210px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sort-label svg {
  width: 16px;
  height: 16px;
}

.sort-label select {
  min-width: 142px;
  min-height: 34px;
}

.icon-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
}

.icon-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.load-more:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.results {
  gap: 10px;
  padding: 14px;
}

.result-card {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px 14px;
  padding: 14px 14px 12px;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 1px 0 rgba(21, 41, 36, 0.02);
  contain: layout paint;
}

.result-card:hover {
  border-color: #aebdb9;
  box-shadow: 0 8px 22px rgba(20, 48, 42, 0.07);
  transform: translateY(-1px);
}

.result-card:has(.band.reach) {
  border-left: 3px solid #c8892f;
}

.result-card:has(.band.stable) {
  border-left: 3px solid #2c7770;
}

.result-card:has(.band.safe) {
  border-left: 3px solid #4b8664;
}

.band {
  width: 54px;
  height: 54px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px rgba(27, 48, 43, 0.12), 0 4px 12px rgba(27, 48, 43, 0.1);
}

.band.reach {
  background: #b87924;
}

.band.stable {
  background: #286f69;
}

.band.safe {
  background: #397859;
}

.probability-badge strong {
  font-size: 17px;
  line-height: 1;
}

.result-heading {
  gap: 7px;
  margin-bottom: 4px;
}

.school-card-copy h3 {
  font-size: 18px;
  line-height: 1.35;
}

.school-title-button {
  gap: 10px;
}

.school-title-button:hover:not(:disabled),
.school-title-button:active:not(:disabled) {
  border-color: transparent;
  background: transparent;
  transform: none;
}

.school-logo {
  width: 34px;
  height: 34px;
  border-color: #cbd4d2;
  border-radius: 6px;
}

.tags {
  gap: 5px;
}

.tag,
.tags span {
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.school-meta,
.school-stats,
.rank-gap {
  gap: 5px 13px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.school-meta span,
.school-stats span,
.rank-gap span {
  min-width: 0;
}

.school-stats .stat-eligible {
  color: #174f86;
  font-weight: 700;
}

.school-stats .stat-pending {
  color: #94600d;
  font-weight: 650;
}

.school-stats .stat-pending--important {
  color: #a64242;
}

.school-stats .stat-expanded {
  color: #65758a;
}

.school-stats .stat-expanded--released {
  color: #47647f;
  font-weight: 650;
}

.school-code {
  color: #24322f;
}

.rank-gap.good {
  color: #1f754b;
}

.rank-gap.bad {
  color: #b33e3e;
}

.card-actions {
  min-width: 142px;
}

.card-actions button {
  min-height: 38px;
  border-color: var(--accent);
  background: var(--accent);
  font-size: 12px;
}

.card-actions svg {
  width: 16px;
  height: 16px;
}

.school-card-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 2px;
  border-top: 1px solid var(--line);
}

.school-card-details .school-detail-menu,
.school-detail-menu {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.school-detail-item {
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.school-detail-item:last-child {
  border-right: 0;
}

.school-detail-item > summary {
  display: flex;
  min-height: 38px;
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: #52605d;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.school-detail-item > summary::-webkit-details-marker {
  display: none;
}

.school-detail-item > summary svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  transition: transform 180ms ease;
}

.school-detail-item > summary:hover {
  background: #edf3f1;
  color: var(--accent);
}

.school-detail-item[open] {
  padding-bottom: 4px;
  border-right: 0;
}

.school-detail-item[open] > summary {
  background: #edf3f1;
  color: var(--accent);
}

.school-detail-item[open] > summary svg {
  transform: rotate(90deg);
}

.school-detail-item .detail-grid {
  gap: 0;
  margin: 0;
  padding: 8px 10px 4px;
  border-top: 1px solid var(--line);
}

.detail-grid > div,
.school-reference-block > div {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e7ebe9;
  border-radius: 0;
  background: transparent;
}

.detail-grid > div:last-child,
.school-reference-block > div:last-child {
  border-bottom: 0;
}

.official-school-claims {
  border-left: 3px solid var(--accent-2) !important;
  background: #eef6f1 !important;
}

.historical-outcome-chart {
  width: 100%;
  height: 30px;
  min-height: 30px;
}

.historical-outcome-chart .historical-outcome-bar {
  margin-top: 10px;
}

.historical-outcome-legend {
  gap: 6px 16px;
}

.drawer-backdrop {
  background: rgba(19, 30, 27, 0.42);
  backdrop-filter: blur(2px);
}

.drawer {
  width: min(780px, 94vw);
  border-color: var(--line);
  background: var(--panel);
  box-shadow: -18px 0 42px rgba(16, 31, 27, 0.16);
}

.drawer-header {
  min-height: 86px;
  padding: 18px 20px;
  background: #f8faf9;
}

.drawer-header h2 {
  margin-top: 2px;
  font-size: 19px;
}

.drawer-search {
  align-items: center;
  padding: 10px 20px;
  background: #fff;
}

.drawer-search > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.drawer-search input {
  min-height: 38px;
}

.major-list,
.volunteer-list {
  gap: 9px;
  padding: 14px 20px 28px;
  scrollbar-color: #bdc8c5 transparent;
  scrollbar-width: thin;
}

.major-row,
.volunteer-row {
  border-color: var(--line);
  border-radius: 7px;
  box-shadow: 0 1px 0 rgba(21, 41, 36, 0.02);
}

.major-summary {
  padding: 13px 14px;
}

.major-name {
  margin-top: 5px;
  font-size: 15px;
}

.major-meta strong {
  color: #2b3a37;
}

.major-detail {
  gap: 0;
  padding: 0 14px 13px;
  border-top: 1px solid #e5eae8;
}

.major-detail .major-detail-section,
.major-detail section {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e5eae8;
  border-radius: 0;
  background: transparent;
}

.major-detail .major-detail-section > summary {
  padding: 10px 4px;
  color: #3d4c48;
}

.major-detail .major-detail-section[open] {
  padding-bottom: 10px;
}

.major-detail .manual-requirement-check {
  padding: 10px 4px;
  border-bottom: 0;
  background: #fbf5e9;
}

.volunteer-toolbar {
  padding: 10px 20px;
  background: #fff;
}

.volunteer-toolbar button {
  min-height: 38px;
  font-size: 12px;
}

.volunteer-table-scroll {
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
}

.volunteer-table-scroll thead th {
  background: #edf2f0;
}

.volunteer-actions button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.school-photo-strip {
  gap: 10px;
}

.school-photo-strip img {
  border-color: var(--line);
}

.school-photo-button:hover:not(:disabled) {
  border-color: transparent;
  background: transparent;
}

.school-photo-button:hover img {
  box-shadow: 0 8px 18px rgba(20, 48, 42, 0.12);
  transform: translateY(-1px);
}

.toast {
  border-color: #a8c9b8;
  background: #eef6f1;
  color: #225a3a;
}

.empty,
.loading {
  min-height: 86px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .workflow-steps {
    display: none;
  }

  .layout {
    grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
  }

  .school-card-details .school-detail-menu,
  .school-detail-menu,
  .school-card-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .school-detail-item:nth-child(3) {
    border-right: 0;
  }
}

@media (max-width: 980px) {
  .topbar {
    min-height: 64px;
    padding: 9px 14px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  h1 {
    font-size: 17px;
  }

  .status-pill {
    min-width: auto;
    height: 38px;
  }

  .status-pill small {
    display: none;
  }

  .mobile-view-switch {
    top: 64px;
    padding: 7px 14px;
    background: rgba(251, 252, 251, 0.97);
    backdrop-filter: blur(8px);
  }

  .layout {
    padding: 12px 14px 24px;
  }

  .form-panel {
    padding: 0 14px 14px;
  }

  .form-panel .panel-title {
    margin-right: -14px;
    margin-left: -14px;
  }

  .result-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .card-actions {
    min-width: 0;
  }

  .school-card-details .school-detail-menu,
  .school-detail-menu,
  .school-card-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-detail-item,
  .school-detail-item:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .school-detail-item:nth-child(even),
  .school-detail-item:last-child {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    gap: 8px;
  }

  .product-kicker {
    display: none;
  }

  h1 {
    max-width: 190px;
    font-size: 15px;
  }

  .status-pill {
    padding: 0 9px;
  }

  .layout {
    padding: 10px;
  }

  .panel-title {
    padding: 12px 13px;
  }

  .result-tools {
    gap: 9px;
    padding: 10px 12px;
  }

  .sort-controls {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: end;
  }

  .sort-label {
    display: grid;
    width: 100%;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
  }

  .sort-label select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .sort-controls .icon-button {
    width: 42px;
    min-width: 42px;
  }

  .tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results {
    padding: 10px;
  }

  .result-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 10px;
  }

  .band {
    width: 48px;
    height: 48px;
  }

  .probability-badge strong {
    font-size: 15px;
  }

  .school-card-copy h3 {
    font-size: 16px;
  }

  .school-logo {
    width: 31px;
    height: 31px;
  }

  .school-meta,
  .school-stats,
  .rank-gap {
    gap: 4px 9px;
    font-size: 11px;
  }

  .school-card-details .school-detail-menu,
  .school-detail-menu,
  .school-card-details {
    grid-template-columns: 1fr;
  }

  .school-detail-item,
  .school-detail-item:nth-child(3),
  .school-detail-item:nth-child(even) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .school-detail-item:last-child {
    border-bottom: 0;
  }

  .school-detail-item > summary {
    min-height: 40px;
  }

  .detail-grid,
  .major-detail {
    grid-template-columns: 1fr;
  }

  .drawer {
    width: 100vw;
  }

  .drawer-header,
  .drawer-search,
  .volunteer-toolbar,
  .major-list,
  .volunteer-list {
    padding-right: 14px;
    padding-left: 14px;
  }

  .major-summary {
    grid-template-columns: 1fr;
  }

  .major-actions button {
    width: 100%;
  }
}

/* Recommendation controls remain available while the school list scrolls. */
.recommendation-sticky-header {
  position: sticky;
  z-index: 24;
  top: 72px;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(32, 62, 101, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.recommendation-sticky-header > .panel-title,
.recommendation-sticky-header > .result-tools {
  background: transparent;
}

.band-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.special-only-control {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid #c6d5e7;
  border-radius: 7px;
  background: rgba(242, 247, 253, 0.88);
  color: #31516f;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.special-only-control.hidden {
  display: none;
}

.special-only-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.special-only-track {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid #afbed0;
  border-radius: 10px;
  background: #dce4ed;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.special-only-track > span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(28, 49, 76, 0.22);
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.special-only-control input:checked + .special-only-track {
  border-color: #2a70b5;
  background: #2a70b5;
}

.special-only-control input:checked + .special-only-track > span {
  transform: translateX(14px);
}

.special-only-control:focus-within {
  outline: 3px solid rgba(59, 130, 246, 0.24);
  outline-offset: 2px;
}

.tag-pathway-special {
  border-color: #91c6b0;
  background: #e9f7f0;
  color: #226849;
}

.tag-pathway-ordinary {
  border-color: #a8c7e8;
  background: #eaf3fc;
  color: #245d93;
}

@media (max-width: 980px) {
  .recommendation-sticky-header {
    top: 118px;
  }
}

@media (max-width: 720px) {
  .recommendation-sticky-header {
    top: 100px;
  }

  .band-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .band-menu-toggle {
    grid-column: 1 / -1;
  }

  .special-only-control {
    grid-column: 2;
    justify-self: end;
    min-height: 32px;
  }
}

/* Civic-blue production finish selected for the student-facing recommendation view. */
:root {
  --bg: #f3f6fa;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-muted: rgba(246, 249, 253, 0.88);
  --text: #162239;
  --muted: #5b687a;
  --line: #d5dfec;
  --line-strong: #b8c7da;
  --accent: #1d4fa3;
  --accent-hover: #17438d;
  --accent-2: #247348;
  --warn: #9b6519;
  --danger: #aa3f48;
  --soft: #eaf1fd;
  --focus: #3b82f6;
  --shadow: 0 8px 26px rgba(39, 67, 105, 0.07);
}

body {
  background: var(--bg);
}

.topbar {
  border-color: rgba(184, 199, 218, 0.78);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 14px rgba(39, 67, 105, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.brand-mark {
  border-color: rgba(29, 79, 163, 0.45);
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(29, 79, 163, 0.16);
}

.workflow-steps li.active > span,
form > .form-primary-action,
.tab.active,
.card-actions button {
  border-color: var(--accent);
  background: var(--accent);
}

.status-pill,
.panel,
.result-tools,
.tabs {
  border-color: rgba(184, 199, 218, 0.76);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
  backdrop-filter: blur(16px) saturate(1.06);
}

.status-pill {
  box-shadow: 0 5px 16px rgba(39, 67, 105, 0.06);
}

.form-panel .panel-title {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

fieldset,
.conditional-fields,
input[readonly] {
  border-color: var(--line);
  background: rgba(242, 246, 251, 0.82);
}

input:focus,
select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.school-photo-button:focus-visible {
  outline-color: rgba(59, 130, 246, 0.34);
}

.student-alert {
  border-color: rgba(78, 145, 103, 0.35);
  background: rgba(239, 248, 242, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.result-tools {
  background: rgba(248, 251, 255, 0.78);
}

.tabs {
  padding: 4px;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.tab {
  border-radius: 6px;
}

.tab:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.load-more:hover:not(:disabled) {
  border-color: rgba(29, 79, 163, 0.35);
  background: rgba(234, 241, 253, 0.88);
  color: var(--accent);
}

.tab.active {
  box-shadow: 0 4px 12px rgba(29, 79, 163, 0.16);
}

.results {
  gap: 12px;
}

.preference-match-notice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #b8d0e8;
  border-radius: 7px;
  background: #f2f7fc;
  color: #35516c;
  font-size: 12px;
  line-height: 1.55;
}

.preference-match-notice > [data-lucide-app] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #236aa7;
}

.preference-match-notice strong {
  color: #174f82;
  font-size: 13px;
}

.preference-match-notice p {
  margin: 2px 0 0;
}

.preference-match-notice--empty {
  border-color: #d6c8a9;
  background: #fbf8f0;
  color: #665b43;
}

.preference-match-notice--empty > [data-lucide-app],
.preference-match-notice--empty strong {
  color: #8a661e;
}

.preference-field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.result-card {
  position: relative;
  isolation: isolate;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px 14px;
  overflow: hidden;
  padding: 14px 14px 12px;
  border: 1px solid rgba(184, 199, 218, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 3px 14px rgba(39, 67, 105, 0.055);
  contain: layout paint;
  transition: border-color 190ms ease, box-shadow 190ms ease, transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  backdrop-filter: blur(12px) saturate(1.04);
}

.result-card::before {
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: 80px;
  border-right: 1px solid rgba(151, 180, 220, 0.46);
  background: rgba(226, 238, 253, 0.8);
  content: "";
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

.result-card:hover {
  border-color: rgba(98, 133, 184, 0.72);
  box-shadow: 0 11px 30px rgba(39, 67, 105, 0.1);
  transform: translateY(-2px);
}

.result-card:has(.band.reach),
.result-card:has(.band.stable),
.result-card:has(.band.safe) {
  border-left-width: 1px;
  border-left-color: rgba(184, 199, 218, 0.78);
}

.school-card-visual {
  position: absolute;
  z-index: 1;
  display: block;
  right: -10px;
  bottom: 34px;
  width: min(48%, 560px);
  height: 76%;
  overflow: hidden;
  opacity: 0.72;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.24) 13%, rgba(0, 0, 0, 0.72) 31%, #000 52%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.24) 13%, rgba(0, 0, 0, 0.72) 31%, #000 52%, #000 100%);
}

.school-card-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 50%;
  filter: none;
  transform: none;
  transition: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.result-card:hover .school-card-visual img {
  filter: none;
  transform: none;
}

.school-card-copy,
.probability-badge,
.card-actions,
.school-card-details {
  position: relative;
  z-index: 2;
}

.school-card-copy {
  grid-column: 2;
  grid-row: 1;
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
}

.school-title {
  flex: 0 1 auto;
}

.school-title-button {
  color: var(--text);
}

.school-logo {
  border-color: rgba(159, 178, 204, 0.76);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 3px 10px rgba(39, 67, 105, 0.07);
}

.tags {
  justify-content: flex-end;
}

.tag,
.tags span {
  border-radius: 6px;
  background-clip: padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(9px) saturate(1.08);
  backdrop-filter: blur(9px) saturate(1.08);
}

.tag-public,
.tag-fit {
  border-color: rgba(72, 145, 98, 0.34);
  background: rgba(233, 247, 238, 0.78);
  color: #21653c;
}

.tag-private {
  border-color: rgba(190, 136, 42, 0.38);
  background: rgba(255, 247, 229, 0.78);
  color: #80550a;
}

.tag-rank,
.tag-strength {
  border-color: rgba(68, 113, 184, 0.34);
  background: rgba(232, 240, 253, 0.8);
  color: #1d4f91;
}

.school-meta,
.school-stats,
.rank-gap {
  color: #516078;
}

.school-code {
  color: #21324d;
}

.band {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  justify-self: center;
  width: 64px;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.band.reach {
  background: transparent;
  color: #9a6216;
}

.band.stable {
  background: transparent;
  color: #1d4fa3;
}

.band.safe {
  background: transparent;
  color: #247348;
}

.band.unknown {
  background: transparent;
  color: #64748b;
}

.probability-badge strong {
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift", "DIN Alternate", "Roboto Mono", "Microsoft YaHei UI", sans-serif;
  font-size: 29px;
  font-stretch: condensed;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.probability-badge strong.probability-range-value {
  max-width: 62px;
  overflow: hidden;
  font-size: 12px;
  font-stretch: condensed;
  line-height: 1.15;
  letter-spacing: 0;
  text-overflow: clip;
  white-space: nowrap;
}

.card-actions {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  min-width: 142px;
}

.card-actions button {
  width: 100%;
  min-height: 38px;
  box-shadow: 0 5px 14px rgba(29, 79, 163, 0.14);
}

.school-card-details {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 3px -14px -12px;
  padding: 0 14px;
  border-top: 1px solid rgba(184, 199, 218, 0.68);
  background: rgba(250, 252, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
}

.school-detail-item {
  border-right-color: rgba(184, 199, 218, 0.62);
}

.school-detail-item > summary {
  color: #52627a;
}

.school-detail-item > summary:hover {
  background: rgba(231, 239, 251, 0.72);
  color: var(--accent);
}

@media (max-width: 980px) {
  .result-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 11px 12px;
  }

  .result-card::before {
    width: 74px;
  }

  .band {
    width: 58px;
    height: 100%;
  }

  .probability-badge strong {
    font-size: 26px;
  }

  .card-actions {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    width: min(100%, 180px);
  }

  .school-card-details {
    grid-row: 3;
  }

  .school-card-visual {
    bottom: 58px;
    width: 58%;
    height: 68%;
    opacity: 0.72;
  }
}

@media (max-width: 720px) {
  .result-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 10px;
  }

  .result-card::before {
    width: 64px;
  }

  .band {
    width: 52px;
    height: 100%;
    margin: 0;
  }

  .probability-badge strong {
    font-size: 24px;
  }

  .probability-badge strong.probability-range-value {
    max-width: 50px;
    font-size: 10px;
  }

  .result-heading {
    display: grid;
    justify-content: stretch;
    gap: 7px;
  }

  .tags {
    justify-content: flex-start;
  }

  .school-card-copy h3 {
    font-size: 16px;
  }

  .card-actions {
    grid-column: 2;
    width: 100%;
  }

  .school-card-details {
    grid-row: 3;
    margin: 2px -10px -12px;
    padding: 0 10px;
  }

  .school-card-visual {
    right: -16px;
    top: 4px;
    bottom: auto;
    width: 78%;
    height: 62%;
    opacity: 0.72;
  }

  .school-card-visual img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-position: 56% 38%;
  }
}

/* Responsive workspace controls and compact mobile decision view. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.layout {
  --profile-expanded-width: clamp(340px, 24vw, 400px);
  grid-template-columns: var(--profile-expanded-width) minmax(0, 1fr);
  transition: grid-template-columns 520ms cubic-bezier(0.22, 0.61, 0.36, 1), gap 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.layout.profile-collapsed {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.form-panel {
  min-width: 0;
  transition: max-height 460ms cubic-bezier(0.22, 0.61, 0.36, 1), min-height 460ms cubic-bezier(0.22, 0.61, 0.36, 1), padding 400ms cubic-bezier(0.22, 0.61, 0.36, 1), border-radius 360ms ease, box-shadow 360ms ease;
}

.form-panel form {
  min-width: 308px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.form-panel .panel-title > div {
  min-width: 0;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.profile-collapse-button {
  position: relative;
  z-index: 6;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border-color: rgba(151, 177, 213, 0.72);
  border-radius: 7px;
  background: rgba(239, 245, 254, 0.92);
  color: var(--accent);
  box-shadow: 0 3px 10px rgba(39, 67, 105, 0.08);
}

.profile-collapse-button.is-collapsed {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 14px rgba(29, 79, 163, 0.2);
}

.profile-collapse-button > span:not(.visually-hidden) {
  display: grid;
  place-items: center;
}

.profile-collapse-button svg {
  display: block;
  width: 17px;
  height: 17px;
  color: inherit;
  stroke: currentColor;
  transform: rotate(180deg);
  transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.profile-collapse-button.is-collapsed svg {
  transform: rotate(0deg);
}

.layout.profile-collapsed .form-panel {
  min-height: 58px;
  max-height: 58px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(39, 67, 105, 0.07);
}

.layout.profile-collapsed .form-panel .panel-title {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  height: 58px;
  min-height: 58px;
  width: 100%;
  margin: 0;
  padding: 11px;
  justify-content: center;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.86);
}

.layout.profile-collapsed .form-panel form,
.layout.profile-collapsed .form-panel .panel-title > div {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-14px);
  transition: opacity 140ms ease, transform 220ms ease, visibility 0s linear 180ms;
}

.band-filter {
  position: relative;
  min-width: 0;
}

.band-menu-toggle {
  display: none;
}

.school-card-details {
  display: block;
}

.mobile-school-details-toggle {
  display: none;
}

.school-detail-menu-shell {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr);
}

.school-detail-menu-shell > .school-detail-menu {
  display: grid;
  min-height: 0;
  overflow: visible;
}

@media (max-width: 980px) {
  .layout,
  .layout.profile-collapsed {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .profile-collapse-button {
    display: none;
  }

  .form-panel form,
  .form-panel .panel-title > div {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 56px;
    padding: 7px 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  h1 {
    max-width: 205px;
    font-size: 14px;
  }

  .status-pill {
    height: 36px;
  }

  .mobile-view-switch {
    top: 56px;
    padding: 6px 12px;
  }

  .mobile-view-switch button {
    min-height: 34px;
  }

  .layout {
    padding: 8px;
  }

  .workspace {
    gap: 9px;
  }

  .student-alert {
    min-height: 50px;
    padding: 9px 12px;
  }

  .student-alert p,
  .student-alert span {
    font-size: 11px;
    line-height: 1.45;
  }

  .workspace > .panel > .panel-title {
    min-height: 60px;
    padding: 9px 11px;
  }

  .workspace > .panel > .panel-title h2 {
    font-size: 16px;
  }

  .panel-subtitle {
    max-width: 235px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .volunteer-open {
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }

  .result-tools {
    position: relative;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 8px 9px;
    overflow: visible;
  }

  .band-filter {
    width: 100%;
  }

  .band-menu-toggle {
    display: grid;
    width: 100%;
    min-height: 40px;
    padding: 5px 10px;
    grid-template-columns: auto minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    border-color: rgba(151, 177, 213, 0.75);
    background: rgba(247, 250, 255, 0.94);
    color: var(--text);
    text-align: left;
    box-shadow: 0 3px 10px rgba(39, 67, 105, 0.06);
  }

  .band-menu-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }

  .band-menu-toggle strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .band-menu-chevron {
    display: grid;
    place-items: center;
  }

  .band-menu-chevron svg {
    width: 16px;
    height: 16px;
    transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .band-filter.is-open .band-menu-chevron svg {
    transform: rotate(180deg);
  }

  .band-filter .tabs {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    width: 100%;
    max-height: 0;
    padding: 0 7px;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-7px) scale(0.985);
    transform-origin: top center;
    border-width: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 14px 34px rgba(29, 55, 92, 0.16);
    -webkit-backdrop-filter: blur(20px) saturate(1.05);
    backdrop-filter: blur(20px) saturate(1.05);
    transition: max-height 380ms cubic-bezier(0.22, 0.61, 0.36, 1), padding 320ms ease, opacity 210ms ease, transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 380ms, border-width 0s linear 380ms;
  }

  .band-filter.is-open .tabs {
    max-height: 220px;
    padding: 7px;
    border-width: 1px;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: max-height 380ms cubic-bezier(0.22, 0.61, 0.36, 1), padding 320ms ease, opacity 210ms ease, transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0s, border-width 0s linear 0s;
  }

  .band-filter .tab {
    width: 100%;
    min-height: 39px;
    padding: 0 11px;
    justify-content: flex-start;
    text-align: left;
  }

  .sort-controls {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 7px;
    align-items: center;
  }

  .sort-label {
    display: block;
    min-width: 0;
  }

  .sort-label > span {
    display: none;
  }

  .sort-label select {
    width: 100%;
    min-height: 36px;
  }

  .sort-controls .icon-button {
    width: 38px;
    min-width: 38px;
    height: 36px;
    min-height: 36px;
  }

  .results {
    gap: 8px;
    padding: 7px;
  }

  .result-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 7px 8px;
    padding: 9px 8px 8px;
    border-radius: 8px;
  }

  .result-card::before {
    width: 56px;
  }

  .band {
    width: 48px;
  }

  .probability-badge strong {
    font-size: 22px;
  }

  .school-card-copy h3 {
    font-size: 15px;
  }

  .school-title-button {
    min-height: 30px;
    gap: 7px;
  }

  .school-logo {
    width: 29px;
    height: 29px;
  }

  .result-heading {
    gap: 5px;
  }

  .tags {
    gap: 3px;
  }

  .tags .tag:nth-child(n + 4) {
    display: none;
  }

  .tag,
  .tags span {
    min-height: 19px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.25;
  }

  .school-meta,
  .school-stats,
  .rank-gap {
    gap: 3px 8px;
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.4;
  }

  .school-meta .meta-school-type,
  .school-meta .meta-category,
  .school-stats .stat-pending,
  .school-stats .stat-total,
  .school-stats .stat-outcome {
    display: none;
  }

  .school-meta .meta-location {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rank-gap span {
    display: none;
  }

  .card-actions {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    width: min(100%, 220px);
  }

  .card-actions button {
    min-height: 34px;
    font-size: 11px;
  }

  .school-card-details {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 2px -8px -8px;
    padding: 0 8px;
  }

  .mobile-school-details-toggle {
    display: flex;
    width: 100%;
    min-height: 38px;
    padding: 0 5px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    color: #4c5d76;
    box-shadow: none;
    font-size: 11px;
  }

  .mobile-school-details-toggle > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .mobile-school-details-toggle svg {
    width: 15px;
    height: 15px;
  }

  .mobile-school-details-toggle > svg,
  .mobile-school-details-toggle > span:last-child svg {
    transition: transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .school-card-details.is-open .mobile-school-details-toggle > svg,
  .school-card-details.is-open .mobile-school-details-toggle > span:last-child svg {
    transform: rotate(180deg);
  }

  .school-detail-menu-shell {
    grid-template-rows: minmax(0, 0fr);
    opacity: 0;
    transition: grid-template-rows 440ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms ease;
  }

  .school-card-details.is-open .school-detail-menu-shell {
    grid-template-rows: minmax(0, 1fr);
    opacity: 1;
  }

  .school-detail-menu-shell > .school-detail-menu {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .school-detail-item > summary {
    min-height: 36px;
    font-size: 11px;
  }

  .school-card-visual {
    width: 76%;
    height: 72%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@layer legacy {
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 800;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafc;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

.mobile-view-switch {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  align-self: start;
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.form-panel .panel-title {
  padding: 0 0 16px;
  margin-bottom: 16px;
}

.panel-title svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

h2 {
  font-size: 17px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hint {
  color: var(--accent);
  font-size: 12px;
  line-height: 1.5;
}

input,
select,
button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input,
select {
  padding: 0 10px;
}

input[readonly] {
  background: #f3f6f8;
  color: var(--accent);
  font-weight: 800;
}

fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

legend {
  color: var(--muted);
  font-size: 13px;
}

.check {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--text);
}

.check input {
  width: 16px;
  min-height: 16px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
}

.choice-grid.compact {
  max-height: 178px;
  overflow: auto;
  padding-right: 4px;
}

.conditional-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafc;
}

.conditional-fields > h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

#military-fields {
  border-color: #c89a3d;
  background: #fffaf0;
}

.hidden {
  display: none;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button svg {
  width: 18px;
  height: 18px;
}

.workspace {
  display: grid;
  gap: 20px;
}

.student-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #b9d8c2;
  border-radius: 8px;
  background: #eff8f2;
  box-shadow: var(--shadow);
}

.student-alert.danger {
  border-color: #e7c57b;
  background: #fff8e7;
}

.student-alert strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-2);
}

.student-alert.danger strong {
  color: var(--warn);
}

.student-alert p,
.student-alert span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.result-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.sort-label {
  display: flex;
  min-width: 210px;
  align-items: center;
  grid-template-columns: none;
  gap: 8px;
}

.sort-label select {
  min-width: 150px;
}

.results {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.load-more {
  width: 100%;
  min-height: 44px;
  border-color: var(--line);
  background: #fff;
  color: var(--accent);
}

.result-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.band {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.probability-badge {
  align-content: center;
  gap: 1px;
  text-align: center;
}

.probability-badge strong {
  font-size: 18px;
  line-height: 1.1;
}

.band.reach {
  background: var(--warn);
}

.band.safe {
  background: var(--accent-2);
}

.band.stable {
  background: #176b87;
}

.band.unknown {
  background: var(--muted);
}

.result-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
}

.result-main {
  min-width: 0;
}

.result-main h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.school-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.school-title span {
  min-width: 0;
}

.school-title-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.school-title-button:hover span,
.school-title-button:focus-visible span {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.school-logo {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  padding: 2px;
}

.school-logo--contrast {
  border-color: transparent;
  padding: 4px;
}

.result-main p,
.result-side {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-main .condition-warning {
  margin-top: 4px;
  color: var(--warn);
  font-weight: 800;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

details {
  margin-top: 10px;
  min-width: 0;
}

summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.qualification-details {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafc;
}

.qualification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}

.detail-grid > div,
.school-reference-block > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafc;
}

.school-reference-block {
  display: contents;
}

.school-photo-detail {
  grid-column: 1 / -1;
}

.school-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.school-photo-strip figure {
  min-width: 0;
  margin: 0;
}

.school-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.school-photo-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
}

.school-photo-button:focus-visible img {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.school-photo-strip figcaption,
.source-caveat {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-grid dt {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.detail-grid-wide {
  grid-column: 1 / -1;
}

.official-school-claims {
  padding: 10px 12px;
  border-left: 3px solid var(--accent-2);
  border-radius: 4px;
  background: #f1f8f3;
}

.official-school-claims-badge {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.long-text-plain,
.long-text-full,
.long-text-preview {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.long-text-disclosure {
  margin-top: 0;
}

.long-text-disclosure summary {
  display: block;
  color: inherit;
  font-weight: 400;
  list-style: none;
}

.long-text-disclosure summary::-webkit-details-marker {
  display: none;
}

.long-text-toggle {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.long-text-toggle::before {
  content: "详情";
}

.long-text-disclosure[open] .long-text-preview {
  display: none;
}

.long-text-disclosure[open] .long-text-toggle::before {
  content: "收起";
}

.long-text-full {
  margin-top: 6px;
}

.school-photo-lightbox {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 56px 24px 24px;
  background: rgba(14, 22, 33, 0.92);
  cursor: zoom-out;
}

.school-photo-lightbox.hidden {
  display: none;
}

.school-photo-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 80px);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.school-photo-lightbox-close {
  position: fixed;
  z-index: 141;
  top: 16px;
  right: 18px;
  border-color: rgba(255, 255, 255, 0.7);
  background: #fff;
  color: var(--text);
}

.detail-grid dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.historical-outcome-branches {
  display: grid;
  gap: 9px;
}

.historical-outcome-bar {
  display: flex;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e4e8ee;
}

.historical-outcome-bar span {
  min-width: 0;
}

.historical-outcome-bar .postgraduate,
.historical-outcome-legend .postgraduate i {
  background: #1e7663;
}

.historical-outcome-bar .overseas,
.historical-outcome-legend .overseas i {
  background: #3769a6;
}

.historical-outcome-bar .implemented,
.historical-outcome-legend .implemented i {
  background: #c98828;
}

.historical-outcome-bar .unimplemented,
.historical-outcome-legend .unimplemented i {
  background: #a7afb9;
}

.historical-outcome-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--text);
  font-size: 12px;
}

.historical-outcome-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.historical-outcome-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.historical-outcome-branches p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.result-side {
  text-align: right;
}

.prob {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.empty,
.loading {
  padding: 18px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 980px) {
  .mobile-view-switch {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .mobile-view-switch button {
    min-height: 36px;
    border-color: var(--line);
    background: #fff;
    color: var(--text);
  }

  .mobile-view-switch button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }

  body[data-mobile-view="results"] .form-panel,
  body[data-mobile-view="profile"] .workspace {
    display: none;
  }

  .layout,
  .choice-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
    max-height: none;
  }

  .student-alert,
  .result-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-label {
    width: 100%;
  }

  .result-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .school-card-copy {
    grid-column: 2;
  }

  .probability-badge {
    grid-column: 1;
  }

  .school-card-details {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .card-actions {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .result-side {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.volunteer-open {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.volunteer-open span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  font-size: 20px;
}

.school-card-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.school-card-copy h3 {
  font-size: 18px;
}

.school-meta,
.school-stats,
.rank-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.school-code {
  color: var(--text);
  font-weight: 800;
}

.rank-gap.good {
  color: #16794a;
  font-weight: 800;
}

.rank-gap.bad {
  color: #c63d3d;
  font-weight: 800;
}

.rank-gap.neutral {
  color: var(--muted);
  font-weight: 800;
}

.card-actions {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 138px;
}

.card-actions button {
  padding: 0 12px;
  white-space: nowrap;
}

.secondary-button,
.card-actions .secondary-button {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.tag-group {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tag-group + .tag-group {
  margin-left: 2px;
  padding-left: 7px;
  border-left: 1px solid rgba(130, 151, 177, 0.42);
}

.tag-group--risk {
  order: 0;
}

.tag-group--advantage {
  order: 1;
}

.tag-group--attribute {
  order: 2;
}

.tag[data-tooltip],
.probability-layer[data-tooltip] {
  cursor: help;
}

.tag.tag--risk {
  border-left-width: 3px;
  border-left-style: solid;
  box-shadow: none;
}

.tag.tag--advantage {
  border-style: solid;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 2px 7px rgba(39, 79, 126, 0.08);
}

.tag.tag--attribute {
  border-style: solid;
  box-shadow: none;
}

.tag-985 { background: #fff0f0; border-color: #f3b2b2; color: #aa2222; }
.tag-211 { background: #eef5ff; border-color: #b7cff3; color: #245da6; }
.tag-double-first { background: #f5efff; border-color: #d3b8f0; color: #6c3d96; }
.tag-public { background: #edf8f1; border-color: #b8dec5; color: #267344; }
.tag-private { background: #fff7e7; border-color: #eccb87; color: #8b5a00; }
.tag-rank { background: #eaf8f8; border-color: #a8d8d8; color: #176b70; }
.tag-fit { background: #eff8f2; border-color: #b9d8c2; color: #267344; }
.tag-strength { background: #edf3ff; border-color: #bed0f3; color: #315f9f; }
.tag-program { background: #fff4e8; border-color: #edc69d; color: #9a5517; }
.tag-a-plus { background: #8d1f2d; border-color: #8d1f2d; color: #fff; }
.tag-a { background: #b33a35; border-color: #b33a35; color: #fff; }
.tag-a-minus { background: #fff0e5; border-color: #e5ad7c; color: #8a421b; }
.tag-caution { background: #fff8e7; border-color: #e7c57b; color: #8a5700; }
.tag-restriction { background: #fff0f0; border-color: #e8b0b0; color: #a53030; }
.tag-neutral { background: #f1f3f6; border-color: #d9dee7; color: #596477; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 28, 38, 0.42);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  display: flex;
  width: min(760px, 92vw);
  height: 100vh;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -16px 0 36px rgba(18, 29, 45, 0.16);
}

.drawer.hidden,
.drawer-backdrop.hidden,
.toast.hidden {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  font-size: 20px;
}

.drawer-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.drawer-eyebrow {
  color: var(--accent) !important;
  font-weight: 800;
}

.drawer-search,
.volunteer-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.school-detail-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.school-card-details {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 10px;
}

.school-card-details .school-detail-menu {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: transparent;
}

.school-detail-item {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.school-detail-item[open] {
  grid-column: 1 / -1;
}

.school-detail-item .detail-grid {
  margin-top: 10px;
}

.school-detail-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.volunteer-toolbar button {
  width: auto;
  padding: 0 14px;
}

.major-list,
.volunteer-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 16px 20px 28px;
}

.major-row,
.volunteer-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.volunteer-row.is-invalid {
  border-color: #d89999;
  background: #fff5f5;
}

.volunteer-row .volunteer-invalid-reason {
  color: var(--danger);
  font-weight: 800;
}

.volunteer-batch-heading {
  margin: 8px 0 0;
  padding: 8px 2px 2px;
  color: var(--text);
  font-size: 14px;
}

.major-row.is-ineligible,
.major-row.is-preference-mismatch {
  background: #f4f5f7;
  color: #7b8390;
}

.major-row.is-needs-info {
  border-color: #d8b66b;
  background: #fffaf0;
}

.major-row.is-needs-info .major-reason {
  color: #8a5a00;
}

.major-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
}

.major-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.is-ineligible .major-name,
.is-preference-mismatch .major-name {
  color: #687386;
}

.major-direction,
.major-meta,
.major-reason {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.major-reason {
  color: var(--danger);
  font-weight: 800;
}

.major-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.major-actions button {
  width: auto;
  min-height: 34px;
  padding: 0 10px;
}

.major-actions button:disabled {
  border-color: var(--line);
  background: #e5e8ed;
  color: #89919d;
  cursor: not-allowed;
}

.major-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.major-detail section {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.major-detail .major-detail-section {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.major-detail .major-detail-section summary {
  color: var(--text);
}

.major-detail .major-detail-section > strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--text);
  font-size: 12px;
}

.probability-explanation {
  display: grid;
  gap: 8px;
  padding: 10px 2px 2px;
  color: #334e68;
  line-height: 1.65;
}

.probability-explanation p,
.probability-explanation ul {
  margin: 0;
}

.probability-explanation ul {
  padding-left: 20px;
}

.probability-explanation small {
  color: #6c7f92;
  line-height: 1.55;
}

.probability-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #bdd8f0;
  border-radius: 6px;
  background: #f0f7ff;
  color: #24547e;
}

.probability-equation strong {
  color: #0869b2;
  font-size: 22px;
}

.probability-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 0;
}

.probability-scenarios span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border-bottom: 2px solid #c8d9eb;
}

.probability-scenarios small {
  overflow-wrap: anywhere;
  color: #62798f;
  font-size: 11px;
}

.probability-scenarios strong {
  color: #245f96;
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift", "DIN Alternate", "Roboto Mono", "Microsoft YaHei UI", sans-serif;
  font-size: 20px;
  letter-spacing: 0;
}

.probability-scenario-note {
  color: #536f88;
  font-size: 12px;
}

.probability-confidence {
  color: #536f88;
  font-size: 12px;
}

.probability-explanation--unavailable {
  color: #5f6670;
}

.probability-risk-notice {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 7px;
}

.probability-risk-notice p {
  margin: 0;
}

.probability-risk-notice--pending {
  border-color: #e4bd66;
  background: #fff8e7;
  color: #704d08;
}

.probability-risk-notice--weak {
  border-color: #dfc36a;
  background: #fffbea;
  color: #66520b;
}

.probability-charter-link {
  color: #145b9d;
  font-weight: 750;
}

.tag-probability-pending,
.tag-probability-weak {
  border-color: rgba(192, 144, 25, 0.45);
  background: rgba(255, 247, 207, 0.9);
  color: #765506;
}

.tag-probability-insufficient {
  border-color: rgba(133, 145, 160, 0.42);
  background: rgba(239, 242, 246, 0.92);
  color: #5f6874;
}

.school-probability-detail-body {
  padding: 0 10px 12px;
}

.major-detail .major-reference-options {
  grid-column: 1 / -1;
  border-color: #c9dff5;
  background: rgba(245, 250, 255, 0.82);
}

.major-reference-explanation,
.major-reference-unresolved {
  margin: 10px 0;
  color: #49647e;
  line-height: 1.65;
}

.major-reference-unresolved {
  padding: 8px 10px;
  border-left: 3px solid #9aaabd;
  background: rgba(255, 255, 255, 0.72);
}

.linked-major-reference {
  margin-top: 8px;
  border-top: 1px solid #d6e5f3;
}

.linked-major-reference > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  cursor: pointer;
}

.linked-major-reference > summary span {
  color: #123f6d;
  font-weight: 700;
}

.linked-major-reference > summary small {
  color: #60788f;
  text-align: right;
}

.linked-major-reference-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 2px 0 10px;
}

.linked-major-reference-body > details {
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid rgba(188, 210, 231, 0.72);
}

.linked-major-reference-body > details > summary {
  color: #244f79;
  font-weight: 650;
  cursor: pointer;
}

.linked-major-reference-body > details > strong {
  display: block;
  margin: 8px 0 4px;
  color: #294d70;
  font-size: 12px;
}

@media (max-width: 720px) {
  .linked-major-reference > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .linked-major-reference > summary small {
    text-align: left;
  }

  .linked-major-reference-body {
    grid-template-columns: 1fr;
  }
}

.major-detail .occupation-wage-detail {
  grid-column: 1 / -1;
}

.major-detail .development-scenario-detail[open] {
  border-color: #b9d6f4;
  background: #f8fbff;
}

.career-development-scenario {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.career-scenario-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid #d8e7f6;
}

.career-scenario-heading > strong {
  display: block;
  color: #123f6d;
  font-size: 15px;
}

.career-scenario-heading p,
.career-scenario-scope {
  margin: 5px 0 0;
}

.career-scenario-branches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.career-scenario-branch {
  min-width: 0;
  padding: 2px 0 2px 11px;
  border-left: 3px solid #90a4b8;
}

.career-scenario-branch.postgraduate {
  border-left-color: #2674c8;
}

.career-scenario-branch.overseas {
  border-left-color: #7657b5;
}

.career-scenario-branch.implemented {
  border-left-color: #24855a;
}

.career-scenario-branch.unimplemented {
  border-left-color: #9b6f2d;
}

.career-scenario-branch strong,
.career-scenario-branch span,
.career-scenario-branch small {
  display: block;
}

.career-scenario-branch strong {
  color: #153f69;
  font-size: 19px;
  line-height: 1.1;
}

.career-scenario-branch span {
  margin-top: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.career-scenario-branch small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.career-scenario-empty {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid #9aa8b7;
  background: #f1f4f7;
}

.career-scenario-subsection {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #d8e7f6;
}

.career-scenario-subsection > summary {
  color: #173f69;
  font-size: 13px;
  font-weight: 800;
}

.career-scenario-location-control {
  display: grid;
  grid-template-columns: auto minmax(140px, 220px) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin: 10px 0 14px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.career-scenario-location-control select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #a9c7e7;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #173f69;
}

.career-scenario-location-control small {
  color: var(--muted);
  font-weight: 500;
}

.career-scenario-location-control small strong {
  color: #165d9f;
}

.occupation-wage-context {
  margin-top: 10px;
}

.major-detail .occupation-wage-caveat {
  margin: 0 0 10px;
  color: #7a4d00;
  font-weight: 700;
}

.occupation-wage-group {
  min-width: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.occupation-wage-group + .occupation-wage-group {
  margin-top: 12px;
}

.occupation-wage-group h4 {
  margin: 0 0 4px;
}

.occupation-wage-group p {
  margin: 0 0 8px;
}

.occupation-wage-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.occupation-wage-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.occupation-wage-table th,
.occupation-wage-table td {
  padding: 7px 8px;
  border: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.occupation-wage-table th:first-child {
  width: 240px;
  text-align: left;
  white-space: normal;
}

.occupation-wage-table thead th {
  background: #f4f6f8;
  color: var(--text);
  font-weight: 800;
}

.occupation-wage-table tbody td strong {
  color: #12633a;
}

.major-detail .manual-requirement-check {
  grid-column: 1 / -1;
  border-color: #d8b66b;
  background: #fffaf0;
}

.manual-requirement-check button {
  width: auto;
  margin-top: 8px;
  padding: 8px 12px;
}

.major-detail h4 {
  margin: 0 0 5px;
  font-size: 13px;
}

.major-detail p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.volunteer-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.volunteer-index {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.volunteer-row h3 {
  font-size: 14px;
}

.volunteer-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.volunteer-actions {
  display: flex;
  gap: 5px;
}

.volunteer-actions button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.volunteer-batch-table > p {
  margin: 4px 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.volunteer-table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.volunteer-table-scroll table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
}

.volunteer-table-scroll th,
.volunteer-table-scroll td {
  min-width: 76px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.volunteer-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef2f7;
  color: var(--text);
  font-weight: 800;
}

.volunteer-table-scroll tbody th {
  width: 46px;
  min-width: 46px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.volunteer-table-scroll tr.is-empty {
  height: 38px;
  background: #fbfcfd;
}

.volunteer-table-scroll tr.is-invalid {
  background: #fff5f5;
}

.volunteer-table-scroll .volunteer-actions {
  min-width: 112px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid #b9d8c2;
  border-radius: 8px;
  background: #eff8f2;
  box-shadow: var(--shadow);
  color: #245f3b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

body.drawer-open {
  overflow-x: hidden;
  overflow-y: scroll;
}

@media (max-width: 720px) {
  .topbar,
  .layout {
    padding: 14px;
  }

  .result-tools,
  .sort-controls,
  .sort-label {
    align-items: stretch;
    flex-direction: column;
  }

  .school-detail-menu {
    grid-template-columns: 1fr;
  }

  .school-card-details .school-detail-menu {
    grid-template-columns: 1fr;
  }

  .sort-controls,
  .sort-label,
  .sort-label select {
    width: 100%;
  }

  .sort-controls .icon-button {
    width: 100%;
  }

  .result-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .school-card-copy {
    grid-column: 2;
  }

  .probability-badge {
    grid-column: 1;
  }

  .school-card-details {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: 1fr;
  }

  .drawer {
    top: 8vh;
    width: 100vw;
    height: 92vh;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .major-summary,
  .major-detail,
  .volunteer-row,
  .qualification-grid {
    grid-template-columns: 1fr;
  }

  .career-scenario-branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .career-scenario-location-control {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .major-actions,
  .volunteer-actions {
    width: 100%;
  }

  .major-actions button {
    flex: 1;
  }

  .volunteer-index {
    text-align: left;
  }
}
}

/* Centered professional catalog dialog and school/major information hierarchy. */
#major-drawer {
  top: 50%;
  right: auto;
  left: 50%;
  width: min(980px, calc(100vw - 48px));
  height: min(92vh, 940px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(163, 184, 211, 0.82);
  border-radius: 12px;
  box-shadow: 0 24px 72px rgba(18, 42, 75, 0.24);
  overflow: hidden;
}

#major-drawer .drawer-header {
  padding: 18px 22px 16px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

#major-drawer .drawer-search {
  padding-right: 22px;
  padding-left: 22px;
}

#major-drawer .major-list {
  padding-right: 22px;
  padding-left: 22px;
}

.major-detail .major-detail-section > summary {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #eef5fc;
  color: #143f6e;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

.major-detail .major-detail-section[open] > summary {
  background: #e4f0fc;
  color: #0d5793;
}

.career-scenario-subsection {
  margin-left: 8px;
  padding: 8px 0 0 12px;
  border-top: 0;
  border-left: 2px solid #c8d9eb;
}

.career-scenario-subsection > summary {
  width: fit-content;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #d6e3f0;
  border-radius: 5px;
  background: #f7f9fc;
  color: #52657a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.career-scenario-subsection[open] > summary {
  border-color: #b9d1e9;
  background: #edf4fb;
  color: #285f91;
}

.career-scenario-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid #ccdceb;
  border-radius: 8px;
  background: #f1f6fb;
}

.career-scenario-tab {
  min-width: 0;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #52677e;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
  text-align: center;
}

.career-scenario-tab:hover:not(:disabled) {
  border-color: #b8cde2;
  background: #f9fcff;
  color: #285f91;
}

.career-scenario-tab.active {
  border-color: #91b4d7;
  background: #fff;
  color: #174f87;
  box-shadow: 0 4px 12px rgba(35, 79, 126, 0.12);
}

.career-scenario-tab-panels {
  min-width: 0;
}

.career-scenario-tab-panel {
  min-width: 0;
  padding: 14px 4px 2px;
}

.career-scenario-tab-panel[hidden] {
  display: none;
}

.school-cost-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 !important;
  border-bottom: 0 !important;
}

.school-cost-fact {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d4e1ee;
  border-radius: 7px;
  background: #f7fbff;
}

.school-cost-fact > span {
  color: #62748a;
  font-size: 11px;
  font-weight: 750;
}

.school-cost-fact > strong {
  color: #174f82;
  font-size: 16px;
  line-height: 1.35;
}

.school-cost-fact > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.personal-budget-checklist {
  border-left: 3px solid #7ca5cf !important;
  background: #f7fbff !important;
}

.stable-gap-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bad1e8;
  border-left: 4px solid #3980bd;
  border-radius: 7px;
  background: #f1f7fd;
  color: #35516c;
  font-size: 12px;
  line-height: 1.55;
}

.stable-gap-notice strong {
  color: #174f82;
  font-size: 13px;
}

.stable-gap-clear {
  justify-self: start;
  padding: 7px 10px;
  border: 1px solid #8bb4da;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: #145b91;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stable-gap-clear:hover {
  border-color: #4d8fc7;
  background: #fff;
}

@media (max-width: 720px) {
  #major-drawer {
    top: 50%;
    right: auto;
    left: 50%;
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    transform: translate(-50%, -50%);
    border: 1px solid rgba(163, 184, 211, 0.82);
    border-radius: 10px;
  }

  #major-drawer .drawer-header,
  #major-drawer .drawer-search,
  #major-drawer .major-list {
    padding-right: 14px;
    padding-left: 14px;
  }

  #major-drawer .drawer-header {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #major-drawer #major-drawer-meta {
    display: none;
  }

  .school-cost-summary {
    grid-template-columns: 1fr 1fr;
  }

  .career-scenario-subsection {
    margin-left: 2px;
    padding-left: 9px;
  }

  .career-scenario-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .career-scenario-tab {
    min-width: 0;
    min-height: 56px;
    padding-inline: 4px;
    font-size: 11px;
    white-space: normal;
    text-wrap: balance;
  }

  .school-card-copy::before {
    position: absolute;
    z-index: -1;
    inset: -5px -4px -5px -5px;
    border-radius: 7px;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.92) 54%,
      rgba(255, 255, 255, 0.76) 76%,
      rgba(255, 255, 255, 0.18) 100%
    );
    content: "";
    pointer-events: none;
  }

  .school-card-visual {
    right: -10px;
    width: 70%;
    opacity: 0.8;
  }

  .school-card-copy .tag,
  .school-card-copy .tags span {
    background-clip: border-box;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Recommendation calculation feedback is shared by every risk tab. */
.recommendation-loading {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  border: 1px solid #cbdced;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
}

.recommendation-loading-copy {
  display: flex;
  align-items: center;
  gap: 13px;
}

.recommendation-loading-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #174f82;
  font-size: 15px;
}

.recommendation-loading-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.recommendation-loading-seconds {
  color: #1d5f9d;
  font-size: 14px;
}

.recommendation-loading-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 3px solid #c9dced;
  border-top-color: #286daf;
  border-radius: 50%;
  animation: recommendation-loading-spin 900ms linear infinite;
}

.recommendation-loading-skeleton {
  display: grid;
  gap: 8px;
}

.recommendation-loading-skeleton span {
  display: block;
  height: 11px;
  border-radius: 4px;
  background: #dce8f3;
  animation: recommendation-loading-pulse 1.4s ease-in-out infinite alternate;
}

.recommendation-loading-skeleton span:nth-child(1) {
  width: 88%;
}

.recommendation-loading-skeleton span:nth-child(2) {
  width: 66%;
  animation-delay: 140ms;
}

.recommendation-loading-skeleton span:nth-child(3) {
  width: 76%;
  animation-delay: 280ms;
}

@keyframes recommendation-loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes recommendation-loading-pulse {
  from { opacity: 0.48; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .recommendation-loading-spinner,
  .recommendation-loading-skeleton span {
    animation: none;
  }
}

@media (max-width: 720px) {
  .recommendation-sticky-header > .panel-title {
    box-sizing: border-box;
    min-height: 0 !important;
    max-height: 82px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 320ms cubic-bezier(0.22, 0.61, 0.36, 1), padding 320ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 180ms ease, transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1), border-color 180ms ease;
  }

  .recommendation-sticky-header .result-tools {
    padding: 7px 8px;
    gap: 6px;
    transition: padding 320ms cubic-bezier(0.22, 0.61, 0.36, 1), gap 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .recommendation-sticky-header .band-filter {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .recommendation-sticky-header .band-menu-toggle {
    display: none !important;
  }

  .recommendation-sticky-header .band-filter .tabs {
    position: static;
    z-index: auto;
    display: grid;
    width: 100%;
    max-height: none;
    padding: 0;
    overflow: visible;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    border: 0;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: none;
  }

  .recommendation-sticky-header .band-filter .tab {
    width: 100%;
    min-width: 0;
    min-height: 35px;
    padding: 0 3px;
    justify-content: center;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .recommendation-sticky-header .special-only-control,
  .recommendation-sticky-header .school-condition-switches--toolbar,
  .recommendation-sticky-header .sort-controls {
    max-height: 42px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 300ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 180ms ease, transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .recommendation-sticky-header .special-only-control {
    grid-column: 1;
    justify-self: end;
  }

  .recommendation-sticky-header.is-scroll-collapsed > .panel-title {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  .recommendation-sticky-header.is-scroll-collapsed .result-tools {
    gap: 0;
    padding: 5px 7px;
  }

  .recommendation-sticky-header.is-scroll-collapsed .special-only-control,
  .recommendation-sticky-header.is-scroll-collapsed .school-condition-switches--toolbar,
  .recommendation-sticky-header.is-scroll-collapsed .sort-controls {
    max-height: 0;
    margin: 0;
    border-width: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }

  .recommendation-sticky-header.is-scroll-collapsed .band-filter .tab {
    min-height: 33px;
  }

  .mobile-school-details-toggle {
    min-height: 40px;
    margin: 5px 0 7px;
    padding: 0 10px;
    border: 1px solid #b7cee5;
    border-radius: 7px;
    background: rgba(238, 246, 253, 0.94);
    color: #174f82;
    box-shadow: 0 3px 10px rgba(34, 79, 124, 0.07);
    font-size: 11.5px;
    font-weight: 780;
  }

  .mobile-school-details-toggle:active,
  .school-card-details.is-open .mobile-school-details-toggle {
    border-color: #82acd4;
    background: #e6f1fb;
  }

  .recommendation-loading {
    gap: 14px;
    padding: 18px 15px;
  }
}

.extreme-results-toggle {
  display: flex;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #c6d4e3;
  border-radius: 7px;
  background: #f5f8fb;
  color: #36516e;
  box-shadow: none;
  font-size: 12px;
}

.extreme-results-toggle > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.extreme-results-toggle strong {
  color: #174f82;
  font-size: 14px;
}

.extreme-results-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.extreme-results-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.major-focus-toggle {
  display: flex;
  width: 100%;
  min-height: 40px;
  padding: 7px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #c9d8e7;
  border-radius: 7px;
  background: #f4f8fc;
  color: #395875;
  box-shadow: none;
  font-size: 11px;
}

.major-focus-toggle > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.major-focus-toggle strong {
  color: #175386;
  font-size: 13px;
}

.major-focus-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.major-focus-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.extreme-results-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-top: 2px;
}

.extreme-results-section > p {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #7997b5;
  background: #f5f8fb;
  color: #53667a;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .extreme-results-toggle {
    min-height: 42px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .major-focus-toggle {
    min-height: 38px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .extreme-results-section {
    gap: 8px;
  }
}

.site-footer {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  margin: 8px auto 28px;
  padding: 18px 20px;
  place-items: center;
  gap: 9px;
  border-top: 1px solid rgba(151, 174, 197, 0.42);
  color: #617284;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.site-footer p {
  max-width: 820px;
  margin: 0;
}

.site-footer-links,
.site-records {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
}

.site-footer a {
  color: #315f8e;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #123f6c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#police-record-link {
  align-items: center;
  gap: 5px;
}

#police-record-link:not([hidden]) {
  display: inline-flex;
}

#police-record-badge {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .site-footer {
    width: calc(100% - 20px);
    margin: 4px auto 18px;
    padding: 14px 8px;
    gap: 7px;
    font-size: 10.5px;
  }
}

/* Persistent compliance and recommendation navigation controls. */
.school-search {
  position: relative;
  display: grid;
  min-width: 360px;
  align-items: center;
  color: #58708b;
}

.school-search > [data-lucide-app] {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  pointer-events: none;
  transform: translateY(-50%);
}

.school-search > [data-lucide-app] svg {
  width: 17px;
  height: 17px;
}

.school-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 34px 0 38px;
  border-color: rgba(151, 177, 213, 0.78);
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.school-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.result-tools {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(430px, 1.25fr) max-content minmax(210px, max-content);
  align-items: center;
  gap: 8px;
}

.result-tools > * {
  min-width: 0;
}

.result-tools .school-search {
  min-width: 0;
}

@media (min-width: 981px) {
  .recommendation-sticky-header .band-filter,
  .recommendation-sticky-header .band-filter .tabs {
    width: 100%;
    min-width: 0;
  }

  .recommendation-sticky-header .band-filter .tabs {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .recommendation-sticky-header .band-filter .tab {
    flex: 1 1 0;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    white-space: nowrap;
  }
}

.mobile-generate-bar {
  display: none;
}

.back-to-top {
  position: fixed;
  z-index: 44;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(126, 158, 196, 0.72);
  border-radius: 10px;
  background: rgba(244, 249, 255, 0.94);
  color: #1d568c;
  box-shadow: 0 8px 22px rgba(27, 66, 111, 0.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
  font-size: 12px;
  font-weight: 780;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1280px) and (min-width: 981px) {
  .result-tools {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .school-search {
    grid-column: 1 / -1;
  }

  .band-filter {
    grid-column: 1 / -1;
  }

  .school-condition-switches--toolbar {
    grid-column: 1;
    justify-self: start;
  }

  .sort-controls {
    grid-column: 2;
    justify-self: end;
  }
}

@media (max-width: 980px) {
  .result-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .school-search {
    min-width: 0;
  }

  .school-condition-switches--toolbar {
    width: 100%;
    justify-content: center;
  }

  .school-condition-switches--toolbar .school-condition-control {
    min-width: 0;
    flex: 0 1 112px;
    justify-content: center;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 720px) {
  body[data-mobile-view="results"] {
    overflow-anchor: none;
  }

  body[data-mobile-view="profile"] {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  body[data-mobile-view="profile"] #advisor-form > .form-primary-action {
    display: none;
  }

  body[data-mobile-view="profile"] .mobile-generate-bar {
    position: fixed;
    z-index: 46;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(151, 177, 213, 0.66);
    background: rgba(248, 251, 255, 0.9);
    box-shadow: 0 -8px 24px rgba(27, 66, 111, 0.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
  }

  body.has-pending-profile-return[data-mobile-view="profile"] .mobile-generate-bar {
    z-index: 122;
  }

  #mobile-generate-plan,
  #mobile-return-to-major {
    width: 100%;
    min-height: 48px;
    border-color: var(--accent);
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 16px rgba(29, 79, 163, 0.18);
    font-size: 14px;
    font-weight: 800;
  }

  .back-to-top {
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
  }

  body[data-mobile-view="profile"] .back-to-top {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .back-to-top-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .recommendation-sticky-header {
    --recommendation-title-height: 82px;
    --recommendation-title-opacity: 1;
    --recommendation-title-shift: 0px;
    --recommendation-aux-height: 44px;
    --recommendation-aux-opacity: 1;
    --recommendation-aux-shift: 0px;
    --recommendation-tools-gap: 6px;
    --recommendation-tools-padding-y: 7px;
    overflow-anchor: none;
  }

  .recommendation-sticky-header > .panel-title {
    box-sizing: border-box;
    min-height: 0 !important;
    max-height: var(--recommendation-title-height) !important;
    opacity: var(--recommendation-title-opacity) !important;
    transform: translateY(var(--recommendation-title-shift)) !important;
    transition: none !important;
  }

  .recommendation-sticky-header .result-tools {
    gap: var(--recommendation-tools-gap) !important;
    padding-top: var(--recommendation-tools-padding-y) !important;
    padding-bottom: var(--recommendation-tools-padding-y) !important;
    transition: none !important;
  }

  .recommendation-sticky-header .school-search,
  .recommendation-sticky-header .special-only-control,
  .recommendation-sticky-header .school-condition-switches--toolbar,
  .recommendation-sticky-header .sort-controls {
    max-height: var(--recommendation-aux-height) !important;
    overflow: hidden;
    opacity: var(--recommendation-aux-opacity) !important;
    transform: translateY(var(--recommendation-aux-shift)) !important;
    transition: none !important;
  }

  .recommendation-sticky-header.is-scroll-collapsed .school-search,
  .recommendation-sticky-header.is-scroll-collapsed .special-only-control,
  .recommendation-sticky-header.is-scroll-collapsed .school-condition-switches--toolbar,
  .recommendation-sticky-header.is-scroll-collapsed .sort-controls,
  .recommendation-sticky-header.is-scroll-collapsed > .panel-title {
    pointer-events: none;
  }

  .school-search input {
    min-height: 40px;
    font-size: 13px;
  }

  #results {
    overflow-anchor: none;
  }
}

/* Centered intake flow: necessary inputs first, optional decisions disclosed on demand. */
body[data-app-stage] {
  display: block !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: clip !important;
}

.mobile-view-switch {
  position: sticky;
  z-index: 29;
  top: 72px;
  display: grid;
  width: min(316px, calc(100% - 28px));
  margin: 10px auto 0;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(151, 177, 213, 0.62);
  border-radius: 10px;
  background: rgba(246, 250, 255, 0.92);
  box-shadow: 0 5px 18px rgba(27, 66, 111, 0.08);
  backdrop-filter: blur(16px) saturate(1.08);
}

.mobile-view-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #526579;
  font-size: 13px;
  font-weight: 760;
}

.mobile-view-switch button:hover:not(:disabled) {
  border-color: transparent;
  background: rgba(218, 232, 249, 0.7);
  color: #1c4e83;
}

.mobile-view-switch button.active {
  background: #fff;
  color: #174f89;
  box-shadow: 0 2px 9px rgba(25, 65, 108, 0.12);
}

body[data-app-stage="intake"] .layout {
  display: block;
  width: min(860px, calc(100% - 32px));
  min-height: calc(100dvh - 190px);
  margin: 0 auto;
  padding: 20px 0 34px;
}

body[data-app-stage="intake"] .workspace,
body[data-app-stage="results"] .form-panel {
  display: none !important;
}

body[data-app-stage="results"] .layout {
  display: block;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 14px 20px 28px;
}

body[data-app-stage="intake"] .form-panel {
  position: static;
  top: auto;
  width: 100%;
  max-height: none;
  margin-inline: auto;
  padding: 0 28px 28px;
  overflow: visible;
  border: 1px solid rgba(151, 177, 213, 0.68);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 50px rgba(29, 66, 110, 0.11);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body[data-app-stage="intake"] .form-panel form {
  min-width: 0;
  transform: none;
}

body[data-app-stage="intake"] .form-panel .panel-title {
  position: static;
  margin: 0 -28px 22px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid rgba(174, 194, 217, 0.52);
  border-radius: 14px 14px 0 0;
  background: linear-gradient(135deg, rgba(238, 246, 255, 0.94), rgba(255, 255, 255, 0.98));
}

body[data-app-stage="intake"] .form-panel .panel-title h2 {
  margin-top: 5px;
  color: #173d65;
  font-size: 25px;
}

.intake-intro {
  max-width: 620px;
  margin: 7px 0 0;
  color: #62758a;
  font-size: 13px;
  line-height: 1.65;
}

.profile-collapse-button {
  display: none;
}

.essential-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px 18px;
}

.essential-fields > label,
.subject-picker-field {
  min-width: 0;
}

.essential-fields > .conditional-fields,
.essential-fields > #military-fields {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: #526274;
  font-size: 12px;
  font-weight: 750;
}

.subject-picker-open {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px;
  border: 1px solid #a7bdd6;
  border-radius: 9px;
  background: #f6faff;
  color: #193e66;
  text-align: left;
}

.subject-picker-open:hover:not(:disabled) {
  border-color: #6590bd;
  background: #edf6ff;
  color: #123e70;
}

.subject-picker-open > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.subject-picker-open strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-picker-open small {
  color: #71849a;
  font-size: 11px;
  font-weight: 550;
}

.subject-picker-open svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.subject-picker-backdrop {
  position: fixed;
  z-index: 96;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 34, 51, 0.5);
  backdrop-filter: blur(8px);
}

.subject-picker-backdrop.hidden {
  display: none;
}

.subject-picker-modal {
  width: min(500px, 100%);
  max-height: calc(100dvh - 36px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(160, 184, 211, 0.78);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(17, 40, 67, 0.28);
}

.subject-picker-modal > header {
  display: flex;
  margin-bottom: 18px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.subject-picker-modal h3 {
  margin: 3px 0 0;
  color: #173d65;
  font-size: 20px;
}

.subject-picker-modal header p {
  margin: 6px 0 0;
  color: #6b7c8f;
  font-size: 12px;
}

.subject-picker-modal #primary-subject-field,
.subject-picker-modal #secondary-field {
  margin-top: 13px;
}

.subject-picker-modal #secondary-field {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 13px;
}

.subject-picker-modal #secondary-field .check {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d2deeb;
  border-radius: 8px;
  background: #f8fbff;
}

.subject-picker-validation {
  min-height: 22px;
  margin: 12px 0 0;
  color: #95601b;
  font-size: 12px;
}

.subject-picker-validation.is-complete {
  color: #24704d;
}

.subject-picker-validation.is-error {
  color: #aa3f47;
  font-weight: 750;
}

.subject-picker-confirm {
  width: 100%;
  margin-top: 8px;
  border-color: #2468ad;
  background: #2468ad;
  color: #fff;
  font-weight: 800;
}

body.subject-picker-open {
  overflow: hidden !important;
}

.profile-option-details,
.qualification-details {
  overflow: clip;
  border: 1px solid #d4dfeb;
  border-radius: 10px;
  background: #fafcff;
}

.profile-option-details > summary,
.qualification-details > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  color: #294b70;
  cursor: pointer;
  list-style: none;
}

.profile-option-details > summary::-webkit-details-marker,
.qualification-details > summary::-webkit-details-marker {
  display: none;
}

.profile-option-details > summary > span:first-child,
.qualification-details > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.profile-option-details summary strong,
.qualification-details summary strong {
  font-size: 13px;
}

.profile-option-details summary small,
.qualification-details summary small {
  color: #74869a;
  font-size: 11px;
  font-weight: 520;
}

.profile-option-details > summary svg,
.qualification-details > summary svg {
  width: 17px;
  height: 17px;
  transition: transform 180ms ease;
}

.profile-option-details[open] > summary svg,
.qualification-details[open] > summary svg {
  transform: rotate(180deg);
}

.profile-option-details[open] > summary,
.qualification-details[open] > summary {
  border-bottom: 1px solid #dbe4ee;
  background: #f2f7fd;
}

.profile-option-content,
.qualification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
  padding: 16px;
}

.profile-option-content > fieldset {
  grid-column: 1 / -1;
}

.compact-option-details .profile-option-content {
  grid-template-columns: 1fr;
}

.combined-option-details > summary {
  min-height: 42px;
  padding: 6px 12px;
}

.combined-option-details > summary > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.combined-option-content {
  display: block;
  padding: 0;
}

.profile-panel-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.profile-reset-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #c8d7e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #48637f;
  font-size: 12px;
  font-weight: 760;
}

.profile-reset-button:hover {
  border-color: #9ab2cc;
  background: #fff;
  color: #244e77;
}

.profile-reset-button svg {
  width: 15px;
  height: 15px;
}

.combined-option-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 6px;
  padding: 9px;
  overflow-x: auto;
  border-bottom: 1px solid #dbe4ee;
  background: #f5f8fc;
  scrollbar-width: thin;
}

.combined-option-tab {
  min-width: 72px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #60758b;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.combined-option-tab:hover {
  border-color: #c3d4e5;
  background: rgba(255, 255, 255, 0.82);
  color: #2b557e;
}

.combined-option-tab.active {
  border-color: #9ebbd9;
  background: #fff;
  color: #1c568e;
  box-shadow: 0 3px 9px rgba(31, 80, 127, 0.08);
}

.combined-option-tab:focus-visible {
  outline: 2px solid #397ab8;
  outline-offset: 1px;
}

.combined-option-section {
  padding: 16px;
}

.combined-option-section[hidden] {
  display: none;
}

.combined-option-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 13px;
  color: #294b70;
}

.combined-option-heading strong {
  font-size: 13px;
}

.combined-option-heading small {
  color: #74869a;
  font-size: 11px;
  font-weight: 520;
}

.combined-option-subtabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  gap: 2px;
  margin: 12px 0 10px;
  padding: 3px;
  border: 1px solid #dce7f1;
  border-radius: 7px;
  background: #f4f8fb;
}

.combined-option-subtab {
  min-width: 68px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #637589;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.combined-option-subtab:hover {
  color: #254f77;
  background: rgba(255, 255, 255, 0.7);
}

.combined-option-subtab.active {
  border-color: #b9cee2;
  background: #fff;
  color: #1f5f98;
  box-shadow: 0 1px 3px rgba(34, 73, 108, 0.08);
}

.combined-option-subtab:focus-visible {
  outline: 2px solid #397ab8;
  outline-offset: 1px;
}

.combined-option-subpanel[hidden] {
  display: none;
}

.combined-option-subheading {
  margin-bottom: 9px;
  color: #718398;
  font-size: 11px;
  line-height: 1.45;
}

.combined-option-grid,
.combined-option-section .qualification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
  margin-top: 0;
  padding: 0;
}

.combined-option-grid > fieldset {
  grid-column: 1 / -1;
}

.combined-option-section-compact fieldset {
  margin: 0;
}

.device-memory-details {
  overflow: clip;
  border: 1px solid #d4dfeb;
  border-radius: 10px;
  background: #fafcff;
}

.device-memory-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: #294b70;
  cursor: pointer;
  list-style: none;
}

.device-memory-details > summary::-webkit-details-marker {
  display: none;
}

.device-memory-details > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 780;
}

.device-memory-details > summary svg {
  width: 16px;
  height: 16px;
}

.device-memory-details > summary small {
  color: #62809e;
  font-size: 11px;
  font-weight: 650;
}

.device-memory-details[open] > summary {
  border-bottom: 1px solid #dbe4ee;
  background: #f2f7fd;
}

.device-memory-content {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.device-memory-content > p {
  margin: 0;
  color: #61758b;
  font-size: 12px;
  line-height: 1.55;
}

.device-memory-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.device-memory-switch > span {
  display: grid;
  gap: 2px;
}

.device-memory-switch strong {
  color: #294b70;
  font-size: 12px;
}

.device-memory-switch small {
  color: #74869a;
  font-size: 10px;
  line-height: 1.4;
}

.device-memory-switch input {
  width: 18px;
  height: 18px;
  justify-self: center;
  accent-color: #2468ad;
}

.device-memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.device-memory-actions button,
.recovery-entry-panel button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 720;
}

.device-memory-actions .danger-button {
  margin-left: auto;
  border-color: #e3c1c5;
  background: #fff7f7;
  color: #9c3942;
}

.recovery-code-panel,
.recovery-entry-panel {
  padding: 10px;
  border: 1px solid #cdddec;
  border-radius: 8px;
  background: #f5f9fd;
}

.recovery-code-panel code {
  display: block;
  margin-top: 6px;
  color: #164f86;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.recovery-entry-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.recovery-entry-panel label {
  margin: 0;
}

.device-memory-status {
  color: #39715d !important;
  font-weight: 680;
}

.school-condition-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.school-condition-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #d4dfeb;
  border-radius: 8px;
  background: #fff;
  color: #2f4965;
  cursor: pointer;
}

.school-condition-control > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.school-condition-control.hidden {
  display: none;
}

.school-condition-track {
  position: relative;
  width: 36px;
  height: 22px;
  border: 1px solid #afbed0;
  border-radius: 11px;
  background: #dce4ed;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.school-condition-track > span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(28, 49, 76, 0.24);
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.school-condition-control > input:checked + .school-condition-track {
  border-color: #2567a9;
  background: #2567a9;
}

.school-condition-control > input:checked + .school-condition-track > span {
  transform: translateX(14px);
}

.school-condition-control:focus-within {
  border-color: #7aa6d2;
  outline: 3px solid rgba(59, 130, 246, 0.18);
  outline-offset: 1px;
}

.school-condition-control strong {
  font-size: 13px;
}

.school-condition-switches--toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: max-content;
  padding: 2px;
  border: 1px solid rgba(184, 199, 218, 0.8);
  border-radius: 7px;
  background: rgba(242, 247, 253, 0.88);
}

.school-condition-switches--toolbar .school-condition-control {
  grid-template-columns: 27px auto;
  gap: 4px;
  min-height: 32px;
  padding: 3px 5px;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  white-space: nowrap;
}

.school-condition-switches--toolbar .school-condition-control:hover {
  border-color: rgba(151, 177, 213, 0.78);
  background: rgba(255, 255, 255, 0.76);
}

.school-condition-switches--toolbar .school-condition-track {
  width: 26px;
  height: 16px;
  border-radius: 8px;
}

.school-condition-switches--toolbar .school-condition-track > span {
  width: 10px;
  height: 10px;
}

.school-condition-switches--toolbar .school-condition-control > input:checked + .school-condition-track > span {
  transform: translateX(10px);
}

.school-condition-switches--toolbar .school-condition-control strong {
  font-size: 11px;
}

@media (max-width: 980px) {
  .school-condition-switches--toolbar {
    gap: 2px;
    min-width: 0;
    padding: 2px;
  }

  .school-condition-switches--toolbar .school-condition-control {
    gap: 3px;
    min-height: 30px;
    padding: 2px 4px;
  }
}

@media (max-width: 420px) {
  .school-condition-switches--toolbar .school-condition-control {
    grid-template-columns: 25px auto;
    gap: 2px;
    padding-right: 3px;
    padding-left: 3px;
  }

  .school-condition-switches--toolbar .school-condition-track {
    width: 24px;
  }

  .school-condition-switches--toolbar .school-condition-control > input:checked + .school-condition-track > span {
    transform: translateX(8px);
  }

  .school-condition-switches--toolbar .school-condition-control strong {
    font-size: 10px;
  }
}

body[data-app-stage="intake"] .form-primary-action {
  min-height: 52px;
  margin-top: 4px;
  border-color: #1e65aa;
  border-radius: 9px;
  background: #1e65aa;
  color: #fff;
  box-shadow: 0 7px 18px rgba(30, 101, 170, 0.2);
  font-size: 15px;
  font-weight: 850;
}

body[data-app-stage="intake"] .form-primary-action:hover:not(:disabled) {
  border-color: #174f89;
  background: #174f89;
}

@media (min-width: 721px) {
  body[data-app-stage="intake"] .form-return-button:not(.hidden) {
    position: fixed;
    z-index: 47;
    bottom: 16px;
    left: 50%;
    width: min(804px, calc(100vw - 84px));
    margin: 0;
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) {
  .mobile-view-switch {
    top: 0;
    margin-top: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    width: 100%;
    padding: 7px 14px;
    background: rgba(250, 252, 255, 0.95);
  }

  body[data-app-stage="intake"] .layout {
    width: min(760px, calc(100% - 24px));
    padding-top: 12px;
  }

  body[data-app-stage="results"] .layout {
    padding: 10px 12px 24px;
  }
}

@media (max-width: 720px) {
  body[data-app-stage="intake"] {
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  body[data-app-stage="intake"] .layout {
    width: 100%;
    min-height: 0;
    padding: 0 0 24px;
  }

  body[data-app-stage="intake"] .form-panel {
    padding: 0 14px 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-app-stage="intake"] .form-panel .panel-title {
    margin: 0 -14px 16px;
    padding: 20px 16px 16px;
    border-radius: 0;
  }

  body[data-app-stage="intake"] .form-panel .panel-title h2 {
    font-size: 21px;
  }

  .essential-fields,
  .profile-option-content,
  .qualification-grid,
  .combined-option-grid,
  .combined-option-section .qualification-grid {
    grid-template-columns: 1fr;
  }

  .essential-fields {
    gap: 12px;
  }

  .subject-picker-modal {
    padding: 18px;
    border-radius: 12px;
  }

  .subject-picker-modal #secondary-field {
    grid-template-columns: 1fr 1fr;
  }

  .profile-option-details > summary,
  .qualification-details > summary {
    min-height: 54px;
    padding: 10px 12px;
  }

  .combined-option-details > summary {
    min-height: 40px;
    padding: 6px 10px;
  }

  .combined-option-details > summary small {
    display: none;
  }

  .combined-option-section {
    padding: 14px 12px;
  }

  .combined-option-subtabs {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .combined-option-subtabs::-webkit-scrollbar {
    display: none;
  }

  .combined-option-subtab {
    min-width: 64px;
    padding-inline: 5px;
  }

  body[data-app-stage="intake"] .site-footer {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

/* Probability evidence tiers remain visible without creating a separate result list. */
.band.insufficient {
  background: transparent;
  color: #687385;
}

.probability-badge {
  grid-auto-flow: row;
  align-content: center;
  justify-items: center;
  gap: 3px;
  overflow: hidden;
}

.probability-band-label {
  max-width: 100%;
  font-size: 9px;
  font-weight: 760;
  line-height: 1.15;
  white-space: nowrap;
}

.probability-layer {
  display: inline-flex;
  max-width: calc(100% - 4px);
  min-height: 16px;
  align-items: center;
  justify-content: center;
  padding: 1px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.probability-layer--high {
  border-color: rgba(50, 137, 84, 0.28);
  background: rgba(226, 245, 233, 0.88);
  color: #236a3d;
}

.probability-layer--medium {
  border-color: rgba(52, 108, 177, 0.28);
  background: rgba(228, 239, 252, 0.9);
  color: #245c99;
}

.probability-layer--low,
.probability-layer--weak,
.probability-layer--pending {
  border-color: rgba(184, 133, 16, 0.34);
  background: rgba(255, 246, 202, 0.92);
  color: #745505;
}

.probability-layer--insufficient {
  border-color: rgba(122, 134, 149, 0.3);
  background: rgba(237, 240, 244, 0.94);
  color: #626c78;
}

@media (max-width: 720px) {
  .school-search input {
    min-height: 44px;
    font-size: 16px;
  }

  .probability-badge {
    gap: 2px;
  }

  .probability-band-label,
  .probability-layer {
    font-size: 8px;
  }

  .probability-layer {
    min-height: 14px;
    padding: 1px 3px;
  }
}

/* Qualification-gated and non-comparable admissions stay visible without entering reach/stable/safe. */
.special-qualification-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  margin: 6px 0 0;
  padding: 14px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #f8fafc;
}

.special-qualification-fields legend {
  padding: 0 6px;
  color: #294b70;
  font-size: 13px;
  font-weight: 800;
}

.special-qualification-fields > p {
  margin: 0 0 2px;
  color: #66778a;
  font-size: 12px;
  line-height: 1.65;
}

.tab-special-application {
  border-color: #c7d2df;
  color: #4d5d70;
}

.tab-special-application.active {
  border-color: #5a718b;
  background: #536b85;
  color: #fff;
}

.special-application-section {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding-top: 4px;
}

.special-application-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 7px;
  border-bottom: 1px solid #d8e1eb;
}

.special-application-section > header h3,
.special-application-section > header strong,
.special-application-section > p {
  margin: 0;
}

.special-application-section > header h3 {
  color: #203d5d;
  font-size: 18px;
}

.special-application-section > header > strong {
  color: #536b85;
  font-size: 13px;
}

.special-application-section > p {
  color: #68798c;
  font-size: 12px;
  line-height: 1.65;
}

.special-application-list {
  display: grid;
  gap: 12px;
}

.result-card--special-application {
  border-color: #cfd9e4;
}

.result-card--special-application .school-card-visual {
  opacity: 0.55;
}

.special-application-notice {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #d5dee8;
  border-left-width: 3px;
  border-radius: 7px;
  background: rgba(249, 251, 253, 0.94);
  color: #3b4d61;
}

.special-application-notice--locked {
  border-left-color: #d59a32;
  background: rgba(255, 250, 237, 0.95);
}

.special-application-notice--unavailable {
  border-left-color: #7a8999;
}

.special-application-notice strong {
  color: #203d5d;
  font-size: 13px;
}

.special-application-notice p,
.special-application-notice ul {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.62;
}

.special-application-notice ul {
  display: grid;
  gap: 3px;
  padding-left: 19px;
}

.special-application-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.special-application-links a,
.special-qualification-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #b9c9da;
  border-radius: 7px;
  background: #fff;
  color: #245f98;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.special-qualification-action {
  border-color: #d59a32;
  background: #fff8e8;
  color: #815d13;
}

.special-application-links svg,
.special-qualification-action svg {
  width: 14px;
  height: 14px;
}

.special-application-badge {
  border-color: #b9c5d2;
  background: rgba(235, 240, 245, 0.94);
  color: #536171;
}

.special-application-badge.qualification-required {
  border-color: #e0b768;
  background: rgba(255, 244, 218, 0.96);
  color: #76540c;
}

.major-row.is-special-application {
  border-color: #d4dde7;
  background: #f8fafc;
}

.major-row.is-special-application .major-actions button:disabled {
  border-color: #c9d3de;
  background: #e9eef3;
  color: #768493;
}

/* Pending hard-gate information is an action, not an achievement label. */
.pending-info-action {
  position: relative;
  z-index: 8;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 3px 0;
  padding: 5px 9px;
  border: 1px solid #dd8d8d;
  border-radius: 7px;
  background: #fff1f1;
  color: #a32222;
  box-shadow: 0 2px 7px rgba(151, 35, 35, 0.1);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.25;
  cursor: pointer;
}

.pending-info-action:hover,
.pending-info-action:focus-visible {
  border-color: #c64e4e;
  background: #ffe7e7;
}

.pending-info-action--compact {
  min-height: 19px;
  margin: 0;
  padding: 2px 5px;
  border-radius: 5px;
  box-shadow: none;
  font-size: 9px;
}

.pending-info-action::after {
  display: none;
}

.pending-info-tooltip {
  position: fixed;
  z-index: 120;
  width: max-content;
  padding: 9px 11px;
  border: 1px solid #d5a1a1;
  border-radius: 7px;
  background: #fff;
  color: #592c2c;
  box-shadow: 0 10px 28px rgba(68, 34, 34, 0.18);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  opacity: 1;
  pointer-events: none;
  transform: translateY(4px);
  visibility: hidden;
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}

.pending-info-tooltip[data-category="advantage"] {
  border-color: #9ebce2;
  background: #f7fbff;
  color: #244f7e;
  box-shadow: 0 10px 28px rgba(38, 79, 126, 0.16);
}

.pending-info-tooltip[data-category="attribute"] {
  border-color: #bcc7d4;
  background: #fbfcfe;
  color: #405267;
  box-shadow: 0 10px 28px rgba(48, 63, 80, 0.14);
}

.pending-info-tooltip:not(.is-visible) {
  opacity: 0;
}

.pending-info-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}

.field-attention-pulse {
  animation: field-attention-pulse 650ms ease-in-out 2;
}

@keyframes field-attention-pulse {
  0%,
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(210, 55, 55, 0);
  }
  45% {
    background-color: rgba(255, 226, 226, 0.7);
    box-shadow: 0 0 0 4px rgba(210, 55, 55, 0.15);
  }
}

@media (max-width: 720px) {
  .recommendation-sticky-header .band-filter .tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .recommendation-sticky-header .band-filter .tab {
    font-size: 9.5px;
  }

  .special-qualification-fields {
    padding: 12px 10px;
  }

  .special-application-notice {
    padding: 10px 11px;
  }

  .special-application-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .special-application-links a,
  .special-qualification-action {
    width: 100%;
    min-height: 38px;
  }

  .pending-info-tooltip {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-attention-pulse {
    animation: none;
    background-color: rgba(255, 226, 226, 0.7);
    box-shadow: 0 0 0 3px rgba(210, 55, 55, 0.16);
  }
}

/* Professional-level probability grouping inside school cards and the major catalog. */
.probability-badge strong.probability-value {
  max-width: 62px;
  font-size: 25px;
  line-height: 1;
  white-space: nowrap;
}

#major-drawer .drawer-header > div {
  min-width: 0;
  flex: 1 1 auto;
}

#major-drawer-title,
#major-drawer-code,
#major-drawer-meta {
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

#major-drawer-title {
  line-height: 1.25;
}

.major-band-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  overflow-x: auto;
  padding: 9px 22px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
  scrollbar-width: thin;
}

.major-band-tab {
  display: inline-flex;
  width: auto;
  min-width: max-content;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #cbd9e9;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: #52657a;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.major-band-tab strong {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #e8eef6;
  color: #36536f;
  font-size: 10px;
  text-align: center;
}

.major-band-tab.active {
  border-color: #4d82bd;
  background: #eaf3ff;
  color: #17588f;
  box-shadow: inset 0 0 0 1px rgba(77, 130, 189, 0.1);
}

.major-band-tab.active strong {
  background: #2b6daa;
  color: #fff;
}

.major-band-tab:disabled {
  cursor: default;
  opacity: 0.42;
}

#major-drawer .major-list {
  gap: 7px;
  padding-top: 10px;
}

#major-drawer .major-summary {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  padding: 10px 12px 8px;
}

#major-drawer .major-name {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.35;
}

#major-drawer .major-direction,
#major-drawer .major-meta,
#major-drawer .major-reason {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.42;
}

#major-drawer .major-score-gap {
  gap: 4px 9px;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.42;
}

#major-drawer .major-actions {
  display: grid;
  align-content: start;
  gap: 6px;
}

.major-probability {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 6px 7px;
  border: 1px solid #c9d8ea;
  border-radius: 7px;
  background: #f1f6fd;
  color: #245b93;
  text-align: center;
}

.major-probability > span,
.major-probability > small {
  font-size: 9px;
  font-weight: 750;
  line-height: 1.15;
}

.major-probability > strong {
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift", "DIN Alternate", "Roboto Mono", "Microsoft YaHei UI", sans-serif;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

.major-probability.reach {
  border-color: #e0c58e;
  background: #fff8e9;
  color: #8b5a12;
}

.major-probability.stable {
  border-color: #b9cfee;
  background: #eef5ff;
  color: #245da6;
}

.major-probability.safe {
  border-color: #b6d9c4;
  background: #eef8f2;
  color: #247348;
}

.major-probability.insufficient,
.major-probability.unknown {
  border-color: #d5dbe4;
  background: #f4f6f8;
  color: #64748b;
}

#major-drawer .major-actions button {
  min-height: 30px;
  padding: 0 7px;
  font-size: 11px;
}

#major-drawer .major-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 8px;
  border-top: 0;
}

#major-drawer .major-detail > .major-detail-section {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#major-drawer .major-detail > .major-detail-section[open] {
  flex-basis: 100%;
  padding: 0 8px 8px;
  border: 1px solid #d6e2ef;
  background: #fbfdff;
}

#major-drawer .major-detail > .major-detail-section > summary {
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #d6e2ef;
  border-radius: 5px;
  background: #f3f7fb;
  color: #3d5873;
  font-size: 11px;
  line-height: 1.25;
}

#major-drawer .major-detail > .major-detail-section[open] > summary {
  margin: 0 -8px 7px;
  border-width: 0 0 1px;
  border-radius: 0;
}

#major-drawer .career-scenario-subsection > summary {
  min-height: 26px;
  padding: 3px 6px;
  font-size: 10px;
  line-height: 1.25;
}

@media (max-width: 720px) {
  .probability-badge strong.probability-value {
    max-width: 50px;
    font-size: 21px;
  }

  #major-drawer .drawer-header {
    padding: 10px 12px 9px;
  }

  #major-drawer .drawer-header h2 {
    font-size: 17px;
  }

  #major-drawer #major-drawer-meta {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.3;
  }

  #major-drawer #major-drawer-code {
    margin-top: 0;
    font-size: 10px;
    line-height: 1.3;
  }

  .major-band-tabs {
    padding: 7px 12px;
  }

  .major-band-tab {
    min-height: 29px;
    padding: 0 8px;
    font-size: 11px;
  }

  #major-drawer .drawer-search {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #major-drawer .drawer-search input {
    min-height: 34px;
  }

  #major-drawer .major-list {
    padding: 8px 10px 18px;
  }

  #major-drawer .major-summary {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 7px;
    padding: 8px 9px 6px;
  }

  .major-probability {
    min-height: 52px;
    padding: 5px;
  }

  .major-probability > strong {
    font-size: 20px;
  }

  #major-drawer .major-detail {
    padding: 0 9px 7px;
  }
}

/* Compact school actions and contextual information dialogs. */
.school-card-details .school-detail-menu {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding-top: 5px;
}

.school-detail-item {
  display: flex;
  min-height: 30px;
  margin: 0;
  padding: 4px 7px;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid #d8e3ef;
  border-radius: 6px;
  background: rgba(247, 250, 254, 0.88);
  color: #45617d;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
  text-align: left;
}

.school-detail-item:hover:not(:disabled),
.school-detail-item:focus-visible {
  border-color: #9dbce0;
  background: #edf5fe;
  color: #174f87;
}

.school-detail-item svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.detail-modal-backdrop {
  z-index: 130;
  background: rgba(15, 31, 52, 0.46);
  backdrop-filter: blur(3px);
}

.detail-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 131;
  display: flex;
  width: min(880px, calc(100vw - 48px));
  max-width: 100%;
  height: min(82dvh, 820px);
  flex-direction: column;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transform-origin: center;
  border: 1px solid rgba(158, 184, 214, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(16, 42, 75, 0.28);
}

.detail-modal.hidden,
.detail-modal-backdrop.hidden {
  display: none;
}

.detail-modal-header {
  display: flex;
  min-height: 78px;
  padding: 16px 18px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dce7f2;
  background: linear-gradient(180deg, #f5faff 0%, #fff 100%);
}

.detail-modal-header > div {
  min-width: 0;
}

.detail-modal-eyebrow {
  margin: 0 0 4px;
  color: #447098;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.detail-modal-header h2 {
  margin: 0;
  color: #163a61;
  font-size: 19px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 28px;
  color: #334e68;
  scrollbar-color: #b9c9d9 transparent;
  scrollbar-width: thin;
}

.detail-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-modal-grid > .detail-grid-wide,
.detail-modal-grid > .official-school-claims,
.detail-modal-grid > .school-photo-detail,
.detail-modal-grid > .source-caveat,
.detail-modal-grid > .school-cost-summary {
  grid-column: 1 / -1;
}

.detail-content-block {
  display: grid;
  gap: 9px;
}

.detail-content-block h3,
.detail-modal-body h3 {
  margin: 12px 0 0;
  color: #173f68;
  font-size: 14px;
}

.detail-content-block p {
  margin: 0;
  line-height: 1.7;
}

.major-reference-count {
  color: #56718d;
  font-size: 12px;
}

.major-detail-menu {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.major-detail-menu::-webkit-scrollbar {
  display: none;
}

#major-drawer .major-detail-menu .major-detail-section {
  display: inline-flex;
  min-width: max-content;
  min-height: 24px;
  margin: 0;
  padding: 2px 4px;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 3px;
  border: 1px solid #d6e2ef;
  border-radius: 5px;
  background: #f3f7fb;
  color: #3d5873;
  font-size: 9.25px;
  font-weight: 730;
  line-height: 1.2;
  white-space: nowrap;
}

#major-drawer .major-detail-menu .major-detail-section:hover:not(:disabled),
#major-drawer .major-detail-menu .major-detail-section:focus-visible {
  border-color: #a8c5e4;
  background: #eaf3fd;
  color: #15568f;
}

#major-drawer .major-detail-menu .major-detail-section svg {
  display: none;
}

.major-other-explanation {
  padding: 10px 12px;
  border: 1px solid #d7e2ee;
  border-radius: 7px;
  background: #f7f9fc;
  color: #52657a;
  font-size: 11px;
  line-height: 1.55;
}

.major-other-explanation strong {
  color: #294d72;
}

.major-other-explanation p {
  margin: 3px 0 0;
}

.major-classification-reason {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 3px solid #9aa9b9;
  border-radius: 4px;
  background: #f3f5f8;
  color: #5c6877;
  font-size: 10px;
  line-height: 1.45;
}

.major-classification-reason strong {
  color: inherit;
}

.major-classification-reason--extreme-low,
.major-classification-reason--blocked {
  border-left-color: #d17878;
  background: #fff3f3;
  color: #963b3b;
}

.major-classification-reason--extreme-high {
  border-left-color: #65a886;
  background: #eff8f3;
  color: #2b7250;
}

.major-classification-reason--pending,
.major-classification-reason--qualification {
  border-left-color: #d1a74e;
  background: #fff8e9;
  color: #815a0e;
}

.major-classification-reason--expanded {
  border-left-color: #8ca8c8;
  background: #f2f7fc;
  color: #47647f;
}

.major-classification-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d6e0ea;
  border-radius: 7px;
  background: #f6f8fb;
}

.major-classification-notice p {
  margin: 4px 0 0;
  line-height: 1.6;
}

.major-probability.extreme-low,
.major-probability.blocked {
  border-color: #e2b8b8;
  background: #fff2f2;
  color: #9a3b3b;
}

.major-probability.extreme-high {
  border-color: #b6d9c4;
  background: #eef8f2;
  color: #247348;
}

.major-probability.pending,
.major-probability.qualification {
  border-color: #e1c580;
  background: #fff8e8;
  color: #80590e;
}

.major-probability.user-excluded {
  border-color: #d5dbe4;
  background: #f4f6f8;
  color: #64748b;
}

.pending-info-action--review {
  border-color: #d9ba73;
  background: #fff9ed;
  color: #77520d;
}

#major-drawer .drawer-search {
  display: grid;
  grid-template-columns: 18px minmax(180px, 1fr) minmax(132px, 170px) 36px;
}

.major-sort-control select {
  width: 100%;
  min-height: 36px;
}

.major-sort-direction {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
}

.volunteer-drawer {
  top: 50%;
  right: auto;
  left: 50%;
  width: min(1080px, calc(100vw - 48px));
  height: min(88dvh, 900px);
  transform: translate(-50%, -50%);
  transform-origin: center;
  overflow: hidden;
  border: 1px solid rgba(158, 184, 214, 0.88);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(16, 42, 75, 0.28);
}

@media (max-width: 1180px) {
  .school-card-details .school-detail-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .school-card-details .school-detail-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  .school-detail-item {
    min-height: 29px;
    padding: 4px 6px;
    font-size: 9px;
  }

  .detail-modal,
  .volunteer-drawer {
    width: calc(100vw - 16px);
    height: min(92dvh, 900px);
    border-radius: 12px;
  }

  .detail-modal-header {
    min-height: 66px;
    padding: 12px;
  }

  .detail-modal-header h2 {
    font-size: 16px;
  }

  .detail-modal-eyebrow {
    font-size: 9px;
  }

  .detail-modal-body {
    padding: 12px 12px 22px;
  }

  .detail-modal-grid {
    grid-template-columns: 1fr;
  }

  #major-drawer .drawer-search {
    grid-template-columns: 16px minmax(0, 1fr) 118px 32px;
    gap: 5px;
  }

  .major-sort-control select,
  .major-sort-direction {
    min-height: 32px;
    font-size: 10px;
  }

  .major-sort-direction {
    width: 32px;
    min-width: 32px;
  }
}

.pending-return-confirmation {
  display: grid;
  max-width: 620px;
  margin: 0 auto;
  gap: 12px;
  color: #38526d;
  line-height: 1.7;
}

.pending-return-confirmation p {
  margin: 0;
}

.pending-return-confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.pending-return-confirmation-actions button {
  min-height: 38px;
  padding: 0 14px;
}

.major-return-highlight {
  animation: major-return-highlight 720ms ease-in-out 2;
}

@keyframes major-return-highlight {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(35, 106, 177, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(35, 106, 177, 0.2), 0 10px 28px rgba(35, 106, 177, 0.12);
  }
}

@media (max-width: 720px) {
  .pending-return-confirmation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Admission batches are independent recommendation and volunteer channels. */
.result-tools > .school-search {
  grid-column: 1;
  grid-row: 1;
}

.result-tools > .band-filter {
  grid-column: 2;
  grid-row: 1;
}

.result-tools > .school-condition-switches--toolbar {
  grid-column: 3;
  grid-row: 1;
}

.result-tools > .sort-controls {
  grid-column: 4;
  grid-row: 1;
}

.admission-channel-filter {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px 12px;
  padding: 8px 10px;
  border: 1px solid rgba(154, 180, 211, 0.68);
  border-radius: 8px;
  background: rgba(242, 247, 253, 0.78);
}

.admission-channel-filter.hidden {
  display: none;
}

.admission-channel-heading {
  display: grid;
  min-width: 96px;
  gap: 2px;
  color: #234c76;
}

.admission-channel-heading strong {
  font-size: 12px;
}

.admission-channel-heading small {
  color: #697b90;
  font-size: 9px;
  line-height: 1.3;
}

.admission-channel-tabs {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admission-channel-tab {
  width: auto;
  max-width: none;
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid #cbd9e9;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
  color: #385a7b;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.admission-channel-tab strong {
  margin-left: 3px;
  color: inherit;
  font-variant-numeric: tabular-nums;
}

.admission-channel-tab:hover,
.admission-channel-tab:focus-visible {
  border-color: #84abd1;
  background: #edf5fd;
  color: #174f82;
}

.admission-channel-tab.active {
  border-color: #2868a6;
  background: #2868a6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(36, 92, 149, 0.18);
}

.admission-channel-notice {
  grid-column: 2;
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
  color: #5f7083;
  font-size: 10px;
  line-height: 1.45;
}

.admission-channel-notice strong {
  color: #2b5279;
}

@media (max-width: 1280px) and (min-width: 981px) {
  .result-tools > .school-search,
  .result-tools > .admission-channel-filter,
  .result-tools > .band-filter {
    grid-column: 1 / -1;
  }

  .result-tools > .school-search {
    grid-row: 1;
  }

  .result-tools > .admission-channel-filter {
    grid-row: 2;
  }

  .result-tools > .band-filter {
    grid-row: 3;
  }

  .result-tools > .school-condition-switches--toolbar {
    grid-column: 1;
    grid-row: 4;
  }

  .result-tools > .sort-controls {
    grid-column: 2;
    grid-row: 4;
  }
}

@media (max-width: 980px) {
  .result-tools > .school-search,
  .result-tools > .admission-channel-filter,
  .result-tools > .band-filter,
  .result-tools > .school-condition-switches--toolbar,
  .result-tools > .sort-controls {
    grid-column: 1;
    grid-row: auto;
  }

  .admission-channel-filter {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 7px 8px;
  }

  .admission-channel-heading {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .admission-channel-tabs {
    width: 100%;
    padding-bottom: 1px;
  }

  .admission-channel-notice {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .admission-channel-filter {
    padding: 6px 7px;
  }

  .admission-channel-heading small {
    display: none;
  }

  .admission-channel-tab {
    min-height: 30px;
    padding: 0 8px;
    font-size: 10px;
  }

  .admission-channel-notice {
    display: block;
    max-height: 29px;
    overflow: hidden;
    font-size: 9px;
  }

  .admission-channel-notice span {
    margin-left: 5px;
  }

  .recommendation-sticky-header.is-scroll-collapsed .admission-channel-heading,
  .recommendation-sticky-header.is-scroll-collapsed .admission-channel-notice {
    display: none;
  }

.recommendation-sticky-header.is-scroll-collapsed .admission-channel-filter {
    padding: 3px 4px;
    border-color: transparent;
    background: transparent;
  }
}

.volunteer-channel-warning {
  margin: 5px 0 9px;
  padding: 7px 9px;
  border-left: 3px solid #d4a34d;
  border-radius: 4px;
  background: #fff8e9;
  color: #795710;
  font-size: 11px;
  line-height: 1.5;
}

.volunteer-adjustment {
  min-width: 76px;
  min-height: 32px;
  font-size: 11px;
}

.probability-channel-scope {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #c8d9eb;
  border-radius: 7px;
  background: #f2f7fc;
  color: #47627e;
  font-size: 11px;
  line-height: 1.5;
}

.probability-channel-scope strong {
  color: #214f7d;
  font-size: 12px;
}

.probability-channel-scope p {
  margin: 0;
}

/* Compact admission-channel-first recommendation controls. */
.result-tools {
  grid-template-columns: minmax(150px, 190px) minmax(420px, 1fr) minmax(140px, 210px) max-content max-content;
  align-items: center;
}

.result-tools > .admission-channel-filter {
  grid-column: 1;
  grid-row: 1;
}

.result-tools > .band-filter {
  grid-column: 2;
  grid-row: 1;
}

.result-tools > .school-search {
  grid-column: 3;
  grid-row: 1;
}

.result-tools > .school-condition-switches--toolbar {
  grid-column: 4;
  grid-row: 1;
}

.result-tools > .sort-controls {
  grid-column: 5;
  grid-row: 1;
}

.admission-channel-filter {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.admission-channel-filter.hidden {
  display: none;
}

.admission-channel-select-shell {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 40px;
  grid-template-columns: 16px auto minmax(0, 1fr) 14px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(151, 177, 213, 0.78);
  border-radius: 8px;
  background: rgba(249, 252, 255, 0.92);
  color: #526b84;
  font-size: 10px;
  font-weight: 760;
}

.admission-channel-select-shell > [data-lucide-app],
.admission-channel-chevron {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  pointer-events: none;
}

.admission-channel-select-shell svg {
  width: 14px;
  height: 14px;
}

.admission-channel-select-shell select {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
  opacity: 0;
  cursor: pointer;
}

.admission-channel-select-shell > strong {
  min-width: 0;
  overflow: hidden;
  color: #214f7d;
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admission-channel-select-shell:focus-within {
  border-color: #4c83b8;
  box-shadow: 0 0 0 3px rgba(62, 120, 177, 0.12);
}

.school-search {
  min-width: 0;
}

.school-search input {
  min-height: 40px;
  padding-right: 26px;
  font-size: 12px;
}

@media (max-width: 1280px) and (min-width: 981px) {
  .result-tools {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(140px, 190px);
  }

  .result-tools > .admission-channel-filter {
    grid-column: 1;
    grid-row: 1;
  }

  .result-tools > .band-filter {
    grid-column: 2;
    grid-row: 1;
  }

  .result-tools > .school-search {
    grid-column: 3;
    grid-row: 1;
  }

  .result-tools > .school-condition-switches--toolbar {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-self: start;
  }

  .result-tools > .sort-controls {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 980px) {
  .result-tools {
    grid-template-columns: minmax(118px, 160px) minmax(118px, 1fr) 36px minmax(112px, 160px);
    gap: 6px;
  }

  .result-tools > .admission-channel-filter {
    grid-column: 1;
    grid-row: 1;
  }

  .result-tools > .sort-controls {
    grid-column: 2 / 4;
    grid-row: 1;
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .result-tools > .school-search {
    grid-column: 4;
    grid-row: 1;
  }

  .result-tools > .band-filter {
    grid-column: 1 / 4;
    grid-row: 2;
    min-width: 0;
  }

  .result-tools > .school-condition-switches--toolbar {
    grid-column: 4;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .result-tools > .band-filter .tabs {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .result-tools > .band-filter .tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 720px) {
  .result-tools {
    grid-template-columns: minmax(76px, 0.76fr) minmax(88px, 1fr) 34px minmax(96px, 0.94fr);
    gap: 5px;
  }

  .result-tools > .admission-channel-filter {
    grid-column: 1;
    grid-row: 1;
  }

  .result-tools > .sort-controls {
    grid-column: 2 / 4;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .result-tools > .school-search {
    grid-column: 4;
    grid-row: 1;
  }

  .result-tools > .band-filter {
    grid-column: 1 / 4;
    grid-row: 2;
  }

  .result-tools > .school-condition-switches--toolbar {
    grid-column: 4;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding: 2px;
  }

  .admission-channel-select-shell {
    min-height: 36px;
    grid-template-columns: 14px auto minmax(0, 1fr) 12px;
    padding: 0 6px;
  }

  .admission-channel-select-shell > strong {
    font-size: 10px;
  }

  .school-search input {
    min-height: 36px;
    padding-right: 20px;
    padding-left: 32px;
    font-size: 11px;
  }

  .school-search > [data-lucide-app] {
    left: 9px;
  }

  .recommendation-sticky-header.is-scroll-collapsed .admission-channel-filter {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .result-tools > .band-filter .tab {
    min-width: 43px;
    min-height: 32px;
    padding: 0 4px;
    font-size: 8.5px;
    white-space: nowrap;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-control {
    grid-template-columns: 14px minmax(0, 1fr);
    justify-content: stretch;
    min-width: 0;
    min-height: 28px;
    padding: 0 1px;
    gap: 1px;
    overflow: hidden;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-track {
    width: 14px;
    height: 14px;
    border-radius: 4px;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-track > span {
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    box-shadow: none;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-control > input:checked + .school-condition-track > span {
    transform: none;
  }

  .result-tools > .school-condition-switches--toolbar strong {
    overflow: hidden;
    font-size: 7.5px;
    line-height: 1;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
  }
}

.school-recommendation-risk {
  display: flex;
  max-width: min(900px, 100%);
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 3px solid #d58a35;
  border-radius: 6px;
  background: rgba(255, 247, 234, 0.9);
  color: #6d4a25;
  font-size: 10px;
  line-height: 1.45;
}

.school-recommendation-risk strong {
  flex: 0 0 auto;
  color: #8a561e;
}

@media (max-width: 720px) {
  .school-recommendation-risk {
    display: block;
    max-height: 46px;
    overflow: hidden;
    font-size: 9px;
  }

  .school-recommendation-risk strong {
    display: block;
  }
}

/* Responsive recommendation toolbar: stable tracks, independent counts, and modal-safe headers. */
.band-tab-label-compact,
.mobile-school-filter-toggle {
  display: none;
}

.result-tools > .band-filter .tab {
  box-sizing: border-box;
  gap: 4px;
}

.band-tab-count {
  flex: 0 0 auto;
  min-width: 1.7em;
  color: inherit;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

#major-drawer > .drawer-header,
#major-drawer > .major-band-tabs,
#major-drawer > .drawer-search {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

#major-drawer > .major-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

@media (max-width: 980px) {
  body[data-mobile-view="results"] .topbar,
  body[data-mobile-view="results"] .mobile-view-switch {
    position: static;
    top: auto;
  }

  body[data-mobile-view="results"] .recommendation-sticky-header {
    top: 0;
  }

  .recommendation-sticky-header {
    --recommendation-title-height: 104px;
    --recommendation-title-opacity: 1;
    --recommendation-title-shift: 0px;
    --recommendation-aux-height: 44px;
    --recommendation-aux-opacity: 1;
    --recommendation-aux-shift: 0px;
    --recommendation-tools-gap: 6px;
    --recommendation-tools-padding-y: 7px;
    overflow-anchor: none;
  }

  .recommendation-sticky-header > .panel-title {
    max-height: var(--recommendation-title-height) !important;
    overflow: hidden;
    opacity: var(--recommendation-title-opacity) !important;
    transform: translateY(var(--recommendation-title-shift)) !important;
    transition: none !important;
  }

  .recommendation-sticky-header .panel-subtitle {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .recommendation-sticky-header .result-tools {
    position: relative;
    grid-template-columns: minmax(112px, 150px) minmax(154px, 1fr) 36px minmax(104px, 154px) 36px;
    gap: var(--recommendation-tools-gap) !important;
    padding-top: var(--recommendation-tools-padding-y) !important;
    padding-bottom: var(--recommendation-tools-padding-y) !important;
    transition: none !important;
  }

  .recommendation-sticky-header .admission-channel-filter,
  .recommendation-sticky-header .school-search,
  .recommendation-sticky-header .sort-controls,
  .recommendation-sticky-header .mobile-school-filter-toggle {
    max-height: var(--recommendation-aux-height) !important;
    overflow: hidden;
    opacity: var(--recommendation-aux-opacity) !important;
    transform: translateY(var(--recommendation-aux-shift)) !important;
    transition: none !important;
  }

  .result-tools > .admission-channel-filter {
    grid-column: 1;
    grid-row: 1;
  }

  .result-tools > .sort-controls {
    grid-column: 2 / 4;
    grid-row: 1;
  }

  .recommendation-sticky-header .result-tools > .sort-controls {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: var(--recommendation-tools-gap);
  }

  .recommendation-sticky-header .sort-label {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .recommendation-sticky-header .sort-label > span {
    display: none;
  }

  .recommendation-sticky-header .sort-label select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  .result-tools > .school-search {
    grid-column: 4;
    grid-row: 1;
  }

  .result-tools > .mobile-school-filter-toggle {
    grid-column: 5;
    grid-row: 1;
  }

  .result-tools > .band-filter {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mobile-school-filter-toggle {
    position: relative;
    display: inline-grid;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(151, 177, 213, 0.86);
    border-radius: 7px;
    background: rgba(249, 252, 255, 0.94);
    color: #315a83;
  }

  .mobile-school-filter-toggle svg {
    width: 16px;
    height: 16px;
  }

  .mobile-school-filter-toggle > strong {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    min-width: 16px;
    height: 16px;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #2368aa;
    color: #fff;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  .mobile-school-filter-toggle > strong[hidden] {
    display: none;
  }

  .mobile-school-filter-toggle.has-active-filters {
    border-color: #4f88be;
    background: #eaf3fc;
    color: #16598f;
  }

  .result-tools > .school-condition-switches--toolbar {
    position: absolute;
    z-index: 8;
    top: 43px;
    right: 0;
    display: grid;
    width: min(230px, calc(100% - 8px));
    min-width: 0;
    max-height: 0 !important;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 0;
    overflow: hidden;
    border-color: transparent;
    background: rgba(249, 252, 255, 0.98);
    box-shadow: 0 12px 30px rgba(26, 64, 104, 0.18);
    visibility: hidden;
    opacity: 0 !important;
    pointer-events: none;
    transform: translateY(-6px) !important;
    transition: max-height 180ms ease, padding 180ms ease, border-color 180ms ease, opacity 150ms ease, transform 180ms ease, visibility 0s linear 180ms !important;
  }

  .result-tools.is-school-filter-open > .school-condition-switches--toolbar {
    max-height: 76px !important;
    padding: 6px;
    overflow: visible;
    border-color: rgba(151, 177, 213, 0.82);
    visibility: visible;
    opacity: 1 !important;
    pointer-events: auto;
    transform: translateY(0) !important;
    transition-delay: 0s !important;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-control {
    grid-template-columns: 27px minmax(0, 1fr);
    min-height: 34px;
    justify-content: start;
    padding: 3px 6px;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-track {
    width: 26px;
    height: 16px;
    border-radius: 8px;
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-track > span {
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    box-shadow: 0 1px 3px rgba(28, 49, 76, 0.2);
  }

  .result-tools > .school-condition-switches--toolbar .school-condition-control > input:checked + .school-condition-track > span {
    transform: translateX(10px);
  }

  .result-tools > .school-condition-switches--toolbar strong {
    overflow: visible;
    font-size: 11px;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
  }

  .recommendation-sticky-header.is-scroll-collapsed .admission-channel-filter,
  .recommendation-sticky-header.is-scroll-collapsed .school-search,
  .recommendation-sticky-header.is-scroll-collapsed .sort-controls,
  .recommendation-sticky-header.is-scroll-collapsed .mobile-school-filter-toggle,
  .recommendation-sticky-header.is-scroll-collapsed > .panel-title {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    pointer-events: none;
  }

  .result-tools > .band-filter .tabs {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
  }

  .result-tools > .band-filter .tab {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
  }
}

@media (max-width: 720px) {
  .recommendation-sticky-header .result-tools {
    grid-template-columns: minmax(72px, 0.72fr) minmax(80px, 1fr) 32px minmax(38px, 0.62fr) 32px;
    gap: var(--recommendation-tools-gap) !important;
    padding-right: 7px;
    padding-left: 7px;
  }

  .mobile-school-filter-toggle {
    width: 32px;
    min-width: 32px;
    min-height: 36px;
  }

  .admission-channel-select-shell {
    min-height: 36px;
    grid-template-columns: 14px minmax(0, 1fr) 11px;
    gap: 4px;
    padding: 0 5px;
  }

  .admission-channel-select-shell > span:nth-of-type(2) {
    display: none;
  }

  .admission-channel-select-shell > strong {
    font-size: 9.5px;
  }

  .result-tools > .school-search {
    overflow: hidden;
    border-radius: 7px;
  }

  .school-search input {
    min-height: 36px;
    padding-right: 4px;
    padding-left: 28px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .school-search > [data-lucide-app] {
    left: 8px;
  }

  .result-tools > .band-filter .tabs {
    gap: 4px;
  }

  .result-tools > .band-filter .tab {
    display: grid;
    min-height: 39px;
    grid-template-rows: 14px 11px;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 3px 2px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1;
    white-space: normal;
  }

  .result-tools > .band-filter .tab.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 6px rgba(29, 79, 163, 0.14);
  }

  .band-tab-label {
    display: none;
  }

  .band-tab-label-compact {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 780;
    line-height: 14px;
    text-overflow: clip;
    white-space: nowrap;
  }

  .band-tab-count {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 11px;
    text-overflow: clip;
    white-space: nowrap;
  }

  .band-tab-count[hidden] {
    visibility: hidden;
  }

  .recommendation-sticky-header.is-scroll-collapsed .result-tools > .band-filter .tab {
    min-height: 38px;
  }
}

/* Shared horizontal-tab motion: the indicator and content use one timing curve. */
.combined-option-tabs,
.combined-option-subtabs,
.career-scenario-tabs,
#band-filter-menu,
#major-band-tabs {
  position: relative;
  isolation: isolate;
}

#band-filter-menu {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.combined-option-tab,
.combined-option-subtab,
.career-scenario-tab,
#band-filter-menu > .tab,
#major-band-tabs > .major-band-tab {
  position: relative;
  z-index: 1;
}

.sliding-tab-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  display: block;
  border: 1px solid #a9c2dc;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(31, 80, 127, 0.1);
  pointer-events: none;
  will-change: width, height, transform;
  transition:
    width 280ms cubic-bezier(0.22, 0.61, 0.36, 1),
    height 280ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sliding-tab-indicator.no-transition {
  transition: none !important;
}

.combined-option-tab.active,
.combined-option-subtab.active,
.career-scenario-tab.active,
#major-band-tabs > .major-band-tab.active {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

#band-filter-menu > .sliding-tab-indicator {
  border-color: #2b69aa;
  background: #2b69aa;
  box-shadow: 0 3px 10px rgba(32, 94, 155, 0.18);
}

#band-filter-menu > .tab.active {
  border-color: transparent !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
}

#major-band-tabs > .sliding-tab-indicator {
  border-color: #90b6dd;
  background: #e8f2fd;
}

.combined-option-panels,
.combined-option-subpanels,
.career-scenario-tab-panels {
  position: relative;
  display: grid;
  min-width: 0;
}

.combined-option-panels > [role="tabpanel"],
.combined-option-subpanels > [role="tabpanel"],
.career-scenario-tab-panels > [role="tabpanel"] {
  min-width: 0;
  grid-area: 1 / 1;
}

.combined-option-panels.is-tab-panel-transitioning,
.combined-option-subpanels.is-tab-panel-transitioning,
.career-scenario-tab-panels.is-tab-panel-transitioning {
  min-height: var(--tab-panel-transition-height);
  overflow: hidden;
}

.is-tab-panel-entering,
.is-tab-panel-leaving {
  will-change: transform, opacity;
}

.horizontal-surface-transition-host {
  position: relative;
  overflow-x: clip;
}

.horizontal-surface-ghost {
  position: absolute !important;
  z-index: 3;
  margin: 0 !important;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Intake hierarchy: keep the required path vertical and visually consistent. */
.essential-fields > label,
.essential-fields > .subject-picker-field,
.essential-fields .conditional-fields > label,
.combined-option-grid > label {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 6px;
}

.essential-fields input:not([type="checkbox"]):not([type="radio"]),
.essential-fields select,
.combined-option-grid input:not([type="checkbox"]):not([type="radio"]),
.combined-option-grid select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

#score-field input {
  min-height: 54px;
  border-color: #789fc8;
  background: #f8fbff;
  color: #164f86;
  font-size: 21px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

#rank-field input {
  color: #315f8d;
  font-variant-numeric: tabular-nums;
}

.essential-fields > .conditional-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 720px) {
  #advisor-form input:not([type="checkbox"]):not([type="radio"]),
  #advisor-form select,
  #advisor-form textarea,
  #major-search,
  #major-sort {
    font-size: 16px !important;
  }

  #advisor-form input:not([type="checkbox"]):not([type="radio"]),
  #advisor-form select {
    min-height: 44px;
  }

  #score-field input {
    min-height: 56px;
    font-size: 22px !important;
  }

  .sliding-tab-indicator {
    border-radius: 6px;
  }
}

@media (max-width: 360px) {
  .recommendation-sticky-header .result-tools {
    grid-template-columns: 70px minmax(76px, 1fr) 30px minmax(34px, 0.48fr) 30px;
    gap: 4px !important;
  }

  .mobile-school-filter-toggle {
    width: 30px;
    min-width: 30px;
  }

  .school-search input {
    padding-right: 2px;
    padding-left: 25px;
    font-size: 9px;
  }

  .school-search > [data-lucide-app] {
    left: 7px;
  }

  .result-tools > .band-filter .tabs {
    gap: 3px;
  }
}

/* Mobile scheme C: one compact surface with collision-proof control tracks. */
@media (max-width: 720px) {
  .recommendation-sticky-header .result-tools {
    grid-template-columns: minmax(60px, 75px) 96px 32px minmax(34px, 1fr) 32px;
    gap: 4px !important;
    margin: 0 7px 7px;
    padding: 5px !important;
    border: 1px solid #d9e4f0;
    border-radius: 8px;
    background: #f3f7fb;
  }

  .recommendation-sticky-header .result-tools > .sort-controls {
    display: grid;
    min-width: 0;
    grid-template-columns: 96px 32px;
    gap: 4px;
  }

  .recommendation-sticky-header .sort-label,
  .recommendation-sticky-header .sort-label select {
    width: 96px;
    min-width: 0 !important;
    max-width: 96px;
  }

  .recommendation-sticky-header .sort-label {
    position: relative;
    overflow: hidden;
  }

  .recommendation-sticky-header .sort-label::after {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #315a83;
    border-bottom: 1.5px solid #315a83;
    content: "";
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
  }

  .recommendation-sticky-header .sort-label select {
    box-sizing: border-box;
    padding-right: 22px;
    padding-left: 9px;
    overflow: hidden;
    appearance: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-appearance: none;
  }

  .recommendation-sticky-header .sort-controls .icon-button,
  .recommendation-sticky-header .mobile-school-filter-toggle {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 36px;
    min-height: 36px;
    padding: 0;
  }

  .recommendation-sticky-header .admission-channel-select-shell,
  .recommendation-sticky-header .sort-label,
  .recommendation-sticky-header .sort-controls .icon-button,
  .recommendation-sticky-header .school-search input,
  .recommendation-sticky-header .mobile-school-filter-toggle {
    border-color: transparent !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
  }

  .recommendation-sticky-header .admission-channel-select-shell,
  .recommendation-sticky-header .admission-channel-select-shell > strong,
  .recommendation-sticky-header .school-search,
  .recommendation-sticky-header .school-search input,
  .recommendation-sticky-header .result-tools > .band-filter .tab,
  .recommendation-sticky-header .band-tab-label-compact,
  .recommendation-sticky-header .band-tab-count {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }

  .recommendation-sticky-header .admission-channel-select-shell > strong,
  .recommendation-sticky-header .school-search input,
  .recommendation-sticky-header .band-tab-label-compact,
  .recommendation-sticky-header .band-tab-count {
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .recommendation-sticky-header .result-tools > .band-filter .tabs {
    gap: 2px !important;
    padding: 3px;
    border: 1px solid #d8e3ef;
    border-radius: 7px;
    background: #eaf1f8;
  }

  .recommendation-sticky-header .result-tools > .band-filter .tab {
    min-height: 36px;
    border: 0 !important;
    border-radius: 5px;
    background: transparent;
    color: #526b84;
    box-shadow: none;
  }

  .recommendation-sticky-header .result-tools > .band-filter .tab.active {
    background: #fff;
    color: #155993;
    box-shadow: 0 2px 7px rgba(41, 85, 124, 0.12);
  }

  .recommendation-sticky-header.is-scroll-collapsed .result-tools {
    margin-bottom: 0;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    border-right-width: 0;
    border-left-width: 0;
    border-radius: 0;
  }
}

/* Responsive school card A: a compact top-right probability KPI without a full-height side rail. */
@media (max-width: 980px) {
  .result-card {
    grid-template-columns: minmax(0, 1fr) 68px !important;
    gap: 8px 10px !important;
    padding: 10px !important;
  }

  .result-card::before {
    display: none !important;
  }

  .school-card-visual {
    right: 0 !important;
  }

  .school-card-copy {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0;
  }

  .result-card .result-heading {
    display: grid !important;
    gap: 5px !important;
  }

  .result-card .tags {
    justify-content: flex-start !important;
  }

  .result-card .probability-badge {
    box-sizing: border-box;
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
    justify-self: end !important;
    width: 66px !important;
    height: 64px !important;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .result-card .probability-badge.reach {
    border-color: #e8c98d !important;
    background: rgba(255, 247, 228, 0.94) !important;
    color: #895a15 !important;
  }

  .result-card .probability-badge.stable {
    border-color: #a9c8eb !important;
    background: rgba(235, 244, 255, 0.95) !important;
    color: #1d5792 !important;
  }

  .result-card .probability-badge.safe {
    border-color: #abd7bd !important;
    background: rgba(235, 248, 240, 0.95) !important;
    color: #267149 !important;
  }

  .result-card .probability-badge.unknown,
  .result-card .probability-badge.insufficient {
    border-color: #cad4df !important;
    background: rgba(244, 247, 250, 0.96) !important;
    color: #586a7c !important;
  }

  .result-card .probability-badge strong.probability-value {
    max-width: 100% !important;
    font-size: 23px !important;
  }

  .result-card .probability-band-label {
    max-width: 100%;
    overflow: hidden;
    font-size: 9px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-card .probability-layer {
    min-height: 15px !important;
    max-width: calc(100% - 4px);
    padding: 1px 3px !important;
    overflow: hidden;
    font-size: 8px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-card .pending-info-action--compact {
    max-width: calc(100% - 4px);
    min-height: 17px;
    padding: 1px 3px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-card .card-actions {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .result-card .card-actions button {
    min-height: 36px !important;
  }

  .result-card .school-card-details {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
  }
}

/* Final cascade guards for the rigid mobile header and narrow wage table. */
@media (min-width: 721px) {
  body[data-app-stage="intake"] .essential-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  body[data-app-stage="intake"] .layout {
    position: relative;
    left: calc((100vw - 100%) / 2);
  }
}

@media (max-width: 980px) {
  .recommendation-sticky-header {
    overflow: visible !important;
    transform: translate3d(0, var(--recommendation-header-shift, 0px), 0) !important;
    transition: none !important;
    will-change: transform;
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .recommendation-sticky-header > .panel-title,
  .recommendation-sticky-header .panel-subtitle,
  .recommendation-sticky-header .result-tools,
  .recommendation-sticky-header .admission-channel-filter,
  .recommendation-sticky-header .school-search,
  .recommendation-sticky-header .sort-controls,
  .recommendation-sticky-header .mobile-school-filter-toggle {
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    pointer-events: auto !important;
  }

  .recommendation-sticky-header .result-tools {
    gap: 6px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .recommendation-sticky-header .panel-subtitle,
  .recommendation-sticky-header .admission-channel-filter,
  .recommendation-sticky-header .school-search {
    overflow: hidden !important;
  }

  .recommendation-sticky-header .panel-subtitle {
    overflow-wrap: anywhere;
  }

  .result-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 250px;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 720px) {
  .recommendation-sticky-header .result-tools {
    gap: 4px !important;
    padding: 5px !important;
  }

  .occupation-wage-table-wrap {
    overflow-x: visible !important;
  }

  .occupation-wage-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .occupation-wage-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .occupation-wage-table tbody {
    display: grid;
    gap: 8px;
  }

  .occupation-wage-table tr {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #fff;
  }

  .occupation-wage-table th,
  .occupation-wage-table td {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 2px;
    padding: 6px 2px;
    border: 0;
    border-right: 1px solid #e4ebf2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .occupation-wage-table th:first-child {
    width: auto;
    grid-column: 1 / -1;
    justify-items: start;
    padding: 7px 8px;
    border-right: 0;
    border-bottom: 1px solid #dbe5ef;
    background: #f5f8fb;
    text-align: left;
  }

  .occupation-wage-table td:last-child {
    border-right: 0;
  }

  .occupation-wage-table td::before {
    color: #728398;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 700;
  }
}

/* Final interaction guards: stable modal tabs, vertical intake and low-cost rendering. */
.school-detail-tab.active,
.school-detail-tab.active:hover,
.school-detail-tab.active:focus-visible,
.school-detail-tab:active {
  border-color: transparent !important;
  background: transparent !important;
  color: #185b96 !important;
  opacity: 1 !important;
}

.mobile-school-details-toggle > span:first-child {
  display: inline-grid;
  min-width: 0;
  grid-template-columns: 16px minmax(0, auto);
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.mobile-school-details-toggle > span:first-child > svg {
  display: block;
  width: 16px;
  height: 16px;
  align-self: center;
}

.volunteer-mobile-list {
  display: none;
}

@media (min-width: 721px) {
  body[data-app-stage="intake"] .essential-fields {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-app-stage="intake"] .form-panel {
    max-width: 720px;
  }
}

body[data-app-stage="intake"] .topbar,
body[data-app-stage="intake"] .mobile-view-switch,
body[data-app-stage="intake"] .form-panel,
.profile-hub-backdrop,
.subject-picker-backdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

@media (max-width: 980px) {
  .volunteer-table-scroll {
    display: none;
  }

  .volunteer-mobile-list {
    display: grid;
    gap: 6px;
  }

  .volunteer-mobile-card {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 7px 8px;
    border: 1px solid #d7e2ed;
    border-radius: 8px;
    background: #fff;
  }

  .volunteer-mobile-card.is-invalid {
    border-color: #dc9a9a;
    background: #fff7f7;
  }

  .volunteer-mobile-card > header,
  .volunteer-mobile-adjustment {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
  }

  .volunteer-mobile-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .volunteer-mobile-title {
    display: grid;
    min-width: 0;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
  }

  .volunteer-mobile-title > strong {
    min-width: 0;
    overflow: hidden;
    color: #173f69;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .volunteer-mobile-school-code {
    color: #63788d;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .volunteer-mobile-index {
    display: inline-grid;
    width: 25px;
    height: 23px;
    place-items: center;
    border-radius: 6px;
    background: #eaf3fc;
    color: #28669f;
    font-size: 10px;
    font-weight: 850;
  }

  .volunteer-mobile-card .volunteer-actions {
    width: auto;
    flex: 0 0 auto;
    gap: 2px;
  }

  .volunteer-mobile-card .volunteer-actions button {
    width: 27px;
    min-width: 27px;
    min-height: 27px;
  }

  .volunteer-mobile-card .volunteer-actions svg {
    width: 14px;
    height: 14px;
  }

  .volunteer-mobile-majors {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 2px;
    list-style: none;
  }

  .volunteer-mobile-majors li {
    display: grid;
    min-width: 0;
    grid-template-columns: 22px 34px minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    min-height: 24px;
    padding: 3px 5px;
    border-left: 2px solid #9abbdc;
    background: #f6f9fd;
  }

  .volunteer-mobile-major-index {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 5px;
    background: #e5eef8;
    color: #526f8d;
    font-size: 9px;
    font-weight: 800;
  }

  .volunteer-mobile-majors li strong {
    color: #245e95;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
  }

  .volunteer-mobile-majors li p {
    min-width: 0;
    margin: 0;
    color: #2f4053;
    font-size: 10.5px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .volunteer-mobile-adjustment {
    justify-content: flex-start;
    color: #52687d;
    font-size: 10px;
    font-weight: 750;
  }

  .volunteer-mobile-adjustment select {
    width: min(126px, 48%);
    min-height: 29px;
    padding-block: 3px;
    font-size: 10px;
  }

  .volunteer-mobile-capacity {
    margin: 1px 2px 0;
    padding: 6px 8px;
    border: 1px dashed #c4d3e2;
    border-radius: 7px;
    background: #f8fafc;
    color: #64778b;
    font-size: 10px;
    line-height: 1.35;
  }
}

@media (max-width: 430px) {
  .volunteer-mobile-card {
    padding: 6px;
  }

  .volunteer-mobile-title {
    grid-template-columns: 23px minmax(0, 1fr) 30px;
    gap: 4px;
  }

  .volunteer-mobile-index {
    width: 23px;
    height: 22px;
  }

  .volunteer-mobile-school-code {
    max-width: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
