@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0218-021B, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --serif: "Newsreader", Georgia, serif;
  --sans: "Newsreader", Georgia, serif;
  --mono: "Newsreader", Georgia, serif;
  --bg: #f6f3ec; --surface: #fffdf8; --ink: #1c1a17; --muted: #4a453e; --line: #d9d2c4;
  --accent: #733f00; --focus: #1f5fbf;
  --sun: #e39a0b; --sun-glow: rgba(255, 196, 64, .6); --hidden: #6d7280; --ref: #8f8a80; --grid: rgba(28, 26, 23, .09);
  --sky-top: #d9e6f0; --sky-low: #f6eedd; --land-top: #4b5160; --land-low: #2f3440; --ridge: #1d2029;
  --c-night: #232a40; --c-shade: #9aa3b8; --c-sun: #f4b43a;
  --l-lit: #ffd97a; --l-dim: #b3a58c; --l-shadow: #2e3a6b; --l-night: #161b2c; --l-sea: #c9d6e0;
  --q0: #cfc8bb; --q1: #efc660; --q2: #e58d35; --q3: #bf4a2a; --q4: #6e1c3b;
  --border: rgba(28, 26, 23, .35); --border-strong: rgba(20, 20, 30, .55);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10131a; --surface: #171b24; --ink: #eee8de; --muted: #bdb5a8; --line: #2e3442;
    --accent: #f2b85a; --focus: #8ab8ff;
    --sun: #ffbf3c; --sun-glow: rgba(255, 190, 60, .5); --hidden: #8d94a4; --ref: #7f8594; --grid: rgba(238, 232, 222, .08);
    --sky-top: #0c1628; --sky-low: #2b2a36; --land-top: #454b5b; --land-low: #262a35; --ridge: #b4bac8;
    --c-night: #0a0d15; --c-shade: #414d6a; --c-sun: #f2b632;
    --l-lit: #ffcf66; --l-dim: #4a4640; --l-shadow: #17204a; --l-night: #0a0d17; --l-sea: #22314a;
    --q0: #4a4f5c; --q1: #d9b04c; --q2: #e0843a; --q3: #e0573a; --q4: #ff8fb3;
    --border: rgba(238, 232, 222, .35); --border-strong: rgba(238, 232, 222, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10131a; --surface: #171b24; --ink: #eee8de; --muted: #bdb5a8; --line: #2e3442;
  --accent: #f2b85a; --focus: #8ab8ff;
  --sun: #ffbf3c; --sun-glow: rgba(255, 190, 60, .5); --hidden: #8d94a4; --ref: #7f8594; --grid: rgba(238, 232, 222, .08);
  --sky-top: #0c1628; --sky-low: #2b2a36; --land-top: #454b5b; --land-low: #262a35; --ridge: #b4bac8;
  --c-night: #0a0d15; --c-shade: #414d6a; --c-sun: #f2b632;
  --l-lit: #ffcf66; --l-dim: #4a4640; --l-shadow: #17204a; --l-night: #0a0d17; --l-sea: #22314a;
  --q0: #4a4f5c; --q1: #d9b04c; --q2: #e0843a; --q3: #e0573a; --q4: #ff8fb3;
  --border: rgba(238, 232, 222, .35); --border-strong: rgba(238, 232, 222, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 56px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 19px/1.6 var(--serif); font-variant-numeric: lining-nums; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 .5em; }
h3 { font-size: 23px; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 700; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font-size: 15px; }
.home { color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.topnav { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--muted); text-decoration: none; white-space: nowrap; padding: 12px 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current] { color: var(--ink); border-bottom-color: var(--sun); }
.spacer { flex: 1; }
.chip { color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 50%; }
.icon-btn:hover { background: var(--line); }

/* reading rail */
.rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 20; display: none; flex-direction: column; gap: 10px; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); text-decoration: none; font-size: 13px; }
.rail a span { opacity: 0; transition: opacity .2s; background: var(--surface); padding: 1px 6px; border-radius: 4px; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }
.rail i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); }
.rail a[aria-current] i { background: var(--sun); border-color: var(--sun); }
@media (min-width: 1280px) { .rail { display: flex; } }

main { display: block; }
.prose { max-width: 700px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sec { padding: 72px 0 24px; }
.lede { font-size: 20px; }

/* opening */
#soare { padding-top: 28px; }
.opening { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; gap: 8px 40px; grid-template-columns: minmax(0, 1fr); }
.kicker { font: 700 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0; }
h1 { font-size: clamp(38px, 6.4vw, 72px); margin: 0; max-width: 15ch; }
.deck { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.5; max-width: 40em; margin: 6px 0 0; }
@media (min-width: 980px) { .opening { grid-template-columns: 1.05fr 1fr; align-items: end; } .deck { margin: 0 0 8px; } }

.finder { max-width: 1180px; margin: 24px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.field { position: relative; display: flex; flex-direction: column; gap: 4px; flex: 1 1 300px; max-width: 460px; }
.field label { font-size: 15px; font-weight: 700; }
.field input { font: inherit; font-size: 19px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); color: var(--ink); min-height: 50px; }
#where-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 25; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
#where-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
#where-list li[aria-selected="true"], #where-list li:hover { background: var(--line); }
#where-list li.empty { cursor: default; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; margin: 0; }
.quick > span { color: var(--muted); }
.answer { display: none; max-width: 1180px; margin: 14px auto 0; padding: 0 16px; font: 600 19px/1.4 var(--serif); }
.answer::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 999px) { .answer { display: block; } }

.btn { font: inherit; font-size: 15px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { border-color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.btn svg { flex: none; }

/* the stage */
.stage { max-width: 1180px; margin: 20px auto 0; padding: 0 16px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .stage { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
.panel canvas { display: block; width: 100%; }
.panel h2.small, .panel .ph { font: 700 15px/1.3 var(--sans); margin: 0 0 8px; letter-spacing: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend .sun { background: var(--c-sun); } .legend .shade { background: var(--c-shade); } .legend .night { background: var(--c-night); }
.legend .line-sun { height: 4px; background: var(--sun); } .legend .line-hid { height: 0; border-top: 2px dotted var(--hidden); border-radius: 0; }
.legend .line-ref { height: 0; border-top: 2px dotted var(--ref); border-radius: 0; }

.readout { display: flex; flex-direction: column; gap: 12px; }
.readout .place { font: 600 26px/1.15 var(--serif); margin: 0; }
.readout .date { font: 700 14px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 0; }
#day-text { font-size: 19px; line-height: 1.5; margin: 0; }
#year-text { font-size: 16px; color: var(--ink); margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
#ground { font-size: 14px; color: var(--muted); margin: 0; }
.slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 15px; }
.slider input[type=range] { width: 100%; accent-color: var(--sun); min-height: 44px; }
.slider output { font: 600 17px var(--serif); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.quick-days { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-days .btn { min-height: 40px; font-size: 14px; padding: 6px 12px; }
#status { min-height: 1.4em; font-size: 15px; color: var(--muted); margin: 0; }
.cal-wrap { margin-top: 18px; }
#cal { cursor: crosshair; }
.failed-note { background: var(--surface); border-left: 4px solid var(--accent); padding: 10px 14px; }
.failed-note[hidden] { display: none; }
[data-state="ready"] .noscript { display: none; }
.noscript { max-width: 1148px; margin: 16px auto; }

/* numbers */
.big { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 28px 0; }
.big div { border-top: 3px solid var(--sun); padding-top: 10px; }
.big b { display: block; font: 600 clamp(34px, 5vw, 48px)/1 var(--serif); }
.big span { display: block; font-size: 16px; color: var(--muted); margin-top: 6px; }

/* maps */
.mapwrap { position: relative; margin: 18px 0 0; }
.mapwrap canvas { display: block; width: 100%; border-radius: 12px; }
#national { cursor: pointer; }
#nat-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; max-width: 280px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; }
.ramp { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); margin-top: 10px; }
.ramp i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.ramp .q0 { background: var(--q0); } .ramp .q1 { background: var(--q1); } .ramp .q2 { background: var(--q2); } .ramp .q3 { background: var(--q3); } .ramp .q4 { background: var(--q4); }
.light-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.light-bar .slider { flex: 1 1 280px; }
.light-read { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 16px; margin-top: 8px; }
#light-time { font-weight: 700; }

/* the photograph */
.evidence { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); margin-top: 22px; }
@media (min-width: 900px) { .evidence { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.evidence figure { margin: 0; }
.evidence img { display: block; width: 100%; height: auto; border-radius: 12px; }
.evidence .panel canvas { display: block; width: 100%; }
.stamp { font: 400 15px var(--mono); }

/* tables */
.tablewrap { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
caption { text-align: left; color: var(--muted); font-size: 15px; padding-bottom: 8px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
th { font-weight: 600; font-size: 15px; }
tbody th { font-weight: 400; font-size: inherit; }
table { font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th button, td button { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; text-align: left; }
.more { margin-top: 12px; }

.method dt { font-weight: 700; margin-top: 1em; }
.method dd { margin: .2em 0 0; }
.sources li { margin-bottom: .6em; }
footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 22px 0 40px; font-size: 15px; color: var(--muted); }
footer .wide { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .topbar { gap: 10px; }
  .home { display: none; }
  .topnav { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .panel { padding: 10px; border-radius: 12px; }
  .readout .place { font-size: 23px; }
  .quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .quick .btn { flex: none; }
  .quick > span { flex: none; }
  #day-text { font-size: 18px; }
  .sec { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

.cap { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
.evsvg { display: block; width: 100%; height: auto; }
.evsvg .sky { fill: var(--sky-top); }
.evsvg .g { stroke: var(--grid); }
.evsvg .tk, .evsvg .hl { fill: var(--muted); font: 12px var(--sans); }
.evsvg .hl { font: 600 12px var(--serif); fill: var(--ink); }
.evsvg .land { fill: var(--land-top); }
.evsvg .ridge { fill: none; stroke: var(--ridge); stroke-width: 1.2; }
.evsvg .lit { fill: none; stroke: var(--sun); stroke-width: 3.5; stroke-linecap: round; }
.evsvg .hid { fill: none; stroke: var(--hidden); stroke-width: 2; stroke-dasharray: 3 4; }
.evsvg .hd { fill: var(--ink); }
.evsvg .now { fill: none; stroke: var(--ink); stroke-width: 2; }
.eyebrow { font: 700 14px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 0 0 10px; }
.readout .delay { margin: 0; display: flex; flex-direction: column; gap: 4px; }
#delay-big { font: 600 clamp(24px, 2.6vw, 30px)/1.15 var(--serif); font-variant-numeric: tabular-nums; }
#delay-sub { font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.near { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0; min-height: 4.5em; }
.near:empty { min-height: 0; }
