@font-face { font-family:'Inter Variable'; font-style:normal; font-weight:100 900; font-display:swap; src:url('../../a/fonts/inter-latin-wght.woff2') format('woff2'); }
@font-face { font-family:'Geist Mono Variable'; font-style:normal; font-weight:100 900; font-display:swap; src:url('../../a/fonts/geist-mono-latin-wght.woff2') format('woff2'); }
/* while Inter downloads, a local sans with Inter's metrics (size-adjust and the vertical overrides) so the heading wraps to the
   same lines and nothing moves when the real font arrives (QA R-11: the first section used to jump 32 px on phones) */
@font-face { font-family:'Inter Fallback'; src:local('Arial'), local('Liberation Sans'), local('Helvetica Neue'), local('Helvetica'), local('Roboto'); size-adjust:107.1%; ascent-override:90.5%; descent-override:22.6%; line-gap-override:0%; }
:root {
  --font-sans:'Inter Variable', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono:'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
  --radius-sm:12px; --radius-md:16px; --radius-lg:20px; --radius-card:24px; --radius-pill:999px;
  --ease-out:cubic-bezier(0.22, 1, 0.36, 1);
  --header:56px; --col:960px;
}
:root, [data-theme='dark'] {
  color-scheme:dark;
  --bg-0:#141417; --bg-1:#19191c; --bg-2:#1f2023;
  --fill-1:rgba(255,255,255,.035); --fill-2:rgba(255,255,255,.06); --fill-3:rgba(255,255,255,.08); --fill-4:rgba(255,255,255,.11); --fill-5:rgba(255,255,255,.16);
  --text-1:rgba(245,245,245,.92); --text-2:rgba(237,237,237,.64); --text-3:rgba(237,237,237,.44); --text-4:rgba(237,237,237,.26);
  --line:rgba(255,255,255,.07);
  --shadow-float:0 0 0 1px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.12), 0 12px 48px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.05), inset 0 1px 0 rgba(255,255,255,.05);
  --shadow-tile:inset 0 0 0 1px rgba(255,255,255,.045), inset 0 1px 0 rgba(255,255,255,.05);
  --glass:rgba(34,35,39,.58); --glass-strong:rgba(30,31,35,.82); --card:rgba(255,255,255,.045);
  --page:radial-gradient(1100px 640px at 50% 20%, #1e1f23 0%, #161619 58%, #111113 100%);
  --stage:radial-gradient(70% 60% at 50% 45%, rgba(120,150,200,.10), rgba(0,0,0,0) 70%);
  --accent:#6fb8ff;
}
[data-theme='light'] {
  color-scheme:light;
  --bg-0:#efeff0; --bg-1:#f7f7f8; --bg-2:#fff;
  --fill-1:rgba(0,0,0,.025); --fill-2:rgba(0,0,0,.04); --fill-3:rgba(0,0,0,.055); --fill-4:rgba(0,0,0,.075); --fill-5:rgba(0,0,0,.11);
  --text-1:rgba(21,21,21,.92); --text-2:rgba(21,21,21,.58); --text-3:rgba(21,21,21,.42); --text-4:rgba(21,21,21,.26);
  --line:rgba(0,0,0,.07);
  --shadow-float:0 0 0 1px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.1);
  --shadow-tile:inset 0 0 0 1px rgba(0,0,0,.045);
  --glass:rgba(255,255,255,.62); --glass-strong:rgba(255,255,255,.86); --card:rgba(255,255,255,.78);
  --page:radial-gradient(1100px 640px at 50% 20%, #ffffff 0%, #f3f3f5 55%, #ebebee 100%);
  --stage:radial-gradient(70% 60% at 50% 45%, rgba(90,130,200,.10), rgba(0,0,0,0) 70%);
  --accent:#1f6fd0;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } }
body { margin:0; font:15px/1.55 var(--font-sans); color:var(--text-1); background:var(--bg-0); -webkit-font-smoothing:antialiased; font-feature-settings:'cv11','ss01'; }
#page-bg { position:fixed; inset:0; background:var(--page); z-index:-1; }
button { font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; }
a { color:inherit; text-decoration:none; }
:focus-visible { outline:2px solid var(--text-2); outline-offset:3px; }
.cap { font:500 10px/1.2 var(--font-mono); text-transform:uppercase; letter-spacing:.08em; color:var(--text-3); }
.glass { background:var(--glass); -webkit-backdrop-filter:blur(28px) saturate(1.7); backdrop-filter:blur(28px) saturate(1.7); box-shadow:var(--shadow-float); }

/* header, same as the map */
.bar { position:fixed; top:0; left:0; right:0; height:var(--header); display:flex; align-items:center; justify-content:space-between; padding:0 22px; z-index:30; pointer-events:none; }
.bar > * { pointer-events:auto; }
.bar::before { content:''; position:absolute; inset:0; background:var(--glass-strong); -webkit-backdrop-filter:blur(24px) saturate(1.6); backdrop-filter:blur(24px) saturate(1.6); box-shadow:0 1px 0 var(--line); opacity:0; transition:opacity .25s; z-index:-1; }
.bar.scrolled::before { opacity:1; }
.brand { display:flex; align-items:center; gap:10px; font-weight:600; font-size:14px; letter-spacing:-.01em; }
.brand img { width:26px; height:26px; border-radius:50%; }
.brand .sep { width:1px; height:14px; background:var(--line); margin:0 2px; }
.right { display:flex; align-items:center; gap:8px; }
.pill { display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 12px 0 10px; border-radius:var(--radius-pill); font-size:12.5px; font-weight:500; color:var(--text-2); transition:color .2s; }
.pill:hover { color:var(--text-1); }
.pill svg { width:14px; height:14px; }
.theme { display:flex; gap:2px; padding:3px; border-radius:var(--radius-pill); }
.theme button { width:30px; height:26px; border-radius:var(--radius-pill); display:grid; place-items:center; color:var(--text-3); transition:color .2s, background .2s; }
.theme button[aria-pressed='true'] { background:var(--fill-4); color:var(--text-1); box-shadow:var(--shadow-tile); }
.theme svg { width:15px; height:15px; }

/* page */
main { max-width:var(--col); margin:0 auto; padding:calc(var(--header) + 44px) 22px 80px; }
.hero { text-align:center; padding:12px 0 36px; }
.hero h1 { margin:10px 0 0; font-size:40px; line-height:1.08; font-weight:600; letter-spacing:-.028em; }
.hero p { margin:14px auto 0; max-width:620px; font-size:17px; line-height:1.5; color:var(--text-2); }
.hero .toc { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:24px auto 0; padding:0; list-style:none; max-width:760px; }
.hero .toc a { display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 12px; border-radius:var(--radius-pill); background:var(--fill-2); box-shadow:var(--shadow-tile); font-size:12.5px; color:var(--text-2); transition:background .2s, color .2s; }
.hero .toc a:hover { background:var(--fill-4); color:var(--text-1); }
.hero .toc a b { font:500 10px/1 var(--font-mono); color:var(--text-4); }
.beat { padding:36px 0 8px; scroll-margin-top:calc(var(--header) + 8px); }
.beat + .beat { border-top:1px solid var(--line); }
.beat header { display:flex; align-items:baseline; gap:14px; margin:0 0 16px; }
.beat header .n { font:500 11px/1 var(--font-mono); color:var(--text-4); letter-spacing:.06em; }
.beat h2 { margin:0; font-size:24px; line-height:1.2; font-weight:600; letter-spacing:-.02em; }
.beat .text { display:grid; grid-template-columns:minmax(0, 1.1fr) minmax(0, 1fr); gap:28px; margin-top:18px; }
.beat .text p { margin:0 0 12px; color:var(--text-2); font-size:15px; }
.beat .text p strong { color:var(--text-1); font-weight:600; }
.beat .text .lead { font-size:17px; color:var(--text-1); line-height:1.5; }
sup.fn { font-size:.68em; line-height:0; vertical-align:baseline; position:relative; top:-.55em; margin-left:1px; }
sup.fn a { color:var(--accent); font-weight:600; padding:0 1px; }

/* the figure */
.fig { margin:0; position:relative; }
.fig .stage { position:relative; width:100%; aspect-ratio:4 / 3; border-radius:var(--radius-card); background:var(--card); box-shadow:var(--shadow-tile); overflow:hidden; }
.fig .stage::before { content:''; position:absolute; inset:0; background:var(--stage); pointer-events:none; }
.fig canvas.gl, .fig img.still { position:absolute; inset:0; width:100%; height:100%; display:block; }
.fig img.still { object-fit:cover; display:block; }
.fig.gl img.still { display:none; }
.fig.gl.nogl img.still { display:block; }
.fig.nogl canvas.gl { display:none; }
.fig .ctl { position:absolute; right:12px; bottom:12px; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; color:var(--text-2); z-index:3; }
.fig .ctl svg { width:14px; height:14px; }
.fig .ctl .play { display:none; }
.fig .ctl.paused .pause { display:none; }
.fig .ctl.paused .play { display:block; }
.fig .ctl:hover { color:var(--text-1); }
.fig .ctl[hidden], .fig.nogl .ctl { display:none; }
.fig .readout { display:block; margin:12px 2px 0; min-height:12px; color:var(--text-3); transition:opacity .3s; }
.fig .readout:empty { opacity:0; }
.fig figcaption { margin:6px 2px 0; font-size:13px; line-height:1.5; color:var(--text-2); }
.fig figcaption b { color:var(--text-1); font-weight:600; }
.note { font:400 11.5px/1.5 var(--font-sans); color:var(--text-3); }

/* sources */
.sources { margin-top:56px; padding-top:28px; border-top:1px solid var(--line); }
.sources h2 { font-size:18px; margin:0 0 6px; letter-spacing:-.015em; }
.sources p { color:var(--text-2); font-size:13.5px; margin:0 0 14px; }
.sources ol { padding-left:22px; margin:0; }
.sources li { font-size:13px; line-height:1.55; color:var(--text-2); margin:0 0 9px; scroll-margin-top:calc(var(--header) + 12px); }
.sources li:target { color:var(--text-1); }
.sources li a { color:var(--accent); word-break:break-word; }
.sources li q { font-style:italic; }
.foot { margin-top:48px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px 20px; align-items:center; }
.foot .cap { font-size:10px; }
.next { display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 18px; border-radius:var(--radius-pill); background:var(--fill-3); box-shadow:var(--shadow-tile); font-weight:500; font-size:14px; transition:background .2s; }
.next:hover { background:var(--fill-5); }
.next svg { width:14px; height:14px; }

@media (max-width: 720px) {
  .bar { padding:0 14px; }
  .brand .cap, .brand .sep { display:none; }
  .pill span { display:none; }
  .pill { padding:0 9px; }
  main { padding:calc(var(--header) + 24px) 14px 60px; }
  .hero h1 { font-size:30px; }
  .hero p { font-size:15px; }
  .beat h2 { font-size:21px; }
  .beat .text { grid-template-columns:1fr; gap:0; }
  .fig .stage { aspect-ratio:1 / 1; border-radius:var(--radius-lg); }
  .fig.nogl .stage { aspect-ratio:4 / 3; }   /* without WebGL the 4:3 still is the whole scene: keep its frame so nothing is cropped off the sides (QA R-07) */
}
