/* Primary schools enrolment — shared styles. Light by default, dark follows the reader's system. */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #F6F4EE;
  --surface: #FFFFFF;
  --ink: #1A1D1B;
  --ink-2: #3D4440;
  --muted: #5F6763;
  --rule: #DEDAD0;
  --rule-soft: #E8E4DA;
  --rule-strong: #C9C4B7;
  --field-border: #858B87;
  --control-border: #B5B9B3;
  --accent: #0B6B5D;
  --accent-strong: #08503F;
  --accent-tint: #E1EEEA;
  --accent-mid: #5DA898;
  --on-accent: #FFFFFF;
  --series-2: #C8641E;
  --series-2-soft: #E9B48E;
  --chip: #ECE8DF;
  --neutral-bar: #D9D5CB;
  --grid: #E4E0D6;
  --notice-bg: #FBF1DE;
  --notice-border: #E9CF9F;
  --notice-ink: #7A4A00;
  --heat-lo: #EEF4F1;
  --heat-hi: #0B5A4E;
  --heat-ink-hi: #FFFFFF;
  --shadow: 0 1px 2px rgba(26, 29, 27, 0.12);
  --down-ink: #9A4A12;
  --map-bg: #EAE7DE;
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gutter: 20px;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111413;
    --surface: #1A1E1C;
    --ink: #ECEEEA;
    --ink-2: #C3C9C4;
    --muted: #99A19C;
    --rule: #2E3431;
    --rule-soft: #262B28;
    --rule-strong: #3A413D;
    --field-border: #6E7671;
    --control-border: #4A524E;
    --accent: #5DBBA6;
    --accent-strong: #8AD3C2;
    --accent-tint: #17332D;
    --accent-mid: #3E8A7A;
    --on-accent: #0B1512;
    --series-2: #E8955A;
    --series-2-soft: #8C5A38;
    --chip: #262B28;
    --neutral-bar: #3A413D;
    --grid: #2A2F2C;
    --notice-bg: #2E2412;
    --notice-border: #5C4722;
    --notice-ink: #F2C27B;
    --heat-lo: #1C2A26;
    --heat-hi: #6FC7B2;
    --heat-ink-hi: #0B1512;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    --down-ink: #F0A56E;
    --map-bg: #1F2422;
  }
}

@media (min-width: 720px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-strong); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { margin: 0; }

img, svg { max-width: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); }
.muted { color: var(--muted); }

/* ---------- Header ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-header .container { display: flex; align-items: center; gap: 40px; min-height: 64px; }
.wordmark {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; gap: 28px; flex: 1; }
.site-nav a {
  padding: 12px 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.header-search { width: 300px; }
.nav-menu { display: none; margin-left: auto; }

@media (max-width: 959px) {
  .site-header .container { gap: 12px; }
  .site-nav, .header-search { display: none; }
  .nav-menu { display: block; position: static; }
  .nav-menu summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
  }
  .nav-menu summary::-webkit-details-marker { display: none; }
  .nav-menu[open] .nav-menu__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    z-index: 20;
    padding: 16px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .nav-menu__panel a { padding: 12px 0; color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rule-soft); }
  .nav-menu__panel .search-form { margin-top: 12px; }
  .site-header { position: relative; }
}

/* ---------- Search ---------- */

.search-form { display: flex; flex-direction: column; gap: 8px; position: relative; }
.search-form label { font-size: 15px; font-weight: 600; }
.search-form__row { display: flex; gap: 8px; }
.search-input-wrap { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.search-input-wrap svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--field-border);
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--muted); }
.search-form--large .search-input { height: 56px; font-size: 17px; padding-left: 48px; }
.search-form--large .search-input-wrap svg { left: 16px; width: 20px; height: 20px; }
.search-form--large .btn { height: 56px; font-size: 17px; padding: 0 28px; }
.search-form--compact .search-input { height: 44px; font-size: 15px; background: var(--paper); border-color: var(--control-border); }
.search-hint { margin: 0; font-size: 14px; color: var(--muted); }

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.suggestions[hidden] { display: none; }
.suggestions li a {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.suggestions li[aria-selected="true"] a, .suggestions li a:hover { background: var(--accent-tint); }
.suggestions .s-name { font-weight: 600; }
.suggestions .s-meta { font-size: 13px; color: var(--ink-2); }
.suggestions .s-all { font-weight: 600; color: var(--accent); }

/* ---------- Buttons, links, chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--control-border); height: 44px; }
.btn--secondary:hover { color: var(--ink); border-color: var(--field-border); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.link-row { display: flex; flex-wrap: wrap; gap: 4px 28px; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}
a.chip { color: var(--ink); text-decoration: none; padding: 8px 14px; }
a.chip:hover { background: var(--accent-tint); }
.chip--accent { background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
.chip-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-links__label { font-size: 14px; color: var(--muted); margin-right: 4px; }

/* ---------- Page head ---------- */

.page-head { padding-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.page-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 32px; flex-wrap: wrap; }
.page-head__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.page-lede { margin: 0; max-width: 760px; font-size: 17px; color: var(--ink-2); }

/* ---------- Key figures ---------- */

.key-band {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.key-band > div { padding: 18px 24px 20px 0; display: flex; flex-direction: column; gap: 4px; }
.key-band > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.key-band dt { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.key-band .key-value { margin: 0; font-family: var(--font-serif); font-size: clamp(34px, 4vw, 44px); font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.key-band .key-note { margin: 0; font-size: 14px; color: var(--muted); }
.key-band .key-sep { color: var(--muted); font-weight: 400; }

@media (max-width: 719px) {
  .key-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-band > div, .key-band > div + div { padding: 14px 12px 16px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .key-band > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .key-band > div:nth-last-child(-n+2):nth-child(odd), .key-band > div:last-child { border-bottom: 0; }
  .key-band .key-value { font-size: 32px; }
}

/* ---------- Sections and cards ---------- */

.section { padding-top: 56px; }
.section--band {
  margin-top: 56px;
  padding: 48px 0;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.section-title { font-family: var(--font-serif); font-size: clamp(26px, 3vw, 32px); font-weight: 600; letter-spacing: -0.01em; }
.section-lede { margin: 0; max-width: 760px; font-size: 15px; color: var(--muted); }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.card--flush { padding: 0; overflow: hidden; }
.card-title { font-family: var(--font-serif); font-size: 24px; font-weight: 600; }
.card-sub { margin: 4px 0 16px; font-size: 14px; color: var(--muted); }
.card h3 { font-size: 17px; font-weight: 600; }

.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px 40px; align-items: start; }
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 40px; align-items: start; }
.layout-narrow-wide { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px 40px; align-items: start; }
@media (max-width: 959px) {
  .layout-aside, .layout-split, .layout-narrow-wide { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hero (homepage) ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 64px; align-items: start; padding: 64px 0 56px; }
.hero__text { display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.hero__title { font-family: var(--font-serif); font-size: clamp(36px, 5.2vw, 54px); line-height: 1.06; font-weight: 600; letter-spacing: -0.02em; }
.hero__lede { margin: 0; max-width: 560px; font-size: 19px; color: var(--ink-2); }
.hero__panel { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.hero__figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.hero__figure strong { font-family: var(--font-serif); font-size: clamp(44px, 5vw, 56px); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.hero__stats { margin: 6px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.hero__stats dd { margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.hero__stats dt { font-size: 13px; color: var(--muted); order: 2; }
.hero__stats div { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 959px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 40px 0; } }

/* ---------- Charts ---------- */

.chart { width: 100%; }
.chart--main { height: 320px; }
.chart--medium { height: 240px; }
.chart--small { height: 100px; }
.chart--spark { height: 120px; }
.chart-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.chart-range { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.chart-panel[hidden] { display: none; }

.small-multiples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.sm-card { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 2px solid var(--ink); min-width: 0; }
.sm-card h3 { font-size: 15px; font-weight: 600; }
.sm-value { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 600; }
.sm-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 959px) { .small-multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 519px) { .small-multiples { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Toggles and tabs ---------- */

.segmented { display: inline-flex; padding: 3px; background: var(--chip); border-radius: 10px; }
.segmented button, .tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.segmented button[aria-pressed="true"], .tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.tabs { display: inline-flex; flex-wrap: wrap; padding: 3px; background: var(--chip); border-radius: 10px; margin-bottom: 16px; }
.tabs, .js-only { display: none !important; }
.js .tabs, .js .js-only { display: inline-flex !important; }
.tab-panels > [role="tabpanel"] + [role="tabpanel"] { margin-top: 32px; }
.js .tab-panels > [role="tabpanel"] + [role="tabpanel"] { margin-top: 0; }
.js .tab-panel-title { display: none; }
.tab-panel-title { margin-bottom: 12px; font-size: 17px; font-weight: 600; }

.field-select { display: flex; flex-direction: column; gap: 6px; }
.field-select label { font-size: 14px; font-weight: 600; }
.field-select select {
  min-height: 44px;
  min-width: 240px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--control-border);
  border-radius: 10px;
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 0 12px; height: 46px; border-bottom: 1px solid var(--rule-soft); text-align: left; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table thead th { height: 36px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.table tbody th { font-weight: 600; }
.table .r { text-align: right; }
.table a.row-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a.row-link:hover { color: var(--accent); text-decoration: underline; }
.card .table-scroll { margin: 0 -4px; padding: 0 4px; }

.table--boxed th:first-child, .table--boxed td:first-child { padding-left: 24px; }
.table--boxed th:last-child, .table--boxed td:last-child { padding-right: 24px; }
.table--boxed thead th { background: var(--paper); border-bottom: 1px solid var(--rule); }
.table--boxed tbody tr:last-child > * { border-bottom: 0; }

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
th[aria-sort="ascending"] .sort-button, th[aria-sort="descending"] .sort-button { color: var(--ink); }
th[aria-sort="ascending"] .sort-button::after { content: "↑"; }
th[aria-sort="descending"] .sort-button::after { content: "↓"; }

.school-name { display: block; font-weight: 600; color: var(--ink); text-decoration: none; }
a.school-name:hover { color: var(--accent); text-decoration: underline; }
.school-place { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.table td.total { font-weight: 700; }

.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 16px 24px; border-bottom: 1px solid var(--rule); }
.table-tools .search-input-wrap { flex: 0 1 340px; }
.table-tools .search-input { height: 44px; font-size: 15px; background: var(--paper); border-color: var(--control-border); }
.table-tools p { margin: 0; font-size: 14px; color: var(--muted); }
.table-foot { padding: 14px 24px; border-top: 1px solid var(--rule); display: flex; justify-content: center; }
.table-foot[hidden] { display: none; }
tr.is-filtered { display: none; }
.js [data-collapse="12"]:not(.is-expanded):not(.is-filtering) tbody tr:nth-child(n+13),
.js [data-collapse="10"]:not(.is-expanded):not(.is-filtering) tbody tr:nth-child(n+11),
.js [data-collapse="10"]:not(.is-expanded) .result-list > li:nth-child(n+11) { display: none; }
.table-empty { padding: 20px 24px; margin: 0; color: var(--muted); }

.bar-cell { display: flex; align-items: center; gap: 10px; }
.bar { display: inline-block; height: 10px; background: var(--accent); border-radius: 0 2px 2px 0; flex: 0 0 auto; }
.bar-track { width: 150px; flex: 0 0 150px; }
.table-columns .bar-track { width: 90px; flex-basis: 90px; }
@media (max-width: 719px) { .bar-track, .table-columns .bar-track { width: 64px; flex-basis: 64px; } }

.diverge { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.diverge__value { min-width: 52px; text-align: right; }
.diverge__track { display: flex; align-items: center; width: 61px; }
.diverge__half { width: 30px; display: flex; }
.diverge__half--neg { justify-content: flex-end; }
.diverge__axis { width: 1px; height: 16px; background: var(--field-border); }
.diverge__neg { height: 10px; background: var(--series-2); border-radius: 2px 0 0 2px; }
.diverge__pos { height: 10px; background: var(--accent); border-radius: 0 2px 2px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.swatch--neg { background: var(--series-2); }
.swatch--pos, .swatch--accent { background: var(--accent); }
.swatch--mid { background: var(--accent-mid); }
.swatch--neutral { background: var(--neutral-bar); }

/* ---------- Change over 5, 10 or 20 years ---------- */

.change-window { display: inline-flex; align-items: center; gap: 10px; }
.change-window__label { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.change-window .segmented button { padding: 0 12px; white-space: nowrap; }
.change-cell__value { display: block; }
.change-cell__value[hidden] { display: none; }
.section-head .change-window { align-self: flex-end; }

.panel-tools { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.growth-summary { display: flex; flex-direction: column; gap: 16px; }
.growth-summary h3 { font-size: 17px; font-weight: 600; }
.growth-summary .card-sub { margin: 4px 0 0; }
.growth-figures { display: flex; gap: 2px; }
.growth-figures > div { display: flex; flex-direction: column; gap: 2px; flex-basis: 0; min-width: 0; }
.growth-figures > div + div { padding-left: 12px; }
.growth-figures strong { font-family: var(--font-serif); font-size: 36px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.growth-figures span { font-size: 14px; color: var(--ink-2); }
.growth-bar { display: flex; gap: 2px; height: 28px; border-radius: 6px; overflow: hidden; }
.growth-bar > span { display: block; flex-basis: 0; min-width: 3px; }
.growth-bar--small { height: 14px; border-radius: 3px; min-width: 120px; }
.band--down25 { background: var(--series-2); }
.band--down10 { background: var(--series-2-soft); }
.band--steady { background: var(--neutral-bar); }
.band--up10 { background: var(--accent-mid); }
.band--up25 { background: var(--accent); }
.growth-legend strong { color: var(--ink); }
.growth-lists { margin-top: 32px; }
.growth-list { list-style: none; margin: 0; padding: 0; }
.growth-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 118px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.growth-list__rank { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--muted); }
.growth-list__from { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.growth-list__pct { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.growth-list__bar { display: flex; width: 48px; }
.growth-list__bar span { display: block; height: 10px; }
.growth-list__bar--down { justify-content: flex-end; }
.growth-list__bar--up span { background: var(--accent); border-radius: 0 2px 2px 0; }
.growth-list__bar--down span { background: var(--series-2); border-radius: 2px 0 0 2px; }
.growth-newer { margin-top: 32px; }
.growth-newer__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.growth-newer__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule-soft); min-width: 0; }
.growth-newer__pupils { font-family: var(--font-serif); font-size: 20px; font-weight: 600; font-variant-numeric: lining-nums; }
@media (max-width: 959px) { .growth-newer__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) {
  .growth-figures > div { flex-grow: 1 !important; }
  .growth-figures strong { font-size: 28px; }
}
@media (max-width: 519px) {
  .growth-newer__list { grid-template-columns: minmax(0, 1fr); }
  .growth-list li { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .growth-list__from { display: none; }
  .change-window__label { display: none; }
}

.table-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
@media (max-width: 959px) { .table-columns { grid-template-columns: minmax(0, 1fr); } }

/* ---------- School page ---------- */

/* Head: the name, where it is, and only the tags that set the school apart. */
.school-head .chips { margin-top: 2px; }

/* Section tabs. They stick to the top of the screen; once stuck they also show the school's name. */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  margin-top: 28px;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.page-nav.is-stuck { border-top-color: transparent; box-shadow: 0 2px 10px rgba(26, 29, 27, 0.08); }
.page-nav__inner { display: flex; align-items: center; gap: 0 32px; }
.page-nav__name {
  display: none;
  flex: 0 1 auto;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.page-nav__name span { font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.page-nav__name:hover { color: var(--ink); }
.page-nav.is-stuck .page-nav__name { display: flex; }
.page-nav__tabs {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-nav__tabs::-webkit-scrollbar { display: none; }
.page-nav__tabs a {
  display: flex;
  align-items: center;
  height: 52px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -3px 0 transparent;
}
.page-nav__tabs a:hover { color: var(--ink); }
.page-nav__tabs a[aria-current] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.page-nav__short { display: none; }
.school-section { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: no-preference) {
  html:has(.page-nav) { scroll-behavior: smooth; }
}

/* Key figures: four across, two by two on phones. */
.school-figures {
  margin: 28px 0 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.school-figures > div { padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.school-figures > div + div { border-left: 1px solid var(--rule); }
.school-figures dt { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.school-figures dd { margin: 0; }
.school-figures .key-value { font-family: var(--font-serif); font-size: clamp(32px, 4vw, 42px); font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.school-figures .key-sep { color: var(--muted); font-weight: 400; }
.school-figures .key-note { font-size: 14px; color: var(--muted); }
.school-figures .split-bar { display: flex; height: 6px; margin: 4px 0 2px; border-radius: 3px; overflow: hidden; background: var(--series-2); }
.split-bar span { background: var(--accent); }
.school-notice { margin-top: 24px; }
.school-overview { margin-top: 24px; }
.school-trend .card-sub { margin-bottom: 0; }
.school-changes .card-title { margin-bottom: 14px; }

/* Pupils by class: this year's bars and the biggest changes beside the grid. */
.school-classes { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 28px 40px; align-items: start; }
.school-classes__latest { grid-column: 1; grid-row: 1; }
.school-classes__grid { grid-column: 2; grid-row: 1 / span 2; }
.school-classes__changes { grid-column: 1; grid-row: 2; }
.school-classes__changes h3 { margin-bottom: 10px; font-size: 17px; font-weight: 600; }
.school-classes .card-sub { margin-bottom: 0; }
.school-classes__latest .class-bars { margin-top: 16px; }

.class-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.class-bars li { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 14px; }
.class-bars .bar-cell .bar { height: 22px; }
.class-bars strong { font-variant-numeric: tabular-nums; }

.grid-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.grid-head > div:first-child { flex: 1 1 260px; }
.grid-head .field-select select { min-width: 280px; }
.school-classes__grid .table-scroll { overflow-y: hidden; }
.heatmap { border-collapse: separate; border-spacing: 3px; margin: -3px; font-variant-numeric: tabular-nums; font-size: 14px; }
.heatmap thead th { padding: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.heatmap tbody th { padding: 0 12px 0 0; text-align: left; font-weight: 500; white-space: nowrap; }
.heatmap td.cell {
  width: 70px;
  height: 42px;
  text-align: center;
  border-radius: 4px;
  font-weight: 500;
  background: color-mix(in srgb, var(--heat-hi) calc(var(--t, 0) * 100%), var(--heat-lo));
  color: var(--ink);
}
.heatmap td.cell.is-strong { color: var(--heat-ink-hi); }
.heatmap td.cell.is-empty { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--rule); }
.heatmap td.cell.is-group { font-weight: 700; box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3.5px var(--surface); }
.heatmap td.avg { padding: 0 0 0 12px; text-align: right; color: var(--muted); }
.heatmap .avg-head { text-align: right; padding-left: 12px; }
.grid-short, .grid-note { display: none; }
.group-key__swatch { width: 20px; height: 16px; flex: 0 0 auto; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--ink); }

/* The group of pupils chosen above the grid, as a strip of its numbers. */
.cohorts { margin-top: 18px; }
.cohort { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 24px; padding: 14px 16px; background: var(--paper); border-radius: 12px; }
.cohort[hidden] { display: none; }
.cohort__title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.cohort__summary { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.cohort__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 54px; gap: 6px; align-items: end; }
.cohort__steps li { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.cohort__steps strong { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cohort__bar { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.cohort__class { font-size: 12px; font-weight: 600; color: var(--ink-2); }

.changes-list { list-style: none; margin: 0; padding: 0; }
.changes-list li { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--rule); }
.changes-list li:last-child { border-bottom: 1px solid var(--rule); }
.changes-list .change-value { width: 60px; flex: 0 0 auto; font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.changes-list .change-text { font-size: 14px; }

/* Class sizes: each figure is a button that charts it. */
.caveat { max-width: 560px; margin: -8px 0 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.caveat summary { min-height: 46px; padding: 0 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; list-style: none; }
.caveat summary::-webkit-details-marker { display: none; }
.caveat summary span { flex: 1 1 auto; }
.caveat summary svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.caveat[open] summary svg:last-child { transform: rotate(180deg); }
.caveat p { margin: 0; padding: 0 16px 14px 42px; font-size: 14px; color: var(--ink-2); }
.class-size-panel { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px 40px; align-items: start; }
.class-size-panel__hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.class-size-panel__chart .card-sub { margin-bottom: 8px; }
.metric-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 88px;
  padding: 12px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.js .metric-tile { cursor: pointer; }
.js .metric-tile:hover { border-color: var(--field-border); }
.js .metric-tile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.metric-tile__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.metric-tile__value { font-family: var(--font-serif); font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.metric-tile__note { font-size: 12px; color: var(--muted); }

/* Nearby schools: a table beside the map, and a list under it on phones. */
.nearby-map { display: none; height: 420px; isolation: isolate; }
.js .nearby-map { display: block; }
.nearby-table tr.is-self > * { background: var(--accent-tint); }
.nearby-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.is-self .nearby-num { background: var(--ink); color: var(--paper); }
.nearby-num svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nearby-head, .nearby-km, .nearby-link--foot { display: none; }
.nearby-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* About this school: contact, school and area details side by side. */
.about-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; }
.about-group h3 { margin-bottom: 14px; font-size: 15px; }
.about-list { margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.about-list dt { font-size: 13px; color: var(--muted); }
.about-list dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.about-empty { margin: 0 0 18px; font-size: 15px; color: var(--ink-2); }
/* Map, inspection and data-issue links; the second icon marks a link that opens another site. */
.school-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.school-actions .btn svg ~ svg { width: 14px; height: 14px; color: var(--muted); stroke-width: 2.2; }
.school-actions__note { margin: 10px 0 0; max-width: 760px; font-size: 13px; color: var(--muted); }
.school-actions__note + .about-groups { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--rule); }
.aside-note { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }

/* Data by year: every column on wide screens; on phones, totals or classes. */
.js .data-card .data-card__tools { display: none !important; }
.table tr.is-provisional td { color: var(--muted); font-style: italic; }

/* ---------- Teachers ---------- */

.teacher-panel { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px 40px; align-items: start; }
.teacher-summary { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.teacher-total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.teacher-total strong { font-family: var(--font-serif); font-size: 44px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.teacher-total span { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.teacher-total__note { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.teacher-parts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.teacher-parts li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.teacher-parts .swatch { width: 14px; height: 14px; border-radius: 3px; margin-top: 4px; }
.teacher-parts__label { display: flex; flex-direction: column; min-width: 0; }
.teacher-parts__label strong { font-size: 15px; font-weight: 600; }
.teacher-parts__label span { font-size: 13px; color: var(--muted); }
.teacher-parts__value { font-family: var(--font-serif); font-size: 22px; font-weight: 600; font-variant-numeric: lining-nums; white-space: nowrap; }
.teacher-parts__value--none { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--muted); }
.teacher-extra { margin: 0; font-size: 14px; color: var(--ink-2); }
.teacher-next { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--accent-tint); border-radius: 12px; color: var(--accent-strong); font-size: 14px; }
.teacher-next p { margin: 0; }
.teacher-chart { min-width: 0; }
.teacher-chart h3 { font-size: 17px; font-weight: 600; }
.teacher-chart .card-sub { margin-bottom: 4px; }
.teacher-legend { margin: 0 0 4px; gap: 6px 18px; color: var(--ink-2); }
.chart--teachers { height: 330px; }
.swatch--soft { background: var(--series-2-soft); }
.swatch--dashed { background: none; border: 1px dashed var(--field-border); }
.key-prefix { font-family: var(--font-sans); font-size: 0.5em; font-weight: 400; color: var(--muted); }
.teacher-group { margin-top: 32px; }
.band-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.band-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 10px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--rule-soft); }
.band-list a, .band-list__label { font-size: 15px; font-weight: 600; }
.band-list__track { display: flex; height: 10px; }
.band-list__track span { display: block; min-width: 2px; border-radius: 2px; background: var(--accent-mid); }
.band-list__count { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.teacher-count { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.change-badge { padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.change-badge--up { background: var(--accent-tint); color: var(--accent-strong); }
.change-badge--down { background: var(--notice-bg); color: var(--notice-ink); }
.finder-table__sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.finder-band__teachers { padding-left: 20px; border-left: 1px solid var(--rule); }
.finder-band__teachers dt { white-space: normal; }
@media (max-width: 959px) {
  .teacher-panel { grid-template-columns: minmax(0, 1fr); }
  .finder-band__teachers { padding-left: 0; border-left: 0; }
}

/* The grid needs the full width until the page is wide enough for this year's bars beside it. */
@media (max-width: 1199px) {
  .school-classes { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .school-classes > * { grid-column: auto; grid-row: auto; }
}

@media (max-width: 959px) {
  .nearby-layout { grid-template-columns: minmax(0, 1fr); }
  .class-size-panel { grid-template-columns: minmax(0, 1fr); }
  .about-groups { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 719px) {
  [data-page="school"] .breadcrumb li:last-child { display: none; }
  .school-head { padding-top: 20px; gap: 10px; }
  .school-head .page-lede { font-size: 15px; }
  .school-head__download { display: none; }

  .page-nav { margin-top: 20px; }
  .page-nav__inner { flex-wrap: wrap; padding: 0; }
  .page-nav__name {
    width: 100%;
    height: 46px;
    padding: 0 var(--gutter);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--rule-soft);
  }
  .page-nav__name span { flex: 0 0 auto; }
  /* The name row would push the page down as the tabs stick; pull it back so nothing jumps. */
  .page-nav.is-stuck { margin-bottom: -46px; }
  .page-nav__tabs { gap: 0; padding: 0 calc(var(--gutter) - 12px); }
  .page-nav__tabs a { height: 46px; padding: 0 12px; font-size: 14px; }
  .page-nav__long { display: none; }
  .page-nav__short { display: inline; }
  .school-section { scroll-margin-top: 108px; }
  .school-page .section { padding-top: 44px; }

  .school-figures { margin-top: 20px; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-figures > div { padding: 16px; }
  .school-figures > div + div { border-left: 0; }
  .school-figures > div:nth-child(even) { border-left: 1px solid var(--rule); }
  .school-figures > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .school-figures > div:last-child:nth-child(odd) { grid-column: span 2; }
  .school-figures dt { font-size: 13px; }
  .school-figures .key-value { font-size: 30px; }
  .school-figures .key-note { font-size: 13px; }
  .school-overview { margin-top: 16px; gap: 32px; }

  .school-trend .chart-head { flex-direction: column; align-items: stretch; }
  .js .school-trend .segmented, .js .data-card .segmented { display: flex !important; }
  .school-trend .segmented button, .data-card .segmented button { flex: 1 1 0; }
  .school-trend .chart--main { height: 240px; }
  .class-size-panel .chart--medium { height: 200px; }

  .grid-head .field-select { width: 100%; }
  .grid-head .field-select select { width: 100%; min-width: 0; min-height: 48px; }
  .cohort { grid-template-columns: minmax(0, 1fr); }
  .cohort__steps { grid-auto-columns: minmax(0, 1fr); }

  .caveat { max-width: none; margin-top: -8px; }

  .nearby-map { height: 220px; }
  .nearby-link--head { display: none; }
  .nearby-link--foot { display: flex; width: 100%; margin-top: 12px; }
  .nearby-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule); }
  .nearby-table thead { display: none; }
  .nearby-table, .nearby-table tbody { display: block; }
  .nearby-table tr {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas: "num school pupils" "num school change";
    column-gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rule-soft);
  }
  .nearby-table tr:last-child { border-bottom: 0; }
  .nearby-table tr.is-self { background: var(--accent-tint); }
  .table.nearby-table td { height: auto; padding: 0; border: 0; }
  .nearby-table td:nth-child(1) { grid-area: num; }
  .nearby-table td:nth-child(2) { grid-area: school; }
  .nearby-table td:nth-child(3) { display: none; }
  .nearby-table td:nth-child(4) { grid-area: pupils; align-self: end; font-size: 16px; }
  .nearby-table td:nth-child(5) { grid-area: change; align-self: start; font-size: 13px; font-weight: 600; }
  .nearby-table .diverge__track { display: none; }
  .nearby-table .diverge__value { min-width: 0; }
  .nearby-table .diverge--up .diverge__value { color: var(--accent-strong); }
  .nearby-table .diverge--down .diverge__value { color: var(--down-ink); }
  .nearby-km { display: inline; }
  .nearby-table a.school-name { color: var(--accent); }
  .nearby-table a.school-name::after { content: ""; position: absolute; inset: 0; }

  .school-actions { flex-direction: column; gap: 10px; }
  .school-actions .btn { height: 48px; justify-content: flex-start; }
  .school-actions .btn svg ~ svg { margin-left: auto; }
  .about-group h3 { margin-bottom: 4px; }
  .about-list { gap: 0; }
  .about-list > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
  .about-list dt { font-size: 14px; }
  .about-list dd { margin: 0; }

  .data-download { width: 100%; }
  .js .data-card .data-card__tools { display: block !important; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
  .js .data-card:not(.is-classes) .col-class { display: none; }
  .js .data-card.is-classes .col-total { display: none; }
  .js .data-card.is-classes tr.no-classes { display: none; }
  .js .data-card.is-classes .table-foot { display: none; }
  .data-card .table { font-size: 14px; }
  .data-card .table th, .data-card .table td { padding: 0 6px; height: 42px; }
  .data-card .table--boxed th:first-child, .data-card .table--boxed td:first-child { padding-left: 16px; }
  .data-card .table--boxed th:last-child, .data-card .table--boxed td:last-child { padding-right: 16px; }
  /* Eight class columns fit a phone with years shortened to 25/26. */
  .js .data-card.is-classes .table { font-size: 13px; }
  .js .data-card.is-classes .table th, .js .data-card.is-classes .table td { padding: 0 3px; }
  .js .data-card.is-classes .table th:first-child, .js .data-card.is-classes .table td:first-child { padding-left: 12px; }
  .js .data-card.is-classes .table th:last-child, .js .data-card.is-classes .table td:last-child { padding-right: 12px; }
  .js .data-card.is-classes .year-century { display: none; }
}

@media (max-width: 519px) {
  [data-page="school"] .card:not(.card--flush) { padding: 20px 16px; }
  .class-bars li { grid-template-columns: 104px minmax(0, 1fr); }
  .class-bars { gap: 8px; }
  .class-bars .bar-cell .bar { height: 20px; }

  /* The grid fits a phone: short class and year names, no average column. */
  .heatmap { width: calc(100% + 6px); font-size: 13px; }
  .heatmap .grid-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .heatmap .grid-short { display: inline; }
  .heatmap thead th { font-size: 11px; }
  .heatmap tbody th { width: 30px; padding-right: 4px; font-weight: 600; color: var(--ink-2); }
  .heatmap td.cell { width: auto; height: 36px; }
  .heatmap .avg-head, .heatmap td.avg { display: none; }
  .grid-note { display: block; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
}

/* ---------- Share bars and matrix ---------- */

.share-bar { display: flex; height: 28px; gap: 2px; border-radius: 6px; overflow: hidden; }
.share-bar span { display: block; height: 100%; }
.share-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.share-legend > div { display: flex; gap: 8px; }
.share-legend .swatch { width: 12px; height: 12px; margin-top: 4px; flex: 0 0 auto; }
.share-legend strong { font-weight: 600; }

.matrix { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.matrix thead th { padding: 0 12px 12px 0; text-align: left; font-size: 14px; vertical-align: bottom; }
.matrix thead th small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.matrix tbody th { width: 240px; padding: 0 16px 0 0; text-align: left; font-size: 16px; }
.matrix td { padding: 6px 12px 6px 0; vertical-align: top; }
.matrix .matrix-total { padding-left: 12px; border-left: 1px solid var(--rule); }
.matrix-cell { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; color: var(--ink); text-decoration: none; }
a.matrix-cell { background: var(--surface); border: 1px solid var(--rule); }
a.matrix-cell:hover { border-color: var(--accent); color: var(--ink); }
.matrix-cell strong { font-family: var(--font-serif); font-size: 28px; font-weight: 600; }
.matrix-cell span { font-size: 14px; color: var(--ink-2); }
.matrix-cell small { font-size: 13px; color: var(--muted); }
@media (max-width: 719px) {
  .matrix, .matrix thead, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: auto; }
  .matrix thead { display: none; }
  .matrix tbody tr { padding: 12px 0; border-top: 1px solid var(--rule); }
  .matrix tbody th { padding: 0 0 8px; }
  .matrix td { padding: 4px 0; }
  .matrix .matrix-total { padding-left: 0; border-left: 0; }
  .matrix td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
}

.county-bars { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.county-bars li { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 14px; }

/* ---------- Results, releases, issues, notices ---------- */

.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li + li { border-top: 1px solid var(--rule-soft); }
.result-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; padding: 16px 24px; color: var(--ink); text-decoration: none; flex-wrap: wrap; }
.result-list a:hover { background: var(--paper); color: var(--ink); }
.result-list .r-name { display: block; font-size: 17px; font-weight: 600; }
.result-list .r-place { display: block; font-size: 14px; color: var(--muted); }
.result-list .r-meta { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-list svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.result-list .r-meta strong { color: var(--ink); }
.result-list .chip { margin-top: 6px; font-size: 13px; padding: 3px 10px; }
.list-head { margin: 0; padding: 18px 24px; font-size: 15px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--rule-soft); }
.tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }

.release-list { list-style: none; margin: 32px 0 0; padding: 0; border-bottom: 1px solid var(--rule); }
.release-list li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--rule); }
.release-list .release-version { font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.release-list .release-date { display: block; font-size: 14px; color: var(--muted); }
.release-list p { margin: 0; max-width: 720px; font-size: 17px; line-height: 1.6; }
.release-list .chip { margin-top: 8px; }
@media (max-width: 719px) { .release-list li { grid-template-columns: minmax(0, 1fr); } }

.issue-list { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.issue-card { padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.issue-card h2 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; }
.issue-card p { margin: 0; max-width: 820px; font-size: 17px; line-height: 1.6; }
.issue-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.severity { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--chip); color: var(--ink-2); }
.severity svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.severity--high { background: var(--notice-bg); color: var(--notice-ink); }
.issue-details { margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--rule-soft); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.issue-details dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.issue-details dd { margin: 4px 0 0; font-size: 15px; line-height: 1.55; }
@media (max-width: 719px) { .issue-details { grid-template-columns: minmax(0, 1fr); } .issue-card { padding: 22px; } }

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: 12px;
  color: var(--notice-ink);
}
.notice svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.notice strong { display: block; }
.notice p { margin: 0; }

.empty-state { padding: 64px 0 24px; display: flex; flex-direction: column; gap: 20px; max-width: 880px; }
.empty-state .search-form { max-width: 720px; margin-top: 8px; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 72px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.site-footer .container { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 40px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 40px; }
.site-footer p { margin: 0 0 6px; max-width: 620px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 500; }
.site-footer nav a { padding: 8px 0; }

/* ---------- Find schools: map, list and filters ---------- */

.js .nojs-only { display: none !important; }

/*
  Search, quick filters and totals run across the top. Below them the map view has the list
  beside the map; the list view has the filters beside the table. On phones everything stacks,
  and once the map is working the map view leaves the list to the list view.
*/
.finder { display: grid; grid-template-columns: minmax(0, 1fr); --finder-pad: var(--gutter); }
.finder__bar { grid-area: bar; }
.finder__chips { grid-area: chips; min-width: 0; }
.finder__totals { grid-area: totals; min-width: 0; }
.finder__results { grid-area: results; min-width: 0; }
.finder__map { grid-area: map; position: relative; min-width: 0; isolation: isolate; }
.finder--map { grid-template-areas: "bar" "chips" "map" "totals" "results"; }
.finder--list { grid-template-areas: "bar" "chips" "totals" "results"; }

/* The search bar */
/* Phones: title and view, then the place, then distance and filters. */
.finder__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 10px;
  padding: 16px var(--finder-pad); background: var(--surface); border-bottom: 1px solid var(--rule);
}
.finder__title { flex: 1 1 auto; margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.finder__bar .view-switch { order: 1; }
.finder__bar .near-field { order: 2; flex: 0 0 100%; }
.finder__bar .radius { order: 3; flex: 1 1 0; }
.finder__filters-btn { order: 4; }
.finder__filters-btn.btn--secondary { height: 46px; gap: 8px; padding: 0 16px; }
.finder__filters-btn svg { width: 17px; height: 17px; }
.toggle-chip__count[hidden] { display: none; }
.finder__filters-short { display: none; }

.view-switch { display: inline-flex; flex: 0 0 auto; padding: 3px; background: var(--chip); border-radius: 10px; }
.view-switch a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.view-switch a:hover { color: var(--ink); }
.view-switch a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.view-switch svg, .toggle-chip svg, .icon-btn svg, .active-chip svg, .near-field__clear svg, .finder-filters__close svg, .map-card svg, .finder-band__together svg {
  width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

.near-field { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.near-field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.near-field__row { display: flex; gap: 8px; }
.near-field .search-input { height: 46px; padding-right: 46px; }
.near-field .search-input-wrap > svg { stroke: var(--accent); }
.near-field__clear { position: absolute; right: 3px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); }
.near-field__clear:hover { color: var(--ink); background: var(--chip); }
.near-field__clear[hidden] { display: none; }
.near-field__error { margin: 0; font-size: 14px; color: var(--down-ink); }
.near-field__clear svg { position: static; width: 18px; height: 18px; }
.near-field .suggestions { top: 100%; }
.near-field .suggestions .s-kind { font-size: 13px; color: var(--muted); }
.icon-btn--field { width: 46px; height: 46px; flex: 0 0 auto; }
.icon-btn--field svg { width: 20px; height: 20px; }

.radius { margin: 0; padding: 0; border: 0; min-width: 0; }
.near-field > label, .radius legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.radius label span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
}
.radius input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.radius input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (max-width: 959px) {
  .radius .segmented { display: flex; }
  .radius label { flex: 1; }
  .radius label span { justify-content: center; width: 100%; padding: 0 4px; }
  .finder__filters-long { display: none; }
  .finder__filters-short { display: inline; }
  .finder__filters-btn.btn--secondary { padding: 0 12px; }
}
@media (max-width: 519px) {
  .radius label span { padding: 0 2px; font-size: 13px; }
}
@media (min-width: 960px) {
  .finder__bar { flex-wrap: nowrap; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
  .finder__bar .view-switch, .finder__bar .near-field, .finder__bar .radius, .finder__bar .finder__filters-btn { order: 0; }
  .finder__title { flex: 0 0 auto; margin: 0 8px 0 0; font-size: 24px; white-space: nowrap; }
  .finder__bar .near-field { flex: 1 1 240px; max-width: 400px; }
  .finder__bar .radius { flex: 0 0 auto; }
  .finder__bar .view-switch { margin-left: auto; }
  .finder__chips .finder-chips { padding-top: 7px; padding-bottom: 7px; }
  .finder__chips .toggle-chip { min-height: 34px; padding: 0 13px; }
  .finder__chips .active-chip { min-height: 32px; }
}
@media (min-width: 1240px) {
  .radius { display: flex; align-items: center; }
  .radius legend { position: static; width: auto; height: auto; overflow: visible; clip: auto; float: left; margin-right: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
}
/* Laptops: the nav already says "Find schools", so the title gives its room to the search. */
@media (min-width: 960px) and (max-width: 1239px) {
  .finder__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
}

/* Quick filters and the filters in use */
.finder-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px var(--finder-pad); border-bottom: 1px solid var(--rule-soft); }
.finder-chips--empty { display: none; }
.finder-chips__label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.finder-chips__row { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border: 1.5px solid var(--control-border); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.toggle-chip:hover { border-color: var(--field-border); color: var(--ink); }
.toggle-chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-strong); }
.toggle-chip__count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700;
}
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-filters__label { font-size: 14px; color: var(--muted); }
.active-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 14px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-strong); font-size: 14px; font-weight: 600; text-decoration: none; }
.active-chip:hover { color: var(--accent-strong); text-decoration: line-through; }
.active-filters__clear { font-size: 14px; font-weight: 600; padding: 6px 4px; }
@media (max-width: 959px) {
  .finder--map .finder-chips__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .finder--map .finder-chips__row {
    flex-wrap: nowrap; width: calc(100% + var(--finder-pad)); margin-right: calc(-1 * var(--finder-pad)); padding-right: var(--finder-pad);
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .finder--map .finder-chips__row::-webkit-scrollbar { display: none; }
}

/* The totals band: the search's headline, its pupils, and how its schools changed over 10 years */
.finder-band {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 10px var(--finder-pad); background: var(--surface); border-bottom: 1px solid var(--rule);
}
.finder-band__head { min-width: 0; }
.finder-count { margin: 0; display: flex; flex-direction: column; font-size: 14px; color: var(--ink-2); }
.finder-count strong { font-family: var(--font-serif); font-size: 26px; font-weight: 600; line-height: 1.15; color: var(--ink); font-variant-numeric: lining-nums; }
.finder-band__year { color: var(--muted); }
.finder-band__figures { margin: 0; display: flex; gap: 10px 28px; }
.finder-band__figures > div { display: flex; flex-direction: column; min-width: 0; }
/* Figures sit above their labels, so a label that wraps doesn't push its figure out of line. */
.finder-band__figures .finder-band__value { order: -1; }
.finder-band__figures dt { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.finder-band__figures dd { margin: 0; }
.finder-band__value { font-family: var(--font-serif); font-size: 24px; font-weight: 600; line-height: 1.15; font-variant-numeric: lining-nums; }
.finder-band__pct { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.finder-band__together details { position: relative; }
.finder-band__together summary { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; }
.finder-band__together summary::-webkit-details-marker { display: none; }
.finder-band__together summary:hover { color: var(--ink); }
.finder-band__together summary svg { width: 14px; height: 14px; }
.finder-band__together p {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(340px, 80vw); margin: 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  color: var(--ink-2); font-size: 13px; line-height: 1.45; white-space: normal;
}
.finder-band__change { display: flex; flex-direction: column; gap: 6px; flex: 0 1 360px; min-width: 220px; }
.finder-band__bar { display: flex; align-items: center; gap: 10px; }
.finder-band__label { flex: 0 0 auto; font-size: 13px; color: var(--ink-2); }
.finder-band .growth-bar--small { flex: 1; min-width: 0; height: 10px; }
.finder-band__counts { margin: 0; font-size: 13px; color: var(--ink-2); }
.finder-band__counts > a, .finder-band__counts > span { white-space: nowrap; }
.finder-band__counts a { color: var(--ink); }
.finder-band__counts a:hover { color: var(--accent-strong); }
.finder-band__counts .is-up { color: var(--accent-strong); }
.finder-band__counts .is-down { color: var(--down-ink); }
.finder-band__tools { display: flex; gap: 8px; margin-left: auto; }
.finder-band__show { display: none; }
@media (min-width: 1240px) {
  .finder-band__figures, .finder-band__change { padding-left: 28px; border-left: 1px solid var(--rule-soft); }
}
/* Laptops: the 10-year line gets a row of its own, under the figures. */
@media (min-width: 960px) and (max-width: 1239px) {
  .finder-band { gap: 8px 22px; }
  .finder-band__figures { gap: 10px 20px; }
  .finder-band__value { font-size: 22px; }
  .finder-band__tools { order: 1; }
  .finder-band__change { order: 2; flex: 1 1 100%; flex-direction: row; align-items: center; gap: 16px; min-width: 0; }
  .finder-band__bar { flex: 0 1 340px; }
}
@media (max-width: 959px) {
  .finder-band { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
  .finder-band__head { padding-right: 96px; }
  .finder-band__tools { position: absolute; top: 16px; right: var(--finder-pad); }
  .finder-band__figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
  .finder-band__figures dt { white-space: normal; }
  .finder-band__value { font-size: 22px; }
  .finder-band__change { flex: none; min-width: 0; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
  .finder-band__together p { width: min(300px, 80vw); }
  .finder--list .finder-band { margin: 16px var(--gutter) 0; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); }
  .finder--list .finder-band__tools { right: 16px; }
  /* Under the map it reads as a sheet, with a way on to the list. */
  .finder--map .finder-band { border-radius: 20px 20px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12); }
  .finder--map.has-map .finder-band__show { display: inline-flex; gap: 8px; }
  .finder--map.has-map .finder__results { display: none; }
}
@media (max-width: 599px) {
  .finder-band__figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The explanation opens from the right-hand column, so it lines up with the band's right edge. */
  .finder-band__together p { left: auto; right: 0; }
}
@media (max-width: 519px) {
  .finder-band__value { font-size: 20px; }
  .finder-band__figures dt { font-size: 12px; }
}

/* Filters: a sidebar in the wide list view, a sheet everywhere else */
.finder-filters { display: flex; flex-direction: column; min-width: 0; }
.finder-filters__head { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.finder-filters__head h2 { flex: 1; font-family: var(--font-serif); font-size: 24px; font-weight: 600; }
.finder-filters__clear { font-size: 14px; font-weight: 600; padding: 10px 0; }
.finder-filters__close { width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.finder-filters__close svg { width: 20px; height: 20px; }
.finder-filters__foot { padding-top: 12px; }
.finder-filters__foot .btn { width: 100%; }
.finder-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(17, 20, 19, 0.45); }
.finder-backdrop[hidden] { display: none; }

.finder--map .finder-filters, .finder--list.filters-open .finder-filters {
  position: fixed; z-index: 1200; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  display: none; background: var(--surface); box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
}
.finder--map .finder-filters .finder-filters__head, .finder--list.filters-open .finder-filters__head { padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--rule); }
.finder--map .finder-filters .finder-filters__body, .finder--list.filters-open .finder-filters__body { flex: 1; overflow-y: auto; padding: 4px 20px 16px; overscroll-behavior: contain; }
.finder--map .finder-filters .finder-filters__foot, .finder--list.filters-open .finder-filters__foot { padding: 14px 20px 18px; border-top: 1px solid var(--rule); }
.finder.filters-open .finder-filters, .finder .finder-filters:target { display: flex; }
.finder--list .finder-filters { display: none; }
@media (min-width: 960px) {
  /* Wide enough for two columns, so every filter shows without scrolling. */
  .finder--map .finder-filters { width: min(800px, 100%); }
  .finder--map .finder-filters .finder-filters__head { padding: 14px 20px 14px 32px; }
  .finder--map .finder-filters .finder-filters__body { column-count: 2; column-gap: 40px; padding: 4px 32px 16px; }
  .finder--map .finder-filters .facet { break-inside: avoid; }
  .finder--map .finder-filters .finder-filters__foot { display: flex; justify-content: flex-end; padding: 14px 32px 18px; }
  .finder--map .finder-filters__foot .btn { width: auto; min-width: 240px; }
}

.facet { margin: 0; padding: 16px 0; border: 0; border-top: 1px solid var(--rule); min-width: 0; }
.finder-filters__body > .facet:first-child { border-top: 0; padding-top: 8px; }
.facet__title { display: block; float: left; width: 100%; margin-bottom: 8px; padding: 0; font-size: 15px; font-weight: 600; }
.facet > :not(legend):not(.facet__title) { clear: both; }
.facet__select {
  width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--control-border); border-radius: 10px;
}
.facet-option { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0 -8px; padding: 0 8px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.facet-option:hover { background: var(--paper); }
.facet-option input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.facet-option__label { flex: 1; line-height: 1.3; }
.facet-option__count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet-option.is-empty .facet-option__label { color: var(--muted); }
.js .facet:not(.is-expanded) [data-extra] { display: none; }
.facet__more { min-height: 40px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

.histogram { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; align-items: end; }
.histogram__bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 122px; border-radius: 6px; text-align: center; cursor: pointer; }
.histogram__count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.histogram__fill { display: block; border-radius: 4px 4px 0 0; background: var(--neutral-bar); }
.histogram__bar:hover .histogram__fill { background: var(--accent-mid); }
.histogram__bar.is-on .histogram__fill, .histogram__bar:has(input:checked) .histogram__fill { background: var(--accent); }
.histogram__bar:has(input:checked) .histogram__label { color: var(--accent-strong); font-weight: 700; }
.histogram__label { min-height: 28px; font-size: 11px; line-height: 1.25; color: var(--ink-2); }
.histogram__bar:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Results: the numbered list, or the table */
.finder-results__head { display: flex; align-items: center; gap: 12px; padding: 6px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--rule-soft); }
.finder-sort-field { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 13px; color: var(--muted); }
.finder-sort-field .finder-sort { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.finder-sort { min-height: 34px; padding: 0 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1.5px solid var(--control-border); border-radius: 10px; cursor: pointer; }
.finder-results__col { flex: 0 0 56px; text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); }
.finder-results__col--change { flex-basis: 72px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--control-border); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--field-border); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 2; }
.icon-btn.is-done { border-color: var(--accent); color: var(--accent); }
.finder-notice { margin: 12px var(--gutter); }

.finder-list { list-style: none; margin: 0; padding: 0; background: var(--surface); }
.finder-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px var(--gutter); border-bottom: 1px solid var(--rule-soft); cursor: pointer; scroll-margin-top: 64px; }
.finder-item:hover { background: var(--paper); }
.finder-item--plain { cursor: default; }
.finder-item--plain:hover { background: none; }
.finder-item.is-selected { background: var(--accent-tint); }
.finder-item__num {
  flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font: inherit; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
}
.finder-item.is-selected .finder-item__num { background: var(--ink); color: var(--paper); }
.finder-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.finder-item__name { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; }
.finder-item__name:hover { color: var(--accent); text-decoration: underline; }
.finder-item__meta { font-size: 13px; color: var(--muted); }
.finder-item__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.finder-item__sub .tag { padding: 0 8px; font-size: 11.5px; }
.finder-item__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.6; }
.finder-item__pupils { flex: 0 0 56px; text-align: right; font-family: var(--font-serif); font-size: 19px; font-weight: 600; line-height: 1.2; font-variant-numeric: lining-nums; }
.finder-item__change { flex: 0 0 72px; padding-top: 2px; text-align: right; font-size: 14px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.finder-item__change--note { font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--muted); }
.is-up { color: var(--accent-strong); }
.is-down { color: var(--down-ink); }
@media (max-width: 519px) {
  .finder-item__pupils, .finder-results__col { flex-basis: 50px; }
  .finder-item__pupils { font-size: 17px; }
  .finder-item__change, .finder-results__col--change { flex-basis: 64px; }
  .finder-item__change { font-size: 13px; }
}

.finder-empty { padding: 28px var(--gutter); }
.finder-empty p { margin: 0 0 6px; }
.finder-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px var(--gutter); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.finder-footnote { margin: 0; padding: 0 var(--gutter) 24px; font-size: 13px; color: var(--muted); }
.finder-table .finder-item__tags { margin-top: 6px; }
a.sort-button { text-decoration: none; }
a.sort-button:hover { color: var(--ink); text-decoration: underline; }

/* Map view */
.finder-map { height: 58vh; min-height: 320px; background: var(--map-bg); }
.finder-map__noscript { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 24px; text-align: center; color: var(--muted); }
.finder--map .finder__results { background: var(--surface); }
.finder--map .finder-results__head { position: sticky; top: 0; z-index: 2; }
@media (min-width: 960px) {
  .finder--map {
    grid-template-columns: minmax(380px, 500px) minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: "bar bar" "chips chips" "totals totals" "results map";
    height: calc(100vh - 65px);
    height: calc(100dvh - 65px);
    border-bottom: 1px solid var(--rule);
  }
  .finder--map .finder__results { --gutter: 24px; position: relative; overflow-y: auto; border-right: 1px solid var(--rule); }
  .finder--map .finder-map { position: absolute; inset: 0; height: auto; }
  body[data-page="finder"] .site-footer { margin-top: 0; }
}

/* List view */
.finder--list .finder-list--phone, .finder--list .finder-results__head--phone { display: none; }
.finder--list .finder__results { padding: 16px var(--gutter) 0; }
.finder--list .finder-more, .finder--list .finder-footnote { padding-left: 0; padding-right: 0; }
.finder--list .finder-notice { margin: 0 0 16px; }
@media (max-width: 719px) {
  .finder--list .finder__results { padding: 16px 0 0; }
  .finder--list .finder-list--phone { display: block; }
  .finder--list .finder-results__head--phone { display: flex; border-top: 1px solid var(--rule); }
  .finder--list .finder-table-card { display: none; }
  .finder--list .finder-more, .finder--list .finder-footnote { padding-left: var(--gutter); padding-right: var(--gutter); }
  .finder--list .finder-notice { margin: 0 var(--gutter) 16px; }
}
@media (min-width: 960px) {
  .finder--list {
    --finder-pad: max(var(--gutter), calc((100% - 1200px) / 2));
    grid-template-columns: minmax(var(--gutter), 1fr) 280px minmax(0, 880px) minmax(var(--gutter), 1fr);
    grid-template-areas: "bar bar bar bar" "chips chips chips chips" "totals totals totals totals" ". filters results .";
  }
  .finder--list .finder-filters, .finder--list.filters-open .finder-filters {
    grid-area: filters; display: flex; position: static; width: auto; margin-right: 40px; padding-top: 24px; box-shadow: none; background: none; align-self: start;
  }
  .finder--list .finder-filters__head, .finder--list.filters-open .finder-filters__head { padding: 0 0 8px; border: 0; }
  .finder--list .finder-filters__body, .finder--list.filters-open .finder-filters__body { padding: 0; overflow: visible; }
  .finder--list .finder-filters__foot .js-only, .finder--list .finder-filters__close, .finder--list .finder__filters-btn { display: none !important; }
  .finder--list .finder-filters__foot { padding: 12px 0 0; border: 0; }
  .finder--list .finder__results { padding: 24px 0 0; }
}
/* Leaflet, pins and the school card */
.leaflet-container { font-family: var(--font-sans); background: var(--map-bg); }
/* Quieter tiles that sit with the site's palette; inverted for dark mode. */
.leaflet-tile-pane { filter: saturate(0.55) contrast(0.95) brightness(1.02); }
@media (prefers-color-scheme: dark) {
  .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(0.35) brightness(0.8) contrast(0.9); }
}
.leaflet-container a { color: var(--accent); }
.leaflet-bar { border: 0 !important; border-radius: 10px !important; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.12) !important; }
.leaflet-bar a { width: 40px !important; height: 40px !important; line-height: 40px !important; background: var(--surface) !important; color: var(--ink) !important; border-bottom-color: var(--rule) !important; }
.leaflet-bar a:hover { background: var(--paper) !important; }
.leaflet-control-attribution { font-size: 11px; background: color-mix(in srgb, var(--surface) 85%, transparent) !important; color: var(--ink-2); }
.leaflet-control-scale-line { border-color: var(--ink-2); background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--ink-2); }
.pin, .pin-cluster, .pin-centre { background: none; border: 0; }
.pin span {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; box-sizing: border-box;
  border: 2px solid #FFFFFF; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); cursor: pointer;
}
.pin--dot span { width: 14px; height: 14px; }
.pin.is-selected span { width: 40px; height: 40px; margin: -5px; border-width: 3px; background: var(--ink); color: var(--paper); font-size: 15px; }
.pin--dot.is-selected span { width: 22px; height: 22px; margin: -4px; }
.pin-cluster span {
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; box-sizing: border-box;
  border: 3px solid var(--accent); border-radius: 50%; background: var(--surface); color: var(--accent-strong);
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 5px rgba(11, 107, 93, 0.2), 0 2px 6px rgba(0, 0, 0, 0.25);
}
.pin-centre span { display: block; width: 18px; height: 18px; box-sizing: border-box; border: 4px solid #FFFFFF; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); }
.map-card {
  position: absolute; z-index: 1000; top: 16px; left: 16px; width: min(320px, calc(100% - 88px)); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 10px; background: var(--surface); border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.map-card[hidden] { display: none; }
.map-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.map-card h2 { font-size: 17px; font-weight: 600; line-height: 1.3; }
.map-card__meta { display: block; font-size: 13px; color: var(--muted); }
.map-card__close { flex: 0 0 auto; width: 36px; height: 36px; margin: -6px -8px 0 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.map-card__close:hover { background: var(--chip); color: var(--ink); }
.map-card dl { margin: 0; padding-top: 10px; border-top: 1px solid var(--rule-soft); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.map-card dl div { display: flex; flex-direction: column-reverse; }
.map-card dt { font-size: 12px; color: var(--muted); }
.map-card dd { margin: 0; font-family: var(--font-serif); font-size: 21px; font-weight: 600; line-height: 1.2; font-variant-numeric: lining-nums; }
.map-card .finder-item__tags { margin: 0; }
.map-card .link-arrow { padding: 6px 0; }
.map-card__links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.map-card__external { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; font-size: 14px; font-weight: 600; }
.map-card .map-card__external svg { width: 14px; height: 14px; }
@media (max-width: 959px) { .map-card { top: auto; bottom: 12px; left: 12px; width: calc(100% - 24px); } }

/* ---------- Homepage ---------- */

.home-hero { padding-bottom: 64px; }
.home-hero .hero__text { gap: 20px; }
.home-locate { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.home-locate .btn { height: 44px; border-radius: 999px; }
.home-locate .btn svg { color: var(--accent); }
.home-locate__error { margin: 0; font-size: 14px; color: var(--ink-2); }
.home-starts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.home-starts__label { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.home-starts__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-starts .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font-size: 15px; font-weight: 500; }
.home-starts .chip:hover { background: var(--accent-tint); color: var(--accent-strong); text-decoration: underline; }

.home-finder { box-shadow: var(--shadow); }
.home-finder__map { display: block; height: 220px; background: var(--map-bg); }
.home-finder__map svg { display: block; width: 100%; height: 100%; }
.home-map__water { fill: none; stroke: var(--accent-tint); stroke-width: 16; }
.home-map__road { fill: none; stroke: var(--surface); stroke-width: 5; }
.home-map__lane { fill: none; stroke: var(--paper); stroke-width: 3; }
.home-map__radius { fill: var(--accent); fill-opacity: 0.07; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; }
.home-map__pin { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.home-map__pin--down { fill: var(--series-2); }
.home-map__pin--out { fill: var(--field-border); opacity: 0.8; }
.home-map__centre { fill: var(--ink); stroke: var(--surface); stroke-width: 3; }
.home-finder__body { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.home-finder__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.home-finder__head .muted { font-size: 13px; }
.home-finder__lede { margin: 0; font-size: 15px; color: var(--ink-2); }
.home-finder__figures, .home-example__figures, .home-ribbon__list { margin: 0; display: grid; gap: 12px; }
.home-finder__figures > div, .home-example__figures > div, .home-ribbon__list > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; min-width: 0; }
.home-finder__figures dd, .home-example__figures dd, .home-ribbon__list dd { margin: 0; font-family: var(--font-serif); font-weight: 600; line-height: 1.1; }
.home-finder__figures dt, .home-example__figures dt, .home-ribbon__list dt { font-size: 13px; color: var(--muted); }
.home-finder__figures { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.home-finder__figures dd { font-size: 24px; }
.home-finder__change { display: flex; flex-direction: column; gap: 8px; }
.home-finder__label { margin: 0; font-size: 14px; font-weight: 600; }
.home-finder__counts { margin: 0; font-size: 13px; color: var(--ink-2); }

.home-ribbon { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.home-ribbon__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.home-ribbon__list dd { font-size: 32px; letter-spacing: -0.01em; }
.home-ribbon__list dt { font-size: 14px; }

.home-ways { padding-top: 80px; }
.home-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.home-cards--minor { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin-top: 24px; }
.home-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.home-card__title { font-family: var(--font-serif); font-size: 26px; font-weight: 600; line-height: 1.2; }
.home-card__text { margin: 0; color: var(--ink-2); }
.home-card > .link-arrow { margin-top: auto; align-self: flex-start; }
.home-card__example { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--paper); border-radius: 12px; }
.home-card__label { margin: 0; font-size: 14px; font-weight: 600; }
.home-card__note { margin: 0; font-size: 13px; color: var(--muted); }

.home-example__name { margin: 0; font-weight: 600; }
.home-example__figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-example__figures dd { font-size: 26px; }
.home-classes { margin: 0; }
.home-classes__bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.home-classes__bars li { display: grid; grid-template-rows: auto 84px auto; align-items: end; justify-items: center; gap: 4px; min-width: 0; font-size: 12px; }
.home-classes__value { color: var(--ink-2); }
.home-classes__bar { width: 100%; align-self: end; background: var(--accent); border-radius: 3px 3px 0 0; }
.home-classes__label { width: 100%; padding-top: 4px; border-top: 1px solid var(--rule-strong); color: var(--muted); text-align: center; }

.home-filters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-filters .toggle-chip { min-height: 40px; font-weight: 500; }
.home-filters__count { font-size: 13px; font-weight: 400; color: var(--muted); }

.home-movers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.home-movers li { display: grid; grid-template-columns: 104px minmax(0, 1fr) 60px; align-items: center; min-height: 30px; }
.home-movers__track { display: grid; grid-template-columns: 1fr 1fr; height: 100%; min-height: 26px; }
.home-movers__half { display: flex; align-items: center; }
.home-movers__half--neg { justify-content: flex-end; border-right: 1px solid var(--field-border); }
.home-movers__bar { display: block; height: 14px; background: var(--accent); border-radius: 0 3px 3px 0; }
.home-movers__bar--neg { background: var(--series-2); border-radius: 3px 0 0 3px; }
.home-movers__pct { text-align: right; font-weight: 600; }
.home-counties { display: flex; flex-direction: column; gap: 8px; }
.home-counties ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; }
.home-counties a { display: inline-block; padding: 4px 0; }

.home-areas th[scope="row"] { font-weight: 600; }
.home-areas td { color: var(--ink-2); }
.home-areas td.is-up { color: var(--accent-strong); font-weight: 600; }
.home-areas td.is-down { color: var(--down-ink); font-weight: 600; }

.home-irish { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; padding: 28px 32px; }
.home-irish__text { display: flex; flex-direction: column; gap: 10px; }
.home-irish__text p { margin: 0; color: var(--ink-2); }
.home-irish .home-card__label { margin-bottom: 10px; }
.home-irish .home-card__title, .home-download .home-card__title { font-size: 22px; }
.home-download { display: flex; flex-direction: column; gap: 10px; padding: 28px 32px; background: var(--accent-tint); border-radius: var(--radius); }
.home-download p { margin: 0; }
.home-download .home-card__title { display: flex; align-items: center; gap: 10px; color: var(--accent-strong); }
.home-download .home-card__title svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-download .link-arrow { color: var(--accent-strong); align-self: flex-start; }

.home-national { margin-top: 80px; padding: 64px 0; }
.home-national__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 56px; align-items: start; }
.home-national__text { display: flex; flex-direction: column; gap: 16px; }
.home-national__lede { margin: 0; font-size: 17px; color: var(--ink-2); }
.home-national__chart { margin: 0; }
.home-national__chart .chart-head { align-items: baseline; margin-bottom: 8px; }
.home-national__chart .chart-head .muted { font-size: 13px; }
.home-national__note { margin: 24px 0 32px; }
@media (min-width: 960px) { .home-national .small-multiples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.home-new__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.home-new__list li { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 3px solid var(--rule); }
.home-new__list li.is-latest { border-top-color: var(--accent); }
.home-new__list h3 { font-size: 17px; font-weight: 600; }
.home-new__list p { margin: 0; font-size: 15px; color: var(--ink-2); }
.home-new__list .home-new__meta { font-size: 13px; color: var(--muted); }
.home-new__list .is-latest .home-new__meta strong { color: var(--accent-strong); }
.home-about { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 3fr)); gap: 24px 32px; padding-bottom: 72px; }
.home-about > div { display: flex; flex-direction: column; gap: 6px; }
.home-about .section-title { font-size: 26px; }
.home-about h3 { font-size: 16px; font-weight: 600; }
.home-about p { margin: 0; font-size: 15px; color: var(--ink-2); }

@media (max-width: 959px) {
  .home-ribbon__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-cards, .home-cards--minor, .home-national__grid { grid-template-columns: minmax(0, 1fr); }
  .home-new__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-about { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-ways { padding-top: 56px; }
  .home-national { margin-top: 56px; padding: 48px 0; }
}
@media (max-width: 599px) {
  .home-hero { padding-bottom: 40px; }
  .home-locate, .home-locate .btn { width: 100%; }
  .home-locate .btn { height: 48px; border-radius: 10px; }
  .home-finder__map { height: 170px; }
  .home-finder__body { padding: 20px; }
  .home-finder__figures dd { font-size: 20px; }
  .home-ribbon__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding-top: 22px; padding-bottom: 22px; }
  .home-ribbon__list dd { font-size: 26px; }
  .home-ribbon__list dt { font-size: 13px; }
  .home-card, .home-irish, .home-download { padding: 22px; }
  .home-card__title { font-size: 22px; }
  .home-card__example { padding: 16px; }
  .home-example__figures dd { font-size: 22px; }
  .home-classes__bars { gap: 5px; }
  .home-classes__bars li { grid-template-rows: auto 64px auto; font-size: 11px; }
  .home-movers li { grid-template-columns: 88px minmax(0, 1fr) 54px; font-size: 13px; }
  .home-areas th:nth-child(2), .home-areas td:nth-child(2) { display: none; }
  .home-irish { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-new__list, .home-about { grid-template-columns: minmax(0, 1fr); }
  .home-new__list li { padding: 0 0 0 14px; border-top: 0; border-left: 3px solid var(--rule); }
  .home-new__list li.is-latest { border-left-color: var(--accent); }
}

/* ---------- Special schools ---------- */

.chip--accent a { color: inherit; text-decoration: none; }
.chip--accent a:hover { text-decoration: underline; }
.tag--accent { background: var(--accent-tint); color: var(--accent-strong); }
.special-head__actions { flex-wrap: wrap; gap: 12px; }
.special-overview { margin-top: 32px; }
.special-nearby__tables { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.special-nearby__title { margin: 0; padding: 16px 16px 12px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--rule); }
.special-nearby__title span { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.special-nearby__more { margin: 0; padding: 12px 16px; }
.nearby-table .tag { display: inline-block; margin-top: 4px; }
.special-nearby .nearby-table td.r { white-space: nowrap; }
@media (min-width: 960px) {
  .special-nearby .nearby-map { position: sticky; top: 80px; height: 560px; }
}
.special-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.special-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 16px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.special-list__main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.special-list__main a { font-weight: 600; }
.special-list__sub { font-size: 13px; color: var(--muted); }
.special-list__main .tag { margin-top: 2px; }
.special-list__km { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.special-list__value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.special-list__change { min-width: 48px; font-size: 14px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.special-band { margin-top: 20px; }
.special-group { margin-top: 32px; }
.special-group__main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.special-years li.is-upcoming .band-list__track span { background: var(--accent-tint); outline: 1.5px dashed var(--accent); outline-offset: -1.5px; }
.special-years li.is-upcoming .band-list__label { font-weight: 500; color: var(--ink-2); }
.special-types li { grid-template-columns: minmax(0, 1fr) 64px 32px; padding: 6px 0; }
.special-types .band-list__label { font-size: 14px; line-height: 1.3; }
.special-or-class .about-group p { margin: 0; color: var(--ink-2); }
.finder-special-hint { display: flex; align-items: flex-start; gap: 8px; margin: 12px var(--gutter); font-size: 14px; color: var(--ink-2); }
.finder-special-hint svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.finder--list .finder-special-hint { margin: 0 0 16px; }
.home-cards--minor .home-irish { grid-row: span 2; }
.home-special { display: flex; flex-direction: column; gap: 10px; padding: 28px 32px; }
.home-special p { margin: 0; color: var(--ink-2); }
.home-special .home-card__title { font-size: 22px; }
.home-special .link-arrow { align-self: flex-start; }
@media (max-width: 599px) {
  .special-list li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .special-list__change { display: none; }
  .home-special { padding: 22px; }
  .finder--list .finder-special-hint { margin: 0 var(--gutter) 16px; }
}

@media print {
  .site-header, .site-footer, .table-tools, .table-foot, .segmented, .tabs, .skip-link, .finder__map, .finder-filters, .finder__chips, .finder__bar, .finder-band__tools, .page-nav { display: none !important; }
  [data-collapse] tbody tr { display: table-row !important; }
  body { background: #FFFFFF; }
}
