/* InjuryByState
   Concept: the claim file. Ink-blue type on form-paper grey, manila folders for illustrations,
   hi-vis orange reserved for limits and deadlines (the cap line, the last day to file).
   Layout: reading column (~66ch) with the tool up top; 300px sticky sidebar on wide screens. */
:root {
  --paper: #f1f4f3;
  --surface: #ffffff;
  --ink: #13212c;
  --muted: #536370;
  --line: #d4dcdf;
  --accent: #1f4aa8;
  --accent-ink: #ffffff;
  --accent-soft: #e5ecf8;
  --hivis: #e5601a;
  --hivis-soft: #fdeadf;
  --manila: #eedfb8;
  --ok: #1d7a46;
  --bad: #b3261e;
  --warn-bg: #fdf1dc;
  --warn-ink: #6b4a0c;
  --ad-bg: #e9edee;
  --ad-line: #c3ccd0;

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 4.2vw, 2.75rem);
  --radius: 12px;
  --radius-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1519;
    --surface: #152027;
    --ink: #e5ecef;
    --muted: #9aabb3;
    --line: #263540;
    --accent: #8aaaff;
    --accent-ink: #0c1424;
    --accent-soft: #19284a;
    --hivis: #ff8a4c;
    --hivis-soft: #3a2216;
    --manila: #3b3424;
    --ok: #5cc98a;
    --bad: #ff8a80;
    --warn-bg: #2c2412;
    --warn-ink: #ecd394;
    --ad-bg: #18232a;
    --ad-line: #33434d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1519;
  --surface: #152027;
  --ink: #e5ecef;
  --muted: #9aabb3;
  --line: #263540;
  --accent: #8aaaff;
  --accent-ink: #0c1424;
  --accent-soft: #19284a;
  --hivis: #ff8a4c;
  --hivis-soft: #3a2216;
  --manila: #3b3424;
  --ok: #5cc98a;
  --bad: #ff8a80;
  --warn-bg: #2c2412;
  --warn-ink: #ecd394;
  --ad-bg: #18232a;
  --ad-line: #33434d;
  color-scheme: dark;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.18; text-wrap: balance; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 16px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand::before {
  content: ""; width: 30px; height: 30px; flex: none; border-radius: 8px;
  background: #1f4aa8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M9 7h9l4 4v12H9z' fill='none' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M12 15h7M12 19h5' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='22' cy='22' r='4' fill='%23e5601a'/%3E%3C/svg%3E") center/100% no-repeat;
}
.brand span { display: none; }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; font-size: .98rem; }
.nav a { color: var(--muted); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--hivis); }

/* Page grid */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 28px 72px; }
@media (min-width: 1040px) { .page { grid-template-columns: minmax(0, 1fr) 300px; } }
.page-single { grid-template-columns: minmax(0, 1fr) !important; max-width: 860px; }
.content { display: flex; flex-direction: column; gap: 40px; min-width: 0; }

.crumbs { font-size: var(--step--1); color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); }

/* Title block */
.title-block { display: flex; flex-direction: column; gap: 14px; }
.title-block h1 { font-size: var(--step-3); max-width: 24ch; }
.title-block > p { color: var(--muted); max-width: 62ch; }
.meta { font-size: var(--step--1); color: var(--muted); display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.meta .stamp { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; }
.meta .stamp::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M4.8 8.3l2.1 2.1 4.3-4.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M4.8 8.3l2.1 2.1 4.3-4.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Quick answer: reads like the highlighted paragraph in a statute */
.answer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 20px 22px 20px 24px;
  border-radius: 4px var(--radius) var(--radius) 4px;
  max-width: 68ch;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 1.1rem; line-height: 1.6;
}
.answer strong:first-child { color: var(--accent); }

/* Ad slots (replace inner div with AdSense code at launch) */
.ad { display: grid; place-items: center; min-height: 100px; }
.ad-slot {
  width: 100%; min-height: inherit; border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, var(--ad-bg) 0 10px, transparent 10px 20px), var(--ad-bg);
  border: 1px dashed var(--ad-line); color: var(--muted); font-size: .8rem;
  display: grid; place-items: center;
}
.ad-inline { min-height: 280px; }
.ad-side { min-height: 600px; }

/* Calculator */
.calc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden;
  box-shadow: 0 14px 32px -20px rgba(19, 33, 44, .45);
}
@media (min-width: 760px) { .calc { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.calc-form { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.calc-form h2 { font-size: var(--step-1); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: .95rem; }
.hint { font-size: var(--step--1); color: var(--muted); }
.input-money { position: relative; }
.input-money::before { content: "$"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
input[type="number"], input[type="date"], select {
  width: 100%; font: inherit; font-variant-numeric: tabular-nums;
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
input[type="number"]:hover, input[type="date"]:hover, select:hover { border-color: var(--muted); }
.input-money input { padding-left: 28px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.seg { display: flex; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { flex: 1; font: inherit; font-size: .95rem; padding: 10px 8px; border: 0; cursor: pointer; background: var(--paper); color: var(--muted); }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.calc-result {
  background: var(--accent-soft); padding: 26px;
  display: flex; flex-direction: column; gap: 18px;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .calc-result { border-top: 0; border-left: 1px solid var(--line); } }
.result-label { font-size: .95rem; color: var(--muted); font-weight: 700; }
.result-big { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.25rem); font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums lining-nums; }
.result-big small { font-family: var(--font-body); font-size: 1rem; font-weight: 400; color: var(--muted); }
.result-date { font-family: var(--font-display); font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 700; line-height: 1.1; color: var(--ink); }
.result-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-sub div { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; }
.result-sub span { display: block; font-size: var(--step--1); color: var(--muted); }
.result-sub b { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.breakdown { width: 100%; border-collapse: collapse; font-size: .95rem; }
.breakdown td { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.breakdown tr:last-child td { border-bottom: 0; }
.note { font-size: .92rem; background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: var(--radius-sm); }

/* Benefit bar: wage vs. benefit vs. state cap */
.bar-viz { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; }
.bar-track { position: relative; height: 22px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 5px; background: var(--accent); transition: width .35s ease; }
.bar-cap { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 3px solid var(--hivis); }
.bar-cap::after { content: attr(data-label); position: absolute; top: -22px; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: .75rem; font-weight: 700; color: var(--hivis); }
.bar-legend { display: flex; justify-content: space-between; gap: 8px; font-size: var(--step--1); color: var(--muted); }
.bar-legend b { color: var(--ink); }

/* Deadline timeline */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-track { position: relative; height: 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.tl-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.tl-today { position: absolute; top: -7px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-end { position: absolute; right: -2px; top: -9px; width: 4px; height: 26px; border-radius: 2px; background: var(--hivis); }
.tl-labels { display: flex; justify-content: space-between; gap: 8px; font-size: var(--step--1); color: var(--muted); }
.tl-labels span:last-child { text-align: right; }
.tl-labels b { color: var(--ink); display: block; }
.timeline[data-state="bad"] .tl-fill { background: var(--bad); }
.timeline[data-state="bad"] .tl-today { border-color: var(--bad); }

.chip { display: inline-block; font-size: .85rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1.5px solid var(--line); }
.chip[data-state="ok"] { color: var(--ok); border-color: var(--ok); }
.chip[data-state="warn"] { color: var(--warn-ink); background: var(--warn-bg); border-color: transparent; }
.chip[data-state="bad"] { color: var(--bad); border-color: var(--bad); }

/* Article */
.prose { display: flex; flex-direction: column; gap: 16px; max-width: 68ch; }
.prose h2 { margin-top: 8px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose li::marker { color: var(--accent); }
.prose ol.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; position: relative; padding-bottom: 20px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(s); font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; position: relative; z-index: 1;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line); }

.example {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: start;
}
.example::before {
  content: ""; grid-row: span 2; width: 44px; height: 44px; border-radius: 10px;
  background: var(--manila) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect x='11' y='9' width='22' height='27' rx='2' fill='%23fff' stroke='%2313212c' stroke-width='1.6'/%3E%3Cpath d='M15 16h14M15 21h14M15 26h8' stroke='%2313212c' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M15 31h8' stroke='%23e5601a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.example strong { font-size: 1.05rem; }
.example .num { color: var(--accent); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.grid-table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 480px; }
.grid-table caption { text-align: left; padding: 12px 16px; font-size: var(--step--1); color: var(--muted); caption-side: bottom; border-top: 1px solid var(--line); }
.grid-table th, .grid-table td { padding: 11px 16px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid-table th:first-child, .grid-table td:first-child { text-align: left; }
.grid-table thead th { font-size: .9rem; color: var(--muted); font-weight: 700; background: var(--paper); }
.grid-table td { font-variant-numeric: tabular-nums; }
.grid-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper) 55%, var(--surface)); }
.grid-table tbody tr:last-child td { border-bottom: 0; }
.state-table td, .state-table th { text-align: left !important; }

.faq details { border-bottom: 1px solid var(--line); padding-block: 16px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--muted); }

.sources { font-size: .95rem; color: var(--muted); display: flex; flex-direction: column; gap: 8px; padding-left: 20px; margin: 0; }
.author-box { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); max-width: 68ch; }
.author-box .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--manila); color: var(--ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.author-box p { font-size: .95rem; color: var(--muted); }
.author-box strong { color: var(--ink); }
.disclaimer { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; max-width: 68ch; }

/* Illustrations (inline SVG, themed through tokens) */
.illo { display: block; width: 100%; height: auto; }
.illo .i-paper { fill: var(--surface); stroke: var(--ink); }
.illo .i-manila { fill: var(--manila); }
.illo .i-accent { fill: var(--accent); }
.illo .i-accent-s { stroke: var(--accent); fill: none; }
.illo .i-hivis { fill: var(--hivis); }
.illo .i-hivis-s { stroke: var(--hivis); fill: none; }
.illo .i-line { stroke: var(--ink); fill: none; }
.illo .i-muted { stroke: var(--muted); fill: none; }
.illo .i-ink { fill: var(--ink); }
.illo .i-soft { fill: var(--accent-soft); }
.illo text { fill: var(--ink); font-family: var(--font-display); font-weight: 700; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; padding-block: 8px; }
@media (min-width: 760px) { .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); max-width: 15ch; }
.hero p { color: var(--muted); max-width: 52ch; font-size: 1.15rem; margin-top: 14px; }
.hero .illo { max-width: 440px; justify-self: center; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.card:has(a:hover) { border-color: var(--accent); }
.card h3 { font-size: 1.15rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { color: var(--muted); font-size: .97rem; }
.card[data-icon]::before {
  content: ""; width: 42px; height: 42px; border-radius: 10px; background-color: var(--accent-soft);
  background-repeat: no-repeat; background-position: center; background-size: 26px;
}
.card[data-icon="wc"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M4 18a9 9 0 0 1 18 0' fill='%23e5601a'/%3E%3Cpath d='M2 18h22v3H2z' fill='%231f4aa8'/%3E%3Cpath d='M11 9h4v6h-4z' fill='%231f4aa8'/%3E%3C/svg%3E"); }
.card[data-icon="cal"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='3' y='5' width='20' height='18' rx='2' fill='none' stroke='%231f4aa8' stroke-width='2'/%3E%3Cpath d='M3 10h20M8 3v4M18 3v4' stroke='%231f4aa8' stroke-width='2'/%3E%3Ccircle cx='17' cy='17' r='3.2' fill='none' stroke='%23e5601a' stroke-width='2'/%3E%3C/svg%3E"); }
.card[data-icon="car"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M4 16l2-6h14l2 6v4H4z' fill='none' stroke='%231f4aa8' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='20' r='2' fill='%23e5601a'/%3E%3Ccircle cx='18' cy='20' r='2' fill='%23e5601a'/%3E%3C/svg%3E"); }
.card[data-icon="fed"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M3 9l10-5 10 5z' fill='%231f4aa8'/%3E%3Cpath d='M6 11v8M10.5 11v8M15.5 11v8M20 11v8' stroke='%231f4aa8' stroke-width='2'/%3E%3Cpath d='M3 21h20' stroke='%23e5601a' stroke-width='2.4'/%3E%3C/svg%3E"); }
.card[data-icon="book"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M4 5h7a2 2 0 0 1 2 2v14a2 2 0 0 0-2-2H4zM22 5h-7a2 2 0 0 0-2 2v14a2 2 0 0 1 2-2h7z' fill='none' stroke='%231f4aa8' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M16 10h3' stroke='%23e5601a' stroke-width='2'/%3E%3C/svg%3E"); }
.card[data-icon="money"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='3' y='7' width='20' height='12' rx='2' fill='none' stroke='%231f4aa8' stroke-width='2'/%3E%3Ccircle cx='13' cy='13' r='3' fill='%23e5601a'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card[data-icon]::before { background-color: #dfe7f6; } }
:root[data-theme="dark"] .card[data-icon]::before { background-color: #dfe7f6; }

.callout { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); max-width: 68ch; }
.topic-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; }
@media (min-width: 760px) { .topic-head { grid-template-columns: minmax(0, 1fr) 200px; } }
.topic-head .illo { max-width: 200px; }
@media (max-width: 759px) { .topic-head .illo { max-width: 150px; } }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1040px) { .side-sticky { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 24px; } }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.side-box h2 { font-size: 1.05rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .97rem; }
.link-list a { color: var(--ink); text-decoration: none; display: block; padding: 3px 0; }
.link-list a:hover { color: var(--accent); text-decoration: underline; }
.link-list a[aria-current="page"] { color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--hivis); padding-left: 10px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; }
.site-footer nav { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .bar-fill { transition: none; } }

/* "What people run into": the belief or question, then what the law says */
.runinto { display: flex; flex-direction: column; gap: 14px; max-width: 68ch; }
.runinto > p { color: var(--muted); }
.ri-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ri-q { padding: 14px 18px; font-weight: 700; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.ri-q::before { content: "?"; width: 24px; height: 24px; border-radius: 50%; background: var(--hivis-soft); color: var(--hivis); display: grid; place-items: center; font-family: var(--font-display); font-size: .95rem; }
.ri-a { padding: 14px 18px; border-top: 1px dashed var(--line); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.ri-a::before { content: "§"; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-display); font-size: .9rem; font-weight: 700; }
.ri-a p + p { margin-top: 6px; }
.ri-a .cite { font-size: var(--step--1); color: var(--muted); }

/* Figures: Atkinson's slashed zero crowds tables, so numbers use the serif with tabular figures */
.grid-table td, .breakdown td:last-child, .result-sub b, .num, .bar-legend, .tl-labels b, .meta .stamp {
  font-family: var(--font-display); font-variant-numeric: tabular-nums lining-nums;
}
.grid-table td:first-child { font-family: var(--font-body); }
