/* Shule Zote · style.css
   The only stylesheet. Mobile first. One breakpoint for the reading
   layout (56rem / 896px) and one for tables (40rem / 640px).
   Per page: HTML + this file + one font file = 3 requests. No JS. */

/* 1. Font ------------------------------------------------------------
   Literata, roman only, weight axis 200–900, Latin subset (52 KB).
   Licensed under the SIL Open Font License. No italic file: never use
   font-style: italic. Glyphs outside the Latin subset (e.g. ⁴, →)
   fall back to the system serif, so avoid them in templates. */
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-wght-latin.3dfc6740cd53.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens ----------------------------------------------------------- */
:root {
  --font: "Literata", Georgia, "Noto Serif", "Droid Serif", serif;
  --font-code: ui-monospace, "Roboto Mono", "Droid Sans Mono", Menlo, monospace;

  --paper: #f6f1e7;
  --field: #fffcf6;
  --ink: #1d1a16;
  --ink-soft: #3b352d;
  --muted: #5c554b;
  --rule: #cfc6b6;
  --rule-strong: #1d1a16;
  --accent: #8a2b1f;
  --banner-bg: #1d1a16;
  --banner-ink: #f6f1e7;
  --banner-muted: #d8cfbf;

  --size-body: 1.125rem;    /* 18px */
  --size-small: 1rem;       /* 16px: the floor, nothing smaller */
  --size-label: 1.1875rem;  /* 19px, set in small caps */
  --size-value: 1.1875rem;
  --size-lede: 1.3125rem;   /* 21px → 27px wide */
  --size-lede-wide: 1.6875rem;
  --size-title: 2.25rem;    /* non-entry page titles, 36px → 56px */
  --size-title-wide: 3.5rem;

  /* Headword steps by character count of the name (see README) */
  --hw-1: 3rem;     --hw-1-wide: 5.75rem;  /* up to 26 */
  --hw-2: 2.375rem; --hw-2-wide: 4.25rem;  /* 27–36 */
  --hw-3: 2rem;     --hw-3-wide: 3.5rem;   /* 37–48 */
  --hw-4: 1.75rem;  --hw-4-wide: 2.75rem;  /* 49 and over */
  --weight-headword: 330;

  --track-caps: .08em;
  --num-current: lining-nums tabular-nums;
  --num-old: oldstyle-nums proportional-nums;

  --page-max: 75rem;
  --gutter: 1.25rem;        /* 20px → 48px wide */
  --margin-col: 18.75rem;   /* 300px: aside, ad */
  --col-gap: 2.5rem;
  --label-col: 10.625rem;
}

/* 3. Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.5;
  font-variant-numeric: var(--num-current);
  overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
time { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -999rem; }
.skip-link:focus { left: var(--gutter); top: .5rem; background: var(--paper); padding: .5rem .75rem; z-index: 2; }

/* 4. Site frame ------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule-strong); }
.site-header__inner, .site-footer__inner, .season-banner__inner, .page {
  max-width: var(--page-max); margin: 0 auto; padding-inline: var(--gutter);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: .25rem 1.5rem; padding-block: .875rem;
}
.site-name { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.1875rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: 1.0625rem; }
.page { padding-block: 2rem 3rem; }
.site-footer { border-top: 1px solid var(--rule-strong); font-size: var(--size-small); color: var(--muted); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding-block: 1rem 1.25rem;
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { color: var(--muted); }

.breadcrumb ol {
  list-style: none; margin: 0 0 1.5rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .125rem .5rem; font-size: var(--size-small); color: var(--muted);
}
.breadcrumb li + li::before { content: "\203A"; margin-right: .5rem; }
.breadcrumb a { color: var(--muted); }

/* Seasonal placement banner (December–January, senior school pages) */
.season-banner { background: var(--banner-bg); color: var(--banner-ink); }
.season-banner__inner { padding-block: 1rem 1.125rem; }
.season-banner__title { margin: 0 0 .25rem; font-weight: 600; font-size: 1.1875rem; }
.season-banner__body { margin: 0; max-width: 48rem; }
.season-banner__date { margin: .375rem 0 0; font-size: var(--size-small); color: var(--banner-muted); }
.season-banner a { color: var(--banner-ink); }

/* 5. Entry head: kicker, headword, generated sentence ----------------- */
.kicker {
  margin: 0 0 .625rem; color: var(--muted);
  font-size: 1.25rem; font-variant-caps: all-small-caps; letter-spacing: var(--track-caps);
}
.headword {
  margin: 0; max-width: 62.5rem;
  font-size: var(--hw-1); font-weight: var(--weight-headword);
  line-height: 1.04; letter-spacing: -.025em; hyphens: manual;
}
.headword--2 { font-size: var(--hw-2); line-height: 1.06; }
.headword--3 { font-size: var(--hw-3); line-height: 1.08; letter-spacing: -.02em; }
.headword--4 { font-size: var(--hw-4); line-height: 1.12; letter-spacing: -.015em; }
.page-title { margin: 0; font-size: var(--size-title); font-weight: 400; line-height: 1.1; letter-spacing: -.02em; }
.lede { margin: 1rem 0 0; max-width: 48.75rem; font-size: var(--size-lede); line-height: 1.4; }
.entry-head__overview { margin-top: 1rem; }
.entry-head__alias { margin: .75rem 0 0; font-size: var(--size-small); color: var(--muted); }
.entry-head__description { margin-top: 0; }
.entry-head__description > p:first-child { margin-top: 0; }
.about-intro { margin-top: 1.5rem; max-width: 48rem; }
.about-intro > p:first-child { margin-top: 0; }
.page-source { margin: .75rem 0 0; max-width: 48.75rem; font-size: var(--size-small); color: var(--muted); }

/* 6. Sections --------------------------------------------------------- */
.section { margin-top: 3rem; }
.section-head {
  margin: 0; padding: .625rem 0 .375rem; border-top: 2px solid var(--rule-strong);
  font-size: 1.25rem; font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: var(--track-caps);
}
.prose { max-width: 40rem; }
.prose p { margin: .75rem 0 0; }
.source-register { max-width: 52rem; margin-top: 3rem; border-top: 2px solid var(--rule-strong); }
.source-register h2 { margin: .75rem 0; font-size: 1.5rem; }
.source-register p { margin: 0 0 1rem; }
.source-register ul { margin: 0; padding-left: 1.4rem; }
.source-register li { padding: .55rem 0; }

/* 7. Facts: one block per fact; sources listed once at the page end --- */
.facts { margin-top: 3rem; }
.facts__period { margin: .25rem 0 .75rem; font-size: var(--size-small); color: var(--muted); }
.fact-list { margin: 0; border-bottom: 1px solid var(--rule-strong); }
.fact {
  display: grid; grid-template-columns: minmax(0, 1fr); row-gap: .25rem;
  padding: .875rem 0; border-top: 1px solid var(--rule);
}
.fact:first-child { border-top: 0; }
.fact__label {
  color: var(--muted); font-size: var(--size-label);
  font-variant-caps: all-small-caps; letter-spacing: .07em;
}
.fact__value { margin: 0; font-size: var(--size-value); font-weight: 500; min-width: 0; }
.fact__value--code { letter-spacing: .02em; }
.fact__note { margin: 0; font-size: 1.0625rem; line-height: 1.45; color: var(--ink-soft); max-width: 36rem; }
.sources { border-top: 1px solid var(--rule); padding-top: .875rem; }
.sources__head {
  margin: 0 0 .375rem; font-size: 1.0625rem; font-weight: 500; color: var(--muted);
  font-variant-caps: all-small-caps; letter-spacing: var(--track-caps);
}
.source-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; font-size: var(--size-small); line-height: 1.4; color: var(--muted); }
.sources__context { margin: 0 0 .5rem; font-size: var(--size-small); line-height: 1.4; color: var(--muted); }
.sources a { color: var(--muted); }
.source .source__check { display: block; margin-top: .125rem; }

/* Status marks: verified / historical / held */
.status { display: inline; }
.status::before {
  content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  margin-right: .4em; vertical-align: .08em; box-sizing: border-box;
}
.status--verified::before { background: var(--ink); }
.status--historical::before { border: 1.5px solid var(--muted); }
.status--held { color: var(--accent); }
.status--held::before { background: var(--accent); border-radius: 0; }
.status--reported::before { border: 1.5px solid var(--ink); border-radius: 0; }

/* A reported value sits beside the official one, never in its place */
.fact__status { margin: 0; font-size: 1.0625rem; line-height: 1.45; }
.fact__reported { margin: 0; font-size: 1.0625rem; line-height: 1.45; color: var(--ink-soft); }
.fact__reported-value { font-weight: 500; color: var(--ink); }

/* Contacts: one line per channel, missing lines left out */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-weight: 400; }
.contact { display: flex; flex-wrap: wrap; column-gap: .75rem; }
.contact__label { min-width: 4.75rem; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: .07em; }
.contact__value { min-width: 0; overflow-wrap: anywhere; }

/* Cluster scale, C1–C4 */
.cluster-scale {
  list-style: none; margin: .25rem 0 0; padding: 0; max-width: 22rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--rule-strong);
}
.cluster-scale__step {
  padding: .5rem 0 .4rem; text-align: center; border-left: 1px solid var(--rule);
  font-size: 1.375rem; font-weight: 380; color: var(--muted);
}
.cluster-scale__step:first-child { border-left: 0; }
.cluster-scale__step--this { background: var(--ink); color: var(--paper); font-weight: 600; }
.cluster-scale__step--this + .cluster-scale__step { border-left-color: var(--rule-strong); }

/* Fee table, two rows, this school's row marked */
.fee-table { width: 100%; max-width: 32rem; border-collapse: collapse; margin-top: .125rem; font-size: 1.0625rem; }
.fee-table th, .fee-table td {
  padding: .5rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; font-weight: 400;
}
.fee-table tr:first-child > * { border-top: 1px solid var(--rule-strong); }
.fee-table td { text-align: right; padding-left: 1rem; }
.fee-table__amount { display: block; }
.fee-table__unit { display: block; font-size: var(--size-small); color: var(--muted); }
.fee-table__row--this th, .fee-table__row--this .fee-table__amount { font-weight: 600; }
.fee-table__this {
  display: block; font-weight: 500; font-size: 1.0625rem; color: var(--accent);
  font-variant-caps: all-small-caps; letter-spacing: .07em;
}

/* 8. Named slots: empty elements vanish; .show-slots outlines them ---- */
.slot:empty { display: none; }
.show-slots .slot:empty {
  display: block; min-height: 2.75rem; padding: .625rem .75rem;
  border: 1px dashed var(--muted); color: var(--muted);
  font-family: var(--font-code); font-size: .875rem;
}
.show-slots .slot:empty::before { content: "slot: " attr(data-slot) " (renders nothing when empty)"; }
.slot--page-end { margin-top: 3rem; }

/* 9. Lower half of an entry: location, 2013 record, aside ------------- */
.entry-lower { display: flex; flex-direction: column; gap: 3rem; margin-top: 3rem; }
.entry-lower__main { display: flex; flex-direction: column; gap: 3rem; min-width: 0; }
.entry-aside { display: flex; flex-direction: column; gap: 1.75rem; min-width: 0; }

.location__layout { display: grid; gap: 1.5rem; align-items: start; }
.location__primary, .location__nearby { min-width: 0; }
.location__map, .location__more, .location__none { margin: .5rem 0 0; }
.location__map-link { display: block; max-width: 640px; border: 1px solid var(--rule); }
.location__map-image { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; background: var(--rule); }
.location__map-caption { margin-top: .5rem; font-size: var(--size-small); color: var(--muted); }
.location__map-caption a { color: var(--muted); }
.location__map-credit { display: block; margin-top: .25rem; font: 400 .75rem/1.35 sans-serif; color: var(--muted); }
.location__subhead { margin: .5rem 0 .25rem; font-size: 1.125rem; font-weight: 500; color: var(--ink); }
.nearby { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.nearby-school { display: flex; flex-wrap: wrap; column-gap: .625rem; padding: .5rem 0; border-top: 1px solid var(--rule); }
.nearby-school__name { color: var(--ink); text-decoration-color: var(--accent); }
.nearby-school__subcounty { color: var(--muted); }

.old-record { border-bottom: 1px solid var(--rule); padding-bottom: .875rem; }
.old-record__summary { cursor: pointer; font-size: 1.1875rem; font-weight: 500; }
.old-record__body { margin-top: .5rem; font-variant-numeric: var(--num-old); }
.old-record__note { margin: 0 0 .75rem; font-size: 1.0625rem; }
.old-record__alias { margin: 0 0 .75rem; }
.old-record__old-name { color: var(--ink-soft); }
.old-record__list { margin: 0; max-width: 52rem; border-bottom: 1px solid var(--rule); }
.old-record__item { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); column-gap: 1.25rem; padding: .55rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.old-record__item dt { color: var(--muted); }
.old-record__item dd { margin: 0; font-weight: 450; overflow-wrap: anywhere; }
.old-record__subhead { margin: 2rem 0 .4rem; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.old-record__table-wrap { max-width: 100%; overflow-x: auto; }
.old-record__table { width: 100%; max-width: 52rem; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.old-record__table--staff { max-width: 44rem; }
.old-record__table th, .old-record__table td { border-bottom: 1px solid var(--rule); padding: .65rem .6rem; text-align: left; }
.old-record__table thead th { border-bottom: 2px solid var(--rule-strong); font-weight: 500; line-height: 1.3; }
.old-record__table th:first-child, .old-record__table td:first-child { padding-left: 0; }
.old-record__table th:last-child, .old-record__table td:last-child { padding-right: 0; }
.old-record__table th[scope="row"] { font-weight: 500; }
.old-record__table th:not(:first-child), .old-record__table td:not(:first-child) { text-align: right; }
.old-record__table tbody tr:hover { background: var(--field); }
@media (max-width: 39.99rem) {
  .old-record__item { grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .625rem 0; }
  .old-record__item dt { font-size: var(--size-small); }
  .old-record__table th, .old-record__table td { padding-inline: .1875rem; }
}

.entry-actions {
  list-style: none; margin: 0; padding: .625rem 0 0; border-top: 2px solid var(--rule-strong);
  display: flex; flex-direction: column; gap: .375rem;
}
.entry-actions--top { margin-top: 1.5rem; flex-direction: row; flex-wrap: wrap; gap: .375rem 1.5rem; }


.school-row td { padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.school-row__name a { color: var(--ink); text-decoration-color: var(--accent); }
.is-missing { color: var(--muted); }
@media (max-width: 39.99rem) {
  .school-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .school-table, .school-table tbody, .school-row { display: block; }
  .school-table { border-top: 1px solid var(--rule-strong); }
  .school-row { padding: .5rem 0; border-bottom: 1px solid var(--rule); }
  .school-row td { display: inline; padding: 0; border: 0; color: var(--muted); }
  .school-row td.school-row__name { display: block; color: var(--ink); }
  .school-row td.is-missing { display: none; }
  .school-row td:not(.school-row__name):not(.is-missing) ~ td:not(.is-missing)::before { content: " \00B7 "; }
}

.name-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.name-list__detail, .section__note { color: var(--muted); font-size: var(--size-small); line-height: 1.35; }
.name-list__detail { margin: .2rem 0 .45rem; }
.name-list__item { padding: .375rem 0; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.name-list__item a { color: var(--ink); text-decoration-color: var(--accent); }

.county-list { list-style: none; margin: .75rem 0 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.county-link { padding: .3rem 0; break-inside: avoid; }
.county-link__name { color: var(--ink); text-decoration-color: var(--accent); }

.cluster-links { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.cluster-link { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: .75rem; padding: .875rem 0; border-top: 1px solid var(--rule); }
.cluster-link:first-child { border-top: 0; }
.cluster-link__code { grid-row: 1 / span 2; font-size: 2.25rem; font-weight: 300; line-height: 1; }
.cluster-link__name { font-size: var(--size-value); font-weight: 500; }
.cluster-link__note { margin: 0; font-size: 1.0625rem; color: var(--ink-soft); }
.cluster-link__count { color: var(--muted); font-weight: 400; }

.results { list-style: none; margin: 1.25rem 0 0; padding: 0; border-bottom: 1px solid var(--rule); max-width: 48rem; }
.result { padding: .875rem 0; border-top: 1px solid var(--rule); }
.result__name { margin: 0; font-size: 1.3125rem; font-weight: 500; }
.result__name a { color: var(--ink); text-decoration-color: var(--accent); }
.result__summary { margin: .125rem 0 0; color: var(--ink-soft); }
.result-count { margin: 1.5rem 0 0; color: var(--muted); }

/* 11. Search and forms ------------------------------------------------ */
.search { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; max-width: 40rem; }
.search__label { width: 100%; font-size: 1.25rem; }
.search__hint { width: 100%; margin: 0; font-size: var(--size-small); color: var(--muted); }
.search__filters { width: 100%; display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.search__filter { display: flex; flex: 1 1 12rem; flex-direction: column; gap: .25rem; }
.search__filter label { font-size: var(--size-small); }
.search__filter select, .list-filter select {
  font: inherit; font-size: var(--size-small); color: var(--ink); background: var(--field);
  border: 1px solid var(--ink); border-radius: 0; padding: .55rem .65rem; min-height: 2.75rem;
}
.list-filter { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin: .75rem 0; }
.list-filter label { width: 100%; font-size: var(--size-small); }
.list-filter select { min-width: 12rem; max-width: 100%; }
.search__input, .field__input {
  font: inherit; font-size: 1.1875rem; color: var(--ink); background: var(--field);
  border: 2px solid var(--ink); border-radius: 0; padding: .7rem .8rem; min-height: 3.25rem;
}
.search__input { flex: 1 1 14rem; min-width: 0; }
.button {
  font: inherit; font-size: 1.125rem; font-weight: 600; color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 0; padding: .7rem 1.25rem; min-height: 3.25rem; cursor: pointer;
}
.button:hover { background: var(--accent); border-color: var(--accent); }

.form { max-width: 36rem; margin-top: 2rem; display: flex; flex-direction: column; gap: 1.75rem; }
.form__for { margin: 1rem 0 0; max-width: 40rem; }
.field { display: flex; flex-direction: column; gap: .375rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { font-weight: 600; font-size: 1.1875rem; padding: 0; }
.field__optional { font-weight: 400; color: var(--muted); }
.field__hint { margin: 0; font-size: var(--size-small); color: var(--muted); }
.field__input { width: 100%; font-size: 1.125rem; }
textarea.field__input { min-height: 7.5rem; resize: vertical; line-height: 1.45; }
.choice { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; }
.choice input { width: 1.375rem; height: 1.375rem; margin: 0; flex: none; accent-color: var(--ink); }
.notice { margin-top: 2rem; padding-top: .75rem; border-top: 2px solid var(--rule-strong); max-width: 40rem; }
.notice p { margin: .5rem 0 0; }
.notice__head { margin: 0; font-size: 1.375rem; font-weight: 500; }

/* 12. Guide steps ----------------------------------------------------- */
.guide-status { margin: 1.25rem 0 0; max-width: 40rem; color: var(--ink-soft); }
.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 52rem; counter-reset: step; border-bottom: 1px solid var(--rule); }
.step { counter-increment: step; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: .25rem; padding: 1rem 0 1.25rem; border-top: 1px solid var(--rule); }
.step__date { color: var(--muted); font-size: var(--size-label); font-variant-caps: all-small-caps; letter-spacing: .07em; }
.step__title { margin: 0; font-size: 1.375rem; font-weight: 500; }
.step__title::before { content: counter(step) ". "; color: var(--muted); font-weight: 400; }
.step__body { margin: 0; max-width: 38rem; }
.portal-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.portal { padding: .5rem 0; border-top: 1px solid var(--rule); }
.portal__note { display: block; font-size: var(--size-small); color: var(--muted); }

/* 13. Component sheet only ------------------------------------------- */
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-top: 1rem; }
.specimen { padding: 1.25rem; border: 1px solid var(--rule); background: var(--paper); }
.specimen__name { margin: 0 0 .75rem; font-family: var(--font-code); font-size: .875rem; color: var(--muted); }
.token-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .25rem; font-size: var(--size-small); }
.token { display: flex; align-items: center; gap: .625rem; }
.token__name { font-family: var(--font-code); font-size: .875rem; }
.swatch { width: 1.5rem; height: 1.5rem; border: 1px solid var(--rule-strong); flex: none; }
.swatch--paper { background: var(--paper); }
.swatch--ink { background: var(--ink); }
.swatch--muted { background: var(--muted); }
.swatch--rule { background: var(--rule); }
.swatch--accent { background: var(--accent); }
.rule-table { width: 100%; max-width: 52rem; border-collapse: collapse; font-size: 1.0625rem; margin-top: .75rem; }
.rule-table th, .rule-table td { text-align: left; vertical-align: top; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); }
.rule-table th { font-weight: 500; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: .07em; border-bottom-color: var(--rule-strong); }
.rule-table code { font-family: var(--font-code); font-size: .9375rem; }
.hw-sample { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--rule); }
.hw-sample__meta { margin: 0 0 .25rem; font-size: var(--size-small); color: var(--muted); }

/* Legacy KCSE tables and shared pagination, without Bootstrap. */
.rankings-years { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.5rem; }
.rankings-years__label { width: 100%; margin: 0; font-weight: 500; }
.rankings-years a { display: inline-flex; align-items: center; justify-content: center; min-width: 3.5rem; min-height: 2.75rem; padding: .35rem .65rem; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.rankings-years a:hover { border-color: var(--accent); color: var(--accent); }
.rankings-years a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin: 1.5rem 0 0; font-size: 1rem; }
.table th, .table td { padding: .65rem .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.table th { border-bottom: 2px solid var(--rule-strong); font-weight: 500; line-height: 1.3; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table th:nth-child(n+4), .table td:nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }
.table .sort-link { color: var(--ink); text-decoration-color: var(--accent); }
.table tbody tr:hover { background: var(--field); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.pagination { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.pagination li { margin: 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: .35rem .6rem; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active > span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pagination .disabled > span { color: var(--muted); opacity: .55; }
.pagination .ellipsis > span { border: 0; min-width: 1rem; }
.pagination .sr-only { position: absolute !important; width: 1px; min-width: 1px; height: 1px; min-height: 1px; padding: 0; border: 0; }
@media (max-width: 39.999rem) {
  .table .hidden-xs { display: none; }
  .table th:nth-child(2), .table td:nth-child(2) { width: 70%; }
}
@media (min-width: 40rem) and (max-width: 55.999rem) {
  .table .hidden-sm { display: none; }
}

/* 14. Wide layout ----------------------------------------------------- */
@media (min-width: 40rem) {
  .county-list { columns: 3; }
}
@media (min-width: 56rem) {
  :root { --gutter: 3rem; }
  .page { padding-block: 4rem 4.5rem; }
  .headword { font-size: var(--hw-1-wide); font-weight: 320; line-height: 1; letter-spacing: -.03em; }
  .headword--2 { font-size: var(--hw-2-wide); line-height: 1.02; }
  .headword--3 { font-size: var(--hw-3-wide); line-height: 1.04; letter-spacing: -.025em; }
  .headword--4 { font-size: var(--hw-4-wide); line-height: 1.08; letter-spacing: -.02em; }
  .page-title { font-size: var(--size-title-wide); }
  .lede { margin-top: 1.375rem; font-size: var(--size-lede-wide); line-height: 1.35; }
  .entry-head__overview { display: grid; grid-template-columns: minmax(0, 40rem) minmax(12rem, 18.75rem); justify-content: space-between; align-items: start; gap: var(--col-gap); margin-top: 1.375rem; }
  .entry-head__overview .entry-actions--top { margin-top: 0; flex-direction: column; }

  .fact { grid-template-columns: var(--label-col) minmax(0, 1fr); column-gap: var(--col-gap); align-items: baseline; padding: 1rem 0; }
  .fact__note, .fact__reported, .fact__status { grid-column: 2; }

  .entry-lower { display: grid; grid-template-columns: minmax(0, 1fr) var(--margin-col); column-gap: var(--col-gap); align-items: start; margin-top: 4.5rem; }
  .location__layout { grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); gap: var(--col-gap); }
  .slot--page-end { margin-top: 4rem; }

  .county-list { columns: 4; }
  .cluster-links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .cluster-link:nth-child(2) { border-top: 0; }
  .name-list { columns: 2; column-gap: var(--col-gap); border-top: 0; }
  .step { grid-template-columns: 13rem minmax(0, 1fr); column-gap: var(--col-gap); }
  .step__date { grid-row: 1 / span 3; }
  .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
