/*
 * Maine Money Trail: nautical chart.
 * Neat-line borders with alternating ticks, italic water labels, monospace
 * figures, a compass rose, charting magenta for race markers, a legend box and
 * insets. Reading text stays in Crimson Pro at 19px or larger on light grounds.
 */
:root {
  --navy: #193D50;
  --pine: #214D3A;
  --magenta: #A3216B;
  --shallow: #CFE0E4;
  --land: #E9DDBE;
  --paper: #F4F0E2;
  --deep: #FBF9F2;
  --ink: #1C2B33;
  --water: #2F5A6B;
  --card: #FFFFFF;
  --support: #3E3A8C;
  --oppose: #8A4B00;
  --ph-bg: #F1E2EC;
  --rule: 1px solid var(--navy);
  --f-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-text: "Crimson Pro", "Crimson Text", Georgia, "Times New Roman", serif;
  --f-mono: "DM Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 66ch;
  --ticks: repeating-linear-gradient(90deg, var(--navy) 0 24px, var(--paper) 24px 48px);
  --ticks-v: repeating-linear-gradient(180deg, var(--navy) 0 24px, var(--paper) 24px 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-text); font-size: 1.1875rem; line-height: 1.6;
}
@media (min-width: 1024px) { body { font-size: 1.25rem; } }
svg { max-width: 100%; }
p { margin: 0 0 0.75em; }
p:last-child { margin-bottom: 0; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--magenta); text-decoration-thickness: 2px; }
h1, h2, h3 {
  font-family: var(--f-display); font-weight: 700; line-height: 1.05; color: var(--navy);
  margin: 0; overflow-wrap: break-word; text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 1.35rem + 1.9vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.65rem); }

/* ---------- Required behaviour ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--paper);
  font: 500 1rem/1.2 var(--f-mono); padding: 12px 16px;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; color: var(--paper); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }
.preview-bar :focus-visible, .marker--senate:focus-visible, .switch button[aria-pressed="true"]:focus-visible { outline-color: var(--magenta); box-shadow: 0 0 0 6px var(--paper); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Placeholder: pencilled chart correction ---------- */
.ph {
  background: var(--ph-bg); color: var(--ink);
  border-bottom: 2px dotted var(--magenta); padding: 0 0.2em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  overflow-wrap: anywhere; font-style: normal;
}
p.ph, div.ph { display: block; border: 1px dashed var(--magenta); padding: 0.45em 0.7em; }
a.ph { text-decoration: none; }

/* ---------- Preview bar and chart sheet ---------- */
.preview-bar {
  background: var(--navy); color: var(--paper); text-align: center;
  font: 400 0.875rem/1.5 var(--f-mono); padding: 9px var(--gutter);
}
.preview-bar strong { font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.sheet { background: var(--paper); max-width: 1320px; margin: 0 auto; }
.ticks { height: 9px; background: var(--ticks); border-top: var(--rule); border-bottom: var(--rule); }
@media (min-width: 1024px) {
  .sheet {
    width: calc(100% - 72px); margin: 40px auto 48px;
    border: 2px solid var(--navy); box-shadow: 0 0 0 8px var(--paper), 0 0 0 10px var(--navy);
  }
}

/* ---------- Header ---------- */
.masthead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding: 12px var(--gutter); border-bottom: var(--rule);
}
.logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; text-decoration: none; color: var(--navy); }
.logo:hover { color: var(--navy); }
.logo:hover .logo__name { text-decoration: underline; text-decoration-thickness: 1px; }
.logo__mark { width: clamp(40px, 9vw, 52px); height: auto; flex: none; display: block; }
.logo__text { font-family: var(--f-display); font-weight: 700; line-height: 1; font-size: clamp(1.25rem, 0.9rem + 1.6vw, 1.75rem); letter-spacing: 0.04em; }
.logo__state { color: var(--navy); text-transform: uppercase; }
.logo__name { color: var(--pine); font-style: italic; font-weight: 600; }
@media (max-width: 479px) { .logo__state, .logo__name { display: block; } }
.menu-button {
  min-height: 44px; min-width: 44px; padding: 8px 14px; cursor: pointer;
  background: var(--paper); color: var(--navy); border: var(--rule);
  font: 700 1.125rem/1 var(--f-display); letter-spacing: 0.04em;
}
.menu-button[aria-expanded="true"] { background: var(--navy); color: var(--paper); }
#site-nav { min-width: 0; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
#site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 4px 9px;
  font: 600 1.25rem/1.1 var(--f-display); text-decoration: none; color: var(--navy);
  border-bottom: 3px solid transparent;
}
#site-nav a:hover { color: var(--magenta); border-bottom-color: var(--magenta); }
#site-nav a[aria-current="page"] { border-bottom-color: var(--magenta); font-weight: 700; }
@media (max-width: 767px) {
  #site-nav { flex-basis: 100%; }
  .js #site-nav ul { flex-direction: column; border-top: var(--rule); }
  .js #site-nav li + li { border-top: 1px dotted var(--navy); }
  .js #site-nav a { padding: 10px 2px; border-bottom: 0; border-left: 4px solid transparent; }
  .js #site-nav a[aria-current="page"] { border-left-color: var(--magenta); padding-left: 10px; }
}

/* ---------- Shared bits ---------- */
.label {
  font: 500 0.8125rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); margin: 0;
}
.section { padding: clamp(28px, 5vw, 52px) var(--gutter); border-bottom: var(--rule); }
.section-head { margin-bottom: 18px; max-width: var(--measure); }
.section-head h2 { margin: 4px 0 8px; }
.prose { max-width: var(--measure); }
.water-label { font-family: var(--f-display); font-style: italic; color: var(--water); letter-spacing: 0.2em; }
.more-link { display: inline-flex; align-items: center; gap: 0.35em; min-height: 44px; font-weight: 600; }
.mono { font-family: var(--f-mono); font-size: 0.875em; }

/* ---------- Chart hero (homepage) ---------- */
.chart-hero { display: grid; border-bottom: var(--rule); }
@media (min-width: 1024px) { .chart-hero { grid-template-columns: minmax(0, 1fr) 340px; } }
.chart {
  position: relative; overflow: hidden; display: grid; gap: 14px;
  padding: 30px 18px 22px 26px; background: var(--deep); min-width: 0;
}
.chart::before, .chart::after { content: ""; position: absolute; z-index: 2; }
.chart::before { left: 0; right: 0; top: 0; height: 9px; background: var(--ticks); border-bottom: var(--rule); }
.chart::after { top: 0; bottom: 0; left: 0; width: 9px; background: var(--ticks-v); border-right: var(--rule); }
.chart__art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.chart > :not(.chart__art) { position: relative; z-index: 1; }
.cartouche {
  background: var(--paper); border: var(--rule); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--navy);
  padding: 16px 18px 18px; max-width: 34rem; margin: 5px; display: flex; flex-direction: column; gap: 8px;
}
.cartouche h1 { font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.5rem); line-height: 1; }
.cartouche p:not(.label) { font-size: 1.125rem; line-height: 1.55; }
.marker {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 9px 14px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--magenta);
  font: 700 1.3125rem/1.1 var(--f-display); text-decoration: none;
}
.marker svg { flex: none; }
.marker:hover { background: var(--card); color: var(--magenta); }
.marker small { font: 400 0.8125rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.marker--senate { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.marker--senate:hover { background: var(--ink); color: var(--paper); }
.chart__water { display: none; }
@media (min-width: 700px) {
  .chart {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(40px, 1fr) auto auto;
    min-height: 600px; padding: 40px 34px 26px 46px; gap: 18px 24px;
  }
  .chart .cartouche { grid-column: 1; grid-row: 1; }
  .chart .marker--senate { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .chart .marker--d2 { grid-column: 1; grid-row: 2; justify-self: start; align-self: center; margin-left: 14%; }
  .chart .marker--d1 { grid-column: 1 / 3; grid-row: 3; justify-self: center; }
  .chart .chart__water { display: block; grid-column: 1 / 3; grid-row: 4; justify-self: end; margin: 6px 4% 0 0; font-size: 1.375rem; }
}
.legend { background: var(--paper); padding: 22px var(--gutter) 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 1024px) { .legend { border-left: var(--rule); padding: 24px 24px 28px; } }
.legend h2 { font-size: 1.75rem; border-bottom: var(--rule); padding-bottom: 6px; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legend li { display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; line-height: 1.35; }
.legend__sym { flex: none; width: 22px; display: inline-grid; place-items: center; }
.legend__sym--snd { font: italic 600 1.125rem/1 var(--f-display); color: var(--water); }
.legend__note { border-top: var(--rule); padding-top: 12px; font-size: 1.0625rem; line-height: 1.5; }
.legend__note--em { font-style: italic; border-top: 0; padding-top: 0; }
.legend__races { border-top: var(--rule); padding-top: 12px; }
.legend__races p { font-size: 1.0625rem; margin-bottom: 4px; }
.legend__races ul { gap: 0; }
.legend__races a { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }

/* ---------- Supports / opposes: day-marks ---------- */
.pos { display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap; font: 600 1.0625rem/1.2 var(--f-text); padding: 2px 9px 2px 7px; border: 1.5px solid currentColor; background: var(--card); }
.pos__sym { font-size: 0.8em; line-height: 1; }
.pos--support { color: var(--support); }
.pos--oppose { color: var(--oppose); }

/* ---------- Inset A and evidence cards ---------- */
.inset-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .inset-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
  .inset-grid > aside { position: sticky; top: 16px; }
}
.inset-grid > * { min-width: 0; }
.switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.switch button {
  min-height: 44px; padding: 8px 14px; cursor: pointer;
  background: var(--paper); color: var(--navy); border: var(--rule);
  font: 500 0.9375rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.switch button:hover { background: var(--shallow); }
@media (max-width: 479px) { .switch button { flex: 1 1 auto; padding: 8px 8px; font-size: 0.8125rem; } }
.switch button[aria-pressed="true"] { background: var(--navy); color: var(--paper); box-shadow: inset 0 -4px 0 var(--magenta); }
[data-switch] > figure + figure { margin-top: 26px; }
.evidence {
  margin: 8px; background: var(--card); border: 2px solid var(--navy);
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--navy);
  display: flex; flex-direction: column; min-width: 0;
}
.evidence__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px;
  padding: 9px 12px; border-bottom: var(--rule); background: var(--paper);
  font: 500 0.8125rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.evidence__lede { margin: 0; padding: 12px 14px; border-bottom: var(--rule); font-size: 1.0625rem; line-height: 1.5; }
.evidence__frame { position: relative; background: var(--card); }
.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(rgba(255, 255, 255, 0), var(--card));
}
.evidence__status { display: none; margin: 0; font-size: 1.0625rem; line-height: 1.5; }
.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; }
.js .evidence[data-state="loading"] .evidence__frame,
.js .evidence[data-state="slow"] .evidence__frame {
  background:
    repeating-linear-gradient(90deg, transparent 0 39px, #E2ECEE 39px 40px),
    repeating-linear-gradient(0deg, var(--card) 0 39px, #E2ECEE 39px 40px);
}
.js .evidence[data-state="loading"] .evidence__status,
.js .evidence[data-state="slow"] .evidence__status {
  position: absolute; top: 16px; left: 16px; right: 16px; z-index: 1;
  background: var(--paper); border: var(--rule); padding: 10px 14px; font-style: italic;
}
.evidence[data-state="pending"] .evidence__frame {
  min-height: 180px; display: grid; place-items: center; padding: 24px 18px;
  background:
    radial-gradient(circle at 18% 120%, transparent 0 60px, rgba(25, 61, 80, 0.35) 61px 62px, transparent 63px 92px, rgba(25, 61, 80, 0.25) 93px 94px, transparent 95px),
    var(--shallow);
}
.evidence[data-state="pending"] .evidence__status {
  background: var(--paper); border: 1px dashed var(--navy); padding: 12px 16px; max-width: 44ch; text-align: center;
}
.evidence__fallback { margin: 0; padding: 9px 14px; border-top: var(--rule); font-size: 1.0625rem; line-height: 1.45; }
.evidence__fallback a { font-weight: 600; }
.evidence__expand {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px; cursor: pointer;
  border: 0; border-top: var(--rule); background: var(--paper); color: var(--navy);
  font: 500 0.9375rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.evidence__expand:hover { background: var(--shallow); }

/* Notice to readers (plain-language box) */
.notice-box { background: var(--card); border: var(--rule); }
.notice-box__head {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: var(--navy); color: var(--paper); padding: 8px 14px; margin: 0;
  font: 500 0.8125rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em;
}
.notice-box__body { padding: 16px 18px 18px; }
.notice-box h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); margin-bottom: 0.4em; }
.notice-box dl { margin: 12px 0; display: grid; gap: 10px; }
.notice-box dt { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; color: var(--navy); line-height: 1.2; }
.notice-box dd { margin: 2px 0 0; font-size: 1.0625rem; line-height: 1.5; }
.inset-note { margin-top: 18px; font-style: italic; font-size: 1.0625rem; }

/* ---------- Tide-table ledger ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: var(--rule); margin: 8px 0 24px; }
.ledger { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 1.0625rem; line-height: 1.45; }
.ledger caption { caption-side: top; text-align: left; padding: 12px 14px; border-bottom: var(--rule); background: var(--paper); }
.ledger caption strong { font: 700 1.375rem/1.2 var(--f-display); color: var(--navy); display: block; }
.ledger caption span { font-size: 1rem; font-style: italic; }
.ledger th, .ledger td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px dotted var(--navy); }
.ledger thead th { background: var(--navy); color: var(--paper); font: 500 0.8125rem/1.35 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 0; }
.ledger tbody th { font-weight: 600; min-width: 9em; }
.ledger tbody tr:nth-child(even) { background: #F8F7F1; }
.ledger tbody tr:last-child > * { border-bottom: 0; }
.ledger .ph { overflow-wrap: normal; }
.ledger .num { font-family: var(--f-mono); font-size: 0.9375rem; }
.ledger .none { font-style: italic; }
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; background: none; }
  .ledger { min-width: 0; }
  .ledger caption { display: block; border: var(--rule); margin-bottom: 14px; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; width: 100%; }
  .ledger tr { background: var(--card) !important; border: var(--rule); margin-bottom: 14px; }
  .ledger th, .ledger td { padding: 9px 14px; border-bottom: 1px dotted var(--navy); }
  .ledger tbody tr:last-child > * { border-bottom: 1px dotted var(--navy); }
  .ledger tr > *:last-child { border-bottom: 0 !important; }
  .ledger tbody th::before, .ledger td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font: 500 0.75rem/1.35 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--water);
  }
}

/* ---------- Spender aside with pending card ---------- */
.two-col { display: grid; gap: 28px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.two-col > * { min-width: 0; }

/* ---------- Data-state key: chart symbols ---------- */
.key { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; border: var(--rule); background: var(--card); }
@media (min-width: 760px) { .key { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.key li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; align-items: start; padding: 12px 14px; border-bottom: 1px dotted var(--navy); }
@media (min-width: 760px) { .key li:nth-child(odd) { border-right: 1px dotted var(--navy); } .key li:nth-last-child(-n+2) { border-bottom: 0; } }
.key li:last-child { border-bottom: 0; }
.key__sym { grid-row: span 2; width: 44px; height: 44px; border: var(--rule); }
.key__sym--loading { background: repeating-linear-gradient(90deg, transparent 0 10px, #C9DADF 10px 11px), repeating-linear-gradient(0deg, var(--card) 0 10px, #C9DADF 10px 11px); }
.key__sym--unavailable { background: linear-gradient(45deg, transparent 46%, var(--navy) 46% 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, var(--navy) 46% 54%, transparent 54%), var(--paper); }
.key__sym--none { border-radius: 50%; border: 2px dotted var(--navy); background: var(--shallow); }
.key__sym--ph { background: var(--ph-bg); border: 1px dashed var(--magenta); }
.key strong { font: 500 0.8125rem/1.35 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); }
.key span:not(.key__sym):not(.ph) { font-size: 1.0625rem; line-height: 1.45; }
.key-title { margin-top: 30px; }

/* ---------- Notices (recent coverage) ---------- */
.notices { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); margin-top: 18px; }
.news-item { background: var(--card); border: var(--rule); padding: 0 0 16px; min-width: 0; }
.news-item__flag {
  margin: 0 0 12px; padding: 6px 14px; border-bottom: 1px dotted var(--navy); background: var(--paper);
  font: 500 0.8125rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.news-item > :not(.news-item__flag) { margin-left: 16px; margin-right: 16px; }
.news-item h3 { font-size: 1.5rem; line-height: 1.15; margin-bottom: 8px; }
.news-item__meta { font: 400 0.875rem/1.5 var(--f-mono); margin-bottom: 10px; }
.news-note { font-style: italic; border-left: 3px solid var(--magenta); padding-left: 12px; max-width: var(--measure); }

/* ---------- About-the-chart summary ---------- */
.sources-list { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 8px; max-width: var(--measure); }
.sources-list li { position: relative; padding-left: 26px; }
.sources-list li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--magenta); background: var(--paper); }

/* ---------- Race page: zoomed sheet ---------- */
.race-hero { display: grid; border-bottom: var(--rule); background: var(--paper); }
@media (min-width: 900px) { .race-hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.race-hero__title { padding: 18px var(--gutter) 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.race-hero h1 { font-size: clamp(2.1rem, 1.1rem + 3.4vw, 3.6rem); line-height: 1.02; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font: 400 0.9375rem/1.3 var(--f-mono); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "›"; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.race-hero__inset { position: relative; min-height: 200px; background: var(--deep); border-top: var(--rule); overflow: hidden; }
@media (min-width: 900px) { .race-hero__inset { border-top: 0; border-left: var(--rule); } }
.race-hero__inset svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.race-hero__inset p { position: absolute; left: 14px; bottom: 10px; margin: 0; background: var(--paper); border: var(--rule); padding: 3px 8px; font: 400 0.8125rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.notice {
  margin: 0; padding: 14px var(--gutter); background: var(--ph-bg); border-bottom: var(--rule);
  font-size: 1.125rem;
}
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border-bottom: var(--rule); background: var(--card); }
.facts div { padding: 12px var(--gutter); border-bottom: 1px dotted var(--navy); min-width: 0; }
@media (min-width: 900px) {
  .facts div { padding: 14px 20px; border-bottom: 0; border-right: var(--rule); }
  .facts div:last-child { border-right: 0; }
}
.facts dt { font: 500 0.8125rem/1.35 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--water); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.facts a { display: inline-flex; align-items: center; min-height: 44px; }
.fold { border: var(--rule); background: var(--card); margin-top: 14px; }
.fold summary {
  cursor: pointer; min-height: 52px; padding: 10px 14px; display: flex; align-items: center; gap: 12px;
  font-weight: 600; list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: var(--rule); font: 500 1rem/1 var(--f-mono); color: var(--navy); }
.fold[open] summary::before { content: "−"; }
.fold[open] summary { border-bottom: var(--rule); background: var(--paper); }
.fold .evidence { margin: 14px; }
.buoys { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.buoys .marker { height: 100%; }
.buoys .marker[aria-current="page"] { background: var(--magenta); color: var(--card); border-color: var(--magenta); }
.buoys .marker[aria-current="page"] svg circle:first-child { fill: var(--card); }
.buoys .marker[aria-current="page"] svg circle + circle { fill: var(--magenta); }
.buoys .marker--senate[aria-current="page"] { background: var(--navy); border-color: var(--magenta); box-shadow: inset 0 -5px 0 var(--magenta); color: var(--paper); }
.dates { margin: 14px 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); border: var(--rule); background: var(--card); }
.dates div { padding: 12px 14px; border-bottom: 1px dotted var(--navy); }
@media (min-width: 760px) { .dates div { border-bottom: 0; border-right: 1px dotted var(--navy); } .dates div:last-child { border-right: 0; } }
.dates dt { font: 500 0.8125rem/1.35 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--water); }
.dates dd { margin: 4px 0 0; }

/* ---------- About the chart ---------- */
.about-hero { display: grid; border-bottom: var(--rule); }
@media (min-width: 900px) { .about-hero { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.about-hero__title { padding: clamp(24px, 5vw, 48px) var(--gutter); display: flex; flex-direction: column; gap: 10px; }
.about-hero h1 { font-size: clamp(2.4rem, 1.3rem + 3.8vw, 4rem); line-height: 1; }
.about-hero__rose { position: relative; min-height: 180px; background: var(--deep); border-top: var(--rule); overflow: hidden; }
@media (min-width: 900px) { .about-hero__rose { border-top: 0; border-left: var(--rule); } }
.about-hero__rose svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-layout { display: grid; gap: 28px; padding: clamp(28px, 5vw, 52px) var(--gutter); border-bottom: var(--rule); }
@media (min-width: 980px) { .about-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; } }
.notes-index { border: var(--rule); background: var(--card); }
@media (min-width: 980px) { .notes-index { position: sticky; top: 16px; } }
.notes-index h2 { font-size: 1.5rem; padding: 10px 14px; border-bottom: var(--rule); background: var(--paper); }
.notes-index ol { list-style: none; margin: 0; padding: 6px 0; }
.notes-index a { display: flex; gap: 10px; align-items: baseline; min-height: 44px; padding: 8px 14px; text-decoration: none; line-height: 1.3; }
.notes-index a:hover { background: var(--shallow); color: var(--navy); }
.notes-index .note-tag { flex: none; width: 4.6em; }
.note-tag { font: 500 0.8125rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--magenta); }
.about-notes { min-width: 0; }
.about-note { max-width: 70ch; padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px dotted var(--navy); scroll-margin-top: 16px; }
.about-note:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.about-note h2 { font-size: clamp(1.8rem, 1.35rem + 1.6vw, 2.5rem); margin: 4px 0 12px; }
.about-note h3 { font-size: 1.5rem; margin: 1em 0 0.35em; }
.three { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 0; border: var(--rule); background: var(--card); }
.three li { padding: 12px 16px; border-bottom: 1px dotted var(--navy); }
.three li:last-child { border-bottom: 0; }
.pos-demo { display: flex; flex-wrap: wrap; gap: 12px; }
.glossary { margin: 12px 0 0; border: var(--rule); background: var(--card); }
.glossary div { padding: 12px 16px; border-bottom: 1px dotted var(--navy); }
.glossary div:last-child { border-bottom: 0; }
.glossary dt { font: 700 1.3125rem/1.2 var(--f-display); color: var(--navy); }
.glossary dd { margin: 4px 0 0; font-size: 1.0625rem; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); }
.site-footer__inner { display: grid; gap: 22px 40px; padding: 24px var(--gutter) 18px; }
@media (min-width: 900px) { .site-footer__inner { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); } }
.footer__attr { font: 700 1.625rem/1.1 var(--f-display); color: var(--navy); margin-bottom: 8px; }
.footer__small { font-size: 1.0625rem; line-height: 1.5; }
.footer__dates { font: 400 0.875rem/1.6 var(--f-mono); border-top: 1px dotted var(--navy); padding-top: 10px; margin-top: 12px; }
.site-footer h2 { font: 500 0.8125rem/1.35 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); margin-bottom: 6px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.0625rem; }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px;
  padding: 10px var(--gutter) 14px; border-top: var(--rule);
  font: 400 0.8125rem/1.5 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---------- Privacy and cookie policies: notices to mariners ---------- */
.policy-effective {
  align-self: flex-start; margin: 6px 4px 4px; padding: 6px 12px;
  background: var(--card); color: var(--ink); border: var(--rule);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--navy);
  font: 500 0.875rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.policy-effective time { color: var(--navy); font-weight: 500; }
.policy-layout .policy-toc { border: var(--rule); background: var(--card); min-width: 0; }
@media (min-width: 980px) { .policy-layout .policy-toc { position: sticky; top: 16px; } }
.policy-toc__label {
  margin: 0; padding: 10px 14px; border-bottom: var(--rule); background: var(--paper);
  font: 700 1.5rem/1.05 var(--f-display); color: var(--navy);
}
.policy-layout .policy-toc ul { display: block; margin: 0; padding: 6px 0; counter-reset: note; }
.policy-layout .policy-toc li { counter-increment: note; }
.policy-layout .policy-toc a {
  display: flex; gap: 10px; align-items: baseline; min-height: 44px; padding: 8px 14px;
  text-decoration: none; line-height: 1.3; color: var(--navy);
}
.policy-layout .policy-toc a::before {
  content: "Note " counter(note, upper-alpha); flex: none; width: 4.6em;
  font: 500 0.8125rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--magenta);
}
.policy-layout .policy-toc a:hover { background: var(--shallow); color: var(--navy); text-decoration: underline; }
.policy-layout .policy-doc { min-width: 0; max-width: 70ch; counter-reset: note; }
.policy-layout .policy-section {
  counter-increment: note; padding-bottom: 30px; margin-bottom: 30px;
  border-bottom: 1px dotted var(--navy); scroll-margin-top: 16px;
}
.policy-layout .policy-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.policy-layout .policy-section::before {
  content: "Note " counter(note, upper-alpha); display: block;
  font: 500 0.8125rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--magenta);
}
.policy-layout .policy-section h2 { font-size: clamp(1.8rem, 1.35rem + 1.6vw, 2.5rem); margin: 4px 0 12px; }
.policy-layout .policy-section p, .policy-layout .policy-section li, .policy-layout .policy-list dd { line-height: 1.6; }
.policy-layout .policy-section p + p, .policy-layout .policy-section ul + p { margin-top: 0.75em; }
.policy-layout .policy-section ul { list-style: none; margin: 12px 0; padding: 0; border: var(--rule); background: var(--card); }
.policy-layout .policy-section li { position: relative; padding: 12px 16px 12px 42px; border-bottom: 1px dotted var(--navy); }
.policy-layout .policy-section li + li { margin-top: 0; }
.policy-layout .policy-section li:last-child { border-bottom: 0; }
.policy-layout .policy-section li::before {
  content: ""; position: absolute; left: 16px; top: 1.05em; width: 11px; height: 11px;
  border-radius: 50%; border: 2px solid var(--magenta); background: var(--paper);
}
.policy-layout .policy-section strong { font-weight: 700; color: var(--navy); }
.policy-layout .policy-section code, .policy-layout .policy-list code {
  font-family: var(--f-mono); font-size: 0.8em; color: var(--ink);
  background: var(--shallow); border: 1px dotted var(--navy); padding: 0 0.3em; overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.policy-layout .policy-list { margin: 12px 0 0; gap: 0; border: var(--rule); background: var(--card); }
.policy-layout .policy-list div { padding: 12px 16px; border-bottom: 1px dotted var(--navy); min-width: 0; }
.policy-layout .policy-list div:last-child { border-bottom: 0; }
.policy-layout .policy-list dt code { font-weight: 500; font-size: 0.875em; background: var(--paper); border-style: solid; }
.policy-layout .policy-list dd { margin: 6px 0 0; font-size: 1.0625rem; line-height: 1.5; }
probo-settings-link.policy-settings:defined {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; margin-right: 0.4em;
  background: var(--paper); color: var(--navy); border: var(--rule); text-decoration: none;
  font: 500 0.9375rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
}
probo-settings-link.policy-settings:defined:hover { background: var(--shallow); }

/* Footer legal line: chart-margin notes above the base strip */
.site-footer .legal-links {
  margin: 0; padding: 4px var(--gutter) 8px; border-top: 1px dotted var(--navy); gap: 0 22px;
  font: 400 0.9375rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
}
.site-footer .legal-links a, .site-footer .legal-links probo-settings-link:defined { color: var(--navy); }
.site-footer .legal-links a:hover, .site-footer .legal-links probo-settings-link:defined:hover { color: var(--magenta); }
