/* greenwich-meridian: observatory night and brass. Light + dark via html.dark. */
@font-face {
  font-family: Fraunces; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/fraunces-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Fraunces; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/fraunces-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/source-serif-4-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/source-serif-4-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --paper: #f2efe4;
  --paper-2: #e6e1d0;
  --ink: #20242c;
  --ink-soft: #343945;
  --muted: #3f4552;
  --line: #c9c3ad;
  --accent: #0e3a53;
  --accent-ink: #f4f1e6;
  --brass: #8a6d2f;
  --chip: #e0dac4;
  --card: #faf8f1;
  --good: #175c30;
  --bad: #a01c1c;
  --focus: #1a4fd6;
  --shadow: 0 1px 2px rgba(32, 36, 44, 0.12), 0 4px 18px rgba(32, 36, 44, 0.08);
  --radius: 10px;
  --measure: 42rem;
  --bar-h: 44px;
}
html.dark {
  --paper: #10151b;
  --paper-2: #1a212b;
  --ink: #e9ecf1;
  --ink-soft: #cdd3dc;
  --muted: #a3adbb;
  --line: #2c3542;
  --accent: #d9a441;
  --accent-ink: #141a22;
  --brass: #d9a441;
  --chip: #222b37;
  --card: #171e27;
  --good: #7fd79a;
  --bad: #f08a8a;
  --focus: #9db9ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 18px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.075rem;
  line-height: 1.65;
}
h1, h2, h3, .kicker, .topbar, .rail, .chip, button, input, .act-date {
  font-family: Fraunces, "Source Serif 4", Georgia, serif;
}
a { color: var(--accent); }
html.dark a { color: #e8bd6d; }
a:visited { color: var(--accent); }
html.dark a:visited { color: #e8bd6d; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main { display: block; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
section { scroll-margin-top: calc(var(--bar-h) + 12px); padding: 2.5rem 0 0.5rem; }
h2 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
h2 .anchor { color: inherit; text-decoration: none; }
h2 .anchor:hover { text-decoration: underline; }
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.4rem;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); margin-top: 0; }

/* ------------------------------------------------------------ topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 0.75rem;
  min-height: var(--bar-h); padding: 0 0.9rem;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.topbar .home { font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.topnav { display: flex; gap: 0.15rem; overflow-x: auto; }
.topnav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.92rem;
  padding: 0.3rem 0.55rem; border-radius: 6px; white-space: nowrap;
}
.topnav a:hover { background: var(--chip); color: var(--ink); }
.topbar .spacer { flex: 1 1 auto; }
.topbar .chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem;
  font-size: 0.85rem; text-decoration: none; color: var(--ink); background: var(--card);
  white-space: nowrap;
}
.icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; width: 1.9rem; height: 1.9rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}

/* ---------------------------------------------------------------- rail */
.rail {
  position: fixed; right: 0.6rem; top: 50%; transform: translateY(-50%);
  display: none; flex-direction: column; align-items: flex-end; gap: 0.35rem; z-index: 40;
}
@media (min-width: 1100px) { .rail { display: flex; } }
.rail a {
  position: relative; display: block; text-decoration: none;
  color: var(--muted); font-size: 0.75rem; line-height: 1;
  padding: 0.3rem 0 0.3rem 0.6rem;
}
.rail a i { display: block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--line); }
.rail a span {
  position: absolute; right: calc(100% + 0.1rem); top: 50%; transform: translateY(-50%);
  white-space: nowrap; opacity: 0; transition: opacity 0.15s; pointer-events: none;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 3rem 0 1rem; }
.kicker { font-size: 0.82rem; letter-spacing: 0.16em; color: var(--accent); margin: 0 0 0.7rem; font-weight: 700; }
html.dark .kicker { color: var(--accent); }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); line-height: 1.08; margin: 0 0 0.9rem; letter-spacing: -0.02em; }
.hero-answer {
  font-size: 1.3rem; line-height: 1.45; margin: 0 0 0.9rem;
  border-left: 4px solid var(--accent); padding-left: 0.9rem; color: var(--ink);
}
.deck { color: var(--ink-soft); font-size: 1.1rem; margin: 0 0 1.2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.4rem; }
.cta {
  display: inline-block; background: var(--accent); color: var(--accent-ink) !important;
  font-weight: 700; text-decoration: none; padding: 0.6rem 1.3rem; border-radius: 999px;
  font-size: 1.02rem;
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 0; padding: 0; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.75rem; }
.facts dt { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
html.dark .facts dt { color: var(--accent); }
.facts dd { margin: 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.card-early { margin: 0.45rem 0; }

/* ---------------------------------------------------------------- beats */
.beats { list-style: none; margin: 1rem 0; padding: 0; counter-reset: beat; }
.beats > li {
  counter-increment: beat; position: relative; padding: 0.9rem 0 0.9rem 3.2rem;
  border-bottom: 1px solid var(--line);
}
.beats > li::before {
  content: counter(beat, decimal-leading-zero);
  position: absolute; left: 0; top: 0.9rem;
  font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.3rem;
  color: var(--accent);
}
.beats h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.beats p { margin: 0; }
.gloss { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; }

/* -------------------------------------------------------------- machine */
.machine {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem; margin: 1rem 0;
}
.machine label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.machine input[type="range"] { width: 100%; accent-color: var(--accent); }
#lon-read { font-size: 1.25rem; font-weight: 700; margin: 0.7rem 0; min-height: 2em; }
.strip-note { margin: 0.5rem 0 0; }
.machine-note { font-size: 0.9rem; color: var(--muted); margin: 0.5rem 0 0; }
.machine-table table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
.machine-table th, .machine-table td {
  text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line);
}
.machine-table th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .axis { stroke: var(--ink-soft); stroke-width: 2; }
.diagram line { stroke: var(--muted); stroke-width: 1.5; }
.diagram text { fill: var(--ink-soft); font-size: 13px; font-family: Fraunces, Georgia, serif; }
.diagram .lab { font-weight: 700; fill: var(--ink); font-size: 14px; }
.diagram .gap { font-style: italic; }
.diagram .mark-old { fill: var(--brass); }
.diagram .mark-new { fill: var(--accent); }
html.js .stack-only { display: none; }
html:not(.js) .needs-js { display: none; }
.honest { font-size: 0.9rem; color: var(--muted); }

/* ----------------------------------------------------------------- acts */
.acts { list-style: none; margin: 1rem 0; padding: 0; }
.acts > li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.act-date {
  display: inline-block; font-weight: 700; font-size: 1rem; color: var(--accent-ink);
  background: var(--accent); border-radius: 6px; padding: 0.1rem 0.6rem; margin: 0 0 0.3rem;
}
.acts h3 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.acts p { margin: 0; }

/* ---------------------------------------------------------------- stops */
.stops { list-style: none; margin: 1rem 0; padding: 0; counter-reset: stop; }
.stops > li {
  counter-increment: stop; position: relative; padding: 0.9rem 0 0.9rem 3.2rem;
  border-bottom: 1px solid var(--line);
}
.stops > li::before {
  content: counter(stop, decimal-leading-zero);
  position: absolute; left: 0; top: 0.9rem;
  font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.3rem;
  color: var(--accent);
}
.stops h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.stops p { margin: 0; }
.stops .anchor { font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }

/* ---------------------------------------------------------------- words */
.word { margin: 1.2rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.word h3 { margin: 0; font-size: 1.3rem; }
.word .work { margin: 0.1rem 0 0.5rem; color: var(--muted); font-size: 0.95rem; }
.word blockquote {
  margin: 0.5rem 0; padding: 0.6rem 1rem; font-size: 1.12rem; line-height: 1.6;
  border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 8px 8px 0;
}
.word .gloss { margin: 0.4rem 0 0; }

/* -------------------------------------------------------------- sources */
.src-groups { display: grid; gap: 1rem; margin-top: 1rem; }
.src-groups h3 { font-size: 1.05rem; margin: 0 0 0.3rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.src-groups ul { margin: 0; padding-left: 1.1rem; }
.src-groups li { margin-bottom: 0.4rem; }
.src-groups li::marker { color: var(--accent); }
.small { font-size: 0.88rem; color: var(--muted); }

/* ------------------------------------------------------------------ faq */
.faq details { border: 1px solid var(--line); border-radius: 8px; margin: 0.5rem 0; background: var(--card); }
.faq summary { cursor: pointer; padding: 0.7rem 1rem; font-weight: 700; }
.faq details p { padding: 0 1rem 0.8rem; margin: 0; }
.receipt { border: 1px solid var(--line); border-radius: 8px; margin: 1rem 0; background: var(--card); }
.receipt summary { cursor: pointer; padding: 0.7rem 1rem; font-weight: 700; }
.receipt p { padding: 0 1rem 0.8rem; margin: 0; }

/* --------------------------------------------------------------- figures */
figure { margin: 1.5rem 0; }
.paper { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem; box-shadow: var(--shadow); }
.paper img { display: block; width: 100%; height: auto; border-radius: 6px; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; }
figcaption details { margin-top: 0.35rem; font-size: 0.85rem; }
figcaption summary { cursor: pointer; }
.hero-strip { margin-left: 0; margin-right: 0; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 3rem; }
footer p { font-size: 0.9rem; color: var(--muted); margin: 0.3rem 0; }
.toc { columns: 2; margin: 1rem 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.25rem; break-inside: avoid; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 0.5rem; top: 0.5rem; background: var(--card); padding: 0.5rem 1rem; z-index: 99; }
.nf main { max-width: var(--measure); margin: 0 auto; padding: 3rem 1.25rem; }

/* ---------- v1.1 scroll scene: the noon line, the vote, the courtyard ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noon { position: relative; overflow: clip; padding: 0; background: #0b1320; color: #e9ecf1; }
.noon a { color: #f2c35b; }
.scene-wrap { display: none; }
html.js .scene-wrap { display: block; position: sticky; top: 0; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; }
html.js.no-scene .scene-wrap { display: none; }
#scene { display: block; width: 100%; height: 100%; }
.noon .step { position: relative; z-index: 1; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding: calc(var(--bar-h) + 1rem) 1.25rem 2rem; scroll-margin-top: 0; }
.noon .step .card {
  max-width: 27rem; background: rgba(11, 19, 32, 0.86); border: 1px solid rgba(217, 164, 65, 0.35);
  border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
@media (min-width: 900px) { .noon .step { padding-left: max(2rem, 5vw); } }
@media (max-width: 699px) {
  html.js .noon .step { align-items: flex-end; padding-bottom: 1.5rem; }
  html.js .noon .step:not(.hero) { min-height: 118svh; }
  .noon .step .card { font-size: 0.97rem; line-height: 1.55; padding: 1rem 1.05rem; }
  .noon .step h2 { font-size: 1.3rem; }
}
.noon .step h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); line-height: 1.2; margin: 0 0 0.6rem; }
.noon .step h2 a.anchor { color: #e9ecf1; text-decoration: none; }
.noon .step p { margin: 0 0 0.6rem; color: #d5dbe4; }
.noon .step b[data-out] { color: #f2c35b; font-weight: 700; white-space: nowrap; }
.noon .hero .card { max-width: 32rem; }
.noon .hero h1 { color: #fff; font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; margin: 0.2rem 0 0.8rem; }
.noon .kicker { color: #f2c35b; letter-spacing: 0.12em; font-size: 0.78rem; margin: 0; }
.noon .deck { font-size: 1.12rem; color: #e9ecf1; }
.noon .cta { background: #f2c35b; color: #0b1320 !important; }
.noon .place { border-top: 1px solid rgba(233, 236, 241, 0.18); margin-top: 0.8rem; padding-top: 0.8rem; font-size: 0.95rem; }
.noon .place-how { color: #a3adbb; font-style: italic; }
.noon .place label { display: block; font-family: Fraunces, Georgia, serif; font-weight: 600; margin-bottom: 0.3rem; }
.noon .place-row { display: flex; gap: 0.5rem; }
.noon .place input { flex: 1; min-width: 0; min-height: 44px; padding: 0.4rem 0.7rem; border-radius: 8px; border: 1px solid #3f566b; background: #12233a; color: #e9ecf1; font-size: 1rem; }
.noon .place button, .noon .linkish { min-height: 44px; }
.noon .place button[type=submit] { padding: 0 1rem; border-radius: 8px; border: 0; background: #f2c35b; color: #0b1320; font-weight: 700; cursor: pointer; }
.noon .linkish { background: none; border: 0; padding: 0.3rem 0; color: #8fd3ff; text-decoration: underline; cursor: pointer; font-size: 0.95rem; }
.noon #place-status { min-height: 1.4em; color: #8fd3ff; margin: 0.2rem 0 0; }
.noon .method { min-height: auto; padding-top: 3rem; padding-bottom: 4rem; }
.noon .method summary { cursor: pointer; font-family: Fraunces, Georgia, serif; font-weight: 600; color: #f2c35b; }
.noon .noon-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 0.6rem; }
.noon .noon-table caption { text-align: left; font-weight: 600; padding-bottom: 0.3rem; }
.noon .noon-table td, .noon .noon-table th { border-bottom: 1px solid rgba(233, 236, 241, 0.15); padding: 0.3rem 0.4rem; text-align: left; }
html:not(.js) .noon .step { min-height: auto; padding: 1.2rem 1.25rem; }
html:not(.js) .noon .hero { padding-top: calc(var(--bar-h) + 2rem); }
.longer { padding: 3rem 0 0; }
.longer .eyebrow { font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) { .noon .step .card { -webkit-backdrop-filter: none; backdrop-filter: none; } }
.noon .hero-noon { color: #f2c35b; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.08rem; min-height: 1.5em; }
.noon .ics-btn { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid #f2c35b; background: transparent; color: #f2c35b; font-weight: 600; cursor: pointer; }
