/* SchoolToSalary — one stylesheet for every page.
   Layout: narrow reading column for text, wide grid for data; panels only where a block is a separate object. */
:root {
  --bg: #F5F6F2;
  --surface: #FFFFFF;
  --sunk: #ECEEE8;
  --ink: #18202E;
  --muted: #576072;
  --line: #D9DCD3;
  --accent: #E3A008;
  --accent-ink: #18202E;
  --accent-soft: #FCF0CC;
  --link: #1F4F99;
  --bar: #35557F;
  --bar-2: #8AA3C4;
  --bar-3: #C9D4E3;
  --good: #11704C;
  --good-bg: #DCF1E6;
  --warn: #8A5300;
  --warn-bg: #FBEBD0;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151C; --surface: #181E28; --sunk: #202834; --ink: #E8EBF0; --muted: #A2AAB8; --line: #2B3341;
    --accent: #F2B705; --accent-ink: #11151C; --accent-soft: #3A2F0C; --link: #8FB6F2;
    --bar: #8FB0DA; --bar-2: #5B7AA3; --bar-3: #34465F;
    --good: #7FD8B0; --good-bg: #133628; --warn: #F5C873; --warn-bg: #3A2C10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11151C; --surface: #181E28; --sunk: #202834; --ink: #E8EBF0; --muted: #A2AAB8; --line: #2B3341;
  --accent: #F2B705; --accent-ink: #11151C; --accent-soft: #3A2F0C; --link: #8FB6F2;
  --bar: #8FB0DA; --bar-2: #5B7AA3; --bar-3: #34465F;
  --good: #7FD8B0; --good-bg: #133628; --warn: #F5C873; --warn-bg: #3A2C10;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 18px; color: var(--muted); max-width: 68ch; }
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 14px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--surface); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-block: 10px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 22px; }
.logo-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); box-shadow: 6px 6px 0 -2px var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sunk); }
.head-search { position: relative; flex: 1 1 240px; max-width: 360px; min-width: 0; }

/* search */
.search-box { position: relative; width: 100%; }
.search-box input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 10px 36px; min-height: 44px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.14); list-style: none; margin: 0; padding: 6px; z-index: 40; max-height: 70vh; overflow: auto; }
.search-results a { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a.active { background: var(--accent-soft); }
.search-results .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.search-results .loc { color: var(--muted); font-size: 13px; }
.hero-search .search-box input { font-size: 18px; padding: 16px 16px 16px 44px; min-height: 58px; border-radius: 14px; background: var(--surface); }
.hero-search .search-box svg { left: 16px; }

/* page sections */
main { padding-block: 28px 64px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--sunk); color: var(--ink); }
.tag.accent { background: var(--accent-soft); }
section.block { display: flex; flex-direction: column; gap: 16px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.cols > * { min-width: 0; }

/* key figures */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.fig .v { font-family: var(--display); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fig .k { font-size: 14px; color: var(--muted); }
.fig .vs { font-size: 13px; color: var(--muted); }
.fig .vs b { font-weight: 600; }
.up { color: var(--good); }
.down { color: var(--warn); }

/* charts */
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 72px; gap: 12px; align-items: center; font-size: 15px; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .trk { height: 14px; background: var(--sunk); border-radius: 7px; overflow: hidden; display: block; }
.hbar .fil { height: 100%; display: block; background: var(--bar); border-radius: 7px; }
.hbar .val { font-family: var(--mono); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.hbar.ref .fil { background: var(--bar-2); }
.stackbar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; background: var(--sunk); }
.stackbar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .ln { fill: none; stroke: var(--bar); stroke-width: 2.5; }
svg.chart .ln2 { fill: none; stroke: var(--bar-2); stroke-width: 2; stroke-dasharray: 4 4; }
svg.chart .area { fill: var(--bar); opacity: 0.12; }
svg.chart .dot { fill: var(--bar); }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--sunk); white-space: nowrap; position: sticky; top: 0; }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg); }
th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button.sort:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
th button.sort::after { content: "↕"; opacity: 0.4; font-size: 11px; }
th[aria-sort="ascending"] button.sort::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] button.sort::after { content: "↓"; opacity: 1; }
td.rank { color: var(--muted); font-family: var(--mono); font-size: 13px; width: 1%; }
.tbl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tbl-tools input, .tbl-tools select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-height: 44px; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; color: var(--muted); cursor: pointer; font-weight: 600; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* path (high school page) */
.path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.path > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
.path .rail { display: flex; flex-direction: column; align-items: center; }
.path .pn { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--display); font-weight: 700; flex: none; }
.path .line { width: 2px; flex: 1; background: var(--line); margin: 4px 0; }
.path > li:last-child .line { display: none; }
.path .body { padding-bottom: 32px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* callouts and slots */
.note { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.read { background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; }
.read .eyebrow { color: var(--ink); white-space: nowrap; }
.slot { border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: var(--r); padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.slot .who { display: flex; gap: 14px; align-items: center; min-width: 0; }
.slot .av { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--ink); color: var(--bg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }

/* cards grid for link lists */
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.linkcard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.linkcard:hover { border-color: var(--ink); }
.linkcard b { font-family: var(--display); font-size: 17px; }
.linkcard span { color: var(--muted); font-size: 14px; }

/* home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.home-hero .stack { gap: 20px; }
.home-hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.02; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; }
.chain span { background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.chain i { color: var(--muted); font-style: normal; }
.map { height: 460px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sunk); z-index: 0; }
.map.sm { height: 260px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1px solid rgb(0 0 0 / 0.2); }

/* tools */
.field .search-box input { padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field input, .field select { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--accent-soft); font-size: 14px; }
.chip-btn button { all: unset; cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.chip-btn button:hover { background: var(--accent); }

footer.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding-block: 32px; font-size: 14px; color: var(--muted); }
footer.site-foot .cols { gap: 24px; }
footer.site-foot ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
footer.site-foot a { color: var(--ink); text-decoration: none; }
footer.site-foot a:hover { text-decoration: underline; }

/* leaflet theme fixes */
.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }
.leaflet-container { font-family: var(--body); background: var(--sunk); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-popup-content a { color: var(--link); }
.leaflet-control-attribution { font-size: 10px; }

@media (max-width: 760px) {
  .site-head { position: static; }
  body::before { display: none; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .hbar { grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 60px; font-size: 14px; }
  .map { height: 340px; }
  .head-search { order: 3; max-width: none; flex-basis: 100%; }
  .nav { margin-left: 0; }
  .fig .v { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-head, footer.site-foot, .slot, .head-search { display: none; } }

/* forms */
.slot { flex-direction: column; align-items: stretch; }
.slot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.slot-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.zform { display: flex; flex-direction: column; gap: 10px; }
.zform[hidden] { display: none; }
.zgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.zform label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.zform input, .zform select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 400; width: 100%; box-sizing: border-box; }
.zform .btn { align-self: flex-start; }
.zform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.zmsg:empty { display: none; }
.zmsg { font-weight: 600; margin: 0; }
.newsletter { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 18px 20px; }
.newsletter b { font-size: 17px; }
.newsletter p { margin: 4px 0 0; }
.nl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-row input { flex: 1 1 220px; width: auto; }
@media print { .newsletter { display: none; } }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.slot.claimed { border-style: solid; }

/* add to home screen bar */
.a2hs { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1000; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.22); animation: a2hs-up .3s ease-out; }
.a2hs[hidden] { display: none; }
.a2hs img { border-radius: 10px; flex: none; }
.a2hs-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; line-height: 1.35; }
.a2hs-text b { font-size: 14px; }
.a2hs-text span { color: var(--muted); }
.a2hs .btn { min-height: 40px; padding: 0 14px; flex: none; }
.a2hs-x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; padding: 4px 6px; cursor: pointer; flex: none; }
@keyframes a2hs-up { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .a2hs { animation: none; } }
@media print { .a2hs { display: none !important; } }

.qa dl { margin: 0; display: grid; gap: 14px; }
.qa dt { font-weight: 600; }
.qa dd { margin: 4px 0 0; color: var(--muted); }
.newsletter.compact { padding: 14px 16px; }
.home-hero .newsletter { margin-top: 4px; }
