:root {
  --bg: #f4ede1;
  --fg: #1f1915;
  --text: #3d342d;
  --muted: #6f6257;
  --line: #d9ccb8;
  --yes: #2f6b3a;
  --no: #9b1c1c;
  --mark: #b8892f;
  --left: #e9dfcf;
  --glow: rgba(155, 28, 28, .10);
  /* One family throughout: Bodoni Moda. Its optical-size axis sets the stroke contrast. */
  --serif: "Bodoni Moda", Didot, "Bodoni 72", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110e;
    --fg: #eee5d8;
    --text: #d2c8ba;
    --muted: #a29482;
    --line: #362c22;
    --yes: #7fbf8a;
    --no: #e05a50;
    --mark: #b8892f;
    --left: #231c16;
    --glow: rgba(224, 90, 80, .12);
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.7 var(--serif); font-variant-numeric: lining-nums;
  /* Smallest optical size = lowest stroke contrast, for everything below the hero. */
  font-variation-settings: "opsz" 6; }
/* Fixed backdrop: a warm glow behind the answer, a soft vignette, and faint paper grain. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, var(--glow), transparent 70%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .10)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}
a { color: inherit; }
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 2.2rem; font-weight: 400; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.5rem; font-weight: 400; margin: 56px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.note, .src { color: var(--muted); }
.note { font-size: .9rem; }
.src { font-size: .88rem; }

nav { display: flex; gap: 24px; justify-content: center; padding: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 1.05rem; }
nav a[aria-current] { font-weight: 700; text-decoration: none; }

/* Hero: equal top and bottom rows keep the answer dead centre of the viewport.
   The bottom row centres the countdown between the answer and the status line. */
.hero { font-variation-settings: normal; height: 100vh; height: 100svh; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; padding: 24px 16px; }
.hero .answer { grid-row: 2; }
.hero .below { grid-row: 3; }
.answer { font-size: clamp(6rem, 30vw, 16rem); font-weight: 900; font-variation-settings: "opsz" 28; line-height: .9; letter-spacing: -.01em; color: var(--no); margin: 0; }
.answer.yes { color: var(--yes); }
.hero .below { display: flex; flex-direction: column; width: 100%; }
.hero .under { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(560px, 100%); margin: 0 auto; }
.hero .under .note { margin-bottom: 0; }
.hero .status { text-align: center; color: var(--muted); font-style: italic; margin: 0; }

/* Countdown */
.count { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center; }
.count b { display: block; font-size: clamp(1.8rem, 8vw, 3rem); font-weight: 400; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.count span { font-size: .9rem; color: var(--muted); }
.center { text-align: center; }

/* Day grid: one block per month, one square per day. */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.month h3 { font-size: .9rem; margin: 0 0 6px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.day { aspect-ratio: 1; border-radius: 3px; display: grid; place-items: center; font-size: .75rem; font-variant-numeric: lining-nums tabular-nums; background: var(--left); }
.day.past { background: none; color: var(--muted); text-decoration: line-through; opacity: .5; }
.day.ev { box-shadow: inset 0 0 0 2px var(--mark); }
.day.today { outline: 2px solid var(--fg); }
.day.end { background: var(--no); color: var(--bg); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 4px; background: var(--left); }
.legend i.ev { box-shadow: inset 0 0 0 2px var(--mark); }
.legend i.end { background: var(--no); }

/* Timeline and case lists */
ol.list { list-style: none; padding: 0; margin: 0; }
ol.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ol.list > li.future { opacity: .6; }
ol.list p { margin: 4px 0 0; }
time { font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.tag { font-size: .8rem; border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; margin-left: 6px; color: var(--muted); }
.case h3 { font-size: 1rem; margin: 0; }
.case .meta { color: var(--muted); font-size: .85rem; }
.case .chain { margin: 8px 0; padding-left: 20px; }
.case .chain li { margin: 2px 0; }
.day.pulled { background: var(--fg); color: var(--bg); text-decoration: none; opacity: 1; }
.legend i.pulled { background: var(--fg); }

/* Danger section on index.html */
.lede { font-size: 1.2rem; }
.dangers { list-style: none; padding: 0; margin: 0; counter-reset: d; }
.dangers li { counter-increment: d; position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--line); }
.dangers li::before { content: counter(d, upper-roman) "."; position: absolute; left: 0; top: 12px; color: var(--no); font-weight: 700; }
.dangers h3 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.dangers p { margin: 4px 0 0; }

footer { text-align: center; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); }

/* Cases: each one collapses to a name and a one-line hook; click to expand. */
.case details > summary { list-style: none; cursor: pointer; position: relative; padding-right: 32px; }
.case details > summary::-webkit-details-marker { display: none; }
.case details > summary::after { content: "+"; position: absolute; right: 4px; top: 0; font-size: 1.4rem; line-height: 1.2; color: var(--no); }
.case details[open] > summary::after { content: "\2212"; }
.case .who { display: block; }
.case .hook { display: block; color: var(--muted); font-style: italic; }
.case details > summary:hover .who { color: var(--no); }
.case details[open] > summary { margin-bottom: 8px; }
.case:target { scroll-margin-top: 16px; }

/* Timeline: dates on the left, a vertical axis with a dot per event, details on the right. */
.tl { --axis: 104px; list-style: none; margin: 32px 0 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: var(--axis); top: 0; bottom: 0; width: 1px; background: var(--fg); opacity: .25; }
.tl > li { display: grid; grid-template-columns: var(--axis) 1fr; position: relative; }
.tl-item { padding: 10px 0; }
.tl-item time { text-align: right; padding: 4px 22px 0 0; font-size: .9rem; color: var(--muted); }
.tl-item::before { content: ""; position: absolute; left: calc(var(--axis) - 6px); top: 19px; width: 13px; height: 13px; border-radius: 50%; background: var(--dot, var(--muted)); box-shadow: 0 0 0 4px var(--bg); }
.tl-card { padding-left: 28px; }
.tl-card h3 { font-size: 1.1rem; font-weight: 700; margin: 2px 0 0; line-height: 1.35; }
.tl-card p { margin: 4px 0 0; }
.tl-card .tag { margin-left: 0; }
.tl-item.future .tl-card { opacity: .6; }
.tl-item.future::before { background: var(--bg); box-shadow: 0 0 0 4px var(--bg), inset 0 0 0 2px var(--dot, var(--muted)); }
.tag-lawsuit { --dot: var(--no); }
.tag-end { --dot: var(--no); }
.tag-shutdown { --dot: var(--fg); }
.tag-scandal { --dot: var(--mark); }
.tag-lawsuit .tag, .tag-end .tag { color: var(--no); border-color: var(--no); }
.tl-year span { grid-column: 1; text-align: right; padding: 28px 22px 4px 0; font-size: 2rem; line-height: 1; }
.tl-now { padding: 14px 0; color: var(--no); }
.tl-now span { text-align: right; padding-right: 22px; font-weight: 700; }
.tl-now b { padding-left: 28px; font-weight: 400; color: var(--no); }
.tl-now::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--no); opacity: .6; }
.tl-now span, .tl-now b { position: relative; background: var(--bg); justify-self: end; }
.tl-now b { justify-self: start; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; color: var(--muted); }
.tl-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--dot, var(--muted)); }

@media (max-width: 600px) {
  .tl { --axis: 6px; }
  .tl > li { grid-template-columns: 1fr; padding-left: 28px; }
  .tl-item time, .tl-year span, .tl-now span { text-align: left; padding: 0; }
  .tl-item time { padding-top: 0; }
  .tl-card { padding-left: 0; }
  .tl-item::before { top: 15px; }
  .tl-year span { padding: 24px 0 4px; }
  .tl-now b { padding-left: 0; }
  .tl-now span, .tl-now b { justify-self: start; }
}

/* After the shutdown: plain white page, only YES in the hero. Uses the light palette even in dark mode. */
body.dead {
  --bg: #fff;
  --fg: #1f1915;
  --text: #3d342d;
  --muted: #6f6257;
  --line: #e4ddd2;
  --left: #f1ece4;
  --yes: #2f6b3a;
  --no: #9b1c1c;
  background: #fff;
}
body.dead::before { background: radial-gradient(ellipse 45% 35% at 50% 50vh, rgba(47, 107, 58, .07), transparent 70%); }
body.dead .hero .below { display: none; }
/* Script capitals don't work in all caps, so YES is shown as "Yes". */
body.dead .answer { font-family: "Pinyon Script", "Snell Roundhand", cursive; font-weight: 400; font-variation-settings: normal; letter-spacing: 0; line-height: 1.2; text-transform: lowercase; }
body.dead .answer::first-letter { text-transform: uppercase; }

/* A soft green shadow lifts the YES off the white page. */
body.dead .answer {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .9),
    0 2px 2px rgba(47, 107, 58, .18),
    0 10px 28px rgba(47, 107, 58, .22);
}


/* Bold and headings use the full-strength ink; regular text is a step softer. */
strong, b, h1, h2, h3, .who, time, nav a[aria-current] { color: var(--fg); }
/* Bold is set extra heavy so it stands well apart from regular text. */
strong, .who, .dangers h3, .tl-card h3 { font-weight: 800; }
