:root {
  color-scheme: light;
  --ink: #172b39;
  --muted: #5b6e7a;
  --line: #d7e0e4;
  --paper: #fff;
  --wash: #f5f8f7;
  --accent: #086b62;
  --accent-dark: #064e49;
  --blue-wash: #e8f3f1;
  --amber: #8b5b0b;
  --amber-wash: #fff5df;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--wash); }
a { color: var(--accent-dark); }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #d49a34; outline-offset: 3px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1180px; min-height: 82px; margin: auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 17px; font-weight: 750; line-height: 1.1; text-decoration: none; white-space: nowrap; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 500; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: white; background: var(--accent-dark); font-size: 15px; letter-spacing: .04em; }
nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
nav a { padding: 9px 13px; border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent-dark); background: var(--blue-wash); }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 3px; padding: 0 4px; border-radius: 20px; color: var(--accent-dark); background: #d7e8e4; font-size: 11px; }
main { min-height: 66vh; padding-top: 38px !important; padding-bottom: 72px !important; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(32px, 4vw, 50px); line-height: 1.13; letter-spacing: -.035em; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.015em; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lede { max-width: 750px; color: var(--muted); font-size: 17px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(30px, 3.6vw, 43px); }
.hero { padding: 52px 56px; border: 1px solid #cfe0dc; border-radius: 18px; background: linear-gradient(130deg, #e8f4ef 0%, #fff 62%); }
.hero h1 { max-width: 720px; }
.hero .lede { max-width: 650px; }
.actions, .detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 15px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button-primary { color: white; background: var(--accent-dark); border-color: var(--accent-dark); }
.button-primary:hover { color: white; background: var(--accent); }
.button-outline { color: var(--accent-dark); background: white; border-color: #a8c5bd; }
.button-outline:hover { background: var(--blue-wash); }
.button-quiet { color: var(--accent-dark); background: transparent; }
.button-quiet:hover { background: var(--blue-wash); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.stat { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.stat strong { display: block; font-size: 30px; line-height: 1.1; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.notice { margin: 20px 0; padding: 17px 20px; border-left: 4px solid var(--accent); border-radius: 8px; background: var(--blue-wash); }
.notice strong { display: block; margin-bottom: 5px; }
.notice p { margin: 0; color: #375c5a; font-size: 14px; }
.fine-print, .source-line { color: var(--muted); font-size: 13px; }
.fine-print { overflow-wrap: anywhere; }
.filter-panel, .detail-section { margin: 20px 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.filter-control { display: grid; gap: 5px; color: var(--ink); font-size: 13px; font-weight: 700; }
.filter-control input, .filter-control select { min-width: 0; height: 41px; padding: 8px 11px; border: 1px solid #bfcdd1; border-radius: 7px; color: var(--ink); background: white; font-weight: 400; }
.filter-control input:focus, .filter-control select:focus { border-color: var(--accent); }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 23px 0 13px; }
.results-count { font-size: 16px; }
.load-more { display: flex; justify-content: center; margin-top: 18px; }
.load-more [hidden] { display: none; }
.school-list { display: grid; gap: 10px; }
.school-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.school-card h2 { margin-bottom: 9px; font-size: 18px; }
.school-card h2 a { color: var(--ink); text-decoration: none; }
.school-card h2 a:hover { color: var(--accent); text-decoration: underline; }
.school-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; color: var(--muted); font-size: 13px; }
.card-location { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.card-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.text-link { font-size: 14px; font-weight: 650; white-space: nowrap; }
.badge { display: inline-block; max-width: 100%; padding: 4px 8px; border-radius: 5px; color: #235b55; background: var(--blue-wash); font-size: 12px; font-weight: 700; white-space: normal; }
.badge.stale { color: var(--amber); background: var(--amber-wash); }
.badge.unknown { color: var(--muted); background: #edf0f2; }
.back-link { margin-bottom: 16px; font-size: 14px; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; margin: 5px 0 0; }
.fact { display: grid; grid-template-columns: 160px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f2; }
.fact dt { color: var(--muted); font-size: 13px; }
.fact dd { margin: 0; font-weight: 600; }
.detail-section h2 { margin-bottom: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; padding: 0; list-style: none; }
.chip-list li { padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfb; font-size: 13px; }
.missing { color: var(--amber); font-size: 14px; }
.source-line { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid #edf1f2; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
thead th { color: #385563; background: #eef4f3; font-size: 12px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.source-table th:first-child { min-width: 115px; text-transform: capitalize; }
.source-table td { min-width: 125px; }
.comparison table { min-width: 780px; table-layout: fixed; }
.comparison th:first-child { width: 150px; }
.comparison td { overflow-wrap: anywhere; line-height: 1.65; }
.comparison thead th { font-size: 14px; }
.comparison thead th a { display: block; margin-bottom: 8px; }
.comparison tbody th { background: #fafbfb; }
.cell-state { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.missing-cell { color: var(--amber); background: #fffbf2; }
.remove-button { padding: 0; border: 0; color: #7a4848; background: transparent; font-size: 12px; text-decoration: underline; }
.empty { padding: 40px; border: 1px dashed #abc1bd; border-radius: 10px; background: white; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.source-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.source-card h2 { margin-bottom: 10px; font-size: 16px; }
.source-card p { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.source-card .badge { margin-top: 7px; }
.selection-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 13px; padding: 11px 20px; color: white; background: #173b3a; box-shadow: 0 -4px 20px #173b3a22; font-size: 14px; font-weight: 700; }
.selection-bar[hidden] { display: none; }
.selection-bar .button-quiet { color: white; }
.site-footer { padding: 34px 0 46px; border-top: 1px solid var(--line); background: #e9f0ee; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.site-footer strong { font-size: 14px; }
.site-footer p { margin: 6px 0; color: #516771; font-size: 13px; }
@media (max-width: 760px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  nav { width: 100%; }
  nav a { padding: 7px 9px; }
  .hero { padding: 32px 24px; }
  .stat-grid, .source-grid, .footer-grid { grid-template-columns: 1fr; gap: 10px; }
  .filter-grid, .fact-grid { grid-template-columns: 1fr; }
  .school-card { align-items: flex-start; flex-direction: column; }
  .card-actions { width: 100%; justify-content: space-between; }
  .fact { grid-template-columns: 125px 1fr; }
}
