@font-face{font-family:"Newsreader";font-style:normal;font-weight:200 800;font-display:swap;src:url(fonts/newsreader-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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Newsreader";font-style:normal;font-weight:200 800;font-display:swap;src:url(fonts/newsreader-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,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:"Newsreader";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/newsreader-italic-400-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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Newsreader";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/newsreader-italic-400-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,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:"Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/IBMPlexMono-Regular.woff2) format("woff2")}
@font-face{font-family:"Plex Sans";font-style:normal;font-weight:500 600;font-display:swap;src:url(fonts/IBMPlexSans-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:"Plex Sans";font-style:normal;font-weight:500 600;font-display:swap;src:url(fonts/IBMPlexSans-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}
: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.94);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--ui:"Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --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.94); 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.94); 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(--ui); font-weight: 500; font-size: .92rem; 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 {font-family:var(--ui); 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); }
.step[id] { scroll-margin-top: 30vh; }

/* Keep the chapter rail in the outer gutter beside the alternating story cards. */
.rail { display: none; }
@media (min-width: 1280px) {
  .rail { position: fixed; z-index: 25; top: 50%; right: 18px; transform: translateY(-50%); display: flex; flex-direction: column; width: 38px; max-height: calc(100vh - 7rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: .35rem 0; border: 1px solid var(--glass-rule); border-radius: 999px; background: var(--glass); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 18%, transparent); }
  .rail::before { content: ""; position: absolute; left: calc(50% - .5px); top: 1rem; bottom: 1rem; width: 1px; background: var(--glass-rule); pointer-events: none; }
  .rail-dot { position: relative; display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 28px; text-decoration: none; }
  .rail-dot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--glass-ink-2); box-shadow: 0 0 0 3px var(--glass); transition: transform .2s, background .2s; }
  .rail-dot:hover .dot, .rail-dot:focus-visible .dot { background: var(--glass-accent); transform: scale(1.25); }
  .rail-dot[aria-current="location"] .dot { background: var(--glass-accent); transform: scale(1.45); }
  .rail-dot:focus-visible { outline: 2px solid var(--glass-accent); outline-offset: -1px; }
  .rail-label { position: absolute; right: calc(100% + .45rem); top: 50%; transform: translateX(4px) translateY(-50%); padding: .25rem .55rem; border: 1px solid var(--glass-rule); border-radius: 6px; background: var(--glass); color: var(--glass-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 18%, transparent); font: 500 12px/1.3 var(--mono); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
  .rail-dot:hover .rail-label, .rail-dot:focus-visible .rail-label { opacity: 1; transform: translateX(0) translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) { .rail-dot .dot, .rail-label { transition: none; } }
@media (forced-colors: active) { .rail { border-color: CanvasText; } .rail::before { background: CanvasText; } .rail-dot .dot { background: CanvasText; box-shadow: none; } .rail-dot[aria-current="location"] .dot { background: Highlight; } .rail-label { border-color: CanvasText; } }
@media print { .rail { display: none !important; } }

/* ---------- the scene ---------- */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; pointer-events: none; background: #3a4a44; }
.exploring #scene { pointer-events: auto; cursor: grab; touch-action: none; }
.no-webgl #scene, .no-webgl #hud, .no-webgl #explore { display: none; }
#scene-fallback { display: none; position: fixed; inset: 0; z-index: 0; background: #2b332f url(/dealul-uranus/assets/img/fallback.webp) center / cover no-repeat; }
.no-webgl #scene-fallback { display: block; }

#hud { position: fixed; left: 16px; bottom: 16px; 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; }
body.hero-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: var(--glass); 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-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: var(--glass); 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-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-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; } }

/* ---------- Uranus additions ---------- */
#pins { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.pin { position: absolute; left: 0; top: 0; font: 600 12px/1.2 var(--mono); color: #15130f; background: rgba(243, 238, 227, 0.94); border-radius: 999px; padding: 4px 9px; white-space: nowrap; transform: translate(-9999px, 0); translate: -50% -100%; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 2px; height: 5px; background: rgba(243, 238, 227, 0.94); transform: translateX(-50%); }
.pin-you { background: #b8322a; color: #fff; }
.pin-street { font: italic 400 14px/1.2 var(--serif); color: #2b2418; background: none; box-shadow: none; padding: 0; translate: -50% -50%; text-shadow: 0 0 3px #f3eee3, 0 0 3px #f3eee3, 0 0 6px #f3eee3; pointer-events: none; }
.pin-street::after { content: none; }
.pin-you::after { background: #b8322a; }
.no-webgl #pins { display: none; }
.hud-note { color: var(--glass-ink-2); }
.cutfill-key { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; margin-top: 10px; }
.cutfill-key span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--k); }
.k-cut { --k: #c74d33; } .k-fill { --k: #3469b8; } .k-zone { --k: #b8322a; }
.num { font-family: var(--mono); font-size: 0.92em; }
.variants { list-style: none; padding: 0; margin: 10px 0 0; font-family: var(--mono); font-size: 13px; }
.variants li { display: grid; grid-template-columns: 4.2em 1fr; gap: 10px; border-top: 1px solid var(--glass-rule); padding: 5px 0; }
.variants b { color: var(--glass-accent); }

/* your street: an optional side door */
#strada .panel { pointer-events: auto; }
#strada { position: relative; z-index: 10; min-height: 100vh; pointer-events: none; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
#strada .panel { background: var(--glass); color: var(--glass-ink); border: 1px solid var(--glass-rule); border-radius: 14px; padding: 18px 20px; width: min(600px, 100%); }
#strada h2 { margin: 0 0 6px; font-size: 1.35rem; }
#strada p { margin: 0 0 10px; font-size: 16px; }
.st-open, .st-close, .st-list button { font: 14px/1.2 var(--mono); color: var(--glass-ink); background: transparent; border: 1px solid var(--glass-rule); border-radius: 999px; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.st-open { background: var(--glass-ink); color: #15130f; }
.st-box[hidden] { display: none; }
.st-box label { display: block; font: 13px var(--mono); color: var(--glass-ink-2); margin: 8px 0 6px; }
.st-box input { width: 100%; font: 16px var(--serif); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--glass-rule); background: rgba(255,255,255,.08); color: var(--glass-ink); min-height: 44px; }
.st-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-list button { border-radius: 10px; text-align: left; }
.st-result { border-top: 1px solid var(--glass-rule); padding-top: 12px; margin-top: 8px; font-size: 16px; }
.st-result strong { color: var(--glass-accent); }
.st-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
h2 .anchor, h3 .anchor { color: inherit; text-decoration: none; }
h2 .anchor:hover, h2 .anchor:focus-visible { text-decoration: underline; }
