:root {
  --paper: #f6f1e8;
  --paper-2: #ece4d6;
  --card: #fffdf8;
  --ink: #16202a;
  --ink-2: #3b4652;
  --line: #d3c8b6;
  --accent: #7c2d15;
  --accent-soft: #b85a37;
  --pt: #4d6a3b;
  --union: #6e6556;
  --es: #a8452a;
  --yes: #7c2d15;
  --no: #1f4f6e;
  --open: #6a4a09;
  --bar-res: #1f4f6e;
  --bar-cross: #a8452a;
  --bar-old: #8c8272;
  --focus: #1f4f6e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 3.1rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11161b; --paper-2: #182028; --card: #1a232c; --ink: #ede7dc; --ink-2: #c3bbad; --line: #34404b;
    --accent: #f2b08f; --accent-soft: #d9825f; --pt: #8fb074; --union: #a89f8f; --es: #d9714f;
    --yes: #f2b08f; --no: #9cc7e4; --open: #e8c77a; --bar-res: #7fb3d6; --bar-cross: #d9714f; --bar-old: #a89f8f; --focus: #9cc7e4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11161b; --paper-2: #182028; --card: #1a232c; --ink: #ede7dc; --ink-2: #c3bbad; --line: #34404b;
  --accent: #f2b08f; --accent-soft: #d9825f; --pt: #8fb074; --union: #a89f8f; --es: #d9714f;
  --yes: #f2b08f; --no: #9cc7e4; --open: #e8c77a; --bar-res: #7fb3d6; --bar-cross: #d9714f; --bar-old: #a89f8f; --focus: #9cc7e4;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.62 var(--serif); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.18; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
h4 { font: 700 .78rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-top: 1rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--card); padding: .5rem .8rem; z-index: 50; }
.skip:focus { left: .5rem; }

/* top bar: one line */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .9rem; height: var(--bar-h); padding: 0 max(1rem, env(safe-area-inset-left)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font: .88rem/1 var(--sans); }
.topbar .home { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; padding: .35rem 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent-soft); }
.spacer { flex: 1 1 0; }
.langs { display: flex; gap: .35rem; min-width: 0; max-width: 52vw; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; }
.langs::-webkit-scrollbar { display: none; }
.chip .c-short { display: none; }
@media (max-width: 30rem) { .chip .c-long { display: none; } .chip .c-short { display: inline; } .langs { flex: none; max-width: none; } }
.chip { color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .38rem .7rem; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; }
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }
@media (max-width: 30rem) { .topbar .home { display: none; } .topbar { gap: .6rem; } .chip { padding: .38rem .55rem; } }

section, .hero { scroll-margin-top: calc(var(--bar-h) + .5rem); }
main > section, .hero { padding: clamp(2.5rem, 6vw, 4.5rem) 1rem; }
main > section > *, .hero > * { max-width: 44rem; margin-left: auto; margin-right: auto; }
.band { background: var(--paper-2); }
.lead { font-size: 1.14rem; color: var(--ink-2); }

/* hero */
.kicker { font: 700 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem); letter-spacing: -.01em; }
.deck { font-size: clamp(1.12rem, 1rem + .5vw, 1.3rem); color: var(--ink-2); }
.hero-map { max-width: 64rem !important; margin-top: 2rem; }
.hero-map img { width: 100%; height: auto; border-radius: 6px; }
figcaption { font: .86rem/1.5 var(--sans); color: var(--ink-2); margin-top: .6rem; }
.credit { display: inline-block; opacity: .95; }

/* references */
sup.ref { font: 600 .66rem/1 var(--sans); margin-left: .12em; }
sup.ref a { text-decoration: none; padding: 0 .1em; }

/* four tests */
.tests { max-width: 64rem !important; }
.test-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem; margin: 1.2rem 0; }
.test-picker button { font: 600 .95rem/1.3 var(--sans); text-align: left; padding: .85rem 1rem; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.test-picker button[aria-checked="true"] { border-color: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-soft); }
html:not(.js) .test-picker { display: none; }
.test-verdict { font-size: 1.2rem; font-weight: 700; margin: .4rem 0 1.2rem; }
.test-verdict[hidden] { display: none; }
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.test { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.1rem .4rem; transition: opacity .2s; }
.test.dim { opacity: .55; }
.test.picked { border-color: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .test { transition: none; } }
.test-q { font: 600 .92rem/1.4 var(--sans); color: var(--ink-2); }
.test-a { font: 700 2rem/1 var(--serif); margin: .2rem 0 .6rem; }
.test-a.yes { color: var(--yes); } .test-a.no { color: var(--no); } .test-a.open { color: var(--open); }
.test p:last-child { font-size: .98rem; }
.summary { margin-top: 1.4rem; font-size: 1.1rem; }

/* history band */
.band-chart { max-width: 64rem !important; margin: 1.5rem auto; }
svg.band { width: 100%; height: auto; overflow: visible; font: 700 18px var(--sans); }
@media (max-width: 44rem) { .band-chart { overflow-x: auto; } svg.band { min-width: 680px; } }
svg.band .seg-pt { fill: var(--pt); } svg.band .seg-union { fill: var(--union); } svg.band .seg-es { fill: var(--es); }
svg.band .seg-label { fill: var(--paper); font-size: 20px; }
svg.band .siege { fill: var(--ink-2); }
svg.band .band-stop line { stroke: var(--ink-2); stroke-width: 1.2; }
svg.band .band-stop circle { fill: var(--ink); }
svg.band .band-stop text { fill: var(--ink); }
svg.band .band-stop:hover text, svg.band .band-stop:focus text { fill: var(--accent); text-decoration: underline; }
.band-key { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font: .86rem/1.4 var(--sans); color: var(--ink-2); margin: .6rem 0 0; }
.band-key .k { display: inline-block; width: .9rem; height: .9rem; border-radius: 2px; margin-right: .4rem; vertical-align: -2px; }
.k.seg-pt { background: var(--pt); } .k.seg-union { background: var(--union); } .k.seg-es { background: var(--es); }
.stops { list-style: none; padding: 0; margin: 2rem auto 0; }
.stops li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--bar-h) + 1rem); }
.stops time { font: 700 1.05rem/1.4 var(--sans); color: var(--accent); }
.stops li:target { background: color-mix(in srgb, var(--accent-soft) 10%, transparent); }
@media (max-width: 34rem) { .stops li { grid-template-columns: 1fr; gap: .2rem; } }

/* status */
.status-grid { max-width: 64rem !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.status-grid article, .law article { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.2rem .3rem; }

/* 2026 comparison */
.compare { margin: 1.5rem auto 2rem; }
.bar-row { display: grid; grid-template-columns: 1fr; gap: .25rem; margin-bottom: 1rem; }
.bar-label { font: .92rem/1.35 var(--sans); color: var(--ink-2); }
.bar { display: block; height: 1.4rem; background: color-mix(in srgb, var(--line) 45%, transparent); border-radius: 3px; overflow: hidden; }
.fill { display: block; height: 100%; width: 0; }
.fill.f-res { background: var(--bar-res); } .fill.f-cross { background: var(--bar-cross); } .fill.f-old { background: var(--bar-old); }
.fill.w100 { width: 100%; } .fill.w84 { width: 84%; } .fill.w12 { width: 12%; }
html:not(.js) .fill.f-res { width: 100%; } html:not(.js) .fill.f-cross { width: 84%; } html:not(.js) .fill.f-old { width: 12%; }
.bar-num { font: 700 1.1rem/1.2 var(--sans); }
.log { list-style: none; padding: 0; }
.log li { padding: .75rem 0 .75rem 0; border-top: 1px solid var(--line); }
.log time { display: block; font: 700 .85rem/1.3 var(--sans); color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.takeaway { border-left: 4px solid var(--accent-soft); padding: .3rem 0 .1rem 1.1rem; margin-top: 2rem !important; }

/* sides */
.sides { max-width: 64rem !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.3rem .6rem; }
.side ul { padding-left: 1.1rem; }
.side li { margin-bottom: .45rem; }
.residents { margin-top: 1.5rem !important; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem .3rem; }

/* claims */
.claims details { border-top: 1px solid var(--line); }
.claims details:last-child { border-bottom: 1px solid var(--line); }
.claims summary { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; padding: 1rem 0; cursor: pointer; list-style: none; min-height: 44px; }
.claims summary::-webkit-details-marker { display: none; }
.claim { font-weight: 600; }
.verdict { font: 700 .75rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; padding: .3rem .55rem; border-radius: 4px; border: 1px solid currentColor; }
.verdict.misleading, .verdict.false { color: var(--yes); } .verdict.incomplete { color: var(--open); } .verdict.important { color: var(--no); }
.claims details p { padding-bottom: .6rem; }
@media (max-width: 34rem) { .claims summary { flex-direction: column; gap: .4rem; } }

/* comparisons */
.table-wrap { max-width: 64rem !important; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: .8rem .7rem; border-bottom: 1px solid var(--line); }
thead th { font: 700 .78rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
tbody th { font-weight: 700; white-space: nowrap; }
@media (max-width: 40rem) {
  table, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: .6rem 0; }
  th, td { border: 0; padding: .25rem 0; }
}

/* law */
.law { max-width: 64rem !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; }
.closing { margin-top: 2rem !important; font-size: 1.14rem; border-top: 3px solid var(--ink); padding-top: 1.2rem; }

/* sources */
.sources { list-style: none; padding: 0; }
.sources li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .6rem; padding: .8rem 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--bar-h) + 1rem); }
.sources li:target { background: color-mix(in srgb, var(--accent-soft) 12%, transparent); }
.src-n { font: 700 .95rem/1.5 var(--sans); color: var(--accent); }
.sources p { margin: 0 0 .25rem; font-size: .95rem; }
.src-t { font-weight: 600; }
.src-m { font: .82rem/1.4 var(--sans); color: var(--ink-2); }

.site-footer { padding: 2rem 1rem 5rem; text-align: center; font: .88rem/1.6 var(--sans); color: var(--ink-2); border-top: 1px solid var(--line); }
.site-footer p { margin: .2rem 0; }

/* reading rail, wide screens only */
.rail { display: none; }
@media (min-width: 76rem) {
  .rail { display: block; position: fixed; right: 1.4rem; top: 50%; transform: translateY(-50%); z-index: 15; }
  .rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
  .rail a { position: relative; display: flex; align-items: center; justify-content: center; width: 26px; min-height: 26px; text-decoration: none; color: var(--ink-2); font: .8rem/1 var(--sans); }
  .rail-label { position: absolute; right: 100%; margin-right: .3rem; pointer-events: none; opacity: 0; transform: translateX(4px); transition: opacity .15s, transform .15s; background: var(--card); padding: .25rem .45rem; border-radius: 4px; border: 1px solid var(--line); white-space: nowrap; }
  .rail a:hover .rail-label, .rail a:focus-visible .rail-label { opacity: 1; transform: none; }
  .rail-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); flex: none; transition: transform .15s, background .15s; }
  .rail a[aria-current="true"] .rail-dot { background: var(--accent-soft); transform: scale(1.45); }
}
@media (prefers-reduced-motion: reduce) { .rail-label, .rail-dot { transition: none; } }

/* back to top */
.to-top { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 18; display: inline-flex; align-items: center; gap: .35rem; min-width: 44px; min-height: 44px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 .85rem/1 var(--sans); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.to-top[hidden] { display: none; }
@media (min-width: 76rem) { .to-top { right: 1.4rem; bottom: 1.4rem; } }

/* 404 */
.nf-main { max-width: 36rem; margin: 18vh auto; padding: 0 1rem; }

@media print { .topbar, .rail, .to-top, .test-picker { display: none !important; } }

html, body { overflow-x: clip; }
