:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #e8f0ff;
  --line: #c7d7ee;
  --text: #020617;
  --muted: #263548;
  --accent: #1d4ed8;
  --accent-soft: #eef4ff;
  --accent-dark: #1e3a8a;
  --cool: #eef5ff;
  --topbar-bg: rgba(255, 255, 255, 0.98);
  --page-top: #ffffff;
  --page-bottom: #ffffff;
  --shadow: rgba(29, 78, 216, 0.08);
  --focus-ring: rgba(29, 78, 216, 0.3);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 42px rgba(29, 78, 216, 0.1);
  --shadow-lift: 0 22px 54px rgba(29, 78, 216, 0.15);
  --motion-fast: 150ms;
  --motion-medium: 240ms;
  --motion-slow: 420ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* v25 admission transparency and situation-matched pathway providers */
.course-admission {
  gap: 12px;
}

.admission-number {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--product-line);
}

.admission-number span {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.admission-number strong {
  color: var(--product-ink);
  font-size: 25px;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.course-admission .admission-definition {
  padding: 8px 0;
  border-top: 1px solid var(--product-line);
}

.pathway-provider-panel {
  overflow: hidden;
}

.pathway-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pathway-provider-card {
  display: grid;
  align-content: start;
  gap: 15px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--product-line);
  border-radius: 9px;
  background: var(--surface);
  animation: resultEnter 260ms var(--ease-out) both;
  animation-delay: min(var(--item-delay, 0ms), 140ms);
}

.pathway-provider-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pathway-provider-heading h3,
.pathway-provider-card p,
.pathway-provider-card dl,
.pathway-provider-card dd {
  margin: 0;
}

.pathway-provider-heading h3 {
  margin-top: 3px;
  color: var(--product-ink);
  font-size: 20px;
  line-height: 1.25;
}

.pathway-provider-number {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--product-blue);
  border-radius: 7px;
  color: var(--product-blue);
  font-weight: 850;
}

.pathway-provider-card > p,
.pathway-provider-card dd,
.pathway-provider-disclaimer {
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.55;
}

.pathway-program {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-left: 3px solid var(--product-blue);
  background: var(--soft-blue);
}

.pathway-program span,
.pathway-provider-card dt {
  color: var(--product-muted);
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.pathway-program strong {
  color: var(--product-ink);
  line-height: 1.35;
}

.pathway-provider-journey {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pathway-provider-step;
}

.pathway-provider-journey li {
  position: relative;
  min-width: 0;
  padding: 27px 14px 10px;
  border-top: 2px solid var(--product-line);
  color: var(--product-ink);
  font-size: 12px;
  line-height: 1.45;
  counter-increment: pathway-provider-step;
}

.pathway-provider-journey li::before {
  content: counter(pathway-provider-step);
  position: absolute;
  top: -12px;
  left: 0;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 5px;
  background: var(--product-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
}

.pathway-provider-card dl {
  display: grid;
  gap: 10px;
}

.pathway-provider-card dl div {
  display: grid;
  gap: 4px;
}

.pathway-provider-link {
  justify-self: start;
}

.pathway-provider-disclaimer {
  margin: 14px 0 0;
}

:root[data-theme="dark"] .pathway-provider-journey li::before {
  border-color: #000;
  background: #fff;
  color: #000;
}

@media (max-width: 780px) {
  .pathway-provider-grid {
    grid-template-columns: 1fr;
  }

  .pathway-provider-card {
    padding: 17px;
  }

  .pathway-provider-journey {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pathway-provider-journey li {
    padding: 9px 10px 9px 35px;
    border-top: 0;
    border-left: 2px solid var(--product-line);
  }

  .pathway-provider-journey li::before {
    top: 8px;
    left: -12px;
  }

  .course-admission {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admission-number {
    min-width: 0;
  }

  .admission-number strong {
    overflow-wrap: anywhere;
    font-size: 22px;
  }

  .course-admission > small,
  .course-admission > a {
    grid-column: 1 / -1;
  }
}

/* v26 transparent university scoring and local dark-mode experiment */
.provider-score-explainer {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.8fr);
  gap: 22px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--product-line);
  border-radius: 9px;
  background: var(--product-soft);
}

.provider-score-explainer h3,
.provider-score-explainer p,
.provider-score-explainer dl,
.provider-score-explainer dd {
  margin: 0;
}

.provider-score-explainer h3 {
  margin-top: 5px;
  color: var(--product-ink);
  font-size: 19px;
}

.provider-score-explainer p {
  margin-top: 8px;
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.55;
}

.provider-score-explainer dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.provider-score-explainer dl div {
  min-width: 0;
  padding-left: 14px;
  border-left: 2px solid var(--product-blue);
}

.provider-score-explainer dt {
  margin-bottom: 5px;
  color: var(--product-ink);
  font-size: 12px;
  font-weight: 850;
}

.provider-score-explainer dd {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

.provider-card {
  align-content: start;
  gap: 14px;
  min-height: 290px;
  padding: 18px;
}

.provider-card-heading {
  display: grid;
  min-width: 0;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.provider-card-heading img {
  width: 88px;
  height: 48px;
}

.provider-card-heading > div {
  display: grid;
  gap: 3px;
}

.provider-card-heading strong {
  line-height: 1.3;
}

.provider-card-heading span {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 700;
}

.provider-overall-score {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
}

.provider-overall-score > span,
.provider-specialty-score > span {
  color: var(--product-muted);
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.provider-overall-score b {
  color: var(--product-ink);
  font-size: 27px;
  letter-spacing: -0.035em;
  line-height: 1;
}

.provider-overall-score b small {
  color: var(--product-muted);
  font-size: 12px;
  letter-spacing: 0;
}

.provider-overall-why {
  margin: 0;
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

.provider-overall-why b,
.provider-specialty-score small b {
  color: var(--product-ink);
}

.provider-specialty-score {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 12px;
  border-left: 3px solid var(--product-blue);
  background: var(--product-soft);
}

.provider-specialty-score strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--product-ink);
  font-size: 13px;
}

.provider-specialty-score strong > b {
  flex: 0 0 auto;
  color: var(--product-blue);
}

.provider-specialty-score small {
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.45;
}

:root[data-theme="dark"] {
  --bg: #000;
  --surface: #000;
  --surface-strong: #000;
  --surface-soft: #000;
  --surface-tint: #000;
  --cool: #000;
  --accent: #2563eb;
  --accent-soft: #071733;
  --accent-dark: #1d4ed8;
  --product-soft: #000;
  --page-top: #000;
  --page-bottom: #000;
  --topbar-bg: #000;
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-lift: 0 24px 58px rgba(0, 0, 0, 0.62);
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .topnav,
:root[data-theme="dark"] .mobile-primary-nav,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stats,
:root[data-theme="dark"] .course-search-panel,
:root[data-theme="dark"] .course-result-card,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .provider-score-explainer,
:root[data-theme="dark"] .provider-specialty-score,
:root[data-theme="dark"] .simple-route-card,
:root[data-theme="dark"] .pathway-provider-card,
:root[data-theme="dark"] .guide-section-card,
:root[data-theme="dark"] .subject-card,
:root[data-theme="dark"] .calculator-result {
  background: #000 !important;
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stats,
:root[data-theme="dark"] .course-result-card,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .provider-score-explainer,
:root[data-theme="dark"] .simple-route-card,
:root[data-theme="dark"] .pathway-provider-card,
:root[data-theme="dark"] .guide-section-card,
:root[data-theme="dark"] .subject-card,
:root[data-theme="dark"] .calculator-result {
  border-color: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .topnav a[aria-current="page"],
:root[data-theme="dark"] .topnav button[aria-current="page"],
:root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
:root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
:root[data-theme="dark"] .mobile-page-menu a[aria-current="page"],
:root[data-theme="dark"] .mobile-page-menu button[aria-current="page"] {
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .topnav a[aria-current="page"]::after,
:root[data-theme="dark"] .topnav button[aria-current="page"]::after {
  background: #fff !important;
}

:root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"]::before,
:root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"]::before {
  background: #fff !important;
}

@media (max-width: 900px) {
  .provider-score-explainer,
  .provider-score-explainer dl {
    grid-template-columns: 1fr;
  }

  .provider-score-explainer dl div {
    padding: 0 0 0 12px;
  }
}

@media (max-width: 640px) {
  .provider-score-explainer {
    padding: 16px;
  }

  .provider-card {
    min-height: 0;
    padding: 16px;
  }

  .provider-card-heading {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .provider-card-heading img {
    width: 64px;
  }
}

/* v22 mobile refinement: open surfaces, reliable navigation and compositor-safe motion. */
@media (max-width: 760px) {
  html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    overflow-x: clip;
    overscroll-behavior-x: none;
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    width: min(100% - 26px, 1120px);
    animation: mobilePageEnter 180ms var(--ease-out) both;
    transition: opacity 110ms ease, transform 150ms var(--ease-out);
  }

  html.is-route-pending main,
  html.is-route-pending .guide-main,
  html.is-route-pending .calculator-main,
  html.is-route-pending .subject-main,
  html.is-route-pending .advisor-main,
  html.is-route-pending .my-plan-page,
  html.is-route-pending .pathways-page,
  html.is-route-pending .simple-pathways-page {
    opacity: 0.94;
    transform: translate3d(0, 2px, 0);
  }

  .topbar {
    border: 0;
    background: #ffffff;
    box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 66%, transparent);
  }

  .hero,
  .panel,
  .atar-main-card,
  .guide-direction-deck,
  .guide-plan-section,
  .guide-section-card,
  .simple-pathway-finder,
  .pathway-panel,
  .subject-how-panel,
  .advisor-summary,
  .calculator-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .hero {
    padding: 22px 0 18px;
  }

  .panel,
  .atar-main-card,
  .guide-direction-deck,
  .guide-plan-section,
  .simple-pathway-finder,
  .pathway-panel,
  .subject-how-panel,
  .advisor-summary,
  .calculator-card {
    padding: 22px 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent) !important;
  }

  main > :last-child,
  .guide-main > :last-child,
  .calculator-main > :last-child,
  .subject-main > :last-child,
  .advisor-main > :last-child,
  .my-plan-page > :last-child,
  .pathways-page > :last-child,
  .simple-pathways-page > :last-child {
    border-bottom: 0 !important;
  }

  .stats {
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 8px;
  }

  .stats > div,
  .stats .data-note {
    margin: 0;
    padding: 12px 14px;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--surface) !important;
    box-shadow: none !important;
  }

  :where(
    .course-item,
    .subject-course-card,
    .subject-course-row,
    .simple-route-card,
    .pathway-course-card,
    .guide-plan-card,
    .guide-section-card,
    .guide-subject-target,
    .guide-course-option,
    .provider-card,
    .top-provider-card,
    .pathway-card,
    .linear-stage-item,
    .my-plan-timeline li
  ) {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  :where(
    .course-item,
    .subject-course-card,
    .subject-course-row,
    .simple-route-card,
    .pathway-course-card,
    .guide-plan-card,
    .guide-section-card,
    .guide-subject-target,
    .guide-course-option,
    .provider-card,
    .top-provider-card,
    .pathway-card,
    .linear-stage-item,
    .my-plan-timeline li
  ):not(:last-child) {
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent) !important;
  }

  :where(.provider-card, .top-provider-card, .pathway-card) {
    padding: 14px 2px !important;
  }

  .course-item > summary,
  .subject-course-row > summary,
  .subject-course-card > summary {
    border-radius: 0 !important;
  }

  .course-list > .course-item:nth-child(n + 7),
  .provider-grid > :nth-child(n + 7),
  .top-provider-grid > :nth-child(n + 7) {
    animation: none !important;
  }

  .mobile-nav-scrim {
    position: fixed;
    inset: 0 0 calc(64px + env(safe-area-inset-bottom));
    z-index: 81;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(2, 6, 23, 0.42);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 150ms ease, visibility 0s linear 190ms;
  }

  html.mobile-nav-expanded .mobile-nav-scrim {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 150ms ease, visibility 0s;
  }

  .topnav {
    left: 0 !important;
    right: 0 !important;
    bottom: calc(63px + env(safe-area-inset-bottom)) !important;
    z-index: 83;
    max-height: min(58svh, 430px);
    padding: 15px 12px 18px !important;
    gap: 4px 8px !important;
    border: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    background: #ffffff !important;
    box-shadow: 0 -18px 48px rgba(2, 6, 23, 0.18) !important;
    transform: translate3d(0, 24px, 0) !important;
    transition: opacity 140ms ease, transform 190ms var(--ease-out), visibility 0s linear 190ms !important;
    will-change: auto;
  }

  html.mobile-nav-expanded .topnav {
    transform: translate3d(0, 0, 0) !important;
    transition: opacity 140ms ease, transform 190ms var(--ease-out), visibility 0s !important;
  }

  .topnav a,
  .topnav button {
    min-height: 50px;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    touch-action: manipulation;
  }

  .topnav a[aria-current="page"],
  .topnav button[aria-current="page"] {
    background: var(--accent-soft) !important;
    color: var(--accent-dark) !important;
  }

  .mobile-primary-nav {
    z-index: 90;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 -10px 30px rgba(2, 6, 23, 0.09) !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout paint style;
    will-change: auto;
  }

  .mobile-primary-nav a,
  .mobile-primary-nav button {
    min-height: 54px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    transition: color 140ms ease, transform 120ms var(--ease-out) !important;
  }

  .mobile-primary-nav a::before,
  .mobile-primary-nav button::before {
    transition: transform 150ms var(--ease-out);
  }

  .mobile-primary-nav a[aria-current="page"],
  .mobile-primary-nav button[aria-current="page"],
  html.mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: transparent !important;
    color: var(--accent) !important;
    box-shadow: inset 0 2px 0 var(--accent) !important;
  }

  .mobile-primary-nav a[aria-current="page"]::before,
  .mobile-primary-nav button[aria-current="page"]::before,
  html.mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"]::before {
    transform: translate3d(0, -2px, 0) scale(1.06);
  }

  .mobile-primary-nav a:active,
  .mobile-primary-nav button:active {
    transform: scale(0.93) !important;
  }

  .app-select-backdrop {
    backdrop-filter: none !important;
  }

  .app-select-sheet {
    border: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -18px 52px rgba(2, 6, 23, 0.22) !important;
  }

  .app-select-options button {
    border: 0 !important;
    border-radius: 9px !important;
  }

  :root[data-theme="dark"] .topbar,
  :root[data-theme="dark"] .topnav,
  :root[data-theme="dark"] .mobile-primary-nav {
    background: #000000 !important;
  }

  :root[data-theme="dark"] .stats > div,
  :root[data-theme="dark"] .stats .data-note {
    background: #080b11 !important;
  }

  :root[data-theme="dark"] .topnav a[aria-current="page"],
  :root[data-theme="dark"] .topnav button[aria-current="page"] {
    background: #ffffff !important;
    color: #020617 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.72) !important;
  }

  :root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
  :root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
  :root[data-theme="dark"].mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    color: #ffffff !important;
    box-shadow: inset 0 2px 0 #ffffff !important;
  }
}

@keyframes mobilePageEnter {
  from {
    opacity: 0.96;
    transform: translate3d(0, 3px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page,
  .topnav,
  .mobile-nav-scrim,
  .mobile-primary-nav a,
  .mobile-primary-nav button {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Android test surface: keep the normal website unchanged while making the phone app concise. */
@media (max-width: 760px) {
  :root[data-app-surface="android"] .panel-head p,
  :root[data-app-surface="android"] .data-note,
  :root[data-app-surface="android"] .rating-note,
  :root[data-app-surface="android"] .course-search-prompt,
  :root[data-app-surface="android"] .matcher-prompt,
  :root[data-app-surface="android"] .guide-result-head > div:first-child > p,
  :root[data-app-surface="android"] .guide-linear-preview > div > p,
  :root[data-app-surface="android"] .guide-plan-card > p,
  :root[data-app-surface="android"] .guide-plan-section > summary small,
  :root[data-app-surface="android"] .guide-adjust-head p,
  :root[data-app-surface="android"] .guide-adjust-field small,
  :root[data-app-surface="android"] .guide-subject-target p,
  :root[data-app-surface="android"] .guide-course-option p,
  :root[data-app-surface="android"] .guide-job-grid article p,
  :root[data-app-surface="android"] .guide-timeline li p,
  :root[data-app-surface="android"] .guide-disclaimer,
  :root[data-app-surface="android"] .guide-eas-note p,
  :root[data-app-surface="android"] .guide-true-reward p,
  :root[data-app-surface="android"] .subject-check-card p,
  :root[data-app-surface="android"] .subject-prereq-strip span,
  :root[data-app-surface="android"] .subject-pick-head p,
  :root[data-app-surface="android"] .subject-pick-card p,
  :root[data-app-surface="android"] .subject-course-detail > p,
  :root[data-app-surface="android"] .subject-pathway-grid article p,
  :root[data-app-surface="android"] .subject-career-grid article p,
  :root[data-app-surface="android"] .subject-guide-link p,
  :root[data-app-surface="android"] .course-detail > p,
  :root[data-app-surface="android"] .income-outlook > div > p,
  :root[data-app-surface="android"] .income-outlook > small,
  :root[data-app-surface="android"] .pathway-panel p,
  :root[data-app-surface="android"] .pathway-finder-note,
  :root[data-app-surface="android"] .simple-route-body p,
  :root[data-app-surface="android"] .pathway-linear p,
  :root[data-app-surface="android"] .advisor-summary > p,
  :root[data-app-surface="android"] .advisor-summary > small,
  :root[data-app-surface="android"] .advisor-picks article p,
  :root[data-app-surface="android"] .pathway-card small,
  :root[data-app-surface="android"] .linear-stage-head p,
  :root[data-app-surface="android"] .linear-stage-item p,
  :root[data-app-surface="android"] .my-plan-timeline p {
    display: none !important;
  }

  :root[data-app-surface="android"] .subject-how-panel,
  :root[data-app-surface="android"] .calculator-main > .panel:last-child {
    display: none !important;
  }

  :root[data-app-surface="android"] .hero {
    padding-block: 18px;
  }

  :root[data-app-surface="android"] .hero h1 {
    margin-bottom: 7px;
  }

  :root[data-app-surface="android"] .hero > div > p:not(.eyebrow) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  :root[data-app-surface="android"] .panel {
    padding: 15px;
  }

  :root[data-app-surface="android"] .panel-head {
    margin-bottom: 12px;
  }

  :root[data-app-surface="android"] .panel-head h2,
  :root[data-app-surface="android"] .guide-plan-section > summary span {
    margin-bottom: 0;
  }

  :root[data-app-surface="android"] .simple-route-info dd {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  :root[data-app-surface="android"] .calculator-result article p,
  :root[data-app-surface="android"] .calculator-result .smart-planner-card p {
    display: none;
  }

  :root[data-app-surface="android"] .app-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  :root[data-app-surface="android"] .app-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    box-shadow: none;
  }

  :root[data-app-surface="android"] .app-select-trigger > i {
    width: 10px;
    height: 10px;
    margin: -4px 3px 0 14px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  :root[data-app-surface="android"].app-select-open {
    overflow: hidden;
  }

  :root[data-app-surface="android"] .app-select-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    visibility: hidden;
    pointer-events: none;
  }

  :root[data-app-surface="android"] .app-select-overlay.is-open {
    visibility: visible;
    pointer-events: auto;
  }

  :root[data-app-surface="android"] .app-select-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(2, 6, 23, 0.58);
    opacity: 0;
    backdrop-filter: blur(3px);
    transition: opacity 180ms var(--ease);
  }

  :root[data-app-surface="android"] .app-select-overlay.is-open .app-select-backdrop {
    opacity: 1;
  }

  :root[data-app-surface="android"] .app-select-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(72vh, 620px);
    padding: 0 14px max(18px, env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: var(--surface);
    box-shadow: 0 -20px 55px rgba(2, 6, 23, 0.24);
    transform: translateY(104%);
    transition: transform 230ms var(--ease-out);
  }

  :root[data-app-surface="android"] .app-select-overlay.is-open .app-select-sheet {
    transform: translateY(0);
  }

  :root[data-app-surface="android"] .app-select-sheet > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 2px 12px;
    border-bottom: 1px solid var(--line);
  }

  :root[data-app-surface="android"] .app-select-sheet > header span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  :root[data-app-surface="android"] .app-select-sheet > header h2 {
    margin: 2px 0 0;
    font-size: 21px;
  }

  :root[data-app-surface="android"] .app-select-sheet > header button {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 850;
  }

  :root[data-app-surface="android"] .app-select-options {
    display: grid;
    gap: 7px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 0 4px;
  }

  :root[data-app-surface="android"] .app-select-options button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-weight: 750;
    text-align: left;
  }

  :root[data-app-surface="android"] .app-select-options button[aria-selected="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
  }

  :root[data-theme="dark"][data-app-surface="android"] .app-select-sheet,
  :root[data-theme="dark"][data-app-surface="android"] .app-select-trigger,
  :root[data-theme="dark"][data-app-surface="android"] .app-select-sheet > header button,
  :root[data-theme="dark"][data-app-surface="android"] .app-select-options button {
    background: #05070b;
  }

  :root[data-theme="dark"][data-app-surface="android"] .app-select-options button[aria-selected="true"] {
    border-color: #ffffff;
    background: #ffffff;
    color: #020617;
  }
}

/* Search clarity and low-cost motion pass (v19). */
.search-interpretation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 34px;
  margin: -6px 0 14px;
  padding: 8px 11px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  animation: microReveal 180ms var(--ease-out) both;
}

.search-interpretation strong,
.atar-requirement {
  color: var(--text);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.course-summary .atar-requirement {
  letter-spacing: 0.015em;
}

.course-detail dd.atar-requirement {
  font-size: 1.06em;
}

:root[data-theme="dark"] .search-interpretation {
  border-left-color: #ffffff;
  background: #080b12;
}

:root[data-theme="dark"] .search-interpretation strong,
:root[data-theme="dark"] .atar-requirement {
  color: #ffffff;
}

@media (max-width: 760px) {
  .search-interpretation {
    margin-top: -2px;
  }

  .course-list > .course-item {
    content-visibility: auto;
    contain-intrinsic-size: 172px;
  }

  .course-list > .course-item:nth-of-type(n + 9) {
    animation: none;
  }
}

/* Mobile navigation: a stable app bar with an on-demand page sheet. */
.mobile-primary-nav {
  display: none;
}

.topnav a:focus-visible,
.topnav button:focus-visible,
.mobile-primary-nav a:focus-visible,
.mobile-primary-nav button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 52%, transparent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .mobile-nav-peek {
    display: none !important;
  }

  .topnav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 82;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: auto;
    max-height: min(54svh, 390px);
    padding: 10px;
    gap: 6px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(2, 6, 23, 0.2);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate3d(0, 12px, 0) scale(0.985);
    transition: opacity 150ms ease, transform 190ms var(--ease-out), visibility 0s linear 190ms;
    contain: layout paint style;
  }

  html.mobile-nav-expanded .topnav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity 150ms ease, transform 190ms var(--ease-out), visibility 0s;
  }

  .topnav a,
  .topnav button {
    min-height: 54px;
    padding: 8px 6px;
    border-radius: 8px;
  }

  .mobile-primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 84;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 28px rgba(2, 6, 23, 0.1);
  }

  .mobile-primary-nav a,
  .mobile-primary-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 52px;
    padding: 6px 3px;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
  }

  .mobile-primary-nav a::before,
  .mobile-primary-nav button::before {
    content: attr(data-mobile-icon);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
  }

  .mobile-primary-nav a::after,
  .mobile-primary-nav button::after {
    max-width: 100%;
    overflow: hidden;
    content: attr(data-mobile-label);
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-primary-nav a[aria-current="page"],
  .mobile-primary-nav button[aria-current="page"],
  html.mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: #1d4ed8;
    color: #ffffff;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    margin-bottom: 36px;
  }

  :root[data-theme="dark"] .topnav,
  :root[data-theme="dark"] .mobile-primary-nav {
    border-color: #273244;
    background: #000000;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.75);
  }

  :root[data-theme="dark"] .mobile-primary-nav a,
  :root[data-theme="dark"] .mobile-primary-nav button {
    color: #d6deea;
  }

  :root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
  :root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
:root[data-theme="dark"].mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: #ffffff;
    color: #05070d;
  }
}

/* v12 mobile app shell, lazy details and motion system. */
.topbar {
  isolation: isolate;
}

.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 3;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #38bdf8, var(--accent));
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
}

html.is-route-pending .topbar::after {
  animation: fastNavProgress 900ms var(--ease-out) both;
  opacity: 1;
}

.course-detail-loading {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) repeat(3, minmax(40px, 1fr));
  gap: 9px;
  align-items: center;
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  animation: microReveal 180ms var(--ease-out) both;
}

.course-detail-loading i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
}

.course-detail-loading i::after {
  display: block;
  width: 55%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 46%, white), transparent);
  content: "";
  animation: detailLoadingSweep 900ms ease-in-out infinite;
}

@keyframes detailLoadingSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(220%); }
}

.course-item.is-loading-detail > summary::after,
.subject-course-row.is-loading-detail summary b {
  animation: detailIndicatorPulse 760ms ease-in-out infinite alternate;
}

@keyframes detailIndicatorPulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.course-detail,
.subject-course-detail,
.calculator-result,
#subject-helper-result > *,
.guide-plan-result,
.simple-route-list {
  transform-origin: top center;
}

details[open] > .course-detail,
details[open] > .subject-course-detail,
.calculator-result,
#subject-helper-result > * {
  animation: microReveal 190ms var(--ease-out) both;
}

.mobile-primary-nav,
.topnav,
.topbar {
  will-change: transform;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 60px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(2, 6, 23, 0.05);
    transform: none;
    backface-visibility: visible;
    will-change: auto;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand span {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    width: min(100% - 20px, 1120px);
    margin-bottom: 22px;
    animation-duration: 190ms;
    animation-timing-function: var(--ease-out);
  }

  .hero {
    gap: 14px;
    padding: 22px 0 14px;
  }

  .hero h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 9vw, 38px);
    letter-spacing: -0.035em;
  }

  .panel,
  .hero,
  .guide-direction-deck,
  .guide-plan-section,
  .simple-pathway-finder,
  .atar-main-card {
    scroll-margin-top: 72px;
  }

  .panel {
    padding: 16px;
    border-radius: 14px;
  }

  .panel-head {
    gap: 10px;
  }

  .topnav {
    left: 8px;
    right: 8px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(56svh, 410px);
    padding: 9px;
    border-radius: 12px;
    transform: translate3d(0, 14px, 0) scale(0.99);
    transition: opacity 150ms ease, transform 210ms var(--ease-out), visibility 0s linear 210ms;
    overscroll-behavior: contain;
  }

  .topnav [data-mobile-primary="true"] {
    display: none;
  }

  html.mobile-nav-expanded .topnav {
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity 150ms ease, transform 210ms var(--ease-out), visibility 0s;
  }

  .topnav a,
  .topnav button {
    min-height: 52px;
    border-radius: 7px;
    transition: transform 140ms var(--ease-out), background 150ms ease, color 150ms ease;
  }

  .mobile-primary-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 3px calc(4px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 -1px 0 var(--line), 0 -10px 28px rgba(2, 6, 23, 0.08);
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .mobile-primary-nav a,
  .mobile-primary-nav button {
    min-height: 54px;
    padding-inline: 1px;
    border-radius: 6px;
    color: #475569;
    transition: transform 140ms var(--ease-out), background 150ms ease, color 150ms ease, box-shadow 150ms ease;
  }

  .mobile-primary-nav a::before,
  .mobile-primary-nav button::before {
    font-size: 19px;
  }

  .mobile-primary-nav a::after,
  .mobile-primary-nav button::after {
    font-size: 9.5px;
    letter-spacing: -0.01em;
  }

  .mobile-primary-nav a[aria-current="page"],
  .mobile-primary-nav button[aria-current="page"],
  html.mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    border-radius: 6px;
    background: #eff6ff;
    color: var(--accent);
    box-shadow: inset 0 2px 0 var(--accent);
  }

  .mobile-primary-nav a:active,
  .mobile-primary-nav button:active,
  .topnav a:active,
  .topnav button:active {
    transform: scale(0.96);
  }

  .course-list,
  .provider-grid,
  .top-provider-grid,
  .simple-route-list,
  .subject-pathway-grid,
  .subject-career-grid,
  .guide-plan-grid {
    gap: 10px;
  }

  .course-item,
  .provider-card,
  .top-provider-card,
  .subject-course-card,
  .subject-course-row,
  .simple-route-card,
  .pathway-course-card,
  .guide-plan-card,
  .guide-section-card {
    animation: mobileItemIn 190ms var(--ease-out) both;
    animation-delay: min(var(--item-delay, 0ms), 80ms);
  }

  .course-item[open],
  .subject-course-row[open],
  .subject-course-card[open] {
    contain: none;
    content-visibility: visible;
  }

  .course-item > summary {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    padding: 14px 13px;
  }

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

  .quick-actions button {
    min-height: 42px;
    border-radius: 8px;
  }

  .course-detail,
  .subject-course-detail {
    padding: 14px;
  }

  .course-detail-loading {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .course-detail-loading i:nth-of-type(2),
  .course-detail-loading i:nth-of-type(3) {
    display: none;
  }

  .actions,
  .pathway-hero-actions,
  .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .actions a,
  .actions button,
  .pathway-hero-actions a,
  .pathway-hero-actions button,
  .panel-actions a,
  .panel-actions button {
    width: 100%;
    min-height: 46px;
  }

  :root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
  :root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
  :root[data-theme="dark"].mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: #ffffff;
    color: #020617;
    box-shadow: inset 0 2px 0 #ffffff;
  }

  :root[data-theme="dark"] .topbar,
  :root[data-theme="dark"] .mobile-primary-nav,
  :root[data-theme="dark"] .topnav {
    background: #000000;
  }
}

@keyframes mobileItemIn {
  from {
    opacity: 0.93;
    transform: translate3d(0, 5px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-detail-loading i::after,
  .course-item.is-loading-detail > summary::after,
  .subject-course-row.is-loading-detail summary b,
  html.is-route-pending .topbar::after {
    animation: none !important;
  }
}

/* TAFE catalogue and vocational planning tools. */
.is-tafe-admission {
  border-left-color: #0f766e;
}

.is-tafe-admission .admission-number:first-child strong {
  color: #0f766e;
}

.tafe-toolkit {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.tafe-toolkit-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.tafe-toolkit-head h3,
.tafe-toolkit-head p {
  margin: 0;
}

.tafe-toolkit-head h3 {
  margin-top: 4px;
  font-size: 21px;
}

.tafe-toolkit-head p {
  max-width: 760px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.tafe-toolkit-head > a,
.tafe-official-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.tafe-toolkit-head > a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.tafe-route-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tafe-route-actions button {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, box-shadow 160ms ease;
}

.tafe-route-actions button:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.tafe-route-actions strong {
  color: var(--text);
  font-size: 15px;
}

.tafe-route-actions span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

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

.tafe-tool-grid details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tafe-tool-grid summary {
  padding: 14px 15px;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.tafe-qualification-guide dl,
.tafe-funding-tool form {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 15px 15px;
}

.tafe-qualification-guide dl > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.tafe-qualification-guide dt {
  color: var(--text);
  font-weight: 850;
}

.tafe-qualification-guide dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tafe-funding-tool label {
  display: flex;
  align-items: start;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.tafe-funding-tool input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.tafe-funding-tool button {
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.tafe-funding-tool p {
  margin: 0;
  padding: 10px 11px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.tafe-funding-tool p.is-positive {
  border-left-color: #16a34a;
  color: var(--text);
}

.tafe-official-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 2px;
}

.tafe-official-links a {
  font-size: 13px;
}

:root[data-theme="dark"] .tafe-toolkit,
:root[data-theme="dark"] .tafe-route-actions button,
:root[data-theme="dark"] .tafe-tool-grid details,
:root[data-theme="dark"] .tafe-toolkit-head > a,
:root[data-theme="dark"] .tafe-funding-tool p {
  background: #000;
}

:root[data-theme="dark"] .is-tafe-admission .admission-number:first-child strong,
:root[data-theme="dark"] .tafe-toolkit .eyebrow,
:root[data-theme="dark"] .tafe-toolkit-head > a,
:root[data-theme="dark"] .tafe-official-links a {
  color: #fff;
}

@media (max-width: 900px) {
  .tafe-route-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tafe-tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tafe-toolkit {
    margin-top: 16px;
    padding: 14px;
  }

  .tafe-toolkit-head {
    display: grid;
    gap: 12px;
  }

  .tafe-toolkit-head > a {
    justify-self: start;
  }

  .tafe-route-actions {
    grid-template-columns: 1fr;
  }

  .tafe-route-actions button {
    min-height: 74px;
    padding: 13px;
  }

  .tafe-route-actions span {
    display: none;
  }

  .tafe-qualification-guide dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Keep the v25 admission layout above older responsive course-card rules. */
.course-admission {
  gap: 12px;
}

@media (max-width: 780px) {
  .course-admission {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-admission .admission-number {
    display: grid;
    min-width: 0;
    gap: 4px;
  }

  .course-admission .admission-number strong {
    justify-self: start;
    overflow-wrap: anywhere;
    font-size: 22px;
  }

  .course-admission > small,
  .course-admission > a {
    grid-column: 1 / -1;
  }
}

.mobile-filter-toggle,
.mobile-filter-done {
  display: none;
}

@media (max-width: 760px) {
  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
  }

  .mobile-filter-toggle span,
  .mobile-filter-toggle strong {
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-filter-toggle strong {
    color: var(--accent);
  }

  .course-filter-panel {
    display: grid;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 260ms var(--ease-out), opacity 160ms ease;
  }

  .course-filter-panel.is-open {
    max-height: 1800px;
    opacity: 1;
  }

  .course-filter-panel.is-open .filters {
    margin-top: 12px;
  }

  .mobile-filter-done {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
  }

  :root[data-theme="dark"] .mobile-filter-toggle strong {
    color: #ffffff;
  }

  :root[data-theme="dark"] .mobile-filter-done {
    border-color: #ffffff;
    background: #ffffff;
    color: #05070d;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #050914;
  --surface-strong: #02040a;
  --surface-soft: #070d19;
  --surface-tint: #0b1c38;
  --line: #26374f;
  --text: #f8fbff;
  --muted: #b8c4d6;
  --accent: #2563eb;
  --accent-soft: #071733;
  --accent-dark: #1d4ed8;
  --cool: #08172d;
  --topbar-bg: rgba(0, 0, 0, 0.92);
  --page-top: #000000;
  --page-bottom: #000000;
  --shadow: rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-lift: 0 24px 58px rgba(0, 0, 0, 0.62);
  --focus-ring: rgba(37, 99, 235, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] body {
  background: #000000;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

main > section[id],
.panel[id],
.hero[id] {
  scroll-margin-top: 108px;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select,
textarea {
  font-size: 16px;
}

a,
button,
summary {
  touch-action: manipulation;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 38px !important;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 17px;
  height: 17px;
}

@keyframes fadeUp {
  from {
    opacity: 0.96;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageArrive {
  from {
    opacity: 0.96;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageSwitchIn {
  from {
    opacity: 0.94;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fastPageEnter {
  from {
    opacity: 0.985;
    transform: translate3d(0, 5px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fastNavProgress {
  from {
    transform: scaleX(0);
  }
  60% {
    transform: scaleX(0.72);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes routeViewOut {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0.92;
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes routeViewIn {
  from {
    opacity: 0.92;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes resultsRefreshIn {
  from {
    opacity: 0.9;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealSoft {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes surfaceFloatIn {
  from {
    opacity: 0.9;
    transform: translate3d(0, 7px, 0) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes softPulseIn {
  0% {
    opacity: 0.72;
    transform: scale(0.992);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rowPulse {
  0% {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(239, 246, 255, 0.94);
  }
  100% {
    border-color: var(--line);
    background: #fff;
  }
}

@keyframes progressSweep {
  0% {
    transform: translateX(-120%) scaleX(0.45);
  }
  45% {
    transform: translateX(10%) scaleX(0.7);
  }
  100% {
    transform: translateX(150%) scaleX(0.38);
  }
}

@keyframes progressGlow {
  0%, 100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

@keyframes dotPulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(56px, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  width: 100%;
  min-height: 68px;
  padding: 0 clamp(14px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  box-shadow: 0 1px 22px var(--shadow);
  backdrop-filter: blur(14px);
  transition: background var(--motion-medium) ease, border-color var(--motion-medium) ease, box-shadow var(--motion-medium) ease;
}

.brand,
.topnav a,
.topnav button {
  color: var(--text);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 184px;
  font-size: 16.5px;
  font-weight: 700;
}

.site-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.topnav {
  display: flex;
  flex: 0 1 auto;
  justify-content: center;
  gap: clamp(10px, 1vw, 16px);
  min-width: 0;
  max-width: 100%;
  padding-inline: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
  margin-left: 0;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.topnav a,
.topnav button {
  padding: 10px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-size: 14.2px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.topnav a:hover,
.topnav button:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.topnav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.mobile-nav-peek {
  display: none;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 56px;
  animation: pageSwitchIn 260ms var(--ease-out) both;
}

html.is-fast-section-jump main {
  animation: fastPageEnter 160ms var(--ease-out) both;
}

.topnav a.is-nav-pressed,
.topnav button.is-nav-pressed,
.brand.is-nav-pressed {
  transform: translate3d(0, -1px, 0) scale(0.985);
}

.app-progress {
  position: sticky;
  top: 68px;
  z-index: 19;
  width: 100%;
  padding: 0 28px;
  pointer-events: none;
}

.app-progress-track,
.process-strip {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.86);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.08);
}

.app-progress-track {
  width: min(1120px, calc(100% - 32px));
  height: 5px;
  margin: 8px auto 0;
}

.process-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: 0 0 14px;
  padding: 0 12px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
}

.app-progress-track::before,
.process-strip::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 48%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-dark), transparent);
  content: "";
  transform-origin: left center;
  animation: progressSweep 1.1s var(--ease-out) infinite;
}

.process-strip::after {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  animation: progressGlow 900ms ease-in-out infinite;
}

.process-strip span {
  position: relative;
  z-index: 1;
}

.process-dots {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 3px;
}

.process-dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  animation: dotPulse 1s ease-in-out infinite;
}

.process-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.process-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: end;
  padding: 42px 0 22px;
  animation: fadeUp 360ms ease both;
}

.advisor-main .hero {
  align-items: center;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.hero p,
.panel-head p,
.empty-note,
.data-note {
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stats.two {
  grid-template-columns: repeat(2, 1fr);
}

.stats div {
  padding: 14px;
  background: var(--surface);
}

.stats dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats dd {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.data-note {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 13px;
}

.stats .data-note {
  margin: 0;
  padding: 12px 14px;
  background: var(--surface);
}

.panel {
  margin: 18px 0 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.045);
  scroll-margin-top: 104px;
  animation: fadeUp 360ms var(--ease-out) both;
  transition: border-color var(--motion-medium) ease, box-shadow var(--motion-medium) ease, transform var(--motion-medium) ease, background var(--motion-medium) ease;
}

.panel:nth-of-type(2) {
  animation-delay: 45ms;
}

.panel:nth-of-type(3) {
  animation-delay: 90ms;
}

.panel:nth-of-type(4) {
  animation-delay: 135ms;
}

.panel:hover {
  border-color: #bfd5f5;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin-bottom: 5px;
  font-size: 23px;
  line-height: 1.2;
}

.panel-head span {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.help-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, background 160ms ease;
}

.help-link:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.search-form label:focus-within,
.advisor-form label:focus-within input,
.advisor-form label:focus-within select,
.chat-form input:focus,
.ask-form input:focus,
select:focus,
input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.search-form label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease, background var(--motion-fast) ease;
}

.search-form label:focus-within {
  transform: translateY(-1px);
}

.search-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-form button,
.match-btn,
.load-more,
.actions a,
.actions button,
.quick-actions button,
.ask-form button,
.clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.search-form button,
.match-btn,
.chat-form button,
.ask-form button {
  position: relative;
  overflow: hidden;
}

.search-form button::after,
.match-btn::after,
.chat-form button::after,
.ask-form button::after {
  content: none;
}

.search-form button:hover::after,
.match-btn:hover::after,
.chat-form button:hover::after,
.ask-form button:hover::after {
  transform: none;
}

.search-form button,
.match-btn,
.actions a:first-child,
.ask-form button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  animation: none;
}

.search-form button:hover,
.match-btn:hover,
.actions a:first-child:hover,
.ask-form button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.search-form button,
.match-btn,
.load-more,
.actions a,
.actions button,
.quick-actions button,
.ask-form button,
.clear-btn,
.compare-scroll button {
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.search-form button:hover,
.match-btn:hover,
.load-more:hover,
.actions a:hover,
.actions button:hover,
.quick-actions button:hover,
.ask-form button:hover,
.clear-btn:hover,
.compare-scroll button:hover {
  transform: none;
}

.search-form button:active,
.match-btn:active,
.load-more:active,
.actions a:active,
.actions button:active,
.quick-actions button:active,
.ask-form button:active,
.clear-btn:active,
.compare-scroll button:active {
  transform: translateY(0);
}

.actions a,
.actions button,
.load-more {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}

.actions button,
.quick-actions button {
  min-height: 34px;
}

.clear-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
}

.income-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 10px;
  border: 1px solid #d5e4ff;
  border-radius: var(--radius);
  background: #f8fbff;
}

.income-filter-bar span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.income-filter-bar button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 800;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.income-filter-bar button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.income-filter-bar small {
  flex-basis: 100%;
  color: var(--muted);
  line-height: 1.4;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.atar-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.advisor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 14px;
  margin-bottom: 16px;
}

.advisor-form label {
  display: grid;
  gap: 6px;
  transition: transform 160ms ease;
}

.advisor-form label:focus-within {
  transform: translateY(-1px);
}

.advisor-form label span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.advisor-form input,
.advisor-form select,
.chat-form input,
.ask-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.advisor-form button {
  grid-column: 1 / -1;
}

.advisor-result {
  display: grid;
  gap: 14px;
  scroll-margin-top: 88px;
  overflow-anchor: none;
}

.advisor-summary,
.chat-box,
.advisor-picks article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.advisor-summary {
  padding: 16px;
}

.advisor-summary h3,
.chat-box h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.advisor-summary p {
  color: var(--text);
  line-height: 1.55;
}

.advisor-summary small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

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

.advisor-picks article {
  padding: 13px;
  animation: cardRise 260ms ease both;
}

.advisor-summary:hover,
.chat-box:hover,
.advisor-picks article:hover {
  border-color: #b9c8d1;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
  transform: translateY(-1px);
}

.advisor-picks article:nth-child(2) {
  animation-delay: 35ms;
}

.advisor-picks article:nth-child(3) {
  animation-delay: 70ms;
}

.advisor-picks article:nth-child(4) {
  animation-delay: 105ms;
}

.advisor-picks article:nth-child(5) {
  animation-delay: 140ms;
}

.advisor-picks article:nth-child(6) {
  animation-delay: 175ms;
}

.advisor-picks strong,
.advisor-picks small,
.advisor-picks em {
  display: block;
}

.advisor-picks strong {
  font-size: 15.5px;
  line-height: 1.3;
}

.advisor-picks small,
.advisor-picks p {
  color: var(--muted);
  line-height: 1.45;
}

.advisor-picks em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.chat-box {
  padding: 16px;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chat-head h3 {
  margin: 0;
}

.chat-head span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-log {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  margin-bottom: 12px;
}

.chat-message {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--bg);
  animation: messageIn 180ms ease both;
}

.chat-message.user {
  background: #eaf2ff;
}

.chat-message.pending {
  background: var(--accent-soft);
  animation: messageIn 140ms ease both;
}

.chat-message strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-message strong span {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.chat-message p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chat-message .term::after {
  display: none;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-form button,
.ask-form button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.chat-form button:disabled,
.chat-form input:disabled,
.ask-form button:disabled,
.ask-form input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.ask-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.ask-drawer.open {
  pointer-events: auto;
}

.ask-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  opacity: 0;
  transition: opacity 190ms ease;
}

.ask-drawer.open .ask-backdrop {
  opacity: 1;
}

.ask-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  width: min(430px, 100%);
  height: 100%;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.13);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ask-drawer.open .ask-panel {
  transform: translateX(0);
}

.ask-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ask-head h2 {
  margin: 0;
  font-size: 24px;
}

.ask-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ai-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
}

.ai-status.on {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.ai-status.off {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.ai-status.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.ask-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.icon-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

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

.ask-suggestions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.ask-suggestions button:hover,
.icon-button:hover {
  border-color: #b9c8d1;
  background: #fff;
  transform: translateY(-1px);
}

.ask-log {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
}

.ask-message {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  animation: messageIn 170ms ease both;
}

.ask-message.user {
  border-color: #c7dbff;
  background: #eaf2ff;
}

.ask-message.pending {
  background: var(--accent-soft);
  animation: messageIn 140ms ease both;
}

.ask-message strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.ask-message strong span {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.ask-message p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.ask-message p + p {
  margin-top: 6px;
}

.ask-message .term::after {
  display: none;
}

.ask-resources {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.ask-resources a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.filters label,
.atar-controls label,
.top-provider-head label {
  display: grid;
  gap: 6px;
}

.filters span,
.atar-controls span,
.top-provider-head span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

select,
input[type="number"],
.filters input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
}

.course-list {
  display: grid;
  gap: 9px;
}

.course-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: auto 104px;
  animation: revealSoft 260ms var(--ease-out) both;
  animation-delay: var(--item-delay, 0ms);
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.course-item:nth-child(2n) {
  animation-delay: var(--item-delay, 0ms);
}

.course-item:nth-child(3n) {
  animation-delay: var(--item-delay, 0ms);
}

.course-item:hover {
  border-color: #b9c8d1;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
  transform: translateY(-1px);
}

.course-item[open] {
  border-color: var(--accent);
  background: #f8fbff;
}

.course-item > summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.course-item > summary:focus-visible,
.pathway-grid a:focus-visible,
.provider-card:focus-visible,
.top-provider-card:focus-visible,
.help-link:focus-visible,
.topnav button:focus-visible,
.ask-suggestions button:focus-visible,
.ask-form input:focus-visible,
.ask-form button:focus-visible,
.ask-resources a:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

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

.course-item > summary::after {
  content: "Expand";
  justify-self: end;
  grid-column: 3;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.course-item[open] > summary::after {
  content: "Collapse";
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-actions button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.quick-actions button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.course-item img,
.provider-card img,
.top-provider-card img {
  object-fit: contain;
  object-position: left center;
}

.course-item img {
  width: 82px;
  height: 44px;
}

.course-summary strong,
.provider-card strong,
.top-provider-card strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.3;
}

.course-summary small,
.course-summary em,
.provider-card small,
.top-provider-card small,
.top-provider-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
}

.course-summary .income-preview {
  margin-top: 4px;
  color: var(--accent);
  font-weight: 800;
}

.course-summary .distance-preview {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
}

.distance-note {
  margin: -8px 0 16px;
  padding: 10px 12px;
  border: 1px solid #d5e4ff;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.course-detail {
  padding: 0 14px 14px;
  animation: revealSoft 240ms var(--ease-out) both;
}

.course-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.course-detail dl div {
  padding: 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.course-detail dl div:nth-child(2n) {
  border-right: 0;
}

.course-detail dt {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
}

.course-detail dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.income-outlook {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 13px;
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  background: #f8fbff;
}

.income-outlook h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.income-outlook p,
.income-outlook small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.income-chip-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.income-chip-list article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.income-chip-list strong,
.income-chip-list span {
  display: block;
}

.income-chip-list strong {
  font-size: 13px;
  line-height: 1.25;
}

.income-chip-list span {
  margin-top: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.field-more {
  color: var(--muted);
}

.field-more summary {
  display: block;
  cursor: pointer;
}

.field-more summary::-webkit-details-marker {
  display: none;
}

.field-more summary span {
  margin-left: 5px;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.field-more p {
  margin: 9px 0 0;
  color: var(--muted);
}

.course-detail p {
  color: var(--muted);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.saved-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.compare-empty,
.compare-box,
.pathway-panel,
.saved-empty {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.compare-empty strong,
.compare-box h3,
.pathway-panel h3,
.saved-empty strong {
  display: block;
  margin: 0 0 5px;
  font-size: 18px;
}

.compare-empty p,
.compare-box p,
.pathway-panel p,
.saved-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.saved-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.saved-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.saved-empty a:hover {
  border-color: #b8cff8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.compare-scroll {
  overflow-x: auto;
  margin-top: 12px;
}

.compare-scroll table {
  min-width: 760px;
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
}

.compare-scroll th,
.compare-scroll td {
  min-width: 170px;
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
}

.compare-scroll th:first-child {
  min-width: 150px;
  color: var(--text);
}

.compare-scroll thead th {
  background: var(--bg);
}

.compare-scroll th strong,
.compare-scroll th small,
.compare-scroll td a {
  display: block;
}

.compare-scroll th small {
  margin: 4px 0 8px;
  color: var(--muted);
  font-weight: 600;
}

.compare-scroll button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.compare-scroll td a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.pathway-panel {
  grid-column: 1 / -1;
  background: #f5f9ff;
}

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

.pathway-grid a {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.pathway-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.pathway-grid em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.atar-controls {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
}

.atar-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 112px);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
}

#atarValue {
  color: var(--muted);
  font-weight: 800;
}

.subject-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.subject-box select {
  flex: 1 0 130px;
  width: auto;
  min-height: 30px;
  border: 0;
  padding: 0 4px;
}

.chip {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.top-provider-block {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.top-provider-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.top-provider-head h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.top-provider-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.rating-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.top-provider-card,
.provider-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  animation: revealSoft 300ms var(--ease-out) both;
  animation-delay: var(--item-delay, 0ms);
  transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

.top-provider-card:hover,
.provider-card:hover,
.pathway-grid a:hover {
  border-color: #b9c8d1;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
  transform: translateY(-1px);
}

.calculator-main .panel {
  overflow: visible;
}

.calculator-hero {
  align-items: center;
}

.calculator-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.calculator-form {
  display: grid;
  gap: 12px;
}

.calc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-rows {
  display: grid;
  gap: 10px;
}

.calc-subject-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px minmax(300px, 1.15fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.calc-subject-row.is-fresh {
  animation: rowPulse 520ms ease-out both;
}

.calc-subject-row:focus-within {
  z-index: 35;
}

.calc-subject-row:hover,
.calculator-result:hover,
.method-grid article:hover {
  border-color: #b9c8d1;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.045);
  transform: translateY(-1px);
}

.calc-subject-row label,
.guide-controls label {
  display: grid;
  gap: 6px;
}

.calc-subject-row label span,
.guide-controls label span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
}

.calc-subject-row small {
  color: var(--muted);
  font-size: 12px;
}

.subject-picker {
  position: relative;
}

.subject-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 90;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  max-width: 100%;
  max-height: 292px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.15);
  scrollbar-width: thin;
}

.subject-suggestions:empty {
  display: none;
}

.subject-suggestion,
.subject-suggestion-empty {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.subject-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.subject-suggestion:last-child {
  border-bottom: 0;
}

.subject-suggestion:hover,
.subject-suggestion:focus {
  background: var(--accent-soft);
  outline: 0;
}

.subject-suggestion strong,
.subject-suggestion small {
  display: block;
}

.subject-suggestion small,
.subject-suggestion-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.subject-suggestion em {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.calc-subject-row input,
.calc-subject-row select,
.guide-controls input,
.guide-controls select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.calc-subject-row input:focus,
.calc-subject-row select:focus,
.guide-controls input:focus,
.guide-controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.row-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  align-content: center;
  color: var(--muted);
  font-size: 12.5px;
}

.row-breakdown span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
}

.row-remove {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 140ms ease, border-color 160ms ease, color 160ms ease;
}

.row-remove:hover {
  border-color: #b9c8d1;
  color: var(--text);
  transform: translateY(-1px);
}

.calculator-result {
  position: static;
  order: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.atar-simple-summary {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr 1.2fr;
  gap: 12px;
  align-items: stretch;
}

.atar-main-card,
.atar-focus-card,
.atar-context-card,
.subject-impact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.atar-main-card,
.atar-focus-card,
.atar-context-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 138px;
  padding: 16px;
}

.atar-main-card span,
.atar-focus-card > span,
.atar-context-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.atar-main-card strong {
  color: var(--text);
  font-size: clamp(42px, 6vw, 64px);
  line-height: 0.95;
}

.atar-focus-card > strong {
  color: var(--text);
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.08;
}

.atar-main-card p,
.atar-focus-card p,
.atar-context-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.focus-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.focus-groups div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.focus-groups em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.focus-groups small {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.focus-groups b,
.focus-groups small > span {
  overflow-wrap: anywhere;
}

.focus-groups b {
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
}

.focus-groups small > span {
  font-size: 12px;
  font-weight: 800;
}

.atar-context-card p {
  font-size: 13px;
}

.atar-context-card strong {
  color: var(--text);
}

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

.atar-smart-card,
.atar-what-if-strip {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.atar-smart-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.atar-smart-card.primary {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, var(--surface-strong)), var(--surface-strong));
}

.atar-smart-card span,
.atar-what-if-strip > span {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.atar-smart-card strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.18;
}

.atar-smart-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.atar-what-if-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.atar-what-if-strip div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--accent-soft);
}

.atar-what-if-strip b {
  color: var(--text);
  font-size: 12px;
}

.atar-what-if-strip strong {
  color: var(--accent);
  font-size: 17px;
  line-height: 1.05;
}

.atar-what-if-strip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subject-impact-list {
  display: grid;
  gap: 10px;
}

.subject-impact-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.subject-impact-head h3 {
  margin: 0;
  font-size: 18px;
}

.subject-impact-head p,
.missing-baseline-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subject-impact-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.subject-impact-card:hover {
  border-color: #b8cff8;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.subject-impact-card.scale-up {
  border-color: rgba(37, 99, 235, 0.32);
}

.subject-impact-card.scale-down {
  border-color: rgba(220, 38, 38, 0.28);
}

.subject-impact-title,
.subject-impact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.subject-impact-title strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.subject-impact-title span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.subject-impact-card.scale-down .subject-impact-title span {
  background: #fef2f2;
  color: #b42318;
}

.subject-impact-card.scale-neutral .subject-impact-title span {
  background: var(--surface);
  color: var(--muted);
}

.subject-impact-meta {
  justify-content: flex-start;
}

.subject-impact-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subject-impact-meta strong {
  color: var(--text);
}

.subject-impact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.missing-baseline-note {
  padding: 10px 12px;
  border: 1px dashed #b8cff8;
  border-radius: var(--radius);
  background: #f8fbff;
}

.result-metrics {
  display: grid;
  gap: 10px;
  align-self: start;
  min-width: 0;
}

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

.result-top div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.result-top span,
.counted-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-top strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.aggregate-meter {
  height: 12px;
  margin: 0;
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.aggregate-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
  transition: width 240ms ease;
}

.result-note,
.calc-warnings,
.method-grid p {
  color: var(--muted);
}

.result-note {
  margin: 0;
}

.score-explainer {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.score-explainer p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.score-explainer strong {
  color: var(--text);
}

.calc-warnings {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
}

.counted-list {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 0;
}

.counted-list h3 {
  grid-column: 1 / -1;
  margin-bottom: 0;
  font-size: 16px;
}

.counted-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.counted-list article.scale-up {
  border-color: rgba(37, 99, 235, 0.34);
}

.counted-list article.scale-down {
  border-color: rgba(220, 38, 38, 0.24);
}

.counted-list span {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.counted-list strong,
.counted-list small,
.row-breakdown span {
  overflow-wrap: anywhere;
}

.counted-list article.scale-down > span,
.scale-down {
  color: #b42318;
}

.counted-list article.scale-neutral > span {
  color: var(--muted);
}

.scale-up {
  color: var(--accent);
}

.scale-neutral {
  color: var(--muted);
}

.guide-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 10px;
  margin-bottom: 14px;
}

.subject-guide {
  display: grid;
  gap: 12px;
}

.guide-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) 70px 150px 150px 110px;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.guide-row:last-child {
  border-bottom: 0;
}

.guide-head {
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.guide-row strong {
  line-height: 1.3;
}

.guide-row span {
  color: var(--muted);
}

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

.method-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.method-grid strong {
  display: block;
  margin-bottom: 6px;
}

.subject-main .hero {
  align-items: center;
}

.subject-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 10px;
  align-items: end;
}

.subject-search-form label:first-child {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.subject-search-form label:not(:first-child) {
  display: grid;
  gap: 6px;
}

.subject-search-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subject-search-form input,
.subject-search-form select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.subject-search-form label:first-child input {
  min-height: 46px;
  padding: 0 8px;
  border: 0;
  outline: 0;
}

.subject-search-form select {
  padding: 0 12px;
}

.subject-search-form button,
.quick-subject-searches button,
.subject-empty-examples button {
  min-height: 46px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.subject-search-form button:hover,
.quick-subject-searches button:hover,
.subject-empty-examples button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.15);
}

.quick-subject-searches,
.subject-empty-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-subject-searches button,
.subject-empty-examples button {
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}

.subject-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: center;
}

.subject-plan-panel,
.subject-helper-panel,
.subject-empty {
  animation: fadeUp 300ms ease both;
}

.subject-plan-summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.subject-plan-summary h2 {
  margin-bottom: 6px;
}

.subject-plan-summary p {
  max-width: 720px;
  color: var(--muted);
}

.subject-confidence {
  min-width: 210px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.subject-confidence strong,
.subject-confidence span {
  display: block;
}

.subject-confidence strong {
  color: var(--accent);
  font-size: 17px;
}

.subject-confidence span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.entry-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.entry-snapshot article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.entry-snapshot article.has-required {
  border-color: #fecaca;
  background: #fffafa;
}

.entry-snapshot article.no-required {
  border-color: #bbf7d0;
  background: #f8fffb;
}

.entry-snapshot span,
.entry-rule span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-snapshot strong,
.entry-rule strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.25;
}

.entry-snapshot p,
.entry-rule p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subject-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.subject-plan-grid.no-required-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.no-required-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #f8fffb;
}

.no-required-strip strong {
  color: #166534;
  line-height: 1.25;
}

.no-required-strip span {
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subject-plan-group {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.subject-plan-group h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.subject-plan-group > div > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.subject-recommendations {
  display: grid;
  gap: 8px;
}

.subject-card,
.requirement-signal-grid article,
.subject-advice-grid article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  animation: revealSoft 280ms var(--ease-out) both;
  animation-delay: var(--item-delay, 0ms);
  transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.subject-card {
  animation-name: cardRise;
}

.subject-card:hover,
.subject-course-card:hover,
.requirement-signal-grid article:hover,
.subject-advice-grid article:hover {
  transform: translateY(-1px);
  border-color: #b8cff8;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.subject-card.priority {
  border-left: 4px solid var(--accent);
}

.subject-card.required {
  border-color: #fecaca;
  border-left: 4px solid #dc2626;
  background: #fffafa;
}

.subject-card.useful {
  border-left: 4px solid #0ea5e9;
}

.subject-card.stretch {
  border-left: 4px solid #64748b;
}

.subject-card strong,
.subject-card small,
.subject-card span,
.subject-card em,
.requirement-signal-grid strong,
.requirement-signal-grid small {
  display: block;
}

.subject-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.subject-card strong {
  line-height: 1.25;
}

.subject-card em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.subject-card.required em {
  background: #fee2e2;
  color: #b91c1c;
}

.subject-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subject-card small,
.subject-card span,
.requirement-signal-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.subject-card span {
  margin-top: 5px;
  color: var(--accent);
  font-weight: 800;
}

.subject-evidence-list {
  display: grid;
  gap: 9px;
}

.subject-course-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  animation: revealSoft 280ms var(--ease-out) both;
  animation-delay: var(--item-delay, 0ms);
  transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.subject-course-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.subject-course-card summary::-webkit-details-marker {
  display: none;
}

.subject-course-card summary strong,
.subject-course-card summary small {
  display: block;
}

.subject-course-card summary small {
  color: var(--muted);
}

.course-entry-status {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.course-entry-status.required {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.course-entry-status.open {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.course-entry-status.check {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.subject-course-card summary em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.subject-course-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.subject-course-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  animation: fadeUp 180ms ease both;
}

.entry-rule {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.entry-rule.required {
  border-color: #fecaca;
  background: #fffafa;
}

.entry-rule.open {
  border-color: #bbf7d0;
  background: #f8fffb;
}

.entry-rule.check {
  border-color: #fed7aa;
  background: #fff7ed;
}

.subject-course-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.subject-course-detail dl div {
  min-width: 0;
  padding: 12px;
  background: #fff;
}

.subject-course-detail dt {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
}

.subject-course-detail dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.subject-course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subject-course-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.requirement-signal-grid,
.subject-advice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.requirement-signal-grid article {
  min-height: 96px;
}

.subject-advice-grid article p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.top-provider-card {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.top-provider-card span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.top-provider-card img {
  width: 120px;
  height: 42px;
}

.top-provider-card strong,
.top-provider-card small,
.top-provider-card em {
  grid-column: 2;
}

.provider-card img {
  width: 132px;
  height: 48px;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.faq-list summary {
  cursor: pointer;
  padding: 14px;
  font-weight: 800;
}

.faq-list p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  line-height: 1.55;
}

.term {
  position: relative;
  border-bottom: 1px dotted var(--accent);
  color: var(--accent);
  cursor: help;
  font-weight: 800;
}

.term::after {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  display: none;
  width: min(280px, 80vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
  color: var(--text);
  content: attr(data-tip);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.term:hover::after,
.term:focus::after {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 8px 24px var(--shadow);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.theme-toggle[aria-pressed="true"] {
  background: var(--surface-soft);
  color: #dbeafe;
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

:root[data-theme="dark"] body {
  background: #000000;
}

:root[data-theme="dark"] img {
  filter: none;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line);
  background: #101a2b;
  color: var(--text);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #7f91aa;
}

:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stats,
:root[data-theme="dark"] .course-item,
:root[data-theme="dark"] .course-list article,
:root[data-theme="dark"] .course-card,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .pathway-card,
:root[data-theme="dark"] .advisor-summary,
:root[data-theme="dark"] .advisor-picks article,
:root[data-theme="dark"] .calculator-result,
:root[data-theme="dark"] .calc-subject-row,
:root[data-theme="dark"] .guide-row,
:root[data-theme="dark"] .method-grid article,
:root[data-theme="dark"] .subject-course-card,
:root[data-theme="dark"] .subject-plan-card,
:root[data-theme="dark"] .subject-impact-card,
:root[data-theme="dark"] .subject-course-detail,
:root[data-theme="dark"] .faq-list details,
:root[data-theme="dark"] .ask-panel,
:root[data-theme="dark"] .chat-log,
:root[data-theme="dark"] .message,
:root[data-theme="dark"] .saved-empty,
:root[data-theme="dark"] .compare-table,
:root[data-theme="dark"] .income-outcome-card,
:root[data-theme="dark"] .income-chip,
:root[data-theme="dark"] .field-more,
:root[data-theme="dark"] .term::after {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

:root[data-theme="dark"] .panel {
  background: rgba(19, 28, 45, 0.96);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .search-form label,
:root[data-theme="dark"] .filters label,
:root[data-theme="dark"] .atar-inputs label,
:root[data-theme="dark"] .advisor-form label,
:root[data-theme="dark"] .guide-controls label,
:root[data-theme="dark"] .subject-search-form label {
  border-color: var(--line);
  background: #101a2b;
  color: var(--text);
}

:root[data-theme="dark"] .course-item[open],
:root[data-theme="dark"] .course-item:hover,
:root[data-theme="dark"] .course-item.is-selected,
:root[data-theme="dark"] .advisor-result,
:root[data-theme="dark"] .atar-results,
:root[data-theme="dark"] .subject-plan-summary,
:root[data-theme="dark"] .entry-snapshot,
:root[data-theme="dark"] .no-required-strip {
  background: var(--surface);
}

:root[data-theme="dark"] .topnav a:hover,
:root[data-theme="dark"] .topnav button:hover,
:root[data-theme="dark"] .clear-btn:hover,
:root[data-theme="dark"] .help-link,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .rank-chip,
:root[data-theme="dark"] .data-chip,
:root[data-theme="dark"] .subject-tag,
:root[data-theme="dark"] .counted-list li,
:root[data-theme="dark"] .result-meter,
:root[data-theme="dark"] .advisor-summary,
:root[data-theme="dark"] .ask-helper-note {
  background: var(--surface-tint);
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .panel-head h2,
:root[data-theme="dark"] .panel-head h3 {
  color: #ffffff;
}

:root[data-theme="dark"] .topnav a,
:root[data-theme="dark"] .topnav button {
  color: #ffffff;
}

:root[data-theme="dark"] .topnav a[aria-current="page"],
:root[data-theme="dark"] .topnav button[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.72);
  background: #ffffff;
  color: #020617;
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.42);
  background: #000000;
  color: #ffffff;
}

:root[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: #070707;
  color: #ffffff;
}

:root[data-theme="dark"] .ask-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

:root[data-theme="dark"] .message.user {
  background: #142b4e;
}

:root[data-theme="dark"] .message.assistant {
  background: #0c1728;
}

:root[data-theme="dark"] .scaling-down,
:root[data-theme="dark"] .warning,
:root[data-theme="dark"] .requirement-must {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

:root[data-theme="dark"] .scaling-up,
:root[data-theme="dark"] .success,
:root[data-theme="dark"] .requirement-open {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(20, 83, 45, 0.24);
  color: #bbf7d0;
}

:root[data-theme="dark"] .scaling-neutral,
:root[data-theme="dark"] .requirement-helpful {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(120, 53, 15, 0.24);
  color: #fde68a;
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .ask-panel,
:root[data-theme="dark"] .pathway-panel,
:root[data-theme="dark"] .top-provider-block,
:root[data-theme="dark"] .income-filter-bar,
:root[data-theme="dark"] .calculator-result,
:root[data-theme="dark"] .subject-plan-summary,
:root[data-theme="dark"] .entry-snapshot {
  border-color: var(--line);
  background: #03050a;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.44);
}

:root[data-theme="dark"] .stats,
:root[data-theme="dark"] .stats div,
:root[data-theme="dark"] .panel-head span,
:root[data-theme="dark"] .course-item,
:root[data-theme="dark"] .course-card,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .pathway-grid a,
:root[data-theme="dark"] .compare-scroll th,
:root[data-theme="dark"] .compare-scroll td,
:root[data-theme="dark"] .counted-list li,
:root[data-theme="dark"] .result-meter,
:root[data-theme="dark"] .income-chip-list article,
:root[data-theme="dark"] .income-outcome-card,
:root[data-theme="dark"] .method-grid article,
:root[data-theme="dark"] .guide-row,
:root[data-theme="dark"] .calc-subject-row,
:root[data-theme="dark"] .subject-course-card,
:root[data-theme="dark"] .subject-course-detail dl div,
:root[data-theme="dark"] .subject-plan-card,
:root[data-theme="dark"] .subject-impact-card,
:root[data-theme="dark"] .entry-rule,
:root[data-theme="dark"] .faq-list details {
  border-color: var(--line);
  background: #05070c;
  color: var(--text);
}

:root[data-theme="dark"] .course-item[open],
:root[data-theme="dark"] .course-item:hover,
:root[data-theme="dark"] .course-item.is-selected,
:root[data-theme="dark"] .course-item[open] > summary,
:root[data-theme="dark"] .subject-course-card[open] summary,
:root[data-theme="dark"] .advisor-result,
:root[data-theme="dark"] .atar-results,
:root[data-theme="dark"] .ask-suggestions button:hover,
:root[data-theme="dark"] .icon-button:hover,
:root[data-theme="dark"] .quick-actions button[aria-pressed="true"],
:root[data-theme="dark"] .income-filter-bar button[aria-pressed="true"],
:root[data-theme="dark"] .chip,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .rank-chip,
:root[data-theme="dark"] .data-chip,
:root[data-theme="dark"] .subject-tag {
  border-color: rgba(59, 130, 246, 0.5);
  background: var(--accent-soft);
  color: #dbeafe;
}

:root[data-theme="dark"] .search-form label,
:root[data-theme="dark"] .filters label,
:root[data-theme="dark"] .atar-inputs label,
:root[data-theme="dark"] .advisor-form label,
:root[data-theme="dark"] .guide-controls label,
:root[data-theme="dark"] .subject-search-form label,
:root[data-theme="dark"] .chat-form input,
:root[data-theme="dark"] .ask-form input,
:root[data-theme="dark"] .subject-box,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line);
  background: #02040a;
  color: var(--text);
}

:root[data-theme="dark"] .search-form button,
:root[data-theme="dark"] .match-btn,
:root[data-theme="dark"] .actions a:first-child,
:root[data-theme="dark"] .chat-form button,
:root[data-theme="dark"] .ask-form button,
:root[data-theme="dark"] .help-link {
  border-color: #ffffff;
  background: #ffffff;
  color: #020617;
  box-shadow: 0 12px 26px rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .search-form button:hover,
:root[data-theme="dark"] .match-btn:hover,
:root[data-theme="dark"] .actions a:first-child:hover,
:root[data-theme="dark"] .chat-form button:hover,
:root[data-theme="dark"] .ask-form button:hover,
:root[data-theme="dark"] .help-link:hover {
  border-color: #f8fbff;
  background: #f3f4f6;
  color: #020617;
}

:root[data-theme="dark"] .load-more,
:root[data-theme="dark"] .actions a,
:root[data-theme="dark"] .actions button,
:root[data-theme="dark"] .quick-actions button,
:root[data-theme="dark"] .clear-btn,
:root[data-theme="dark"] .compare-scroll button,
:root[data-theme="dark"] .ask-suggestions button,
:root[data-theme="dark"] .ask-resources a,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .income-filter-bar button {
  border-color: var(--line);
  background: #05070c;
  color: var(--text);
}

:root[data-theme="dark"] .app-progress-track,
:root[data-theme="dark"] .process-strip {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(7, 21, 38, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .app-progress-track::before,
:root[data-theme="dark"] .process-strip::before {
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-dark), transparent);
}

:root[data-theme="dark"] .ai-status {
  border-color: #1e3a8a;
  background: #071526;
  color: #bfdbfe;
}

:root[data-theme="dark"] .ai-status.on {
  border-color: #14532d;
  background: #052e1a;
  color: #bbf7d0;
}

:root[data-theme="dark"] .ai-status.off {
  border-color: #7c2d12;
  background: #271004;
  color: #fed7aa;
}

:root[data-theme="dark"] .ai-status.error {
  border-color: #7f1d1d;
  background: #2a0b0b;
  color: #fecaca;
}

:root[data-theme="dark"] .ask-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

:root[data-theme="dark"] .ask-message,
:root[data-theme="dark"] .chat-message {
  border-color: var(--line);
  background: #060912;
  color: var(--text);
}

:root[data-theme="dark"] .ask-message.user,
:root[data-theme="dark"] .chat-message.user {
  border-color: #1e3a8a;
  background: #071526;
}

:root[data-theme="dark"] .ask-message.pending,
:root[data-theme="dark"] .chat-message.pending {
  background: linear-gradient(90deg, #05070c, #0b1f47, #05070c);
}

:root[data-theme="dark"] .ask-message p,
:root[data-theme="dark"] .chat-message p,
:root[data-theme="dark"] .course-summary small,
:root[data-theme="dark"] .course-summary .distance-preview,
:root[data-theme="dark"] .provider-card small,
:root[data-theme="dark"] .top-provider-card small,
:root[data-theme="dark"] .income-chip-list span,
:root[data-theme="dark"] .pathway-grid small,
:root[data-theme="dark"] .distance-note,
:root[data-theme="dark"] .faq-list p {
  color: var(--muted);
}

:root[data-theme="dark"] .distance-note {
  border-color: var(--line);
  background: #071526;
}

:root[data-theme="dark"] .term,
:root[data-theme="dark"] .course-item > summary::after,
:root[data-theme="dark"] .subject-course-card summary em,
:root[data-theme="dark"] a {
  color: #93c5fd;
}

:root[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.42);
  background: #000000;
  color: #ffffff;
}

:root[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: #070707;
  color: #ffffff;
}

:root[data-theme="dark"] select {
  color-scheme: dark;
  background-color: #02040a;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23dbeafe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

:root[data-theme="dark"] .saved-empty a,
:root[data-theme="dark"] .subject-search-form button,
:root[data-theme="dark"] .quick-subject-searches button,
:root[data-theme="dark"] .subject-empty-examples button,
:root[data-theme="dark"] .row-remove {
  border-color: #1e3a8a;
  background: #071526;
  color: #dbeafe;
}

:root[data-theme="dark"] .saved-empty a:hover,
:root[data-theme="dark"] .subject-search-form button:hover,
:root[data-theme="dark"] .quick-subject-searches button:hover,
:root[data-theme="dark"] .subject-empty-examples button:hover,
:root[data-theme="dark"] .row-remove:hover {
  border-color: #3157b7;
  background: #0b1f47;
  color: #f8fbff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .course-item img,
:root[data-theme="dark"] .provider-card img,
:root[data-theme="dark"] .top-provider-card img {
  box-sizing: border-box;
  filter: invert(1) hue-rotate(180deg) saturate(1.05) brightness(1.1);
  opacity: 0.96;
}

:root[data-theme="dark"] .atar-main-card,
:root[data-theme="dark"] .atar-focus-card,
:root[data-theme="dark"] .atar-context-card,
:root[data-theme="dark"] .atar-smart-card,
:root[data-theme="dark"] .atar-what-if-strip,
:root[data-theme="dark"] .atar-what-if-strip div,
:root[data-theme="dark"] .result-top div,
:root[data-theme="dark"] .aggregate-meter,
:root[data-theme="dark"] .subject-impact-card,
:root[data-theme="dark"] .subject-suggestions,
:root[data-theme="dark"] .subject-suggestion,
:root[data-theme="dark"] .subject-suggestion-empty,
:root[data-theme="dark"] .missing-baseline-note,
:root[data-theme="dark"] .subject-confidence,
:root[data-theme="dark"] .entry-snapshot article,
:root[data-theme="dark"] .subject-card,
:root[data-theme="dark"] .requirement-signal-grid article,
:root[data-theme="dark"] .subject-advice-grid article,
:root[data-theme="dark"] .no-required-strip,
:root[data-theme="dark"] .subject-search-form label:first-child {
  border-color: var(--line);
  background: #05070c;
  color: var(--text);
}

:root[data-theme="dark"] .atar-smart-card.primary {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), #05070c);
}

:root[data-theme="dark"] .atar-smart-card span,
:root[data-theme="dark"] .atar-what-if-strip > span,
:root[data-theme="dark"] .atar-what-if-strip strong {
  color: #ffffff;
}

:root[data-theme="dark"] .atar-what-if-strip div {
  background: #071526;
}

:root[data-theme="dark"] .entry-snapshot article.has-required,
:root[data-theme="dark"] .subject-card.required {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.16);
}

:root[data-theme="dark"] .entry-snapshot article.no-required,
:root[data-theme="dark"] .no-required-strip {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.16);
}

:root[data-theme="dark"] .subject-card.required em,
:root[data-theme="dark"] .subject-impact-card.scale-down .subject-impact-title span {
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

:root[data-theme="dark"] .subject-impact-card.scale-neutral .subject-impact-title span,
:root[data-theme="dark"] .subject-impact-meta span,
:root[data-theme="dark"] .row-breakdown span,
:root[data-theme="dark"] .subject-suggestion em {
  border-color: var(--line);
  background: #071526;
  color: #dbeafe;
}

:root[data-theme="dark"] .subject-suggestion:hover,
:root[data-theme="dark"] .subject-suggestion:focus,
:root[data-theme="dark"] .subject-impact-card:hover,
:root[data-theme="dark"] .subject-card:hover,
:root[data-theme="dark"] .requirement-signal-grid article:hover,
:root[data-theme="dark"] .subject-advice-grid article:hover {
  border-color: #3157b7;
  background: #071526;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .atar-main-card span,
:root[data-theme="dark"] .atar-focus-card > span,
:root[data-theme="dark"] .atar-context-card span,
:root[data-theme="dark"] .atar-main-card p,
:root[data-theme="dark"] .atar-focus-card p,
:root[data-theme="dark"] .atar-context-card p,
:root[data-theme="dark"] .focus-groups em,
:root[data-theme="dark"] .entry-snapshot p,
:root[data-theme="dark"] .entry-rule p,
:root[data-theme="dark"] .subject-confidence span,
:root[data-theme="dark"] .subject-card p,
:root[data-theme="dark"] .subject-card small,
:root[data-theme="dark"] .subject-card span,
:root[data-theme="dark"] .subject-advice-grid article p,
:root[data-theme="dark"] .requirement-signal-grid small,
:root[data-theme="dark"] .missing-baseline-note {
  color: var(--muted);
}

:root[data-theme="dark"] .atar-main-card strong,
:root[data-theme="dark"] .atar-focus-card > strong,
:root[data-theme="dark"] .atar-context-card strong,
:root[data-theme="dark"] .focus-groups b,
:root[data-theme="dark"] .subject-impact-title strong,
:root[data-theme="dark"] .subject-impact-meta strong,
:root[data-theme="dark"] .entry-snapshot strong,
:root[data-theme="dark"] .entry-rule strong,
:root[data-theme="dark"] .subject-confidence strong,
:root[data-theme="dark"] .subject-card strong,
:root[data-theme="dark"] .subject-advice-grid article strong {
  color: var(--text);
}

.topnav a:hover,
.topnav button:hover,
.help-link:hover,
.advisor-summary:hover,
.chat-box:hover,
.advisor-picks article:hover,
.course-item:hover,
.saved-empty a:hover,
.top-provider-card:hover,
.provider-card:hover,
.pathway-grid a:hover,
.calc-subject-row:hover,
.calculator-result:hover,
.method-grid article:hover,
.row-remove:hover,
.subject-impact-card:hover,
.subject-search-form button:hover,
.quick-subject-searches button:hover,
.subject-empty-examples button:hover,
.subject-card:hover,
.subject-course-card:hover,
.requirement-signal-grid article:hover,
.subject-advice-grid article:hover,
.theme-toggle:hover {
  transform: none;
}

.hero,
.panel,
.course-item,
.top-provider-card,
.provider-card,
.pathway-grid a,
.advisor-picks article,
.calculator-result,
.calc-subject-row,
.atar-main-card,
.atar-focus-card,
.atar-context-card,
.subject-impact-card,
.subject-plan-panel,
.subject-helper-panel,
.subject-empty,
.subject-card,
.subject-course-card,
.requirement-signal-grid article,
.subject-advice-grid article {
  animation: none;
}

.course-detail,
.subject-course-detail,
.chat-message,
.ask-message {
  animation-duration: 140ms;
}

.chat-message.pending,
.ask-message.pending {
  animation: messageIn 140ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Final Subject Helper structure overrides */
.subject-plan-redesign {
  display: grid;
  gap: 18px;
}

.subject-plan-redesign .subject-plan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  gap: 18px;
  align-items: start;
}

.subject-plan-redesign .subject-plan-hero h2 {
  margin: 4px 0 6px;
}

.subject-plan-redesign .subject-plan-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subject-evidence-badge,
.subject-check-card,
.subject-how-grid article,
.subject-signal-grid article,
.subject-pick-card,
.subject-course-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-evidence-badge {
  justify-self: end;
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 16px;
}

.subject-evidence-badge.good {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), var(--surface));
}

.subject-evidence-badge strong {
  color: var(--accent);
  font-size: 17px;
}

.subject-evidence-badge span,
.subject-pick-head p,
.subject-check-card p,
.subject-how-grid p,
.subject-pick-card p,
.subject-course-row summary small,
.subject-course-detail p {
  color: var(--muted);
  line-height: 1.5;
}

.subject-check-grid,
.subject-how-grid,
.subject-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subject-check-card,
.subject-how-grid article,
.subject-signal-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.subject-check-card.safe {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), var(--surface));
}

.subject-check-card.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--surface));
}

.subject-check-card span,
.subject-prereq-strip strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subject-check-card strong,
.subject-how-grid strong,
.subject-signal-grid strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.subject-check-card p,
.subject-how-grid p {
  margin: 0;
  font-size: 13px;
}

.subject-prereq-strip {
  display: grid;
  grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-prereq-strip.no-required {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.07);
}

.subject-prereq-strip.has-required {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.subject-prereq-strip.no-required strong {
  color: #15803d;
}

.subject-prereq-strip.has-required strong {
  color: #b45309;
}

.subject-prereq-strip span {
  color: var(--muted);
  line-height: 1.5;
}

.subject-pick-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.subject-pick-layout section,
.subject-pick-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.subject-pick-head h3 {
  margin: 0 0 4px;
}

.subject-pick-head p {
  margin: 0;
  font-size: 13px;
}

.subject-pick-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
}

.subject-pick-card.required,
.subject-pick-card.strong {
  border-left: 4px solid var(--accent);
}

.subject-pick-card.useful {
  border-left: 4px solid rgba(37, 99, 235, 0.35);
}

.subject-pick-card > div {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.subject-pick-card h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.25;
}

.subject-pick-card > div span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.subject-pick-card p {
  margin: 0;
}

.subject-pick-card small,
.subject-signal-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.subject-course-evidence .panel-head > span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
}

.subject-course-list {
  display: grid;
  gap: 9px;
  max-height: none;
  overflow: visible;
}

.subject-course-row {
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.subject-course-row[open] {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.subject-course-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.subject-course-row summary::-webkit-details-marker {
  display: none;
}

.subject-course-row summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subject-course-row summary strong {
  color: var(--text);
  line-height: 1.25;
}

.subject-course-row summary em {
  padding: 8px 11px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.subject-course-row summary em.safe {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.subject-course-row summary em.required {
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.subject-course-row summary b {
  color: var(--accent);
  font-size: 13px;
}

.subject-course-detail {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  animation: menuFoldOpen 180ms ease both;
}

.subject-course-detail p {
  margin: 0;
}

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

.subject-course-detail dl > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.subject-course-detail dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-course-detail dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.45;
}

.subject-signals-panel,
.subject-how-panel {
  display: grid;
  gap: 18px;
}

.subject-signal-grid article {
  gap: 4px;
}

@media (max-width: 900px) {
  .subject-plan-redesign .subject-plan-hero,
  .subject-check-grid,
  .subject-pick-layout,
  .subject-how-grid,
  .subject-signal-grid,
  .subject-course-detail dl {
    grid-template-columns: 1fr;
  }

  .subject-evidence-badge {
    justify-self: stretch;
  }

  .subject-prereq-strip,
  .subject-course-row summary {
    grid-template-columns: 1fr;
  }

  .subject-course-row summary em,
  .subject-course-row summary b {
    justify-self: start;
  }
}

/* Subject Helper plan redesign */
.subject-plan-redesign {
  display: grid;
  gap: 18px;
}

.subject-plan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  gap: 18px;
  align-items: start;
}

.subject-plan-hero h2 {
  margin: 4px 0 6px;
}

.subject-plan-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subject-evidence-badge {
  justify-self: end;
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-evidence-badge.good {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), var(--surface));
}

.subject-evidence-badge strong {
  color: var(--accent);
  font-size: 17px;
}

.subject-evidence-badge span {
  color: var(--muted);
  font-size: 13px;
}

.subject-check-grid,
.subject-how-grid,
.subject-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subject-check-card,
.subject-how-grid article,
.subject-signal-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-check-card.safe {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), var(--surface));
}

.subject-check-card.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--surface));
}

.subject-check-card span,
.subject-prereq-strip strong,
.subject-pick-card small,
.subject-signal-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subject-check-card span,
.subject-prereq-strip strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subject-check-card strong,
.subject-how-grid strong,
.subject-signal-grid strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.subject-check-card p,
.subject-how-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.subject-prereq-strip {
  display: grid;
  grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-prereq-strip.no-required {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.07);
}

.subject-prereq-strip.has-required {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.subject-prereq-strip strong {
  color: #15803d;
}

.subject-prereq-strip.has-required strong {
  color: #b45309;
}

.subject-prereq-strip span {
  color: var(--muted);
  line-height: 1.5;
}

.subject-pick-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.subject-pick-layout section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.subject-pick-head h3 {
  margin: 0 0 4px;
}

.subject-pick-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.subject-pick-list {
  display: grid;
  gap: 8px;
}

.subject-pick-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
}

.subject-pick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.subject-pick-card.required,
.subject-pick-card.strong {
  border-left: 4px solid var(--accent);
}

.subject-pick-card.useful {
  border-left: 4px solid rgba(37, 99, 235, 0.35);
}

.subject-pick-card > div {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.subject-pick-card h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.25;
}

.subject-pick-card > div span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.subject-pick-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.subject-course-evidence .panel-head > span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
}

.subject-course-list {
  max-height: none;
  overflow: visible;
}

.subject-course-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.subject-course-row + .subject-course-row {
  margin-top: 9px;
}

.subject-course-row[open] {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.subject-course-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.subject-course-row summary::-webkit-details-marker {
  display: none;
}

.subject-course-row summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subject-course-row summary strong {
  color: var(--text);
  line-height: 1.25;
}

.subject-course-row summary small {
  color: var(--muted);
}

.subject-course-row summary em {
  padding: 8px 11px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.subject-course-row summary em.safe {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.subject-course-row summary em.required {
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.subject-course-row summary b {
  color: var(--accent);
  font-size: 13px;
}

.subject-course-detail {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  animation: menuFoldOpen 180ms ease both;
}

.subject-course-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.subject-course-detail dl > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.subject-course-detail dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-course-detail dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.45;
}

.subject-signals-panel,
.subject-how-panel {
  display: grid;
  gap: 18px;
}

.subject-signal-grid article {
  gap: 4px;
}

.subject-signal-grid span {
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

:root[data-theme="dark"] .subject-evidence-badge.good,
:root[data-theme="dark"] .subject-check-card.safe,
:root[data-theme="dark"] .subject-prereq-strip.no-required,
:root[data-theme="dark"] .subject-detection.creative {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.72));
}

:root[data-theme="dark"] .subject-check-card.warning,
:root[data-theme="dark"] .subject-prereq-strip.has-required {
  background: rgba(245, 158, 11, 0.1);
}

@media (max-width: 900px) {
  .subject-plan-hero,
  .subject-check-grid,
  .subject-pick-layout,
  .subject-how-grid,
  .subject-signal-grid,
  .subject-course-detail dl {
    grid-template-columns: 1fr;
  }

  .subject-evidence-badge {
    justify-self: stretch;
  }

  .subject-prereq-strip,
  .subject-course-row summary {
    grid-template-columns: 1fr;
  }

  .subject-course-row summary em,
  .subject-course-row summary b {
    justify-self: start;
  }
}

html {
  scroll-behavior: smooth;
}

.panel,
.course-item,
.guide-direction-deck,
.guide-plan-section,
.subject-plan-card,
.subject-course-card,
.subject-pathway-grid article,
.subject-career-grid article {
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.panel {
  animation: pageSectionIn 180ms ease both;
}

@keyframes pageSectionIn {
  from { opacity: 0.84; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.subject-detection {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.subject-confidence {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.subject-confidence i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.subject-confidence b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.subject-plan-summary {
  display: grid;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 0;
}

.subject-plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.subject-plan-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-plan-card h3,
.subject-plan-card p {
  margin: 0;
}

.subject-plan-card p {
  color: var(--muted);
  line-height: 1.45;
}

.subject-reason-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subject-reason-list li {
  display: grid;
  gap: 4px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.subject-reason-list strong,
.subject-reason-list span {
  display: block;
}

.subject-reason-list strong {
  line-height: 1.2;
}

.subject-reason-list span {
  color: var(--muted);
  line-height: 1.45;
}

.subject-course-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.subject-course-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.9fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.subject-course-card h3,
.subject-course-card p {
  margin: 0;
}

.subject-course-card > div:first-child {
  display: grid;
  align-content: start;
  gap: 8px;
}

.subject-course-card > div:first-child span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-course-card p,
.subject-course-card dd {
  color: var(--muted);
  line-height: 1.45;
}

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

.subject-course-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-course-card dd {
  margin: 2px 0 0;
}

.subject-course-card .help-link {
  justify-self: start;
}

.subject-detection.creative {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.95));
}

.guide-direction-option {
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.guide-direction-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.14);
}

.guide-direction-option[aria-pressed="true"] {
  animation: cardPick 260ms ease both;
}

@keyframes cardPick {
  0% { transform: scale(1); }
  55% { transform: scale(0.985) translateY(2px); }
  100% { transform: scale(1); }
}

.guide-direction-deck {
  animation: deckSlideIn 260ms ease both;
}

@keyframes deckSlideIn {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.guide-direction-deck.is-folded {
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
}

.guide-deck-fold {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 86px;
}

.guide-deck-fold i {
  position: absolute;
  width: 180px;
  height: 62px;
  border: 1px solid color-mix(in srgb, var(--accent-dark) 48%, var(--line));
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.18);
  transform-origin: left center;
}

.guide-deck-fold i:nth-child(1) { transform: translateX(8px) rotate(-6deg); }
.guide-deck-fold i:nth-child(2) { transform: translateX(26px) rotate(0deg); }
.guide-deck-fold i:nth-child(3) { transform: translateX(44px) rotate(6deg); }

.guide-deck-fold button {
  margin-left: auto;
  z-index: 1;
}

.guide-section-body {
  animation: menuFoldOpen 220ms ease both;
}

@keyframes menuFoldOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide-drop-advice {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.92));
}

.guide-drop-advice span {
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.course-item:hover,
.subject-plan-card:hover,
.subject-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

[data-save-course][aria-pressed="true"],
[data-compare-course][aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.compare-box {
  animation: pageSectionIn 180ms ease both;
}

#atar input[type="range"] {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #93c5fd);
  accent-color: var(--accent);
}

#atar .match-btn,
#atar .pill-link {
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
}

#atar .course-item summary {
  align-items: center;
}

#atar .course-item[open] {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
}

@media (max-width: 760px) {
  .subject-detection,
  .subject-course-card {
    grid-template-columns: 1fr;
  }

  .subject-confidence {
    min-width: 0;
  }

  .subject-course-card dl {
    grid-template-columns: 1fr;
  }
}

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

  .panel,
  .guide-direction-deck,
  .guide-section-body,
  .guide-direction-option[aria-pressed="true"],
  .compare-box {
    animation: none !important;
  }

  .subject-process-bar span {
    animation: none !important;
    transform: none;
  }
}

/* Year-aware Subject Helper */
.helper-year-panel,
.year10-setup-panel,
.direction-deck-panel,
.senior-subject-panel,
.eligibility-summary,
.course-eligibility-panel,
.year10-result-panel {
  animation: fadeUp 260ms var(--ease-out) both;
}

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

.helper-year-options button {
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.helper-year-options button:hover {
  transform: translateY(-2px);
  border-color: #9dbcf4;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.helper-year-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.helper-year-options strong,
.helper-year-options span {
  display: block;
}

.helper-year-options strong {
  margin-bottom: 5px;
  font-size: 15px;
}

.helper-year-options span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.year10-input-grid label,
.senior-subject-add label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.year10-input-grid label > span,
.senior-subject-add label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.year10-input-grid input,
.year10-input-grid select,
.senior-subject-add input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.year10-input-grid input:focus,
.year10-input-grid select:focus,
.senior-subject-add input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

.direction-deck-panel {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.035) 25%, transparent 25%) 0 0 / 28px 28px,
    var(--surface);
}

.direction-deck-head,
.year10-result-head,
.eligibility-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.direction-deck-head > div {
  max-width: 760px;
}

.direction-deck-head span,
.year10-result-head > div > span,
.year10-drop-card > span,
.year10-plan-section > div > span,
.eligibility-title > span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.direction-deck-head h2,
.year10-result-head h2,
.eligibility-title h2 {
  margin-bottom: 7px;
}

.direction-deck-head p,
.year10-result-head p,
.eligibility-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.direction-deck-head > strong {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 13px;
}

.direction-progress {
  height: 7px;
  margin: 17px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8fa;
}

.direction-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 380ms var(--ease-out);
}

.direction-round {
  transition: opacity 220ms ease, transform 300ms var(--ease-out);
}

.direction-round.is-leaving {
  opacity: 0;
  transform: translateX(-36px);
}

.direction-question {
  max-width: 750px;
  margin: 0 auto 18px;
  text-align: center;
}

.direction-question span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.direction-question h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.2;
}

.direction-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(880px, 100%);
  margin: 0 auto;
}

.direction-choice-card {
  display: grid;
  min-height: 286px;
  align-content: space-between;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #c8daf7;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 15px 34px rgba(26, 75, 150, 0.1);
  transition: transform 220ms var(--ease-out), border-color 220ms ease, box-shadow 220ms ease;
}

.direction-choice-card:hover,
.direction-choice-card:focus-visible {
  transform: translateY(-5px);
  border-color: #75a1ef;
  box-shadow: 0 23px 44px rgba(30, 85, 170, 0.16);
  outline: none;
}

.direction-choice-card.is-selected {
  transform: translateY(-5px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.2);
}

.direction-card-art {
  display: grid;
  min-height: 120px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
}

.direction-card-art svg {
  width: 52px;
  height: 52px;
}

.direction-card-copy {
  display: block;
  padding: 17px 5px 3px;
}

.direction-card-copy small,
.direction-card-copy strong {
  display: block;
}

.direction-card-copy small {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.direction-card-copy strong {
  margin-bottom: 7px;
  font-size: 20px;
  line-height: 1.25;
}

.direction-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.48;
}

.direction-unsure {
  display: block;
  margin: 16px auto 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.direction-unsure:hover {
  transform: translateY(-1px);
  border-color: #9dbcf4;
  color: var(--accent);
}

.direction-deck-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.direction-deck-actions > span {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.direction-deck-actions .match-btn:disabled {
  background: #afbdd2;
  cursor: not-allowed;
  box-shadow: none;
}

.direction-complete {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.direction-complete-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

.direction-complete-mark svg {
  width: 27px;
  height: 27px;
}

.direction-complete span {
  color: #15803d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.direction-complete h2,
.direction-complete p {
  margin: 3px 0 0;
}

.direction-complete p {
  color: var(--muted);
}

.direction-locked-state {
  display: grid;
  min-height: 170px;
  place-items: center;
  text-align: center;
}

.direction-locked-state > div {
  max-width: 700px;
}

.direction-locked-state span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.direction-locked-state h2 {
  margin: 6px 0;
}

.direction-locked-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.senior-subject-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.senior-subject-add button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.senior-subject-add button:disabled {
  background: #afbdd2;
  cursor: not-allowed;
}

.subject-check-message {
  margin: 10px 0 0;
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
}

.selected-subject-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.selected-subject-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  animation: revealSoft 230ms var(--ease-out) both;
}

.selected-subject-row > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.selected-subject-row strong,
.selected-subject-row small {
  display: block;
}

.selected-subject-row small {
  margin-top: 3px;
  color: var(--muted);
}

.senior-check-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.senior-check-actions strong,
.senior-check-actions span {
  display: block;
}

.senior-check-actions span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.eligibility-summary {
  border-left: 4px solid var(--line);
}

.eligibility-summary.good {
  border-left-color: #16a34a;
}

.eligibility-summary.warning {
  border-left-color: #dc2626;
}

.eligibility-title {
  display: block;
}

.eligibility-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.eligibility-metrics article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.eligibility-metrics article.pass {
  border-color: #bbf7d0;
}

.eligibility-metrics article.fail {
  border-color: #fecaca;
}

.eligibility-metrics span,
.eligibility-metrics strong,
.eligibility-metrics small {
  display: block;
}

.eligibility-metrics span,
.eligibility-metrics small {
  color: var(--muted);
  font-size: 12px;
}

.eligibility-metrics strong {
  margin: 5px 0;
  font-size: 20px;
}

.eligibility-fixes {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fffafa;
}

.eligibility-fixes > strong {
  display: block;
  margin-bottom: 7px;
}

.eligibility-fixes p {
  display: grid;
  grid-template-columns: minmax(170px, .45fr) minmax(0, 1fr);
  gap: 12px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.eligibility-fixes p span {
  color: var(--ink);
  font-weight: 800;
}

.eligibility-source-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.course-eligibility-groups {
  display: grid;
  gap: 10px;
}

.course-eligibility-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.course-eligibility-group.blocked {
  border-color: #fecaca;
}

.course-eligibility-group.check {
  border-color: #fed7aa;
}

.course-eligibility-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.course-eligibility-group summary::-webkit-details-marker {
  display: none;
}

.course-eligibility-group summary strong,
.course-eligibility-group summary span {
  display: block;
}

.course-eligibility-group summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.course-eligibility-group summary em {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.course-eligibility-group[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.course-eligibility-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.course-eligibility-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.course-eligibility-item.blocked {
  border-color: #fecaca;
  background: #fffafa;
}

.course-eligibility-item.check {
  border-color: #fed7aa;
  background: #fffaf5;
}

.course-eligibility-item strong,
.course-eligibility-item span {
  display: block;
}

.course-eligibility-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.course-eligibility-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.course-eligibility-item p b {
  color: var(--ink);
}

.year10-result-head {
  align-items: stretch;
}

.year10-result-head > div:first-child {
  max-width: 760px;
}

.year10-atar-target {
  flex: 0 0 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.year10-atar-target span,
.year10-atar-target strong,
.year10-atar-target small {
  display: block;
}

.year10-atar-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.year10-atar-target strong {
  margin: 5px 0;
  color: var(--accent);
  font-size: 27px;
}

.year10-atar-target small {
  color: var(--muted);
  line-height: 1.4;
}

.year10-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 13px;
  margin-top: 16px;
}

.year10-plan-section,
.year10-drop-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.year10-plan-section h3 {
  margin: 0 0 4px;
}

.year10-plan-section > div > p,
.year10-drop-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.year10-subject-grid article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  animation: revealSoft 260ms var(--ease-out) both;
  animation-delay: var(--item-delay);
}

.year10-subject-grid article.required {
  border-color: #fecaca;
}

.year10-subject-grid span,
.year10-subject-grid strong,
.year10-subject-grid small {
  display: block;
}

.year10-subject-grid span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.year10-subject-grid strong {
  margin: 4px 0;
}

.year10-subject-grid p,
.year10-subject-grid small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.year10-subject-grid small {
  margin-top: 7px;
  font-weight: 800;
}

.year10-extension-note {
  margin: 10px 0 0 !important;
  padding: 10px 11px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.year10-drop-card {
  border-color: #bfdbfe;
  background: var(--accent-soft);
}

.year10-drop-card > strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
}

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

.year10-career-grid article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.year10-career-grid strong,
.year10-career-grid span {
  display: block;
}

.year10-career-grid span {
  margin: 5px 0;
  color: var(--accent);
  font-weight: 900;
}

.year10-career-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.year10-next-steps article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.year10-next-steps article > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.year10-next-steps p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

:root[data-theme="dark"] .helper-year-options button,
:root[data-theme="dark"] .year10-input-grid input,
:root[data-theme="dark"] .year10-input-grid select,
:root[data-theme="dark"] .senior-subject-add input,
:root[data-theme="dark"] .direction-deck-head > strong,
:root[data-theme="dark"] .direction-choice-card,
:root[data-theme="dark"] .direction-unsure,
:root[data-theme="dark"] .selected-subject-row,
:root[data-theme="dark"] .eligibility-metrics article,
:root[data-theme="dark"] .course-eligibility-group,
:root[data-theme="dark"] .course-eligibility-item,
:root[data-theme="dark"] .year10-atar-target,
:root[data-theme="dark"] .year10-plan-section,
:root[data-theme="dark"] .year10-subject-grid article,
:root[data-theme="dark"] .year10-career-grid article,
:root[data-theme="dark"] .year10-next-steps article {
  background: var(--panel);
  color: var(--ink);
}

:root[data-theme="dark"] .direction-deck-panel {
  background: var(--surface);
}

:root[data-theme="dark"] .helper-year-options button[aria-pressed="true"],
:root[data-theme="dark"] .year10-drop-card {
  background: #132b52;
}

:root[data-theme="dark"] .eligibility-fixes,
:root[data-theme="dark"] .course-eligibility-item.blocked {
  background: #30191c;
}

:root[data-theme="dark"] .course-eligibility-item.check {
  background: #302319;
}

@media (max-width: 820px) {
  .year10-input-grid,
  .eligibility-metrics,
  .year10-career-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .year10-plan-grid {
    grid-template-columns: 1fr;
  }

  .year10-drop-card {
    order: -1;
  }
}

@media (max-width: 620px) {
  .helper-year-options,
  .year10-input-grid,
  .direction-choice-grid,
  .eligibility-metrics,
  .year10-subject-grid,
  .year10-career-grid,
  .year10-next-steps {
    grid-template-columns: 1fr;
  }

  .helper-year-options button {
    min-height: 70px;
  }

  .direction-choice-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 164px;
    align-items: center;
    padding: 12px;
  }

  .direction-card-art {
    min-height: 138px;
  }

  .direction-card-copy {
    padding: 0 0 0 13px;
  }

  .direction-card-copy strong {
    font-size: 17px;
  }

  .direction-deck-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .direction-deck-actions .match-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .direction-complete,
  .senior-subject-add,
  .selected-subject-row,
  .senior-check-actions {
    grid-template-columns: 1fr;
  }

  .year10-result-head {
    flex-direction: column;
  }

  .direction-complete {
    text-align: center;
  }

  .direction-complete-mark {
    margin: 0 auto;
  }

  .senior-check-actions {
    display: grid;
  }

  .senior-check-actions .match-btn {
    width: 100%;
  }

  .selected-subject-row {
    display: grid;
  }

  .selected-subject-row > span {
    display: none;
  }

  .eligibility-fixes p {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .year10-atar-target {
    width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 980px) {
  .hero,
  .filters,
  .atar-controls,
  .top-provider-head,
  .advisor-form,
  .calculator-layout,
  .calc-subject-row,
  .guide-controls,
  .method-grid,
  .subject-search-form,
  .subject-empty,
  .entry-snapshot,
  .subject-plan-grid.no-required-board,
  .subject-plan-grid,
  .subject-course-detail dl,
  .requirement-signal-grid,
  .subject-advice-grid {
    grid-template-columns: 1fr;
  }

  .calculator-result {
    grid-template-columns: 1fr;
  }

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

  .atar-smart-planner,
  .atar-what-if-strip {
    grid-template-columns: 1fr;
  }

  .result-metrics,
  .counted-list {
    grid-column: 1;
  }

  .counted-list {
    grid-row: auto;
  }

  .course-list.compact,
  .top-provider-grid,
  .provider-grid,
  .pathway-grid,
  .income-chip-list,
  .advisor-picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-plan-summary {
    flex-direction: column;
  }

  .subject-confidence {
    width: 100%;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 172px;
  }

  main > section[id],
  .panel[id],
  .hero[id] {
    scroll-margin-top: 184px;
  }

  .topbar {
    position: sticky;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    min-height: 0;
    padding: 10px 12px 9px;
  }

  .topbar-actions {
    position: absolute;
    top: 10px;
    right: 12px;
    margin-left: 0;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    padding: 0;
    overflow: visible;
    mask-image: none;
    scroll-snap-type: none;
  }

  .topnav a,
  .topnav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 6px;
    text-align: center;
    white-space: normal;
    font-size: 12px;
    line-height: 1.15;
    scroll-snap-align: none;
  }

  .brand {
    min-height: 40px;
    min-width: 0;
    padding-right: 48px;
    font-size: 16px;
  }

  .site-logo {
    width: 32px;
    height: 32px;
  }

  .app-progress {
    top: 154px;
    padding: 0 10px;
  }

  .app-progress-track {
    width: 100%;
  }

  main {
    width: min(100% - 18px, 1120px);
  }

  .hero {
    gap: 14px;
    padding: 22px 0 14px;
  }

  h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .hero p,
  .panel-head p,
  .empty-note,
  .data-note {
    font-size: 14px;
    line-height: 1.5;
  }

  .stats div {
    padding: 11px;
  }

  .stats dd {
    font-size: 17px;
  }

  .hero,
  .panel,
  .course-item,
  .course-detail,
  .top-provider-card,
  .provider-card,
  .advisor-picks article,
  .chat-message,
  .calculator-result,
  .calc-subject-row,
  .subject-impact-card,
  .subject-plan-panel,
  .subject-helper-panel,
  .subject-empty,
  .subject-card,
  .subject-course-card,
  .subject-course-detail {
    animation: none;
  }

  .stats,
  .search-form,
  .course-item > summary,
  .course-detail dl,
  .atar-inputs,
  .result-top,
  .guide-row,
  .course-list.compact,
  .top-provider-grid,
    .provider-grid,
    .income-chip-list,
    .pathway-grid,
    .advisor-picks,
    .chat-form,
    .ask-form,
    .subject-search-form,
    .subject-empty,
    .entry-snapshot,
    .subject-plan-grid.no-required-board,
    .subject-plan-grid,
    .subject-course-detail dl,
    .requirement-signal-grid,
    .subject-advice-grid {
    grid-template-columns: 1fr;
  }

  .subject-course-card summary {
    grid-template-columns: 1fr;
  }

  .subject-impact-head,
  .subject-impact-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .subject-impact-title span {
    width: fit-content;
  }

  .no-required-strip {
    align-items: start;
    flex-direction: column;
  }

  .course-entry-status,
  .subject-course-card summary em {
    justify-self: start;
  }

  .panel {
    margin: 14px 0 22px;
    padding: 14px;
    scroll-margin-top: 172px;
  }

  .panel-head {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .panel-head span {
    width: fit-content;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .help-link {
    min-height: 42px;
  }

  .search-form {
    gap: 8px;
  }

  .search-form label {
    min-height: 48px;
    padding: 0 12px;
  }

  .search-form button,
  .match-btn,
  .load-more,
  .clear-btn {
    width: 100%;
    min-height: 46px;
  }

  .filters,
  .atar-controls {
    gap: 9px;
    margin-bottom: 14px;
  }

  .filters label,
  .atar-controls label,
  .top-provider-head label,
  .advisor-form label,
  .subject-search-form label,
  .guide-controls label {
    min-width: 0;
  }

  select,
  input[type="number"],
  .filters input[type="text"],
  .advisor-form input,
  .advisor-form select,
  .chat-form input,
  .calc-subject-row input,
  .calc-subject-row select,
  .guide-controls input,
  .guide-controls select,
  .subject-search-form input,
  .subject-search-form select {
    min-height: 46px;
  }

  .income-filter-bar {
    gap: 7px;
    padding: 9px;
  }

  .income-filter-bar span,
  .income-filter-bar small {
    flex-basis: 100%;
  }

  .income-filter-bar button {
    min-height: 40px;
    padding: 0 12px;
  }

  .course-item > summary::after {
    grid-column: 1;
    justify-self: start;
  }

  .course-item > summary {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .course-item img {
    width: 58px;
    height: 36px;
  }

  .course-summary {
    min-width: 0;
  }

  .course-summary strong,
  .course-summary small,
  .course-summary em,
  .income-preview {
    overflow-wrap: anywhere;
  }

  .quick-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    width: 100%;
  }

  .quick-actions button {
    flex: 1 1 128px;
    min-height: 42px;
  }

  .course-detail {
    padding: 0 12px 12px;
  }

  .compare-scroll {
    margin-inline: -2px;
    -webkit-overflow-scrolling: touch;
  }

  .compare-scroll table {
    min-width: 640px;
  }

  .calc-toolbar {
    gap: 8px;
  }

  .calc-toolbar button {
    min-height: 44px;
  }

  .calc-subject-row {
    gap: 9px;
    padding: 12px;
  }

  .row-breakdown {
    min-height: 0;
  }

  .row-breakdown span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .row-remove {
    width: 100%;
    min-height: 44px;
  }

  .subject-suggestions {
    width: calc(100vw - 42px);
    max-height: 260px;
  }

  .atar-simple-summary {
    gap: 10px;
  }

  .atar-main-card,
  .atar-focus-card,
  .atar-context-card,
  .subject-impact-card {
    padding: 13px;
  }

  .subject-search-form {
    gap: 9px;
  }

  .subject-search-form button,
  .quick-subject-searches button,
  .subject-empty-examples button {
    min-height: 44px;
  }

  .quick-subject-searches,
  .subject-empty-examples {
    gap: 7px;
  }

  .quick-subject-searches button,
  .subject-empty-examples button {
    flex: 1 1 142px;
  }

  .subject-course-card summary {
    gap: 10px;
    padding: 12px;
  }

  .course-entry-status {
    white-space: normal;
  }

  .chat-form {
    gap: 8px;
  }

  .chat-form button {
    width: 100%;
    min-height: 46px;
  }

  .ask-panel {
    width: 100%;
    padding: 14px;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 14.5px;
  }

  .topbar {
    padding-inline: 10px;
  }

  .brand span {
    max-width: 236px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  main {
    width: min(100% - 16px, 1120px);
  }

  h1 {
    font-size: 28px;
  }

  .hero {
    padding-top: 18px;
  }

  .panel {
    padding: 12px;
  }

  .course-item > summary {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .course-item img {
    width: 50px;
  }

  .advisor-summary,
  .chat-box,
  .advisor-picks article,
  .subject-card,
  .entry-snapshot article,
  .entry-rule,
  .calculator-result {
    padding: 12px;
  }
}

@keyframes microReveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuReveal {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.topnav a,
.topnav button,
.match-btn,
.secondary-btn,
.clear-btn,
.load-more,
.actions a,
.actions button,
.quick-actions button,
.income-filter-bar button,
.subject-search-form button,
.quick-subject-searches button,
.subject-empty-examples button,
.chat-form button,
.ask-form button,
.row-remove,
.theme-toggle {
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.course-item,
.top-provider-card,
.provider-card,
.pathway-grid a,
.advisor-summary,
.chat-box,
.advisor-picks article,
.calc-subject-row,
.calculator-result,
.method-grid article,
.subject-impact-card,
.subject-card,
.subject-course-card,
.requirement-signal-grid article,
.subject-advice-grid article,
.faq-list details,
.entry-snapshot article,
.entry-rule {
  transition:
    transform 190ms var(--ease-out),
    border-color 190ms ease,
    background 190ms ease,
    box-shadow 190ms ease;
}

.course-item img,
.provider-card img,
.top-provider-card img,
.site-logo,
.theme-toggle svg {
  transition: transform 220ms var(--ease-out), opacity 180ms ease;
}

.topnav a[aria-current="page"],
.topnav button[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.course-item > summary::after,
.subject-course-card summary em,
.course-entry-status,
.row-breakdown span,
.subject-impact-title span,
.quick-actions button,
.income-filter-bar button {
  transition:
    transform 180ms var(--ease-out),
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.course-item[open] .course-detail,
.subject-course-card[open] .subject-course-detail,
.faq-list details[open] p,
.field-more[open] > div,
.advisor-result,
.subject-plan-panel,
.subject-helper-panel {
  animation: microReveal 180ms var(--ease-out) both;
}

.subject-suggestions:not(:empty),
.term:hover::after,
.term:focus::after {
  animation: menuReveal 150ms var(--ease-out) both;
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent);
  content: "+";
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms var(--ease-out), color 180ms ease;
}

.faq-list details[open] summary::after {
  content: "-";
}

.course-item[open] > summary::after {
  transform: translateX(-2px);
}

.subject-course-card[open] summary em {
  transform: translateX(-2px);
}

.search-form label:focus-within,
.advisor-form label:focus-within,
.subject-search-form label:focus-within,
.calc-subject-row:focus-within,
.guide-controls label:focus-within {
  transform: translateY(-1px);
}

.match-btn:active,
.clear-btn:active,
.load-more:active,
.actions a:active,
.actions button:active,
.quick-actions button:active,
.income-filter-bar button:active,
.subject-search-form button:active,
.quick-subject-searches button:active,
.subject-empty-examples button:active,
.chat-form button:active,
.ask-form button:active,
.row-remove:active,
.theme-toggle:active {
  transform: scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  .topnav a:hover,
  .topnav button:hover,
  .help-link:hover,
  .match-btn:hover,
  .clear-btn:hover,
  .load-more:hover,
  .actions a:hover,
  .actions button:hover,
  .quick-actions button:hover,
  .income-filter-bar button:hover,
  .subject-search-form button:hover,
  .quick-subject-searches button:hover,
  .subject-empty-examples button:hover,
  .chat-form button:hover,
  .ask-form button:hover,
  .row-remove:hover,
  .theme-toggle:hover {
    transform: translateY(-1px);
  }

  .course-item:hover,
  .top-provider-card:hover,
  .provider-card:hover,
  .pathway-grid a:hover,
  .advisor-summary:hover,
  .chat-box:hover,
  .advisor-picks article:hover,
  .calc-subject-row:hover,
  .calculator-result:hover,
  .method-grid article:hover,
  .subject-impact-card:hover,
  .subject-card:hover,
  .subject-course-card:hover,
  .requirement-signal-grid article:hover,
  .subject-advice-grid article:hover,
  .faq-list details:hover,
  .entry-snapshot article:hover,
  .entry-rule:hover {
    transform: translateY(-2px);
  }

  .course-item:hover img,
  .provider-card:hover img,
  .top-provider-card:hover img,
  .brand:hover .site-logo {
    transform: scale(1.035);
  }

  .match-btn:hover,
  .search-form button:hover,
  .subject-search-form button:hover,
  .quick-subject-searches button:hover,
  .subject-empty-examples button:hover,
  .chat-form button:hover,
  .ask-form button:hover {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
  }
}

@media (max-width: 640px) {
  .course-item[open] .course-detail,
  .subject-course-card[open] .subject-course-detail,
  .faq-list details[open] p,
  .advisor-result,
  .subject-plan-panel,
  .subject-helper-panel {
    animation-duration: 130ms;
  }
}

.guide-main .panel {
  overflow: visible;
}

.guide-hero {
  align-items: center;
}

.guide-panel {
  scroll-margin-top: 108px;
}

.guide-form {
  display: grid;
  gap: 14px;
}

.guide-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.guide-field span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
}

.guide-field input,
.guide-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.guide-field:focus-within input,
.guide-field:focus-within select {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.guide-year-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.guide-year-note strong {
  color: var(--text);
}

.guide-mark-panel,
.guide-optional,
.guide-plan-section,
.guide-estimate-panel,
.guide-true-reward {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-mark-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.guide-mark-head,
.guide-true-reward,
.guide-estimate-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.guide-mark-head h3,
.guide-true-reward h3 {
  margin-bottom: 4px;
}

.guide-mark-head p,
.guide-true-reward p,
.guide-estimate-panel small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-mark-rows {
  display: grid;
  gap: 10px;
}

.guide-mark-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.5fr) minmax(150px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-term-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
  min-width: 0;
}

.guide-term-grid.is-grouped {
  grid-template-columns: 1fr;
  gap: 10px;
}

.guide-term-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.guide-term-group-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.guide-term-group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
  min-width: 0;
}

.guide-term-group-year11 .guide-term-group-grid {
  grid-template-columns: repeat(3, minmax(70px, 1fr));
}

.guide-term-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.guide-term-field span,
.guide-row-summary span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 900;
}

.guide-term-field input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
}

.guide-term-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.guide-row-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-row-summary strong {
  color: var(--accent);
  line-height: 1.1;
}

.guide-row-summary small {
  color: var(--muted);
  line-height: 1.3;
}

.guide-row-remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guide-optional {
  padding: 0;
  overflow: hidden;
}

.guide-optional summary,
.guide-plan-section summary {
  cursor: pointer;
  list-style: none;
}

.guide-optional summary::-webkit-details-marker,
.guide-plan-section summary::-webkit-details-marker {
  display: none;
}

.guide-optional summary {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 900;
}

.guide-optional .guide-field {
  padding: 0 14px 14px;
}

.guide-actions,
.guide-quick,
.guide-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.guide-actions {
  align-items: center;
}

.guide-quick button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 800;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.guide-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.guide-empty h2,
.guide-result-head h2,
.guide-card-head h3,
.guide-plan-card h3 {
  margin-bottom: 6px;
}

.guide-empty p,
.guide-card-head p,
.guide-disclaimer {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.guide-empty-steps {
  display: grid;
  gap: 8px;
  min-width: 230px;
}

.guide-empty-steps span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.guide-result {
  display: grid;
  gap: 18px;
}

.guide-stale-notice {
  display: none;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--product-blue) 34%, var(--line));
  border-left: 4px solid var(--product-blue);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--product-blue) 6%, var(--surface));
  color: var(--text);
}

.guide-stale-notice span {
  color: var(--muted);
  font-size: 13px;
}

.guide-result.is-stale .guide-stale-notice {
  display: grid;
  animation: fadeUp 150ms var(--ease-out) both;
}

.guide-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: stretch;
}

.guide-result-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.guide-score-card,
.guide-plan-card,
.guide-section-card,
.guide-subject-target,
.guide-course-option,
.guide-entry-checks article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-score-card {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
}

.guide-score-card span,
.guide-plan-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-score-card strong {
  color: var(--accent);
  font-size: 32px;
  line-height: 1;
}

.guide-score-card small {
  color: var(--muted);
  line-height: 1.35;
}

.guide-plan-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 12px;
}

.guide-linear-preview {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-soft);
  animation: fadeUp var(--motion-medium) ease both;
}

.guide-linear-preview > div {
  display: grid;
  align-content: center;
  gap: 6px;
}

.guide-linear-preview > div span,
.guide-linear-preview li strong {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-linear-preview h3 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 32px);
}

.guide-linear-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-linear-preview ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-linear-preview li {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  overflow: hidden;
}

.guide-linear-preview li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
}

.guide-linear-preview li small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.guide-plan-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, box-shadow 160ms ease;
}

.guide-plan-card.primary img {
  width: 118px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.guide-plan-card h3 {
  font-size: 19px;
  line-height: 1.25;
}

.guide-plan-card p,
.guide-plan-card small,
.guide-course-option p,
.guide-course-option small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-plan-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-plan-card dl div {
  min-width: 0;
  padding: 9px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.guide-plan-card dl div:last-child {
  border-right: 0;
}

.guide-plan-card dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-plan-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.guide-link-row a,
.guide-pathway-grid a,
.guide-course-option a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.guide-link-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
}

.guide-mini-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.guide-mini-list em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.guide-meter {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.guide-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.guide-estimate-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 14px;
  background: linear-gradient(135deg, #f8fbff, #fff);
}

.guide-school-panel p,
.guide-eas-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-estimate-summary {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 4px 2px;
}

.guide-estimate-summary > span,
.guide-true-reward span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-estimate-summary > strong {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1;
}

.guide-estimate-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.guide-estimate-list article {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 7px;
  min-width: 0;
  min-height: 136px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-estimate-subject-name {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.guide-estimate-list article.up {
  border-color: #bfdbfe;
}

.guide-estimate-list article.down {
  border-color: #fecaca;
}

.guide-estimate-list article span {
  color: var(--text);
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.guide-estimate-list article small {
  align-self: end;
  font-size: 12px;
  line-height: 1.35;
}

.guide-estimate-list article small b {
  color: var(--text);
  font-weight: 850;
}

.guide-section-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
}

.guide-section-card {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.guide-plan-section {
  overflow: hidden;
}

.guide-plan-section summary {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
}

.guide-plan-section summary span {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.guide-plan-section summary small {
  color: var(--muted);
  line-height: 1.45;
}

.guide-plan-section summary::after {
  justify-self: end;
  color: var(--accent);
  content: "Open";
  font-size: 12px;
  font-weight: 900;
}

.guide-plan-section[open] summary::after {
  content: "Close";
}

.guide-section-body {
  padding: 0 15px 15px;
}

.guide-card-head {
  display: grid;
  gap: 3px;
}

.guide-subject-targets,
.guide-entry-checks,
.guide-course-options,
.guide-pathway-grid {
  display: grid;
  gap: 10px;
}

.guide-subject-targets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-subject-target {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
}

.guide-subject-target strong {
  font-size: 15px;
  line-height: 1.25;
}

.guide-subject-target span {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 900;
}

.guide-subject-target.required span {
  background: #fff7ed;
  color: #c2410c;
}

.guide-subject-target.current span {
  background: #ecfdf5;
  color: #047857;
}

.guide-subject-target p,
.guide-subject-target small,
.guide-entry-checks p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-subject-target small {
  font-weight: 800;
}

.guide-entry-checks article {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--surface);
}

.guide-entry-checks article.has-info {
  background: #f8fbff;
}

.guide-entry-checks span {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 900;
}

.guide-course-option {
  display: grid;
  grid-template-columns: 34px 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, box-shadow 160ms ease;
}

.guide-course-option > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.guide-course-option img {
  width: 82px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
}

.guide-course-option strong {
  display: block;
  line-height: 1.3;
}

.guide-course-option em {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.guide-course-option a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12.5px;
}

.guide-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  counter-reset: guide-step;
  list-style: none;
}

.guide-timeline li {
  position: relative;
  min-height: 68px;
  padding: 12px 12px 12px 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: guide-step;
}

.guide-timeline li::before {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  content: counter(guide-step);
  font-size: 12px;
  font-weight: 900;
}

.guide-timeline p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-pathway-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.guide-job-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-job-grid span {
  color: var(--accent);
  font-weight: 900;
}

.guide-job-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-true-reward {
  padding: 16px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.guide-eas-note {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-eas-note strong {
  color: var(--text);
}

.guide-eas-note div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-eas-note a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 900;
  text-decoration: none;
}

.guide-true-reward a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #fff;
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.guide-pathway-grid a {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 160ms var(--ease-out), border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.guide-pathway-grid small {
  color: var(--muted);
  line-height: 1.4;
}

.guide-disclaimer {
  font-size: 13px;
}

.guide-quick button:active,
.guide-course-option a:active,
.guide-link-row a:active,
.guide-pathway-grid a:active {
  transform: scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  .guide-quick button:hover,
  .guide-link-row a:hover,
  .guide-course-option a:hover,
  .guide-pathway-grid a:hover {
    border-color: #b9c8d1;
    background: #fff;
    transform: translateY(-1px);
  }

  .guide-plan-card:hover,
  .guide-course-option:hover,
  .guide-section-card:hover,
  .guide-subject-target:hover,
  .guide-entry-checks article:hover {
    border-color: #b9c8d1;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.045);
    transform: translateY(-1px);
  }
}

:root[data-theme="dark"] .guide-field input,
:root[data-theme="dark"] .guide-field select,
:root[data-theme="dark"] .guide-term-field input,
:root[data-theme="dark"] .guide-score-card,
:root[data-theme="dark"] .guide-plan-card,
:root[data-theme="dark"] .guide-section-card,
:root[data-theme="dark"] .guide-plan-section,
:root[data-theme="dark"] .guide-mark-panel,
:root[data-theme="dark"] .guide-optional,
:root[data-theme="dark"] .guide-estimate-panel,
:root[data-theme="dark"] .guide-true-reward,
:root[data-theme="dark"] .guide-subject-target,
:root[data-theme="dark"] .guide-course-option,
:root[data-theme="dark"] .guide-entry-checks article,
:root[data-theme="dark"] .guide-job-grid article,
:root[data-theme="dark"] .guide-estimate-list article,
:root[data-theme="dark"] .guide-empty-steps span,
:root[data-theme="dark"] .guide-link-row a,
:root[data-theme="dark"] .guide-course-option a,
:root[data-theme="dark"] .guide-pathway-grid a,
:root[data-theme="dark"] .guide-true-reward a,
:root[data-theme="dark"] .guide-row-summary,
:root[data-theme="dark"] .guide-eas-note,
:root[data-theme="dark"] .guide-eas-note a {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

:root[data-theme="dark"] .guide-plan-card dl,
:root[data-theme="dark"] .guide-plan-card dl div,
:root[data-theme="dark"] .guide-entry-checks article.has-info,
:root[data-theme="dark"] .guide-timeline li,
:root[data-theme="dark"] .guide-mark-row,
:root[data-theme="dark"] .guide-year-note,
:root[data-theme="dark"] .guide-quick button {
  border-color: var(--line);
  background: var(--surface);
}

:root[data-theme="dark"] .guide-pill,
:root[data-theme="dark"] .guide-subject-target span,
:root[data-theme="dark"] .guide-entry-checks span,
:root[data-theme="dark"] .guide-meter {
  background: var(--accent-soft);
  color: #93c5fd;
}

:root[data-theme="dark"] .guide-subject-target.required span {
  background: rgba(124, 45, 18, 0.35);
  color: #fed7aa;
}

:root[data-theme="dark"] .guide-subject-target.current span {
  background: rgba(5, 46, 22, 0.52);
  color: #a7f3d0;
}

:root[data-theme="dark"] .guide-score-card strong,
:root[data-theme="dark"] .guide-mini-list em,
:root[data-theme="dark"] .guide-course-option em,
:root[data-theme="dark"] .guide-job-grid span,
:root[data-theme="dark"] .guide-true-reward span,
:root[data-theme="dark"] .guide-estimate-summary > span,
:root[data-theme="dark"] .guide-true-reward a,
:root[data-theme="dark"] .guide-link-row a,
:root[data-theme="dark"] .guide-pathway-grid a,
:root[data-theme="dark"] .guide-course-option a,
:root[data-theme="dark"] .guide-row-summary strong,
:root[data-theme="dark"] .guide-eas-note a {
  color: #93c5fd;
}

@media (max-width: 980px) {
  .guide-question-grid,
  .guide-result-head,
  .guide-plan-grid,
  .guide-mark-row,
  .guide-term-grid,
  .guide-plan-section summary,
  .guide-section-row,
  .guide-job-grid,
  .guide-subject-targets,
  .guide-pathway-grid {
    grid-template-columns: 1fr;
  }

  .guide-mark-head,
  .guide-true-reward {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-estimate-panel {
    grid-template-columns: 1fr;
  }

  .guide-estimate-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-mark-row .guide-term-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-mark-row .guide-term-grid.is-grouped,
  .guide-term-group-grid,
  .guide-term-group-year11 .guide-term-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-empty {
    grid-template-columns: 1fr;
  }

  .guide-empty-steps {
    min-width: 0;
  }

  .guide-plan-card dl {
    grid-template-columns: 1fr;
  }

  .guide-plan-card dl div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .guide-plan-card dl div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .guide-panel {
    scroll-margin-top: 172px;
  }

  .guide-field input,
  .guide-field select,
  .guide-term-field input {
    min-height: 46px;
  }

  .guide-actions button {
    width: 100%;
    min-height: 46px;
  }

  .guide-quick {
    gap: 7px;
  }

  .guide-quick button {
    flex: 1 1 142px;
    min-height: 40px;
  }

  .guide-result-head,
  .guide-plan-card,
  .guide-plan-section summary,
  .guide-section-card {
    gap: 11px;
  }

  .guide-score-card,
  .guide-plan-card,
  .guide-plan-section,
  .guide-mark-panel,
  .guide-estimate-panel,
  .guide-true-reward,
  .guide-eas-note,
  .guide-section-card,
  .guide-subject-target,
  .guide-entry-checks article,
  .guide-job-grid article,
  .guide-estimate-list article,
  .guide-course-option {
    padding: 12px;
  }

  .guide-course-option {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .guide-course-option img {
    grid-column: 1;
    width: 58px;
  }

  .guide-course-option div,
  .guide-course-option a {
    grid-column: 1 / -1;
  }

  .guide-course-option a {
    width: 100%;
    min-height: 42px;
  }

  .guide-estimate-list {
    grid-template-columns: 1fr;
  }

  .guide-estimate-list article {
    min-height: 0;
  }

  .guide-stale-notice {
    grid-template-columns: 1fr;
  }
}

.subject-lookup-panel,
.subject-detection,
.subject-empty,
.subject-process,
.subject-guide-link {
  display: grid;
  gap: 18px;
}

.subject-smart-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.subject-smart-search label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.subject-smart-search input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0 16px;
  font: inherit;
}

.subject-example-row,
.subject-pathway-grid,
.subject-career-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-example-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.subject-pathway-grid,
.subject-career-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subject-pathway-grid article,
.subject-career-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.subject-career-grid span {
  color: var(--accent);
  font-weight: 800;
}

.subject-guide-link {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.subject-process {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.subject-process svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.subject-process-bar {
  height: 4px;
  overflow: hidden;
  background: var(--accent-soft);
}

.subject-process-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  animation: subjectLoadingSweep 1200ms ease-in-out infinite;
}

@keyframes subjectLoadingSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(250%); }
}

.guide-direction-deck {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.guide-deck-head,
.guide-deck-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.guide-deck-head span,
.guide-deck-question span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guide-deck-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.guide-deck-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width var(--motion-medium) ease;
}

.guide-deck-question {
  display: grid;
  gap: 8px;
  text-align: center;
}

.guide-deck-question h4 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.guide-deck-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.guide-direction-option {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.guide-direction-option[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.guide-direction-icon {
  display: grid;
  place-items: center;
  min-height: 86px;
  border-radius: calc(var(--radius-lg) - 6px);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-size: 34px;
  font-weight: 900;
}

:root[data-theme="dark"] .subject-smart-search input,
:root[data-theme="dark"] .subject-example-row button,
:root[data-theme="dark"] .guide-direction-deck,
:root[data-theme="dark"] .guide-direction-option,
:root[data-theme="dark"] .subject-pathway-grid article,
:root[data-theme="dark"] .subject-career-grid article {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .guide-direction-option[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

:root[data-theme="dark"] .guide-deck-progress {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

:root[data-theme="dark"] .guide-deck-fold i {
  border-color: rgba(255, 255, 255, 0.74);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .subject-smart-search,
  .subject-pathway-grid,
  .subject-career-grid,
  .guide-deck-options {
    grid-template-columns: 1fr;
  }

  .subject-smart-search .match-btn,
  .subject-guide-link .help-link {
    width: 100%;
  }

  .subject-guide-link,
  .guide-deck-head,
  .guide-deck-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .guide-direction-deck {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Absolute final overrides for the new Subject Helper plan layout. */
.subject-plan-redesign .subject-plan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  gap: 18px;
}

.subject-plan-redesign .subject-check-grid,
.subject-plan-redesign .subject-how-grid,
.subject-plan-redesign .subject-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subject-plan-redesign .subject-pick-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.subject-plan-redesign .subject-plan-card {
  display: none;
}

.subject-course-list {
  display: grid;
  gap: 9px;
  max-height: none;
  overflow: visible;
}

.subject-course-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

@media (max-width: 900px) {
  .subject-plan-redesign .subject-plan-hero,
  .subject-plan-redesign .subject-check-grid,
  .subject-plan-redesign .subject-how-grid,
  .subject-plan-redesign .subject-signal-grid,
  .subject-plan-redesign .subject-pick-layout,
  .subject-course-row summary {
    grid-template-columns: 1fr;
  }
}

/* My Plan, ATAR income and Guide adjustment polish */
.my-plan-panel {
  scroll-margin-top: 88px;
}

.my-plan-empty,
.my-plan-status,
.guide-adjust-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.my-plan-empty {
  display: grid;
  gap: 9px;
}

.my-plan-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.my-plan-status span,
.guide-adjust-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.my-plan-status strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1.2;
}

.my-plan-status p,
.my-plan-empty p,
.guide-adjust-head p,
.guide-adjust-field small,
.my-plan-timeline p,
.my-plan-timeline small {
  color: var(--muted);
  line-height: 1.5;
}

.my-plan-timeline {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 14px;
  list-style: none;
}

.my-plan-timeline li {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.my-plan-timeline li.upcoming {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.my-plan-timeline time {
  color: var(--accent);
  font-weight: 900;
}

.my-plan-timeline strong {
  color: var(--text);
}

.my-plan-timeline small {
  display: block;
  margin-top: 5px;
  font-weight: 700;
}

.my-plan-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.my-plan-section-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.my-plan-section-card:first-child,
.my-plan-section-card:last-child {
  grid-column: 1 / -1;
}

.my-plan-section-card h3 {
  margin: 0 0 5px;
}

.my-plan-section-card > div > p,
.my-plan-mini-list p,
.my-plan-mini-list span,
.my-plan-checkpoints .panel-head p {
  color: var(--muted);
  line-height: 1.5;
}

.my-plan-mini-list {
  display: grid;
  gap: 9px;
}

.my-plan-mini-list section {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.my-plan-mini-list strong {
  color: var(--text);
}

.my-plan-mini-list span {
  font-size: 12.5px;
  font-weight: 900;
}

.my-plan-mini-list p {
  margin: 0;
  font-size: 13px;
}

.my-plan-checkpoints {
  margin-top: 16px;
}

.my-plan-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.my-plan-hero {
  margin-top: 0;
}

.my-plan-linear-panel {
  overflow: visible;
}

.linear-plan-road {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 4px 0 0;
  margin: 0;
  list-style: none;
}

.linear-plan-road::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 23px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 20%, var(--line)));
}

.linear-plan-stage {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  animation: itemIn 0.38s var(--ease) both;
  animation-delay: var(--item-delay, 0ms);
}

.linear-stage-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-soft);
  font-weight: 900;
}

.linear-plan-stage article {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.linear-stage-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.linear-stage-head h2 {
  margin: 4px 0 6px;
  font-size: clamp(20px, 2vw, 28px);
}

.linear-stage-head p,
.linear-stage-item p {
  color: var(--muted);
  line-height: 1.55;
}

.linear-stage-items {
  display: grid;
  gap: 10px;
}

.linear-stage-item {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.linear-stage-item.with-logo {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}

.linear-stage-item img {
  max-width: 64px;
  max-height: 44px;
  object-fit: contain;
}

.linear-stage-item strong {
  display: block;
  color: var(--text);
}

.linear-stage-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.linear-stage-item p {
  margin: 7px 0 0;
  font-size: 14px;
}

.job-site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.job-site-links a {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 13px;
  font-weight: 900;
}

.panel-head.compact {
  margin-bottom: 10px;
  padding: 0;
}

.atar-income-filter {
  margin-top: -6px;
}

.guide-deck-review {
  animation: fadeUp var(--motion-medium) ease both;
}

.guide-answer-review-list {
  display: grid;
  gap: 9px;
}

.guide-answer-review-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-answer-review-list article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.guide-answer-review-list strong,
.guide-answer-review-list p {
  margin: 0;
}

.guide-adjust-panel {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.guide-adjust-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.guide-adjust-head h3 {
  margin: 4px 0 6px;
}

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

.guide-adjust-field {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-adjust-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.guide-adjust-field input,
.guide-adjust-field select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.pathways-page {
  width: min(100% - 36px, 1180px);
  margin: 0 auto;
  padding: 26px 0 56px;
}

.pathways-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  gap: 18px;
  align-items: stretch;
}

.pathways-hero h1 {
  max-width: 820px;
}

.pathway-hero-actions,
.pathway-card-actions,
.official-link-grid,
.pathway-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pathway-hero-actions {
  align-items: center;
  margin-top: 18px;
  gap: 10px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  padding: 0 18px;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.pathway-hero-actions .match-btn,
.pathway-hero-actions .secondary-btn {
  min-height: 46px;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.12);
}

.pathway-hero-actions .match-btn {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.pathway-hero-actions .secondary-btn {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 3%, var(--surface-strong));
  color: var(--accent);
}

.secondary-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: var(--accent-soft);
}

.pathway-hero-actions .match-btn:hover,
.pathway-hero-actions .secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.16);
}

.pathway-type-tag,
.pathway-provider,
.pathway-saved-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.simple-route-info {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
}

.simple-route-info div {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface-soft));
}

.simple-route-info dt {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 950;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.simple-route-info dd {
  margin: 0;
  color: var(--muted);
  font-size: 13.2px;
  line-height: 1.45;
}

.pathway-saved-note {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pathway-planner,
.pathway-route-panel,
.pathway-course-panel,
.pathway-checklist,
.pathway-sources {
  animation: pageSectionIn var(--motion-slow) var(--ease-out) both;
}

.pathway-form {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(260px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}

.pathway-form label,
.pathway-filter-row label {
  display: grid;
  gap: 7px;
}

.pathway-form span,
.pathway-filter-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.pathway-form input,
.pathway-form select,
.pathway-filter-row input,
.pathway-filter-row select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

.pathway-form input:focus,
.pathway-form select:focus,
.pathway-filter-row input:focus,
.pathway-filter-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.pathway-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-strong));
}

.pathway-recommendation h3,
.pathway-recommendation p {
  margin: 0;
}

.pathway-recommendation ol {
  margin: 0;
  padding-left: 20px;
}

.pathway-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pathway-route-card,
.pathway-course-card,
.pathway-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.pathway-route-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  transition:
    transform var(--motion-medium) var(--ease-out),
    border-color var(--motion-medium) ease,
    box-shadow var(--motion-medium) ease;
}

.pathway-route-card:hover,
.pathway-route-card.is-selected {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 16px 36px var(--shadow);
}

.pathway-route-card h3,
.pathway-route-card p,
.pathway-route-card dl,
.pathway-route-card dd {
  margin: 0;
}

.pathway-route-card dl {
  display: grid;
  gap: 8px;
}

.pathway-route-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pathway-route-card dd {
  color: var(--muted);
  font-size: 14px;
}

.pathway-type-tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pathway-card-actions a,
.pathway-card-actions button,
.official-link-grid a {
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  padding: 7px 11px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.pathway-card-actions button {
  cursor: pointer;
}

.pathway-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.55fr);
  gap: 10px;
  margin-bottom: 14px;
}

.pathway-course-list {
  display: grid;
  gap: 10px;
}

.pathway-course-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  animation: fadeUp var(--motion-medium) var(--ease-out) both;
}

.pathway-course-logo {
  display: grid;
  place-items: center;
  min-height: 76px;
}

.pathway-course-logo img {
  max-width: 78px;
  max-height: 54px;
  object-fit: contain;
}

.pathway-logo-fallback {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.pathway-course-card h3,
.pathway-course-card p {
  margin: 6px 0 0;
}

.pathway-course-card h3 {
  margin-top: 8px;
}

.pathway-course-meta {
  margin-top: 10px;
}

.pathway-course-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pathway-empty {
  padding: 18px;
}

.pathway-empty h3,
.pathway-empty p {
  margin: 0;
}

.pathway-empty p {
  margin-top: 6px;
  color: var(--muted);
}

.pathway-linear {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pathway-linear li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.pathway-linear li > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.pathway-linear strong,
.pathway-linear p {
  margin: 0;
}

.pathway-linear p {
  margin-top: 4px;
  color: var(--muted);
}

.official-link-grid a {
  border-radius: var(--radius);
}

.simple-pathways-page {
  display: grid;
  gap: 18px;
}

.simple-pathways-page .panel {
  animation: none;
}

.simple-pathways-hero {
  grid-template-columns: minmax(0, 1fr);
}

.simple-pathways-hero h1 {
  max-width: 780px;
}

.simple-pathway-finder {
  display: grid;
  gap: 14px;
}

.simple-pathway-form {
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.3fr) auto;
}

.pathway-finder-note,
.pathway-data-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 750;
}

.simple-route-list {
  display: grid;
  gap: 12px;
}

.simple-route-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 12px 30px var(--shadow);
  transition: border-color var(--motion-medium) ease, box-shadow var(--motion-medium) ease, transform var(--motion-medium) var(--ease-out);
}

.is-refreshing-results main {
  animation: none;
}

.is-refreshing-results .hero {
  animation: none;
}

.is-refreshing-results .simple-ways-panel,
.is-refreshing-results .simple-route-list,
.is-refreshing-results .simple-pathway-finder {
  animation: resultsRefreshIn 230ms var(--ease-out) both;
}

.simple-route-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 950;
}

.simple-route-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.simple-route-head h3,
.simple-route-head p,
.simple-route-body h4,
.simple-route-body p,
.simple-route-body ol {
  margin: 0;
}

.simple-route-head h3 {
  margin-top: 8px;
}

.simple-route-head a {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.simple-year12-rule {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
  color: var(--muted);
  font-weight: 760;
}

.simple-route-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.simple-route-body > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.simple-route-body h4 {
  margin-bottom: 8px;
  color: var(--text);
}

.simple-route-body ol {
  padding-left: 20px;
}

.simple-route-body li + li {
  margin-top: 6px;
}

.simple-route-body p + p {
  margin-top: 8px;
}

.simple-route-info {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.useful-route-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-soft));
}

.useful-route-links h4 {
  margin: 0;
  color: var(--text);
}

.useful-route-links > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.useful-route-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.simple-checklist .pathway-linear {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.simple-checklist .pathway-linear li {
  grid-template-columns: 38px minmax(0, 1fr);
}

:root[data-theme="dark"] .my-plan-empty,
:root[data-theme="dark"] .my-plan-status,
:root[data-theme="dark"] .guide-linear-preview,
:root[data-theme="dark"] .guide-adjust-panel,
:root[data-theme="dark"] .my-plan-timeline li,
:root[data-theme="dark"] .guide-answer-review-list article,
:root[data-theme="dark"] .guide-adjust-field,
:root[data-theme="dark"] .my-plan-section-card,
:root[data-theme="dark"] .my-plan-mini-list section,
:root[data-theme="dark"] .linear-plan-stage article,
:root[data-theme="dark"] .linear-stage-item,
:root[data-theme="dark"] .pathway-recommendation,
:root[data-theme="dark"] .pathway-route-card,
:root[data-theme="dark"] .pathway-course-card,
:root[data-theme="dark"] .pathway-empty,
:root[data-theme="dark"] .pathway-linear li,
:root[data-theme="dark"] .simple-route-card,
:root[data-theme="dark"] .simple-route-body > div,
:root[data-theme="dark"] .simple-route-info div,
:root[data-theme="dark"] .useful-route-links,
:root[data-theme="dark"] .pathway-finder-note,
:root[data-theme="dark"] .pathway-data-note {
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .secondary-btn,
:root[data-theme="dark"] .pathway-hero-actions .secondary-btn {
  border-color: rgba(255, 255, 255, 0.42);
  background: #000000;
  color: #f8fbff;
}

:root[data-theme="dark"] .secondary-btn:hover,
:root[data-theme="dark"] .pathway-hero-actions .secondary-btn:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: #070707;
  color: #ffffff;
}

:root[data-theme="dark"] .simple-route-head a,
:root[data-theme="dark"] .useful-route-links a {
  border-color: rgba(147, 197, 253, 0.55);
  background: rgba(37, 99, 235, 0.1);
  color: #93c5fd;
}

:root[data-theme="dark"] .simple-route-head a:hover,
:root[data-theme="dark"] .useful-route-links a:hover {
  border-color: rgba(191, 219, 254, 0.7);
  background: #071733;
  color: #bfdbfe;
}

/* Site-wide alignment, softness and motion polish. */
:where(
  .panel,
  .course-item,
  .course-card,
  .provider-card,
  .top-provider-card,
  .pathway-grid a,
  .advisor-summary,
  .advisor-picks article,
  .chat-box,
  .calculator-result,
  .calc-subject-row,
  .method-grid article,
  .subject-card,
  .subject-impact-card,
  .subject-plan-card,
  .subject-course-card,
  .subject-course-row,
  .subject-pathway-grid article,
  .subject-career-grid article,
  .guide-direction-deck,
  .guide-mark-panel,
  .guide-optional,
  .guide-plan-section,
  .guide-estimate-panel,
  .guide-true-reward,
  .guide-score-card,
  .guide-plan-card,
  .guide-section-card,
  .guide-subject-target,
  .guide-course-option,
  .guide-entry-checks article,
  .my-plan-empty,
  .my-plan-status,
  .my-plan-section-card,
  .my-plan-mini-list section,
  .my-plan-timeline li,
  .linear-plan-stage article,
  .linear-stage-item,
  .pathway-recommendation,
  .pathway-route-card,
  .pathway-course-card,
  .pathway-empty,
  .simple-pathway-finder,
  .simple-ways-panel,
  .simple-route-card,
  .simple-route-body > div,
  .simple-route-info div,
  .useful-route-links
) {
  min-width: 0;
  border-radius: var(--radius-lg);
  transition:
    transform var(--motion-medium) var(--ease),
    border-color var(--motion-medium) ease,
    background-color var(--motion-medium) ease,
    box-shadow var(--motion-medium) ease,
    opacity var(--motion-medium) ease;
}

:where(
  .course-list article,
  .provider-grid > *,
  .top-provider-grid > *,
  .advisor-picks article,
  .income-chip-list article,
  .method-grid article,
  .subject-plan-grid > *,
  .subject-pathway-grid article,
  .subject-career-grid article,
  .guide-plan-grid > *,
  .guide-section-body > *,
  .guide-empty-steps span,
  .guide-answer-review-list article,
  .my-plan-timeline li,
  .my-plan-section-card,
  .my-plan-mini-list section,
  .linear-plan-stage,
  .pathway-route-card,
  .pathway-course-card,
  .simple-route-list > *,
  .simple-checklist .pathway-linear li,
  .useful-route-links
) {
  animation: surfaceFloatIn 360ms var(--ease) both;
  animation-delay: var(--item-delay, 0ms);
}

:where(
  .course-list article:nth-child(2),
  .provider-grid > *:nth-child(2),
  .top-provider-grid > *:nth-child(2),
  .guide-plan-grid > *:nth-child(2),
  .subject-plan-grid > *:nth-child(2),
  .my-plan-timeline li:nth-child(2),
  .simple-route-list > *:nth-child(2)
) {
  animation-delay: 45ms;
}

:where(
  .course-list article:nth-child(3),
  .provider-grid > *:nth-child(3),
  .top-provider-grid > *:nth-child(3),
  .guide-plan-grid > *:nth-child(3),
  .subject-plan-grid > *:nth-child(3),
  .my-plan-timeline li:nth-child(3),
  .simple-route-list > *:nth-child(3)
) {
  animation-delay: 90ms;
}

:where(
  .course-list article:nth-child(4),
  .provider-grid > *:nth-child(4),
  .top-provider-grid > *:nth-child(4),
  .guide-plan-grid > *:nth-child(4),
  .subject-plan-grid > *:nth-child(4),
  .my-plan-timeline li:nth-child(4),
  .simple-route-list > *:nth-child(4)
) {
  animation-delay: 135ms;
}

.is-refreshing-results :where(.simple-route-list > *, .pathway-route-card, .pathway-course-card) {
  animation: none;
}

:where(
  .panel-head,
  .guide-mark-head,
  .guide-true-reward,
  .guide-estimate-panel,
  .guide-result-head,
  .guide-card-head,
  .guide-adjust-head,
  .my-plan-status,
  .simple-route-head,
  .pathway-filter-row,
  .pathway-recommendation,
  .linear-stage-item.with-logo
) {
  align-items: flex-start;
}

:where(
  .panel-head > *,
  .guide-mark-head > *,
  .guide-result-head > *,
  .guide-card-head > *,
  .my-plan-status > *,
  .simple-route-head > *,
  .pathway-recommendation > *,
  .linear-stage-item > *
) {
  min-width: 0;
}

:where(
  .match-btn,
  .secondary-btn,
  .help-link,
  .load-more,
  .actions a,
  .actions button,
  .quick-actions button,
  .income-filter-bar button,
  .subject-search-form button,
  .quick-subject-searches button,
  .subject-empty-examples button,
  .chat-form button,
  .ask-form button,
  .row-remove,
  .theme-toggle
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .panel,
    .course-item,
    .course-card,
    .provider-card,
    .top-provider-card,
    .pathway-grid a,
    .advisor-picks article,
    .calculator-result,
    .method-grid article,
    .subject-card,
    .subject-impact-card,
    .subject-course-card,
    .guide-plan-card,
    .guide-section-card,
    .guide-subject-target,
    .guide-course-option,
    .my-plan-section-card,
    .my-plan-mini-list section,
    .my-plan-timeline li,
    .linear-plan-stage article,
    .linear-stage-item,
    .pathway-route-card,
    .pathway-course-card,
    .simple-route-card
  ):hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (min-width: 980px) {
  .atar-controls {
    grid-template-columns: minmax(320px, 1.2fr) repeat(3, minmax(180px, 1fr));
  }

  #atar .atar-controls > label:last-of-type {
    grid-column: 1 / span 3;
  }

  #atar .atar-controls > .match-btn {
    grid-column: 4;
    align-self: end;
  }
}

@media (max-width: 760px) {
  .my-plan-status,
  .guide-linear-preview,
  .guide-adjust-head,
  .pathways-hero,
  .pathway-recommendation,
  .simple-route-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .my-plan-timeline li,
  .guide-answer-review-list article,
  .guide-adjust-grid,
  .my-plan-personal-grid,
  .linear-stage-item.with-logo,
  .pathway-form,
  .pathway-route-grid,
  .pathway-filter-row,
  .pathway-course-card,
  .simple-pathway-form,
  .simple-route-card,
  .simple-route-body,
  .simple-route-info,
  .simple-checklist .pathway-linear {
    grid-template-columns: 1fr;
  }

  .my-plan-page,
  .pathways-page {
    width: min(100% - 18px, 1160px);
    padding-bottom: 32px;
  }

  .pathway-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .pathway-hero-actions .match-btn,
  .pathway-hero-actions .secondary-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
  }

  .linear-plan-stage {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .linear-plan-road::before {
    left: 18px;
  }

  .linear-stage-marker {
    width: 38px;
    height: 38px;
  }

  .my-plan-section-card:first-child,
  .my-plan-section-card:last-child {
    grid-column: auto;
  }
}

/* Mobile app shell: compact top chrome, bottom tabs and softer phone layouts. */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    min-height: 100svh;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
    overscroll-behavior-y: contain;
    background: #ffffff;
  }

  main > section[id],
  .panel[id],
  .hero[id] {
    scroll-margin-top: 86px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 58px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    border-bottom: 1px solid rgba(199, 215, 238, 0.74);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.055);
    backdrop-filter: none;
  }

  .brand {
    min-width: 0;
    min-height: 44px;
    max-width: calc(100% - 56px);
    padding-right: 0;
    gap: 10px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  .brand span {
    max-width: 218px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-logo {
    width: 34px;
    height: 34px;
  }

  .topbar-actions {
    position: static;
    margin-left: auto;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 16px;
  }

  .topnav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 80;
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: start;
    align-items: center;
    width: auto;
    min-height: 0;
    max-height: min(42svh, 266px);
    padding: 6px;
    gap: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(199, 215, 238, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.14);
    backdrop-filter: none;
    mask-image: none;
    scroll-padding-inline: 8px;
    scroll-snap-type: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    contain: layout paint style;
    transform: translate3d(0, 0, 0);
    transition:
      transform 170ms var(--ease-out),
      opacity 140ms ease,
      background-color 140ms ease,
      border-color 140ms ease;
    will-change: transform, opacity;
  }

  .topnav a,
  .topnav button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 7px 6px;
    gap: 4px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0;
    font-weight: 900;
    line-height: 1.05;
    white-space: nowrap;
    scroll-snap-align: center;
    -webkit-tap-highlight-color: transparent;
  }

  .topnav a::before,
  .topnav button::before {
    display: grid;
    place-items: center;
    min-height: 22px;
    color: currentColor;
    content: attr(data-mobile-icon);
    font-size: 18px;
    line-height: 1;
  }

  .topnav a::after,
  .topnav button::after {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: currentColor;
    content: attr(data-mobile-label);
    font-size: 11px;
    letter-spacing: -0.01em;
  }

  .topnav a:hover,
  .topnav button:hover {
    background: rgba(29, 78, 216, 0.08);
    transform: none;
  }

  .topnav a[aria-current="page"],
  .topnav button[aria-current="page"] {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.44), 0 6px 16px rgba(29, 78, 216, 0.18);
  }

  .mobile-nav-peek {
    position: fixed;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 82;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: min(188px, calc(100% - 128px));
    min-height: 36px;
    padding: 8px 12px 8px 14px;
    border: 1px solid rgba(29, 78, 216, 0.24);
    border-bottom-width: 2px;
    border-radius: 10px 10px 6px 6px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 58px, 0) scale(0.98);
    transition:
      transform 170ms var(--ease-out),
      opacity 130ms ease,
      background-color 140ms ease,
      border-color 140ms ease;
    will-change: transform, opacity;
  }

  .mobile-nav-peek::before {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 34px;
    height: 3px;
    border-radius: 6px;
    background: currentColor;
    content: "";
    opacity: 0.22;
    transform: translateX(-50%);
  }

  .mobile-nav-peek::after {
    color: currentColor;
    content: "⌃";
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    opacity: 0.58;
  }

  .mobile-nav-peek span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-nav-peek strong {
    max-width: 90px;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.mobile-nav-collapsed .topnav {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, calc(100% + 26px), 0) scale(0.98);
  }

  html.mobile-nav-collapsed .mobile-nav-peek {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  html.mobile-nav-expanded .mobile-nav-peek {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 58px, 0) scale(0.98);
  }

  .app-progress {
    top: 58px;
    z-index: 65;
    padding: 0 14px;
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    width: min(100% - 24px, 1120px);
    margin-bottom: 118px;
  }

  .hero {
    padding: 18px 0 10px;
    gap: 14px;
  }

  .hero h1,
  h1 {
    font-size: clamp(27px, 8vw, 36px);
    line-height: 1.04;
    letter-spacing: -0.055em;
  }

  .hero p,
  .panel-head p,
  .empty-note,
  .data-note {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
  }

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

  .stats div,
  .stats .data-note {
    border: 1px solid rgba(199, 215, 238, 0.76);
    border-radius: 18px;
    background: var(--surface-soft);
  }

  .panel,
  .calculator-result,
  .advisor-summary,
  .chat-box,
  .subject-card,
  .subject-impact-card,
  .subject-course-card,
  .guide-plan-section,
  .guide-estimate-panel,
  .guide-mark-panel,
  .my-plan-section-card,
  .linear-plan-stage article,
  .simple-route-card {
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.055);
  }

  .panel {
    margin: 14px 0 18px;
    padding: 16px;
  }

  .panel-head,
  .guide-mark-head,
  .guide-result-head,
  .guide-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .panel-head h2 {
    font-size: 22px;
  }

  .search-form,
  .ask-form,
  .chat-form,
  .subject-search-form,
  .atar-controls,
  .advisor-form,
  .guide-form-grid,
  .guide-term-grid,
  .guide-term-group-grid,
  .calculator-form-actions {
    grid-template-columns: 1fr;
  }

  .search-form button,
  .match-btn,
  .secondary-btn,
  .help-link,
  .load-more,
  .actions a,
  .actions button,
  .quick-actions button,
  .income-filter-bar button,
  .subject-search-form button,
  .quick-subject-searches button,
  .subject-empty-examples button,
  .chat-form button,
  .ask-form button,
  .clear-btn {
    min-height: 50px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
  }

  input,
  select,
  textarea,
  .search-form label,
  .subject-search-form label,
  .chat-form input,
  .ask-form input,
  .atar-controls label {
    border-radius: 10px;
    font-size: 16px;
  }

  input,
  select,
  textarea {
    min-height: 48px;
  }

  .course-list,
  .course-list.compact,
  .top-provider-grid,
  .provider-grid,
  .pathway-grid,
  .income-chip-list,
  .advisor-picks,
  .method-grid,
  .subject-plan-grid,
  .subject-evidence-grid,
  .subject-career-grid,
  .subject-pathway-grid,
  .guide-plan-grid,
  .guide-score-grid,
  .my-plan-mini-list,
  .simple-route-list {
    grid-template-columns: 1fr;
  }

  .course-item > summary {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .course-item,
  .provider-card,
  .top-provider-card,
  .subject-course-card,
  .pathway-course-card,
  .simple-route-card,
  .my-plan-section-card,
  .linear-stage-item {
    content-visibility: auto;
    contain-intrinsic-size: 180px;
    contain: layout paint style;
  }

  .course-list article,
  .course-item,
  .provider-card,
  .top-provider-card,
  .guide-plan-card,
  .guide-section-card,
  .subject-card,
  .simple-route-card {
    animation-duration: 220ms;
    animation-timing-function: var(--ease-out);
  }

  .course-item img,
  .provider-card img,
  .top-provider-card img {
    max-width: 54px;
  }

  .actions,
  .quick-actions,
  .panel-actions,
  .pathway-hero-actions {
    align-items: stretch;
    gap: 8px;
  }

  .actions a,
  .actions button,
  .panel-actions a,
  .panel-actions button {
    flex: 1 1 140px;
  }

  .guide-mark-row {
    border-radius: 22px;
  }
}

@media (max-width: 420px) {
  .topnav {
    left: 8px;
    right: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brand span {
    max-width: 176px;
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    width: min(100% - 18px, 1120px);
  }
}

@media (max-width: 760px) {
  html {
    scroll-behavior: auto;
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    animation-duration: 120ms;
    transform: translateZ(0);
  }

  .topbar,
  .panel,
  .hero,
  .course-item,
  .provider-card,
  .top-provider-card,
  .guide-section-card,
  .guide-plan-card,
  .subject-card,
  .subject-course-card,
  .simple-route-card,
  .pathway-course-card,
  .my-plan-section-card,
  .linear-stage-item,
  .atar-main-card,
  .calculator-result {
    transition-duration: 120ms;
  }

  .course-item,
  .provider-card,
  .top-provider-card,
  .subject-course-card,
  .simple-route-card,
  .pathway-course-card {
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  .match-btn:active,
  .clear-btn:active,
  .load-more:active,
  .actions a:active,
  .actions button:active,
  .quick-actions button:active,
  .income-filter-bar button:active,
  .subject-search-form button:active,
  .quick-subject-searches button:active,
  .subject-empty-examples button:active,
  .chat-form button:active,
  .ask-form button:active,
  .row-remove:active,
  .theme-toggle:active {
    transform: translateZ(0) scale(0.99);
  }
}

@media (max-width: 760px) {
  :root[data-theme="dark"] .topbar {
    border-bottom-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.44);
  }

  :root[data-theme="dark"] .topnav {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.96);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.72);
    backdrop-filter: none;
  }

  :root[data-theme="dark"] .topnav a,
  :root[data-theme="dark"] .topnav button {
    color: #d8e0ee;
  }

  :root[data-theme="dark"] .topnav a:hover,
  :root[data-theme="dark"] .topnav button:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  :root[data-theme="dark"] .topnav a[aria-current="page"],
  :root[data-theme="dark"] .topnav button[aria-current="page"] {
    background: #ffffff;
    color: #020617;
    box-shadow: inset 0 -3px 0 rgba(2, 6, 23, 0.22), 0 6px 16px rgba(255, 255, 255, 0.12);
  }

  :root[data-theme="dark"] .mobile-nav-peek {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.96);
    color: #020617;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.72);
  }

  :root[data-theme="dark"] .mobile-nav-peek span {
    color: #475569;
  }

  :root[data-theme="dark"] .mobile-nav-peek strong {
    color: #020617;
  }

  :root[data-theme="dark"] .stats div,
  :root[data-theme="dark"] .stats .data-note {
    border-color: rgba(255, 255, 255, 0.14);
    background: #05070d;
  }
}

/* Final mobile-shell overrides intentionally sit after legacy responsive rules. */
@media (max-width: 760px) {
  .mobile-nav-peek {
    display: none !important;
  }

  .topnav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 82;
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: auto;
    min-height: 0;
    max-height: min(54svh, 390px);
    padding: 10px;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(2, 6, 23, 0.2);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate3d(0, 12px, 0) scale(0.985);
    transition: opacity 150ms ease, transform 190ms var(--ease-out), visibility 0s linear 190ms;
  }

  html.mobile-nav-expanded .topnav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity 150ms ease, transform 190ms var(--ease-out), visibility 0s;
  }

  .topnav a,
  .topnav button {
    min-height: 54px;
    padding: 8px 6px;
    border-radius: 8px;
  }

  .mobile-primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 84;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 28px rgba(2, 6, 23, 0.1);
  }

  .mobile-primary-nav a,
  .mobile-primary-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 52px;
    padding: 6px 3px;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
  }

  .mobile-primary-nav a::before,
  .mobile-primary-nav button::before {
    content: attr(data-mobile-icon);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
  }

  .mobile-primary-nav a::after,
  .mobile-primary-nav button::after {
    max-width: 100%;
    overflow: hidden;
    content: attr(data-mobile-label);
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-primary-nav a[aria-current="page"],
  .mobile-primary-nav button[aria-current="page"],
  html.mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: #1d4ed8;
    color: #ffffff;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    margin-bottom: 36px;
  }

  :root[data-theme="dark"] .topnav,
  :root[data-theme="dark"] .mobile-primary-nav {
    border-color: #273244;
    background: #000000;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.75);
  }

  :root[data-theme="dark"] .mobile-primary-nav a,
  :root[data-theme="dark"] .mobile-primary-nav button {
    color: #d6deea;
  }

  :root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
  :root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
  :root[data-theme="dark"].mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: #ffffff;
    color: #05070d;
  }
}

/* v12 final mobile overrides: kept last so older responsive rules cannot reintroduce laggy layouts. */
@media (max-width: 760px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 60px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(2, 6, 23, 0.05);
    transform: none;
    backface-visibility: visible;
    will-change: auto;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand span {
    overflow: hidden;
    max-width: min(48vw, 188px);
    font-size: 15px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .advisor-main,
  .my-plan-page,
  .pathways-page,
  .simple-pathways-page {
    width: min(100% - 20px, 1120px);
    margin-bottom: 22px;
    animation-duration: 190ms;
    animation-timing-function: var(--ease-out);
  }

  .hero {
    gap: 14px;
    padding: 22px 0 14px;
  }

  .hero h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 9vw, 38px);
    letter-spacing: -0.035em;
  }

  .panel {
    padding: 16px;
    border-radius: 14px;
  }

  .topnav {
    left: 8px;
    right: 8px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(56svh, 410px);
    padding: 9px;
    border-radius: 12px;
    transform: translate3d(0, 14px, 0) scale(0.99);
    transition: opacity 150ms ease, transform 210ms var(--ease-out), visibility 0s linear 210ms;
    overscroll-behavior: contain;
  }

  html.mobile-nav-expanded .topnav {
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity 150ms ease, transform 210ms var(--ease-out), visibility 0s;
  }

  .topnav a,
  .topnav button {
    min-height: 52px;
    border-radius: 7px;
    transition: transform 140ms var(--ease-out), background 150ms ease, color 150ms ease;
  }

  .mobile-primary-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 3px calc(4px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 -1px 0 var(--line), 0 -10px 28px rgba(2, 6, 23, 0.08);
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .mobile-primary-nav a,
  .mobile-primary-nav button {
    min-height: 54px;
    padding-inline: 1px;
    border-radius: 6px;
    color: #475569;
    transition: transform 140ms var(--ease-out), background 150ms ease, color 150ms ease, box-shadow 150ms ease;
  }

  .mobile-primary-nav a::before,
  .mobile-primary-nav button::before {
    font-size: 19px;
  }

  .mobile-primary-nav a::after,
  .mobile-primary-nav button::after {
    font-size: 9.5px;
    letter-spacing: -0.01em;
  }

  .mobile-primary-nav a[aria-current="page"],
  .mobile-primary-nav button[aria-current="page"],
  html.mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    border-radius: 6px;
    background: #eff6ff;
    color: var(--accent);
    box-shadow: inset 0 2px 0 var(--accent);
  }

  .mobile-primary-nav a:active,
  .mobile-primary-nav button:active,
  .topnav a:active,
  .topnav button:active {
    transform: scale(0.96);
  }

  .course-item,
  .provider-card,
  .top-provider-card,
  .subject-course-card,
  .subject-course-row,
  .simple-route-card,
  .pathway-course-card,
  .guide-plan-card,
  .guide-section-card {
    animation: mobileItemIn 190ms var(--ease-out) both;
    animation-delay: min(var(--item-delay, 0ms), 80ms);
  }

  .course-item[open],
  .subject-course-row[open],
  .subject-course-card[open] {
    contain: none;
    content-visibility: visible;
  }

  .course-item > summary {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    padding: 14px 13px;
  }

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

  .quick-actions button {
    min-height: 42px;
    border-radius: 8px;
  }

  .course-detail,
  .subject-course-detail,
  .course-detail-loading {
    padding: 14px;
  }

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

  .course-detail-loading i:nth-of-type(2),
  .course-detail-loading i:nth-of-type(3) {
    display: none;
  }

  .actions,
  .pathway-hero-actions,
  .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .actions a,
  .actions button,
  .pathway-hero-actions a,
  .pathway-hero-actions button,
  .panel-actions a,
  .panel-actions button {
    width: 100%;
    min-height: 46px;
  }

  :root[data-theme="dark"] .topbar,
  :root[data-theme="dark"] .mobile-primary-nav,
  :root[data-theme="dark"] .topnav {
    background: #000000;
  }

  :root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
  :root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
  :root[data-theme="dark"].mobile-nav-expanded .mobile-primary-nav [data-action="toggle-mobile-nav"] {
    background: #ffffff;
    color: #020617;
    box-shadow: inset 0 2px 0 #ffffff;
  }
}

/* v22 mobile layer guard: keep the tappable menu above its scrim and outside the header stack. */
@media (max-width: 760px) {
  .topbar > .topnav {
    display: none !important;
  }

  .mobile-nav-scrim {
    z-index: 88 !important;
  }

  .mobile-page-menu {
    position: fixed;
    right: 0;
    bottom: calc(63px + env(safe-area-inset-bottom));
    left: 0;
    z-index: 89;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(58svh, 430px);
    padding: 15px 12px 18px;
    gap: 4px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #ffffff;
    box-shadow: 0 -18px 48px rgba(2, 6, 23, 0.18);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate3d(0, 24px, 0);
    transition: opacity 140ms ease, transform 190ms var(--ease-out), visibility 0s linear 190ms;
  }

  html.mobile-nav-expanded .mobile-page-menu {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    transition: opacity 140ms ease, transform 190ms var(--ease-out), visibility 0s;
  }

  .mobile-page-menu a,
  .mobile-page-menu button {
    display: flex;
    min-width: 0;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    box-shadow: none;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
    transition: background 140ms ease, color 140ms ease, transform 120ms var(--ease-out);
  }

  .mobile-page-menu a[aria-current="page"],
  .mobile-page-menu button[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .mobile-page-menu a:active,
  .mobile-page-menu button:active {
    transform: scale(0.95);
  }

  .mobile-primary-nav {
    z-index: 90 !important;
  }

  :root[data-theme="dark"] .mobile-page-menu {
    background: #000000;
    box-shadow: 0 -18px 52px rgba(0, 0, 0, 0.72);
  }

  :root[data-theme="dark"] .mobile-page-menu a,
  :root[data-theme="dark"] .mobile-page-menu button {
    color: #ffffff;
  }

  :root[data-theme="dark"] .mobile-page-menu a[aria-current="page"],
  :root[data-theme="dark"] .mobile-page-menu button[aria-current="page"] {
    background: #10151f;
    color: #ffffff;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .mobile-page-menu {
    transition-duration: 0.01ms !important;
  }
}

/* v23 search-first product redesign */
:root {
  --product-blue: #0b3b91;
  --product-blue-hover: #072d70;
  --product-line: #d7dee9;
  --product-ink: #090f1c;
  --product-muted: #405066;
  --product-soft: #f6f8fb;
}

html {
  scroll-padding-top: 88px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--product-ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 140ms ease;
}

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

.topbar {
  min-height: 72px;
  border-bottom-color: var(--product-line);
  box-shadow: none;
  backdrop-filter: none;
}

.topnav {
  gap: clamp(18px, 2.2vw, 36px);
  overflow: visible;
}

.topnav a,
.topnav button {
  position: relative;
  padding: 24px 2px 21px;
  border-radius: 0;
  color: var(--product-ink);
  font-size: 15px;
  font-weight: 760;
}

.topnav a:hover,
.topnav button:hover {
  background: transparent;
  color: var(--product-blue);
  transform: none;
}

.topnav a[aria-current="page"],
.topnav button[aria-current="page"] {
  background: transparent;
  color: var(--product-blue);
}

.topnav a[aria-current="page"]::after,
.topnav button[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--product-blue);
  content: "";
}

.course-finder-hero {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
  min-height: 400px;
  padding: 68px 4px 52px;
}

.course-finder-hero .hero-copy {
  max-width: 760px;
}

.course-finder-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  color: var(--product-ink);
  font-size: clamp(42px, 5.4vw, 68px);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.course-finder-hero .hero-copy > p {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--product-muted);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--product-blue);
  border-radius: 7px;
  font-size: 15px;
  font-weight: 820;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms var(--ease-out);
}

.primary-action {
  background: var(--product-blue);
  color: #fff;
}

.secondary-action {
  background: #fff;
  color: var(--product-blue);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.primary-action:hover {
  border-color: var(--product-blue-hover);
  background: var(--product-blue-hover);
}

.secondary-action:hover {
  background: #f3f6fb;
}

.hero-trust {
  display: grid;
  gap: 8px;
  padding: 22px 0 22px 24px;
  border-left: 3px solid var(--product-blue);
}

.hero-trust strong {
  color: var(--product-ink);
  font-size: 22px;
  line-height: 1.2;
}

.hero-trust span,
.hero-trust small {
  color: var(--product-muted);
  line-height: 1.45;
}

.course-search-panel {
  margin-top: 0;
  padding: clamp(22px, 3vw, 34px);
  border-color: var(--product-line);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(10, 32, 68, 0.06);
}

.course-search-panel .panel-head {
  align-items: flex-end;
  margin-bottom: 20px;
}

.course-search-panel .panel-head h2 {
  color: var(--product-ink);
  font-size: 28px;
}

.panel-head .result-count {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--product-muted);
}

.search-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
}

.search-form label {
  min-height: 56px;
  border-color: #aebacd;
  border-radius: 7px;
}

.search-form input {
  color: var(--product-ink);
  font-size: 16px;
}

.search-form button {
  min-height: 56px;
  padding-inline: 24px;
  border-color: var(--product-blue);
  border-radius: 7px;
  background: var(--product-blue);
}

.search-form button:hover {
  border-color: var(--product-blue-hover);
  background: var(--product-blue-hover);
}

.mobile-filter-head,
.course-filter-scrim,
.mobile-filter-done {
  display: none;
}

.course-filter-panel {
  display: grid;
  gap: 12px;
}

.essential-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.filter-context-note {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px 16px;
  padding: 11px 14px;
  border-left: 3px solid var(--product-blue);
  background: var(--product-soft);
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.45;
}

.filter-context-note strong {
  flex: 0 0 auto;
  color: var(--product-blue);
}

.filter-context-note.is-neutral {
  border-left-color: #8b98aa;
}

.filter-context-note.is-neutral strong {
  color: var(--product-ink);
}

.filters label {
  display: grid;
  gap: 7px;
}

.filters label > span {
  color: var(--product-ink);
  font-size: 12px;
  font-weight: 800;
}

.filters select,
.filters input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #b8c3d2;
  border-radius: 6px;
  background: #fff;
  color: var(--product-ink);
  font: inherit;
  font-size: 14px;
}

.advanced-filter-disclosure {
  border-top: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
}

.advanced-filter-disclosure > summary {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  color: var(--product-blue);
  cursor: pointer;
  font-size: 14px;
  font-weight: 820;
  list-style: none;
}

.advanced-filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.advanced-filter-disclosure > summary::after {
  color: var(--product-muted);
  content: "+";
  font-size: 20px;
  font-weight: 500;
}

.advanced-filter-disclosure[open] > summary::after {
  content: "−";
}

.advanced-filter-disclosure > summary span {
  margin-left: auto;
  margin-right: 14px;
  color: var(--product-muted);
  font-size: 12px;
}

.advanced-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  animation: filterReveal 180ms var(--ease-out) both;
}

.filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.filter-foot .clear-btn {
  min-height: 36px;
  padding: 0;
  color: var(--product-blue);
}

.filter-foot small {
  color: var(--product-muted);
  line-height: 1.4;
  text-align: right;
}

.search-trust-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 14px;
  margin: 22px 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--product-blue);
  background: var(--product-soft);
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.5;
}

.search-trust-note strong {
  color: var(--product-ink);
}

.course-search-start,
.course-empty-state {
  display: grid;
  justify-items: start;
  gap: 9px;
  min-height: 180px;
  align-content: center;
  padding: 34px 2px;
  border-top: 1px solid var(--product-line);
}

.course-search-start > strong,
.course-empty-state > strong {
  color: var(--product-ink);
  font-size: 22px;
}

.course-search-start p,
.course-empty-state p {
  max-width: 700px;
  margin-bottom: 8px;
  color: var(--product-muted);
  line-height: 1.55;
}

.course-search-start > div,
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-search-start button,
.empty-actions button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #9eacc0;
  border-radius: 6px;
  background: #fff;
  color: var(--product-blue);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.course-list {
  gap: 14px;
}

.course-result-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 9px;
  background: #fff;
  color: var(--product-ink);
  box-shadow: none;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
  animation: resultEnter 240ms var(--ease-out) both;
  animation-delay: min(var(--item-delay, 0ms), 120ms);
  transition: border-color 150ms ease, box-shadow 180ms ease, transform 180ms var(--ease-out);
}

.course-result-card:hover {
  border-color: #aebbd0;
  box-shadow: 0 12px 28px rgba(10, 32, 68, 0.08);
  transform: translateY(-1px);
}

.course-card-head {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(320px, 2fr) minmax(220px, 0.9fr);
  min-height: 180px;
}

.course-provider {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border-right: 1px solid var(--product-line);
  color: var(--product-muted);
  font-size: 13px;
  font-weight: 700;
}

.course-provider img {
  width: min(132px, 100%);
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.course-summary {
  min-width: 0;
  padding: 22px;
}

.course-summary h3 {
  margin: 0 0 8px;
  color: var(--product-blue);
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.course-summary > p {
  margin-bottom: 18px;
  color: var(--product-muted);
  font-size: 13px;
}

.course-core-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.course-core-facts div {
  min-width: 0;
}

.course-core-facts dt,
.course-decision-grid dt {
  margin-bottom: 5px;
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.course-core-facts dd,
.course-decision-grid dd {
  margin: 0;
  color: var(--product-ink);
  font-size: 13px;
  line-height: 1.45;
}

.course-admission {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 22px;
  border-left: 1px solid var(--product-line);
}

.course-admission > span {
  color: var(--product-muted);
  font-size: 12px;
  font-weight: 760;
}

.course-admission > strong {
  color: var(--product-ink);
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1;
}

.course-admission small {
  color: var(--product-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.course-admission a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.course-admission a svg {
  width: 14px;
  height: 14px;
}

.course-decision-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--product-line);
}

.course-decision-grid > div {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--product-line);
}

.course-decision-grid > div:last-child {
  border-right: 0;
}

.course-card-foot {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  border-top: 1px solid var(--product-line);
}

.course-source-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.4;
}

.course-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.course-card-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #a9b5c7;
  border-radius: 6px;
  background: #fff;
  color: var(--product-ink);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms var(--ease-out);
}

.course-card-actions button:hover {
  transform: translateY(-1px);
}

.course-card-actions button[aria-pressed="true"] {
  border-color: var(--product-blue);
  background: #edf3ff;
  color: var(--product-blue);
}

.course-result-card .course-detail,
.course-result-card .course-detail-loading {
  border-top: 1px solid var(--product-line);
  animation: detailReveal 180ms var(--ease-out) both;
}

.compare-tray {
  position: sticky;
  right: 0;
  bottom: 14px;
  left: 0;
  z-index: 18;
  display: flex;
  width: min(1080px, calc(100% - 40px));
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -84px auto 16px;
  padding: 12px 14px 12px 18px;
  border: 1px solid #93a3ba;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(8, 26, 55, 0.17);
  animation: trayEnter 200ms var(--ease-out) both;
  transition: opacity 150ms ease, transform 150ms var(--ease-out);
}

.compare-tray > div:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.compare-tray strong {
  color: var(--product-ink);
}

.compare-tray span {
  overflow: hidden;
  color: var(--product-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-tray-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.compare-tray-actions button {
  width: 36px;
  height: 36px;
  border: 1px solid #b3bfd0;
  border-radius: 6px;
  background: #fff;
  color: var(--product-muted);
  cursor: pointer;
  font-size: 19px;
}

.compare-tray-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--product-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 820;
  text-decoration: none;
}

.tool-link-list {
  display: grid;
  border-top: 1px solid var(--product-line);
}

.tool-link {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--product-line);
  color: var(--product-ink);
  text-decoration: none;
  transition: color 140ms ease, padding 160ms var(--ease-out);
}

.tool-link:hover {
  padding-right: 8px;
  padding-left: 8px;
  color: var(--product-blue);
}

.tool-link span:first-child {
  display: grid;
  gap: 5px;
}

.tool-link strong {
  font-size: 17px;
}

.tool-link small {
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.45;
}

.tool-link > span:last-child {
  color: var(--product-blue);
  font-size: 22px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
}

.trust-grid > div {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-right: 1px solid var(--product-line);
}

.trust-grid > div:last-child {
  border-right: 0;
}

.trust-grid strong {
  color: var(--product-ink);
  font-size: 16px;
}

.trust-grid span {
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.4fr) auto;
  gap: 36px;
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 90px;
  padding: 28px 0;
  border-top: 1px solid var(--product-line);
  color: var(--product-muted);
}

.site-footer > div > strong {
  color: var(--product-ink);
}

.site-footer p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--product-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 14px;
}

.site-footer a,
.footer-faq summary {
  color: var(--product-blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.footer-faq {
  min-width: 0;
}

.footer-faq .faq-list {
  margin-top: 16px;
}

.site-footer-global {
  grid-template-columns: minmax(0, 1fr) auto;
}

.site-footer-global nav {
  align-items: start;
}

.distance-preview {
  color: var(--product-muted);
  font-size: 12px;
}

.distance-note {
  margin: 0 0 16px;
}

.mobile-primary-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid rgba(11, 59, 145, 0.32);
  outline-offset: 3px;
}

@keyframes resultEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes detailReveal {
  from {
    opacity: 0;
    transform: translate3d(0, -4px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes trayEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes filterReveal {
  from {
    opacity: 0;
    transform: translate3d(0, -5px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

:root[data-theme="dark"] {
  --product-blue: #6ea8ff;
  --product-blue-hover: #9dc3ff;
  --product-line: #263248;
  --product-ink: #ffffff;
  --product-muted: #bdc8d8;
  --product-soft: #090d14;
}

:root[data-theme="dark"] .primary-action {
  border-color: #fff;
  background: #fff;
  color: #05070b;
}

:root[data-theme="dark"] .secondary-action,
:root[data-theme="dark"] .course-search-panel,
:root[data-theme="dark"] .course-result-card,
:root[data-theme="dark"] .course-card-actions button,
:root[data-theme="dark"] .compare-tray,
:root[data-theme="dark"] .compare-tray-actions button,
:root[data-theme="dark"] .filters select,
:root[data-theme="dark"] .filters input,
:root[data-theme="dark"] .course-search-start button,
:root[data-theme="dark"] .empty-actions button {
  background: #000;
  color: #fff;
}

:root[data-theme="dark"] .search-form button,
:root[data-theme="dark"] .compare-tray-actions a {
  border-color: #fff;
  background: #fff;
  color: #05070b;
}

:root[data-theme="dark"] .course-card-actions button[aria-pressed="true"] {
  border-color: #fff;
  background: #fff;
  color: #05070b;
}

@media (max-width: 900px) {
  .course-card-head {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .course-admission {
    grid-column: 1 / -1;
    grid-template-columns: minmax(170px, auto) auto 1fr;
    align-items: center;
    border-top: 1px solid var(--product-line);
    border-left: 0;
  }

  .course-admission > strong {
    font-size: 25px;
  }

  .course-admission a {
    justify-self: end;
  }

  .course-decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-decision-grid > div:nth-child(2) {
    border-right: 0;
  }

  .course-decision-grid > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--product-line);
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 64px;
  }

  #app main {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #app .course-finder-hero {
    animation: resultEnter 200ms var(--ease-out) both;
  }

  #app .course-search-panel {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .topbar {
    min-height: 54px;
    padding: 0 14px;
    background: #fff;
  }

  .brand {
    min-width: 0;
    gap: 8px;
    font-size: 14px;
  }

  .site-logo {
    width: 30px;
    height: 30px;
  }

  main {
    width: 100%;
    margin-bottom: 28px;
    padding: 0 16px 72px;
  }

  .course-finder-hero {
    display: block;
    min-height: 0;
    padding: 36px 0 30px;
  }

  .course-finder-hero h1 {
    margin-bottom: 13px;
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.02;
  }

  .course-finder-hero .hero-copy > p {
    margin-bottom: 22px;
    font-size: 15px;
    line-height: 1.5;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    min-height: 48px;
  }

  .hero-trust {
    margin-top: 22px;
    padding: 14px 0 0;
    border-top: 1px solid var(--product-line);
    border-left: 0;
  }

  .hero-trust strong {
    font-size: 16px;
  }

  .panel,
  .course-search-panel {
    margin: 0 0 28px;
    padding: 28px 0;
    border-width: 1px 0 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .course-search-panel .panel-head {
    align-items: start;
    margin-bottom: 14px;
  }

  .course-search-panel .panel-head h2 {
    font-size: 24px;
  }

  .panel-head .result-count {
    padding-top: 4px;
    font-size: 12px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form label,
  .search-form button {
    min-height: 50px;
  }

  .mobile-filter-toggle {
    display: flex !important;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 0;
    padding: 0 12px;
    border: 1px solid #9daabd;
    border-radius: 6px;
    background: #fff;
    color: var(--product-blue);
    font: inherit;
    font-size: 13px;
    font-weight: 820;
  }

  .mobile-filter-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .mobile-filter-toggle svg {
    width: 17px;
    height: 17px;
  }

  .mobile-filter-toggle strong {
    color: var(--product-muted);
    font-size: 12px;
  }

  .course-filter-scrim {
    position: fixed;
    inset: 0;
    z-index: 94;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  .course-filter-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 95;
    display: block;
    max-height: min(86svh, 760px);
    padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 14px 14px 0 0;
    background: #fff;
    box-shadow: 0 -20px 54px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 24px, 0);
    transition: opacity 150ms ease, transform 210ms var(--ease-out);
  }

  .course-filter-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  html:has(.course-filter-panel.is-open) .compare-tray,
  html:has(.course-filter-panel.is-open) .mobile-primary-nav {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .course-filter-toggle:has(+ .course-filter-scrim) {
    isolation: isolate;
  }

  .course-filter-scrim:has(+ .course-filter-panel.is-open) {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-filter-head {
    position: sticky;
    top: -12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -16px 12px;
    padding: 16px;
    border-bottom: 1px solid var(--product-line);
    background: #fff;
  }

  .mobile-filter-head > div {
    display: grid;
    gap: 2px;
  }

  .mobile-filter-head strong {
    color: var(--product-ink);
    font-size: 18px;
  }

  .mobile-filter-head span {
    color: var(--product-muted);
    font-size: 12px;
  }

  .mobile-filter-head button {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: var(--product-blue);
    font: inherit;
    font-weight: 800;
  }

  .essential-filters,
  .advanced-filters {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-context-note {
    display: grid;
    gap: 3px;
  }

  .filters select,
  .filters input {
    min-height: 48px;
    font-size: 16px;
  }

  .advanced-filter-disclosure {
    margin-top: 14px;
  }

  .filter-foot {
    display: grid;
    gap: 4px;
    margin: 14px 0;
  }

  .filter-foot small {
    text-align: left;
  }

  .mobile-filter-done {
    position: sticky;
    bottom: 0;
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: var(--product-blue);
    color: #fff;
    font: inherit;
    font-weight: 820;
  }

  .search-trust-note {
    grid-template-columns: 1fr;
    margin-top: 18px;
    padding: 13px 14px;
  }

  .course-search-start,
  .course-empty-state {
    min-height: 160px;
    padding: 26px 0;
  }

  .course-search-start > div,
  .empty-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .course-search-start button,
  .empty-actions button {
    width: 100%;
    min-height: 44px;
    text-align: left;
  }

  .course-list {
    margin-inline: 0;
  }

  .course-result-card {
    margin: 0;
    overflow: visible;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
    contain-intrinsic-size: 620px;
  }

  .course-result-card:hover {
    border-color: var(--product-line);
    box-shadow: none;
    transform: none;
  }

  .course-card-head {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .course-provider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0 8px;
    border-right: 0;
  }

  .course-provider img {
    width: 76px;
    height: 32px;
  }

  .course-summary {
    padding: 8px 0 15px;
  }

  .course-summary h3 {
    font-size: 18px;
  }

  .course-core-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .course-core-facts dt,
  .course-decision-grid dt {
    font-size: 9.5px;
  }

  .course-core-facts dd,
  .course-decision-grid dd {
    font-size: 12px;
  }

  .course-admission {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px 0;
    border-top: 1px solid var(--product-line);
  }

  .course-admission > strong {
    justify-self: end;
    font-size: 26px;
  }

  .course-admission small,
  .course-admission a {
    grid-column: 1 / -1;
  }

  .course-admission a {
    justify-self: start;
  }

  .course-decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--product-line);
  }

  .course-decision-grid > div {
    padding: 13px 9px 13px 0;
  }

  .course-decision-grid > div:nth-child(even) {
    padding-right: 0;
    padding-left: 10px;
    border-right: 0;
  }

  .course-card-foot {
    display: grid;
    padding: 12px 0 16px;
  }

  .course-source-line {
    font-size: 10.5px;
  }

  .course-card-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .course-card-actions button {
    min-height: 44px;
    padding: 0 6px;
  }

  .course-result-card .course-detail,
  .course-result-card .course-detail-loading {
    margin-inline: -2px;
    padding: 15px 0;
  }

  .compare-tray {
    position: fixed;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 87;
    width: auto;
    min-height: 58px;
    margin: 0;
    padding: 9px 10px 9px 12px;
    border-radius: 7px;
  }

  .compare-tray span {
    display: none;
  }

  .compare-tray-actions button {
    display: none;
  }

  .compare-tray-actions a {
    min-height: 40px;
    padding: 0 14px;
  }

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

  .trust-grid > div {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--product-line);
  }

  .trust-grid > div:last-child {
    border-bottom: 0;
  }

  .site-footer {
    display: grid;
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0 auto 86px;
    padding: 24px 0;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .mobile-primary-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .mobile-primary-nav a::after {
    font-size: 9px;
  }

  :root[data-theme="dark"] .topbar,
  :root[data-theme="dark"] .course-filter-panel,
  :root[data-theme="dark"] .mobile-filter-head,
  :root[data-theme="dark"] .mobile-filter-toggle {
    background: #000;
    color: #fff;
  }

  :root[data-theme="dark"] .mobile-filter-done {
    background: #fff;
    color: #05070b;
  }
}

:root[data-theme="dark"] .filter-context-note {
  border-left-color: #fff;
  background: #080a0f;
  color: #c8d0dc;
}

:root[data-theme="dark"] .filter-context-note strong,
:root[data-theme="dark"] .filter-context-note.is-neutral strong {
  color: #fff;
}

@keyframes pageOpacity23 {
  from { opacity: 0.94; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .course-result-card,
  .compare-tray,
  .advanced-filters,
  .course-result-card .course-detail,
  .course-filter-panel {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* v26 final overrides: score clarity and borderless true-black preview. */
.provider-score-explainer {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.8fr);
  gap: 22px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--product-line);
  border-radius: 9px;
  background: var(--product-soft);
}

.provider-score-explainer h3,
.provider-score-explainer p,
.provider-score-explainer dl,
.provider-score-explainer dd {
  margin: 0;
}

.provider-score-explainer h3 {
  margin-top: 5px;
  color: var(--product-ink);
  font-size: 19px;
}

.provider-score-explainer p {
  margin-top: 8px;
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.55;
}

.provider-score-explainer dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.provider-score-explainer dl div {
  min-width: 0;
  padding-left: 14px;
  border-left: 2px solid var(--product-blue);
}

.provider-score-explainer dt {
  margin-bottom: 5px;
  color: var(--product-ink);
  font-size: 12px;
  font-weight: 850;
}

.provider-score-explainer dd {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

.provider-card {
  align-content: start;
  gap: 14px;
  min-height: 290px;
  padding: 18px;
}

.provider-card-heading {
  display: grid;
  min-width: 0;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.provider-card .provider-card-heading img {
  width: 88px;
  height: 48px;
}

.provider-card-heading > div {
  display: grid;
  gap: 3px;
}

.provider-card-heading strong {
  line-height: 1.3;
}

.provider-card-heading span {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 700;
}

.provider-overall-score {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
}

.provider-overall-score > span,
.provider-specialty-score > span {
  color: var(--product-muted);
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.provider-overall-score b {
  color: var(--product-ink);
  font-size: 27px;
  letter-spacing: -0.035em;
  line-height: 1;
}

.provider-overall-score b small {
  color: var(--product-muted);
  font-size: 12px;
  letter-spacing: 0;
}

.provider-overall-why {
  margin: 0;
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.5;
}

.provider-overall-why b,
.provider-specialty-score small b {
  color: var(--product-ink);
}

.provider-specialty-score {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 12px;
  border-left: 3px solid var(--product-blue);
  background: var(--product-soft);
}

.provider-specialty-score strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--product-ink);
  font-size: 13px;
}

.provider-specialty-score strong > b {
  flex: 0 0 auto;
  color: var(--product-blue);
}

.provider-specialty-score small {
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.45;
}

:root[data-theme="dark"] {
  --bg: #000;
  --surface: #000;
  --surface-strong: #000;
  --surface-soft: #000;
  --surface-tint: #000;
  --cool: #000;
  --accent: #2563eb;
  --accent-soft: #071733;
  --accent-dark: #1d4ed8;
  --product-soft: #000;
  --page-top: #000;
  --page-bottom: #000;
  --topbar-bg: #000;
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-lift: 0 24px 58px rgba(0, 0, 0, 0.62);
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .topnav,
:root[data-theme="dark"] .mobile-primary-nav,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stats,
:root[data-theme="dark"] .course-search-panel,
:root[data-theme="dark"] .course-result-card,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .provider-score-explainer,
:root[data-theme="dark"] .provider-specialty-score,
:root[data-theme="dark"] .simple-route-card,
:root[data-theme="dark"] .pathway-provider-card,
:root[data-theme="dark"] .guide-section-card,
:root[data-theme="dark"] .subject-card,
:root[data-theme="dark"] .calculator-result {
  background: #000 !important;
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stats,
:root[data-theme="dark"] .course-result-card,
:root[data-theme="dark"] .provider-card,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .provider-score-explainer,
:root[data-theme="dark"] .simple-route-card,
:root[data-theme="dark"] .pathway-provider-card,
:root[data-theme="dark"] .guide-section-card,
:root[data-theme="dark"] .subject-card,
:root[data-theme="dark"] .calculator-result {
  border-color: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .topnav a[aria-current="page"],
:root[data-theme="dark"] .topnav button[aria-current="page"],
:root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"],
:root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"],
:root[data-theme="dark"] .mobile-page-menu a[aria-current="page"],
:root[data-theme="dark"] .mobile-page-menu button[aria-current="page"] {
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .topnav a[aria-current="page"]::after,
:root[data-theme="dark"] .topnav button[aria-current="page"]::after,
:root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"]::before,
:root[data-theme="dark"] .mobile-primary-nav button[aria-current="page"]::before {
  background: #fff !important;
}

@media (max-width: 900px) {
  .provider-score-explainer,
  .provider-score-explainer dl {
    grid-template-columns: 1fr;
  }

  .provider-score-explainer dl div {
    padding: 0 0 0 12px;
  }
}

@media (max-width: 640px) {
  .provider-score-explainer {
    padding: 16px;
  }

  .provider-card {
    min-height: 0;
    padding: 16px;
  }

  .provider-card-heading {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .provider-card .provider-card-heading img {
    width: 64px;
  }
}

/* v27 comparison workspace: rowed decisions, visible differences, quieter saved library. */
.saved-library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--product-line);
}

.library-state-counts {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.library-state-counts span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 4px;
  padding: 0 11px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: var(--product-soft);
  color: var(--product-muted);
  font-size: 12px;
  font-weight: 750;
}

.library-state-counts strong {
  color: var(--product-ink);
  font-size: 13px;
}

.saved-library-head h3,
.saved-library-head p {
  margin: 0;
}

.saved-library-head h3 {
  color: var(--product-ink);
  font-size: 19px;
}

.saved-library-head p {
  max-width: 680px;
  margin-top: 5px;
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.5;
}

.saved-course-list.course-list.compact {
  grid-template-columns: 1fr;
  transition: opacity 150ms ease, transform 150ms var(--ease-out);
}

.compare-view-active .compare-tray {
  display: none;
}

.compare-empty {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 22px;
}

.compare-empty a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 5px;
  padding: 0 15px;
  border: 1px solid var(--product-blue);
  border-radius: 6px;
  background: var(--product-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 820;
  text-decoration: none;
}

.compare-box.course-compare {
  overflow: hidden;
  padding: 0;
  border-color: var(--product-line);
  border-radius: 9px;
  background: var(--surface);
  animation: compareWorkspaceEnter 220ms var(--ease-out) both;
  transition: opacity 150ms ease, transform 150ms var(--ease-out);
}

.compare-workspace-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border-bottom: 1px solid var(--product-line);
}

.compare-workspace-head h3,
.compare-workspace-head p {
  margin: 0;
}

.compare-workspace-head h3 {
  margin-top: 3px;
  color: var(--product-ink);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.compare-workspace-head p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.5;
}

.compare-kicker {
  color: var(--product-blue);
  font-size: 10.5px;
  font-weight: 880;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.compare-count {
  color: var(--product-muted);
  font-size: 12px;
  font-weight: 780;
}

.compare-toolbar button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--product-ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
}

.compare-toolbar button[aria-pressed="true"] {
  border-color: var(--product-blue);
  background: var(--product-soft);
  color: var(--product-blue);
}

.compare-toolbar .clear-btn {
  border-color: transparent;
  background: transparent;
  color: var(--product-blue);
}

.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--product-line);
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 740;
}

.compare-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.compare-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.compare-legend .is-different {
  background: #dbe8ff;
}

.compare-legend .is-advantage {
  background: #1d4ed8;
}

.compare-legend .is-same {
  border: 1px solid #c8d2e0;
  background: transparent;
}

.course-compare .compare-scroll {
  width: 100%;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #91a7c5 transparent;
  scrollbar-width: thin;
}

.compare-scroll table.course-compare-table {
  width: 100%;
  min-width: max(760px, calc(190px + (var(--compare-columns) * 240px)));
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}

.course-compare-table th,
.course-compare-table td {
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
  color: var(--product-ink);
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}

.course-compare-table tr > :last-child {
  border-right: 0;
}

.course-compare-table tbody tr:last-child > * {
  border-bottom: 0;
}

.course-compare-table thead th {
  background: var(--product-soft);
}

.compare-scroll .course-compare-table .compare-attribute {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 190px;
  min-width: 190px;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--product-line);
}

.course-compare-table thead .compare-attribute {
  z-index: 3;
  background: var(--product-soft);
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 840;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.compare-course-heading {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 150px;
}

.compare-course-heading > span {
  color: var(--product-blue);
  font-size: 11px;
  font-weight: 840;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.compare-course-heading strong {
  color: var(--product-ink);
  font-size: 15px;
  line-height: 1.35;
}

.compare-course-heading small {
  color: var(--product-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

.compare-course-heading button {
  width: fit-content;
  min-height: 32px;
  margin-top: auto;
  padding: 0 10px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--product-blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 820;
}

.course-compare-table tbody .compare-attribute {
  color: var(--product-ink);
}

.course-compare-table tbody .compare-attribute > span,
.course-compare-table tbody .compare-attribute > small {
  display: block;
}

.course-compare-table tbody .compare-attribute > span {
  font-size: 12.5px;
  font-weight: 830;
  line-height: 1.35;
}

.course-compare-table tbody .compare-attribute > small {
  margin-top: 4px;
  color: var(--product-muted);
  font-size: 9.5px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.course-compare-table td {
  font-size: 12.5px;
  line-height: 1.5;
}

.course-compare-table td > span {
  display: block;
}

.course-compare-table .compare-row-different .compare-attribute {
  color: var(--product-blue);
}

.course-compare-table td.compare-cell-different {
  background: #f4f7fd;
}

.course-compare-table td.compare-cell-advantage {
  background: #e7efff;
  box-shadow: inset 4px 0 0 #1d4ed8;
}

.course-compare-table .compare-row-major .compare-attribute {
  border-left: 4px solid #174ea6;
  background: #e7efff;
  color: #0b3b91;
}

.course-compare-table .compare-row-major td.compare-cell-different {
  background: #eef4ff;
  box-shadow: inset 0 3px 0 #174ea6;
}

.course-compare-table .compare-row-major td > span {
  font-weight: 760;
}

.course-compare-table td em {
  display: inline-flex;
  margin-top: 8px;
  min-height: 27px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  background: #1d4ed8;
  color: #fff;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.course-compare-table tbody tr {
  animation: compareRowEnter 190ms var(--ease-out) both;
}

.course-compare-table tbody tr:nth-child(2) {
  animation-delay: 18ms;
}

.course-compare-table tbody tr:nth-child(3) {
  animation-delay: 36ms;
}

.course-compare-table tbody tr:nth-child(4) {
  animation-delay: 54ms;
}

.course-result-card.is-removing,
.course-compare.is-removing,
.compare-tray.is-removing,
.saved-course-list.is-removing {
  pointer-events: none;
  animation: none !important;
  opacity: 0;
  transform: translate3d(0, -5px, 0) scale(0.995);
}

@keyframes compareWorkspaceEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes compareRowEnter {
  from {
    opacity: 0;
    transform: translate3d(4px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.course-compare-table .compare-row-same td {
  color: var(--product-muted);
}

.course-compare-table .compare-links-row td {
  background: var(--surface);
}

.course-compare-table .compare-links-row a {
  display: block;
  width: fit-content;
  margin-bottom: 7px;
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

:root[data-theme="dark"] .compare-box.course-compare,
:root[data-theme="dark"] .compare-workspace-head,
:root[data-theme="dark"] .compare-legend,
:root[data-theme="dark"] .compare-scroll table.course-compare-table,
:root[data-theme="dark"] .course-compare-table th,
:root[data-theme="dark"] .course-compare-table td,
:root[data-theme="dark"] .course-compare-table .compare-attribute,
:root[data-theme="dark"] .course-compare-table thead th,
:root[data-theme="dark"] .course-compare-table .compare-links-row td {
  background: #000 !important;
}

:root[data-theme="dark"] .compare-box.course-compare,
:root[data-theme="dark"] .compare-workspace-head,
:root[data-theme="dark"] .compare-legend,
:root[data-theme="dark"] .course-compare-table th,
:root[data-theme="dark"] .course-compare-table td,
:root[data-theme="dark"] .saved-library-head {
  border-color: #202938 !important;
}

:root[data-theme="dark"] .course-compare-table .compare-attribute {
  box-shadow: 1px 0 0 #202938;
}

:root[data-theme="dark"] .course-compare-table td.compare-cell-different {
  background: #070b12 !important;
}

:root[data-theme="dark"] .course-compare-table td.compare-cell-advantage {
  background: #0b1426 !important;
  box-shadow: inset 4px 0 0 #60a5fa;
}

:root[data-theme="dark"] .course-compare-table .compare-row-major .compare-attribute {
  border-left-color: #fff;
  background: #070b12 !important;
  color: #fff;
}

:root[data-theme="dark"] .course-compare-table .compare-row-major td.compare-cell-different {
  background: #080f1d !important;
  box-shadow: inset 0 3px 0 #fff;
}

:root[data-theme="dark"] .compare-legend .is-different {
  background: #172033;
}

:root[data-theme="dark"] .compare-legend .is-advantage,
:root[data-theme="dark"] .course-compare-table td em {
  background: #fff;
  color: #05070b;
}

:root[data-theme="dark"] .compare-empty a {
  border-color: #fff;
  background: #fff;
  color: #05070b;
}

@media (max-width: 760px) {
  .compare-workspace-head {
    display: grid;
    gap: 14px;
    padding: 17px;
  }

  .compare-toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .compare-count {
    margin-right: auto;
  }

  .compare-toolbar button {
    min-height: 42px;
  }

  .compare-legend {
    gap: 12px;
    padding: 9px 17px;
  }

  .compare-scroll table.course-compare-table {
    min-width: max(690px, calc(126px + (var(--compare-columns) * 210px)));
  }

  .compare-scroll .course-compare-table .compare-attribute {
    width: 126px;
    min-width: 126px;
    padding: 12px 10px;
  }

  .course-compare-table th,
  .course-compare-table td {
    padding: 12px;
  }

  .compare-course-heading {
    min-height: 168px;
  }

  .compare-course-heading strong {
    font-size: 14px;
  }

  .saved-library-head {
    align-items: start;
  }

  .saved-panel > .panel-head {
    align-items: start;
  }

  .library-state-counts {
    width: 100%;
  }

  .library-state-counts span {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-compare,
  .course-compare-table tr,
  .course-result-card.is-removing,
  .compare-tray.is-removing,
  .saved-course-list.is-removing {
    animation: none !important;
    transition: none !important;
  }
}

/* v29 university ranking clarity: restore specialist shortlists and cite current standing. */
.provider-ranking-source {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--product-line);
  color: var(--product-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.provider-ranking-source a {
  color: var(--product-blue);
  font-weight: 800;
  text-decoration: none;
}

.provider-current-standing {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border-left: 3px solid var(--product-blue);
  background: var(--product-soft);
  color: var(--product-blue);
  font-size: 10.5px;
  font-weight: 850;
}

.top-provider-block {
  margin: 0 0 22px;
  padding: 20px;
  border-color: var(--product-line);
  border-radius: 9px;
  background: var(--surface);
}

.top-provider-head {
  margin-bottom: 16px;
}

.top-provider-head .eyebrow {
  margin-bottom: 4px;
  color: var(--product-blue);
  font-size: 10.5px;
  font-weight: 880;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.top-provider-head h3 {
  margin: 0;
  color: var(--product-ink);
  font-size: 20px;
}

.top-provider-head p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--product-muted);
  font-size: 13px;
  line-height: 1.5;
}

.top-provider-head label span {
  color: var(--product-ink);
  font-size: 11px;
  font-weight: 820;
}

.top-provider-head select {
  border-radius: 7px;
  background: var(--surface);
  color: var(--product-ink);
}

.top-provider-grid {
  gap: 12px;
}

.top-provider-card {
  min-height: 210px;
  align-content: start;
  padding: 16px;
  border-color: var(--product-line);
  border-radius: 8px;
  background: var(--surface);
}

.top-provider-card span {
  border-radius: 6px;
  background: var(--product-blue);
}

.top-provider-card img {
  width: 116px;
  height: 44px;
}

.top-provider-card strong {
  margin: 1px 0 0;
  color: var(--product-ink);
  font-size: 15px;
}

.top-provider-card small {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.45;
}

.top-provider-card em {
  margin-top: auto;
  color: var(--product-blue);
  font-size: 11px;
  font-weight: 840;
}

.top-provider-block .rating-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--product-line);
  font-size: 11.5px;
}

:root[data-theme="dark"] .top-provider-block,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .top-provider-head select,
:root[data-theme="dark"] .provider-current-standing {
  background: #000 !important;
}

:root[data-theme="dark"] .provider-ranking-source,
:root[data-theme="dark"] .top-provider-block,
:root[data-theme="dark"] .top-provider-card,
:root[data-theme="dark"] .top-provider-head select,
:root[data-theme="dark"] .top-provider-block .rating-note {
  border-color: #202938 !important;
}

:root[data-theme="dark"] .top-provider-card span {
  background: #fff;
  color: #05070b;
}

:root[data-theme="dark"] .top-provider-card em,
:root[data-theme="dark"] .provider-current-standing,
:root[data-theme="dark"] .top-provider-head .eyebrow {
  color: #fff;
}

:root[data-theme="dark"] .provider-current-standing {
  border-left-color: #fff;
}

@media (max-width: 760px) {
  .top-provider-block {
    padding: 16px;
  }

  .top-provider-head {
    grid-template-columns: 1fr;
  }

  .top-provider-grid {
    grid-template-columns: 1fr;
  }

  .top-provider-card {
    min-height: 0;
  }
}

/* v34 intent-aware search, field-strength ordering and in-place result motion. */
.course-results-region {
  min-width: 0;
}

.search-field-leaders {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 2.28fr);
  gap: 14px 18px;
  margin: 18px 0 16px;
  padding: 16px;
  border: 1px solid var(--product-line);
  border-left: 4px solid var(--product-blue);
  border-radius: 8px;
  background: #f7f9fc;
}

.field-leader-intro {
  display: grid;
  align-content: start;
  gap: 4px;
}

.field-leader-intro > span {
  color: var(--product-blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.field-leader-intro > strong {
  color: var(--product-ink);
  font-size: 18px;
  line-height: 1.25;
}

.field-leader-intro > small {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.field-leader {
  display: grid;
  grid-template-columns: 24px minmax(42px, 58px) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 84px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--product-line);
  border-radius: 7px;
  background: #fff;
  color: var(--product-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 180ms ease, transform 180ms var(--ease-out);
}

.field-leader:hover {
  border-color: #8aa8da;
  box-shadow: 0 9px 22px rgba(10, 32, 68, 0.08);
  transform: translateY(-2px);
}

.field-leader-rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--product-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.field-leader img {
  width: 100%;
  height: 34px;
  object-fit: contain;
}

.field-leader > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-leader strong {
  overflow: hidden;
  color: var(--product-ink);
  font-size: 12.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.field-leader small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--product-muted);
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-field-leaders > p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--product-line);
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.45;
}

.search-field-leaders > p a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--product-blue);
  font-weight: 800;
  text-decoration: none;
}

.search-field-leaders > p svg {
  width: 12px;
  height: 12px;
}

.course-field-signal {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-left: 3px solid var(--product-blue);
  background: #f4f7fc;
  color: var(--product-muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.4;
}

.course-field-signal strong {
  color: var(--product-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-interpretation strong {
  margin-inline: 0.2em;
}

.app-shell.is-state-update main,
.app-shell.is-state-update .hero,
.app-shell.is-state-update .panel,
.app-shell.is-state-update .course-result-card {
  animation: none !important;
}

.app-shell.is-results-updating .course-results-region {
  view-transition-name: course-search-results;
}

html.is-course-results-transition::view-transition-old(root),
html.is-course-results-transition::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.is-course-results-transition::view-transition-old(course-search-results) {
  animation: resultsRegionOut 90ms ease both;
}

html.is-course-results-transition::view-transition-new(course-search-results) {
  animation: resultsRegionIn 210ms var(--ease-out) both;
}

@keyframes resultsRegionOut {
  to {
    opacity: 0.72;
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes resultsRegionIn {
  from {
    opacity: 0;
    transform: translate3d(0, 7px, 0);
  }
}

:root[data-theme="dark"] .search-field-leaders,
:root[data-theme="dark"] .field-leader,
:root[data-theme="dark"] .course-field-signal {
  background: #000;
}

:root[data-theme="dark"] .search-field-leaders {
  border-left-color: #fff;
}

:root[data-theme="dark"] .field-leader-rank {
  background: #fff;
  color: #05070b;
}

:root[data-theme="dark"] .field-leader img {
  padding: 4px;
  border-radius: 4px;
  background: #fff;
}

:root[data-theme="dark"] .field-leader-intro > span,
:root[data-theme="dark"] .course-field-signal strong {
  color: #fff;
}

@media (max-width: 900px) {
  .search-field-leaders {
    grid-template-columns: 1fr;
  }

  .field-leader-list {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .search-field-leaders > p {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .search-field-leaders {
    margin-top: 14px;
    padding: 14px;
  }

  .field-leader-list {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .field-leader {
    min-height: 62px;
  }

  .field-leader small {
    display: none;
  }

  .course-field-signal {
    padding: 8px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-course-results-transition::view-transition-old(course-search-results),
  html.is-course-results-transition::view-transition-new(course-search-results) {
    animation: none !important;
  }
}

/* v38 scoped motion: animate the changed surface, never replay the whole page. */
main,
.hero,
.panel,
html.is-fast-section-jump main {
  animation: none !important;
}

html.ui-ready :where(
  .course-list article,
  .provider-grid > *,
  .top-provider-grid > *,
  .advisor-picks article,
  .income-chip-list article,
  .method-grid article,
  .subject-plan-grid > *,
  .subject-pathway-grid article,
  .subject-career-grid article,
  .guide-plan-grid > *,
  .guide-section-body > *,
  .guide-empty-steps span,
  .guide-answer-review-list article,
  .my-plan-timeline li,
  .my-plan-section-card,
  .my-plan-mini-list section,
  .linear-plan-stage,
  .pathway-route-card,
  .pathway-course-card,
  .simple-route-list > *,
  .simple-checklist .pathway-linear li,
  .useful-route-links
) {
  animation: none;
  animation-delay: 0ms;
}

:is(
  #guide-app,
  #subject-helper-app,
  #calculator-app,
  #pathways-app
).is-state-update :is(main, .hero, .panel) {
  animation: none !important;
  opacity: 1;
  transform: none;
}

#pathways-app.is-state-update .pathway-provider-card {
  animation: none;
}

#subject-helper-app.is-results-updating #subject-helper-result {
  view-transition-name: subject-helper-results;
}

#pathways-app.is-results-updating .simple-route-list {
  view-transition-name: pathway-routes;
}

#pathways-app.is-results-updating .pathway-provider-grid {
  view-transition-name: pathway-providers;
}

html.is-course-results-transition main,
html.is-subject-results-transition main,
html.is-pathway-results-transition main {
  view-transition-name: none;
}

html.is-subject-results-transition::view-transition-old(root),
html.is-subject-results-transition::view-transition-new(root),
html.is-pathway-results-transition::view-transition-old(root),
html.is-pathway-results-transition::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.is-subject-results-transition::view-transition-old(subject-helper-results),
html.is-pathway-results-transition::view-transition-old(pathway-routes),
html.is-pathway-results-transition::view-transition-old(pathway-providers) {
  animation: scopedRegionOut 85ms ease both;
}

html.is-subject-results-transition::view-transition-new(subject-helper-results),
html.is-pathway-results-transition::view-transition-new(pathway-routes),
html.is-pathway-results-transition::view-transition-new(pathway-providers) {
  animation: scopedRegionIn 190ms var(--ease-out) both;
}

@keyframes scopedRegionOut {
  to {
    opacity: 0.76;
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes scopedRegionIn {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

@media (max-width: 760px) {
  html.is-route-pending main,
  html.is-route-pending .guide-main,
  html.is-route-pending .calculator-main,
  html.is-route-pending .subject-main,
  html.is-route-pending .advisor-main,
  html.is-route-pending .my-plan-page,
  html.is-route-pending .pathways-page,
  html.is-route-pending .simple-pathways-page {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-subject-results-transition::view-transition-old(subject-helper-results),
  html.is-subject-results-transition::view-transition-new(subject-helper-results),
  html.is-pathway-results-transition::view-transition-old(pathway-routes),
  html.is-pathway-results-transition::view-transition-new(pathway-routes),
  html.is-pathway-results-transition::view-transition-old(pathway-providers),
  html.is-pathway-results-transition::view-transition-new(pathway-providers) {
    animation: none !important;
  }
}

.course-admission.is-tafe-admission {
  border-left-color: #0f766e;
}

:root[data-theme="dark"] .course-admission.is-tafe-admission {
  border-left-color: #ffffff;
}

/* v41 mobile performance and focus: immediate section changes, compact first screens,
   and compositor-only interaction feedback. */
@media (max-width: 760px) {
  html {
    scroll-behavior: auto !important;
    scroll-padding-top: 62px;
  }

  body {
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-primary-nav,
  .topbar {
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  .mobile-primary-nav a {
    transition:
      color 120ms ease,
      background-color 120ms ease,
      transform 100ms ease !important;
  }

  .mobile-primary-nav a:active {
    transform: scale(0.96);
  }

  .mobile-primary-nav a:focus,
  .mobile-primary-nav a:focus-visible {
    border: 0 !important;
    outline: 0 !important;
  }

  .mobile-primary-nav a[aria-current="page"] {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: inset 0 3px 0 var(--product-blue) !important;
  }

  #courses,
  #providers,
  #tools,
  #saved,
  #about {
    scroll-margin-top: 34px !important;
  }

  .course-finder-hero {
    padding-block: 26px 22px;
  }

  .course-finder-hero h1 {
    max-width: 340px;
    font-size: clamp(32px, 9.4vw, 40px);
    line-height: 1.04;
  }

  .course-finder-hero .hero-copy > p {
    margin-bottom: 17px;
    line-height: 1.45;
  }

  .course-finder-hero .hero-actions {
    gap: 9px;
  }

  .course-finder-hero .primary-action,
  .course-finder-hero .secondary-action {
    min-height: 46px;
  }

  .course-finder-hero .hero-trust {
    margin-top: 17px;
    padding-top: 12px;
  }

  .course-search-panel {
    padding-top: 22px;
  }

  .course-search-panel .panel-head {
    gap: 7px;
  }

  .course-search-panel .panel-head p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .guide-hero,
  .calculator-hero,
  .subject-hero,
  .pathways-hero,
  .simple-pathways-hero {
    min-height: 0 !important;
    padding-block: 24px 18px !important;
  }

  .guide-hero h1,
  .calculator-hero h1,
  .subject-hero h1,
  .pathways-hero h1,
  .simple-pathways-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(31px, 9vw, 39px) !important;
    line-height: 1.04;
  }

  .guide-hero > div > p:last-child,
  .calculator-hero > div > p:last-child,
  .subject-hero > div > p:last-child,
  .pathways-hero > div > p:last-child,
  .simple-pathways-hero > div > p:last-child {
    display: -webkit-box;
    margin-bottom: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .guide-hero .stats,
  .calculator-hero .stats,
  .subject-hero .stats,
  .subject-hero > .data-note {
    display: none;
  }

  .guide-main > .panel,
  .calculator-main > .panel,
  .subject-main > .panel,
  .pathways-page > .panel,
  .simple-pathways-page > .panel {
    padding-top: 22px;
  }

  .guide-main .panel-head p,
  .calculator-main .panel-head p,
  .subject-main .panel-head p,
  .pathways-page .panel-head p,
  .simple-pathways-page .panel-head p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #tools,
  #saved,
  #about,
  .site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 720px;
  }

  .course-filter-panel {
    top: auto !important;
    height: auto !important;
    max-height: calc(100vh - 54px) !important;
    border-radius: 12px 12px 0 0;
    transition:
      opacity 120ms ease,
      transform 170ms var(--ease-out);
  }

  .course-filter-scrim {
    transition: opacity 120ms ease;
  }

  .app-shell.is-state-update,
  #guide-app.is-state-update,
  #subject-helper-app.is-state-update,
  #calculator-app.is-state-update,
  #pathways-app.is-state-update {
    contain: none;
  }

  :root[data-theme="dark"] .mobile-primary-nav a[aria-current="page"] {
    background: transparent !important;
    box-shadow: inset 0 3px 0 #fff !important;
  }
}

@media (max-width: 390px) {
  main,
  .guide-main,
  .calculator-main,
  .subject-main,
  .pathways-page,
  .simple-pathways-page {
    padding-inline: 14px !important;
  }

  .brand {
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-primary-nav a,
  .course-filter-panel,
  .course-filter-scrim {
    transition: none !important;
  }
}

.provider-directory-loading {
  display: grid;
  gap: 6px;
  min-height: 112px;
  align-content: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-soft);
}

.provider-directory-loading strong {
  color: var(--ink);
}

/* v50 focused information architecture, dedicated tools and true-black theme */
:root {
  --product-blue: #123f91;
  --product-blue-hover: #082d70;
  --product-line: #cfd8e6;
  --product-ink: #050914;
  --product-muted: #344258;
  --product-soft: #f5f7fa;
}

body {
  background: #fff !important;
  color: var(--product-ink);
}

.topbar {
  grid-template-columns: minmax(220px, auto) minmax(0, auto) minmax(44px, auto);
  justify-content: center;
  gap: clamp(28px, 5vw, 78px);
}

.topnav {
  justify-content: center;
  gap: clamp(24px, 3vw, 46px);
}

.topnav a,
.topnav button {
  color: #050914;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.tools-home-preview {
  border-left: 4px solid var(--product-blue);
}

.tools-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tools-home-grid .tool-link {
  min-height: 126px;
  align-content: space-between;
  border-radius: 7px;
}

.panel-head-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--product-blue);
  border-radius: 6px;
  color: var(--product-blue);
  font-weight: 800;
  text-decoration: none;
}

.providers-home-panel,
#saved,
#about {
  content-visibility: auto;
  contain-intrinsic-size: auto 1000px;
}

.course-result-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.admission-provider-figure {
  margin: 2px 0;
  padding: 12px;
  border: 1px solid #a9bfdf;
  border-left: 4px solid var(--product-blue);
  border-radius: 6px;
  background: #f5f8fd;
}

.admission-provider-figure small {
  color: var(--product-muted);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.45;
  text-transform: none;
}

.admission-provider-figure a,
.admission-source-links a {
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

.admission-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
}

.tools-page,
.help-page,
.tafe-tools-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.tools-page-hero,
.help-page-hero,
.tafe-tools-hero {
  display: grid;
  max-width: 820px;
  gap: 12px;
  padding: clamp(52px, 7vw, 92px) 0 clamp(34px, 5vw, 60px);
}

.tools-page-hero h1,
.help-page-hero h1,
.tafe-tools-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--product-ink);
  font-size: clamp(40px, 5.2vw, 66px);
  letter-spacing: -0.048em;
  line-height: 1;
}

.tools-page-hero p,
.help-page-hero p,
.tafe-tools-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--product-muted);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.55;
}

.tools-heading-mobile {
  display: none;
}

.tools-page-groups {
  display: grid;
  gap: 18px;
}

.tools-page-group {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2fr);
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(26px, 4vw, 46px) 0;
  border-top: 1px solid var(--product-line);
}

.tools-page-group-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.tools-page-group h2,
.help-layout h2,
.tafe-route-picker h2,
.tafe-route-result h2,
.tafe-checks-panel h2 {
  margin: 0;
  color: var(--product-ink);
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.tools-page-group-copy p,
.tafe-route-picker-copy p {
  margin: 0;
  color: var(--product-muted);
  line-height: 1.55;
}

.tools-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tools-page-card {
  display: grid;
  min-height: 218px;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #fff;
  color: var(--product-ink);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    box-shadow 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.tools-page-card:hover {
  border-color: #8da8d2;
  box-shadow: 0 16px 34px rgba(10, 32, 68, 0.08);
  transform: translateY(-3px);
}

.tools-page-card strong {
  font-size: 21px;
  letter-spacing: -0.025em;
}

.tools-page-card p {
  margin: 0;
  color: var(--product-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tools-card-tag,
.tools-card-action,
.helper-availability {
  color: var(--product-blue);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.tools-card-action {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--product-line);
}

.help-page-hero {
  padding-bottom: 34px;
}

.helper-availability {
  width: fit-content;
  margin-top: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--product-blue);
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
}

.help-starters,
.help-chat,
.tafe-route-picker,
.tafe-route-result,
.tafe-checks-panel {
  border: 1px solid var(--product-line);
  border-radius: 9px;
  background: #fff;
}

.help-starters {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.help-starters h2 {
  font-size: 20px;
}

.help-starter-list,
.help-route-list {
  display: grid;
  gap: 0;
}

.help-starter-list button,
.help-route-list a {
  min-height: 46px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  background: transparent;
  color: var(--product-ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}

.help-starter-list button:hover,
.help-route-list a:hover {
  color: var(--product-blue);
}

.help-route-list strong {
  margin-bottom: 6px;
  color: var(--product-muted);
  font-size: 11px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.help-chat {
  overflow: hidden;
}

.help-chat-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--product-line);
}

.help-chat-head h2 {
  margin-top: 5px;
}

.help-chat-log {
  display: grid;
  max-height: 500px;
  gap: 12px;
  overflow-y: auto;
  padding: 22px 24px;
  scroll-behavior: smooth;
}

.help-chat-empty {
  display: grid;
  min-height: 150px;
  align-content: center;
  gap: 7px;
  color: var(--product-muted);
}

.help-chat-empty p,
.help-message p {
  margin: 0;
  line-height: 1.55;
}

.help-message ul,
.my-plan-message ul {
  display: grid;
  gap: 5px;
  margin: 2px 0 0;
  padding-left: 19px;
}

.help-message code,
.my-plan-message code {
  padding: 1px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--product-blue) 9%, transparent);
  font: 0.92em ui-monospace, SFMono-Regular, Consolas, monospace;
}

.help-message p a,
.my-plan-message p a {
  color: var(--product-blue);
  font-weight: 720;
  text-underline-offset: 3px;
}

.help-message {
  display: grid;
  max-width: 86%;
  gap: 7px;
  padding: 14px 16px;
  border-left: 3px solid var(--product-line);
  background: var(--product-soft);
  animation: helpMessageIn 190ms var(--ease-out) both;
}

.help-message.user {
  justify-self: end;
  border-left: 0;
  border-right: 3px solid var(--product-blue);
}

.help-message > strong {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--product-ink);
  font-size: 12px;
}

.help-message > strong span {
  color: var(--product-muted);
  font-weight: 600;
}

.help-message.is-pending {
  opacity: 0.72;
}

.help-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
}

.help-message-actions a {
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

.help-message-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 3px;
  padding-top: 9px;
  border-top: 1px solid var(--product-line);
}

.help-message-sources > span {
  width: 100%;
  color: var(--product-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.help-message-sources a {
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 760;
  text-underline-offset: 3px;
}

.help-message-sources a:hover {
  text-decoration-thickness: 2px;
}

.help-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--product-line);
}

.help-chat-form textarea {
  min-height: 54px;
  padding: 14px;
  resize: vertical;
}

.help-chat-form button,
.tafe-route-tabs button {
  border: 1px solid var(--product-blue);
  border-radius: 6px;
  background: var(--product-blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 820;
}

.help-chat-form button {
  min-width: 90px;
  padding: 0 20px;
}

.chat-key-hint {
  grid-column: 1 / -1;
  margin-top: -3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.help-disclaimer {
  display: block;
  padding: 0 24px 18px;
  color: var(--product-muted);
  line-height: 1.45;
}

@keyframes helpMessageIn {
  from {
    opacity: 0;
    transform: translate3d(0, 5px, 0);
  }
}

.tafe-tools-hero small {
  color: var(--product-blue);
  font-weight: 780;
}

.tafe-route-picker {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2fr);
  gap: 24px;
  align-items: end;
  padding: 22px;
}

.tafe-route-picker-copy {
  display: grid;
  gap: 6px;
}

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

.tafe-route-tabs button {
  min-height: 54px;
  padding: 8px 12px;
  border-color: var(--product-line);
  background: #fff;
  color: var(--product-ink);
}

.tafe-route-tabs button[aria-selected="true"] {
  border-color: var(--product-blue);
  background: var(--product-blue);
  color: #fff;
}

.tafe-route-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  margin-top: 14px;
  padding: clamp(24px, 4vw, 40px);
}

.tafe-route-summary {
  display: grid;
  align-content: start;
  gap: 13px;
}

.tafe-route-summary > p,
.tafe-checks-panel p,
.tafe-route-detail li {
  color: var(--product-muted);
  line-height: 1.55;
}

.tafe-route-summary dl,
.tafe-route-summary dd {
  margin: 0;
}

.tafe-route-summary dl {
  padding: 13px 0;
  border-top: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
}

.tafe-route-summary dt {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.tafe-route-summary dd {
  margin-top: 5px;
  color: var(--product-ink);
  font-weight: 800;
}

.tafe-route-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tafe-route-detail {
  display: grid;
  gap: 22px;
  padding-left: clamp(20px, 3vw, 38px);
  border-left: 1px solid var(--product-line);
}

.tafe-route-detail h3 {
  margin: 0 0 12px;
  color: var(--product-ink);
}

.tafe-route-detail ul,
.tafe-route-detail ol {
  margin: 0;
  padding-left: 21px;
}

.tafe-route-journey {
  display: grid;
  gap: 7px;
}

.tafe-checks-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  margin-top: 14px;
  padding: 26px;
}

.tafe-checks-panel p {
  margin-bottom: 0;
}

.tafe-official-links {
  display: grid;
}

.tafe-official-links a {
  padding: 12px 0;
  border-bottom: 1px solid var(--product-line);
  color: var(--product-blue);
  font-weight: 760;
  text-decoration: none;
}

:root[data-theme="dark"] {
  --bg: #000;
  --surface: #000;
  --surface-strong: #000;
  --surface-soft: #080808;
  --surface-tint: #0a0a0a;
  --cool: #080808;
  --topbar-bg: rgba(0, 0, 0, 0.98);
  --page-top: #000;
  --page-bottom: #000;
  --product-blue: #78a8ff;
  --product-blue-hover: #9ac0ff;
  --product-line: #30343b;
  --product-ink: #fff;
  --product-muted: #c7ccd5;
  --product-soft: #090909;
  --text: #fff;
  --muted: #c7ccd5;
  --accent: #78a8ff;
  --accent-dark: #fff;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] main,
:root[data-theme="dark"] .app-shell,
:root[data-theme="dark"] #tools-app,
:root[data-theme="dark"] #help-app,
:root[data-theme="dark"] #tafe-tools-app {
  background: #000 !important;
}

:root[data-theme="dark"] :is(
  .panel,
  .course-result-card,
  .provider-card,
  .top-provider-card,
  .tools-page-card,
  .help-starters,
  .help-chat,
  .tafe-route-picker,
  .tafe-route-result,
  .tafe-checks-panel,
  .course-filter-panel,
  .search-field-leaders,
  .field-leader
) {
  background: #000 !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] :is(
  h1,
  h2,
  h3,
  h4,
  .brand,
  .topnav a,
  .topnav button,
  .panel-head h2,
  .course-result-card h3,
  .course-result-card h3 a,
  .provider-card strong,
  .tools-page-card strong,
  .tafe-route-detail h3
) {
  color: #fff !important;
}

:root[data-theme="dark"] :is(
  .primary-action,
  .match-btn,
  .search-form > button,
  .help-chat-form button,
  .tafe-route-tabs button[aria-selected="true"]
) {
  border-color: #fff !important;
  background: #fff !important;
  color: #000 !important;
}

:root[data-theme="dark"] :is(
  .secondary-action,
  .panel-head-action,
  .course-card-actions button,
  .tafe-route-tabs button
) {
  border-color: #777 !important;
  background: #000 !important;
  color: #fff !important;
}

:root[data-theme="dark"] .topnav a[aria-current="page"],
:root[data-theme="dark"] .topnav button[aria-current="page"] {
  color: #fff !important;
}

:root[data-theme="dark"] .topnav a[aria-current="page"]::after,
:root[data-theme="dark"] .topnav button[aria-current="page"]::after {
  background: #fff !important;
}

:root[data-theme="dark"] .admission-provider-figure {
  border-color: #4d5562;
  border-left-color: #fff;
  background: #080808;
}

:root[data-theme="dark"] .admission-provider-figure > span,
:root[data-theme="dark"] .helper-availability,
:root[data-theme="dark"] .tools-card-tag,
:root[data-theme="dark"] .tools-card-action,
:root[data-theme="dark"] .eyebrow {
  color: #fff;
}

:root[data-theme="dark"] a:not(.primary-action):not(.secondary-action):not(.brand):not(.topnav a) {
  color: #78a8ff;
}

/* v55 navigation feedback: keep the active destination clear while the homepage
   scroll spy moves between sections, without shifting the header layout. */
.topnav a::after,
.topnav button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--product-blue);
  content: "";
  opacity: 0;
  transform: scaleX(0.42);
  transform-origin: center;
  transition:
    opacity 150ms ease,
    transform 220ms var(--ease-out);
}

.topnav a[aria-current="page"]::after,
.topnav button[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

html.is-section-nav-changing .topnav a[aria-current="page"],
html.is-section-nav-changing .topnav button[aria-current="page"] {
  animation: activeNavigationSettle 240ms var(--ease-out) both;
}

@keyframes activeNavigationSettle {
  from {
    opacity: 0.72;
    transform: translate3d(0, 2px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

:root[data-theme="dark"] .topnav a::after,
:root[data-theme="dark"] .topnav button::after {
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .topnav a::after,
  .topnav button::after {
    transition: none;
  }

  html.is-section-nav-changing .topnav a[aria-current="page"],
  html.is-section-nav-changing .topnav button[aria-current="page"] {
    animation: none;
  }
}

@media (max-width: 940px) {
  .tools-home-grid,
  .tools-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tools-page-group,
  .tafe-route-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tools-page,
  .help-page,
  .tafe-tools-page {
    width: min(100% - 28px, 680px);
    padding-bottom: 88px;
  }

  .tools-page-hero,
  .help-page-hero,
  .tafe-tools-hero {
    padding: 28px 0 24px;
  }

  .tools-page-hero h1,
  .help-page-hero h1,
  .tafe-tools-hero h1 {
    font-size: clamp(34px, 10vw, 43px);
  }

  .tools-page-hero p,
  .help-page-hero p,
  .tafe-tools-hero p {
    font-size: 15px;
  }

  .tools-page-hero {
    padding-bottom: 18px;
  }

  .tools-heading-desktop,
  .tools-page-hero > p {
    display: none;
  }

  .tools-heading-mobile {
    display: inline;
  }

  .tools-page-hero h1 {
    font-size: 38px;
  }

  .tools-home-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tools-home-grid .tool-link {
    min-height: 96px;
    padding: 14px;
  }

  .tools-home-grid .tool-link small {
    display: none;
  }

  .tools-page-group {
    gap: 17px;
    padding: 24px 0;
  }

  .tools-page-group-copy > p {
    display: none;
  }

  .tools-page-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tools-page-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 17px 4px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }

  .tools-page-card:hover {
    transform: none;
  }

  .tools-card-tag,
  .tools-page-card p {
    display: none;
  }

  .tools-page-card > strong {
    grid-column: 1;
    align-self: center;
    font-size: 18px;
  }

  .tools-card-action {
    grid-column: 2;
    align-self: center;
    padding: 0;
    border: 0;
    font-size: 0;
  }

  .tools-card-action span {
    font-size: 20px;
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-starters {
    padding: 15px;
  }

  .help-starter-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .help-starter-list button {
    min-height: 52px;
    padding: 13px 2px;
    border-width: 0 0 1px;
    border-radius: 0;
    text-align: left;
  }

  .help-route-list {
    display: none;
  }

  .help-chat-head,
  .help-chat-log {
    padding: 17px;
  }

  .help-chat-log {
    max-height: 48vh;
  }

  .help-message {
    max-width: 94%;
  }

  .help-chat-form {
    grid-template-columns: 1fr;
    padding: 12px 17px;
  }

  .help-chat-form button {
    min-height: 46px;
  }

  .help-disclaimer {
    padding: 0 17px 15px;
  }

  .tafe-route-tabs {
    grid-template-columns: 1fr;
  }

  .tafe-route-tabs button {
    min-height: 48px;
    text-align: left;
  }

  .tafe-route-result,
  .tafe-checks-panel {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  .tafe-route-detail {
    padding: 20px 0 0;
    border-top: 1px solid var(--product-line);
    border-left: 0;
  }

  .tafe-route-buttons {
    display: grid;
  }

  .tafe-route-buttons a {
    width: 100%;
  }

  .course-result-card,
  .provider-card,
  .top-provider-card,
  .help-starters,
  .help-chat,
  .tafe-route-picker,
  .tafe-route-result,
  .tafe-checks-panel {
    border-right-width: 0;
    border-left-width: 0;
    border-radius: 0;
  }

  .providers-home-panel .provider-grid {
    content-visibility: auto;
    contain-intrinsic-size: auto 1200px;
  }

  .mobile-primary-nav a {
    border-radius: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tools-page-card,
  .help-message,
  .tafe-route-result {
    animation: none !important;
    transition: none !important;
  }
}

/* v56 seamless updates: only the changed region moves, using compositor-safe
   opacity and transform animation so filters and page switches stay responsive. */
html.is-course-results-transition::view-transition-old(course-search-results) {
  animation: seamlessRegionOut 80ms ease-out both;
}

html.is-course-results-transition::view-transition-new(course-search-results) {
  animation: seamlessRegionIn 180ms var(--ease-out) both;
}

@keyframes seamlessRegionOut {
  to {
    opacity: 0.84;
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes seamlessRegionIn {
  from {
    opacity: 0.84;
    transform: translate3d(0, 5px, 0);
  }
}

:where(
  .tool-link,
  .tools-page-card,
  .course-card-actions button,
  .course-card-actions a,
  .panel-head-action,
  .primary-action,
  .secondary-action
) {
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 180ms ease,
    transform 160ms var(--ease-out);
}

:where(
  .tool-link,
  .tools-page-card,
  .course-card-actions button,
  .course-card-actions a,
  .panel-head-action,
  .primary-action,
  .secondary-action
):active {
  transform: translate3d(0, 1px, 0) scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  html.is-course-results-transition::view-transition-old(course-search-results),
  html.is-course-results-transition::view-transition-new(course-search-results) {
    animation: none !important;
  }
}

/* v65 mobile course-card alignment: admission figures need the full row when
   their UAC value is descriptive text rather than a short numeric rank. */
@media (max-width: 600px) {
  .course-provider img {
    flex: 0 0 76px;
  }

  .course-provider > span {
    min-width: 0;
    line-height: 1.3;
  }

  .course-summary h3 {
    overflow-wrap: anywhere;
  }

  .course-admission,
  .course-admission.is-tafe-admission {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
  }

  .course-admission .admission-number,
  .course-admission .admission-provider-figure,
  .course-admission > small,
  .course-admission .admission-source-links {
    grid-column: 1 / -1;
    width: 100%;
  }

  .course-admission .admission-number {
    align-content: start;
    padding: 13px 0;
  }

  .course-admission .admission-number:first-child {
    padding-top: 0;
  }

  .course-admission .admission-number strong {
    justify-self: start;
    max-width: 100%;
    font-size: 24px;
    line-height: 1.12;
    overflow-wrap: break-word;
  }

  .course-admission .admission-definition {
    margin-top: 4px;
  }

  .course-admission .admission-source-links {
    display: grid;
    gap: 0;
  }

  .course-admission .admission-source-links a {
    min-height: 42px;
    align-items: center;
    margin: 0;
  }

  .course-card-actions button {
    white-space: nowrap;
  }
}

/* v63 safe document navigation: cross-document snapshots can leave the outgoing
   page visibly stacked over the destination in some Chromium/Opera builds.
   Animate only the newly loaded document, and keep the active desktop tab as a
   clean underline without an inherited box or side borders. */
body {
  animation: safeDocumentArrival 150ms var(--ease-out) both !important;
}

@keyframes safeDocumentArrival {
  from {
    opacity: 0.94;
  }

  to {
    opacity: 1;
  }
}

.topbar .topnav > a,
.topbar .topnav > button,
.topbar .topnav > a[aria-current="page"],
.topbar .topnav > button[aria-current="page"] {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.topbar .topnav > a[aria-current="page"],
.topbar .topnav > button[aria-current="page"] {
  color: var(--product-blue) !important;
}

:root[data-theme="dark"] .topbar .topnav > a[aria-current="page"],
:root[data-theme="dark"] .topbar .topnav > button[aria-current="page"] {
  color: #fff !important;
}

.topbar .topnav > a:focus-visible,
.topbar .topnav > button:focus-visible {
  outline: 3px solid var(--product-blue);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none !important;
  }
}

/* v64 Subject Helper completeness and the approval-based My Plan copilot. */
.subject-check-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.subject-check-list li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.subject-check-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.my-plan-copilot {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  scroll-margin-top: 88px;
  overflow: hidden;
}

.my-plan-copilot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.my-plan-copilot-head > div {
  max-width: 780px;
}

.my-plan-copilot-head h2 {
  margin: 4px 0 7px;
  color: var(--text);
  font-size: clamp(23px, 2.6vw, 32px);
  letter-spacing: -0.025em;
}

.my-plan-copilot-head p:not(.eyebrow),
.my-plan-copilot-rules span,
.my-plan-chat-empty p,
.my-plan-message > div,
.my-plan-proposal p,
.my-plan-change-status span {
  color: var(--muted);
  line-height: 1.55;
}

.my-plan-copilot-head .helper-availability {
  flex: 0 0 auto;
  margin-top: 3px;
  white-space: nowrap;
}

.my-plan-copilot-rules,
.my-plan-change-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 13px 15px;
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
}

.my-plan-copilot-rules strong,
.my-plan-change-status strong {
  color: var(--text);
}

.my-plan-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-plan-prompt-row button {
  min-height: 39px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 750;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms var(--ease-out);
}

.my-plan-prompt-row button:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  transform: translateY(-1px);
}

.my-plan-chat-log {
  display: grid;
  align-content: start;
  min-height: 180px;
  max-height: 560px;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

.my-plan-chat-empty {
  display: grid;
  min-height: 140px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 20px;
  text-align: center;
}

.my-plan-chat-empty strong {
  color: var(--text);
  font-size: 16px;
}

.my-plan-chat-empty p,
.my-plan-message p,
.my-plan-proposal p {
  margin: 0;
}

.my-plan-message {
  display: grid;
  width: min(86%, 760px);
  gap: 8px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 6%, transparent);
  animation: myPlanMessageIn 210ms var(--ease-out) both;
}

.my-plan-message.user {
  justify-self: end;
  border-left: 0;
  border-right: 3px solid var(--text);
}

.my-plan-message.is-pending {
  opacity: 0.72;
}

.my-plan-message > strong {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
}

.my-plan-message > strong span {
  color: var(--muted);
  font-weight: 600;
}

.my-plan-message > div > p + p {
  margin-top: 8px;
}

.my-plan-proposals {
  display: grid;
  gap: 9px;
  padding-top: 3px;
}

.my-plan-proposal {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.my-plan-proposal > span {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.my-plan-proposal > strong {
  color: var(--text);
  font-size: 15px;
}

.my-plan-proposal > strong b {
  padding: 0 3px;
  color: var(--accent);
}

.my-plan-proposal > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 3px;
}

.my-plan-proposal button,
.my-plan-chat-form button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
}

.my-plan-proposal button.clear-btn {
  background: transparent;
  color: var(--text);
}

.my-plan-proposal em {
  color: var(--muted);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 750;
}

.my-plan-proposal.applied {
  border-color: color-mix(in srgb, #16a34a 45%, var(--line));
  background: color-mix(in srgb, #16a34a 7%, var(--surface));
}

.my-plan-proposal.failed {
  border-color: color-mix(in srgb, #dc2626 48%, var(--line));
}

.my-plan-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.my-plan-chat-form textarea {
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
}

.my-plan-chat-form button {
  min-width: 132px;
}

.my-plan-change-status {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  border-left-color: #16a34a;
}

.my-plan-change-status.is-visible {
  display: grid;
  animation: myPlanMessageIn 220ms var(--ease-out) both;
}

.my-plan-change-status > div {
  display: grid;
  gap: 3px;
}

.my-plan-change-status a {
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.my-plan-copilot .help-disclaimer {
  color: var(--muted);
  line-height: 1.45;
}

@keyframes myPlanMessageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

:root[data-theme="dark"] .my-plan-chat-log,
:root[data-theme="dark"] .my-plan-copilot-rules,
:root[data-theme="dark"] .my-plan-change-status {
  background: #050505;
}

:root[data-theme="dark"] .my-plan-message,
:root[data-theme="dark"] .my-plan-proposal,
:root[data-theme="dark"] .my-plan-prompt-row button,
:root[data-theme="dark"] .my-plan-chat-form textarea {
  background: #000;
}

:root[data-theme="dark"] .my-plan-proposal button,
:root[data-theme="dark"] .my-plan-chat-form button {
  border-color: #fff;
  background: #fff;
  color: #000;
}

:root[data-theme="dark"] .my-plan-proposal button.clear-btn {
  background: transparent;
  color: #fff;
}

@media (max-width: 760px) {
  .my-plan-copilot-head,
  .my-plan-chat-form,
  .my-plan-change-status {
    grid-template-columns: 1fr;
  }

  .my-plan-copilot-head {
    display: grid;
    gap: 12px;
  }

  .my-plan-copilot-head .helper-availability {
    white-space: normal;
  }

  .my-plan-copilot-rules {
    grid-template-columns: 1fr;
  }

  .my-plan-prompt-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .my-plan-message {
    width: 100%;
  }

  .my-plan-chat-log {
    max-height: 66vh;
    padding: 12px;
  }

  .my-plan-chat-form button,
  .my-plan-change-status a {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .my-plan-message,
  .my-plan-change-status.is-visible {
    animation: none;
  }
}
