:root {
  color: #18343b;
  background: #f5f7f6;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
  --ink: #18343b;
  --muted: #64777c;
  --line: #dfe8e9;
  --ocean: #0f7282;
  --ocean-dark: #0b5563;
  --paper: #ffffff;
  --warm: #d97932;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
#root { min-height: 100vh; }
button, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, summary:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid rgba(15, 114, 130, .28);
  outline-offset: 2px;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 30;
  transform: translateY(-150%);
  border-radius: 9px;
  padding: 9px 12px;
  color: white;
  background: var(--ocean-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.route-loading {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  background: rgba(11, 85, 99, .94);
  box-shadow: 0 8px 24px rgba(11, 85, 99, .22);
  font-size: 12px;
  font-weight: 700;
  animation: route-loading-in .16s ease-out both;
}
.route-loading-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,.42);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
#root.is-loading .hero,
#root.is-loading .page-shell {
  transition: opacity .16s ease;
}
#root.is-loading .page-shell { opacity: .78; }
#root.is-loading [data-major],
#root.is-loading [data-direction] { pointer-events: none; }
@keyframes route-loading-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.hero {
  background: var(--ocean-dark);
  color: white;
  padding: 24px 18px 64px;
}
.hero-inner {
  max-width: 1160px;
  margin: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  position: relative;
}
.hero-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}
.site-brand:hover, .site-brand:focus-visible { color: #fff; }
.brand-name { font-size: 18px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; }
.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.page-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.page-actions a:hover, .page-actions a:focus-visible { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.16); }
.page-actions .home-action { border-color: #b9dfd2; color: var(--ocean-dark); background: #eaf8f2; }
.page-actions .home-action:hover, .page-actions .home-action:focus-visible { background: #fff; }
.page-actions .home-action > span:first-child { margin-right: 5px; font-size: 16px; line-height: 1; }
.action-home-short { display: none; }
.breadcrumbs {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  min-width: 0;
  color: #c8e1e4;
  font-size: 12px;
  line-height: 1.4;
}
.breadcrumbs a { color: #e8f5f6; text-decoration: none; }
.breadcrumbs a:hover, .breadcrumbs a:focus-visible { text-decoration: underline; }
.breadcrumb-separator { color: rgba(255,255,255,.62); }
.hero-copy { grid-column: 1 / -1; min-width: 0; }
.eyebrow {
  margin: 0 0 5px;
  color: #b8dde2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 { margin: 0; font-size: clamp(24px, 5vw, 36px); letter-spacing: -.04em; }
.hero p:last-child { margin: 6px 0 0; color: #d5e7e9; font-size: 13px; }
.degree-type-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  vertical-align: 1px;
}
.verified {
  grid-column: 1 / -1;
  justify-self: end;
  width: max-content;
  color: #cde9dc;
  background: rgba(121, 210, 164, .12);
  border: 1px solid rgba(121, 210, 164, .25);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.verified.partial, .verified.review {
  color: #ffe4b6;
  background: rgba(234, 177, 94, .15);
  border-color: rgba(234, 177, 94, .35);
}

.page-shell {
  max-width: 1160px;
  margin: -40px auto 0;
  padding: 0 12px 44px;
  position: relative;
}
.control-panel, .section-block, footer {
  background: var(--paper);
  border: 1px solid rgba(24, 52, 59, .07);
  box-shadow: 0 10px 32px rgba(27, 63, 70, .055);
  border-radius: var(--radius);
}
.control-panel { padding: 16px; margin-bottom: 14px; }
.major-switch {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf2f3;
}
.major-switch button {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafa;
  color: #4d6368;
  padding: 10px 12px;
  text-align: left;
}
.major-switch button b { font-size: 13px; }
.major-switch button span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (max-width: 700px) {
  .major-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 701px) and (max-width: 900px) {
  .major-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.major-switch button.active {
  border-color: var(--ocean-dark);
  background: var(--ocean-dark);
  color: white;
}
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.control-label span, .year-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.control-label strong { font-size: 14px; text-align: right; }
.direction-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.direction-tabs button {
  min-width: 72px;
  flex: 1 0 auto;
  border: 1px solid var(--line);
  background: #fafcfc;
  color: #4d6368;
  border-radius: 12px;
  padding: 10px 9px;
  display: grid;
  gap: 2px;
  text-align: left;
}
.direction-tabs button b { font-size: 14px; }
.direction-tabs button span { font-size: 11px; white-space: nowrap; max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
.direction-tabs button.active {
  color: white;
  border-color: var(--ocean);
  background: var(--ocean);
}
.single-program-note {
  margin: 0;
  border-radius: 11px;
  background: #f2f7f7;
  color: var(--muted);
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.6;
}
.year-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #edf2f3;
  margin-top: 5px;
  padding-top: 12px;
}
.year-row > span { white-space: nowrap; flex: 0 0 auto; }
.year-scroller { display: flex; flex: 1 1 220px; min-width: 0; gap: 6px; overflow-x: auto; padding: 2px 2px 5px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.year-row button, .filter-tabs button {
  border: 0;
  border-radius: 999px;
  background: #eef3f4;
  color: #566b70;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
}
.year-row button.active, .filter-tabs button.active { background: #dceef0; color: var(--ocean-dark); }
.year-row button[data-coverage="score_only"] { box-shadow: inset 0 -2px 0 #d99a52; }
.year-row button[data-coverage="partial"] { box-shadow: inset 0 -2px 0 #b98a43; }
.year-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.year-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #3f9c79; }
.legend-dot.score-only { background: #d99a52; }
.legend-dot.partial { background: #b98a43; }

.coverage-banner {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #cde3d9;
  border-radius: 12px;
  color: #2e674e;
  background: #eff9f3;
  font-size: 12px;
  line-height: 1.55;
}
.coverage-banner.partial, .coverage-banner.review {
  border-color: #ead7b9;
  color: #77551f;
  background: #fff8eb;
}
.coverage-banner strong { white-space: nowrap; }
.exam-change-banner {
  display: block;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 2px solid #3d9b7c;
  border-radius: 12px;
  color: #155c4a;
  background: #edfbf3;
  font-size: 12px;
  line-height: 1.55;
}
.exam-change-banner.before-change {
  border-color: #d89a23;
  color: #704b12;
  background: #fff8e8;
}
.exam-change-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.exam-change-head strong { font-size: 13px; }
.exam-change-status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: #2b8a6e;
  font-size: 11px;
  font-weight: 800;
}
.before-change .exam-change-status { background: #c27d11; }
.exam-change-banner p { margin: 7px 0 6px; }
.exam-change-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 7px 0;
}
.exam-change-timeline span {
  padding: 6px 8px;
  border-radius: 7px;
  color: currentColor;
  background: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 700;
}
.exam-change-banner small { display: block; font-size: 11px; line-height: 1.5; }
.exam-change-banner b { font-weight: 800; }

.section-block { padding: 18px 16px; margin: 14px 0; overflow: hidden; }
.section-title { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.section-title > span {
  color: var(--ocean);
  background: #e5f1f2;
  border-radius: 8px;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 800;
}
.section-title h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.metric-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fcfdfd;
}
.metric-card p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.metric-card strong { color: var(--ink); font-size: clamp(25px, 7vw, 34px); letter-spacing: -.045em; }
.metric-card small { margin-left: 4px; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.metric-card:first-child { border-top: 3px solid var(--ocean); }
.overview-notes {
  margin-top: 12px;
  border-left: 3px solid #b8d9dd;
  background: #f3f8f8;
  border-radius: 0 10px 10px 0;
  padding: 10px 12px;
  color: #52676c;
  font-size: 12px;
  line-height: 1.7;
}
.overview-notes p { margin: 0; }
.overview-notes p + p { margin-top: 2px; }
.overview-notes b { color: var(--ink); }
.chart { width: 100%; height: 300px; }
.chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-svg [data-tip] { cursor: crosshair; }
.chart-svg [data-tip]:focus { outline: none; filter: brightness(.82); }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: -7px 0 4px;
}
.chart-legend button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #52676c;
  padding: 3px;
  min-height: 32px;
  font-size: 11px;
}
.chart-legend button i {
  width: 15px;
  height: 3px;
  border-radius: 2px;
  background: var(--series-color);
}
.chart-legend button.muted { color: #98a5a8; text-decoration: line-through; opacity: .65; }
.chart-tooltip {
  position: fixed;
  z-index: 20;
  max-width: 180px;
  border-radius: 8px;
  padding: 7px 9px;
  color: white;
  background: #102f37;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  pointer-events: none;
  font-size: 11px;
  line-height: 1.4;
}

.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; overscroll-behavior-x: contain; scrollbar-color: #a9c4c8 #f1f6f6; }
.table-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to left, rgba(255,255,255,.94), rgba(255,255,255,0));
}
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td {
  border-bottom: 1px solid #e8eeee;
  padding: 11px 10px;
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
}
thead th { color: #5c7075; background: #f2f6f6; font-weight: 700; }
tbody th { text-align: left; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.core-table th:first-child, .core-table td:first-child,
.candidate-table th:first-child, .candidate-table td:first-child,
.subject-table th:first-child, .subject-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--paper);
  box-shadow: 5px 0 9px rgba(24, 52, 59, .06);
}
.core-table thead th:first-child, .candidate-table thead th:first-child,
.subject-table thead th:first-child { z-index: 3; background: #f2f6f6; }
.core-table .active-row th:first-child { background: #edf7f7; }
.core-table { min-width: 720px; }
.active-row { background: #edf7f7; }
.active-row th { color: var(--ocean-dark); }
.scroll-hint { text-align: center; margin: 8px 0 0; color: #8a999d; font-size: 11px; }

.candidate-summary {
  margin: -2px 0 14px;
  color: #3f565b;
  background: #f4f8f8;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.65;
}
.candidate-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tabs button small { margin-left: 4px; opacity: .7; font-size: 10px; }
.sort-tools { display: flex; gap: 8px; align-items: center; }
.sort-tools label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.sort-tools select {
  flex: 1;
  max-width: 170px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 8px 28px 8px 9px;
}
.sort-direction {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 12px;
}
.candidate-table { min-width: 610px; }
.candidate-table tbody tr:hover { background: #f7fafa; }
.subject-table { min-width: 720px; }
.subject-table tbody tr:hover { background: #f7fafa; }
.subject-note {
  margin: -4px 0 12px;
  color: #496269;
  font-size: 13px;
  line-height: 1.65;
}
.subject-match-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f5f8f8;
  color: #687b80;
  font-size: 12px;
  line-height: 1.6;
}
.status { display: inline-block; min-width: 50px; text-align: center; border-radius: 999px; padding: 4px 7px; font-weight: 700; }
.status.admitted { color: #26724b; background: #e3f3e9; }
.status.rejected { color: #a33d3d; background: #fbe8e8; }
.status.pending { color: #7d641f; background: #f7f0d8; }
.record-count { margin: 8px 2px 0; text-align: right; color: var(--muted); font-size: 11px; }

.advice-section { background: #123f49; color: white; }
.advice-section .section-title > span { background: rgba(255,255,255,.12); color: #c2e2e6; }
.advice-section .section-title p { color: #b8d1d5; }
.advice-grid { display: grid; gap: 9px; }
.advice-grid article { border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.045); }
.advice-grid b { color: #f2c58c; font-size: 12px; }
.advice-grid p { margin: 5px 0 0; color: #e1edef; font-size: 13px; line-height: 1.65; }
.disclaimer { margin: 12px 0 0; color: #b8d1d5; font-size: 11px; }

.details-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.details-card summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.details-card summary::-webkit-details-marker { display: none; }
.details-card summary::after { content: "＋"; margin-left: auto; color: var(--ocean); }
.details-card[open] summary::after { content: "－"; }
.details-card summary span { font-weight: 700; font-size: 13px; }
.details-card summary small { color: var(--muted); font-size: 11px; }
.details-card dl {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  margin: 0;
  padding: 2px 14px 14px;
  border-top: 1px solid #edf2f3;
}
.details-card dt, .details-card dd { margin: 0; padding: 10px 0; border-bottom: 1px solid #edf2f3; font-size: 12px; line-height: 1.55; }
.details-card dt { color: var(--muted); }
.details-card dd { text-align: right; }
.difference-note { grid-column: 1 / -1; padding: 12px; margin-top: 12px; border-radius: 10px; color: #68451d; background: #fff5e7; font-size: 12px; }
.difference-note p { margin: 4px 0 0; line-height: 1.6; }

footer { padding: 18px 16px; margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
footer b { color: var(--ink); }
footer p { margin: 3px 0; }
footer a { display: inline-block; margin-top: 10px; color: var(--ocean-dark); font-weight: 700; text-decoration: none; }
.footer-note { border-top: 1px solid #edf2f3; margin-top: 14px !important; padding-top: 12px; }
.footer-detail, .footer-source { min-width: 0; }
.filing-records { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 12px; text-align: center; }
.filing-records a { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.filing-records a:hover, .filing-records a:focus-visible { color: var(--ocean-dark); text-decoration: underline; }
.police-record span { margin-right: 4px; color: #d33d3d; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] {
  color: var(--ocean-dark);
  background: #eaf8f2;
}
.info-page { display: block; }
.info-section { margin-top: 14px; }
.home-program-grid, .home-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-program-card, .home-tool-grid a { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fbfdfd; text-decoration: none; }
.home-program-card:hover, .home-program-card:focus-visible, .home-tool-grid a:hover, .home-tool-grid a:focus-visible { border-color: #8fc9bc; background: #eef9f5; }
.home-program-card > span { color: var(--ocean); font-size: 12px; font-weight: 900; }
.home-program-card strong, .home-tool-grid strong { font-size: 15px; }
.home-program-card small, .home-tool-grid span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.home-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info-section > p, .info-section li { color: var(--ink); font-size: 14px; line-height: 1.85; }
.info-section > p { margin: 0 0 10px; }
.info-list { margin: 0; padding-left: 20px; }
.info-list li + li { margin-top: 6px; }
.info-notice { border-left: 4px solid var(--warm); background: #fffaf2; }
.info-feedback { border-left: 4px solid var(--ocean); }
.info-muted { color: var(--muted) !important; font-size: 13px !important; }
.info-definition { display: grid; gap: 0; margin: 0 0 10px; }
.info-definition > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #edf2f3; }
.info-definition dt { color: var(--muted); font-size: 13px; }
.info-definition dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 800; text-align: right; }
.source-link { display: inline-flex; align-items: center; min-height: 38px; margin-top: 4px; padding: 8px 12px; border: 1px solid #b9dfd2; border-radius: 10px; color: var(--ocean-dark); background: #eef9f5; font-size: 13px; font-weight: 800; text-decoration: none; }
.source-link:hover, .source-link:focus-visible { border-color: var(--ocean); background: #e4f5ef; }
.info-page footer { margin-top: 14px; }
.info-page .footer-note a { display: inline; margin: 0; font-size: inherit; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 12px; }
.footer-nav a { display: inline; margin: 0; color: var(--ocean-dark); font-size: 12px; }
.footer-nav a:hover, .footer-nav a:focus-visible { text-decoration: underline; }

.state-page { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 24px; }
.state-page h1 { margin: 4px 0 8px; }
.state-page button { justify-self: center; border: 0; border-radius: 10px; background: var(--ocean); color: white; padding: 10px 16px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.seo-fallback { max-width: 760px; margin: 24px auto; padding: 24px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; line-height: 1.7; }
.seo-fallback h1 { margin: 0 0 10px; font-size: clamp(24px, 5vw, 34px); }
.seo-fallback p { margin: 6px 0; color: var(--muted); font-size: 14px; }
.seo-fallback-brand { display: inline-flex; margin-bottom: 12px; color: var(--ocean-dark); font-size: 18px; font-weight: 900; text-decoration: none; }
.seo-fallback-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.seo-fallback-nav a { padding: 6px 9px; border-radius: 8px; color: var(--ocean-dark); background: #eef9f5; font-size: 12px; font-weight: 800; text-decoration: none; }
.loader { width: 34px; height: 34px; border: 3px solid #dce8e9; border-top-color: var(--ocean); border-radius: 50%; animation: spin .75s linear infinite; justify-self: center; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 700px) {
  .hero { padding: 34px 28px 74px; }
  .hero-inner { grid-template-columns: auto 1fr auto; }
  .verified { grid-column: 1 / -1; }
  .page-shell { padding-inline: 22px; margin-top: -44px; }
  .control-panel, .section-block { padding: 22px; }
  .direction-tabs button { min-width: 120px; }
  .metric-grid { grid-template-columns: repeat(4, 1fr); }
  .metric-card { min-height: 116px; }
  .candidate-tools { grid-template-columns: 1fr auto; align-items: center; }
  .advice-grid { grid-template-columns: repeat(2, 1fr); }
  .chart { height: 340px; }
  footer { display: grid; grid-template-columns: 1fr auto; align-items: start; padding: 22px; }
  footer a { margin: 0; }
  .footer-note { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .page-shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .control-panel, .overview-section, .section-block:nth-of-type(4),
  .section-block:nth-of-type(5), .section-block:nth-of-type(6),
  .competition-section, .advice-section, .section-block:nth-of-type(8), footer {
    grid-column: 1 / -1;
  }
  .control-panel, .section-block, footer { margin: 0; }
  .metric-card strong { font-size: 34px; }
  .advice-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 450px) {
  .hero { padding-bottom: 58px; }
  .major-switch button { padding: 9px 10px; align-items: flex-start; }
  .major-switch button b { flex: 0 0 auto; }
  .coverage-banner { display: block; }
  .coverage-banner span { display: block; margin-top: 2px; }
  .exam-change-banner { display: block; }
  .exam-change-banner small { margin-top: 2px; }
  .exam-change-timeline { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 16px; }
  .chart { height: 294px; }
  .scroll-hint { padding: 4px 8px; border-radius: 999px; background: #f5f8f8; }
  .site-nav { gap: 4px; padding: 6px; }
  .site-nav a { flex: 1 1 calc(50% - 4px); justify-content: center; min-height: 36px; padding-inline: 7px; font-size: 12px; }
  .home-program-grid, .home-tool-grid { grid-template-columns: 1fr; }
  .info-definition > div { align-items: flex-start; }
  .info-definition dd { max-width: 58%; }
}

.compare-entry { margin: 10px 0 0; text-align: right; }
.compare-entry a, .hero-link { color: var(--ocean-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.compare-entry-prominent { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; padding: 15px 18px; border: 1px solid #b9dfd2; border-radius: 15px; color: var(--ocean-dark); background: linear-gradient(110deg, #eaf8f2, #f7fcfa); text-align: left; text-decoration: none; box-shadow: 0 8px 20px rgba(16, 101, 88, .08); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.compare-entry-prominent:hover, .compare-entry-prominent:focus-visible { border-color: var(--ocean); box-shadow: 0 10px 26px rgba(16, 101, 88, .14); transform: translateY(-1px); }
.compare-entry-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: white; background: var(--ocean); font-size: 22px; font-weight: 800; }
.compare-entry-prominent > span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
.compare-entry-prominent b { font-size: 15px; }
.compare-entry-prominent small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.compare-entry-prominent > strong { color: var(--ocean); font-size: 20px; }
.hero-link { align-self: start; color: #d5e7e9; border: 1px solid rgba(255,255,255,.35); padding: 8px 10px; border-radius: 10px; }
.competition-card { display: grid; grid-template-columns: minmax(130px, .75fr) 1fr; gap: 14px 18px; align-items: center; padding: 18px; border: 1px solid #d8e9e8; border-radius: 15px; background: linear-gradient(135deg, #f5fbfa, #fff); }
.competition-score { display: flex; align-items: baseline; gap: 2px; color: var(--ocean-dark); }
.competition-score strong { font-size: clamp(42px, 9vw, 68px); line-height: .9; letter-spacing: -.06em; }
.competition-score span { color: var(--muted); font-size: 14px; }
.competition-score em { display: block; margin-left: 8px; padding: 4px 8px; border-radius: 999px; color: #fff; background: var(--ocean); font-size: 12px; font-style: normal; font-weight: 800; }
.competition-stars { color: #e39b3c; letter-spacing: 3px; font-size: 20px; }
.competition-explanation { grid-column: 1 / -1; margin: 0; color: var(--ink); font-size: 13px; line-height: 1.7; }
.competition-components { grid-column: 1 / -1; display: grid; gap: 8px; }
.competition-component > div { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.competition-component > div span { flex: 1; color: var(--muted); }
.competition-component b { color: var(--ink); }
.competition-component small { color: #8b9a9c; }
.competition-component progress { width: 100%; height: 7px; appearance: none; }
.competition-component progress::-webkit-progress-bar { border-radius: 999px; background: #e5eeee; }
.competition-component progress::-webkit-progress-value { border-radius: 999px; background: var(--ocean); }
.competition-component progress::-moz-progress-bar { border-radius: 999px; background: var(--ocean); }
.competition-warning, .competition-missing { grid-column: 1 / -1; margin: 0; padding: 9px 11px; border-radius: 9px; font-size: 12px; line-height: 1.55; }
.competition-warning { color: #7a4d16; background: #fff5e4; }
.competition-missing { color: #687b7f; background: #f2f6f6; }
.compare-page { display: block; }
.compare-controls { display: grid; grid-template-columns: 1fr auto 1fr 160px; align-items: end; gap: 12px; }
.compare-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.compare-controls select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfdfd; padding: 8px 10px; }
.versus { align-self: center; color: var(--warm); font-size: 14px; font-weight: 900; }
.compare-selector-section { border: 2px solid #b9dfd2; }
.compare-selector-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.compare-selector-heading .eyebrow { margin: 0; color: var(--ocean); }
.compare-selector-heading h2 { margin: 2px 0 3px; font-size: 22px; }
.compare-selector-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.compare-selector-heading > strong { flex: 0 0 auto; padding: 9px 12px; border-radius: 999px; color: var(--ocean-dark); background: #eaf8f2; font-size: 12px; }
.compare-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.compare-option { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fbfdfd; cursor: pointer; transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.compare-option:hover { border-color: #8fc9bc; }
.compare-option.selected { border-color: var(--ocean); background: #eef9f5; box-shadow: inset 0 0 0 1px rgba(15, 114, 130, .12); }
.compare-option input { width: 17px; height: 17px; accent-color: var(--ocean); }
.compare-option span { display: grid; gap: 2px; min-width: 0; font-size: 12px; font-weight: 700; line-height: 1.3; }
.compare-option span b { color: var(--ocean-dark); font-size: 11px; }
.compare-year-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.compare-year-row label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.compare-year-row select { min-width: 150px; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: #fff; }
.compare-table { min-width: 620px; }
.compare-table th:first-child { width: 130px; }
.compare-table td, .compare-table th { text-align: center; }
.compare-table tbody th { color: var(--muted); text-align: left; }
.compare-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.compare-index-card { padding: 16px; border: 1px solid #dfe8e9; border-radius: 14px; background: #fbfdfd; }
.compare-index-card h3 { margin: 0 0 10px; color: var(--ink); font-size: 14px; }
.compare-index-card > div { display: flex; align-items: baseline; gap: 4px; }
.compare-index-card strong { color: var(--ocean-dark); font-size: 42px; line-height: 1; }
.compare-index-card span { color: var(--muted); }
.compare-index-card b { margin-left: 8px; color: var(--warm); font-size: 12px; }
.compare-index-card p, .compare-analysis p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.compare-analysis { border-left: 4px solid var(--ocean); }
.compare-analysis h2 { margin: 0; font-size: 17px; }
@media (max-width: 700px) {
  .compare-controls { grid-template-columns: 1fr; }
  .versus { justify-self: center; }
  .compare-index-grid { grid-template-columns: 1fr; }
  .competition-card { grid-template-columns: 1fr; }
  .competition-score { justify-content: center; }
  .competition-stars { text-align: center; }
  .compare-selector-heading { align-items: flex-start; flex-direction: column; }
  .compare-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-year-row { justify-content: stretch; }
  .compare-year-row label, .compare-year-row select { width: 100%; }
}

/* Desktop pages use one readable column. The competition section changed the
   old nth-of-type ordering, so a single flow prevents charts from collapsing
   into a half-width column with large unused space beside them. */
@media (min-width: 1024px) {
  .page-shell { display: block; }
  .page-shell > .control-panel,
  .page-shell > .section-block,
  .page-shell > footer { margin: 0 0 16px; }
}

.conclusion-section { border: 2px solid #b9dfd2; }
.quick-conclusion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.conclusion-card { min-width: 0; padding: 15px; border: 1px solid #dcebe7; border-radius: 14px; background: #fbfdfc; }
.conclusion-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.conclusion-label { display: block; margin-bottom: 7px; color: var(--ocean); font-size: 12px; font-weight: 800; }
.conclusion-difficulty strong { display: block; color: var(--ink); font-size: 25px; }
.conclusion-score { margin-top: 8px; color: var(--ocean-dark); font-size: 36px; font-weight: 850; letter-spacing: -.06em; }
.conclusion-score small { margin-left: 3px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.conclusion-target { background: #f0faf5; }
.conclusion-target strong { display: block; color: var(--ocean-dark); font-size: 25px; }
.conclusion-target p b { color: var(--ink); }
.conclusion-target > small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.conclusion-core { grid-column: 1 / -1; border-left: 4px solid var(--ocean); }
.conclusion-core p { margin: 0; color: var(--ink); font-size: 14px; }
.conclusion-list ul { display: grid; gap: 6px; margin: 0; padding-left: 17px; color: var(--ink); font-size: 12px; line-height: 1.55; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.risk-tag { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #805117; background: #fff3df; font-size: 11px; line-height: 1.35; }
.conclusion-alternatives { grid-column: 1 / -1; }
.alternative-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.alternative-item { display: grid; gap: 3px; padding: 10px; border: 1px solid #cce5dd; border-radius: 10px; color: var(--ink); background: #f4fbf7; text-decoration: none; }
.alternative-item:hover, .alternative-item:focus-visible { border-color: var(--ocean); }
.alternative-item b { color: var(--ocean-dark); font-size: 12px; }
.alternative-item span, .alternative-item small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.conclusion-warning, .conclusion-missing { margin: 12px 0 0; padding: 9px 11px; border-radius: 9px; color: #7a4d16; background: #fff5e4; font-size: 12px; line-height: 1.55; }
.conclusion-missing { color: #687b7f; background: #f2f6f6; }
.conclusion-section > .disclaimer { margin-bottom: 0; }
.conclusion-details { margin-top: 12px; border-top: 1px solid #dcebe7; }
.conclusion-details summary { padding: 13px 2px 2px; color: var(--ocean-dark); cursor: pointer; font-size: 13px; font-weight: 800; list-style-position: inside; }
.conclusion-detail-body { display: grid; gap: 10px; padding-top: 10px; }
.conclusion-detail-body .conclusion-card { background: #fff; }
.risk-tag-muted { color: var(--muted); background: #f1f5f5; }
@media (max-width: 700px) {
  .quick-conclusion-grid { grid-template-columns: 1fr; }
  .conclusion-core, .conclusion-alternatives { grid-column: auto; }
  .alternative-list { grid-template-columns: 1fr; }
}

/* Responsive reading system: keep the same data and components, but change
   the density and presentation at the three product breakpoints. */
body { overflow-x: hidden; }
.page-shell { width: min(100% - 24px, 1240px); }
.selector-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); }
.selector-toolbar strong { color: var(--ink); font-size: 13px; }
.selector-kicker { font-size: 12px; font-weight: 800; }
.section-nav { position: sticky; top: 8px; z-index: 8; display: flex; gap: 4px; overflow-x: auto; margin: 0 0 14px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 5px 18px rgba(24,52,59,.08); scrollbar-width: thin; }
.section-nav a { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.section-nav a:hover, .section-nav a:focus-visible { color: var(--ocean-dark); background: #eaf6f3; }
.section-block, .control-panel, footer { scroll-margin-top: 68px; }
.section-block { margin-block: 18px; }
.status-stack { display: grid; gap: 9px; margin: 0 0 16px; }
.status-stack .compare-entry-prominent { margin: 0; }
.status-stack .coverage-banner { margin: 0; }
.status-stack .exam-change-banner { margin: 0; }
@media (min-width: 768px) {
  .status-stack { grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
  .status-stack .compare-entry-prominent { padding: 11px 14px; }
  .status-stack .compare-entry-prominent b { font-size: 14px; }
  .status-stack .compare-entry-prominent small { font-size: 11px; }
  .status-stack .coverage-banner { min-width: 235px; justify-content: center; }
  .status-stack .exam-change-banner { grid-column: 1 / -1; }
}
.conclusion-section { background: linear-gradient(145deg, #fbfffd, #fff); }
.conclusion-section .section-title { margin-bottom: 12px; }
.conclusion-details summary { min-height: 42px; display: flex; align-items: center; }
.core-mobile-summary, .candidate-mobile-list, .subject-mobile-list { display: none; }
.chart { min-height: 300px; }
.chart-legend button { min-height: 36px; }

@media (max-width: 767px) {
  .hero { padding: 18px 14px 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 10px; align-items: start; }
  .hero-topbar { align-items: flex-start; gap: 8px; }
  .brand-name { font-size: 16px; }
  .page-actions { gap: 5px; }
  .page-actions a { min-height: 34px; padding: 6px 8px; }
  .action-home-long { display: none; }
  .action-home-short { display: inline; }
  .breadcrumbs { font-size: 11px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 10px; }
  .eyebrow { margin-bottom: 4px; font-size: 11px; letter-spacing: .04em; }
  .hero h1 { max-width: 100%; font-size: clamp(24px, 8vw, 28px); line-height: 1.18; overflow-wrap: anywhere; }
  .hero p:last-child { margin-top: 7px; font-size: 12px; line-height: 1.5; }
  .hero-copy > p:last-child { max-width: 100%; overflow-wrap: anywhere; }
  .verified { grid-column: 1 / -1; justify-self: start; width: fit-content; margin-top: -4px; padding: 5px 8px; font-size: 11px; }
  .page-shell { width: calc(100% - 24px); margin-top: -34px; padding: 0 0 32px; }
  .control-panel, .section-block, footer { border-radius: 14px; }
  .control-panel { padding: 13px; margin-bottom: 12px; }
  .selector-toolbar { align-items: flex-start; flex-direction: column; gap: 3px; margin-bottom: 8px; }
  .selector-toolbar strong { font-size: 14px; }
  .major-switch { display: flex; flex-wrap: nowrap; gap: 7px; overflow-x: auto; margin: 0 -2px 11px; padding: 0 2px 10px; border-bottom: 1px solid #edf2f3; scrollbar-width: thin; }
  .major-switch button { flex: 0 0 142px; min-height: 46px; padding: 8px 10px; }
  .major-switch button b { font-size: 12px; }
  .major-switch button span { font-size: 11px; }
  .control-label { display: block; margin-bottom: 7px; }
  .control-label strong { display: block; margin-top: 3px; font-size: 13px; text-align: left; line-height: 1.4; }
  .direction-tabs { margin-inline: -2px; }
  .direction-tabs button { min-width: 112px; padding: 9px 10px; }
  .year-row { display: block; padding-top: 9px; }
  .year-row > span { display: block; margin-bottom: 5px; }
  .year-scroller { padding-bottom: 3px; }
  .year-row button { min-height: 38px; padding-inline: 10px; }
  .year-legend { font-size: 11px; }
  .section-nav { top: 4px; margin-inline: -2px; }
  .section-nav a { padding: 8px 10px; font-size: 12px; }
  .coverage-banner { margin-bottom: 10px; padding: 9px 11px; font-size: 12px; }
  .exam-change-banner { margin-bottom: 10px; padding: 11px 12px; }
  .status-stack { gap: 8px; margin-bottom: 12px; }
  .section-block { padding: 16px 13px; margin-block: 14px; }
  .section-title { gap: 8px; margin-bottom: 12px; }
  .section-title h2 { font-size: 19px; line-height: 1.3; }
  .section-title p { font-size: 12px; line-height: 1.5; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 96px; padding: 12px; border-radius: 12px; }
  .metric-card p { margin-bottom: 8px; font-size: 12px; }
  .metric-card strong { font-size: clamp(25px, 8vw, 32px); }
  .overview-notes, .candidate-summary { font-size: 13px; line-height: 1.65; }
  .quick-conclusion-grid { gap: 8px; }
  .conclusion-card { padding: 13px; border-radius: 12px; }
  .conclusion-card p { margin-top: 6px; font-size: 14px; line-height: 1.55; }
  .conclusion-label { margin-bottom: 5px; font-size: 12px; }
  .conclusion-difficulty strong, .conclusion-target strong { font-size: 23px; }
  .conclusion-score { font-size: 32px; }
  .conclusion-list ul { font-size: 13px; }
  .alternative-item { min-height: 52px; }
  .chart { height: 320px; min-height: 320px; }
  .chart-legend { gap: 3px 7px; margin-top: -3px; }
  .chart-legend button { padding: 4px 3px; font-size: 12px; }
  .table-scroll { border-radius: 10px; }
  th, td { padding: 10px 9px; font-size: 13px; }
  .core-table, .candidate-table, .subject-table { min-width: 0; }
  .core-table, .candidate-scroll, .subject-scroll { display: none; }
  .scroll-hint { display: none; }
  .core-mobile-summary, .candidate-mobile-list, .subject-mobile-list { display: grid; gap: 8px; }
  .core-mobile-card, .candidate-mobile-card, .subject-mobile-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfdfd; }
  .core-mobile-card.active-row { border-color: #8fc9bc; box-shadow: inset 0 0 0 1px rgba(15,114,130,.1); }
  .core-mobile-card > strong { display: block; margin-bottom: 9px; color: var(--ocean-dark); font-size: 16px; }
  .core-mobile-card dl, .candidate-mobile-card dl, .subject-mobile-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
  .core-mobile-card dl div, .candidate-mobile-card dl div, .subject-mobile-card dl div { min-width: 0; padding: 7px 8px; border-radius: 8px; background: #f3f8f8; }
  .core-mobile-card dt, .candidate-mobile-card dt, .subject-mobile-card dt { color: var(--muted); font-size: 12px; }
  .core-mobile-card dd, .candidate-mobile-card dd, .subject-mobile-card dd { margin: 3px 0 0; color: var(--ink); font-size: 15px; font-weight: 800; }
  .core-mobile-card details { margin-top: 9px; border-top: 1px solid #e7eeee; padding-top: 8px; }
  .core-mobile-card summary { color: var(--ocean-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
  .core-mobile-card details p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
  .candidate-mobile-card header, .subject-mobile-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
  .candidate-mobile-card header b, .subject-mobile-card header b { color: var(--ocean-dark); font-size: 14px; }
  .candidate-mobile-card dd { font-variant-numeric: tabular-nums; }
  .subject-mobile-card .subject-total { grid-column: 1 / -1; background: #eaf6f3; }
  .candidate-tools { grid-template-columns: 1fr; gap: 8px; }
  .filter-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-tabs button { min-height: 40px; padding-inline: 6px; }
  .sort-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .sort-tools label { min-width: 0; display: grid; gap: 4px; }
  .sort-tools select { max-width: none; width: 100%; min-height: 40px; }
  .sort-direction { min-height: 40px; white-space: nowrap; }
  .record-count { font-size: 12px; }
  .subject-note, .subject-match-note { font-size: 13px; }
  .advice-section { padding-bottom: 18px; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .hero { padding: 28px 22px 68px; }
  .page-shell { width: min(calc(100% - 36px), 980px); }
  .major-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-block { padding: 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart { height: 320px; }
}

@media (min-width: 1200px) {
  .hero { padding-inline: 28px; }
  .page-shell { width: min(calc(100% - 48px), 1240px); }
  .section-block, .control-panel { padding: 22px; }
  .major-switch { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Final mobile-first spacing and interaction pass. */
body { line-height: 1.6; }
.page-shell { width: min(calc(100% - 32px), 1240px); }
.section-block, .control-panel, footer { margin-bottom: 12px; }
.home-program-groups { display: grid; gap: 18px; }
.home-program-group { display: grid; gap: 9px; }
.home-program-group h3 { margin: 0; color: var(--ocean-dark); font-size: 15px; }
.home-program-grid, .home-tool-grid { gap: 12px; }
.home-program-card, .home-tool-grid a { padding: 16px; }
.home-program-card, .home-tool-grid a, .compare-entry, .alternative-item { box-shadow: 0 2px 8px rgba(24,52,59,.06); transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease; }
.home-program-card:hover, .home-tool-grid a:hover, .compare-entry:hover, .alternative-item:hover { box-shadow: 0 5px 16px rgba(24,52,59,.09); }
.home-program-card:active, .home-tool-grid a:active, .compare-entry:active, .alternative-item:active { transform: scale(.98); background: #eef7f4; }
.info-section > p, .info-section li { line-height: 1.6; font-size: 15px; }
.info-muted, .section-title p, .footer-note, .footer-source p { line-height: 1.6; }
.filing-records { padding-top: 12px; border-top: 1px solid #edf2f3; }
.filing-records a { font-size: 13px; font-weight: 600; }
.site-nav { position: relative; min-width: 0; padding: 4px; }
.site-nav::before, .site-nav::after { content: ""; position: absolute; top: 0; bottom: 0; width: 24px; z-index: 2; pointer-events: none; }
.site-nav::before { left: 0; background: linear-gradient(90deg, var(--paper), rgba(255,255,255,0)); }
.site-nav::after { right: 0; background: linear-gradient(270deg, var(--paper), rgba(255,255,255,0)); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.nav-toggle { display: none; }
.site-nav a { min-height: 38px; padding-inline: 13px; font-size: 13px; }
.button-secondary, #compare-clear { min-height: 38px; padding: 8px 13px; border: 1px solid var(--ocean); border-radius: 10px; color: var(--ocean-dark); background: #fff; font-size: 13px; font-weight: 800; }
.button-secondary:hover, #compare-clear:hover, .button-secondary:focus-visible, #compare-clear:focus-visible { color: #fff; background: var(--ocean-dark); }
.detail-filter-shell { position: relative; z-index: 12; }
.detail-controls { position: relative; top: auto; z-index: auto; box-shadow: 0 8px 22px rgba(24,52,59,.08); }
.detail-compact-bar { position: fixed; top: 8px; left: 50%; z-index: 18; display: none; align-items: center; gap: 10px; width: min(calc(100% - 32px), 1240px); min-height: 52px; padding: 8px 10px 8px 14px; transform: translate(-50%, -12px); border: 1px solid #b9dfd2; border-radius: 13px; color: var(--ink); background: rgba(255,255,255,.97); box-shadow: 0 8px 22px rgba(24,52,59,.16); opacity: 0; transition: opacity .16s ease, transform .16s ease; }
.detail-filter-shell.is-compact .detail-compact-bar { display: flex; transform: translate(-50%, 0); opacity: 1; }
.detail-compact-label { min-width: 0; overflow: hidden; color: var(--ocean-dark); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.detail-compact-label b { margin-right: 3px; }
.detail-compact-year { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; color: var(--ocean-dark); background: #eaf6f3; font-size: 12px; font-weight: 800; }
.detail-filter-trigger { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid var(--ocean); border-radius: 9px; color: #fff; background: var(--ocean-dark); font-size: 12px; font-weight: 800; }
.detail-filter-trigger:active { transform: scale(.98); }
.detail-filter-shell.is-compact + .section-nav { top: 68px; }
.exam-change-banner { padding: 0; overflow: hidden; }
.exam-change-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 10px 14px; cursor: pointer; list-style: none; }
.exam-change-summary::-webkit-details-marker { display: none; }
.exam-change-summary::after { content: "＋"; flex: 0 0 auto; font-size: 18px; font-weight: 800; }
.exam-change-banner[open] .exam-change-summary::after { content: "－"; }
.exam-change-meta { flex: 0 0 auto; font-size: 12px; font-weight: 700; }
.exam-change-detail { padding: 0 14px 12px; }
.exam-change-detail p { margin: 0 0 7px; }
.compare-selection-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.table-scroll { scrollbar-width: thin; }
.table-scroll table { border-collapse: separate; border-spacing: 0; }
.table-scroll th:first-child, .table-scroll td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 #e8eeee; }
.table-scroll thead th:first-child { z-index: 3; background: #f4f8f8; }
.table-scroll tbody tr:nth-child(even) td, .table-scroll tbody tr:nth-child(even) th { background: #f8fbfb; }
.table-scroll tbody tr.active-row td:first-child, .table-scroll tbody tr.active-row th:first-child { background: #eef8f4; }
.back-to-top { position: fixed; right: max(16px, calc((100vw - 1240px) / 2)); bottom: 18px; z-index: 20; display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 15px; color: #fff; background: var(--ocean-dark); box-shadow: 0 8px 18px rgba(11,85,99,.24); font-size: 20px; font-weight: 900; }
.back-to-top span { font-size: 10px; line-height: 1; }
.seo-fallback-footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid #edf2f3; text-align: center; }
.seo-fallback-footer a { color: var(--muted); font-size: 13px; text-decoration: none; }
.seo-fallback-footer a:hover, .seo-fallback-footer a:focus-visible { color: var(--ocean-dark); text-decoration: underline; }

@media (max-width: 767px) {
  .page-shell { width: calc(100% - 32px); }
  .home-program-grid, .home-tool-grid { grid-template-columns: 1fr; }
  .section-block, .control-panel, footer { padding-left: 16px; padding-right: 16px; }
  .section-block { margin-block: 12px; }
  .site-nav { overflow: hidden; padding: 4px 0; }
  .nav-links { flex-wrap: nowrap; overflow-x: auto; padding: 0 7px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .site-nav a { flex: 0 0 auto; }
  .detail-compact-bar { top: 4px; width: calc(100% - 32px); }
  .detail-filter-shell.is-compact + .section-nav { top: 60px; }
  .exam-change-summary { display: block; padding: 10px 12px; }
  .exam-change-head { display: inline-flex; }
  .exam-change-meta { display: block; margin-top: 2px; }
  .exam-change-detail { padding: 0 12px 11px; }
  .compare-selection-actions { justify-content: flex-start; }
  .compare-selection-actions strong { order: 1; }
  .compare-selection-actions button { order: 2; }
  .back-to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 374px) {
  .site-nav::before, .site-nav::after { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; margin-left: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ocean-dark); background: #fff; font-size: 13px; font-weight: 800; }
  .nav-links { display: none; flex-direction: column; align-items: stretch; padding: 7px; border-top: 1px solid #edf2f3; }
  .site-nav.is-open .nav-links { display: flex; }
  .nav-links a { justify-content: flex-start; width: 100%; }
}

/* Filing-safe global chrome and mobile-first interaction layer. */
.filing-compliance-banner {
  margin: -22px -22px 14px;
  padding: 8px 16px;
  color: #d7e1e3;
  background: #27383d;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.mobile-bottom-tabs { display: none; }
.responsive-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.responsive-table-wrapper table { width: 100%; min-width: 600px; }
.responsive-table-hint { display: none; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.scale-mobile-summary { display: none; }
.data-source-caption { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.feedback-form { display: grid; gap: 12px; margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.feedback-form label:not(.privacy-consent) { display: grid; gap: 6px; color: var(--ink); font-size: 14px; font-weight: 700; }
.feedback-form input[type="email"], .feedback-form textarea { box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 16px; line-height: 1.5; }
.feedback-form textarea { min-height: 120px; resize: vertical; }
.privacy-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.privacy-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ocean); }
.privacy-consent a { color: var(--ocean-dark); font-weight: 700; }
.button-primary { min-height: 48px; padding: 10px 16px; border: 1px solid var(--ocean-dark); border-radius: 10px; color: #fff; background: var(--ocean-dark); font-size: 15px; font-weight: 800; cursor: pointer; }
.button-primary:active { transform: scale(.98); }
.form-status { min-height: 1.6em; margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 767px) {
  body { padding-bottom: 68px; }
  .site-nav { display: none; }
  .page-actions { flex: 0 0 auto; max-width: 48%; }
  .page-actions .context-action { display: none; }
  .page-actions .home-action { white-space: nowrap; }
  .filing-compliance-banner { margin: -16px -16px 14px; padding-inline: 12px; font-size: 13px; }
  .mobile-bottom-tabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 60px; padding: 4px max(8px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right)); border-top: 1px solid #d9e5e6; background: rgba(255,255,255,.98); box-shadow: 0 -5px 18px rgba(24,52,59,.12); }
  .mobile-bottom-tabs a { display: grid; place-items: center; align-content: center; gap: 1px; min-height: 52px; color: var(--muted); text-decoration: none; font-size: 21px; line-height: 1; }
  .mobile-bottom-tabs a small { font-size: 12px; font-weight: 800; line-height: 1.35; }
  .mobile-bottom-tabs a.active { color: var(--ocean-dark); }
  .mobile-bottom-tabs a:active { transform: scale(.98); }
  .responsive-table-hint { display: block; padding: 8px 10px; background: #f4f8f8; border-bottom: 1px solid var(--line); }
  .responsive-table-wrapper table { min-width: 600px; }
  #trends #scale-chart { display: none; }
  .scale-mobile-summary { display: grid; gap: 8px; padding: 12px; border: 1px solid #cfe7df; border-radius: 12px; background: #f1faf6; }
  .scale-mobile-summary p { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.65; }
  .scale-mobile-summary p:first-child { color: var(--ocean-dark); font-weight: 800; }
  .data-source-caption { font-size: 13px; }
  .feedback-form { padding: 16px; }
  .feedback-form input[type="email"], .feedback-form textarea { font-size: 16px; }
  .page-actions a, .site-brand, .site-nav a, .home-program-card, .home-tool-grid a, .compare-entry, .alternative-item, button, select, summary { min-height: 48px; }
}

@media (min-width: 768px) {
  .filing-compliance-banner { border-radius: 9px 9px 0 0; }
}

/* Keep desktop card edges visually separate: the navigation sits below the
   hero instead of cutting through it, and the footer banner spans the full
   rounded footer card rather than occupying one grid column. */
@media (min-width: 768px) {
  .page-shell { margin-top: 0; }
  .page-shell > .site-nav {
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 18px rgba(24,52,59,.06);
  }
  .site-footer { overflow: hidden; padding-top: 0; }
  .site-footer .filing-compliance-banner,
  .site-footer .footer-nav { grid-column: 1 / -1; }
  .site-footer .filing-compliance-banner {
    margin: 0 -22px 14px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

@media (max-width: 767px) {
  .site-footer { overflow: hidden; }
  .site-footer .filing-compliance-banner {
    margin: 0 -16px 14px;
    border-radius: 14px 14px 0 0;
  }
}

/* Detail pages keep the current project visible before the analysis cards.
   The complete selector remains available, but starts collapsed to preserve
   the concise first screen. */
.detail-filter-shell {
  position: relative;
  z-index: 12;
  margin-bottom: 14px;
}
.detail-compact-bar {
  position: relative;
  top: auto;
  left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 11px 12px 11px 16px;
  transform: none;
  border: 1px solid #b9dfd2;
  border-radius: 14px;
  color: var(--ink);
  background: #f8fcfb;
  box-shadow: 0 5px 16px rgba(24,52,59,.07);
  opacity: 1;
}
.detail-compact-copy { display: grid; flex: 1 1 0; gap: 2px; min-width: 0; }
.detail-compact-kicker { color: var(--muted); font-size: 12px; font-weight: 800; }
.detail-compact-label { display: block; max-width: 100%; overflow: hidden; color: var(--ocean-dark); font-size: 15px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.detail-compact-label b { margin-right: 4px; }
.detail-compact-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: auto; }
.detail-compact-direction, .detail-compact-year { padding: 6px 8px; border-radius: 8px; color: var(--ocean-dark); background: #eaf6f3; font-size: 12px; font-weight: 800; white-space: nowrap; }
.detail-filter-trigger { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 4px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--ocean-dark); border-radius: 10px; color: #fff; background: var(--ocean-dark); font-size: 13px; font-weight: 800; }
.detail-filter-trigger:active { transform: scale(.98); }
.detail-filter-shell .detail-controls { display: none; margin-top: 8px; }
.detail-filter-shell.is-open .detail-controls { display: block; }
.detail-filter-shell.is-open .detail-compact-bar { border-color: var(--ocean); box-shadow: 0 5px 16px rgba(24,52,59,.1); }

@media (max-width: 767px) {
  .page-shell { width: calc(100vw - 32px); max-width: calc(100vw - 32px); }
  .detail-filter-shell { margin-bottom: 12px; }
  .detail-compact-bar { top: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; min-height: 76px; gap: 6px 8px; padding: 10px; overflow: hidden; border-radius: 13px; }
  .detail-compact-copy { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .detail-compact-label { font-size: 14px; }
  .detail-compact-meta { position: static; grid-column: 2; display: flex; gap: 4px; margin-left: 0; }
  .detail-compact-direction { display: none; }
  .detail-compact-year { padding: 5px 7px; font-size: 11px; }
  .detail-filter-trigger { position: static; grid-column: 1; grid-row: 2; justify-self: start; width: 76px; min-width: 76px; min-height: 44px; padding-inline: 6px; font-size: 12px; }
  .detail-filter-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Privacy policy reading width and legal-copy rhythm. */
.privacy-page { width: min(calc(100% - 32px), 800px); max-width: 800px; }
.privacy-page .privacy-return-home { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ocean-dark); background: #fff; font-size: 14px; font-weight: 800; text-decoration: none; }
.privacy-page .privacy-date { margin: 0 auto 1em; max-width: 720px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.privacy-page .privacy-lead { max-width: 720px; margin: 0 auto 1em; color: var(--ink); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.privacy-page .info-section { max-width: 720px; margin: 0 auto 16px; }
.privacy-page .info-section > p, .privacy-page .info-section li { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.privacy-page .info-list ul { margin: 8px 0 0; padding-left: 22px; }
.privacy-page .info-notice small { color: var(--muted); font-size: 13px; }
.privacy-page .email-display { word-break: break-word; }
.privacy-fallback { max-width: 800px; }
.privacy-fallback h2 { margin: 24px 0 10px; color: var(--ink); font-size: 20px; line-height: 1.5; }
.privacy-fallback p, .privacy-fallback li { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.privacy-fallback ul { padding-left: 22px; }
.button-primary:disabled { cursor: not-allowed; opacity: .52; }

@media (max-width: 767px) {
  .privacy-page { width: calc(100vw - 32px); max-width: calc(100vw - 32px); }
  .privacy-page .section-block { padding: 16px; }
  .privacy-page .privacy-date, .privacy-page .privacy-lead, .privacy-page .info-section > p, .privacy-page .info-section li { font-size: 16px; line-height: 1.8; }
}
