/* Peaker? — site styles. Mobile first; tokens from the Peaker? design system.
   Light is the default. Dark applies only when <html data-theme="dark"> is set by the toggle. */

@font-face { font-family: "Literata"; src: url("/assets/fonts/literata.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("/assets/fonts/big-shoulders-display.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f4f5f1;
  --raised: #ffffff;
  --line: #d6d8cf;
  --ink: #241a14;
  --muted: #5c5048;
  --accent: #a3202e;
  --accent-hover: #7d1823;
  --accent-soft: #f6dfdd;
  --on-accent: #ffffff;
  --peat: #2e211a;
  --on-peat: #f4f5f1;
  --on-peat-muted: #d6d8cf;
  --notice: #f2c230;
  --peat-ink: #241a14;
  --heather: #634873;
  --heather-soft: #ece4f1;
  --nature: #2f7a4a;
  --quarry: #a8641f;
  --map: #e6e8e1;
  --focus: #634873;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px;
  --gutter: var(--s3);
  --measure: 66ch;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #15110e;
  --raised: #201914;
  --line: #3a2f28;
  --ink: #f1eee8;
  --muted: #b4aaa1;
  --accent: #f07a80;
  --accent-hover: #f59ca0;
  --accent-soft: #3d1519;
  --on-accent: #15110e;
  --peat: #3d2e25;
  --on-peat: #f1eee8;
  --on-peat-muted: #b4aaa1;
  --notice: #e8b820;
  --heather: #c4a8d6;
  --nature: #7cc792;
  --quarry: #e0a35c;
  --heather-soft: #2c2133;
  --map: #241d18;
  --focus: #c4a8d6;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; display: flex; flex-direction: column; }
main > .act-band { margin-top: auto; }
.prose img, .prose svg, .article-head img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--bg); }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s3); top: -100px; background: var(--raised); color: var(--ink); padding: var(--s2) var(--s3); z-index: 10; }
.skip:focus { top: var(--s2); }
.preview-banner { margin: 0; padding: var(--s2) var(--s3); background: var(--accent); color: var(--on-accent); font-weight: 600; text-align: center; }
.label {
  font: 500 12px/16px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.mono, code { font-family: var(--mono); font-size: 0.9em; }

/* ---------- Deadline banner ---------- */
.deadline { background: var(--notice); color: var(--peat-ink); }
.deadline-inner { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; padding-block: 10px; }
.deadline a { color: var(--peat-ink); font-weight: 600; font-size: 15px; line-height: 20px; }
.deadline a:hover { color: var(--peat-ink); }

/* ---------- Header and navigation ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); min-height: 64px; }
/* flex-wrap: with wider letter and line spacing (WCAG 1.4.12) on a 320 px screen, the buttons drop below the wordmark instead of off the screen. */
.wordmark {
  font: 800 34px/1 var(--display);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span, .wordmark:hover span { color: var(--accent); }
.wordmark:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: var(--s2); }
.icon-btn {
  min-width: 44px; min-height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 3px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 var(--s3);
  border-radius: 3px; border: 1px solid transparent;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { color: var(--ink); background: var(--raised); }

.site-nav ul { list-style: none; margin-block: 0; display: flex; flex-direction: column; padding-bottom: var(--s3); }
.site-nav a {
  display: block; padding: 12px 0; border-top: 1px solid var(--line);
  font: 500 17px/24px var(--sans); color: var(--ink); text-decoration: none;
}
.site-nav a[aria-current="page"] { color: var(--accent); }
.js .site-nav { display: none; }
.js .site-nav.open { display: block; }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .js .site-nav, .site-nav { display: block; border-top: 1px solid var(--line); }
  .site-nav ul { flex-direction: row; gap: var(--s4); padding-bottom: 0; }
  .site-nav a { border-top: 0; padding: 12px 0; font-size: 16px; border-bottom: 3px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }
}

/* ---------- Article ---------- */
.article, .section-page { padding-block: var(--s5) var(--s6); }
.article-head { max-width: var(--measure); margin-bottom: var(--s4); }
.eyebrow a { color: var(--heather); text-decoration: none; }
.eyebrow { margin-bottom: var(--s2); }
h1 {
  font: 800 36px/0.98 var(--display);
  letter-spacing: -0.005em;
  margin: 0 0 var(--s3);
  text-wrap: balance;
}
.lede { font: 400 19px/30px var(--serif); margin: 0 0 var(--s3); color: var(--ink); }
.meta { font: 400 14px/20px var(--sans); color: var(--muted); margin: 0; }
.meta a { color: var(--muted); }

.prose {
  max-width: var(--measure);
  font: 400 17px/29px var(--serif);
}
.prose > * { margin-block: 0 var(--s4); }
.prose h2 {
  font: 700 28px/1.05 var(--display);
  margin-top: var(--s5);
  margin-bottom: var(--s3);
  text-wrap: balance;
}
.prose h3 { font: 600 20px/28px var(--serif); margin-top: var(--s4); margin-bottom: var(--s2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s5); }
.prose blockquote {
  margin-inline: 0;
  padding: var(--s3) var(--s3) var(--s3) calc(var(--s3) + 2px);
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; font: 400 15px/22px var(--sans); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; border-bottom: 2px solid var(--ink); }
.prose td code { white-space: nowrap; }
.prose sup a, .footnote-ref a { text-decoration: none; font: 500 12px/1 var(--mono); padding: 0 2px; }
.prose img { display: block; }
.prose figure { margin-inline: 0; }
.prose figcaption { font: 400 14px/20px var(--sans); color: var(--muted); margin-top: var(--s2); }

/* Callouts: ::: developer, ::: means, ::: question, ::: notice, ::: unknown */
.callout {
  max-width: var(--measure);
  padding: var(--s3);
  border: 1px solid var(--line);
  background: var(--raised);
  margin-bottom: var(--s4);
  font: 400 17px/28px var(--serif);
}
/* ::: quote: an official quotation. The quote reads first; the attribution is quieter. */
.pullquote {
  max-width: var(--measure);
  margin: 0 0 var(--s4);
  padding: var(--s1) 0 var(--s1) var(--s3);
  border-left: 4px solid var(--accent);
}
.pullquote > p:first-child { font: 600 22px/32px var(--serif); margin: 0 0 var(--s2); color: var(--ink); }
.pullquote > p:last-child { font: 400 14px/20px var(--sans); margin: 0; color: var(--muted); }
.callout > .label { margin-bottom: var(--s2); }
.callout > :last-child { margin-bottom: 0; }
.callout p { margin: 0 0 var(--s3); }
.callout-developer { border-left: 4px solid var(--muted); }
.callout-developer .label { color: var(--muted); }
.callout-means { border-left: 4px solid var(--heather); }
.callout-means .label { color: var(--heather); }
.callout-question { background: var(--accent-soft); border-color: var(--accent-soft); border-left: 4px solid var(--accent); }
.callout-question .label { color: var(--accent); }
.callout-question p:not(.label) { font: 600 20px/28px var(--serif); }
.callout-notice { background: var(--notice); border-color: var(--notice); color: var(--peat-ink); }
.callout-notice a { color: var(--peat-ink); }
.callout-unknown { border-style: dashed; border-color: var(--muted); }
.callout-unknown .label { color: var(--muted); }

/* Sources (footnotes) */
.sources { max-width: var(--measure); margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); }
.sources .label { color: var(--muted); margin-bottom: var(--s2); }
.sources-list { margin: 0; padding-left: 1.6em; font: 400 14px/21px var(--sans); color: var(--muted); }
.sources-list li { margin-bottom: var(--s2); }
.sources-list p { margin: 0; display: inline; }
.sources-list a { color: var(--muted); }
.footnote-backref { text-decoration: none; }

.correction { max-width: var(--measure); font: 400 14px/20px var(--sans); color: var(--muted); margin-top: var(--s5); }

/* ---------- Cards and lists ---------- */
.card-list { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s3); }
.card {
  display: flex; flex-direction: column; gap: var(--s2); height: 100%;
  padding: var(--s3); background: var(--raised); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.card:hover { border-color: var(--ink); color: var(--ink); }
.card strong { font: 600 19px/26px var(--serif); }
.card-text { font: 400 15px/22px var(--sans); color: var(--muted); }
.tag { color: var(--heather); }
.chip {
  align-self: flex-start; font: 500 12px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 999px; border: 1px dashed var(--muted); color: var(--muted);
}
@media (min-width: 640px) { .card-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Action band ---------- */
.act-band { background: var(--peat); color: var(--on-peat); padding-block: var(--s5); }
.act-band h2 { font: 800 30px/1 var(--display); margin: 0 0 var(--s4); }
.act-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.act-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px var(--s3);
  background: var(--bg); color: var(--ink); text-decoration: none;
}
.act-card:hover { color: var(--ink); background: var(--raised); }
.act-card strong { font: 600 16px/22px var(--sans); }
.act-card span { font: 400 14px/20px var(--sans); color: var(--muted); }
@media (min-width: 700px) { .act-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .act-grid { grid-template-columns: repeat(4, 1fr); } .act-card { padding: var(--s4) 20px; } }

/* ---------- Home ---------- */
.hero { padding-block: var(--s5) var(--s4); }
.hero h1 { font-size: 44px; line-height: 0.95; max-width: 14ch; }
.hero .lede { max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.home-section { padding-block: var(--s5); border-top: 1px solid var(--line); }
.home-section > .wrap > h2, .home-h2 { font: 800 30px/1 var(--display); margin: 0 0 var(--s4); }
.section-foot { font: 400 14px/20px var(--sans); color: var(--muted); margin: var(--s3) 0 0; }

.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.figure {
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3); background: var(--raised); color: var(--ink); text-decoration: none; height: 100%;
}
.figure:hover { color: var(--ink); background: var(--bg); }
.figure-value { font: 800 40px/0.9 var(--display); }
.figure-value small { font: 500 14px/1 var(--mono); margin-left: 4px; color: var(--muted); }
.figure-missing .figure-value { font-size: 28px; color: var(--accent); }
.figure-label { font: 400 14px/19px var(--sans); color: var(--muted); }
@media (min-width: 700px) { .figures { grid-template-columns: repeat(3, 1fr); } }

.q-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.q-list a {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  padding: var(--s3) 0; border-bottom: 1px solid var(--line);
  font: 600 19px/26px var(--serif); color: var(--ink); text-decoration: none;
}
.q-list a::after { content: "→"; font-family: var(--sans); color: var(--accent); }
.q-list a:hover { color: var(--accent); }

.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.news-item { display: grid; gap: var(--s1); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.news-item time { font: 500 12px/16px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--heather); }
.news-item a { font: 600 19px/26px var(--serif); color: var(--ink); text-decoration: none; }
.news-item a:hover { color: var(--accent); }
.news-item p { margin: 0; font: 400 15px/22px var(--sans); color: var(--muted); }

@media (min-width: 900px) {
  :root { --gutter: var(--s5); }
  h1 { font-size: 48px; }
  .hero { padding-block: var(--s6) var(--s5); }
  .hero h1 { font-size: 80px; max-width: 13ch; }
  .lede { font-size: 21px; line-height: 32px; }
  .prose { font-size: 18px; line-height: 30px; }
  .prose h2 { font-size: 30px; }
  .home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.tl-item { position: relative; padding: 0 0 var(--s4) 28px; border-left: 2px solid var(--line); margin-left: 7px; }
.tl-item:last-child { border-left-color: transparent; }
.tl-item::before {
  content: ""; position: absolute; left: -9px; top: 2px; width: 16px; height: 16px; border-radius: 999px;
  background: var(--bg); border: 2px solid var(--muted);
}
.tl-done::before { background: var(--muted); }
.tl-next::before { border-color: var(--accent); background: var(--accent); }
.tl-deadline::before { border-color: var(--peat-ink); background: var(--notice); }
.tl-when { font: 500 12px/16px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s1); }
.tl-next .tl-when { color: var(--accent); }
.tl-title { font: 600 19px/26px var(--serif); margin: 0 0 var(--s1); }
.tl-detail { font: 400 15px/23px var(--sans); color: var(--muted); margin: 0; }
.tl-deadline .tl-box { background: var(--notice); color: var(--peat-ink); padding: var(--s3); }
/* The next step: the one thing to look at on this page */
.tl-next .tl-box { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: var(--s3); margin-left: -4px; }
.tl-next .tl-title { font: 800 26px/1.05 var(--display); color: var(--ink); margin-top: var(--s1); }
.tl-next .tl-detail { color: var(--ink); }
.tl-next::before { width: 22px; height: 22px; left: -12px; top: 18px; box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-next .tl-status { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tl-item.tl-next { padding-bottom: var(--s5); }
.tl-deadline .tl-box .tl-when, .tl-deadline .tl-box .tl-detail { color: var(--peat-ink); }
.tl-status { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 7px; border-radius: 999px; border: 1px solid currentColor; margin-left: var(--s2); vertical-align: 2px; }

/* ---------- Documents ---------- */
.doc-group { margin-bottom: var(--s5); max-width: 900px; }
.doc-group h2 { font: 700 28px/1.05 var(--display); margin: 0 0 var(--s3); }
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc { display: grid; gap: var(--s2); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.doc-type { justify-self: start; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; padding: 5px 8px; border-radius: 3px; background: var(--heather-soft); color: var(--heather); }
.doc-title { font: 600 19px/26px var(--serif); margin: 0; }
.doc-meta { font: 400 14px/20px var(--sans); color: var(--muted); margin: 0; }
.doc-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font: 500 15px/22px var(--sans); }
.doc-pending .doc-title { color: var(--muted); }
@media (min-width: 800px) { .doc { grid-template-columns: 140px 1fr; column-gap: var(--s4); } .doc-type { grid-row: span 3; } }

/* ---------- Representatives ---------- */
.rep-grid { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: var(--s3); font-family: var(--sans); }
.prose .rep-grid li { margin: 0; }
.rep { background: var(--raised); border: 1px solid var(--line); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.rep-name { font: 600 19px/24px var(--serif); margin: 0; }
.rep-party { font: 400 14px/20px var(--sans); color: var(--muted); margin: 0; }
.rep-role { color: var(--heather); }
.rep-contact { list-style: none; padding: 0; margin: var(--s2) 0 0; display: grid; gap: 2px; font: 500 15px/22px var(--sans); }
.prose .rep-contact li { margin: 0; }
.prose .rep-grid, .prose .rep-contact { padding-left: 0; }
.rep-contact a { overflow-wrap: anywhere; }
.rep-write { align-self: flex-start; margin-top: var(--s2); min-height: 40px; font-size: 15px; }
.rep-all { margin: 0 0 var(--s4); padding: var(--s3); border: 1px dashed var(--line); font-family: var(--sans); }
.rep-all-note { font: 400 14px/20px var(--sans); color: var(--muted); margin: 0 0 var(--s2); }
.rep-all-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rep-addrs { margin-top: var(--s2); font: 400 14px/20px var(--sans); }
.rep-addrs summary { cursor: pointer; color: var(--accent); padding-block: 4px; } /* at least 24 px tall (WCAG 2.5.8) */
.rep-addrs p { margin: var(--s2) 0 0; overflow-wrap: anywhere; user-select: all; }
@media (min-width: 640px) { .rep-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .prose:has(.rep-grid) { max-width: 900px; } .rep-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Forms ---------- */
.field { display: grid; gap: var(--s1); max-width: 480px; }
.field label { font: 500 16px/24px var(--sans); }
.field input {
  min-height: 44px; padding: 0 12px; font: 400 16px/1 var(--sans);
  border: 1px solid var(--muted); border-radius: 3px; background: var(--raised); color: var(--ink);
}
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; }

.template {
  max-width: var(--measure); background: var(--raised); border: 1px solid var(--line);
  padding: var(--s3); margin: 0 0 var(--s2); white-space: pre-wrap; font: 400 15px/24px var(--mono);
}
.copy-btn { margin-bottom: var(--s4); }

/* ---------- Map ---------- */
.map-frame { border: 1px solid var(--line); background: var(--map); }
/* div only: the privacy page has an <h2 id="map"> as a link target. */
div#map { height: 70vh; min-height: 380px; max-height: 720px; background: var(--map); }
/* Map key */
.map-key { display: grid; gap: var(--s3); padding: var(--s3); border-top: 1px solid var(--line); background: var(--raised); font: 400 14px/20px var(--sans); color: var(--ink); }
.key-fixed { list-style: none; margin: 0; padding: 0 0 var(--s3); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); color: var(--muted); }
.key-fixed li { display: flex; align-items: center; gap: var(--s2); }
.key-toggles { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--s1) var(--s4); }
.key-toggles legend { color: var(--muted); padding: 0; margin-bottom: var(--s2); }
.key-toggles label { display: flex; align-items: center; gap: var(--s2); min-height: 36px; cursor: pointer; }
.key-toggles input { width: 18px; height: 18px; margin: 0 var(--s1) 0 0; flex: none; accent-color: var(--accent); }
.key-toggles .key-two-line { align-items: flex-start; padding-top: 6px; }
.key-two-line input { margin-top: 1px; }
.key-text { display: flex; flex-direction: column; gap: 4px; }
.key-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.key-sub .sw + .sw, .key-sub .sw { margin-left: 0; }
.key-sub .sw-pending { margin-left: 6px; }
.sw { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 999px; }
.sw-site { background: var(--accent); }
.sw-ring { border: 2px dashed var(--heather); }
/* Protected areas (Red Bog SAC, Poulaphouca): a triangle, so they can't be mistaken for sports grounds. */
.sw-protected { border-radius: 0; background: var(--nature); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pk-tri { display: block; }
/* Grid connection (Dunnstown substation): a lightning bolt, labelled all the time. */
.sw-grid { border-radius: 0; background: var(--ink); clip-path: polygon(59% 0, 9% 57%, 45% 57%, 36% 100%, 91% 39%, 55% 39%); }
.pk-bolt { display: block; }
.leaflet-tooltip.pk-tip-grid { font-weight: 600; }
/* Red Bog Quarry: solid ochre outline, so it can't be mistaken for the dashed rings. */
.sw-quarry { border-radius: 2px; border: 2px solid var(--quarry); background: color-mix(in srgb, var(--quarry) 15%, transparent); }
.sw-school { background: var(--heather); }
.sw-sport { background: var(--raised); border: 2px solid var(--ink); }
.sw-sq { border-radius: 0; width: 12px; height: 12px; border: 2px solid; }
.sw-granted { background: var(--accent); border-color: var(--accent); }
.sw-pending { background: var(--notice); border-color: var(--peat-ink); }
@media (min-width: 700px) {
  .key-toggles { grid-template-columns: 1fr 1fr; }
  .key-toggles legend { grid-column: 1 / -1; }
}
.pa-mark { display: block; box-sizing: border-box; border: 2px solid; }
.pa-desc { font-size: 13px; line-height: 18px; color: var(--muted); margin: 6px 0; }
.leaflet-popup-content .label { color: var(--heather); margin-bottom: 4px; }
.view-switch { display: inline-flex; flex-wrap: wrap; margin-top: var(--s3); border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.view-btn { min-height: 40px; padding: 0 var(--s3); border: 0; border-right: 1px solid var(--ink); background: var(--raised); color: var(--ink); font: 600 15px/1 var(--sans); cursor: pointer; }
.view-btn:last-child { border-right: 0; }
.view-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
#view-note { margin: var(--s2) 0 var(--s2); }
.map-tools { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s3) 0; }
.distance-out { font: 600 17px/24px var(--sans); }
.map-frame .leaflet-container { font: 400 14px/20px var(--sans); background: var(--map); }
.leaflet-container .leaflet-popup-content-wrapper, .leaflet-container .leaflet-popup-tip { background: var(--raised); color: var(--ink); border-radius: 0; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-container .leaflet-control-scale-line { background: var(--raised); color: var(--ink); border-color: var(--ink); }
.leaflet-container .leaflet-bar a { background: var(--raised); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-container .leaflet-control-attribution { background: var(--raised) !important; color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--muted); }
/* Hide hairline seams between raster tiles */
.map-frame .leaflet-tile-container img.leaflet-tile { width: 256.5px !important; height: 256.5px !important; }
.pk-label { font: 600 13px/1 var(--sans); color: var(--ink); background: var(--raised); border: 1px solid var(--line); padding: 4px 6px; white-space: nowrap; }

/* ---------- Search (Pagefind UI) ---------- */
.search-page { --pagefind-ui-scale: 0.9; --pagefind-ui-primary: var(--accent); --pagefind-ui-text: var(--ink); --pagefind-ui-background: var(--raised); --pagefind-ui-border: var(--muted); --pagefind-ui-tag: var(--heather-soft); --pagefind-ui-border-width: 1px; --pagefind-ui-border-radius: 3px; --pagefind-ui-font: var(--sans); max-width: var(--measure); }

/* ---------- Footer ---------- */
.site-footer { background: var(--peat); color: var(--on-peat); padding-block: var(--s6); border-top: 1px solid var(--line); }
.act-band + .site-footer { border-top-color: var(--on-peat-muted); }
.footer-inner { display: grid; gap: var(--s4); }
.wordmark-footer { color: var(--on-peat); font-size: 40px; }
.wordmark-footer:hover { color: var(--on-peat); }
.wordmark-footer span { color: #f07a80; }
.footer-blurb { font: 400 15px/22px var(--sans); color: var(--on-peat-muted); max-width: 46ch; margin: var(--s2) 0 0; }
.footer-blurb a, .footer-links a { color: var(--on-peat); }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font: 500 15px/24px var(--sans); }
.footer-meta { font: 400 13px/18px var(--sans); color: var(--on-peat-muted); margin: 0; }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-meta { grid-column: 1 / -1; } }

@media print {
  .deadline, .site-nav, .header-actions, .act-band, .site-footer, .correction { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Keyboard focus on map circles (SVG paths can't show an outline). */
#map path.leaflet-interactive:focus { outline: none; }
#map path.leaflet-interactive:focus-visible { stroke: var(--ink); stroke-width: 6px; } /* --focus matches the school colour, so use ink */
