/* FIR 59/2020 — the timeline. Paper by day, lamp-lit by night. */

:root {
  color-scheme: light;
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --paper-3: #e1dac9;
  --ink: #17150f;
  --ink-2: #4f4a3f;
  --muted: #857d6d;
  --rule: #cfc7b5;
  --rule-soft: #e3dccb;
  --granted: #2a78d6;
  --refused: #d95926;
  --granted-wash: rgba(42, 120, 214, 0.12);
  --refused-wash: rgba(217, 89, 38, 0.12);
  --custody: rgba(23, 21, 15, 0.16);
  --custody-strong: rgba(23, 21, 15, 0.34);
  --shadow: 0 1px 0 rgba(23, 21, 15, 0.06), 0 12px 32px -18px rgba(23, 21, 15, 0.35);
  --serif-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif-body: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: 16px;
  --measure: 66ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #16140f;
    --paper-2: #1d1a14;
    --paper-3: #26221a;
    --ink: #ece6d8;
    --ink-2: #b9b09c;
    --muted: #837b6a;
    --rule: #3a3426;
    --rule-soft: #2a2519;
    --granted: #3987e5;
    --refused: #d95926;
    --granted-wash: rgba(57, 135, 229, 0.16);
    --refused-wash: rgba(217, 89, 38, 0.16);
    --custody: rgba(236, 230, 216, 0.14);
    --custody-strong: rgba(236, 230, 216, 0.34);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 36px -18px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #16140f;
  --paper-2: #1d1a14;
  --paper-3: #26221a;
  --ink: #ece6d8;
  --ink-2: #b9b09c;
  --muted: #837b6a;
  --rule: #3a3426;
  --rule-soft: #2a2519;
  --granted: #3987e5;
  --refused: #d95926;
  --granted-wash: rgba(57, 135, 229, 0.16);
  --refused-wash: rgba(217, 89, 38, 0.16);
  --custody: rgba(236, 230, 216, 0.14);
  --custody-strong: rgba(236, 230, 216, 0.34);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 36px -18px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "onum", "pnum", "kern";
  overflow-x: hidden;
}
body::before {
  /* paper grain */
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { font-family: var(--serif-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.08; margin: 0; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: 0.78em; letter-spacing: 0.02em; }
.ref { font-family: var(--mono); font-size: 0.72em; color: var(--muted); white-space: nowrap; }

.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---- top bar ---------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.topbar .dot { color: var(--refused); }
.theme { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; background: var(--paper-2); }
.theme button {
  all: unset; cursor: pointer; padding: 3px 10px; border-radius: 999px; font: inherit; color: var(--muted); letter-spacing: 0.08em;
}
.theme button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme button:focus-visible { outline: 2px solid var(--granted); outline-offset: 2px; }

/* ---- cover: page one of the judgment --------------------------------- */
.cover { padding: 56px 0 28px; border-bottom: 1px solid var(--rule); }
.cover .court {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 30px;
}
.cover .court b { color: var(--refused); font-weight: 500; }
.cover h1 {
  font-size: clamp(44px, 8.4vw, 118px);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
  line-height: 0.96;
  max-width: 14ch;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cover h1 em { font-style: italic; font-weight: 300; color: var(--ink-2); }
.cover .versus {
  display: block; font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 0.22em; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
  margin: 0.55em 0 0.35em 0.15em;
}
.cover .lede {
  font-size: clamp(18px, 2vw, 22px); max-width: 60ch; margin: 28px 0 0; color: var(--ink-2);
  animation: rise 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cause {
  margin-top: 36px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  display: grid; grid-template-columns: 1fr auto; gap: 0 24px; padding: 14px 0;
  animation: rise 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cause .k { color: var(--muted); }
.cause .v { text-align: right; white-space: nowrap; }
.cause .v.right { color: var(--ink); }

.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin: 32px 0 0;
  animation: rise 0.9s 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.tile { background: var(--paper); padding: 16px 16px 14px; }
.tile .n { font-family: var(--serif-display); font-size: 40px; line-height: 1; font-variation-settings: "opsz" 72; font-weight: 400; }
.tile .n.granted { color: var(--granted); }
.tile .n.refused { color: var(--refused); }
.tile .l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.tile .s { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.35; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cover *, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; } }

/* ---- sections --------------------------------------------------------- */
section { padding: 56px 0 8px; }
.sec-head { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; margin-bottom: 18px; }
.sec-head .num { font-family: var(--mono); font-size: 13px; color: var(--refused); letter-spacing: 0.1em; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 44px); font-variation-settings: "opsz" 72, "SOFT" 20; }
.sec-head p { max-width: var(--measure); color: var(--ink-2); margin: 10px 0 0; font-size: 17px; }
.sec-head p + p { margin-top: 6px; }

.figure { position: relative; background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.fig-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px;
  padding: 12px 16px; border-bottom: 1px solid var(--rule-soft);
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.sw.granted { background: var(--granted); }
.sw.refused { background: var(--refused); }
.sw.custody { background: var(--custody-strong); }
.sw.hatch { background: repeating-linear-gradient(135deg, var(--custody-strong) 0 2px, transparent 2px 5px); border: 1px solid var(--custody-strong); }
.sw.riot { background: var(--refused-wash); border: 1px solid var(--refused); }
.glyph { font-family: var(--mono); font-size: 13px; width: 14px; text-align: center; display: inline-block; }
.view { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.view button { all: unset; cursor: pointer; padding: 3px 12px; border-radius: 999px; font: inherit; color: var(--muted); }
.view button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.view button:focus-visible { outline: 2px solid var(--granted); outline-offset: 2px; }
.fig-body { padding: 12px 8px 8px; overflow: hidden; }
.fig-body[hidden] { display: none; }
.fig-body.scroll { overflow-x: auto; }
.fig-body svg { display: block; width: 100%; height: auto; font-family: var(--mono); }
.fig-body.scroll svg { max-width: none; }
.fig-note { padding: 10px 16px 14px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--rule-soft); max-width: none; }
.fig-note p { margin: 0; }

/* svg text tokens — never the series colour */
.axis text { fill: var(--muted); font-size: 11px; }
.axis line { stroke: var(--rule); }
.axis .major { stroke: var(--rule); }
.axis .minor { stroke: var(--rule-soft); }
.lane-label { fill: var(--ink); font-family: var(--serif-body); font-size: 14px; }
.lane-sub { fill: var(--muted); font-size: 10.5px; }
.lane-rule { stroke: var(--rule-soft); }
.custody-bar { fill: var(--custody); }
.custody-bar.other { fill: var(--custody); opacity: 0.55; }
.custody-hatch { fill: url(#hatch); stroke: var(--custody-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.mark { fill: var(--ink); }
.mark.hollow { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1.6; }
.mark.x { stroke: var(--ink-2); stroke-width: 1.8; fill: none; }
.mark.hc { fill: var(--ink-2); }
.mark.sc.granted { fill: var(--granted); stroke: var(--paper); stroke-width: 2; }
.mark.sc.refused { fill: var(--refused); stroke: var(--paper); stroke-width: 2; }
.mark.renew { fill: var(--paper); stroke: var(--refused); stroke-width: 1.6; stroke-dasharray: 2 2; }
.dlabel { fill: var(--ink); font-size: 11px; }
.dlabel.muted { fill: var(--muted); }
.dlabel.strong { font-weight: 600; }
.band { fill: var(--refused-wash); }
.band-edge { stroke: var(--refused); stroke-width: 1; stroke-dasharray: 2 3; }
.band-label { fill: var(--refused); font-size: 10.5px; letter-spacing: 0.04em; }
.today { stroke: var(--muted); stroke-dasharray: 2 4; }
.today-label { fill: var(--muted); font-size: 10.5px; }
.hit { fill: transparent; cursor: pointer; }
.hit:hover + .mark, .mark:hover { filter: brightness(1.15); }
.bar { rx: 4; ry: 4; }
.bar.granted { fill: var(--granted); }
.bar.refused { fill: var(--refused); }
.bar-label { fill: var(--ink); font-size: 12px; }
.bar-sub { fill: var(--muted); font-size: 11px; }
.refline { stroke: var(--ink-2); stroke-dasharray: 3 3; }
.refline-label { fill: var(--ink-2); font-size: 10.5px; }
.phase { fill: var(--paper-2); }
.phase.alt { fill: var(--paper-3); }
.phase-label { fill: var(--ink-2); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.dot { fill: var(--ink); }
.dot.approx { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.dot.custody { fill: var(--refused); }
.custody-run { fill: url(#hatch); }
.count { fill: var(--muted); font-size: 11px; }
.outcome-tag { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.outcome-tag.granted { fill: var(--granted); }
.outcome-tag.refused { fill: var(--refused); }

/* tooltip */
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 300px;
  background: var(--ink); color: var(--paper); padding: 9px 12px; border-radius: 6px;
  font-family: var(--serif-body); font-size: 13.5px; line-height: 1.4; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s;
}
.tip.on { opacity: 1; transform: none; }
.tip .d { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; opacity: 0.75; margin-bottom: 3px; }
.tip .r { font-family: var(--mono); font-size: 10.5px; opacity: 0.6; margin-top: 4px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.tbl th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.tbl td.mono { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.tbl td .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.tag.granted { color: var(--granted); }
.tag.refused { color: var(--refused); }
.tbl-wrap { overflow-x: auto; padding: 4px 8px 12px; }

/* ledger cards */
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--paper); padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--custody-strong); }
.card.granted::before { background: var(--granted); }
.card.refused::before { background: var(--refused); }
.card .who { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card h3 { font-size: 24px; font-variation-settings: "opsz" 48; }
.card .out { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.card .out.granted { color: var(--granted); }
.card .out.refused { color: var(--refused); }
.card .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.card dl { margin: 0; display: grid; grid-template-columns: 74px 1fr; gap: 6px 10px; font-size: 14.5px; }
.card dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.card dd { margin: 0; color: var(--ink-2); }
.card dd.finding { color: var(--ink); }

/* holdings & conditions */
.prose { max-width: var(--measure); }
.holdings { counter-reset: h; display: grid; gap: 22px; max-width: 78ch; }
.holding { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.holding .k { font-family: var(--serif-display); font-size: 30px; line-height: 1; color: var(--refused); font-variation-settings: "opsz" 72; }
.holding h3 { font-size: 20px; font-variation-settings: "opsz" 36; margin-bottom: 4px; }
.holding p { color: var(--ink-2); margin: 0; font-size: 16px; }
.conds { columns: 2; column-gap: 40px; max-width: 92ch; padding-left: 0; list-style: none; margin: 0; }
.conds li { break-inside: avoid; padding: 8px 0 8px 26px; border-bottom: 1px solid var(--rule-soft); position: relative; font-size: 15.5px; color: var(--ink-2); }
.conds li::before { content: "§"; position: absolute; left: 0; top: 8px; font-family: var(--mono); color: var(--refused); }

.callout {
  border-left: 3px solid var(--refused); padding: 10px 16px; background: var(--paper-2); max-width: var(--measure);
  font-size: 15px; color: var(--ink-2); margin: 14px 0 22px;
}
.callout b { color: var(--ink); font-weight: 600; }

footer { margin-top: 64px; padding: 28px 0 60px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
footer h3 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
footer p { margin-bottom: 8px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1), transform 0.7s cubic-bezier(0.2,0.7,0.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .cover { padding-top: 36px; }
  .cover .court { gap: 4px 14px; font-size: 11px; }
  .cause { grid-template-columns: 1fr; gap: 2px; }
  .cause .v { text-align: left; white-space: normal; }
  .sec-head { grid-template-columns: 1fr; gap: 6px; }
  .conds { columns: 1; }
  .card dl { grid-template-columns: 1fr; gap: 2px 0; }
  .card dt { padding-top: 6px; }
  .tile .n { font-size: 32px; }
}

/* =====================================================================
   The deck — one card per beat, paged by scroll-snap, moved by anime.js
   ===================================================================== */
body.deck-page { overflow: hidden; height: 100dvh; }
.deck { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.deck::-webkit-scrollbar { display: none; }
.deck { z-index: 1; }
.deck .card { position: relative; min-height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; align-items: center; padding: 8dvh 48px 10dvh calc(var(--hud-w) + 56px); box-sizing: border-box; background: transparent; gap: 0; }
:root { --hud-w: min(440px, 34vw); }

/* background scenes */
.art { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; color: var(--ink); opacity: 0.17; }
:root[data-theme="dark"] .art { opacity: 0.22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art { opacity: 0.22; } }
.art .ink { stroke: currentColor; fill: none; }
.art .ink.fill { fill: currentColor; stroke: none; }
.art .granted { stroke: var(--granted); fill: none; }
.art .refused { stroke: var(--refused); fill: none; }
.art .flame { stroke: var(--refused); fill: none; }
.art .bar { fill: none; }
.deck .card::before { content: none; }
.card-in { max-width: 720px; }

/* cover */
.tl-cover .court { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 28px; }
.tl-cover .court b { color: var(--refused); font-weight: 500; }
.tl-cover h1 { font-size: clamp(56px, 11vw, 168px); line-height: 0.88; letter-spacing: -0.025em; font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1; font-weight: 400; }
.tl-cover h1 .line { display: block; }
.tl-cover h1 em { font-style: italic; font-weight: 300; color: var(--ink-2); }
.tl-cover .lede { font-size: clamp(19px, 2.2vw, 24px); max-width: 56ch; margin: 30px 0 0; color: var(--ink-2); }
.tl-cover .key { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tl-cover .key span { display: inline-flex; align-items: center; gap: 8px; }
.k-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); display: inline-block; }
.k-dot.hollow { background: var(--paper); border: 2px solid var(--ink); }
.k-dot.granted { background: var(--granted); }
.k-dot.refused { background: var(--refused); }
.k-dot.riots { background: var(--refused-wash); border: 1.5px solid var(--refused); }
.hint { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; margin-top: 40px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hint-arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.hint:focus-visible { outline: 2px solid var(--granted); outline-offset: 4px; }

/* chapter cards */
.chap-num { font-family: var(--serif-display); font-size: clamp(64px, 12vw, 180px); line-height: 0.9; color: var(--refused); letter-spacing: -0.02em; font-variation-settings: "opsz" 144, "SOFT" 30; font-weight: 300; }
.chap-num .ch { display: inline-block; }
.chap-title { font-size: clamp(36px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.02em; font-variation-settings: "opsz" 96, "SOFT" 30; font-weight: 400; margin-top: 14px; }
.chap-deck { max-width: 60ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); margin: 18px 0 0; }

/* event cards */
.gap-lead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; transform-origin: left center; }
.gap-n { font-family: var(--serif-display); font-style: italic; font-weight: 300; font-size: clamp(26px, 3.4vw, 44px); color: var(--muted); letter-spacing: -0.01em; }
.gap-s { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ev-date { position: relative; font-family: var(--serif-display); font-size: clamp(48px, 8.5vw, 128px); line-height: 0.95; letter-spacing: -0.03em; font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1; font-weight: 400; color: var(--ink); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.18em; }
.ev-date .ch { display: inline-block; }
.ev-date .mon { font-style: italic; font-weight: 300; }
.ev-date .mon.approx { font-size: 0.72em; }
.ev-date .yr { font-family: var(--mono); font-size: 0.18em; letter-spacing: 0.16em; color: var(--muted); align-self: flex-start; margin-top: 0.5em; }
.ev-dot { position: absolute; left: -0.62em; top: 0.22em; width: 0.28em; height: 0.28em; overflow: visible; }
.ev-dot .dot-fill { fill: var(--ink); }
.ev-dot .dot-ring { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.rule { height: 2px; width: min(280px, 40%); background: var(--ink); margin: 26px 0 16px; transform-origin: left center; }
.ev-tag { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.ev-tag .tag-p { text-transform: none; letter-spacing: 0.04em; }
.ev-head { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.06; letter-spacing: -0.015em; font-variation-settings: "opsz" 72, "SOFT" 20; font-weight: 500; }
.ev-body { font-size: clamp(17px, 1.55vw, 20px); line-height: 1.5; color: var(--ink-2); margin: 14px 0 0; max-width: 62ch; }
.ev-who { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 14px; }

/* kinds */
.card.alleged .ev-dot .dot-fill { fill: none; }
.card.alleged .tag-k, .card.tag-alleged .tag-k { color: var(--refused); }
.card.alleged .ev-head { font-weight: 400; font-style: italic; }
.card.alleged .rule { background: var(--refused); opacity: 0.7; }
.card.riots .wash { position: absolute; inset: 0; background: var(--refused-wash); transform-origin: top; }
.card.riots .ev-date, .card.riots .tag-k { color: var(--refused); }
.card.riots .ev-dot .dot-fill { fill: var(--refused); } .card.riots .ev-dot .dot-ring { stroke: var(--refused); }
.card.riots .rule { background: var(--refused); }
.card.granted .ev-dot .dot-fill { fill: var(--granted); } .card.granted .ev-dot .dot-ring { stroke: var(--granted); }
.card.granted .ev-head, .card.granted .tag-k { color: var(--granted); }
.card.granted .rule { background: var(--granted); width: min(520px, 70%); }
.card.refused .ev-dot .dot-fill { fill: var(--refused); } .card.refused .ev-dot .dot-ring { stroke: var(--refused); }
.card.refused .ev-head, .card.refused .tag-k { color: var(--refused); }
.card.refused .rule { background: var(--refused); width: min(520px, 70%); transform-origin: right center; }
.card.next .ev-dot .dot-fill, .card.today .ev-dot .dot-fill { fill: none; }
.card.next .ev-dot .dot-ring { stroke: var(--refused); stroke-dasharray: 4 3; }
.card.today .ev-dot .dot-ring { stroke: var(--muted); stroke-dasharray: 4 3; }
.card.today .ev-head { color: var(--ink-2); }

/* end card */
.end-in { max-width: 66ch; font-size: 15px; color: var(--ink-2); }
.end-in h2 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.end-in p { margin-bottom: 12px; }

/* HUD */
.hud { position: fixed; left: 0; top: 0; bottom: 0; width: var(--hud-w); padding: 18px 24px 22px 32px; display: flex; flex-direction: column; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.hud-top .dot { color: var(--refused); }
.hud .theme button { padding: 2px 8px; font-size: 10.5px; }
.hud-year { position: relative; height: 1em; font-family: var(--serif-display); font-size: clamp(64px, 7vw, 104px); line-height: 1; letter-spacing: -0.03em; font-variation-settings: "opsz" 144, "SOFT" 20; font-weight: 400; margin-top: 34px; transition: opacity 0.4s; }
.hud-year > span { position: absolute; left: 0; top: 0; white-space: nowrap; }
.hud-year .next { opacity: 0; }
.hud-count { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 18px; line-height: 1.4; }
.hud-count b { color: var(--ink); font-weight: 500; font-size: 16px; }
.hud-chapter { font-family: var(--serif-body); font-style: italic; font-size: 16px; color: var(--ink-2); margin-top: 8px; min-height: 1.4em; }
.cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule-soft); }
.face { margin: 0; text-align: center; will-change: opacity, transform; }
.face-img { position: relative; }
.face img, .face svg.init { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; filter: url(#rough) grayscale(1); mix-blend-mode: multiply; }
:root[data-theme="dark"] .face img { filter: url(#rough) grayscale(1) invert(1); mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .face img { filter: url(#rough) grayscale(1) invert(1); mix-blend-mode: screen; } }
.face .init-bg { fill: var(--paper-2); }
.face .init-line { fill: none; stroke: var(--ink-2); stroke-width: 1.1; stroke-dasharray: 210 12 40 8; stroke-linecap: round; }
.face .init-line.thin { stroke-width: 0.7; stroke-dasharray: 120 30 90 20; opacity: 0.7; }
.face .init-t { fill: var(--ink-2); font-family: var(--serif-display); font-style: italic; font-size: 36px; font-variation-settings: "opsz" 72, "SOFT" 40; }
.face .ring { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); pointer-events: none; }
.face .ring circle { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; }
.face.on .ring circle { stroke: var(--ink); }
.face figcaption { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--muted); margin-top: 8px; line-height: 1.25; }
.face.on figcaption { color: var(--ink); }
.facts { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.facts-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--refused); margin-bottom: 8px; }
.facts-list { margin: 0; }
.fact { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 0 10px; padding: 5px 0; border-bottom: 1px solid var(--rule-soft); align-items: baseline; }
.fact:last-child { border-bottom: 0; }
.fact dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--muted); line-height: 1.35; }
.fact dd { margin: 0; font-family: var(--serif-body); font-size: 14.5px; line-height: 1.3; color: var(--ink); font-variation-settings: "opsz" 12; }
.deck .card dl.card-facts { display: none; }
.hud-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hud-nav button { all: unset; cursor: pointer; width: 30px; height: 30px; border: 1px solid var(--rule); border-radius: 50%; text-align: center; line-height: 30px; color: var(--ink-2); margin-left: 4px; }
.hud-nav button:hover { border-color: var(--ink); color: var(--ink); }
.hud-nav button:focus-visible { outline: 2px solid var(--granted); }
.hud-fig { margin-left: auto; }
body.on-cover .hud-year, body.on-cover .hud-count, body.on-cover .hud-chapter, body.on-cover .cast { opacity: 0; transition: opacity 0.4s; }
.hud-year, .hud-count, .hud-chapter, .cast { transition: opacity 0.4s; }

/* rail */
.rail { position: fixed; right: 22px; top: 12dvh; bottom: 12dvh; width: 2px; z-index: 10; }
.rail-track { position: absolute; inset: 0; background: var(--rule); }
.rail-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: top; }
.rail-ticks .tick { all: unset; cursor: pointer; position: absolute; left: -8px; width: 18px; height: 18px; transform: translateY(-50%); display: grid; place-items: center; }
.rail-ticks .tick::before { content: ""; width: 8px; height: 8px; background: var(--paper); border: 1.5px solid var(--ink-2); transform: rotate(45deg); }
.rail-ticks .tick span { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.rail-ticks .tick:hover span, .rail-ticks .tick:focus-visible span { opacity: 1; }

@media (prefers-reduced-motion: reduce) { .hint-arrow { animation: none; } .deck { scroll-behavior: auto; } }

@media (max-width: 900px) {
  .deck .card { padding: 128px 20px 60px 20px; align-items: start; min-height: 100dvh; }
  .deck { scroll-snap-type: y proximity; }
  .card-in { max-width: none; }
  .ev-date { font-size: clamp(44px, 15vw, 96px); padding-left: 0; }
  .ev-dot { display: none; }
  .ev-body { font-size: 16.5px; }
  .ev-head { font-size: clamp(26px, 7vw, 40px); }
  :root { --hud-w: 0px; }
  .hud { width: auto; right: 0; bottom: auto; height: auto; padding: 10px 16px 8px; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
  .hud-top { order: 5; width: 100%; }
  .hud-year { font-size: 30px; margin: 0; height: auto; position: static; }
  .hud-year > span { position: static; }
  .hud-year .next { display: none; }
  .hud-count { margin: 0; font-size: 11.5px; }
  .hud-count b { font-size: 13px; }
  .hud-chapter { display: none; }
  .cast { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; gap: 5px; }
  .face { width: 26px; }
  .face figcaption { display: none; }
  .face .ring { inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); }
  .art { opacity: 0.09; }
  .hud-foot { display: none; }
  .facts { display: none; }
  .deck .card dl.card-facts { display: block; margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--rule-soft); gap: 0; }
  .deck .card .card-facts .fact { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: 0 10px; padding: 6px 0; border-bottom: 1px solid var(--rule-soft); }
  .deck .card .card-facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--muted); padding: 0; }
  .deck .card .card-facts dd { margin: 0; font-family: var(--serif-body); font-size: 15px; color: var(--ink); }
  .rail { right: 8px; top: 20dvh; bottom: 8dvh; }
  .rail-ticks .tick span { display: none; }
  body.on-cover .hud-year, body.on-cover .hud-count, body.on-cover .cast { opacity: 1; }
  .tl-cover h1 { font-size: clamp(64px, 20vw, 120px); }
}
