:root {
  color-scheme: dark;
  --background: #191c1b;
  --surface: #202421;
  --text: #f0f0e9;
  --muted: #b0b8b2;
  --subtle: #89988f;
  --mint: #ace5d3;
  --line: #3c4540;
  --bio: #a4bb86;
  --paper: #a2c6d8;
  --yellow: #d5bd78;
  --residual: #c0afa2;
  --heading: 'Bahnschrift', 'Aptos Display', 'Trebuchet MS', sans-serif;
  --body: 'Aptos', 'Segoe UI', sans-serif;
  --gutter: clamp(24px, 4.5vw, 88px);
  --header-height: 90px;
  --footer-height: 68px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--body); font-size: 16px; -webkit-font-smoothing: antialiased; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 6px; }
::selection { background: var(--mint); color: var(--background); }
.skip-link { position: fixed; left: 20px; top: -100px; padding: 12px 20px; background: var(--mint); color: var(--background); z-index: 20; }
.skip-link:focus { top: 12px; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--header-height); display: flex; align-items: center; gap: 42px; padding: 0 var(--gutter); background: var(--background); }
.site-header::after { content: ''; position: absolute; bottom: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); opacity: .6; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 25px; letter-spacing: -.045em; font-weight: 650; }
.brand svg { width: 23px; height: 27px; fill: none; stroke: var(--mint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-period { color: var(--mint); }
.site-header nav { display: flex; gap: 30px; margin-left: auto; font-size: 14px; }
.site-header nav a { color: var(--muted); transition: color 180ms ease; padding: 10px 0; }
.site-header nav a:hover { color: var(--mint); }
.site-header nav span { padding-left: 6px; color: var(--mint); }
.header-note { font-size: 12px; color: var(--subtle); border-left: 1px solid var(--line); padding-left: 32px; }
.story { position: relative; display: grid; grid-template-columns: 43% 57%; margin: 0 var(--gutter); padding-top: var(--header-height); }
.chapters { grid-column: 1; grid-row: 1; z-index: 2; min-width: 0; pointer-events: none; }
.chapter { min-height: 112svh; display: flex; align-items: center; padding: 48px 24px 90px 0; scroll-margin-top: 0; }
.chapter-inner { width: 100%; max-width: 590px; pointer-events: auto; }
.interactive .chapter-inner { position: fixed; left: var(--text-left); width: var(--text-width); top: calc(50% + 11px); transform: translateY(-50%); max-height: calc(100svh - var(--header-height) - var(--footer-height) - 66px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; visibility: hidden; pointer-events: none; padding-right: 7px; }
.interactive .is-active .chapter-inner { visibility: visible; pointer-events: auto; }
.hero { min-height: calc(112svh - var(--header-height)); }
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .15em; font-weight: 500; color: var(--muted); margin: 0 0 28px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow-line { height: 1px; width: 26px; background: var(--line); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--heading); font-weight: 500; letter-spacing: -.055em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(48px, 5.45vw, 94px); margin-bottom: 28px; line-height: 1.045; }
h2 { font-size: clamp(36px, 3.7vw, 64px); margin-bottom: 28px; }
h1 em, h2 em { color: var(--mint); font-style: normal; }
.lead { max-width: 38ch; font-size: clamp(17px, 1.36vw, 21px); line-height: 1.65; color: var(--muted); margin-bottom: 28px; }
.byline { color: var(--subtle); font-size: 13px; line-height: 1.6; }
.scroll-cue { display: inline-flex; align-items: center; gap: 16px; margin-top: 30px; font-size: 14px; }
.scroll-cue small { display: block; font-size: 12px; color: var(--subtle); margin-top: 5px; }
.scroll-icon { width: 42px; height: 52px; border: 1px solid var(--line); border-radius: 24px; display: grid; place-items: center; font-size: 23px; color: var(--mint); transition: transform 200ms ease; }
.scroll-cue:hover .scroll-icon { transform: translateY(4px); }
.detail-note { max-width: 41ch; color: var(--subtle); font-size: 14px; line-height: 1.65; }
.component-note { padding-left: 18px; border-left: 1px solid #74988a; margin: 28px 0; max-width: 43ch; }
.small-label { text-transform: uppercase; font-size: 11px; letter-spacing: .12em; color: var(--mint); }
.component-note p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }
details { margin-top: 25px; max-width: 45ch; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.65; }
summary { list-style: none; padding: 15px 26px 15px 0; position: relative; color: var(--muted); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 5px; top: 11px; color: var(--mint); font-size: 21px; }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); margin-bottom: 16px; }
.tag { border: 1px solid #536c61; border-radius: 3px; padding: 3px 7px; color: var(--mint); font-size: 10px; letter-spacing: .1em; }
.data-route { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--mint); font-size: 14px; border-top: 1px solid var(--line); padding-top: 20px; margin: 25px 0 15px; max-width: 350px; }
.data-route .route-return { width: 100%; color: var(--muted); font-size: 13px; padding-top: 4px; }
.fraction-key { display: flex; flex-wrap: wrap; gap: 12px 20px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.fraction-key li::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; }
.bio { color: var(--bio); }.paper { color: var(--paper); }.yellow { color: var(--yellow); }.residual { color: var(--residual); }
.sequence { display: flex; gap: 14px; padding: 20px 0; margin: 0; list-style: none; border-block: 1px solid var(--line); color: var(--mint); font-size: 14px; }
.sequence li + li::before { content: '→'; margin-right: 14px; color: var(--subtle); }
.chapter-status { min-height: 132svh; }
.chapter-status h2 { font-size: clamp(34px, 3.2vw, 54px); }
.development-list { display: grid; gap: 23px; }
.development-list > div { border-top: 1px solid var(--line); padding-top: 18px; }
.development-list h3 { font-size: 14px; font-weight: 500; color: var(--mint); margin-bottom: 10px; }
.development-list > div + div h3 { color: var(--text); }
.development-list ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.development-list li { padding-left: 3px; margin-bottom: 5px; }
.development-list li::marker { color: #768d7f; }
.replay-button { display: inline-flex; gap: 14px; align-items: center; border: 1px solid var(--mint); color: var(--background); background: var(--mint); padding: 15px 23px; border-radius: 4px; margin: 15px 0 35px; transition: background 180ms ease, transform 180ms ease; }
.replay-button:hover { transform: translateY(-2px); background: #c6f2e4; }
.replay-button > span { font-size: 23px; }
.closing-signature { font-size: 17px; }
.closing-signature span { display: block; margin-top: 8px; color: var(--subtle); font-size: 13px; }
.scene-panel { position: sticky; grid-row: 1; grid-column: 2; align-self: start; top: var(--header-height); height: calc(100svh - var(--header-height) - var(--footer-height)); min-height: 430px; margin: 0 -20px 0 0; display: flex; align-items: center; flex-direction: column; isolation: isolate; }
.scene-panel::before { content: ''; position: absolute; inset: 16% 2% 15%; z-index: -1; background: radial-gradient(ellipse at 50% 48%, #3b494033, #191c1b00 69%); }
.scene-topline { position: absolute; inset: 29px 25px auto; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; letter-spacing: .15em; color: var(--subtle); z-index: 1; }
.view-label { text-transform: uppercase; }
#bin-scene { width: 100%; height: calc(100% - 50px); display: block; overflow: visible; }
.scene-state { height: 25px; display: flex; align-items: center; gap: 9px; color: var(--mint); font-size: 12px; max-width: 100%; text-align: center; }
.state-rule { height: 1px; width: 18px; background: var(--mint); }
.scene-panel figcaption { font-size: 10px; letter-spacing: .035em; color: var(--subtle); margin-top: 8px; }
.story-nav { position: fixed; inset: auto 0 0; height: var(--footer-height); background: var(--background); z-index: 10; display: flex; align-items: center; gap: 25px; padding: 0 var(--gutter); border-top: 1px solid #3c454077; }
.chapter-counter { font-size: 12px; color: var(--subtle); font-variant-numeric: tabular-nums; letter-spacing: .08em; white-space: nowrap; }
#current-chapter { color: var(--text); }.counter-separator { padding: 0 10px; }
#chapter-nav { display: flex; gap: 7px; }
#chapter-nav a { position: relative; width: 29px; height: 36px; display: block; }
#chapter-nav a::before { content: ''; position: absolute; inset: 17px 0 auto; height: 2px; background: #48564d; transition: background 180ms ease; }
#chapter-nav a[aria-current]::before { background: var(--mint); height: 3px; }
#chapter-nav a:hover::before { background: var(--text); }
#chapter-name { color: var(--muted); font-size: 12px; }
.read-button { margin-left: auto; background: none; border: 0; padding: 12px 0 12px 16px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.read-button span { color: var(--mint); padding-left: 8px; }
dialog { width: min(760px, calc(100% - 32px)); max-height: 88svh; padding: clamp(24px, 5vw, 60px); border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--background); overscroll-behavior: contain; }
dialog::backdrop { background: #080d0bce; }
.reading-header { display: flex; justify-content: space-between; align-items: start; }
.reading-header button { padding: 8px 12px; background: none; border: 1px solid var(--line); color: var(--text); margin-top: -8px; }
.reading-header .eyebrow { font-size: 11px; }
dialog h2 { font-size: 40px; margin-top: 12px; }
#reading-content section { border-top: 1px solid var(--line); padding: 30px 0 5px; }
#reading-content h3 { font-family: var(--heading); font-size: 25px; font-weight: 500; letter-spacing: -.025em; }
#reading-content p, #reading-content li { font-size: 16px; line-height: 1.7; color: var(--muted); }
#reading-content p { max-width: none; }
#reading-content .eyebrow { font-size: 11px; }
.reading-source { margin-top: 30px; font-size: 12px; color: var(--subtle); }
.no-script { position: fixed; z-index: 20; top: 90px; left: 20px; padding: 10px; max-width: 350px; background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 1700px) { .story { grid-template-columns: 42% 58%; max-width: 1800px; margin-inline: auto; padding-inline: 60px; } .scene-panel { max-width: 1030px; } }
@media (max-width: 1150px) { :root { --gutter: 36px; --header-height: 78px; } .header-note { display: none; } .story { grid-template-columns: 45% 55%; } h2 { font-size: clamp(32px, 3.8vw, 44px); } .chapter { padding-right: 10px; } .scene-topline { font-size: 9px; inset-inline: 15px; } .view-label { display: none; } .scene-state { font-size: 11px; } }
@media (max-width: 760px) {
  :root { --gutter: 24px; --header-height: 65px; --footer-height: 59px; --mobile-scene: 40svh; }
  .site-header { gap: 20px; }.brand { font-size: 23px; }.brand svg { width: 20px; }
  .site-header nav { gap: 18px; font-size: 12px; }.site-header nav a:first-child { display: none; }
  .story { display: block; margin: 0; padding-top: var(--header-height); }
  .scene-panel { position: sticky; z-index: 3; top: var(--header-height); height: var(--mobile-scene); min-height: 240px; width: 100%; margin: 0; background: var(--background); border-bottom: 1px solid #3c454077; }
  .scene-topline { display: none; }.view-label { display: block; }
  #bin-scene { height: calc(100% - 31px); width: 100%; overflow: hidden; }
  .scene-state { height: 17px; font-size: 10px; gap: 6px; }
  .scene-panel figcaption { font-size: 8px; margin-top: 3px; }
  .chapters { position: relative; margin-top: calc(-1 * var(--mobile-scene)); }
  .chapter { min-height: 114svh; padding: calc(var(--mobile-scene) + 35px) var(--gutter) 85px; align-items: flex-start; }
  .hero { min-height: 114svh; }
  .chapter-inner { max-width: 580px; margin-inline: auto; }
  .interactive .chapter-inner { left: var(--gutter); width: calc(100% - 2 * var(--gutter)); top: calc(var(--header-height) + max(var(--mobile-scene), 240px) + 24px); bottom: calc(var(--footer-height) + 18px); transform: none; max-height: none; max-width: none; padding-right: 3px; }
  .eyebrow { font-size: 10px; letter-spacing: .13em; margin-bottom: 18px; }
  h1 { font-size: clamp(38px, 10.6vw, 61px); line-height: 1.04; margin-bottom: 18px; }
  h2, .chapter-status h2 { font-size: clamp(31px, 8.2vw, 45px); margin-bottom: 20px; line-height: 1.09; }
  .lead { font-size: 16px; line-height: 1.55; margin-bottom: 20px; max-width: 44ch; }
  .byline { font-size: 12px; margin-bottom: 0; }.scroll-cue { display: none; }.scroll-cue small { display: none; }.scroll-icon { width: 32px; height: 38px; }
  .component-note { margin: 20px 0; }.component-note p { font-size: 15px; }.detail-note { font-size: 13px; }
  details { margin-top: 18px; font-size: 14px; }.chapter-status { min-height: 150svh; }
  .development-list { gap: 18px; }.development-list ul { font-size: 14px; }
  .story-nav { gap: 14px; padding: 0 20px; }.chapter-counter { font-size: 10px; }.counter-separator { padding: 0 5px; }
  #chapter-nav { flex: 1; gap: 5px; max-width: 245px; }#chapter-nav a { width: auto; flex: 1; min-width: 10px; }
  #chapter-name { display: none; }.read-button { font-size: 10px; padding-left: 0; }.read-button span { display: none; }
  .closing-signature { font-size: 16px; }.replay-button { font-size: 14px; padding: 12px 17px; }
}
@media (max-height: 680px) and (min-width: 761px) { :root { --header-height: 66px; --footer-height: 53px; } .chapter { min-height: 120svh; padding-block: 45px 70px; } .chapter-status { min-height: 160svh; } h1 { font-size: 61px; } .hero .eyebrow { margin-bottom: 20px; } .scroll-cue { margin-top: 10px; } .scene-panel { min-height: 360px; } }
@media (max-width: 760px) and (max-height: 650px) { :root { --mobile-scene: 38svh; --header-height: 58px; } .scene-panel { min-height: 195px; }.chapter { min-height: 135svh; }.chapter-status { min-height: 180svh; } }
@media (max-width: 760px) and (max-height: 650px) { .interactive .chapter-inner { top: calc(var(--header-height) + max(var(--mobile-scene), 195px) + 16px); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .scene-panel, .story-nav, .scroll-cue, .replay-button, details { display: none; } body { background: white; color: black; }.story { display: block; padding: 0; margin: 0; }.chapters { margin: 0; }.chapter, .hero, .chapter-status { min-height: 0; padding: 20px 0; break-inside: avoid; }.interactive .chapter-inner { position: static; transform: none; visibility: visible; width: 100%; max-height: none; overflow: visible; }h1,h2,.chapter-status h2 { font-size: 28px; }h1 em,h2 em,.lead,.detail-note,.byline,.component-note p,.development-list ul,.development-list h3,.eyebrow { color: black; } }
