/* PSLE Guide: white, simple, one accent. Colour is used only for the safe / likely / reach labels. */
:root {
  --bg: #ffffff; --surface: #f8fafc; --ink: #0f172a; --ink-2: #64748b; --line: #e2e8f0; --soft: #f8fafc;
  --accent: #1e40af; --accent-hover: #1e3a8a; --accent-ink: #ffffff; --link: #1e40af;
  --unlikely: #64748b;
  --radius: 12px;
  --font: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: .5em 0 .3em; }
h2 { font-size: 1.2rem; margin: 2em 0 .6em; }
h3 { font-size: 1rem; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.lede { color: var(--ink-2); font-size: 1.02rem; max-width: 64ch; margin-top: 0; }
.fine { color: var(--ink-2); font-size: .85rem; }
.src { color: var(--ink-2); font-size: .85rem; border-top: 1px solid var(--line); padding-top: .8em; margin-top: 2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header + footer */
.top { background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; }
.mark { display: inline-grid; place-items: center; height: 26px; padding: 0 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
nav { display: flex; gap: 0; flex-wrap: wrap; margin: 0 -8px; }
nav a { text-decoration: none; color: var(--ink); font-size: .9rem; padding: 6px 8px; border-radius: 8px; }
nav a:hover { background: var(--soft); }
.slc { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; }
.slc[data-zero] { background: var(--line); color: var(--ink-2); }
nav a.lang { color: var(--ink-2); }
.foot { margin-top: 56px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 .92rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; color: var(--link); padding-left: 4px; padding-right: 4px; }
.btn.wide[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
input[type=number], input[type=text], input[type=search], select { font: 1rem var(--font); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.scorebox { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.scorebox input { width: 84px; text-align: center; font-weight: 700; }
.deskbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }

/* AL picker */
.picker { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 16px 0; }
.seg { display: flex; gap: 4px; background: var(--soft); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 8px; font: 600 .82rem var(--font); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.prow { padding: 8px 0; border-bottom: 1px solid var(--line); }
.prow:last-of-type { border-bottom: 0; }
.pl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.pv { font-size: .85rem; color: var(--ink-2); }
.chips { display: grid; grid-template-columns: 26px repeat(8, 1fr); gap: 5px; align-items: center; }
.al-lbl { font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.chip { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font: 700 1rem var(--font); color: var(--ink); cursor: pointer; padding: 0 6px; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.extra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.extra:empty { display: none; }
.mark { display: none; width: 96px; }
.picker[data-mode="marks"] .mark { display: block; }
.picker[data-mode="marks"] .chips .chip { min-height: 34px; font-size: .85rem; }
.fdnrow { display: none; align-items: center; gap: 5px; }
.picker.show-fdn .fdnrow { display: inline-flex; }
.fdnrow .fl { font-size: .78rem; color: var(--ink-2); font-weight: 600; }
.chip.f { min-width: 42px; }
.chip.x { font-size: .8rem; font-weight: 600; padding: 0 10px; }
.fdntoggle { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--ink-2); margin-top: 8px; }
.totalin { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.totalin input { width: 120px; font-size: 1.4rem; font-weight: 700; text-align: center; }
.total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.total .tl { font-weight: 600; }
.total b { font-size: 2.6rem; line-height: 1; color: var(--ink-2); }
.picker.done .total b { color: var(--accent); }
.total .tg { color: var(--ink-2); font-size: .9rem; flex-basis: 100%; }
.calcgo { margin: 8px 0 20px; }

/* postal form */
.postalform { margin: 8px 0 4px; }
.postalform label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.pf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf input { width: 9em; letter-spacing: .05em; }
.postalform .fine { margin: 4px 0 0; min-height: 1em; }

/* finder list */
.summary { font-weight: 600; margin: 18px 0 8px; }
.flist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.flist li { display: grid; grid-template-columns: 1fr auto 34px; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.flist .nm a { font-weight: 600; color: var(--ink); text-decoration: none; }
.flist .nm a:hover { color: var(--link); }
.flist .cop { font-size: .88rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }


/* key dates + guide links */
.dates ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.dates li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dates .when { font-weight: 700; }
.dates .what { grid-column: 1; color: var(--ink-2); }
.dates .st8 { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.dates li.open .st8 { background: var(--accent); color: #fff; }
.dates li.done { opacity: .6; }
.glist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.glist a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.glist b { display: block; }
.glist span { display: block; font-size: .88rem; color: var(--ink-2); }
.glist a:hover b { color: var(--link); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--ink-2); }
.card h3 { margin: 0 0 4px; }
.card p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { font-weight: 600; cursor: pointer; }

/* tables */
.t { border-collapse: collapse; width: 100%; margin: .8em 0; }
.t th, .t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t thead th { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.prose { max-width: 720px; }
.prose li { margin-bottom: .35em; }
.crumbs { margin-top: 16px; font-size: .85rem; color: var(--ink-2); }
.next { margin-top: 2em; font-weight: 600; }
.count { font-size: .85rem; font-weight: 600; background: var(--soft); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.filters input[type=search] { flex: 1 1 200px; min-width: 0; }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
table.schools { border-collapse: collapse; width: 100%; min-width: 680px; }
.schools th, .schools td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.schools thead th { position: sticky; top: 0; background: var(--bg); font-size: .78rem; color: var(--ink-2); cursor: pointer; user-select: none; white-space: nowrap; }
.schools td a { font-weight: 600; text-decoration: none; color: var(--ink); }
.schools td a:hover { color: var(--link); }
.schools tr.picked { background: #eff6ff; }
.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.st { width: 34px; padding-right: 0 !important; }
.star { border: 0; background: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px; min-width: 34px; min-height: 34px; }
.star[aria-pressed="true"] { color: var(--accent); }
.btn.star { font-size: .92rem; color: var(--ink); }
.sub { font-size: .8rem; color: var(--ink-2); }
.dash { color: var(--unlikely); }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; color: var(--ink-2); border: 1px solid var(--line); margin-left: 4px; }
tr.hide { display: none; }

/* school page */
.types { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.types span { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); }
.t.cop th, .t.cop td { text-align: center; }
.t.cop tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.t.cop td b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.t.cop tr.aff { color: var(--ink-2); }
.t.cop tr.aff b { font-size: .95rem; }
.forscore { font-size: 1rem; margin: 4px 0; }
.where { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 6px; }
.addr { margin: 8px 0 2px; font-weight: 600; }
.fromhome { margin: 2px 0 8px; font-size: .92rem; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.info dt { color: var(--ink-2); font-size: .85rem; }
.info dd { margin: 0; overflow-wrap: anywhere; }
.mini { list-style: none; padding: 0; margin: 0; }
.mini li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.bytown ul { list-style: none; padding: 0; columns: 2 300px; column-gap: 28px; }
.bytown li { break-inside: avoid; margin: 0 0 12px; }
.bytown h3 { margin: 0 0 2px; }
.bytown p { margin: 0; font-size: .9rem; }
.qa { margin-top: 2em; }
td.dist .sub { white-space: normal; max-width: 14em; }

/* shortlist */
.slots { list-style: none; padding: 0; margin: 14px 0; counter-reset: c; border-top: 1px solid var(--line); }
.slots li { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.slots li::before { counter-increment: c; content: counter(c); font-weight: 800; font-size: 1.2rem; color: var(--accent); text-align: center; }
.slots .nm a { font-weight: 600; color: var(--ink); text-decoration: none; }
.slots .ctl { display: flex; gap: 4px; }
.slots .ctl button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; }
@media (max-width: 560px) { .slots li { grid-template-columns: 28px 1fr; } .slots .ctl, .slots .lab { grid-column: 2; } }
.checks ul { list-style: none; padding: 0; }
.checks li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px solid var(--line); }
.checks li::before { position: absolute; left: 4px; top: 8px; font-weight: 800; }
.checks li.ok::before { content: "✓"; color: var(--accent); }
.checks li.warn::before { content: "!"; color: var(--accent); }
.checks li.info::before { content: "i"; color: var(--accent); }
.lic { font-size: .76rem; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .bar { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 2px; }
  nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; min-width: 0; max-width: 100%; }
  nav::-webkit-scrollbar { display: none; }
}
.slcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin: 14px 0; }
.slcard .slots { border-top: 0; margin: 0; }
.slcard .slots li:last-child { border-bottom: 0; }
.slhead { margin: 8px 0 4px; font-weight: 600; }
.slhead:empty { display: none; }
@media print { .top, .foot, .deskbar, .lede, .ctl { display: none !important; } }

input[type=number], input[type=text], input[type=search], select, .picker, .postalform input { background: var(--surface); }
body, .num, .cop, .chip, .total b { font-variant-numeric: tabular-nums; }
.seg button { min-height: 44px; }
/* sticky score bar (the only shadow) */
.scorebar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(15,23,42,.06); }
.scorebar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 10px; }
.scorebar b { font-size: 1.25rem; color: var(--accent); }
.scorebar a { font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; }
.steps3 { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 12px 0 4px; counter-reset: s; }
.steps3 li { font-size: .85rem; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.steps3 li::before { counter-increment: s; content: counter(s); display: block; font-size: 1.1rem; color: var(--accent); }
.effects { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; color: var(--ink-2); }
.effects:empty { display: none; }
.hrow { padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.hchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.diff { font-size: .78rem; color: var(--ink-2); }
.stepper { display: inline-flex; gap: 8px; align-items: center; }
.stepper .chip { width: 52px; min-height: 52px; font-size: 1.4rem; }
.totalin input { width: 110px; min-height: 52px; font-size: 1.6rem; }
.hrow summary { min-height: 44px; display: flex; align-items: center; }
.sfx { display: inline-flex; gap: 6px; margin-left: 4px; } .sfx .chip { width: 44px; min-height: 44px; font-size: 1rem; }
.stepper { flex-wrap: wrap; }
.linkbtn { border: 0; background: none; color: var(--link); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 10px 0; min-height: 44px; }
.sheet { border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; width: 100%; max-width: 560px; margin: auto auto 0; padding: 16px; }
@media (min-width: 700px) { .sheet { border-radius: var(--radius); margin: auto; } }
.sheet::backdrop { background: rgba(15,23,42,.35); }
.sheet h2 { margin-top: 0; }
.sheet label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0; }
.sheet textarea, .sheet input { display: block; width: 100%; margin-top: 4px; font: 1rem var(--font); border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); }

.flist li.yourline { display: block; padding: 0; border-bottom: 0; position: relative; height: 0; }
.flist li.yourline span, tr.yourrow td { display: block; margin: -1px 0 0; padding: 6px 10px; border-top: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: .85rem; background: #eff6ff; }
.flist li.yourline { height: auto; }
tr.yourrow td { display: table-cell; }
.flist li { grid-template-columns: 1fr auto 34px; }
.flist .cop b { font-size: .95rem; }
.sorts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.sorts .chip { min-height: 36px; }
.cmp { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: .85rem; }
.cmp i { font-style: normal; color: var(--ink-2); margin-right: 4px; }
.answers .ans { border-top: 1px solid var(--line); padding: 2px 0 6px; }
.answers h2 { font-size: 1rem; margin: 12px 0 6px; }
.facts dd details.src { display: inline; margin-left: 6px; border: 0; padding: 0; font-size: .8rem; color: var(--ink-2); }
.facts dd details.src summary { display: inline; font-weight: 400; color: var(--ink-2); }
.checks li { display: block; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.tscroll { overflow-x: auto; }
.t.cop tr.arch { color: var(--ink-2); }
.t.cop th.aff, .t.cop td.aff { background: var(--surface); }
.cohort ul { padding-left: 18px; margin: 4px 0; }
.cohort li { margin: 2px 0; }
.answers details.src, .cohort details.src { display: inline-block; border: 0; padding: 0; font-size: .8rem; color: var(--ink-2); }
.prim { margin: 16px 0; } .prim select { width: 100%; margin: 8px 0; }
.t.cop td, .t.cop th { white-space: nowrap; padding: 8px 6px; }
.t.cop .yr { display: block; font-size: .7rem; font-weight: 400; }
.t.cop td b { font-size: 1rem; }
.types span { white-space: normal; }
.banner { background: #eff6ff; border-bottom: 1px solid var(--line); font-size: .88rem; } .banner .wrap { padding-top: 8px; padding-bottom: 8px; } .banner a { font-weight: 700; white-space: nowrap; }
.offer h3 { margin: 14px 0 6px; }
.subjs { font-size: .88rem; color: var(--ink-2); }
.readcop { margin: 6px 0 10px; }
.readcop ul { padding-left: 18px; font-size: .9rem; }
.transit { margin: 6px 0; }
.banner .cd { font-weight: 700; }
.flist .diff { white-space: normal; }
.flist .cop { white-space: normal; }
@media (max-width: 600px) {
  .flist li { grid-template-columns: 1fr 40px; }
  .flist .nm { grid-column: 1; }
  .flist .cop { grid-column: 1; text-align: left; }
  .flist .st { grid-column: 2; grid-row: 1 / span 2; }
}
/* cut-off table (grouped headers, sticky) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 12px; overflow-x: auto; }
.tabs a { padding: 10px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.shown { font-weight: 600; margin: 8px 0 0; }
.range { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
table.z { min-width: 980px; }
table.z thead th { position: sticky; background: var(--bg); z-index: 2; }
table.z thead tr.grp th { top: 0; } table.z thead tr.sub2 th { top: 34px; }
table.z th.cg { text-align: center; border-bottom: 1px solid var(--line); color: var(--ink); }
table.z th[aria-sort="ascending"]::after { content: " ▲"; } table.z th[aria-sort="descending"]::after { content: " ▼"; }
table.z td.b { font-weight: 800; font-size: 1.05rem; }
table.z .oc { display: none; } table.z.older .oc { display: table-cell; }
table.z td.nm a { font-weight: 700; }
.badge { display: inline-block; font-size: .66rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; vertical-align: middle; }
.badge.ip { background: #e0e7ff; color: #1e3a8a; } .badge.sap { background: #f1f5f9; color: #334155; border: 1px solid var(--line); }
table.z td.chg, table.z td.gap { color: var(--ink-2); font-size: .85rem; }
@media (max-width: 700px) {
  .tablewrap { border: 0; overflow: visible; }
  table.z { min-width: 0; }
  table.z thead { display: none; }
  table.z, table.z tbody { display: block; }
  table.z tr { display: grid; grid-template-columns: repeat(3, 1fr) 40px; gap: 2px 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.z td { display: block; border: 0; padding: 0; text-align: left; }
  table.z td:empty { display: none; }
  table.z td.nm { grid-column: 1 / 4; }
  table.z td.st { grid-column: 4; grid-row: 1; }
  table.z td.y0, table.z td.y1, table.z td.y2 { grid-row: 2; }
  table.z td[data-l]::before { content: attr(data-l); display: block; font-size: .7rem; color: var(--ink-2); font-weight: 400; }
  table.z td.rg { grid-row: 3; font-size: .85rem; }
  table.z td.chg, table.z td.gap, table.z td.dist { grid-column: span 4; }
  table.z .oc { display: none !important; }
  table.z tr.yourrow { display: block; }
}
.filters select { max-width: 100%; min-width: 0; } @media (max-width: 700px) { .filters select, .filters input[type=search] { flex: 1 1 140px; } }
.range label { white-space: nowrap; } .range { flex-wrap: nowrap; }
table.z td.rk { color: var(--ink-2); font-size: .85rem; }
.rank { margin: 8px 0 2px; font-size: .92rem; }
@media (max-width: 700px) { table.z td.rk { grid-column: 4; grid-row: 2; text-align: right; } table.z td.rk::before { content: "#"; } }
main.sch { max-width: 1240px; } .tablewrap { max-width: 100%; position: relative; } @media (max-width: 700px) { .tablewrap { position: static; } }

/* schools page: tidy filter bar, fitted table */
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 8px; }
.fbar input[type=search] { flex: 1 1 240px; min-width: 0; }
.fbar select, .fbar input, .fbar .btn { height: 40px; min-height: 40px; padding-top: 0; padding-bottom: 0; }
.fbar .range select { width: 64px; }
details.more { border: 0; padding: 0; margin: 0 0 8px; }
details.more > summary { display: inline-flex; min-height: 40px; align-items: center; color: var(--link); font-weight: 600; }
.tblhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; }
.tblhead h2 { margin: 8px 0; }
.tblhead .shown { margin: 0; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
main.sch { max-width: 1152px; }
table.z { min-width: 0; width: 100%; table-layout: auto; }
table.z th, table.z td { padding: 8px 6px; vertical-align: middle; font-variant-numeric: tabular-nums; }
table.z td.nm { min-width: 250px; }
table.z td.nm .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
table.z td.num, table.z th.num { text-align: right; }
table.z td.rg { text-align: center; white-space: nowrap; }
table.z tbody tr:hover { background: #f8fafc; }
table.z tr.yourrow td { padding: 4px 8px; background: transparent; color: var(--accent); border-top: 2px solid var(--accent); font-size: .82rem; }
@media (min-width: 1300px) { .tablewrap { overflow: visible; } table.z thead tr.grp th { top: 49px; } table.z thead tr.sub2 th { top: 83px; } }
.scorebar { z-index: 30; }
@media (max-width: 640px) { .banner .wrap { font-size: .8rem; } }
table.z th.rgh { text-align: center; }
table.z td.nm { width: 32%; min-width: 260px; }
table.z td.nm a { display: block; line-height: 1.3; }
table.z td.nm .sub { margin-top: 2px; }
table.z .badge { margin-right: 2px; }
table.z td.dist:empty, table.z th[data-sort="dist"]:only-child { }
table.z thead th { white-space: normal; line-height: 1.25; }
table.z td.nm { min-width: 220px; }
table.z td.chg { white-space: nowrap; }
@media (max-width: 700px) { table.z tr { grid-template-columns: repeat(3, minmax(0, 1fr)) 40px; } table.z td { min-width: 0; overflow-wrap: anywhere; } table.z td.nm { min-width: 0; width: auto; } table.z td.nm .sub { white-space: normal; max-width: none; } }
.cmpwrap { overflow-x: auto; margin: 10px 0; }
table.cmpt { min-width: 560px; font-size: .9rem; }
table.cmpt th, table.cmpt td { white-space: normal; vertical-align: top; }
table.cmpt thead th { font-weight: 700; color: var(--ink); min-width: 120px; }
table.cmpt thead th .n { color: var(--accent); font-weight: 800; }
table.cmpt tbody th { color: var(--ink-2); font-weight: 600; font-size: .82rem; white-space: nowrap; }
@media print { .cmpwrap { overflow: visible; } table.cmpt { min-width: 0; } .scorebar, .banner, details, .linkbtn, .acts { display: none !important; } }
.oneline b { color: var(--ink); }
