/*
 * New York Money Trail — Art Deco design prototype.
 * Producer: hand-authored for designs/newyorkmoneytrail (index, race, about).
 * Genre: sunburst fans, stepped (ziggurat) frames, gold double rules,
 * wide-spaced caps, symmetrical masthead. Navy and gold with stone body.
 * Reading text, tables and amounts stay plain Lora/Josefin on stone.
 */

:root {
  --night: #12243D;
  --deep: #1B3557;
  --gold: #D4AF5A;        /* gold on navy only */
  --gold-rule: #B18A35;   /* decorative rules only (fails as text on stone) */
  --gold-text: #7E5E1C;   /* gold text on stone/panel/white */
  --stone: #EEEAE3;
  --panel: #E4DFD4;
  --card: #F6F3EE;
  --ink: #15202E;
  --mist: #C9CFD8;        /* muted text on navy */
  --hair: #C9C2B4;        /* decorative hairlines */
  --pro: #1D5E4A;
  --anti: #8A4B00;
  --pro-dark: #6FC2A8;
  --anti-dark: #F2B26B;
  --ph-bg: #F6E9C6;
  --ph-ink: #4A3610;
  --ph-bg-dark: #24406A;
  --ph-ink-dark: #F4E2AE;
  --display: "Limelight", "Poiret One", Georgia, serif;
  --caps: "Josefin Sans", "Century Gothic", "Avenir Next", Arial, sans-serif;
  --read: "Lora", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background-color: var(--panel);
  background-image: repeating-linear-gradient(90deg, transparent 0 23px, rgba(18, 36, 61, 0.05) 23px 24px);
  color: var(--ink);
  font-family: var(--read);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { margin: 0; font-weight: 400; 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(--deep); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-text); }
.on-dark a { color: var(--gold); }
.on-dark a:hover { color: var(--stone); }
b, strong { font-weight: 700; }

.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(--gold-text); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--gold); }

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

/* Placeholder: pale gold tint with a dashed gold underline. */
.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  border-bottom: 2px dashed var(--gold-text);
  padding: 0 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  overflow-wrap: anywhere;
}
p.ph, div.ph {
  border: 1.5px dashed var(--gold-text);
  padding: 0.6em 0.8em;
}
a.ph { text-decoration: none; color: var(--ph-ink); }
a.ph:hover { color: var(--ph-ink); background: #F0DDA8; }
.on-dark .ph { background: var(--ph-bg-dark); color: var(--ph-ink-dark); border-color: var(--gold); }

/* ---------- Skip link and preview bar ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--night); padding: 12px 18px;
  font-family: var(--caps); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; color: var(--night); outline-color: var(--night); }

.preview-bar {
  background: var(--night);
  color: var(--mist);
  border-bottom: 1px solid var(--gold-rule);
  text-align: center;
  font-family: var(--caps);
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding: 10px var(--gutter);
}
.preview-bar strong { color: var(--gold); text-transform: uppercase; letter-spacing: 0.16em; }

/* ---------- Masthead ---------- */
.masthead { position: relative; overflow: hidden; background: var(--deep); color: var(--stone); }
.masthead__fan {
  position: absolute; left: 50%; top: -260px; width: 1100px; height: 1100px;
  margin-left: -550px; opacity: 0.16; pointer-events: none;
}
.masthead__top {
  position: relative; max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--caps); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mist);
}
.masthead__top .stars { color: var(--gold); letter-spacing: 0.5em; }
.masthead__brand { position: relative; display: flex; justify-content: center; padding: 22px var(--gutter) 18px; }
.brand {
  display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 24px);
  color: var(--stone); text-decoration: none; min-height: 44px; min-width: 0;
}
.on-dark .brand, .brand:hover { color: var(--stone); }
.brand__mark { width: clamp(52px, 6vw, 80px); height: auto; flex: none; box-shadow: 0 0 0 1.5px var(--gold); }
.brand__name { display: flex; flex-direction: column; align-items: center; line-height: 1; min-width: 0; }
.brand__state {
  font-family: var(--display); font-size: clamp(1.75rem, 5.2vw, 4.25rem);
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.brand__rule {
  display: block; align-self: stretch; height: 2px; background: var(--gold);
  box-shadow: 0 5px 0 var(--gold); margin: 0.5em 0 calc(0.5em + 5px);
}
.brand__trail {
  font-family: var(--caps); font-weight: 600; font-size: clamp(0.78rem, 1.5vw, 1.25rem);
  letter-spacing: 0.5em; margin-right: -0.5em; text-transform: uppercase; color: var(--gold); white-space: nowrap;
}

.masthead__nav { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.masthead__rule { height: 2px; background: var(--gold); box-shadow: 0 5px 0 var(--gold); margin-bottom: 5px; }
.navrow { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px clamp(8px, 2vw, 28px); padding: 12px 0 14px; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(6px, 2.4vw, 32px); }
#site-nav a,
.nav-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.2em 12px 0;
  font-family: var(--caps); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--stone); text-decoration: none;
}
#site-nav a:hover { color: var(--gold); }
#site-nav a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.55em; }
.nav-button { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); cursor: pointer; }
.nav-button:hover { background: var(--gold); color: var(--night); }
.regions-toggle::after { content: "▾"; margin-left: 0.6em; display: inline-block; transition: transform 0.2s ease; }
.regions-toggle[aria-expanded="true"] { background: var(--gold); color: var(--night); }
.regions-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

@media (max-width: 767px) {
  .masthead__top { display: none; }
  .masthead__fan { top: -420px; }
  .navrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .navrow > nav { grid-column: 1 / -1; }
  #site-nav ul { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--gold-rule); }
  #site-nav li { border-bottom: 1px solid var(--gold-rule); }
  #site-nav a { width: 100%; }
}

/* ---------- Regions bar (disclosure under the masthead) ---------- */
.regionbar { background: var(--night); color: var(--stone); border-top: 1px solid var(--gold-rule); border-bottom: 4px double var(--gold); }
.regionbar__inner {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 28px;
  display: grid; gap: 16px; justify-items: center; text-align: center;
}
.regionbar__label { font-family: var(--caps); font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.regionbar__note { font-style: italic; font-size: 0.9375rem; color: var(--mist); max-width: 68ch; }
.regionbar__note strong { color: var(--stone); font-style: normal; }

.jump { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; }
.jump label { font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); padding-top: 0.2em; }
.jump__field { display: flex; align-items: stretch; border: 1.5px solid var(--gold); background: var(--deep); }
.jump__prefix { display: flex; align-items: center; padding: 0.15em 2px 0 14px; font-family: var(--caps); font-weight: 700; letter-spacing: 0.08em; color: var(--stone); }
.jump input {
  width: 5.5em; min-height: 46px; border: 0; background: transparent; color: var(--stone);
  font-family: var(--read); font-size: 1.0625rem; padding: 0 10px 0 4px; border-radius: 0;
}
.jump input::placeholder { color: var(--mist); opacity: 1; }
.jump input[aria-invalid="true"] { box-shadow: inset 0 -3px 0 var(--anti-dark); }
.jump button {
  min-height: 46px; padding: 0.2em 20px 0; border: 0; background: var(--gold); color: var(--night); cursor: pointer;
  font-family: var(--caps); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.8125rem;
}
.jump button:hover { background: var(--stone); }
.jump__error { flex-basis: 100%; color: var(--anti-dark); font-size: 0.9375rem; }

.regions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1100px; }
.regions button {
  min-height: 44px; padding: 0.25em 14px 0; cursor: pointer;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  background: transparent; color: var(--stone); border: 1.5px solid var(--gold-rule);
}
.regions button:hover { border-color: var(--gold); color: var(--gold); }
.regions button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--night); }
.regions button[aria-pressed="true"]::before { content: "✦ "; }
.region-empty {
  max-width: 60ch; border: 1.5px dashed var(--gold); padding: 12px 16px; color: var(--stone); font-size: 0.9375rem;
}
.region-list-nojs { color: var(--mist); font-size: 0.9375rem; max-width: 70ch; }

.districts { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
.districts a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px;
  border: 1.5px solid var(--gold-rule); color: var(--stone); text-decoration: none;
  font-family: var(--display); font-size: 1.375rem; line-height: 1;
}
.districts a .st { font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.2em; color: var(--gold); padding-left: 0.2em; }
.districts a:hover { border-color: var(--gold); background: var(--deep); color: var(--stone); }
.districts a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--night); outline: 1.5px solid var(--gold); outline-offset: 3px; }
.districts a[aria-current="page"] .st { color: var(--night); }
@media (min-width: 1024px) { .districts { grid-template-columns: repeat(13, minmax(0, 1fr)); } }

/* Light-ground variant (race page "Other races") */
.districts--light a { border-color: var(--deep); color: var(--night); background: var(--card); }
.districts--light a .st { color: var(--gold-text); }
.districts--light a:hover { background: var(--deep); color: var(--stone); }
.districts--light a:hover .st { color: var(--gold); }
.districts--light a[aria-current="page"] { background: var(--deep); color: var(--gold); border-color: var(--deep); outline-color: var(--deep); }
.districts--light a[aria-current="page"] .st { color: var(--gold); }

/* ---------- Page sheet ---------- */
.sheet {
  max-width: 1344px; margin: clamp(0px, 3vw, 40px) auto; background: var(--stone);
  border: 1.5px solid var(--night); outline: 1px solid var(--gold-rule); outline-offset: 5px;
}
@media (max-width: 767px) {
  .sheet { margin: 0; border-left: 0; border-right: 0; outline: 0; }
}
.band { padding: clamp(28px, 4vw, 52px) var(--gutter); border-bottom: 1.5px solid var(--night); min-width: 0; }
.band:last-child { border-bottom: 0; }
.measure { max-width: 70ch; }

.eyebrow, .kicker {
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-text); padding-top: 0.15em;
}
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; min-width: 0; }
.section-head h2 { font-family: var(--display); font-size: clamp(1.75rem, 3.4vw, 2.6rem); color: var(--night); flex: 0 1 auto; min-width: 0; }
.section-head::after { content: ""; flex: 1 1 32px; height: 2px; background: var(--gold-rule); box-shadow: 0 5px 0 var(--gold-rule); margin-bottom: 5px; }
.section-intro { max-width: 70ch; margin-bottom: 22px; }

/* ---------- Lead ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1.5px solid var(--night); }
@media (min-width: 1024px) {
  .lead { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .lead__main { border-right: 1.5px solid var(--night); }
}
.lead__main { padding: clamp(28px, 4vw, 52px) var(--gutter); display: grid; gap: 18px; min-width: 0; align-content: start; }
.lead h1 { font-family: var(--display); font-size: clamp(2.1rem, 5vw, 4.25rem); line-height: 1.04; color: var(--night); letter-spacing: 0.01em; }
.deck { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.65; max-width: 62ch; }
.leadstory { display: grid; gap: 14px; margin-top: 18px; padding-top: 26px; border-top: 2px solid var(--gold-rule); box-shadow: inset 0 5px 0 var(--stone), inset 0 7px 0 var(--gold-rule); min-width: 0; }
.leadstory h2 { font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.12; color: var(--night); }
.rating { font-family: var(--caps); font-size: 0.8125rem; letter-spacing: 0.08em; }

.latest { background: var(--panel); padding: clamp(28px, 4vw, 44px) clamp(18px, 3vw, 32px); display: grid; gap: 4px; align-content: start; min-width: 0; }
.latest > h2 {
  font-family: var(--caps); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; text-align: center;
  padding: 0.2em 0 14px; margin-bottom: 8px; border-bottom: 2px solid var(--gold-rule); box-shadow: 0 5px 0 var(--panel), 0 7px 0 var(--gold-rule);
}
.latest > h2 .star { color: var(--gold-text); }
.news-date-note { font-size: 0.875rem; font-style: italic; margin-top: 12px; }

.news-item { padding: 16px 0; border-top: 1px solid var(--gold-rule); display: grid; gap: 6px; min-width: 0; }
.latest > h2 + .news-item { border-top: 0; }
.news-item__flag { font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); padding-top: 0.15em; }
.news-item h3 { font-family: var(--display); font-size: 1.375rem; line-height: 1.2; color: var(--night); }
.news-item__meta { font-size: 0.9375rem; font-style: italic; }
.news-item p.ph { font-size: 0.9375rem; }

/* ---------- Evidence cards (stepped ziggurat frame) ---------- */
.evidence {
  --n: 22px;
  position: relative; margin: 0; min-width: 0;
  padding: calc(var(--n) + 16px) clamp(14px, 2.4vw, 24px) 18px;
  color: var(--stone);
  background:
    linear-gradient(var(--gold), var(--gold)) 0 var(--n) / calc(var(--n) + 2px) 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) var(--n) 0 / 2px calc(var(--n) + 2px) no-repeat,
    linear-gradient(var(--gold), var(--gold)) right 0 top var(--n) / calc(var(--n) + 2px) 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right var(--n) top 0 / 2px calc(var(--n) + 2px) no-repeat,
    var(--deep);
  box-shadow: inset 0 0 0 2px var(--gold);
  clip-path: polygon(0 var(--n), var(--n) var(--n), var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% 100%, 0 100%);
}
.evidence::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 72px; height: 12px; margin-left: -36px; background: var(--gold);
  clip-path: polygon(0 100%, 0 66%, 18% 66%, 18% 33%, 36% 33%, 36% 0, 64% 0, 64% 33%, 82% 33%, 82% 66%, 100% 66%, 100% 100%);
}
@media (max-width: 600px) { .evidence { --n: 16px; } .evidence::before { top: 6px; width: 54px; height: 9px; margin-left: -27px; } }
.evidence a { color: var(--gold); }
.evidence a:hover { color: var(--stone); }
.evidence :focus-visible { outline-color: var(--gold); }
.evidence .ph { background: var(--ph-bg-dark); color: var(--ph-ink-dark); border-color: var(--gold); }
.evidence__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
  padding: 0.15em 0 10px; margin-bottom: 14px; border-bottom: 4px double var(--gold);
}
.evidence__lede { font-size: 0.9375rem; line-height: 1.6; color: var(--stone); margin-bottom: 14px; max-width: 70ch; }
.evidence__frame { position: relative; background: #FFFFFF; color: var(--ink); }
.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(--deep)); }
.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; font-size: 0.9375rem; color: var(--mist); }
.evidence__expand {
  margin-top: 14px; min-height: 44px; padding: 0.2em 18px 0; cursor: pointer;
  background: transparent; color: var(--gold); border: 1.5px solid var(--gold);
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.evidence__expand:hover { background: var(--gold); color: var(--night); }

/* Sunburst fan used for pending and loading panels. */
.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(--night) 0 54px, var(--gold-rule) 55px 56px, transparent 57px),
    repeating-conic-gradient(from -90deg at 50% 100%, #24426B 0 5deg, #1D3A5E 5deg 10deg);
}
.evidence[data-state="pending"] .evidence__frame {
  min-height: 180px; display: grid; place-items: center; padding: 28px 18px 76px;
  border: 1.5px solid var(--gold-rule); color: var(--stone);
}
.evidence[data-state="pending"] .evidence__status {
  max-width: 46ch; padding: 14px 18px; text-align: center; font-size: 0.9375rem;
  background: var(--night); color: var(--stone); border: 1.5px solid var(--gold);
}
.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 96px; text-align: center;
  color: var(--stone); font-style: italic; font-size: 0.9375rem;
}

/* ---------- Supports / opposes ---------- */
.pos {
  display: inline-block; padding-top: 6px; line-height: 1.3; white-space: nowrap;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.pos__gloss { font-weight: 400; letter-spacing: 0.1em; }
.pos--support { color: var(--pro); border-top: 6px solid var(--pro); }
.pos--oppose { color: var(--anti); border-top: 1.5px solid var(--anti); padding-top: 10px; }
.on-dark .pos--support { color: var(--pro-dark); border-color: var(--pro-dark); }
.on-dark .pos--oppose { color: var(--anti-dark); border-color: var(--anti-dark); }
.party { color: var(--ink); }

/* ---------- Plain-language box ---------- */
.plain__box {
  position: relative; background: var(--card); border: 1.5px solid var(--night);
  box-shadow: inset 0 0 0 8px var(--card), inset 0 0 0 10px var(--gold-rule);
  padding: clamp(32px, 4vw, 52px) clamp(22px, 4vw, 52px);
}
.plain__box::before, .plain__box::after {
  content: ""; position: absolute; top: -1.5px; width: 22px; height: 22px; background: var(--stone);
  border-bottom: 1.5px solid var(--night);
}
.plain__box::before { left: -1.5px; border-right: 1.5px solid var(--night); }
.plain__box::after { right: -1.5px; border-left: 1.5px solid var(--night); }
.plain__box h2 { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--night); text-align: center; margin-bottom: 12px; }
.plain__lede { text-align: center; max-width: 62ch; margin: 0 auto 26px; font-size: 1.0625rem; }
.plain__three { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.plain__three li { padding: 18px 4px; border-top: 1px solid var(--gold-rule); }
.plain__three h3 {
  font-family: var(--caps); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-text);
  margin-bottom: 6px; padding-top: 0.15em;
}
.plain__three p { font-size: 0.9875rem; }
@media (min-width: 860px) {
  .plain__three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plain__three li { padding: 4px 26px; border-top: 0; border-left: 1px solid var(--gold-rule); }
  .plain__three li:first-child { border-left: 0; padding-left: 0; }
  .plain__three li:last-child { padding-right: 0; }
}

/* ---------- Ledger table ---------- */
.table-wrap { overflow-x: auto; min-width: 0; }
.table-wrap:focus-visible { outline-offset: 2px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.ledger caption { text-align: left; font-style: italic; font-size: 0.9375rem; padding-bottom: 12px; caption-side: top; }
.ledger thead th {
  text-align: left; vertical-align: bottom; padding: 10px 12px 8px; border-bottom: 1.5px solid var(--night);
  font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.ledger td, .ledger tbody th { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--hair); font-weight: 400; }
.ledger tbody th[scope="row"] { font-weight: 500; }
.ledger .group th {
  padding: 18px 12px 6px; border-bottom: 0; text-align: left;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text);
}
.ledger .amount { font-variant-numeric: tabular-nums; }
.ledger .norecord { font-style: italic; }
.ledger td, .ledger th, .ledger .ph { overflow-wrap: break-word; }
@media (min-width: 721px) { .ledger { min-width: 860px; } }
@media (max-width: 720px) {
  .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; }
  .ledger tbody tr:not(.group) { background: var(--card); border: 1.5px solid var(--night); margin-bottom: 12px; padding: 4px 14px; }
  .ledger tbody tr:not(.group) td, .ledger tbody tr:not(.group) th {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 10px 0;
  }
  .ledger tbody tr:not(.group) > :last-child { border-bottom: 0; }
  .ledger .cell { min-width: 0; }
  .ledger td::before, .ledger tbody tr:not(.group) th::before {
    content: attr(data-label); padding-top: 0.15em;
    font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-text);
  }
  .ledger .group th { padding: 14px 0 8px; }
}

/* ---------- Outside money layout ---------- */
.money__profile { display: grid; gap: 22px; margin-top: 36px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .money__profile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; } }
.money__profile h3, .subhead { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--night); margin-bottom: 10px; }

/* ---------- Data-state key ---------- */
.key { display: grid; gap: 10px; }
.key > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 0; border-top: 1px solid var(--gold-rule); }
@media (min-width: 640px) { .key > div { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 16px; } }
.key dt { font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); padding-top: 0.2em; }
.key dd { font-size: 0.9375rem; }
.chip-loading { display: inline-block; padding: 2px 10px; background: var(--deep); color: var(--stone); font-style: italic; }
.chip-unavailable { display: inline-block; padding: 1px 9px; border: 1.5px solid var(--anti); color: var(--anti); }
.on-dark .key dt { color: var(--gold); }
.on-dark .key > div { border-color: var(--gold-rule); }
.on-dark .chip-loading { background: var(--stone); color: var(--night); }
.on-dark .chip-unavailable { border-color: var(--anti-dark); color: var(--anti-dark); }

/* ---------- Closing trio ---------- */
.trio { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--night); color: var(--stone); }
.trio > section { padding: clamp(26px, 3.6vw, 44px) var(--gutter); border-top: 1px solid var(--gold-rule); min-width: 0; }
.trio > section:first-child { border-top: 0; }
@media (min-width: 1024px) {
  .trio { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.9fr); }
  .trio > section { border-top: 0; border-left: 1px solid var(--gold-rule); padding: 40px 32px; }
  .trio > section:first-child { border-left: 0; padding-left: var(--gutter); }
}
.trio h2 { font-family: var(--caps); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; padding-top: 0.15em; }
.trio p, .trio li { font-size: 0.9375rem; }
.trio ul { padding-left: 1.1em; display: grid; gap: 6px; }
.trio li::marker { content: "✦  "; color: var(--gold); font-size: 0.7em; }
.trio .trio__sub { font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 22px 0 10px; padding-top: 0.15em; }
.trio .key > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.trio .legend-pos { margin: 0 0 10px; }
.key-head { margin-top: 30px; }
.trio .more { margin-top: 14px; font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.trio .more a { display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- Race page ---------- */
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; font-family: var(--caps); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--gold-text); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding-top: 0.15em; }
.crumbs [aria-current="page"] { font-weight: 700; padding-top: 0.15em; }
.racehead { text-align: center; display: grid; gap: 14px; justify-items: center; }
.racehead h1 { font-family: var(--display); font-size: clamp(2rem, 4.6vw, 3.75rem); color: var(--night); max-width: 22ch; line-height: 1.08; }
.racehead__rule { width: min(560px, 80%); height: 2px; background: var(--gold-rule); box-shadow: 0 5px 0 var(--gold-rule); margin: 4px 0 10px; }
.notice { border: 1.5px solid var(--anti); background: #FBF1E4; color: var(--ink); padding: 10px 16px; max-width: 64ch; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); border: 1.5px solid var(--night); width: 100%; max-width: 1100px; text-align: left; background: var(--card); }
.facts > div { padding: 12px 18px; border-top: 1px solid var(--gold-rule); min-width: 0; }
.facts > div:first-child { border-top: 0; }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(2) { border-top: 0; }
  .facts > div:nth-child(even) { border-left: 1px solid var(--gold-rule); }
}
@media (min-width: 1100px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts > div { border-top: 0; border-left: 1px solid var(--gold-rule); }
  .facts > div:first-child { border-left: 0; }
}
.facts dt { font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); padding-top: 0.15em; }
.facts dd { font-size: 1rem; }

.race-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 1024px) {
  .race-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 44px; }
  .race-summary { position: sticky; top: 24px; }
}
.race-summary { display: grid; gap: 14px; min-width: 0; }
.race-summary h2 { font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--night); }
.howto { font-size: 0.9375rem; border-top: 1px solid var(--gold-rule); padding-top: 14px; }
.howto h3 { font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 6px; padding-top: 0.15em; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 960px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }

.funding { display: grid; gap: 16px; }
.funding details { border: 1.5px solid var(--night); background: var(--card); }
.funding summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 18px;
  font-size: 1.0625rem;
}
.funding summary::-webkit-details-marker { display: none; }
.funding summary::before {
  content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border: 1.5px solid var(--night); font-family: var(--read); font-size: 1.25rem; font-weight: 500; line-height: 1;
}
.funding details[open] summary::before { content: "–"; background: var(--deep); color: var(--gold); border-color: var(--deep); }
.funding details[open] summary { border-bottom: 1.5px solid var(--night); }
.funding .evidence { margin: 18px; }
@media (max-width: 600px) { .funding .evidence { margin: 12px 8px; } }
.summary__label { font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); display: block; padding-top: 0.15em; }

.dates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1.5px solid var(--night); background: var(--card); }
.dates > div { padding: 14px 18px; border-top: 1px solid var(--gold-rule); }
.dates > div:first-child { border-top: 0; }
@media (min-width: 860px) {
  .dates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dates > div { border-top: 0; border-left: 1px solid var(--gold-rule); }
  .dates > div:first-child { border-left: 0; }
}
.dates dt { font-family: var(--caps); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); padding-top: 0.15em; }
.dates dd { font-size: 1rem; }
.dates dd small { display: block; font-size: 0.875rem; font-style: italic; }

/* ---------- About page ---------- */
.about-head { text-align: center; display: grid; gap: 14px; justify-items: center; }
.about-head h1 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 4rem); color: var(--night); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: 24px; align-self: start; }
}
.toc { border: 1.5px solid var(--night); background: var(--card); padding: 18px 20px; }
.toc h2 { font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 8px; padding-top: 0.15em; }
.toc ol { padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; border-top: 1px solid var(--hair); }
.toc li:first-child { border-top: 0; }
.toc a { display: flex; gap: 10px; align-items: center; min-height: 44px; text-decoration: none; font-size: 0.9375rem; }
.toc a::before { content: counter(toc, upper-roman); font-family: var(--caps); font-size: 0.75rem; font-weight: 700; color: var(--gold-text); min-width: 2.2em; letter-spacing: 0.08em; }
.toc a:hover { text-decoration: underline; }
.prose { display: grid; gap: 0; min-width: 0; }
.prose > section { padding: 0 0 34px; margin-bottom: 34px; border-bottom: 1px solid var(--gold-rule); max-width: 70ch; }
.prose > section:last-child { border-bottom: 0; margin-bottom: 0; }
.prose h2 { font-family: var(--display); font-size: clamp(1.6rem, 2.8vw, 2.2rem); color: var(--night); margin-bottom: 12px; }
.prose h3 { font-family: var(--caps); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text); margin: 18px 0 6px; padding-top: 0.15em; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose .dates, .prose .legend-pos { margin-top: 14px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; margin-top: 10px; }
.prose li::marker { color: var(--gold-text); }
.roles { list-style: none; padding: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 !important; border: 1.5px solid var(--night); margin-top: 16px !important; }
.roles li { padding: 12px 16px; border-top: 1px solid var(--gold-rule); background: var(--card); }
.roles li:first-child { border-top: 0; }
@media (min-width: 700px) {
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roles li:nth-child(2) { border-top: 0; }
  .roles li:nth-child(even) { border-left: 1px solid var(--gold-rule); }
}
.roles b { font-family: var(--caps); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); display: block; padding-top: 0.15em; }
.legend-pos { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 14px; }
.glossary { display: grid; gap: 0; border-top: 1.5px solid var(--night); }
.glossary > div { padding: 14px 0; border-bottom: 1px solid var(--gold-rule); display: grid; gap: 4px; }
@media (min-width: 700px) { .glossary > div { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 20px; } }
.glossary dt { font-family: var(--display); font-size: 1.2rem; color: var(--night); line-height: 1.25; }
.glossary dd { font-size: 1rem; }
.callout { border-left: 6px solid var(--deep); background: var(--card); padding: 14px 18px; margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--stone); border-top: 4px double var(--gold); text-align: center; }
.site-footer__inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 36px; display: grid; gap: 18px; justify-items: center; }
.site-footer__mark { width: 56px; height: 56px; box-shadow: 0 0 0 1.5px var(--gold); }
.site-footer__attr { font-family: var(--caps); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); padding-top: 0.15em; }
.site-footer__indep { max-width: 62ch; font-size: 0.9375rem; color: var(--mist); }
.site-footer__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; }
.site-footer__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.15em 10px 0;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.site-footer__rule { width: min(520px, 90%); height: 2px; background: var(--gold-rule); box-shadow: 0 5px 0 var(--gold-rule); margin-bottom: 5px; }
.site-footer__dates { font-size: 0.875rem; color: var(--mist); }

/* Ledger column proportions at table widths */
@media (min-width: 721px) {
  .ledger thead th:nth-child(1) { width: 19%; }
  .ledger thead th:nth-child(2) { width: 14%; }
  .ledger thead th:nth-child(3) { width: 18%; }
  .ledger thead th:nth-child(4) { width: 8%; }
  .ledger thead th:nth-child(5) { width: 16%; }
  .ledger thead th:nth-child(6) { width: 14%; }
  .ledger thead th:nth-child(7) { width: 11%; }
}

/* Compact region filter and district tiles on phones */
@media (max-width: 600px) {
  .regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .regions button { padding: 0.3em 8px 0.15em; letter-spacing: 0.06em; line-height: 1.25; font-size: 0.6875rem; }
  .regions button[data-region="all"] { grid-column: 1 / -1; }
  .districts { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .districts a { min-height: 52px; font-size: 1.25rem; }
}

/* ---------- Privacy and cookie policies ----------
 * Same sheet, heading and data-desk grid as the about page. Sections carry
 * upper-roman numerals that match the contents box; storage keys sit on navy
 * plates. launch.css loads after this file, so overrides are scoped to .sheet.
 */
.policy-effective {
  display: inline-block; max-width: 100%; margin-top: 4px; padding: 0.6em 18px 0.45em;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--night); background: var(--card); text-align: center;
  border: 1.5px solid var(--night); outline: 1px solid var(--gold-rule); outline-offset: 4px;
}
.policy-effective::before, .policy-effective::after { content: "✦"; content: "✦" / ""; color: var(--gold-text); letter-spacing: 0; }
.policy-effective::before { margin-right: 0.8em; }
.policy-effective::after { margin-left: 0.8em; }
.policy-effective time { color: var(--gold-text); }

.policy-toc { border: 1.5px solid var(--night); background: var(--card); padding: 18px 20px; min-width: 0; }
@media (min-width: 1024px) { .policy-toc { position: sticky; top: 24px; align-self: start; } }
.policy-toc__label {
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: 8px; padding-top: 0.15em;
}
.sheet .policy-toc ul { display: block; margin: 0; padding: 0; list-style: none; counter-reset: policy-toc; }
.policy-toc li { counter-increment: policy-toc; border-top: 1px solid var(--hair); }
.policy-toc li:first-child { border-top: 0; }
.sheet .policy-toc a { display: flex; gap: 10px; align-items: center; min-height: 44px; text-decoration: none; font-size: 0.9375rem; line-height: 1.35; }
.policy-toc a::before {
  content: counter(policy-toc, upper-roman); flex: none; min-width: 2.4em;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-text);
}
.policy-toc a:hover { text-decoration: underline; }

.policy-doc { counter-reset: policy; }
.policy-section { counter-increment: policy; scroll-margin-top: 24px; }
.policy-section h2::before {
  content: counter(policy, upper-roman); content: counter(policy, upper-roman) / "";
  display: block; margin-bottom: 10px;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.24em; color: var(--gold-text);
}
.policy-section h2::after {
  content: ""; display: block; width: 72px; height: 2px; margin: 14px 0 5px;
  background: var(--gold-rule); box-shadow: 0 5px 0 var(--gold-rule);
}
.prose .policy-section li + li { margin-top: 0; }
.policy-section li { padding-left: 0.3em; }
.policy-section li::marker { content: "✦"; color: var(--gold-text); font-size: 0.8em; }
.policy-section code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875em;
  background: var(--card); border: 1px solid var(--hair); padding: 0.05em 0.35em; overflow-wrap: anywhere;
}

.sheet .policy-list { gap: 0; margin-top: 16px; border-top: 1.5px solid var(--night); }
.policy-list > div { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--gold-rule); min-width: 0; }
@media (min-width: 760px) { .policy-list > div { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 20px; } }
.policy-list dt { min-width: 0; }
.policy-list dt code {
  display: inline-block; max-width: 100%; padding: 0.3em 0.6em; font-size: 0.875rem; line-height: 1.4;
  background: var(--deep); color: var(--gold); border: 0; box-shadow: inset 0 0 0 1px var(--gold-rule);
}
.sheet .policy-list dd { margin: 0; font-size: 1rem; }

probo-settings-link.policy-settings:defined {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0 10px 4px 0; padding: 0.2em 18px 0;
  border: 1.5px solid var(--night); background: var(--card); color: var(--night); text-decoration: none;
  font-family: var(--caps); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
probo-settings-link.policy-settings:defined:hover { background: var(--deep); color: var(--gold); }

/* Footer legal line: a hairline strip under the colophon, gold on night. */
.site-footer .legal-links {
  justify-content: center; gap: 0 4px; margin: 0; padding: 6px var(--gutter) 16px;
  border-top: 1px solid var(--gold-rule);
  font-family: var(--caps); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.site-footer .legal-links a,
.site-footer .legal-links probo-settings-link:defined { padding: 0.15em 10px 0; color: var(--gold); }
.site-footer .legal-links a:hover,
.site-footer .legal-links probo-settings-link:defined:hover { color: var(--stone); }
.site-footer .legal-links__sep { display: inline-flex; align-items: center; font-size: 0; color: var(--gold-rule); }
.site-footer .legal-links__sep::before { content: "✦"; font-size: 0.625rem; }
.site-footer .legal-links probo-settings-link:defined::before { content: "✦"; content: "✦" / ""; margin-right: 14px; font-size: 0.625rem; color: var(--gold-rule); }
