/* =========================================================================
   Property School - statewide build stylesheet
   Warm paper, white cards, hairline rules. One accent (deep eucalypt) reserved
   for the money figures and primary actions; amber for caveats.
   8px spacing rhythm, 12-16px radii, tabular numerals for every figure.
   ========================================================================= */

:root {
  --paper:      #faf8f5;
  --surface:    #ffffff;
  --surface-2:  #f4f1ea;
  --surface-3:  #eeebe3;
  --ink:        #141a33;
  --ink-2:      #414c6b;
  --ink-3:      #6b7691;
  --rule:       #e7e2d8;
  --rule-strong:#d6cfc2;

  /* The A+ property brand: gold is the accent and blue is the second voice. On paper
     the gold has to darken a long way to stay readable, so the accent is an ochre. */
  --gold:        #f5c451;
  --blue:        #3b6cff;
  --on-accent:   #ffffff;
  --page-atmosphere: none;   /* the navy atmosphere is dark-mode only */

  --accent:      #7d5303;
  --accent-deep: #674404;
  --accent-wash: #fdf4dc;
  --accent-line: #ecd9a4;

  /* cautions stay a burnt orange so they cannot be confused with the gold accent */
  --amber-ink:  #8a3d0a;
  --amber-bg:   #fdf0e3;
  --amber-line: #eccfae;

  --flag-bg:    #141a33;
  --flag-ink:   #f5c451;

  --info-bg:    #edf2fe;
  --info-ink:   #2348ab;

  /* the wordmark pill: glass in dark, a tinted chip on paper */
  --mark-bg:    linear-gradient(180deg, rgba(20,26,51,.055), rgba(20,26,51,.015));
  --mark-line:  rgba(20,26,51,.12);
  --mark-inset: rgba(255,255,255,.7);

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 56px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(22, 32, 26, .05), 0 1px 1px rgba(22, 32, 26, .04);
  --shadow-md: 0 1px 2px rgba(22, 32, 26, .04), 0 10px 28px -14px rgba(22, 32, 26, .16);
  --shadow-lg: 0 2px 4px rgba(22, 32, 26, .05), 0 18px 40px -18px rgba(22, 32, 26, .22);

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* The colour scheme is chosen by data-theme on <html>. The inline script in the
   page head sets it before the first paint - from the stored choice if there is
   one, otherwise from the device setting - so the wrong theme never flashes.
   The header button cycles Auto, Light, Dark. */
:root[data-theme="dark"] {
  --paper: #070b16; --surface: #0c1222; --surface-2: #121a2d; --surface-3: #1a2338;
  --ink: #eef2ff; --ink-2: #98a6c9; --ink-3: #5d6b92;
  --rule: rgba(255,255,255,.10); --rule-strong: rgba(255,255,255,.20);
  --gold: #f5c451; --blue: #3b6cff; --on-accent: #0a0f1c;
  --accent: #f5c451; --accent-deep: #ffd977; --accent-wash: rgba(245,196,81,.10); --accent-line: rgba(245,196,81,.30);
  --amber-ink: #f0a878; --amber-bg: rgba(240,140,90,.12); --amber-line: rgba(240,140,90,.32);
  --flag-bg: #070b16; --flag-ink: #f5c451;
  --info-bg: rgba(59,108,255,.14); --info-ink: #a8c0ff;
  --mark-bg: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.022));
  --mark-line: rgba(255,255,255,.10);
  --mark-inset: rgba(255,255,255,.14);
  --page-atmosphere:
    radial-gradient(900px 600px at 8% -6%, rgba(59,108,255,.20), rgba(59,108,255,0) 62%),
    radial-gradient(820px 620px at 100% 106%, rgba(245,196,81,.13), rgba(245,196,81,0) 62%),
    linear-gradient(180deg, #070b16, #0a1024 52%, #070b16);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -14px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 18px 40px -18px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--paper); background-image: var(--page-atmosphere, none);
  background-attachment: fixed; color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: clamp(1.85rem, 4.6vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .9em; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .9em; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 0; }


/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 20px; background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand-name { font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; }
.brand-tag { font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .09em; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--ink-2); font-size: .88rem;
  padding: 6px 11px; border-radius: var(--r-sm);
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a.is-on { background: var(--accent-wash); color: var(--accent-deep); font-weight: 600; }
.theme-toggle {
  flex: none; font: inherit; font-size: .78rem; font-weight: 600;
  color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.theme-toggle:hover { background: var(--surface-3); color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 72px; }
.view[hidden] { display: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.lede { font-size: 1.06rem; color: var(--ink-2); }
.text-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }
.text-link:hover { border-bottom-color: var(--accent); }
.crumb { margin-bottom: 18px; font-size: .9rem; }

/* ---------- landing ---------- */
.landing { display: grid; grid-template-columns: 1.15fr .95fr; gap: 48px; align-items: start; }
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.hero-points li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: .95rem; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-wash); border: 2px solid var(--accent);
}

.setup-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-md);
}
.field-block { margin-bottom: 22px; }
.field-label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-hint { font-size: .78rem; color: var(--ink-3); }
.budget-display { margin-bottom: 6px; }
.budget-display input {
  width: 100%; font: 600 1.6rem/1.2 var(--sans); font-variant-numeric: tabular-nums;
  color: var(--accent-deep); background: transparent; border: 0; border-bottom: 2px solid var(--accent-line);
  padding: 6px 0;
}
.budget-display input:focus { outline: none; border-bottom-color: var(--accent); }
.budget-slider { width: 100%; margin: 12px 0 8px; accent-color: var(--accent); }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  font: 500 .78rem/1 var(--sans); padding: 6px 10px; cursor: pointer;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px;
}
.preset:hover { border-color: var(--rule-strong); color: var(--ink); }
.preset.is-on { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-deep); font-weight: 600; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  font: 500 .85rem/1.3 var(--sans); padding: 8px 12px; cursor: pointer;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
}
.seg-btn:hover { background: var(--surface-2); }
.seg-btn.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.seg-btn.is-soon { opacity: .55; cursor: not-allowed; }
.soon-tag {
  display: inline-block; margin-left: 7px; padding: 2px 6px; vertical-align: middle;
  font: 600 .58rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 999px; opacity: .9;
}
.seg-btn em { font-style: normal; opacity: .8; }

.btn {
  font: 600 .92rem/1 var(--sans); padding: 12px 18px; cursor: pointer;
  border-radius: var(--r-sm); border: 1px solid transparent;
}
.btn-block { width: 100%; display: block; }
.btn-sm { font-size: .84rem; padding: 8px 13px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.setup-note { margin: 12px 0 0; font-size: .82rem; color: var(--ink-3); }


/* ---------- page head ---------- */
.page-head { margin-bottom: 20px; }
.page-sub { color: var(--ink-2); font-size: .95rem; max-width: 76ch; }

/* ---------- filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: 16px; margin-bottom: 16px;
}
/* flex-end so a label that wraps to a second line cannot drop its select out of
   line with every other select in the row (Scott: "Sales behind the median"). */
.filter-group { display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; min-width: 0; flex: 1 1 165px; }
.filter-label { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.filter-select, .filter-num {
  font: 500 .88rem/1.3 var(--sans); color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 8px 9px; width: 100%; max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.filter-num { font-weight: 600; color: var(--accent-deep); }

.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.results-count { font-size: .92rem; color: var(--ink-2); font-weight: 600; }
.results-count strong { color: var(--ink); }

/* ---------- result cards ---------- */
.results-list { display: grid; gap: 14px; }
.rc-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-sm);
}
.rc-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-md); }
.rc-top { display: flex; gap: 14px; align-items: baseline; }
.rc-rank {
  flex: none; font: 700 .8rem/1 var(--mono); color: var(--ink-3);
  background: var(--surface-2); border-radius: 6px; padding: 5px 7px; min-width: 34px; text-align: center;
}
.rc-title { font-size: 1.06rem; font-weight: 650; margin: 0; }
.rc-title a { color: inherit; text-decoration: none; }
.rc-title a:hover { color: var(--accent-deep); }
.rc-where { font-size: .83rem; color: var(--ink-3); margin-top: 2px; }

.rc-figures { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 12px; }
.fig {
  flex: 1 1 150px; background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.fig.is-lead { background: var(--accent-wash); border-color: var(--accent-line); }
.fig-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.fig.is-lead .fig-label { color: var(--accent-deep); }
.fig-value { font-size: 1.32rem; font-weight: 700; color: var(--accent-deep); line-height: 1.25; }
.fig-none { font-size: .95rem; font-weight: 600; color: var(--ink-3); }
.fig-n { font-size: .76rem; color: var(--ink-3); }

.rc-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .82rem; color: var(--ink-2); margin-bottom: 12px; }
.rc-schools { display: grid; gap: 6px; margin-bottom: 14px; }
.rc-school { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .87rem; }
.rc-school-kind {
  flex: none; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface-3); border-radius: 4px; padding: 3px 6px; min-width: 62px; text-align: center;
}
.rc-school-name { font-weight: 600; }
.rc-school-idx { color: var(--ink-3); font-size: .8rem; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rea-btn { text-decoration: none; display: inline-block; }
.rc-none { font-size: .8rem; color: var(--ink-3); font-style: italic; }

.pill { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.pill-warn { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-line); }
.pill-ok { background: var(--accent-wash); color: var(--accent-deep); border: 1px solid var(--accent-line); }

.more-row { margin-top: 20px; text-align: center; }
.empty-panel { background: var(--surface); border: 1px dashed var(--rule-strong); border-radius: var(--r-md); padding: 32px; text-align: center; color: var(--ink-2); }

/* ---------- maps ---------- */
.map-panel, .map-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 14px; margin-bottom: 18px; }
.map-panel[hidden] { display: none; }
.map-canvas { width: 100%; height: auto; display: block; border-radius: var(--r-sm); background: var(--surface-2); }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; font-size: .78rem; color: var(--ink-2); }
.map-legend .swatch { display: inline-block; width: 18px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.map-note { font-size: .78rem; color: var(--ink-3); margin: 8px 0 0; }
/* The note above ends with no bottom margin, so the paragraph holding the button needs
   a top margin of its own or the two sit flush and the button reads as sitting on the
   text. Reported on the Chester Hill page, fixed for every school card. */
.ms-link { margin: 14px 0 0; }
.map-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px; }
.map-loading { font-size: .84rem; color: var(--ink-3); margin: 0; }
.map-tip {
  position: fixed; pointer-events: none; z-index: 80;
  background: var(--ink); color: var(--paper); font-size: .8rem;
  padding: 7px 10px; border-radius: 6px; max-width: 280px; box-shadow: var(--shadow-lg);
}

/* ---------- detail ---------- */
.d-head { margin-bottom: 20px; }
.d-eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.d-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.d-fact { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 15px; }
.d-fact.is-lead { background: var(--accent-wash); border-color: var(--accent-line); }
.d-fact-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.d-fact-value { font-size: 1.5rem; font-weight: 700; color: var(--accent-deep); line-height: 1.25; }
.d-fact-sub { font-size: .78rem; color: var(--ink-3); }
.d-section { margin: 28px 0; }
.d-section > h3 { border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.school-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px; margin-bottom: 12px; }
.school-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; justify-content: space-between; }
.school-name { font-weight: 650; font-size: 1rem; }
.school-sub { font-size: .82rem; color: var(--ink-3); }
.school-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .84rem; color: var(--ink-2); }
.school-facts b { color: var(--ink); }

.rea-block {
  background: var(--surface); border: 1px solid var(--accent-line);
  border-radius: var(--r-md); padding: 18px; margin: 18px 0;
}
.rea-block h3 { margin-top: 0; }
.rea-block p { font-size: .88rem; color: var(--ink-2); }

/* ---------- method / prose ---------- */
.prose { max-width: 82ch; }
.prose h3 { margin-top: 34px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 7px; color: var(--ink-2); }
.table-scroll { overflow-x: auto; margin: 14px 0 20px; }
.prose-table { border-collapse: collapse; width: 100%; font-size: .86rem; min-width: 520px; }
.prose-table th, .prose-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.prose-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.status { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.status-real { background: var(--accent-wash); color: var(--accent-deep); }
.status-missing { background: var(--amber-bg); color: var(--amber-ink); }
.formula {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  padding: 14px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-family: var(--mono); font-size: .88rem; overflow-x: auto;
}
.method-list { list-style: none; padding: 0; }
.method-list li { border-bottom: 1px solid var(--rule); padding: 12px 0; color: var(--ink-2); font-size: .9rem; }
.method-list b { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; font-size: .8rem; color: var(--ink-3); }
.footer-links { display: flex; gap: 10px; align-items: center; }

/* ---------- narrow ---------- */
@media (max-width: 820px) {
  .landing { grid-template-columns: 1fr; gap: 28px; }
  .site-header { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 700px) {
  main { padding: 20px 14px 56px; }
  .filter-bar { position: static; padding: 11px; gap: 8px; }
  .filter-group { flex: 1 1 calc(50% - 4px); gap: 3px; }
  .filter-label { font-size: .66rem; letter-spacing: .05em; }
  .filter-select, .filter-num { padding: 7px 8px; font-size: .82rem; }
  .rc-top { flex-wrap: wrap; }
  .d-fact-value { font-size: 1.3rem; }
  .results-toolbar { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .filter-group { flex: 1 1 100%; }
}

/* ---------- children ---------- */
.kid-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.kid-row { display: flex; align-items: center; gap: 8px; }
.kid-n {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent-deep);
  font: 700 .74rem/22px var(--sans); text-align: center;
}
.kid-row select {
  flex: 1 1 auto; min-width: 0;
  font: 500 .86rem/1.3 var(--sans); color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 7px 8px;
}
.kid-del {
  flex: none; width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--rule);
  color: var(--ink-3); font: 600 1rem/1 var(--sans); cursor: pointer;
}
.kid-del:hover { color: var(--ink); border-color: var(--rule-strong); }
.kid-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-ghost { background: transparent; color: var(--ink-3); border-color: transparent; text-decoration: underline; }
.btn-ghost:hover { color: var(--ink); }
.nav-count {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  font-size: .68rem; font-weight: 700; border-radius: 999px;
  padding: 1px 6px; margin-left: 3px;
}
.rc-kids { display: grid; gap: 4px; margin: 0 0 12px; font-size: .84rem; color: var(--ink-2); }
.rc-kids b { color: var(--ink); }
.rc-kids .kid-tag {
  display: inline-block; background: var(--accent-wash); color: var(--accent-deep);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-radius: 4px; padding: 2px 6px; margin-right: 6px;
}
.band-flag { color: var(--amber-ink); }

/* ---------- primary cells ranked inside a boys x girls overlap ---------- */
.pc-block {
  margin: 0 0 14px; padding: 12px 14px 4px;
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--surface-2, var(--surface));
}
.pc-head { font-size: .84rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.pc-note { font-size: .76rem; line-height: 1.5; color: var(--ink-3); margin: 0 0 8px; }
.pc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pc-row {
  display: grid; grid-template-columns: 1.4em 1fr auto; grid-template-areas: "rank name price" ". n alt";
  gap: 1px 8px; align-items: baseline; text-decoration: none; color: inherit;
  padding: 7px 8px; margin: 0 -8px; border-top: 1px solid var(--rule);
  border-radius: var(--r-sm, 6px);
}
.pc-list li:first-child .pc-row { border-top: none; }
.pc-row:hover { background: var(--accent-wash); }
.pc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pc-row.is-sel { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }
.pc-rank {
  grid-area: rank; font-size: .7rem; font-weight: 700; color: var(--ink-3);
  font-variant-numeric: tabular-nums; text-align: right;
}
.pc-name { grid-area: name; font-size: .84rem; color: var(--ink); }
.pc-price { grid-area: price; font-size: .9rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-n { grid-area: n; font-size: .72rem; color: var(--ink-3); }
.pc-alt { grid-area: alt; font-size: .72rem; color: var(--ink-3); text-align: right; }
.d-section-pc { margin-top: 18px; }

/* ---------- shortlist / compare ---------- */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .86rem; }
.cmp-table th, .cmp-table td { padding: 11px 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.cmp-table thead th { background: var(--surface-2); font-size: .8rem; }
.cmp-table tbody th {
  font-weight: 600; color: var(--ink-3); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  background: var(--surface-2);
}
.cmp-name { font-weight: 650; font-size: .9rem; }
.cmp-sub { font-size: .76rem; color: var(--ink-3); font-weight: 400; }
.cmp-val { font-size: 1.05rem; font-weight: 700; color: var(--accent-deep); }
.cmp-best { background: var(--accent-wash); }
.cmp-del {
  background: none; border: 0; color: var(--ink-3); cursor: pointer;
  font-size: .78rem; text-decoration: underline; padding: 0;
}
.cmp-del:hover { color: var(--ink); }


/* ---- the top-band share line, added 17 Oct 2026 (HSC pass) ----
   Every colour here goes through the theme variables. It used to be a hardcoded
   mint panel with an inherited text colour, which left the figure nearly
   invisible on the dark background. */
.rc-value{margin-top:10px;padding:9px 12px;background:var(--accent-wash);border-left:3px solid var(--accent);border-radius:0 8px 8px 0}
.rc-value-num{font-weight:700;font-size:1.15rem;color:var(--accent-deep);font-variant-numeric:tabular-nums;margin-right:7px}
.rc-value-lb{color:var(--ink-2);font-size:.82rem;line-height:1.4}
.rc-value-none{background:var(--surface-2);border-left-color:var(--rule-strong);color:var(--ink-2);font-size:.82rem;line-height:1.45}
.d-value{margin-top:12px;padding:12px 14px;background:var(--accent-wash);border-left:3px solid var(--accent);border-radius:0 8px 8px 0}
.status-linked{background:var(--info-bg);color:var(--info-ink)}

/* the buyability gate: shown wherever a school's published figure is a blend the
   house cannot buy (partially selective, fully selective, or audition entry) */
.rc-gate {
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  color: var(--amber-ink);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
}

/* ---------- interactive maps (MapLibre) ----------
   The map containers are divs, not canvases, so they need a height of their own.
   These rules sit after .map-canvas in the file, so the height here wins over its
   height:auto. */
.map-gl { width: 100%; height: 520px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.map-gl-state { height: 640px; }
.map-gl-results { height: 460px; }
.map-gl-detail { height: 420px; }
.map-fail { padding: 4px 2px; font-size: .85rem; color: var(--ink-2); margin: 0; }
.map-gl .maplibregl-ctrl-attrib { font-size: .68rem; line-height: 1.35; }
.map-gl .maplibregl-ctrl-group button { width: 30px; height: 30px; }
.map-gl .maplibregl-ctrl-group { border-radius: 8px; }

/* The map controls ship light. Recolour them for the dark theme, including the
   zoom glyphs, which are dark artwork baked into the stylesheet. */
[data-theme="dark"] .map-gl .maplibregl-ctrl-group { background: var(--surface-2); box-shadow: 0 0 0 1px var(--rule-strong); }
[data-theme="dark"] .map-gl .maplibregl-ctrl-group button + button { border-top-color: var(--rule); }
[data-theme="dark"] .map-gl .maplibregl-ctrl-icon { filter: invert(1) hue-rotate(180deg); }
[data-theme="dark"] .map-gl .maplibregl-ctrl-attrib { background: rgba(7,11,22,.86); color: var(--ink-2); }
[data-theme="dark"] .map-gl .maplibregl-ctrl-attrib a { color: var(--accent); }

@media (max-width: 720px) {
  .map-gl { height: 400px; }
  .map-gl-state { height: 440px; }
  .map-gl-results { height: 330px; }
  .map-gl-detail { height: 300px; }
  .map-gl .maplibregl-ctrl-attrib { font-size: .62rem; }
  .map-gl .maplibregl-ctrl-group button { width: 34px; height: 34px; }
}


/* =========================================================================
   A+ property wordmark - carried across from the aplus.property landing page.
   A glass pill with a breathing gold halo behind it and a light sweep across the
   face. The halo and the sweep are decoration: prefers-reduced-motion kills both.
   ========================================================================= */
.mark-wrap { position: relative; display: inline-flex; align-items: center; }
.halo {
  position: absolute; inset: -9px; border-radius: 999px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(245,196,81,.55), rgba(245,196,81,0) 70%);
  filter: blur(22px);
  animation: ps-breathe 7s ease-in-out infinite;
}
.mark {
  position: relative; z-index: 1; display: inline-flex; align-items: baseline; overflow: hidden;
  padding: .34em .74em; border-radius: 1.05em; line-height: 1.2;
  background-image: var(--mark-bg);
  border: 1px solid var(--mark-line);
  box-shadow: inset 0 1px 0 var(--mark-inset), 0 10px 26px -12px rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  font-size: 1.04rem; font-weight: 750; letter-spacing: -.02em;
}
.mark-a { color: var(--ink); }
.mark-plus { color: var(--gold); text-shadow: 0 0 26px rgba(245,196,81,.55); }
.mark-word { margin-left: .42em; font-size: .62em; font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.mark::after {
  content: ''; position: absolute; top: -25%; bottom: -25%; left: -60%; width: 34%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.30), rgba(255,255,255,0));
  transform: skewX(-18deg); pointer-events: none;
  animation: ps-sweep 8s ease-in-out infinite;
}
:root[data-theme="light"] .mark::after {
  background: linear-gradient(100deg, rgba(20,26,51,0), rgba(20,26,51,.10), rgba(20,26,51,0));
}
@keyframes ps-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes ps-sweep { 0% { left: -60%; } 55%, 100% { left: 132%; } }
@media (prefers-reduced-motion: reduce) {
  .halo, .mark::after { animation: none; }
  .halo { opacity: .6; }
}
@media (max-width: 720px) {
  .brand-tag { display: none; }
  .mark { font-size: .92rem; }
}

/* =========================================================================
   v10 additions (18 Oct 2026) - backlog items 1, 3, 4, 5, 6, 8
   ========================================================================= */

/* Item 3: optically centre the wordmark inside the glass pill. */
.mark { align-items: center; padding: .38em .82em; line-height: 1.1; }
.mark-word { position: relative; top: .03em; }

/* Item 5: How It Works + the static Venn of two real catchments.
   Built as separate <g> layers (zones / lens / labels) so a later animation
   pass can move them without touching the markup. */
.how { display: grid; gap: 18px; margin-top: 24px; }
.how-steps { display: grid; gap: 12px; }
.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-n {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent-glass); color: var(--accent-ink);
  border: 1px solid var(--accent-line); font-weight: 800; font-size: .8rem;
}
.how-step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.how-step b { color: var(--ink); }
.venn { margin: 0; }
.venn svg {
  width: 100%; height: auto; display: block;
  border-radius: 16px; background: var(--surface);
  border: 1px solid var(--rule); padding: 8px;
}
.venn-zone { stroke-width: 1.4; }
.venn-zone-b { fill: rgba(59,108,255,.15); stroke: rgba(59,108,255,.65); }
.venn-zone-g { fill: rgba(245,196,81,.13); stroke: rgba(245,196,81,.7); }
.venn-lens { fill: rgba(245,196,81,.32); stroke: rgba(245,196,81,.85); stroke-width: 1.8; }
.venn-t { font-size: 12.5px; font-weight: 700; fill: var(--ink-2); }
.venn-t-g { fill: #7d5303; }
.venn-t-b { fill: var(--blue); }
.venn-t-lens { text-anchor: middle; font-size: 13.5px; fill: #141a33; }
/* dark needs brighter strokes, fills and label inks - the light values sit too
   close to the navy page */
:root[data-theme="dark"] .venn-zone-b { fill: rgba(59,108,255,.24); stroke: #7f9dff; }
:root[data-theme="dark"] .venn-zone-g { fill: rgba(245,196,81,.20); stroke: rgba(245,196,81,.9); }
:root[data-theme="dark"] .venn-lens { fill: rgba(245,196,81,.45); }
:root[data-theme="dark"] .venn-t-g { fill: var(--gold); }
:root[data-theme="dark"] .venn-t-b { fill: #a8c0ff; }
.venn figcaption { margin-top: 10px; font-size: .85rem; color: var(--ink-3); }

/* Item 6: reserved ad slots. Same footprint in both themes, clearly labelled,
   never over the map. Swap the inner label for the ad iframe at launch. */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 96px; border: 1px dashed var(--rule); border-radius: 14px;
  background: var(--surface-2);
}
.ad-label {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); opacity: .8;
}
.ad-banner { width: min(1180px, calc(100% - 48px)); margin: 18px auto 0; }
.ad-inline { grid-column: 1 / -1; margin: 2px 0; min-height: 108px; }
.ad-detail { margin: 16px 0 0; min-height: 108px; }

/* Item 8: shortlist button pinned to the card's top right, My School button
   sits in the action row beside the boundary link. */
.rc-top .rc-sl { margin-left: auto; flex: none; align-self: flex-start; }
.cmp-name { font-weight: 700; color: var(--ink); font-size: .84rem; }

/* v11: sold-data tools on the detail map */
.map-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.chip-btn {
  appearance: none; background: transparent; color: var(--ink-3);
  border: 1px solid var(--rule-strong); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: .86rem; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip-btn:hover:not(:disabled) { border-color: var(--accent-line); color: var(--ink); }
.chip-btn.is-on { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-deep); font-weight: 600; }
.chip-btn:disabled { opacity: .55; cursor: default; }
.soon-chip { font-size: .68em; text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; opacity: .8; }
#sold-note b { color: var(--ink); }
.maplibregl-popup.ps-sold-pop .maplibregl-popup-content {
  background: var(--surface); color: var(--ink); border-radius: 10px;
  padding: 10px 12px; font-size: .85rem; box-shadow: var(--shadow-md);
}
.sp-price { font-weight: 700; font-size: 1.05rem; color: var(--accent-deep); }
.sp-addr { margin-top: 2px; }
.sp-date { margin-top: 3px; color: var(--ink-3); font-size: .78rem; }

/* v11b: subscribe placeholder */
.chip-btn-sub { border-color: var(--accent-line); color: var(--accent-deep); font-weight: 600; }

/* v12: clickable median tiles, sold-popup property link, state picker */
.d-fact-btn { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.d-fact-btn:hover { border-color: var(--accent-line); }
.d-fact-btn[disabled] { cursor: default; }
.sp-link { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--accent-deep); }
#f-state { width: 100%; margin-top: 6px; margin-bottom: 12px; }
#btn-forsale { white-space: normal; text-align: left; max-width: 100%; line-height: 1.35; }
.chip-btn-sub:hover { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-deep); }
.sub-overlay {
  position: fixed; inset: 0; background: rgba(3, 6, 14, .66); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.sub-overlay[hidden] { display: none; }
.sub-card {
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg); max-width: 420px; width: 100%;
  padding: 22px 24px; box-shadow: var(--shadow-lg);
}
.sub-card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.sub-card p { margin: 0 0 10px; font-size: .92rem; line-height: 1.5; }
.sub-dummy { color: var(--ink-3); font-size: .8rem; }
.sub-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
