:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f2efe8;
  --ink: #1f2430;
  --ink-2: #545b6b;
  --line: #e3dfd5;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --focus: #2563eb;
  --ok: #2e9a6b;
  --l4: #1f8a5b; --l3: #3b6fd8; --l2: #c08a1e; --l1: #d8573b; --lr: #7a7f8c;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --lv4: #1c5cab; --lv3: #86b6ef; --lv2: #ee9290; --lv1: #c43c3b;
  --rb-p2: #1c5cab; --rb-p1: #86b6ef; --rb-z: #c9c7c0; --rb-n1: #ee9290; --rb-n2: #c43c3b;
  --q1: #86b6ef; --q2: #3987e5; --q3: #1c5cab; --q4: #0d366b;
  --ref1: #3d3d3a; --ref2: #8a8983; --map-dot: #52514e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161b; --surface: #1c1f26; --surface-2: #252932; --ink: #ecedf0; --ink-2: #a7adba;
    --line: #333845; --accent: #fb8a4c; --accent-ink: #1a1a1a; --focus: #7aa7ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --ref1: #e8e7e1; --ref2: #9a998f; --map-dot: #c3c2b7;
    --lv4: #9ec5f4; --lv3: #2f6fbd; --lv2: #a8423f; --lv1: #f08c8a;
    --rb-p2: #9ec5f4; --rb-p1: #2f6fbd; --rb-z: #5c5b56; --rb-n1: #a8423f; --rb-n2: #f08c8a;
    --q1: #184f95; --q2: #2a78d6; --q3: #6da7ec; --q4: #b7d3f6;
  }
}
:root[data-theme="dark"] {
  --bg: #14161b; --surface: #1c1f26; --surface-2: #252932; --ink: #ecedf0; --ink-2: #a7adba;
  --line: #333845; --accent: #fb8a4c; --accent-ink: #1a1a1a; --focus: #7aa7ff;
  --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --ref1: #e8e7e1; --ref2: #9a998f; --map-dot: #c3c2b7;
    --lv4: #9ec5f4; --lv3: #2f6fbd; --lv2: #a8423f; --lv1: #f08c8a;
    --rb-p2: #9ec5f4; --rb-p1: #2f6fbd; --rb-z: #5c5b56; --rb-n1: #a8423f; --rb-n2: #f08c8a;
    --q1: #184f95; --q2: #2a78d6; --q3: #6da7ec; --q4: #b7d3f6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.45rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 99; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 10px 14px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { font-size: 1.6rem; flex: none; }
.brand strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; color: var(--ink-2); font-size: .78rem; }
.search { margin-left: auto; order: 1; }
.search input { width: 240px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.hbtn { flex: none; height: 38px; min-width: 38px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.hbtn:hover { background: var(--surface-2); }
.theme-btn { order: 2; width: 38px; padding: 0; }
.lang-btn { order: 3; }
.lang-btn .lg-short, .search-btn, .menu-btn { display: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; width: 100%; order: 10; margin: 0 -10px; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .93rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent); color: var(--accent-ink); }

/* Phones and small tablets: one slim row; search and menu open below it */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .brand { flex: 1 1 0; order: 0; gap: 8px; }
  .brand-mark { font-size: 1.35rem; }
  .brand strong { font-size: .98rem; }
  .brand small { display: none; }
  .search-btn { display: inline-flex; order: 1; width: 40px; padding: 0; }
  .theme-btn { order: 2; width: 40px; height: 40px; }
  .lang-btn { order: 3; height: 40px; padding: 0 10px; }
  .lang-btn .lg-long { display: none; }
  .lang-btn .lg-short { display: inline; }
  .menu-btn { display: inline-flex; order: 4; height: 40px; width: 44px; padding: 0; font-size: 1.25rem; background: var(--surface-2); border-radius: 10px; }
  .search { display: none; order: 9; width: 100%; margin: 0; }
  .site-header.search-open .search { display: block; }
  .search input { width: 100%; padding: 11px 14px; font-size: 16px; }
  .nav { display: none; flex-direction: column; margin: 0; gap: 0; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav a.active { border-radius: 8px; }
}
@media (max-width: 360px) { .brand strong { font-size: .9rem; } .lang-btn { padding: 0 8px; } }

main { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }
main:focus { outline: none; }

/* Generic blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.05); }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 70ch; }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-left: 1.4em; position: relative; margin: .35em 0; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
ul.homes li { padding-left: 1.4em; position: relative; margin: .35em 0; }
ul.homes li::before { content: "🏠"; position: absolute; left: 0; font-size: .85em; }
.note { background: var(--surface-2); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; margin: 16px 0; }

/* Hero */
.hero { margin-bottom: 8px; }

/* Grade chips */
.grade-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.grade-chips a { text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.grade-chips a.active, .grade-chips a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Matrix */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; font-size: .86rem; }
.matrix th, .matrix td { padding: 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; text-align: left; }
.matrix thead th { background: var(--surface-2); position: sticky; top: 0; font-size: .9rem; }
.matrix thead th a { color: var(--ink); text-decoration: none; }
.matrix th[scope=row] { background: var(--surface-2); white-space: nowrap; position: sticky; left: 0; z-index: 1; }
.matrix th[scope=row] a { color: var(--ink); text-decoration: none; }
.matrix td a { color: var(--ink); text-decoration: none; display: block; }
.matrix td:hover { background: var(--surface-2); }
.matrix .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.matrix td.empty { color: var(--ink-2); }

/* Subject cards on grade page */
.subj { border-top: 5px solid var(--c, var(--accent)); }
.subj h3 { display: flex; align-items: center; gap: 8px; }
.subj .focus { color: var(--ink-2); margin-top: 0; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-top: 8px; }
.frames .card h3 { font-size: 1rem; }

/* Journey */
.thread-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.thread { border-collapse: collapse; min-width: 900px; width: 100%; font-size: .86rem; }
.thread th, .thread td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.thread thead th { background: var(--surface-2); }
.thread tbody th { white-space: nowrap; }
.journey { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.journey .card { scroll-snap-align: start; }
.journey .step { font-weight: 700; color: var(--c, var(--accent)); }
.subject-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.subject-tabs a { text-decoration: none; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-weight: 500; }
.subject-tabs a.active { border-color: var(--c); box-shadow: inset 0 -3px 0 var(--c); }

/* Report card decoder */
.levels { display: grid; gap: 10px; }
.level-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.level-row .badge { font-family: Fraunces, Georgia, serif; font-size: 1.5rem; text-align: center; border-radius: 10px; padding: 6px 0; color: #fff; }
.level-row.sel { outline: 3px solid var(--focus); }
.badge.l4 { background: var(--l4); } .badge.l3 { background: var(--l3); } .badge.l2 { background: var(--l2); } .badge.l1 { background: var(--l1); } .badge.lr { background: var(--lr); }
.letter-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.letter-picker button { min-width: 44px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.letter-picker button.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.decode-out { min-height: 80px; }
.tl { display: grid; gap: 10px; }
.tl-row { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 12px; }
.tl-row > div { padding: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.tl-row.head > div { background: transparent; border: 0; font-weight: 700; padding-bottom: 0; }
@media (max-width: 700px) { .tl-row { grid-template-columns: 1fr; } .tl-row.head { display: none; } }

/* Milestones */
.timeline { position: relative; margin-left: 12px; padding-left: 28px; border-left: 3px solid var(--line); }
.tl-group { margin-bottom: 26px; }
.tl-group > h3 { position: relative; }
.tl-group > h3::before { content: ""; position: absolute; left: -38px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.ms { margin: 8px 0; }

/* Tracker */
.tracker-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--c, var(--ok)); transition: width .3s; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ok); flex: none; }
.check.done span { color: var(--ink-2); text-decoration: line-through; }

/* Glossary & search */
.gloss-filter { width: 100%; max-width: 420px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; margin-bottom: 14px; }
dl.gloss { display: grid; gap: 10px; }
dl.gloss > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
dl.gloss dt { font-weight: 700; }
dl.gloss dd { margin: 4px 0 0; color: var(--ink-2); }
.result { margin-bottom: 10px; }
.result a { font-weight: 600; }
mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 2px; }

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0; font-size: .88rem; color: var(--ink-2); }
.site-footer a { color: var(--ink-2); }

@media print {
  .site-header, .site-footer, .page-actions, .grade-chips, .subject-tabs, .no-print, .official-tools, .tray, .controls { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  details.more { display: block; }
  details.more > * { display: block; }
}

/* ---------- utilities ---------- */
.small { font-size: .84rem; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt6 { margin-top: 6px; } .m0 { margin: 0; }
.grow { flex: 1; min-width: 200px; }
.spread { justify-content: space-between; margin-top: 24px; }
.card.tool { text-decoration: none; color: inherit; }
.card.tool:hover { border-color: var(--accent); }
.card.tool p { margin: 0; }
.card-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 0; }
.subj.focused { outline: 3px solid var(--c); }
.badge.inline { display: inline-block; padding: 2px 10px; border-radius: 8px; color: #fff; font-weight: 700; font-family: Inter, sans-serif; font-size: .9rem; }
.btn.sm { padding: 5px 10px; font-size: .85rem; margin-top: 8px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0; }
.controls label, .me-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.controls select, .controls input, .me-form select, .me-form input {
  padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 400; min-width: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: .86rem; }
.data th, .data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data td { font-variant-numeric: tabular-nums; }
.data thead th { background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.data tr.ref th, .data tr.ref td { color: var(--ink-2); font-style: italic; }
.data.schools tbody th { font-weight: 500; }
button.sort { all: unset; cursor: pointer; font-weight: 700; }
button.sort:focus-visible { outline: 3px solid var(--focus); }

/* ---------- official expectations ---------- */
.official-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.official-tools .gloss-filter { margin: 0; }
.strand { margin-top: 28px; }
.strand h2 { border-left: 5px solid var(--c); padding-left: 10px; }
.why { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.why p { margin: 4px 0 0; }
details.oe { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; }
details.oe > summary { cursor: pointer; padding: 12px 16px; display: flex; gap: 10px; list-style: none; }
details.oe > summary::-webkit-details-marker { display: none; }
details.oe > summary::before { content: "▸"; color: var(--c); font-weight: 700; }
details.oe[open] > summary::before { content: "▾"; }
details.oe .pill { margin-left: 6px; }
.code { font-weight: 700; color: var(--c, var(--accent)); white-space: nowrap; font-variant-numeric: tabular-nums; }
ol.se { list-style: none; margin: 0; padding: 0 16px 12px 40px; }
ol.se li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
details.oe > p { padding: 0 16px 12px 40px; margin: 0; }

/* ---------- compare grades ---------- */
.cmp { margin-top: 16px; }
.cmp h2 { margin-top: 0; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-col .step { font-weight: 700; color: var(--c); }
.changes { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.changes li { margin: 4px 0; }

/* ---------- handout ---------- */
.handout { padding: 28px; }
.ho-head h1 { font-size: 1.6rem; }
.ho-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ho-fields label { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; color: var(--ink-2); gap: 4px; }
.handout input, .handout textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%; }
.ho-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .ho-cols { grid-template-columns: 1fr; } }
.handout h2 { font-size: 1.05rem; margin: 18px 0 6px; }
table.ho-focus { border-collapse: collapse; font-size: .85rem; width: 100%; }
.ho-focus th, .ho-focus td { text-align: left; vertical-align: top; padding: 5px 6px; border-bottom: 1px solid var(--line); }
.ho-focus th { white-space: nowrap; font-weight: 600; }
.ho-q li { margin: 6px 0; }
.ho-q label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.ho-q li.off span { color: var(--ink-2); text-decoration: line-through; }
.ho-mine li { margin: 6px 0; }
.ho-notes { min-height: 120px; }
.ho-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .82rem; }
@media print {
  @page { size: letter; margin: 0.5in; }
  body { font-size: 10.5pt; }
  main { padding: 0; }
  .handout { border: 0; padding: 0; box-shadow: none; }
  .handout input, .handout textarea { border: 0; border-bottom: 1px solid #999; border-radius: 0; background: transparent; padding: 2px 0; resize: none; }
  .handout input[type=checkbox] { display: none; }
  .ho-q li.off, .ho-mine li.empty { display: none; }
  .ho-notes { min-height: 2.2in; border: 1px solid #999 !important; }
  .ho-cols { grid-template-columns: 1fr 1fr; gap: 18px; }
  .handout h2 { margin-top: 10px; }
}

/* ---------- schools ---------- */
.tray { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 16px; margin: 12px 0; position: sticky; top: 8px; z-index: 5; }
.tray-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: .88rem; }
.tray-chip a { color: var(--ink); text-decoration: none; }
.tray .x { border: 0; background: transparent; color: var(--ink-2); font-size: 1.1rem; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; }
.tray .x:hover { background: var(--line); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); margin: 8px 0; z-index: 0; }
@media (max-width: 600px) { .map { height: 340px; } }
.leaflet-popup-content { font: 14px/1.45 Inter, system-ui, sans-serif; }
.school-card { padding: 14px 16px; }
.school-card a { color: var(--ink); text-decoration: none; }
.facts { margin: 12px 0; font-size: .92rem; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--ink-2); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; }
.refkey { display: inline-block; width: 0; height: 14px; border-left: 4px solid var(--ref1); }
.refkey.r2 { border-left: 2px dashed var(--ref2); }

/* horizontal grouped bars */
.hbars { display: grid; gap: 14px; }
.hb-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
@media (max-width: 560px) { .hb-row { grid-template-columns: 1fr; gap: 4px; } }
.hb-label { font-size: .86rem; font-weight: 600; }
.hb-track { position: relative; display: grid; gap: 2px; padding: 4px 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: 25% 100%; background-position: -0.5px 0; border-right: 1px solid var(--line); }
.hb-bar { height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-none { height: 12px; font-size: .7rem; line-height: 12px; color: var(--ink-2); padding-left: 4px; }
.hb-ref { position: absolute; top: 0; bottom: 0; width: 0; border-left: 4px solid var(--ref1); margin-left: -2px; }
.hb-ref::after { content: ""; position: absolute; inset: 0 -6px; }
.hb-ref.r2 { border-left: 2px dashed var(--ref2); margin-left: -1px; z-index: 1; }
.hb-axis { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: .72rem; color: var(--ink-2); }
.hb-axis > div { position: relative; height: 14px; }
.hb-axis > div span { position: absolute; transform: translateX(-50%); }
.hb-axis > div span:first-child { transform: none; }
.hb-axis > div span:last-child { transform: translateX(-100%); }
@media (max-width: 560px) { .hb-axis { grid-template-columns: 1fr; } .hb-axis > span { display: none; } }

/* trend small multiples */
.trends { margin-bottom: 6px; }
/* Results over time: Grade 3 measures on the first row, the matching Grade 6 measures right below */
.grid-3.trends { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .grid-3.trends { grid-template-columns: 1fr; } }
.trend { margin: 0; padding: 12px 12px 4px; }
.trend figcaption { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.trend svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend .grid { stroke: var(--line); stroke-width: 1; }
.trend .ax { fill: var(--ink-2); font-size: 11px; font-family: Inter, sans-serif; }
.trend .gap { fill: var(--surface-2); }
.trend .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .ref { fill: none; stroke-width: 1.5; }
.trend .ref.r1 { stroke: var(--ref1); stroke-width: 3.5; }
.trend .ref.r2 { stroke: var(--ref2); stroke-dasharray: 4 3; }
.trend .pt { stroke: var(--surface); stroke-width: 2; }
.trend .hit { fill: transparent; cursor: default; }
details.tv { margin-top: 14px; }
details.tv summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 8px; }

/* tooltip */
.tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: .82rem; max-width: 280px; box-shadow: var(--shadow); }

/* my EQAO */
.me-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 12px 0; }
.me-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.me-form legend { font-weight: 700; padding: 0 4px; }
.me-card { border-left: 5px solid var(--l3); }
.me-card.warn { border-left-color: var(--l2); }
.me-card h3 { font-size: 1rem; }
.data tbody th[scope=row] { min-width: 190px; }
.data.schools tbody th[scope=row] { min-width: 220px; }
.handout input[type=checkbox] { width: 18px; height: 18px; flex: none; margin-top: 3px; padding: 0; accent-color: var(--accent); }
.ho-focus th { width: 1%; }

/* tracker explanations */
.check-row { position: relative; display: flex; align-items: flex-start; gap: 6px; border-bottom: 1px dashed var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row .check { flex: 1; border-bottom: 0; }
.info { flex: none; margin-top: 8px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink-2); background: transparent;
  color: var(--ink-2); font: italic 700 .78rem/1 Georgia, serif; cursor: pointer; padding: 0; }
.info:hover, .check-row.open .info { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.explain { position: absolute; z-index: 30; left: 30px; right: 0; top: calc(100% - 4px); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); border-radius: 10px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  font-size: .88rem; visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility 0s linear .15s; }
.explain strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.explain p { margin: 2px 0 8px; }
.explain p:last-child { margin-bottom: 0; }
.check-row:hover .explain, .check-row:focus-within .explain, .check-row.open .explain {
  visibility: visible; opacity: 1; transition: opacity .15s ease .25s, visibility 0s linear .25s; }
.check-row.open .explain { transition-delay: 0s; }
@media (hover: none) { .check-row:hover:not(.open) .explain { visibility: hidden; opacity: 0; } }
@media print { .info, .explain { display: none !important; } }

/* add-to-compare buttons: clear, high-contrast */
.btn.add { background: transparent; color: var(--accent); border: 2px solid var(--accent); font-weight: 700; }
.btn.add:hover { background: var(--accent); color: var(--accent-ink); filter: none; }
.btn.add.on { background: var(--accent); color: var(--accent-ink); }
.btn.add.on:hover { filter: brightness(1.08); }
/* match Leaflet popups to the site theme so their text and buttons stay readable in dark mode */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-popup-content a { color: var(--accent); }

/* ---------- EQAO analytics ---------- */
.howto { color: var(--ink-2); font-size: .92rem; max-width: 80ch; }
.howto strong { color: var(--ink); }
.controls.inline { margin: 0 0 12px; padding: 0; }
.viz-controls { position: sticky; top: 8px; z-index: 6; }
.mount { width: 100%; }
svg.viz { display: block; overflow: visible; max-width: 100%; }
svg.viz .g { stroke: var(--line); stroke-width: 1; }
svg.viz .ax { fill: var(--ink-2); font: 11px Inter, sans-serif; }
svg.viz .axl { fill: var(--ink-2); font: 600 12px Inter, sans-serif; }
svg.viz .fit { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; }
svg.viz .zero { stroke: var(--ink-2); stroke-width: 1.5; }
svg.viz .fun { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }
svg.viz .fun.f99 { stroke-dasharray: 5 4; }
svg.viz .dot { fill: var(--rb-z); stroke: var(--surface); stroke-width: 1; opacity: .9; cursor: pointer; }
svg.viz .dot.big { stroke: var(--surface); stroke-width: 2.5; opacity: 1; }
svg.viz .dot:hover { stroke: var(--ink); stroke-width: 2; }
svg.viz .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
svg.viz .ln.ref.r1 { stroke: var(--ref1); stroke-width: 3.5; }
svg.viz .ln.ref.r2 { stroke: var(--ref2); stroke-width: 1.5; stroke-dasharray: 4 3; }
svg.viz .pt { stroke: var(--surface); stroke-width: 2; }
svg.viz .pt.ref.r1 { fill: var(--ref1); } svg.viz .pt.ref.r2 { fill: var(--ref2); }
svg.viz .hit { fill: transparent; }
.rb-p2 { fill: var(--rb-p2); background: var(--rb-p2); } .rb-p1 { fill: var(--rb-p1); background: var(--rb-p1); }
.rb-z { fill: var(--rb-z); background: var(--rb-z); } .rb-n1 { fill: var(--rb-n1); background: var(--rb-n1); } .rb-n2 { fill: var(--rb-n2); background: var(--rb-n2); }
svg.viz .dot.rb-p2 { fill: var(--rb-p2); } svg.viz .dot.rb-p1 { fill: var(--rb-p1); } svg.viz .dot.rb-n1 { fill: var(--rb-n1); } svg.viz .dot.rb-n2 { fill: var(--rb-n2); }

/* five-year range */
.rg { display: grid; gap: 14px; }
.rg-track { position: relative; display: grid; gap: 4px; padding: 4px 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: 25% 100%; background-position: -0.5px 0; border-right: 1px solid var(--line); }
.rg-row { position: relative; height: 14px; }
.rg-bar { position: absolute; top: 5px; height: 4px; border-radius: 2px; opacity: .55; }
.rg-dot { position: absolute; top: 1px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--surface); }

/* level breakdown */
.lvc { display: grid; gap: 18px; }
.lv-title { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.lv-row { display: grid; grid-template-columns: minmax(120px, 230px) 1fr; gap: 10px; align-items: center; margin: 3px 0; }
.lv-row.ref .lv-name { color: var(--ink-2); font-style: italic; }
.lv-name { font-size: .82rem; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-bar { display: grid; grid-template-columns: 1fr 1fr; height: 16px; }
.lv-left { display: flex; justify-content: flex-end; border-right: 2px solid var(--ink); }
.lv-right { display: flex; }
.lv { height: 100%; }
.lv + .lv { box-shadow: inset 2px 0 0 var(--surface); }
.lv-l1, i.lv-l1 { background: var(--lv1); } .lv-l2, i.lv-l2 { background: var(--lv2); } .lv-l3, i.lv-l3 { background: var(--lv3); } .lv-l4, i.lv-l4 { background: var(--lv4); }
.lv-left .lv:first-child { border-radius: 4px 0 0 4px; } .lv-right .lv:last-child { border-radius: 0 4px 4px 0; }
.lv-sep { color: var(--ink-2); }
.lv-axis { display: grid; grid-template-columns: minmax(120px, 230px) 1fr; gap: 10px; font-size: .72rem; color: var(--ink-2); }
.lv-axis > div { display: flex; justify-content: space-between; }
.lv-axis .mid { font-weight: 700; color: var(--ink); }
@media (max-width: 560px) { .lv-row, .lv-axis { grid-template-columns: 1fr; gap: 2px; } .lv-axis > span { display: none; } }

/* strips */
.strips { display: grid; gap: 10px; }
.strip { position: relative; height: 44px; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: 25% 100%; background-position: -0.5px 0; }
.strip i { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--ink-2); opacity: .35; }
.strip b { position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--surface); z-index: 2; }
.ctxrow .hb-label { color: var(--ink-2); font-weight: 500; }
.ctxrow { border-top: 1px dashed var(--line); padding-top: 8px; }

/* subgroups */
.sg { display: grid; grid-template-columns: 1fr; gap: 22px; }
.sg-head { display: flex; gap: 14px; font-size: .82rem; font-weight: 600; margin-bottom: 6px; flex-wrap: wrap; }
.sg-head span { display: inline-flex; align-items: center; gap: 6px; }
.sg-row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 84px; gap: 10px; align-items: center; margin: 4px 0; }
.sg-row.nr .lv-name { color: var(--ink-2); }
.sg-note { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sg-row.ref .lv-name { color: var(--ink-2); font-style: italic; }
.sg-track { position: relative; height: 18px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: 25% 100%; background-position: -0.5px 0; border-right: 1px solid var(--line); }
.sg-link { position: absolute; top: 8px; height: 2px; background: var(--ink-2); opacity: .6; }
.mk { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; display: inline-block; }
.sg-head .mk { position: static; margin: 0; --c: var(--ink-2); }
.mk.ma { border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }
.mk.mb { border-radius: 50%; background: var(--surface); border: 2.5px solid var(--c); }
.sg-nr { position: absolute; left: 4px; top: 1px; font-size: .72rem; color: var(--ink-2); }
.sg-axis { grid-template-columns: minmax(140px, 260px) 1fr 84px; gap: 10px; }
@media (max-width: 560px) { .sg-row { grid-template-columns: 1fr 64px; } .sg-row .lv-name { grid-column: 1 / -1; } .sg-axis { grid-template-columns: 1fr 64px; } .sg-axis > span { display: none; } }
.viz-controls { padding: 10px 16px; }
.hl-line .tray-chip { margin: 2px 4px 2px 0; }
@media (max-width: 700px) { .viz-controls { position: static; } }
/* segmented toggle (TDSB / All Ontario) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); margin: 4px 0 6px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .9rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }
/* click card for chart dots */
.pop { position: fixed; z-index: 1100; width: min(320px, calc(100vw - 16px)); padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pop p { margin: 4px 0 10px; }
.pop-x { position: absolute; top: 4px; right: 4px; border: 0; background: transparent; color: var(--ink-2); font-size: 1.2rem; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.pop-x:hover { background: var(--surface-2); }
.pop strong { display: block; padding-right: 24px; }
.pop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pop-actions .btn.sm { margin-top: 0; }
.strip i { cursor: pointer; }
.strip i::after { content: ""; position: absolute; inset: -4px; }
.strip i:hover { opacity: 1; background: var(--ink); transform: scale(1.6); }
.strip b { cursor: pointer; }

/* ======================================================================
   Responsive: phones, touch screens and large monitors
   ====================================================================== */
.m-only { display: none; }
.glance-m, .thread-m { display: none; }
.grade-chips button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.grade-chips button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.glance-list { display: grid; gap: 8px; margin-top: 10px; }
.glance-item { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--c); text-decoration: none; color: var(--ink); }
.gi-subj { font-weight: 700; font-size: .95rem; }
.gi-focus { color: var(--ink-2); font-size: .92rem; }
.glance-all { justify-self: start; margin-top: 4px; }
.thread-card h3 { border-left: 4px solid var(--c); padding-left: 8px; }
.thread-card dl { margin: 0; display: grid; gap: 0; }
.thread-card dl > div { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.thread-card dl > div:last-child { border-bottom: 0; }
.thread-card dt a { font-weight: 700; color: var(--c); text-decoration: none; }
.thread-card dd { margin: 0; font-size: .92rem; }
details.caveat > summary { cursor: pointer; font-weight: 700; list-style: none; }
details.caveat > summary::-webkit-details-marker { display: none; }
details.caveat > summary::before { content: "▸ "; color: var(--accent); }
details.caveat[open] > summary::before { content: "▾ "; }
details.caveat > p { margin: 8px 0 0; }

@media (max-width: 700px) {
  main { padding-top: 18px; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.25rem; margin-top: 1.3em; }
  .lead { font-size: 1.02rem; }
  .card { padding: 16px; }
  .matrix-wrap, .thread-wrap { display: none; }
  .glance-m, .thread-m { display: block; }
  .thread-m { display: grid; gap: 12px; }
  .m-only { display: flex; }
  .page-actions .btn { flex: 1 1 auto; justify-content: center; }
  .tray { position: static; }
  .tray .btn { flex: 1 1 auto; justify-content: center; }
  .controls { gap: 10px; }
  .controls label, .controls .btn { width: 100%; }
  .controls select, .controls input { width: 100%; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; }
  .legend { font-size: .8rem; gap: 4px 12px; }
  .journey { grid-auto-columns: 86%; }
  .subject-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .subject-tabs a { flex: none; }
  .note { padding: 10px 14px; }

  /* data tables become stacked cards */
  .table-wrap:has(> table.stack), .table-wrap:has(table.stack) { border: 0; background: transparent; overflow: visible; }
  table.stack, table.stack tbody { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin: 0 0 10px; }
  table.stack tr.ref { background: var(--surface-2); }
  table.stack th[scope=row] { display: block; min-width: 0; border: 0; padding: 4px 0 6px; font-size: .95rem; position: static; background: transparent; }
  table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; border-top: 1px dashed var(--line); padding: 6px 0; text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--ink-2); font-style: normal; text-align: left; }
  table.stack td.cb { justify-content: flex-start; flex-direction: row-reverse; align-items: center; }
  table.stack td.cb input { width: 22px; height: 22px; }
  .m-sort { flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; margin: 0 0 12px; }
  .m-sort select { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
}

/* touch screens: comfortable tap targets */
@media (pointer: coarse) {
  .info { width: 34px; height: 34px; margin-top: 4px; font-size: .9rem; }
  .explain { left: 0; }
  .tray .x, .pop-x { width: 38px; height: 38px; }
  .grade-chips a, .grade-chips button { padding: 10px 16px; }
  .card-links a { display: inline-block; padding: 8px 0; }
  .btn.sm { padding: 9px 14px; }
  button.sort { padding: 8px 2px; }
  .check { padding: 10px 0; }
  .check input { width: 24px; height: 24px; }
  details.oe > summary, details.tv summary { padding-top: 14px; padding-bottom: 14px; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
}

/* large monitors: a little more room for charts */
@media (min-width: 1440px) { .wrap { max-width: 1280px; } }
.brand-text { min-width: 0; overflow: hidden; }
.brand-short { display: none !important; }
@media (max-width: 520px) { .brand-long { display: none !important; } .brand-short { display: block !important; } }
@media (max-width: 700px) { .hero .grade-chips { display: none; } }
@media (max-width: 700px) {
  table.stack tr { display: flex; flex-direction: column; }
  table.stack th[scope=row] { order: -1; }
  table.schools.stack tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  table.schools.stack th[scope=row], table.schools.stack td.cb { grid-column: 1 / -1; }
  table.schools.stack td.cb { border-top: 0; padding-top: 0; }
}
.m-text { display: none; }
@media (max-width: 700px) { .d-only { display: none; } .m-text { display: inline; } }
@media (max-width: 700px) {
  .info { width: 34px; height: 34px; margin-top: 4px; font-size: .9rem; }
  .explain { left: 0; }
  .check { padding: 10px 0; }
  .check input { width: 26px; height: 26px; }
  table.stack td.cb input { width: 30px; height: 30px; }
  .thread-card dt a { display: inline-block; padding: 6px 4px 6px 0; min-width: 40px; }
  .card-links a { display: inline-block; padding: 8px 0; }
  .tray .x, .pop-x { width: 38px; height: 38px; }
  .btn.sm { padding: 9px 14px; }
}
details.how { max-width: 80ch; }
details.how p { font-size: .9rem; color: var(--ink-2); margin: 6px 0; }
/* schools like this one */
.sim-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; margin: 0 0 14px; font-size: .92rem; }
.sim-d { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sim-d.up { color: var(--lv4); font-weight: 600; } .sim-d.down { color: var(--lv1); font-weight: 600; }
.sim-table tr.sim-self th, .sim-table tr.sim-self td { background: var(--surface-2); }
.sim-table td.cb .btn { margin: 0; white-space: nowrap; }
/* research */
.research-box { border: 1px solid var(--line); border-left: 5px solid var(--accent); background: var(--surface); border-radius: var(--radius); padding: 12px 16px; margin: 18px 0; }
.rb-head { font-weight: 700; margin-bottom: 6px; }
.rb-item { display: grid; gap: 2px; padding: 8px 0; border-top: 1px dashed var(--line); text-decoration: none; color: var(--ink); }
.rb-item:first-of-type { border-top: 0; }
.rb-item span { color: var(--ink-2); font-size: .92rem; }
.rb-item em { color: var(--accent); font-style: normal; font-weight: 600; font-size: .88rem; }
.rs-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.rs-toc a { text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .9rem; }
.rs-topic { margin-top: 18px; scroll-margin-top: 90px; }
.rs-topic h2 { margin-top: 0; }
.rs-topic.focused { outline: 3px solid var(--accent); }
.rs-sides > div { border-radius: 10px; padding: 4px 14px; }
.rs-pro { background: color-mix(in srgb, var(--lv3) 18%, transparent); }
.rs-con { background: color-mix(in srgb, var(--lv2) 22%, transparent); }
.rs-src li { margin: 6px 0; }
@media (max-width: 700px) { .rs-toc { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .rs-toc a { flex: none; } }
@media (min-width: 901px) and (max-width: 1240px) { .nav a { padding: 6px 7px; font-size: .86rem; } }
/* non-blocking message */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1200; max-width: min(520px, calc(100vw - 32px));
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: .92rem; }
.toast a { color: var(--bg); font-weight: 700; margin-left: 8px; }
.toast[hidden] { display: none; }
.sim-add { margin-top: 6px; }
.sim-add .btn { margin: 0; white-space: nowrap; }
/* search suggestions */
.ac-wrap { position: relative; }
.ac-wrap input { width: 100%; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; list-style: none; margin: 0; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.22); max-height: 360px; overflow-y: auto; }
.ac-item { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name btn" "meta btn"; gap: 0 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ac-item:hover, .ac-item.active { background: var(--surface-2); }
.ac-name { grid-area: name; font-weight: 600; }
.ac-meta { grid-area: meta; font-size: .8rem; color: var(--ink-2); }
.ac-item .btn { grid-area: btn; margin: 0; white-space: nowrap; }
.ac-more { padding: 8px 10px; }

/* practice links in subject cards */
.practice { margin: 10px 0 4px; border-top: 1px dashed var(--line, #ddd); padding-top: 8px; }
.practice summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.practice ul { margin: 6px 0; padding-left: 18px; }
.practice li { margin: 4px 0; }
.practice .small { margin-left: 2px; }
@media (pointer: coarse) { .practice summary, .practice li a { display: inline-block; padding: 6px 0; } }

/* CCAT explainer */
.ccat-band.b0 { fill: var(--surface-2); } .ccat-band.b1 { fill: transparent; }
.ccat-curve { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.ccat-stem { stroke-width: 2; stroke-dasharray: 3 3; }
.me-card.ccat-vh, .me-card.ccat-ah { border-left-color: var(--l4); }
.me-card.ccat-av { border-left-color: var(--l3); }
.me-card.ccat-bl, .me-card.ccat-vl { border-left-color: var(--l2); }
.me-card h3 .sw, .card h3 .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
ol.steps { padding-left: 22px; } ol.steps li { margin: 6px 0; }
#ccForm input[data-b] { width: 6.5em; }
/* repair lists by priority */
details.rep { margin: 4px 0; } details.rep summary { font-size: .9rem; }
details.rep-U summary { color: var(--l1); } details.rep-H summary { color: var(--l2); }
/* programs and child care */
.filters { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 4px 0 8px; }
.filters .chk { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; cursor: pointer; }
.filters .chk input { width: 18px; height: 18px; }
table.prog .cc + .cc { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
table.prog .cc ul { margin: 4px 0; padding-left: 18px; }
.nowrap { white-space: nowrap; }
/* radar charts */
.rd-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rd-ring.mid { stroke: var(--ink-2); stroke-dasharray: 4 3; }
.rd-spoke { stroke: var(--line); stroke-width: 1; }
.rd-shape { fill-opacity: .14; stroke-width: 2; }
.rd-lab { font-size: 11px; }
/* building strips: each row has its own scale */
.bstrips .strip { position: relative; margin-bottom: 14px; }
.strip-end { position: absolute; bottom: -16px; font-size: 11px; color: var(--ink-2); }
.strip-end.l { left: 0; } .strip-end.r { right: 0; }
