/*
 * California Money Trail — '70s California sunshine design prototype.
 * Producer: hand-authored for designs/californiamoneytrail (index, race, about).
 * Genre: stacked rainbow arcs, a low sun, chunky retro display (Shrikhand),
 * pill buttons, rounded everything, region bands as rainbow stripes.
 * Shrikhand is display only; every readable line is Nunito on light grounds.
 */

:root {
  --redwood: #973E38;
  --poppy: #CC8B2E;        /* fills only */
  --poppy-text: #8E5A10;   /* poppy as text */
  --sage: #536B5A;
  --sun: #E9B23F;          /* fills only */
  --cocoa: #4A2A1E;
  --cream: #FBEFD9;
  --warm: #F7F4EC;
  --white: #FFFFFF;
  --sand: #FDF3E1;
  --line: #E6D3B3;         /* decorative dividers */
  --muted: #6B5A50;
  --band-ink: #2B1A12;
  --support: #2C4F8C;
  --oppose: #6B2A6E;
  --ph-bg: #FDE7B0;
  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --text: "Nunito", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --findbar-space: 0px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; scroll-padding-bottom: var(--findbar-space); }
body {
  margin: 0; background: var(--cream); color: var(--cocoa);
  font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; overflow-wrap: break-word;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.12; overflow-wrap: break-word; }
p, ul, ol, dl, dd, figure { margin: 0; }
svg, iframe, img { max-width: 100%; }
a { color: var(--redwood); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--cocoa); }
b, strong { font-weight: 800; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.js .nojs-only { display: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--support); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Placeholder: sunny highlighter with a dashed amber underline. */
.ph {
  background: var(--ph-bg); color: var(--cocoa); border-bottom: 2px dashed var(--poppy-text);
  border-radius: 4px; padding: 0 0.22em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; overflow-wrap: anywhere;
}
p.ph, div.ph { border: 2px dashed var(--poppy-text); border-radius: 16px; padding: 0.6em 0.9em; }
a.ph { text-decoration: none; }
a.ph:hover { background: #FBD98A; color: var(--cocoa); }
.on-dark .ph { background: #7A2E29; color: var(--cream); border-color: var(--cream); }

/* ---------- Skip link, preview bar ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cocoa); color: var(--cream); padding: 12px 20px; border-radius: 999px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; color: var(--cream); }
.preview-bar {
  background: var(--cocoa); color: var(--cream); text-align: center;
  font-size: 0.875rem; line-height: 1.5; padding: 9px var(--gutter);
}
.preview-bar strong { color: #FFE7A8; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 2.5px solid var(--cocoa); background: var(--cream); color: var(--cocoa);
  font-family: var(--text); font-weight: 800; font-size: 0.9375rem; line-height: 1.15; text-decoration: none; cursor: pointer;
  text-align: center;
}
.pill:hover { background: var(--sun); color: var(--band-ink); }
.pill--primary { background: var(--redwood); border-color: var(--redwood); color: var(--white); }
.pill--primary:hover { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.pill[aria-current="page"] { background: var(--cocoa); color: var(--cream); }
.pill[aria-expanded]::after { content: "▾"; font-size: 0.85em; display: inline-block; transition: transform 0.2s ease; }
.pill[aria-expanded="true"] { background: var(--sun); color: var(--band-ink); }
.pill[aria-expanded="true"]::after { transform: rotate(180deg); }

/* ---------- Header ---------- */
.site-header { background: var(--warm); border-bottom: 2.5px solid var(--cocoa); }
.site-header__row {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; min-width: 0; }
.brand__mark { width: 52px; height: 52px; flex: none; }
.brand__name { font-family: var(--display); font-weight: 400; font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.05; color: var(--redwood); }
.brand__trail { color: var(--sage); }
.brand:hover .brand__name { text-decoration: underline; text-decoration-thickness: 2px; }
.nav-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 899px) {
  .site-header__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .brand__name { display: flex; flex-direction: column; font-size: 1.375rem; }
  .brand__mark { width: 44px; height: 44px; }
  #site-nav { grid-column: 1 / -1; }
  .nav-pills { flex-direction: column; gap: 8px; padding: 6px 0 4px; }
  .nav-pills .pill { width: 100%; justify-content: center; }
}

.drawer { background: var(--cream); border-top: 2px solid var(--cocoa); }
.drawer__inner { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 22px; display: grid; gap: 12px; }
.drawer__title { font-family: var(--display); font-size: 1.5rem; color: var(--cocoa); line-height: 1.1; }
.drawer__bands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 6px; }
.drawer__bands li { display: flex; align-items: center; min-height: 40px; border-radius: 999px; padding: 6px 16px; font-weight: 800; font-size: 0.9375rem; line-height: 1.2; }
.drawer__note { font-size: 0.9375rem; max-width: 70ch; }
.drawer__links { display: flex; flex-wrap: wrap; gap: 8px; }

/* Rainbow band colours (text label always present). */
.c1 { background: #536B5A; color: #FFFFFF; }
.c2 { background: #A3B48F; color: #2B1A12; }
.c3 { background: #CC8B2E; color: #2B1A12; }
.c4 { background: #E9B23F; color: #2B1A12; }
.c5 { background: #E0A07A; color: #2B1A12; }
.c6 { background: #B65A45; color: #FFFFFF; }
.c7 { background: #973E38; color: #FFFFFF; }
.c8 { background: #6E2A26; color: #FFFFFF; }
.c0 { background: #4A2A1E; color: #FBEFD9; }

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(36px, 5vw, 64px) 0; border-bottom: 2.5px solid var(--cocoa); }
.section--warm { background: var(--warm); }
.eyebrow { font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cocoa); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.section-head h2, .display-h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.08; color: var(--cocoa); }
.section-head__note { font-size: 0.9375rem; color: var(--muted); }
.intro { max-width: 68ch; margin-bottom: 22px; }
.measure { max-width: 68ch; }

/* ---------- Hero ---------- */
.hero { background: var(--cream); border-bottom: 2.5px solid var(--cocoa); overflow: hidden; }
.hero__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: end;
}
.hero__text { padding: clamp(32px, 5vw, 64px) 0 clamp(24px, 4vw, 56px); display: grid; gap: 16px; min-width: 0; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 8.4vw, 5.9rem); line-height: 0.98; color: var(--redwood); letter-spacing: 0.005em; }
.hero__lede { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); max-width: 58ch; }
.hero__art { min-width: 0; display: flex; justify-content: center; }
.hero__art svg { display: block; width: 100%; max-width: 640px; height: auto; }
@media (min-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.9fr); gap: 32px; }
  .hero__art { justify-content: flex-end; }
}
@media (max-width: 959px) {
  .hero__art svg { max-width: 420px; margin-top: 6px; }
}

/* ---------- District jump (pill finder) ---------- */
.finder { display: grid; gap: 10px; margin-top: 6px; }
.jump { display: grid; gap: 8px; max-width: 470px; }
.jump label { font-weight: 800; font-size: 0.9375rem; }
.jump__field {
  display: flex; align-items: center; gap: 6px; background: var(--white);
  border: 2.5px solid var(--cocoa); border-radius: 999px; padding: 5px 5px 5px 18px; min-width: 0;
}
.jump__prefix { font-weight: 800; font-size: 1.125rem; flex: none; }
.jump input {
  flex: 1 1 auto; min-width: 0; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--cocoa);
  font-family: var(--text); font-size: 1.125rem; font-weight: 700; padding: 0 4px; border-radius: 999px;
}
.jump input::placeholder { color: var(--muted); opacity: 1; font-weight: 600; }
.jump input:focus-visible { outline-offset: 0; }
.jump input[aria-invalid="true"] { box-shadow: inset 0 -3px 0 var(--redwood); }
.jump button {
  flex: none; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--cocoa); color: var(--cream); font-family: var(--text); font-weight: 800; font-size: 1rem;
}
.jump button:hover { background: var(--redwood); color: var(--white); }
.jump__error { color: var(--redwood); font-weight: 700; font-size: 0.9375rem; }
.finder__hint { font-size: 0.9375rem; }

/* ---------- Regions + districts ---------- */
.regions__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1024px) { .regions__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; } }
.bands { display: grid; gap: 8px; }
.band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 14px; width: 100%;
  min-height: 52px; padding: 10px 22px; border: 0; border-radius: 999px; cursor: pointer; text-align: left;
  font-family: var(--text); font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.2;
}
.band__meta { font-size: 0.8125rem; font-weight: 700; }
.band:hover { box-shadow: inset 0 0 0 3px rgba(43, 26, 18, 0.55); }
.band[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px var(--cocoa); }
.band[aria-pressed="true"] .band__meta::before { content: "● Showing · "; }
.bands-static { list-style: none; padding: 0; display: grid; gap: 6px; }
.bands-static li { border-radius: 999px; padding: 10px 20px; font-weight: 800; }

.districts-panel { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 28px; padding: 20px clamp(14px, 2.4vw, 24px) 22px; min-width: 0; }
.districts-panel h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--sage); margin-bottom: 12px; }
.pending-note { border: 2px dashed var(--poppy-text); background: var(--sand); border-radius: 18px; padding: 12px 16px; margin-bottom: 12px; font-weight: 600; }
.districts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
.districts a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px;
  border: 2px solid var(--cocoa); border-radius: 16px; background: var(--warm); color: var(--cocoa);
  font-weight: 800; font-size: 1.125rem; line-height: 1; text-decoration: none;
}
.districts a .st { font-size: 0.625rem; letter-spacing: 0.12em; color: var(--poppy-text); font-weight: 800; margin-bottom: 2px; }
.districts a:hover { background: var(--sun); color: var(--band-ink); }
.districts a:hover .st { color: var(--band-ink); }
.districts a[aria-current="page"] { background: var(--redwood); border-color: var(--redwood); color: var(--white); box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--redwood); }
.districts a[aria-current="page"] .st { color: var(--white); }
@media (min-width: 1024px) { .districts { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* ---------- Evidence cards ---------- */
.evidence {
  position: relative; margin: 0; min-width: 0; background: var(--white); color: var(--cocoa);
  border: 2.5px solid var(--cocoa); border-radius: 28px; overflow: hidden;
}
.evidence__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; padding: 12px 20px;
  background: var(--sand); border-bottom: 2px solid var(--cocoa);
  font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.evidence__source { color: var(--redwood); }
.evidence__lede { padding: 14px 20px 0; font-size: 0.9375rem; max-width: 72ch; }
.evidence__frame { position: relative; margin: 14px 14px 0; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); background: var(--white); }
.evidence__frame iframe { display: block; width: 100%; border: 0; }
.evidence__frame.is-clamped { max-height: var(--clamp); overflow: hidden; }
.evidence__frame.is-clamped::after { content: ""; position: absolute; inset: auto 0 0 0; height: 96px; pointer-events: none; background: linear-gradient(transparent, var(--white)); }
.evidence__status { display: none; }
.evidence[data-state="pending"] .evidence__status,
.js .evidence[data-state="loading"] .evidence__status,
.js .evidence[data-state="slow"] .evidence__status { display: block; }
.js .evidence[data-state="loading"] .evidence__frame { min-height: 320px; }
.evidence__fallback { margin-top: 14px; padding: 12px 20px 16px; border-top: 2px solid var(--cocoa); font-size: 0.9375rem; font-weight: 600; }
.evidence__expand { margin: 12px 14px 0; }
.evidence__expand {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 2.5px solid var(--cocoa); background: var(--cream); color: var(--cocoa); font-family: var(--text); font-weight: 800; font-size: 0.9375rem;
}
.evidence__expand:hover { background: var(--sun); }

/* Sunshine panel for pending and loading. */
.evidence[data-state="pending"] .evidence__frame,
.js .evidence[data-state="loading"] .evidence__status,
.js .evidence[data-state="slow"] .evidence__status {
  background:
    radial-gradient(circle at 50% 100%, var(--sun) 0 44px, transparent 45px),
    radial-gradient(circle at 50% 100%, transparent 0 58px, #A3B48F 59px 70px, transparent 71px),
    radial-gradient(circle at 50% 100%, transparent 0 78px, #E0A07A 79px 90px, transparent 91px),
    repeating-conic-gradient(from -90deg at 50% 100%, #FBE3B0 0 6deg, var(--sand) 6deg 12deg);
}
.evidence[data-state="pending"] .evidence__frame {
  min-height: 180px; display: grid; place-items: center; padding: 22px 16px 104px; border-style: dashed; border-color: var(--poppy-text);
}
.evidence[data-state="pending"] .evidence__status {
  max-width: 44ch; padding: 12px 18px; text-align: center; font-size: 0.9375rem; font-weight: 600;
  background: var(--white); border: 2px solid var(--cocoa); border-radius: 18px;
}
.js .evidence[data-state="loading"] .evidence__status,
.js .evidence[data-state="slow"] .evidence__status {
  position: absolute; inset: 0 0 auto 0; min-height: 320px; z-index: 1;
  display: grid; place-items: center; padding: 24px 24px 120px; text-align: center; font-weight: 700; font-size: 0.9375rem;
}

/* ---------- Supports / opposes ---------- */
.pos {
  display: inline-flex; align-items: center; gap: 0.35em; white-space: nowrap; border-radius: 999px;
  font-weight: 800; font-size: 0.875rem; line-height: 1.2; padding: 5px 14px;
}
.pos--support { background: var(--support); color: var(--white); border: 3px solid var(--support); padding: 2px 12px; }
.pos--oppose { background: var(--white); color: var(--oppose); border: 3px dotted var(--oppose); padding: 2px 12px; }
.party { color: var(--cocoa); }

/* ---------- Spotlight ---------- */
.spotlight { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
@media (min-width: 960px) { .spotlight { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 44px; } }
.spotlight__text { display: grid; gap: 14px; min-width: 0; }
.spotlight__text h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.12; color: var(--redwood); }
.rating { font-size: 0.9375rem; font-weight: 700; }

/* ---------- Plain language ---------- */
.plain {
  position: relative; background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 40px;
  padding: clamp(26px, 4vw, 48px) clamp(18px, 4vw, 48px); overflow: hidden;
}
.plain__stripe { display: flex; height: 14px; margin: calc(-1 * clamp(26px, 4vw, 48px)) calc(-1 * clamp(18px, 4vw, 48px)) clamp(22px, 3vw, 34px); }
.plain__stripe span { flex: 1; }
.plain h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--redwood); line-height: 1.1; margin-bottom: 12px; }
.plain__lede { max-width: 64ch; margin-bottom: 22px; font-size: 1.0625rem; }
.plain__three { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 860px) { .plain__three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plain__three li { background: var(--sand); border-radius: 24px; padding: 16px 18px 18px; border: 2px solid var(--line); }
.plain__three h3 { display: inline-block; border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: 0.9375rem; margin-bottom: 8px; }
.plain__three p { font-size: 0.9875rem; }

/* ---------- Compare ---------- */
.compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
@media (min-width: 1024px) { .compare { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr); gap: 36px; } }
.compare__intro { display: grid; gap: 14px; min-width: 0; }
.compare__intro h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--sage); line-height: 1.08; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2.5px solid var(--cocoa); background: var(--white); font-weight: 800; }
.chips-label { font-weight: 800; font-size: 0.875rem; }
.compare__cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
@media (min-width: 700px) { .compare__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Spender table ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 24px; min-width: 0; }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.ledger caption { caption-side: top; text-align: left; padding: 14px 18px 12px; font-weight: 700; background: var(--sand); border-bottom: 2px solid var(--cocoa); }
.ledger thead th {
  text-align: left; vertical-align: bottom; padding: 12px 14px 10px; border-bottom: 2px solid var(--cocoa);
  font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.ledger td, .ledger tbody th { text-align: left; vertical-align: top; padding: 14px; border-bottom: 1.5px solid var(--line); font-weight: 600; }
.ledger tbody tr:last-child > * { border-bottom: 0; }
.ledger tbody th { font-weight: 800; }
.ledger .norecord { font-style: italic; }
.ledger td, .ledger th, .ledger .ph { overflow-wrap: break-word; }
@media (min-width: 721px) {
  .ledger { min-width: 880px; }
  .ledger thead th:nth-child(1) { width: 18%; }
  .ledger thead th:nth-child(2) { width: 13%; }
  .ledger thead th:nth-child(3) { width: 18%; }
  .ledger thead th:nth-child(4) { width: 9%; }
  .ledger thead th:nth-child(5) { width: 16%; }
  .ledger thead th:nth-child(6) { width: 15%; }
  .ledger thead th:nth-child(7) { width: 11%; }
}
@media (max-width: 720px) {
  .table-wrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .ledger, .ledger tbody, .ledger tr, .ledger td, .ledger tbody th { display: block; width: 100%; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .ledger caption { display: block; border: 2.5px solid var(--cocoa); border-radius: 20px; margin-bottom: 12px; }
  .ledger tbody tr { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 24px; margin-bottom: 12px; padding: 6px 16px; }
  .ledger td, .ledger tbody th { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 10px 0; }
  .ledger tbody tr > :last-child { border-bottom: 0; }
  .ledger td::before, .ledger tbody th::before {
    content: attr(data-label); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--poppy-text);
  }
  .ledger .cell { min-width: 0; }
}

/* ---------- Data-state key ---------- */
.key { display: grid; gap: 10px; }
.key > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; padding: 12px 16px; background: var(--white); border: 2px solid var(--line); border-radius: 20px; }
@media (min-width: 640px) { .key > div { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); } }
.key dt { font-weight: 800; font-size: 0.9375rem; color: var(--redwood); }
.key dd { font-size: 0.9375rem; }
.chip-loading { display: inline-block; border-radius: 999px; padding: 1px 12px; background: var(--sand); border: 2px solid var(--line); font-weight: 700; }
.chip-unavailable { display: inline-block; border-radius: 999px; padding: 1px 12px; border: 2px solid var(--redwood); color: var(--redwood); font-weight: 700; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 860px) { .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.news-grid--two { }
@media (min-width: 860px) { .news-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.news-item { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 28px; padding: 18px 20px 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.news-item__flag { justify-self: start; border-radius: 999px; background: var(--sand); border: 2px dashed var(--poppy-text); padding: 2px 12px; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.news-item h3 { font-family: var(--display); font-weight: 400; font-size: 1.4rem; line-height: 1.2; }
.news-item__meta { font-size: 0.9375rem; font-weight: 600; }
.news-item p.ph { font-size: 0.9375rem; }
.news-date-note { margin-top: 14px; font-size: 0.9375rem; font-weight: 600; color: var(--muted); }

/* ---------- How this works ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
@media (min-width: 960px) { .how { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; } }
.how h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--redwood); margin-bottom: 14px; line-height: 1.1; }
.how h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--sage); margin-bottom: 12px; }
.sunlist { list-style: none; padding: 0; display: grid; gap: 10px; }
.sunlist li { position: relative; padding-left: 30px; }
.sunlist li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 9px; border-radius: 18px 18px 0 0; background: var(--sun); box-shadow: 0 0 0 2px var(--cocoa); }
.more { margin-top: 16px; }

/* ---------- Race page ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; font-weight: 700; font-size: 0.9375rem; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--poppy-text); font-weight: 800; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.racehead { display: grid; gap: 14px; }
.racehead h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.04; color: var(--redwood); max-width: 20ch; }
.notice { border: 2.5px solid var(--redwood); background: var(--white); border-radius: 18px; padding: 10px 16px; font-weight: 700; max-width: 64ch; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; }
.facts > div { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 22px; padding: 8px 18px 10px; min-width: 0; max-width: 100%; }
.facts dt { font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--poppy-text); }
.facts dd { font-weight: 700; }
.race-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
@media (min-width: 1024px) {
  .race-top { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.55fr); gap: 40px; }
  .race-side { position: sticky; top: 20px; }
}
.race-side { display: grid; gap: 14px; min-width: 0; }
.race-side h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--sage); }
.howto { background: var(--white); border: 2px solid var(--line); border-radius: 22px; padding: 14px 18px; font-size: 0.9375rem; }
.howto h3 { font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.funding { display: grid; gap: 14px; }
.funding details { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 28px; overflow: hidden; }
.funding summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 20px;
  font-weight: 700;
}
.funding summary::-webkit-details-marker { display: none; }
.funding summary::before {
  content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--band-ink); font-weight: 800; font-size: 1.25rem; line-height: 1;
}
.funding details[open] summary::before { content: "–"; background: var(--cocoa); color: var(--cream); }
.funding details[open] summary { border-bottom: 2px solid var(--cocoa); }
.funding details .evidence { margin: 14px; }
.summary__label { display: block; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--poppy-text); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
.dates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 860px) { .dates { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dates > div { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 24px; padding: 14px 18px; }
.dates dt { font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--poppy-text); }
.dates dd { font-weight: 700; }
.dates dd small { display: block; font-weight: 600; font-size: 0.875rem; color: var(--muted); }
.subhead { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--sage); margin: 30px 0 12px; }

/* ---------- About page ---------- */
.about-hero { text-align: center; display: grid; gap: 14px; justify-items: center; }
.about-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.02; color: var(--redwood); }
.about-hero .arcs { width: 180px; height: auto; }
.about-hero p { max-width: 60ch; }
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin-top: 8px; }
.toc a { font-size: 0.875rem; padding: 0 14px; min-height: 40px; }
.prose { max-width: 780px; margin: 0 auto; display: grid; gap: 18px; }
.prose > section { background: var(--white); border: 2.5px solid var(--cocoa); border-radius: 32px; padding: clamp(20px, 3.4vw, 34px); }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--redwood); margin-bottom: 12px; }
.prose h3 { font-weight: 800; font-size: 1.0625rem; margin: 18px 0 6px; color: var(--sage); }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + dl, .prose dl + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose li::marker { color: var(--redwood); }
.roles { list-style: none; padding: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px !important; }
@media (min-width: 640px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.roles li { background: var(--sand); border-radius: 20px; padding: 12px 16px; }
.roles b { display: block; color: var(--redwood); }
.legend-pos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.glossary { display: grid; gap: 0; }
.glossary > div { padding: 12px 0; border-top: 2px solid var(--line); display: grid; gap: 2px; }
.glossary > div:first-child { border-top: 0; }
@media (min-width: 640px) { .glossary > div { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 16px; } }
.glossary dt { font-weight: 800; color: var(--redwood); }
.callout { background: var(--sand); border-radius: 20px; padding: 12px 16px; margin-top: 12px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--redwood); color: var(--cream); }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: #FFE7A8; }
.site-footer__arcs { display: block; width: 100%; height: 22px; }
.site-footer__inner { max-width: var(--max); margin: 0 auto; padding: 34px var(--gutter) calc(34px + var(--findbar-space)); display: grid; gap: 16px; }
.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer__brand svg { width: 52px; height: 52px; flex: none; }
.site-footer__attr { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; }
.site-footer__indep { max-width: 68ch; }
.site-footer__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--cream); font-weight: 800; font-size: 0.875rem; text-decoration: none;
}
.site-footer__links a:hover { background: var(--cream); color: var(--redwood); }
.site-footer__dates { font-weight: 600; font-size: 0.9375rem; }

/* ---------- Pinned mobile "Find your district" bar ---------- */
.findbar { display: none; }
@media (max-width: 767px) {
  :root { --findbar-space: 84px; }
  .findbar {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 50;
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px;
    border-radius: 999px; background: var(--redwood); color: var(--white); border: 2.5px solid var(--cocoa);
    font-weight: 800; font-size: 1.0625rem; text-decoration: none; box-shadow: 0 0 0 3px var(--cream), 0 7px 0 3px rgba(74, 42, 30, 0.22);
  }
  .findbar:hover { color: var(--white); background: var(--cocoa); }
  .findbar__ca { background: var(--white); color: var(--cocoa); border-radius: 999px; padding: 2px 10px; font-size: 0.9375rem; }
  .findbar:focus-visible { outline-color: var(--cocoa); outline-offset: 2px; box-shadow: 0 0 0 5px var(--white); }
}
.site-footer__stripes { height: 18px; background: linear-gradient(var(--sage) 0 6px, var(--poppy) 6px 12px, var(--sun) 12px 18px); border-top: 2.5px solid var(--cocoa); }

/* Race page and about page extras */
.hero__art--small { align-self: end; }
.hero__art--small svg { max-width: 260px; }
@media (max-width: 959px) { .hero__art--small { display: none; } }
.other-races { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1024px) { .other-races { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 36px; } }
.news-grid--stack { grid-template-columns: minmax(0, 1fr) !important; }
.about-hero-wrap { background: var(--cream); }

@media (max-width: 599px) {
  .band { padding: 10px 20px; }
  .band[aria-pressed="false"] .band__meta { display: none; }
  .band[aria-pressed="true"] { flex-direction: column; align-items: flex-start; }
}
.prose .dates dd { font-weight: 400; }
.prose .dates { margin-top: 12px; }

/* ---------- Privacy and cookie policies ----------
 * Same cream hero and rounded white cards as the about page. Each section
 * wears a rainbow stripe, lists use the low-sun bullet and the contents are
 * pills. launch.css loads after this file, so overrides are scoped to .policy.
 */
.policy-effective {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px;
  min-height: 44px; max-width: 100%; padding: 6px 20px; border-radius: 999px;
  background: var(--white); border: 2.5px solid var(--cocoa); font-weight: 800; font-size: 0.9375rem; line-height: 1.25;
}
.policy-effective::before {
  content: ""; flex: none; width: 20px; height: 10px; border-radius: 20px 20px 0 0;
  background: var(--sun); box-shadow: 0 0 0 2px var(--cocoa);
}
.policy-effective time { color: var(--redwood); }

.policy-toc { display: grid; justify-items: center; gap: 4px; width: 100%; margin-top: 4px; }
.policy-toc__label { font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; }
.policy .policy-toc ul { justify-content: center; gap: 8px; margin: 4px 0 0; }
.policy .policy-toc a {
  justify-content: center; padding: 0 16px; border-radius: 999px; border: 2.5px solid var(--cocoa);
  background: var(--white); color: var(--cocoa); font-weight: 800; font-size: 0.875rem; line-height: 1.15; text-decoration: none; text-align: center;
}
.policy .policy-toc a:hover { background: var(--sun); color: var(--band-ink); }

.prose.policy-doc { max-width: 760px; }
.policy .policy-section { position: relative; overflow: hidden; padding-top: calc(clamp(20px, 3.4vw, 34px) + 12px); scroll-margin-top: 16px; }
.policy-section::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 12px; border-bottom: 2px solid var(--cocoa);
  background: linear-gradient(90deg, var(--sage) 0 25%, var(--poppy) 25% 50%, var(--sun) 50% 75%, var(--redwood) 75%);
}
.policy .policy-section ul { list-style: none; padding-left: 0; gap: 10px; margin-top: 12px; }
.policy .policy-section li + li { margin-top: 0; }
.policy-section li { position: relative; padding-left: 30px; }
.policy-section li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 18px; height: 9px; border-radius: 18px 18px 0 0;
  background: var(--sun); box-shadow: 0 0 0 2px var(--cocoa);
}
.policy-section code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875em; font-weight: 600;
  background: var(--sand); border: 2px solid var(--line); border-radius: 8px; padding: 0 0.35em; overflow-wrap: anywhere;
}

.policy .policy-list { gap: 10px; margin-top: 12px; }
.policy-list > div { display: grid; gap: 8px; background: var(--sand); border-radius: 20px; padding: 14px 16px; min-width: 0; }
.policy-list dt { min-width: 0; }
.policy-list dt code {
  display: inline-block; max-width: 100%; padding: 3px 12px; border: 0; border-radius: 999px;
  background: var(--redwood); color: var(--white); font-size: 0.875rem; font-weight: 700; line-height: 1.35;
}
.policy .policy-list dd { margin: 0; }

probo-settings-link.policy-settings:defined {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0 8px 6px 0; padding: 0 18px; border-radius: 999px;
  background: var(--redwood); border: 2.5px solid var(--redwood); color: var(--white); font-weight: 800; font-size: 0.9375rem; text-decoration: none;
}
probo-settings-link.policy-settings:defined:hover { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }

/* Footer legal line: last row of the footer, so the pinned mobile find bar's
   reserved space (--findbar-space) sits below it rather than over it. */
.site-footer .legal-links { gap: 0 6px; padding-top: 10px; border-top: 2px solid rgba(251, 239, 217, 0.45); font-weight: 800; font-size: 0.9375rem; }
.site-footer .legal-links a,
.site-footer .legal-links probo-settings-link:defined { padding: 0 6px; color: var(--cream); }
.site-footer .legal-links a:hover,
.site-footer .legal-links probo-settings-link:defined:hover { color: #FFE7A8; }
.site-footer .legal-links__sep { display: inline-flex; align-items: center; font-size: 0; }
.site-footer .legal-links__sep::before {
  content: ""; width: 14px; height: 7px; border-radius: 14px 14px 0 0; background: var(--sun); box-shadow: 0 0 0 1.5px var(--cocoa);
}
