/* seo.css — static district / school / county pages (generated by scripts/build_seo_pages.py).
   Builds on pages.css tokens, so light and dark themes come for free. */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; }
.small { font-size: .82rem; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 18px 0 0; font-size: .82rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { text-decoration: none; display: inline-block; padding: 4px 0; }   /* 24px targets (WCAG 2.5.8) */
.site-foot p:last-child { line-height: 2; }
.crumbs a:hover { text-decoration: underline; }

.seo-head { margin: 14px 0 18px; }
.seo-head h1 { font-size: 1.85rem; margin: 2px 0 4px; }
.seo-head .row-actions { margin-top: 14px; }

.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.seo-grid > .card:nth-child(2) { grid-row: span 2; }
.card h2 { font-size: 1.1rem; margin: 0 0 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush.table-scroll { overflow-x: auto; }   /* clipping hid the right-hand columns on phones */
.how-to { margin-top: 22px; }
.how-to ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi b { display: block; font-size: 1.45rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.kpi span { font-size: .84rem; color: var(--muted); }
.kpi small { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }   /* contains the sr-only caption */
.seo-table th, .seo-table td { padding: 9px 12px; }
.seo-table td a { font-weight: 600; text-decoration: none; }
.seo-table td a:hover { text-decoration: underline; }
.seo-table tbody tr:hover td { background: var(--hover); }
.seo-table td.up .delta { color: var(--good); }
.seo-table td.down .delta { color: var(--bad); }
.delta { font-size: .76rem; color: var(--muted); }
.metric-table th[scope=row] { font-weight: 500; text-align: left; }
.metric-table th[scope=row] .muted { font-size: .74rem; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.bars i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--accent); min-width: 2px; }

.link-cols { columns: 3 220px; column-gap: 24px; padding: 0; margin: 0; list-style: none; }
.link-cols li { break-inside: avoid; padding: 4px 0; font-size: .92rem; }
.link-cols a { font-weight: 600; text-decoration: none; }
.link-cols a:hover { text-decoration: underline; }

.site-foot p { margin: 0 0 8px; }

@media (max-width: 760px) {
  .seo-grid { grid-template-columns: 1fr; }
  .seo-grid > .card:nth-child(2) { grid-row: auto; }
  .seo-head h1 { font-size: 1.5rem; }
  .topbar .btn { padding: 6px 10px; font-size: .84rem; }
}
@media print {
  .crumbs, .row-actions, .site-foot p:last-child, .skip-link { display: none; }
  /* District pages: the special education section stays on screen but is left out of the one-page print
     (it has its own printable page, special-education.html). */
  section[aria-labelledby="sped-h"] { display: none; }
  /* School profile ("Full profile & print" in the map popup): fits one letter page */
  body.seo { font-size: 9pt; line-height: 1.35; }
  .rp-facts { row-gap: 1pt; }
  .bars li { gap: 0 8px; }
  .bars i { height: 4px; }
  .seo-head { margin: 0 0 6pt; }
  .seo-head h1 { font-size: 17pt; margin: 2pt 0; }
  .seo-head .rp-sub, .seo-head .rp-kicker { margin: 0; }
  .seo-grid { gap: 8pt; grid-template-columns: 1fr 1fr; }
  .seo-grid > .card:nth-child(2) { grid-row: span 2; }
  /* The tall academics card spans the left-hand cards; the last row takes any extra height, so the
     left cards stack without gaps between them. */
  .seo-grid { grid-template-rows: auto 1fr; }
  .seo-grid:has(> .card:nth-child(4)) { grid-template-rows: auto auto 1fr; }
  .seo-grid:has(> .card:nth-child(4)) > .card:nth-child(2) { grid-row: span 3; }
  .seo .rp-facts { font-size: 8.5pt; }
  .seo .metric-table { font-size: 8.5pt; }
  .seo .metric-table thead th { font-size: 6.8pt; }
  .seo .card { padding: 8pt 10pt; }
  .seo .card h2 { font-size: 11pt; margin: 0 0 4pt; }
  .bars { gap: 2pt; font-size: 8pt; }
  .metric-table th, .metric-table td { padding-top: 2pt; padding-bottom: 2pt; }
  .site-foot { margin-top: 6pt; padding-top: 4pt; font-size: 8pt; break-inside: avoid; }
  /* District / county pages: long school tables run across pages with their header repeated.
     A scroll container is one unbreakable box in Chromium print, so let it flow. */
  .table-scroll, .card.flush, .card.flush.table-scroll { overflow: visible !important; }
  .card.flush { break-inside: auto; border-radius: 6pt; }
  .seo-table { font-size: 8.3pt; }
  .seo .seo-table th, .seo .seo-table td, .seo .seo-table tbody th { padding: 2.5pt 5pt; line-height: 1.25; }
  .seo-table thead th { font-size: 6.8pt; }
  .seo-table tbody tr:hover td { background: none; }
  .seo-table tbody th { text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--ink); }
  /* "Other districts in this county" is site navigation: links only, nothing to read on paper. */
  section[aria-labelledby="near-h"] { display: none; }
  .seo .rp-section-title { font-size: 12pt; margin: 12pt 0 5pt; padding-bottom: 2pt; border-bottom: 1px solid var(--border); }
  .seo section > p.muted.small { margin: 3pt 0; font-size: 8pt; }
  .seo .rp-section-title + p.muted { break-after: avoid; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(1.05in, 1fr)); gap: 5pt; }
  .kpi { padding: 5pt 7pt; border-radius: 6pt; box-shadow: none; break-inside: avoid; }
  .kpi b { font-size: 13pt; }
  .kpi span { font-size: 7.5pt; line-height: 1.25; display: block; }
  .kpi small { font-size: 6.8pt; }
  .how-to { margin-top: 10pt; break-inside: avoid; }
  .how-to ul { gap: 2pt; font-size: 8pt; }
  .link-cols { columns: 4; column-gap: 12pt; }
  .link-cols li { padding: 1pt 0; font-size: 8pt; line-height: 1.25; }
  /* The closing data note takes the end of the page before it instead of printing alone on a last page. */
  .site-foot { break-before: avoid; }
}
.seo-table tbody th { text-align: left; font-weight: 600; padding: 9px 12px; }
.seo-table tbody th a { text-decoration: none; }
.seo-table tbody th a:hover { text-decoration: underline; }
.seo-table tr.me th, .seo-table tr.me td { font-weight: 800; background: var(--surface-2, rgba(36,104,168,.06)); }

/* ===================================================================== Districts section (dx-)
   districts.html, district/*.html, county/*.html and school/*.html (scripts/build_seo_pages.py) with
   js/districts-ui.js: search, county filter, sort, level chips and "Show all". Tables turn into compact
   cards on phones. Everything works without JavaScript (all rows shown, the controls stay hidden). */
html:not(.dx-js) .dx-jsonly { display: none !important; }
.dx-rt tr[hidden], .dx-more[hidden], .dx-empty[hidden], .dx-mine[hidden], .table-scroll[hidden] { display: none !important; }
@media screen { .dx-rt tr.dx-over { display: none !important; } }

/* ---- page heads */
.dx-hero { background: var(--hero); color: #fff; border-radius: 18px; padding: 32px 32px 28px; margin: 14px 0 16px; box-shadow: var(--shadow); }
.dx-hero h1 { color: #fff; font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 6px; }
.dx-kicker { margin: 0; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--gold); }
.dx-lead { margin: 0 0 18px; color: #DCE7F2; }
.dx-hero :focus-visible { outline-color: var(--gold); }
.dx-search { position: relative; max-width: 620px; margin: 0 0 12px; }
.dx-search input[type=search] { min-height: 54px; padding: 12px 16px 12px 48px; border: 0; border-radius: 14px; background: #fff; color: #1B2633;
  font-size: 1.05rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.dx-search input::placeholder { color: #5A6878; }
.dx-search input:focus { box-shadow: 0 0 0 3px var(--gold), 0 8px 24px rgba(0,0,0,.2); }
.dx-search-icon { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: #5A6878;
  stroke-width: 2; stroke-linecap: round; pointer-events: none; }
[data-theme="dark"] .dx-search input[type=search] { background: var(--surface); color: var(--text); }
[data-theme="dark"] .dx-search input::placeholder { color: var(--muted); }
[data-theme="dark"] .dx-search-icon { stroke: var(--muted); }
.dx-mine { margin: 0 0 4px; }
.dx-mine a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.12);
  color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.dx-mine a:hover { background: rgba(255,255,255,.2); }
.dx-mine span { color: #C9D7E5; }
.dx-mine b { color: var(--gold); }
.dx-hero .dx-actions .btn-ghost { border-color: rgba(255,255,255,.45); }

.dx-head { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; margin: 14px 0 16px; box-shadow: var(--shadow-sm); }
.dx-head h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.dx-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.dx-tags li { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 12px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: .84rem; color: var(--text); }
.dx-tags a { display: inline-flex; align-items: center; min-height: 26px; font-weight: 600; text-decoration: none; }
.dx-tags a:hover { text-decoration: underline; }
.dx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.seo-head.dx-head .row-actions { margin-top: 16px; }
.dx-actions .btn { min-height: 44px; }
.dx-map::before { content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2zM9 4v14M15 6v14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2zM9 4v14M15 6v14'/%3E%3C/svg%3E") center / contain no-repeat; }
.dx-actions .btn-primary:hover { filter: brightness(1.12); }
.kpis + .seo-grid { margin-top: 16px; }
.kpi { border-radius: 16px; }

/* ---- list heads, chips, filters */
.dx-listhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 30px 0 12px; }
.dx-listhead .rp-section-title { margin: 0; }
.dx-count { margin: 0; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.dx-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.dx-chip span { font-size: .76rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.dx-chip:hover { border-color: var(--accent); }
.dx-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.dx-chip[aria-pressed="true"] span { background: rgba(255,255,255,.2); color: #fff; }
[data-theme="dark"] .dx-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0B1520; }
[data-theme="dark"] .dx-chip[aria-pressed="true"] span { background: rgba(11,21,32,.18); color: #0B1520; }
.dx-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px; }
.dx-field { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.dx-field select { width: auto; min-height: 44px; padding: 0 12px; color: var(--text); font-weight: 500; }
.dx-more { display: flex; margin: 14px auto 4px; min-height: 44px; }
.dx-empty { text-align: center; padding: 28px 20px; }
.dx-empty p { margin: 0 0 12px; color: var(--muted); }

/* ---- tables */
.dx-rt tbody th { font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; }
.dx-rt tbody th a { font-weight: 600; }
.dx-sort-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-align: inherit; }
.dx-sort-btn:hover { color: var(--ink); }
.dx-arrow::before { content: "↕"; opacity: .5; font-size: .9em; }
th[aria-sort="ascending"] .dx-arrow::before { content: "↑"; opacity: 1; color: var(--accent); }
th[aria-sort="descending"] .dx-arrow::before { content: "↓"; opacity: 1; color: var(--accent); }
.rp-near th[aria-sort] { color: var(--ink); }
.dx-bar { display: block; width: 64px; height: 5px; margin: 4px 0 0 auto; border-radius: 3px; background: var(--track); overflow: hidden; }
.dx-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---- link grids (other districts, counties) */
.dx-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.dx-links a { display: flex; align-items: center; min-height: 44px; height: 100%; padding: 8px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.dx-links a:hover { border-color: var(--accent); background: var(--hover); }
.dx-links-sub a { display: block; }
.dx-links .muted { font-weight: 400; font-size: .84rem; }
.dx-counties { margin: 0 0 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); }
.dx-counties summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; cursor: pointer; font-weight: 700; color: var(--ink);
  list-style: none; border-radius: 16px; }
.dx-counties summary::-webkit-details-marker { display: none; }
.dx-counties summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); }
.dx-counties[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.dx-counties summary small { color: var(--muted); font-weight: 500; font-size: .84rem; }
.dx-cgrid { list-style: none; margin: 0; padding: 0 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.dx-cgrid a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  background: var(--surface-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.dx-cgrid a:hover { background: var(--hover); }
.dx-cgrid small { color: var(--muted); font-weight: 500; font-size: .78rem; }

@media (max-width: 640px) {
  .dx-hero { padding: 22px 18px 20px; border-radius: 16px; margin-top: 10px; }
  .dx-hero h1 { font-size: 1.6rem; }
  .dx-lead { font-size: .9rem; margin-bottom: 14px; }
  .dx-head { padding: 16px; border-radius: 16px; margin-top: 10px; }
  .seo-head.dx-head h1 { font-size: 1.45rem; }
  .dx-actions .btn { flex: 1 1 auto; padding: 8px 12px; font-size: .86rem; white-space: normal; text-align: center; }
  .dx-actions .btn:first-child { flex-basis: 100%; font-size: .95rem; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; border-radius: 14px; }
  .kpi b { font-size: 1.2rem; }
  .seo-school .kpis, .seo-county .kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .seo-school .kpi, .seo-county .kpi { padding: 10px; }
  .seo-school .kpi span, .seo-county .kpi span { display: block; font-size: .78rem; line-height: 1.3; }
  .seo-school .kpi small { font-size: .7rem; }
  .seo .seo-grid > .card { padding: 16px; }
  .dx-listhead { margin-top: 24px; }
  .dx-field { flex: 1 1 140px; flex-direction: column; align-items: stretch; gap: 4px; }
  .dx-field select { width: 100%; }
  .dx-chips { gap: 6px; }
  .dx-chip { padding: 0 12px; }
  .dx-links { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .dx-cgrid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); padding: 0 12px 12px; }
  .crumbs ol { margin-top: 10px; }
}
/* Phones: each row is a card (name; county or level · grades · students; results with labels). */
@media screen and (max-width: 640px) {
  .dx-rt, .dx-rt tbody { display: block; width: 100%; }
  .dx-rt thead { display: none; }
  .dx-rt tr { display: flex; flex-wrap: wrap; align-items: baseline; padding: 10px 16px 11px; border-bottom: 1px solid var(--border); }
  .dx-rt tbody tr:last-child { border-bottom: 0; }
  .seo .dx-rt th, .seo .dx-rt td { display: block; padding: 0; border: 0; text-align: left; }
  .dx-rt tbody tr:hover td { background: none; }
  .dx-rt tbody th { flex: 1 0 100%; font-size: 1rem; line-height: 1.3; }
  .dx-rt tbody th a { display: inline-block; padding: 2px 0; }
  .dx-rt .dx-i { flex: none; margin-top: 2px; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
  .dx-rt .dx-i a { display: inline-block; padding: 2px 0; color: inherit; font-weight: 500; }
  .dx-rt .dx-i::after { content: attr(data-u); }
  .dx-rt .dx-i + .dx-i::before { content: "·"; margin: 0 6px; }
  .dx-rt tr::after { content: ""; order: 1; flex-basis: 100%; height: 0; }   /* line break before the results */
  .dx-rt .dx-m { order: 2; flex: 1 1 30%; min-width: 0; margin-top: 8px; padding-right: 10px; font-size: .92rem; font-weight: 700; color: var(--ink); }
  .dx-rt .dx-m::before { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .dx-sch td:nth-child(5)::before, .dx-peers td:nth-child(4)::before, .dx-all td:nth-child(5)::before, .dx-cty td:nth-child(4)::before { content: "Reading"; }
  .dx-sch td:nth-child(6)::before, .dx-peers td:nth-child(5)::before, .dx-all td:nth-child(6)::before, .dx-cty td:nth-child(5)::before { content: "Math"; }
  .dx-sch td:nth-child(7)::before, .dx-peers td:nth-child(3)::before, .dx-cty td:nth-child(6)::before { content: "Low-income"; }
  .dx-peers td:nth-child(2)::before { content: "Students"; }
  .dx-peers td:nth-child(6)::before { content: "Attendance"; }
  .dx-peers td:nth-child(7)::before { content: "Graduation"; }
  .dx-rt .dx-bar { width: auto; max-width: 120px; margin: 4px 0 0; }
  .dx-rt tr.me { background: var(--surface-2); }
  .dx-sped td { flex: 1 0 100%; }
  .seo .dx-sped .dx-val { margin-top: 4px; font-weight: 700; color: var(--ink); }
  .seo .dx-sped .dx-val.muted { color: var(--muted); font-weight: 600; }
  .dx-sped .dx-src { margin-top: 2px; color: var(--muted); }
}
@media print {
  .dx-jsonly, .dx-more, .dx-count, .dx-mine, .dx-search, .dx-counties, .dx-empty, .dx-actions { display: none !important; }
  .dx-rt tr.dx-over { display: table-row !important; }
  .dx-arrow { display: none; }
  .seo .dx-rt tbody th { font-size: inherit; }
  .dx-hero, .dx-head { background: none; color: var(--ink); border: 0; box-shadow: none; padding: 0; margin: 0 0 6pt; border-radius: 0; }
  .dx-hero h1 { color: var(--ink); font-size: 17pt; }
  .dx-lead { color: var(--muted); margin: 0; }
  .dx-tags { margin: 2pt 0 0; gap: 0; }
  .dx-tags li { min-height: 0; padding: 0; border: 0; background: none; font-size: 8.5pt; color: var(--muted); }
  .dx-tags li + li::before { content: "·"; margin: 0 4pt; }
  .dx-tags a { min-height: 0; color: var(--muted); font-weight: 400; }
  .dx-listhead { margin: 12pt 0 5pt; padding-bottom: 2pt; border-bottom: 1px solid var(--border); break-after: avoid; }
  .seo .dx-listhead .rp-section-title { margin: 0; padding: 0; border: 0; }
  .dx-bar { width: 40px; height: 3px; margin-top: 1pt; }
  .dx-links { display: none; }
  .seo-school .kpis { display: none; }
  .kpis + .seo-grid { margin-top: 0; }
}

/* ===================================================================== Charts (cx-)
   Inline SVG charts on school and district pages (scripts/build_seo_pages.py): "How this school compares"
   (0-100% strips: school dot, district diamond, Washington tick), "Where this school falls" (middle-half band
   and median of schools at the same level), test results over time (small multiples, 0-100% axis), students
   over time (axis from 0) and spending per student (bars from $0). Colors are tokens, so dark mode has its own
   steps rather than an inversion; the school/district pair was checked for color-vision separation and 3:1 on
   each surface. Every chart has role="img" + aria-label with its numbers, and the numbers are in the text too. */
:root { --cx-a: #2468A8; --cx-b: #D9622B; --cx-ref: #5A6878; }
:root[data-theme="dark"] { --cx-a: #3F8FDB; --cx-b: #D35F2A; --cx-ref: #9AAABB; }
.cx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; align-items: start; }
.cx-wide { grid-column: 1 / -1; }
.cx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.cx-card h2 { margin-bottom: 6px; }
.cx-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 12px; font-size: .8rem; color: var(--muted); }
.cx-key span { display: inline-flex; align-items: center; gap: 6px; }
.cx-key span::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cx-a); }
.cx-key .k-di::before { width: 9px; height: 9px; border-radius: 1px; background: var(--cx-b); transform: rotate(45deg); }
.cx-key .k-st::before, .cx-key .k-md::before { width: 2px; height: 14px; border-radius: 0; background: var(--cx-ref); }
.cx-key .k-ls::before { width: 16px; height: 2px; border-radius: 1px; background: var(--cx-ref); }
.cx-key .k-band::before { width: 16px; height: 10px; border-radius: 2px; background: var(--cx-a); opacity: .2; }
.cx-key .k-sd::before { opacity: .6; }
.cx-row { margin: 0 0 12px; }
.cx-l { margin: 0 0 2px; font-size: .9rem; }
.cx-l small { color: var(--muted); font-size: .74rem; }
.cx-l > span { display: block; color: var(--muted); font-size: .84rem; }
.cx-l > span b { color: var(--ink); }
.cx-s { display: block; width: 100%; height: 28px; overflow: visible;
  background: linear-gradient(var(--track), var(--track)) 0 11px / 100% 6px no-repeat; }
.cx-me { fill: var(--cx-a); stroke: var(--surface); stroke-width: 2; }
.cx-di { fill: var(--cx-b); stroke: var(--surface); stroke-width: 2; }
.cx-st { fill: none; stroke: var(--cx-ref); stroke-width: 2; }
.cx-band { fill: var(--cx-a); fill-opacity: .2; }
.cx-s .cx-sd { fill: var(--cx-a); fill-opacity: .6; stroke: var(--surface); stroke-width: 1.5; }
.cx-s .cx-sd:hover { fill-opacity: 1; }
.cx-ax { display: flex; justify-content: space-between; margin: -6px 0 0; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cx-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.cx-fig { margin: 0; }
.cx-fig figcaption { font-weight: 700; font-size: .9rem; color: var(--ink); margin: 0 0 2px; }
.cx-tr { display: block; width: 100%; max-width: 440px; height: auto; overflow: visible; }
.cx-g { fill: none; stroke: var(--border); stroke-width: 1; }
.cx-gap { fill: var(--surface-2); }
.cx-tr text, .cx-fr text { fill: var(--muted); font-size: 11.5px; }
.cx-tr .cx-v { fill: var(--ink); font-size: 12px; font-weight: 700; }
.cx-tr polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cx-tr .cx-lm { stroke: var(--cx-a); }
.cx-tr .cx-ls { stroke: var(--cx-ref); }
.cx-tr circle.cx-lm { fill: var(--cx-a); stroke: none; }
.cx-tr circle.cx-ls { fill: var(--cx-ref); stroke: none; }
.cx-lead { margin: 0 0 10px; font-size: .92rem; }
.cx-bars { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.cx-bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.cx-bars b { font-variant-numeric: tabular-nums; }
.cx-bars i { grid-column: 1 / -1; display: block; height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.cx-bars .cx-bm { background: var(--cx-a); }
.cx-bars .cx-bo { background: var(--cx-ref); opacity: .45; }
.cx-note { margin: 6px 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-border);
  color: var(--text); font-size: .84rem; }
.cx-note b { color: var(--warn-text); }
.cx-why { margin: 8px 0 0; font-size: .86rem; }
.cx-why summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-weight: 600; color: var(--accent); }
.cx-why p { margin: 0; }
.cx-src { margin: 6px 0 0; font-size: .74rem; color: var(--muted); }
/* Strips inside the school academics table (decorative: the table holds the numbers). */
.metric-table .cx-s { height: 24px; margin: 6px 0 2px; min-width: 110px; background-position: 0 9px; }
.metric-table .cx-s use { transform: translateY(-2px); }
@media (max-width: 760px) {
  .cx-grid { grid-template-columns: minmax(0, 1fr); }
  /* the line charts scale down with the phone; keep their labels readable */
  .cx-tr text, .cx-fr text { font-size: 14px; }
  .cx-tr .cx-v { font-size: 14px; }
}
/* Charts repeat numbers that the printed tables already carry; the printed profile stays one page.
   School pages print the charts after all: see "Fact sheet" below. */
@media print {
  .cx-grid, .metric-table .cx-s, .cx-key { display: none; }
  .cx-note { margin: 3pt 0; padding: 2pt 5pt; font-size: 7.5pt; border-radius: 4pt; }
  .cx-src { margin: 2pt 0 0; font-size: 7pt; }
}

/* ===================================================================== Fact sheet (fs-)
   School pages print as a one-page fact sheet (US Letter; also fits A4): name, district, facts, the academics
   table with its strips, the charts with their plain-language sentences, and print-only bits added by
   js/fact-sheet.js when printing (QR code to the live page, bell times, website, printed-on date, attribution).
   Screen: only the "Print fact sheet" button shows. Print always uses the light tokens. */
.fs-only { display: none; }
.fs-btn { font: inherit; cursor: pointer; }
.fs-btn[hidden] { display: none; }      /* .btn sets display, which beat [hidden]: no dead button without JavaScript */
.fs-btn[aria-busy="true"] { cursor: progress; opacity: .75; }
@media print {
  :root, :root[data-theme="dark"] { --cx-a: #2468A8; --cx-b: #D9622B; --cx-ref: #5A6878; color-scheme: light; }
  body.seo-school { page: fs; background: #fff; color: #1B2633; font-size: 8.3pt; line-height: 1.3; }
  .seo-school .topbar, .seo-school .crumbs, .seo-school .row-actions, .seo-school .skip-link, .seo-school .fs-btn,
  .seo-school .site-foot p:last-child, .seo-school [data-sponsor], .seo-school .sponsor-slot, .seo-school .ad-slot,
  .seo-school .leaflet-container, .seo-school .kpis, .seo-school .cx-src, .seo-school .cx-why summary,
  .seo-school .cx-why a, .seo-school main > p.muted.small a { display: none !important; }
  .seo-school .fs-only { display: block; }
  .seo-school .rp-facts > .fs-only { display: block; }
  .seo-school .card { padding: 5pt 8pt; border-radius: 5pt; break-inside: avoid; }
  .seo-school .card h2 { font-size: 9.5pt; margin: 0 0 3pt; }
  .seo-school h2 .small { font-size: 7pt; }
  /* header: name + tags, QR at the top right */
  .seo-school .dx-head { position: relative; min-height: .98in; padding: 0 1in 0 0; margin: 0 0 4pt; }
  .seo-school .dx-head h1 { font-size: 16pt; line-height: 1.15; margin: 1pt 0 2pt; }
  .seo-school .rp-kicker { font-size: 7pt; margin: 0; }
  .fs-qr { position: absolute; top: 0; right: 0; width: .9in; margin: 0; text-align: center; }
  .fs-qr svg { display: block; width: .76in; height: .76in; margin: 0 auto; }
  .fs-qr figcaption { font-size: 6pt; line-height: 1.15; color: #4A5868; }
  /* left: key facts, students; right: academics; programs as one full-width line underneath */
  .seo-school .seo-grid { grid-template-columns: 1fr 1.2fr; grid-auto-flow: row dense; gap: 5pt 8pt; }
  .seo-school .seo-grid > .card:nth-child(2) { grid-row: span 2; }
  .seo-school .seo-grid > [aria-labelledby="prog-h"] { grid-column: 1 / -1; order: 9; padding: 3pt 8pt; }
  .seo-school #prog-h { display: inline; margin-right: 6pt; }
  .seo-school #prog-h ~ p.muted { display: none; }
  .seo-school #prog-h ~ ul, .seo-school #prog-h ~ ul li { display: inline; margin: 0; padding: 0; }
  .seo-school #prog-h ~ ul li + li::before { content: " · "; }
  .seo-school .rp-facts { grid-template-columns: minmax(0, 1.15in) 1fr; font-size: 8pt; gap: .5pt 8pt; }
  .seo-school .rp-facts dt { line-height: 1.2; }
  .seo-school .card > p.muted { margin: 0 0 1pt; font-size: 7.5pt; }
  .seo-school .card ul:not([class]) { margin: 0; padding-left: 12pt; }
  .fs-bell { margin: 4pt 0 0; font-size: 7.5pt; line-height: 1.25; }
  .fs-muted { color: #4A5868; }
  /* students: label, bar and share on one line */
  .seo-school .bars { gap: 1pt; font-size: 7.5pt; }
  .seo-school .bars li { grid-template-columns: 1.45in 1fr 2.4em; align-items: center; gap: 0 6pt; line-height: 1.25; }
  .seo-school .bars b { grid-column: 3; grid-row: 1; }
  .seo-school .bars i { grid-column: 2; grid-row: 1; height: 4px; }
  .seo-school .metric-table { font-size: 7.8pt; }
  .seo-school .metric-table th, .seo-school .metric-table td { padding: 1pt 3pt; }
  .seo-school .metric-table thead th { font-size: 6.5pt; }
  .seo-school .metric-table th[scope=row] { line-height: 1.15; }
  .seo-school .metric-table .cx-s { display: block; zoom: .6; width: 100%; margin: 0; min-width: 0; }
  /* chart keys sit on the heading line */
  .seo-school .card h2:has(+ .cx-key) { display: inline-block; margin-right: 10pt; }
  .seo-school .cx-key { display: inline-flex; gap: 2pt 10pt; margin: 0 0 3pt; font-size: 6.8pt; vertical-align: 1pt; }
  .seo-school .cx-note { margin: 3pt 0 0; padding: 2pt 5pt; font-size: 7pt; line-height: 1.25; }
  /* charts: where the school falls (two strips side by side), test results over time (two small charts) */
  .seo-school .cx-grid { display: grid; grid-template-columns: 1fr; gap: 5pt; margin: 5pt 0; }
  .seo-school .cx-card h2 { margin-bottom: 2pt; }
  .seo-school #pos-h ~ .cx-row { display: inline-block; vertical-align: top; width: calc(50% - 6pt); margin: 0 4pt 2pt 0; }
  .seo-school .cx-l { font-size: 7.8pt; line-height: 1.25; }
  .seo-school .cx-l > span { font-size: 7.5pt; }
  .seo-school .cx-card .cx-s { height: 20px; background-position: 0 8px; }
  .seo-school .cx-ax { display: none; }
  .seo-school .cx-figs { grid-template-columns: 1fr 1fr; gap: 0 14pt; }
  .seo-school .cx-fig figcaption { font-size: 7.8pt; }
  .seo-school .cx-tr { max-width: 2.2in; }
  .seo-school .cx-bars { gap: 2pt; font-size: 7.5pt; }
  .seo-school .cx-bars i { height: 6px; }
  .seo-school .cx-why { margin: 2pt 0 0; font-size: 7pt; line-height: 1.25; color: #4A5868; }
  .seo-school details.cx-why::details-content { content-visibility: visible; display: block; }
  .seo-school main > p.muted.small { font-size: 7pt; line-height: 1.25; margin: 4pt 0 0; }
  /* bottom: printed-on date, attribution, source years */
  .seo-school .site-foot { margin: 5pt 0 0; padding: 3pt 0 0; border: 0; border-top: 1px solid #D5DCE4; background: none;
    font-size: 6.8pt; line-height: 1.25; color: #4A5868; }
  .seo-school .site-foot .fs-printed { margin: 0 0 1pt; }
  .fs-printed b { color: #1B2633; }
  .seo-school span.fs-only { display: inline; }
  .seo-school .site-foot .wrap { padding: 0; }
  .seo-school .site-foot p { margin: 0; }
}
@page fs { margin: .45in .45in .4in; }
