/* SchoolsInfo — design tokens */
:root {
  --brand: #1b3fae;
  --brand-dark: #132f86;
  --brand-tint: #eaf0ff;
  --accent: #ffb020;
  --accent-dark: #e69500;
  --ink: #0e1a33;
  --text: #2a3550;
  --muted: #5b6680;
  --muted-2: #b4bccd;
  --line: #e2e7f0;
  --surface: #ffffff;
  --bg: #f6f8fc;
  --public: #0f7a55;
  --public-bg: #e5f5ee;
  --private: #7a3fc2;
  --private-bg: #f1e9fc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 26, 51, .05), 0 6px 20px rgba(14, 26, 51, .06);
  --shadow-hover: 0 2px 6px rgba(14, 26, 51, .08), 0 14px 32px rgba(14, 26, 51, .12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: .35em 0 .3em; }
h2 { font-size: 1.3rem; margin: 0 0 .7em; }
h3 { font-size: 1.05rem; }
code { font: .92em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--brand-tint); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: 0; max-width: 75ch; }
.fine { font-size: .82rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin: 0; }
.section { margin: 40px 0; }
.empty { padding: 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
main { min-height: 50vh; padding-bottom: 48px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .72em 1.2em; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s, border-color .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); color: var(--ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted-2); color: var(--ink); }
.btn-lg { padding: .9em 1.5em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Header */
.site-header { background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.5) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand b { color: var(--brand); font-weight: 800; }
.brand:hover { color: var(--ink); }
.logo-mark { width: 36px; height: 36px; flex: none; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--brand); }
.nav-compare { display: inline-flex; align-items: center; gap: 6px; padding: .45em .9em; border: 1px solid var(--line); border-radius: 999px; }
.badge { background: var(--accent); color: var(--ink); border-radius: 999px; font-size: .75rem; font-weight: 700; padding: 0 .5em; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-compare { border-radius: 0; border-width: 0 0 1px; padding: 12px 0; }
}

/* Hero */
.hero { position: relative; color: #fff; padding: 56px 0 64px;
  background: radial-gradient(900px 380px at 85% -20%, rgba(255, 176, 32, .28), transparent 60%), radial-gradient(800px 420px at 0% 120%, rgba(90, 140, 255, .45), transparent 60%), linear-gradient(135deg, #122b78, #1b3fae 55%, #2450d0); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.1rem); max-width: 22ch; margin-top: .2em; }
.hero .eyebrow { color: var(--accent); }
.hero-lead { font-size: 1.15rem; color: #dbe4ff; max-width: 62ch; margin: 0 0 24px; }
.hero-links { margin: 20px 0 0; color: #c9d5ff; font-size: .95rem; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.hero-links a:not(.btn) { color: #fff; }
.hero-links .btn { margin-right: 8px; }

/* Search form */
.search { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)) auto; gap: 8px; background: var(--surface); padding: 8px; border-radius: 16px; box-shadow: 0 10px 40px rgba(6, 16, 50, .25); }
.search-compact { box-shadow: var(--shadow); border: 1px solid var(--line); margin: 16px 0 8px; }
.search label { display: block; position: relative; }
.search-q svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.search input, .search select, .near-controls select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: 500 .98rem var(--font); color: var(--ink); background: var(--surface); }
.search input { padding-left: 40px; }
.search .btn { height: 48px; padding: 0 1.6em; }
@media (max-width: 860px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search-q { grid-column: 1 / -1; }
  .search .btn { grid-column: 1 / -1; }
}
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover); z-index: 20; list-style: none; margin: 0; padding: 6px; }
.suggest a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a.active { background: var(--brand-tint); }
.suggest small { display: block; color: var(--muted); }

/* Stats */
.statbar { list-style: none; margin: -32px 0 0; padding: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; z-index: 2; }
.statbar li { text-align: center; }
.statbar b { display: block; font-size: 1.6rem; color: var(--ink); letter-spacing: -.02em; }
.statbar span { color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .statbar { grid-template-columns: 1fr 1fr; } }

/* Tiles, chips, kinds */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tiles a { display: flex; flex-direction: column; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: box-shadow .15s, border-color .15s, transform .15s; }
.tiles a:hover { box-shadow: var(--shadow-hover); border-color: transparent; transform: translateY(-2px); }
.tiles b { color: var(--ink); font-size: 1.05rem; }
.tiles span { color: var(--muted); font-size: .9rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; gap: 6px; align-items: baseline; padding: .4em .85em; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.chips a:hover { border-color: var(--brand); color: var(--brand); }
.chips small { color: var(--muted); font-size: .8rem; }
.chips-lg { margin: 8px 0 8px; }
.chips-lg a { padding: .55em 1.05em; font-weight: 600; background: var(--brand-tint); border-color: transparent; color: var(--brand-dark); }
.kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kinds a { display: block; height: 100%; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; border-top: 4px solid var(--brand); }
.kinds a:hover { box-shadow: var(--shadow-hover); }
.kinds b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
.kinds span { color: var(--muted); font-size: .92rem; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; background: var(--surface); padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.links { margin: 0; padding-left: 1.1em; }
.links li { margin: .35em 0; }

/* School cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.card-title { margin: 0; font-size: 1.04rem; padding-right: 76px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { color: var(--brand); }
.card-loc, .card-meta, .school-loc { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--muted); font-size: .9rem; }
.card-loc svg, .card-meta svg, .school-loc svg { width: 16px; height: 16px; flex: none; margin-right: 4px; vertical-align: -3px; }
.card-meta span { display: inline-flex; align-items: center; }
.dist { color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: .15em .6em; border-radius: 6px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.tag-public { background: var(--public-bg); color: var(--public); border-color: transparent; }
.tag-private { background: var(--private-bg); color: var(--private); border-color: transparent; }
.tag-soft { background: #fff8e6; color: #8a5a00; border-color: transparent; }
.compare-btn { position: relative; z-index: 2; }
.card .compare-btn { position: absolute; top: 14px; right: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2em .7em; font: 600 .78rem var(--font); color: var(--muted); cursor: pointer; }
.compare-btn[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.result-count { color: var(--muted); }

/* Pager and crumbs */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0; }
.pager a, .pager span { min-width: 40px; padding: .45em .8em; text-align: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .gap { border: 0; background: none; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 18px 0 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--muted-2); }
.crumbs a { color: var(--muted); }

/* School page */
.school-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 8px 0 20px; }
.school-head h1 { margin: .15em 0 .25em; }
.school-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.school-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .school-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel-tight { padding: 18px; }
.panel h2 { font-size: 1.1rem; }
.facts { width: 100%; border-collapse: collapse; font-size: .95rem; }
.facts th, .facts td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 44%; color: var(--muted); font-weight: 500; padding-right: 12px; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.glance { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.glance li { background: var(--bg); border-radius: 10px; padding: 12px; text-align: center; }
.glance b { display: block; font-size: 1.3rem; color: var(--ink); }
.glance span { font-size: .8rem; color: var(--muted); }
.school-side { position: sticky; top: 84px; }
.map { margin-top: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--brand-tint); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-placeholder { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; font-weight: 600; text-decoration: none; }
.map-placeholder svg { width: 20px; height: 20px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 24px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data caption { text-align: left; padding: 14px 16px 0; font-weight: 700; color: var(--ink); }
table.data th, table.data td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; }
table.data thead th { background: var(--bg); font-size: .85rem; color: var(--muted); }
table.data td { font-variant-numeric: tabular-nums; }
.compare th[scope="row"] { color: var(--muted); font-weight: 500; white-space: nowrap; }
.compare thead th { min-width: 180px; }

/* Near me */
.near-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; background: var(--surface); padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); }
.near-controls label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.near-controls select { height: 44px; min-width: 150px; }
.near-status { color: var(--muted); }

/* Prose (guides, static pages) */
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); margin-top: 12px; }
.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { max-width: 72ch; }
.prose table.data { margin: 1em 0; border: 1px solid var(--line); }
.byline { color: var(--muted); font-size: .9rem; margin-top: -4px; }
.guide-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.guide-list a { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.guide-list a:hover { box-shadow: var(--shadow-hover); }
.guide-list b { color: var(--ink); display: block; font-size: 1.08rem; }
.guide-list span { color: var(--muted); }
.see-also { color: var(--muted); }
.notfound { padding: 60px 16px; text-align: center; }

/* Footer */
.site-footer { background: #0b1530; color: #aeb9d6; padding: 48px 0 24px; font-size: .92rem; }
.site-footer a { color: #dbe3f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2 { color: #fff; font-size: .95rem; margin-bottom: .8em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: .35em 0; }
.brand-light { color: #fff; }
.brand-light b { color: var(--accent); }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 32px; padding-top: 18px; font-size: .82rem; }
.site-footer .fine { color: #8794b5; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Compare bar and consent */
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); color: #fff; padding: 10px 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .2); }
.compare-bar .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.compare-bar span { flex: 1; min-width: 0; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-bar .linkbtn { color: #c3cbe0; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 16px 18px; }
.consent p { margin: 0 0 12px; font-size: .92rem; }
.consent-btns { display: flex; gap: 8px; justify-content: flex-end; }
