:root {
  color-scheme: dark;
  --page-bg: #08171d;
  --panel: rgba(9, 27, 33, .91);
  --panel-strong: rgba(8, 25, 31, .94);
  --text: #e7efea;
  --muted: #afc6c0;
  --accent: #efbc85;
  --accent-ink: #f4c68f;
  --rule: rgba(192, 218, 207, .34);
  --shadow: rgba(4, 16, 21, .64);
  --scene-bg: #07171d;
  --scene-fill: #aec7c4;
  --scene-key: #ffd5a0;
  --scene-rim: #83d0d0;
  --scene-water: #153845;
  --scene-land: #263a3b;
  --scene-stone: #64716b;
  --scene-stone-light: #a5ab99;
  --scene-steel: #b3d1c7;
  --scene-steel-shadow: #5f7771;
  --scene-steel-glow: #5e8d82;
  --scene-route: #edb676;
  --scene-timber: #785538;
  --scene-roof: #52635d;
  --scene-window: #ffd18d;
  --scene-city: #405351;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --rail: 2.4rem;
  font-family: var(--sans);
  background: var(--page-bg);
  color: var(--text);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}
:root[data-theme='light'], :root:not([data-theme]) {
  color-scheme: light;
  --page-bg: #e9ede4;
  --panel: rgba(242, 244, 234, .94);
  --panel-strong: rgba(244, 246, 237, .97);
  --text: #162f33;
  --muted: #334d4d;
  --accent: #803e1e;
  --accent-ink: #803e1e;
  --rule: rgba(31, 66, 65, .35);
  --shadow: rgba(22, 43, 45, .25);
  --scene-bg: #afc7c6;
  --scene-fill: #e8eee4;
  --scene-key: #ffe3aa;
  --scene-rim: #467d7d;
  --scene-water: #729da1;
  --scene-land: #c5ccbd;
  --scene-stone: #6b7771;
  --scene-stone-light: #bec7b9;
  --scene-steel: #355d5f;
  --scene-steel-shadow: #2e5153;
  --scene-steel-glow: #477e7b;
  --scene-route: #8c4827;
  --scene-timber: #68462a;
  --scene-roof: #726858;
  --scene-window: #e0a848;
  --scene-city: #9da99f;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --page-bg: #08171d;
  --panel: rgba(9, 27, 33, .91);
  --panel-strong: rgba(8, 25, 31, .94);
  --text: #e7efea;
  --muted: #afc6c0;
  --accent: #efbc85;
  --accent-ink: #f4c68f;
  --rule: rgba(192, 218, 207, .34);
  --shadow: rgba(4, 16, 21, .64);
  --scene-bg: #07171d;
  --scene-fill: #aec7c4;
  --scene-key: #ffd5a0;
  --scene-rim: #83d0d0;
  --scene-water: #153845;
  --scene-land: #263a3b;
  --scene-stone: #64716b;
  --scene-stone-light: #a5ab99;
  --scene-steel: #b3d1c7;
  --scene-steel-shadow: #5f7771;
  --scene-steel-glow: #5e8d82;
  --scene-route: #edb676;
  --scene-timber: #785538;
  --scene-roof: #52635d;
  --scene-window: #ffd18d;
  --scene-city: #405351;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page-bg: #08171d;
    --panel: rgba(9, 27, 33, .91);
    --panel-strong: rgba(8, 25, 31, .94);
    --text: #e7efea;
    --muted: #afc6c0;
    --accent: #efbc85;
    --accent-ink: #f4c68f;
    --rule: rgba(192, 218, 207, .34);
    --shadow: rgba(4, 16, 21, .64);
    --scene-bg: #07171d;
    --scene-fill: #aec7c4;
    --scene-key: #ffd5a0;
    --scene-rim: #83d0d0;
    --scene-water: #153845;
    --scene-land: #263a3b;
    --scene-stone: #64716b;
    --scene-stone-light: #a5ab99;
    --scene-steel: #b3d1c7;
    --scene-steel-shadow: #5f7771;
    --scene-steel-glow: #5e8d82;
    --scene-route: #edb676;
    --scene-timber: #785538;
    --scene-roof: #52635d;
    --scene-window: #ffd18d;
    --scene-city: #405351;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page-bg); }
body { color: var(--text); font-size: 1rem; line-height: 1.62; overflow-x: clip; }
[hidden] { display: none !important; }
svg[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 72%, transparent); text-underline-offset: .22em; }
a:hover { color: var(--accent); }
button { color: inherit; font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; z-index: 30; left: 1rem; top: 1rem; width: auto; height: auto; margin: 0; padding: .8rem 1rem; background: var(--panel-strong); clip: auto; }
#scene { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
#labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.scene-label { position: absolute; top: 0; left: 0; padding: .35rem .55rem .3rem; border: 1px solid var(--rule); background: var(--panel-strong); color: var(--text); font: 700 .67rem/1.1 var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 8px 30px var(--shadow); }
.topbar { position: fixed; z-index: 12; top: 0; left: 0; right: 0; height: 4.25rem; display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2rem); padding: 0 clamp(1rem, 3.2vw, 3.5rem); border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--page-bg) 84%, transparent); backdrop-filter: blur(14px); }
.home { font: 650 .77rem/1 var(--mono); letter-spacing: .05em; text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: clamp(.8rem, 2vw, 1.8rem); align-items: center; }
.topnav a, .language { color: var(--muted); font: 600 .69rem/1.2 var(--mono); letter-spacing: .04em; text-decoration: none; }
.topnav a[aria-current='true'] { color: var(--accent); }
.spacer { flex: 1; }
.icon-btn { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: transparent; cursor: pointer; }
.language { min-height: 2.8rem; display: grid; place-items: center; padding: 0 .6rem; border-bottom: 1px solid var(--rule); }
.progress-track { position: absolute; bottom: -1px; left: 0; height: 2px; width: 100%; pointer-events: none; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); }
.progress-dot { position: absolute; right: clamp(1rem, 3.2vw, 3.5rem); bottom: -4px; width: 7px; height: 7px; border: 1px solid var(--page-bg); border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
#hud { position: fixed; z-index: 2; left: clamp(1rem, 3.2vw, 3.5rem); top: 6.6rem; display: grid; gap: .34rem; width: 11rem; color: var(--text); text-shadow: 0 2px 14px var(--shadow); pointer-events: none; }
.hud-date { color: var(--accent); font: 700 .65rem/1.3 var(--mono); letter-spacing: .12em; }
.hud-level { color: var(--muted); font: 500 .78rem/1.4 var(--sans); }
main, .photograph, .sources { position: relative; z-index: 3; }
.story { position: relative; }
.step { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 100svh; max-width: 47rem; margin: 0 6vw 0 auto; padding: 6.5rem clamp(1.5rem, 5vw, 4.5rem) 5.25rem clamp(1.5rem, 4vw, 3.5rem); border-left: 1px solid var(--rule); background: linear-gradient(90deg, transparent 0, var(--panel) 20%, var(--panel) 100%); text-wrap: pretty; }
.step::before { content: ''; position: absolute; left: -2px; top: 23%; width: 3px; height: 4.8rem; background: var(--accent); }
.step.hero { min-height: 100svh; max-width: 52rem; padding-right: clamp(1.5rem, 6vw, 5.5rem); background: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--panel) 80%, transparent) 12%, var(--panel) 100%); }
.kicker { margin: 0 0 1.35rem; color: var(--accent); font: 700 .66rem/1.5 var(--mono); letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; text-wrap: balance; }
h1 { max-width: 11ch; margin-bottom: 1.3rem; font-size: clamp(3.8rem, 7.1vw, 7.2rem); line-height: .9; }
h1 em { color: var(--accent-ink); font-weight: 400; }
.step h2 { max-width: 14ch; margin-bottom: 1.25rem; font-size: clamp(2.5rem, 4.4vw, 4.6rem); line-height: .99; }
.step p { max-width: 42rem; margin-bottom: 1.05rem; color: var(--text); font-size: clamp(1rem, 1.15vw, 1.18rem); line-height: 1.58; }
.step .kicker { color: var(--accent); font-size: .67rem; }
.step .standfirst { max-width: 39rem; font-size: clamp(1.09rem, 1.35vw, 1.34rem); line-height: 1.48; }
.step .text-link { width: fit-content; margin-top: .6rem; color: var(--accent-ink); font: 700 .73rem/1.3 var(--mono); letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }
.text-link span { margin-left: .6rem; }
.step .evidence { margin-top: .25rem; color: var(--muted); font: 500 .74rem/1.5 var(--mono); }
.step .evidence a { text-decoration-thickness: 1px; }
.step .model-note { margin-top: .8rem; padding: .9rem 0 0 1rem; border-left: 2px solid var(--accent); color: var(--muted); font-size: .9rem; }
.workbench { position: relative; z-index: 4; min-height: 90svh; display: flex; align-items: flex-end; padding: 7rem clamp(1.25rem, 6vw, 6rem); }
.inspection-surface { display: none; }
.workbench-copy { width: min(44rem, 100%); padding: clamp(1.3rem, 3.5vw, 3rem); border-top: 2px solid var(--accent); background: var(--panel-strong); box-shadow: 0 22px 70px var(--shadow); }
.workbench h2, .photo-head h2, .sources h2 { margin-bottom: .8rem; font-size: clamp(2.6rem, 5.5vw, 5.4rem); line-height: .94; }
.workbench-copy > p:not(.kicker):not(.view-hint) { max-width: 34rem; color: var(--muted); }
.view-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.4rem; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.view-button { min-height: 3.3rem; padding: .7rem .85rem; border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: 650 .73rem/1.3 var(--mono); }
.view-button[aria-pressed='true'] { background: color-mix(in srgb, var(--accent) 17%, transparent); color: var(--accent-ink); box-shadow: inset 3px 0 var(--accent); }
.camera-controls { display: flex; gap: .55rem; margin-top: 1rem; }
.camera-controls button { min-width: 2.9rem; min-height: 2.9rem; padding: .45rem .8rem; border: 1px solid var(--rule); background: transparent; cursor: pointer; font: 700 .82rem/1 var(--mono); }
.camera-controls [data-reset] { margin-left: auto; min-width: 9.5rem; color: var(--muted); }
.view-hint { margin: .7rem 0 0; color: var(--muted); font-size: .84rem; }
.inspection-on #scene { pointer-events: auto; cursor: grab; }
.inspection-on #scene.dragging { cursor: grabbing; }
.inspection-on .workbench { background: color-mix(in srgb, var(--page-bg) 14%, transparent); }
.photograph { padding: 7rem clamp(1rem, 6vw, 6rem) 6rem; background: var(--page-bg); }
.photo-head { max-width: 70rem; margin: 0 auto 2rem; }
.photograph figure { max-width: 70rem; margin: 0 auto; }
.photograph img { display: block; width: 100%; height: auto; max-height: 76svh; object-fit: cover; object-position: 50% 62%; border: 1px solid var(--rule); box-shadow: 0 20px 60px var(--shadow); }
.photograph figcaption { max-width: 54rem; margin: .85rem 0 0 auto; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.sources { padding: 6rem clamp(1.5rem, 9vw, 9rem) 2rem; background: var(--page-bg); border-top: 1px solid var(--rule); }
.sources > * { max-width: 60rem; margin-left: auto; margin-right: auto; }
.sources h2 { margin-bottom: 2.3rem; }
.sources ol { padding-left: 1.5rem; }
.sources li { margin-bottom: 1rem; padding-left: .3rem; }
.sources > p:not(.kicker) { color: var(--muted); font-size: .91rem; }
.share-area { margin-top: 3.5rem; padding: 1.3rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.share-area h3 { font: 700 .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
[data-share] { display: flex; gap: .7rem; align-items: center; min-height: 2.8rem; }
[data-share] a, [data-share] button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--text); }
[data-share] svg { width: 1rem; height: 1rem; }
.share-status { display: block; min-height: 1.3rem; color: var(--muted); font-size: .78rem; }
footer { display: flex; gap: .8rem; align-items: center; padding: 2rem 0 1rem; font: 600 .68rem/1.3 var(--mono); color: var(--muted); }
footer .backtop { margin-left: auto; }
#scene-fallback { display: none; }
.no-js #scene { display: none; }
.no-js #scene-fallback, .no-webgl #scene-fallback { display: block; position: relative; z-index: 2; max-width: 68rem; margin: 6rem auto -5rem; padding: 1rem; background: var(--panel-strong); }
.no-js #scene-fallback img, .no-webgl #scene-fallback img { display: block; width: 100%; height: auto; }
.no-webgl #scene, .no-js .workbench, .no-webgl .workbench { display: none; }
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 760px) {
  :root { --rail: 1rem; }
  .topbar { height: 3.75rem; gap: .8rem; padding: 0 .9rem; }
  .topnav { display: none; }
  .home { font-size: .65rem; }
  .language { min-height: 2.65rem; padding: 0 .35rem; font-size: .63rem; }
  .icon-btn { width: 2.65rem; height: 2.65rem; }
  #hud { top: 4.55rem; left: .9rem; width: 8rem; }
  .hud-date { font-size: .58rem; }
  .hud-level { font-size: .68rem; }
  .scene-label { max-width: 9rem; white-space: normal; font-size: .58rem; }
  .step, .step.hero { min-height: 100svh; width: 100%; max-width: none; margin: 0; padding: 5.8rem 1.25rem 2.7rem; justify-content: flex-end; border-left: 0; background: linear-gradient(180deg, transparent 12%, color-mix(in srgb, var(--page-bg) 40%, transparent) 38%, var(--panel-strong) 62%, var(--panel-strong) 100%); }
  .step::before { left: 1.25rem; top: auto; bottom: 1.65rem; width: 3.6rem; height: 2px; }
  h1 { max-width: 9ch; margin-bottom: 1rem; font-size: clamp(3.5rem, 15vw, 5.4rem); }
  .step h2 { max-width: 13ch; font-size: clamp(2.45rem, 10.4vw, 3.7rem); }
  .step p { font-size: 1rem; line-height: 1.52; }
  .step .standfirst { font-size: 1.04rem; }
  .step .kicker { margin-bottom: .75rem; font-size: .61rem; }
  .step .evidence { font-size: .67rem; }
  .workbench { min-height: 100svh; display: grid; align-content: start; gap: .95rem; padding: 4.2rem .9rem 2rem; }
  .scene-ready .workbench .inspection-surface {
    position: sticky; top: 3.8rem; z-index: 3; display: block; height: clamp(174px, 30svh, 264px);
    border: 1px solid var(--rule); background: var(--scene-bg); overflow: hidden;
  }
  .inspection-surface #scene {
    position: absolute; width: 100%; height: 100%; touch-action: pan-y;
  }
  .inspection-on #hud { visibility: hidden; }
  .workbench-copy { scroll-margin-top: 13rem; }
  .workbench-copy { padding: 1.35rem 1.1rem 1.2rem; }
  .workbench h2, .photo-head h2, .sources h2 { font-size: clamp(2.5rem, 12vw, 4.1rem); }
  .view-selectors { gap: 0; }
  .view-button { min-height: 3.2rem; padding: .6rem .55rem; font-size: .65rem; }
  .camera-controls button { min-width: 2.8rem; min-height: 2.8rem; }
  .camera-controls [data-reset] { min-width: 8.8rem; }
  .view-hint { font-size: .76rem; }
  .photograph { padding: 4rem .9rem; }
  .photograph img { max-height: none; }
  .photograph figcaption { font-size: .73rem; }
  .sources { padding: 4rem 1.1rem 1.5rem; }
  footer { flex-wrap: wrap; font-size: .62rem; }
}
@media (max-width: 360px) {
  .home { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
  .view-button { font-size: .59rem; }
  .camera-controls [data-reset] { min-width: 7.3rem; padding-inline: .45rem; }
}
