@font-face{font-family:'Fraunces';font-style:italic;font-weight:300 900;font-display:swap;src:url(fonts/fraunces-italic-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Fraunces';font-style:italic;font-weight:300 900;font-display:swap;src:url(fonts/fraunces-italic-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, 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:300 900;font-display:swap;src:url(fonts/fraunces-normal-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Fraunces';font-style:normal;font-weight:300 900;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+0304, U+0308, U+0329, U+2000-206F, 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:italic;font-weight:300 700;font-display:swap;src:url(fonts/source-serif-4-italic-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:300 700;font-display:swap;src:url(fonts/source-serif-4-italic-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, 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:300 700;font-display:swap;src:url(fonts/source-serif-4-normal-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:300 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

:root {
  --bg: #f4efe4;
  --bg-2: #ebe3d2;
  --ink: #1d1a15;
  --ink-2: #3d372d;
  --ink-3: #564e41;
  --rule: rgba(29, 26, 21, 0.16);
  --accent: #7d2f1e;
  --accent-ink: #6a2718;
  --link: #6a2718;
  --glass: rgba(16, 21, 19, 0.87);
  --glass-ink: #f3eee3;
  --glass-ink-2: #d6cfbf;
  --glass-rule: rgba(243, 238, 227, 0.18);
  --glass-accent: #f5c7a2;
  --bar-bg: rgba(244, 239, 228, 0.98);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Fraunces", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --bar-h: 48px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120f; --bg-2: #1d1a16; --ink: #f1ebdf; --ink-2: #ddd5c6; --ink-3: #c7bdab;
    --rule: rgba(241, 235, 223, 0.16); --accent: #f0b98f; --accent-ink: #f3c39e; --link: #f3c39e;
    --bar-bg: rgba(20, 18, 15, 0.98); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14120f; --bg-2: #1d1a16; --ink: #f1ebdf; --ink-2: #ddd5c6; --ink-3: #c7bdab;
  --rule: rgba(241, 235, 223, 0.16); --accent: #f0b98f; --accent-ink: #f3c39e; --link: #f3c39e;
  --bar-bg: rgba(20, 18, 15, 0.98); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: #1b211d; color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 0.18em; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--glass-accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 30; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--bar-bg); border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 13px; color: var(--ink); }
.topbar a { color: var(--ink); text-decoration: none; }
.topbar .home { font-weight: 600; white-space: nowrap; }
.topnav { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { white-space: nowrap; padding: 12px 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current="true"] { border-bottom-color: var(--accent); }
.spacer { flex: 1; }
.chip { border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }
section[id] { scroll-margin-top: calc(var(--bar-h) + 12px); }

/* ---------- the scene ---------- */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; pointer-events: none; background: #5d6a55; }
.exploring #scene { pointer-events: auto; cursor: grab; touch-action: none; }
.no-webgl #scene, .no-webgl #hud, .no-webgl #explore, .no-webgl #labels, .no-js #scene, .no-js #hud, .no-js #explore, .no-js #labels { display: none; }
#scene-fallback { display: none; position: fixed; inset: 0; z-index: 0; background: #1b211d url(og-ro.jpg) center / cover no-repeat; }
.no-webgl #scene-fallback, .no-js #scene-fallback { display: block; }
html[lang="en"] #scene-fallback { background-image: url(og-en.jpg); }

#hud { position: fixed; left: 16px; top: 62px; z-index: 20; font-family: var(--mono); font-size: 13px; line-height: 1.35; color: var(--glass-ink); background: var(--glass); border: 1px solid var(--glass-rule); border-radius: 10px; padding: 8px 12px; max-width: calc(100vw - 32px); opacity: 0; transition: opacity .4s; }
.scene-ready #hud { opacity: 1; }
.hud-date { font-weight: 600; color: var(--glass-accent); }
.hud-level { white-space: pre-line; }
body.paper-on #hud { opacity: 0; pointer-events: none; }

/* ---------- story ---------- */
.story { position: relative; z-index: 10; padding: 0 0 30vh; }
.step { position: relative; width: min(430px, calc(100vw - 32px)); margin: 0 0 88vh 5vw; padding: 20px 22px 22px; background: rgba(16, 21, 19, 0.93); color: var(--glass-ink); border: 1px solid var(--glass-rule); border-radius: 14px; font-size: 17px; line-height: 1.55; }
.step:first-child { margin-top: 62vh; }
.step p { margin: 0 0 0.8em; }
.step p:last-child { margin-bottom: 0; }
.step h2 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 0.55em; font-weight: 600; }
.step .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--glass-accent); margin: 0 0 8px; }
.step a { color: var(--glass-accent); }
.step blockquote { margin: 0.9em 0; padding: 0 0 0 14px; border-left: 2px solid var(--glass-accent); font-style: italic; }
.step blockquote footer { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--glass-ink-2); margin-top: 6px; }
.step figure { margin: 14px -8px 2px; }
.step figure img { border-radius: 6px; width: 100%; }
.step figcaption { font-family: var(--mono); font-size: 11.5px; line-height: 1.45; color: var(--glass-ink-2); margin-top: 6px; }
.step.right { margin-left: auto; margin-right: 5vw; }
.step.wide { width: min(560px, calc(100vw - 32px)); }

.hero { padding: 26px 26px 24px; width: min(620px, calc(100vw - 32px)); }
.hero h1 { font-family: var(--display); font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.04; margin: 0 0 16px; font-weight: 600; letter-spacing: -0.01em; }
.hero .deck { font-size: 1.12rem; color: var(--glass-ink); }
.hero .cue { font-family: var(--mono); font-size: 13px; color: var(--glass-accent); margin-top: 14px; }
.hero .byline { font-family: var(--mono); font-size: 12px; color: var(--glass-ink-2); }

.levels { list-style: none; padding: 0; margin: 10px 0 0; font-family: var(--mono); font-size: 13px; }
.levels li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--glass-rule); padding: 5px 0; }

/* ---------- explore ---------- */
#explore { position: relative; z-index: 10; min-height: 100vh; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px 90px; }
#explore .panel { pointer-events: auto; background: rgba(16, 21, 19, 0.95); color: var(--glass-ink); border: 1px solid var(--glass-rule); border-radius: 14px; padding: 16px 18px; width: min(640px, 100%); }
#explore h2 { margin: 0 0 6px; font-size: 1.3rem; }
#explore p { margin: 0 0 10px; font-size: 16px; }
.years { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.years button, .ex-toggle { font: 13px/1 var(--mono); color: var(--glass-ink); background: transparent; border: 1px solid var(--glass-rule); border-radius: 999px; padding: 10px 12px; min-height: 44px; cursor: pointer; }
.years button[aria-pressed="true"], .ex-toggle[aria-pressed="true"] { background: var(--glass-ink); color: #15130f; }
.exploring .story .step { visibility: hidden; }
.ex-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ex-zoom { display: none; gap: 8px; }
.exploring .ex-zoom { display: flex; }
.ex-zoom button { font: 18px/1 var(--mono); color: var(--glass-ink); background: transparent; border: 1px solid var(--glass-rule); border-radius: 999px; width: 44px; min-height: 44px; cursor: pointer; }
.exploring #scene:active { cursor: grabbing; }

/* ---------- paper sections ---------- */
.paper { position: relative; z-index: 12; background: var(--bg); color: var(--ink); padding: 72px 16px 64px; border-top: 1px solid var(--rule); }
.paper > * { max-width: 700px; margin-left: auto; margin-right: auto; }
.paper h2 { font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; margin: 0 0 18px; }
.paper h3 { font-size: 1.15rem; margin: 1.8em auto 0.4em; }
.paper p, .paper li { color: var(--ink-2); }
.paper figure { max-width: 900px; margin: 28px auto; }
.paper figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.timeline { list-style: none; padding: 0; margin: 20px auto; }
.timeline li { display: grid; grid-template-columns: 7.5em 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.timeline time { font-family: var(--mono); font-size: 14px; color: var(--accent-ink); font-weight: 600; }
.sources { font-size: 15.5px; }
.sources li { margin-bottom: 0.5em; }
.credits { font-family: var(--mono); font-size: 13px; }
.note { font-size: 15.5px; border-left: 3px solid var(--accent); padding-left: 14px; }
footer.site { position: relative; z-index: 12; background: var(--bg-2); color: var(--ink-2); padding: 28px 16px 40px; font-family: var(--mono); font-size: 13px; text-align: center; border-top: 1px solid var(--rule); }
footer.site a { color: var(--ink); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .step, .step.right { margin: 0 auto 92vh; width: calc(100vw - 32px); font-size: 16px; padding: 16px 16px 18px; }
  .step:first-child { margin-top: 56vh; }
  .hero h1 { font-family: var(--display); font-size: 2.15rem; }
  #hud { left: 0; right: 0; bottom: auto; top: var(--bar-h); max-width: none; border-radius: 0; border-width: 0 0 1px; background: rgba(16, 21, 19, 0.94); font-size: 11.5px; padding: 5px 16px; display: flex; justify-content: space-between; gap: 10px; }
  #hud br { display: none; }
  .hud-level { white-space: normal; text-align: right; }
  .step:first-child { margin-top: 60vh; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .topbar { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- labels over the scene ---------- */
#labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; font: 600 12px/1.2 var(--mono); color: #1b1d17; background: rgba(244, 239, 228, 0.86); padding: 2px 6px; border-radius: 4px; white-space: nowrap; margin: -9px 0 0 8px; transition: opacity .3s; will-change: transform; }
.lbl.lamp { background: #f4efe4; color: #6a2718; border: 1px solid #6a2718; }
.lbl.water { background: rgba(63, 111, 134, 0.9); color: #f4efe4; font-style: italic; }
.lbl.pin { background: #c23b2a; color: #fff; font-size: 13px; }
.lbl.dam { background: rgba(51, 65, 79, 0.9); color: #f4efe4; }
.lbl.peak { background: rgba(46, 58, 46, 0.85); color: #f4efe4; }
.lbl.place { font-size: 11px; opacity: 0.92; }
.lbl.sea { background: transparent; color: #eef3f4; font-style: italic; font-weight: 400; font-size: 14px; }
.lbl.cut { background: #f2c14e; color: #1b1d17; font-family: var(--display); font-size: 14px; }
body.paper-on #labels { opacity: 0; }
.exploring #labels .cut { display: none; }
.cuts-table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 16px auto; }
.cuts-table th, .cuts-table td { text-align: left; padding: 7px 8px 7px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.cuts-table th { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.cuts-table td.n { font-family: var(--display); font-weight: 600; color: var(--accent-ink); }
.table-wrap { overflow-x: auto; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; font: 13px/1.4 var(--mono); }
.legend li { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.legend i { display: inline-block; width: 22px; height: 6px; border-radius: 3px; flex: none; }
.legend .k-old { background: #f2c14e; } .legend .k-new { background: #3f6f86; } .legend .k-dead { background: #7d8457; } .legend .k-shore { background: #f4efe2; outline: 1px solid rgba(0,0,0,.3); } .legend .k-street { background: #847d6b; }
.finder { margin-top: 14px; border-top: 1px solid var(--glass-rule); padding-top: 12px; }
.finder label { display: block; font-weight: 600; margin-bottom: 8px; }
.finder-row { display: flex; gap: 8px; }
.finder input { flex: 1; min-width: 0; font: 15px/1.4 var(--body); color: var(--glass-ink); background: transparent; border: 1px solid var(--glass-rule); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
.finder button { font: 600 14px/1 var(--mono); color: #15130f; background: var(--glass-ink); border: 1px solid var(--glass-ink); border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
.finder-out { margin: 10px 0 0; font-weight: 600; min-height: 1.4em; }
.finder-note { margin: 6px 0 0; font-size: 13px; opacity: 0.85; }

/* ---------- progress hairline + reading rail + to-top ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--acc); }
.rail { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 10px; }
.rail a { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.45; }
.rail a.on { opacity: 1; background: var(--acc); border-color: var(--acc); }
.to-top { position: fixed; right: 14px; bottom: 14px; z-index: 60; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 0.5rem 0.9rem; font-size: 0.85rem; cursor: pointer; opacity: 0.94; }
.to-top:hover { border-color: var(--acc); }
[hidden] { display: none !important; }

/* ---------- paper: figures, tables, faq, notes ---------- */
.paper figure { margin: 1.6rem 0; }
.paper figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.paper figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.table-wrap { overflow-x: auto; }
.cuts-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cuts-table th, .cuts-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); }
.cuts-table .n { white-space: nowrap; font-variant-numeric: tabular-nums; }
#faq details { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
#faq summary { cursor: pointer; font-weight: 600; }
#faq details p { margin: 0.5rem 0 0.2rem; }
.paper .note { border-left: 3px solid var(--acc); padding-left: 0.8rem; color: var(--muted); font-size: 0.92rem; }
.paper .sources { padding-left: 1.2rem; }
.paper .sources li { margin: 0.4rem 0; }
.noscript-note { position: relative; z-index: 5; max-width: 46rem; margin: 1rem auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; }
footer.site { position: relative; z-index: 5; text-align: center; padding: 2rem 1rem 3rem; color: var(--muted); font-size: 0.9rem; }
footer.site a { color: inherit; }
.share { margin: 2rem auto 0; max-width: var(--measure); padding: 0 1rem; position: relative; z-index: 5; }

@media (max-height: 740px) {
  .step { min-height: 0; padding-top: 8vh; padding-bottom: 8vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* share-row snapshot */

/* share row (standards/v2/tools/share_row.py) */
.share-row{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.share-row .lab{font-size:.95rem;opacity:.8;margin-right:.3rem}
.share-row a,.share-row button{display:inline-grid;place-items:center;flex:none;width:2.5rem;height:2.5rem;padding:0;border-radius:50%;border:1px solid var(--sr-line,color-mix(in srgb,currentColor 28%,transparent));background:transparent;color:var(--sr-ink,inherit);text-decoration:none;cursor:pointer;font:inherit;transition:color .15s,border-color .15s}
.share-row a:hover,.share-row button:hover,.share-row a:focus-visible,.share-row button:focus-visible{color:var(--sr-acc,inherit);border-color:var(--sr-acc,currentColor)}
.share-row [hidden]{display:none}
@media (pointer:coarse){.share-row a,.share-row button{width:2.75rem;height:2.75rem}}
@media (max-width:30rem){.share-row .lab{flex-basis:100%;margin:0 0 .15rem}}
.share-status{font-size:.92rem;color:var(--sr-ok,inherit);min-height:1.2em;margin:.4rem 0 0}
.share-field{display:block;width:100%;max-width:36rem;margin-top:.4rem;font:inherit;font-size:.9rem}
