:root {
  --blue: #1F5AA6; --blue-dark: #143D70; --blue-soft: #8FB2DD; --ink: #1c2530; --muted: #5b6977; --line: #e3e8ee;
  --bg: #ffffff; --bg-soft: #f6f8fa; --pink: #C2185B; --radius: 10px; --max: 1120px;
  --surface: #ffffff; --tint: #EEF4FB; --on-blue: #ffffff; --topbar-bg: rgba(255, 255, 255, .92); color-scheme: light;
}
/* dark mode: follows the device, or the switch in the top bar (data-theme on <html>, remembered) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #6CB4F2; --blue-dark: #9CCBF6; --blue-soft: #2B5D92; --ink: #E6EAF0; --muted: #A3ADB9; --line: #263142;
    --bg: #0C0F14; --bg-soft: #11161E; --pink: #F06292; --surface: #161D27; --tint: #142538; --on-blue: #0C0F14;
    --topbar-bg: rgba(12, 15, 20, .86); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blue: #6CB4F2; --blue-dark: #9CCBF6; --blue-soft: #2B5D92; --ink: #E6EAF0; --muted: #A3ADB9; --line: #263142;
  --bg: #0C0F14; --bg-soft: #11161E; --pink: #F06292; --surface: #161D27; --tint: #142538; --on-blue: #0C0F14;
  --topbar-bg: rgba(12, 15, 20, .86); color-scheme: dark;
}
body, .topbar, section.band, .stat, .step, .viewer, .panel, .air, .btn, table.bench { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; }
body { margin: 0; overflow-x: hidden; font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar-bg); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), #e0457f); display: inline-block; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--blue); text-decoration: none; }
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--blue); margin: 0 0 10px; font-weight: 600; }
h1 { font-size: 44px; line-height: 1.08; margin: 0 0 14px; letter-spacing: -.01em; }
.tag { font-size: 20px; color: var(--ink); margin: 0 0 14px; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; border: 1px solid var(--blue); }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; }
.btn-ghost { color: var(--blue); background: var(--surface); }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.hero-text { max-width: none; }
.hero-media { margin-top: 26px; }
.hero-media img { width: 100%; max-width: 1020px; display: block; margin: 0 auto; }
@media (max-width: 700px) { .hero-media img { max-width: 420px; } }
.hero-media .cap { text-align: center; color: var(--muted); font-size: 13px; margin: 8px auto 0; max-width: 900px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 0; }
.stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 26px; color: var(--blue); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
section.band { padding: 48px 0; border-top: 1px solid var(--line); }
section.band-soft { background: var(--bg-soft); }
h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 18px 0 6px; }
.sub { color: var(--muted); margin: 0 0 22px; max-width: 760px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step .n { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: var(--on-blue); text-align: center; line-height: 26px; font-weight: 700; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
figure { margin: 0; }
figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.how-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
.how-art img { border: none; border-radius: 50%; max-width: 340px; display: block; margin: 0 auto; }
.how-art figcaption { text-align: center; }
figcaption { font-size: 13px; color: var(--muted); margin: 8px 2px 0; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gallery figure.wide { grid-column: 1 / -1; }
/* viewer */
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.controls { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 14px; align-items: end; margin-bottom: 14px; }
.controls label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.controls select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; background: var(--surface); color: var(--ink); }
.lead { display: flex; align-items: center; gap: 10px; }
.lead input[type=range] { flex: 1; accent-color: var(--blue); }
.lead output { min-width: 86px; font-weight: 600; font-size: 14px; }
.layers { display: flex; gap: 6px; flex-wrap: wrap; }
.layers button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.layers button.on { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }
.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.panel .ttl { font-size: 13px; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg-soft); display: flex; justify-content: space-between; }
.panel .ttl span { color: var(--muted); font-weight: 400; }
.panel img { width: 100%; display: block; background: #fff; }
.panel .ttl { min-height: 38px; align-items: center; }
.side { display: contents; }
.cbars { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.cbars img { height: 54px; }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.missing { padding: 30px 12px; text-align: center; color: var(--muted); font-size: 13px; }
pre { border: 1px solid var(--line); background: #0f1720; color: #e6edf3; padding: 16px; border-radius: var(--radius); overflow: auto; font-size: 13px; line-height: 1.5; }
code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
table.links { width: 100%; border-collapse: collapse; font-size: 14px; }
table.links td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-word; }
table.links td:first-child { color: var(--muted); width: 32%; }
footer { padding: 30px 0 50px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .hero-grid, .steps, .gallery, .panels, .controls, .how-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
  .nav { display: none; }
  .hero { padding: 32px 0 24px; }
  section.band { padding: 32px 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  select, input, button, output { font-size: 16px; }
  .stats { grid-template-columns: 1fr; }
  .stat b { font-size: 22px; }
  .tag { font-size: 17px; }
  .lede { font-size: 15px; }
  h2 { font-size: 23px; }
  .cta .btn { width: 100%; text-align: center; }
  .viewer { padding: 12px; }
  .layers button { font-size: 12px; padding: 6px 10px; }
  .cbars { gap: 10px; }
  .cbars img { height: 44px; }
  pre { font-size: 11.5px; padding: 12px; }
}

/* viewer additions */
.hero-video { width: 100%; max-width: 1020px; display: block; margin: 0 auto; border-radius: var(--radius); background: #fff; }
@media (max-width: 700px) { .hero-video { max-width: 420px; } }
.viewer:focus { outline: 2px solid var(--blue-soft); outline-offset: 2px; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.loc { width: 64px; height: 64px; flex: none; }
.play { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--blue); background: var(--surface); color: var(--blue); cursor: pointer; font-size: 12px; }
.play:hover { background: var(--bg-soft); }
.help { font-size: 13px; color: var(--muted); margin: 8px 0 12px; min-height: 18px; }
.panel img { transition: opacity .15s ease; }
.dl { font-size: 13px; margin-left: auto; }
ul.limits { margin: 0; padding-left: 20px; color: var(--ink); }
ul.limits li { margin-bottom: 8px; }
@media (max-width: 480px) { .viewer-head { flex-direction: column; align-items: flex-start; } .loc { width: 56px; height: 56px; } .dl { margin-left: 0; } }

/* where was the air */
.air { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.air-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.air-presets button { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.air-presets button:hover { border-color: var(--blue); color: var(--blue); }
.air-canvas { width: 100%; display: block; border: 1px solid var(--line); border-radius: 8px; cursor: crosshair; touch-action: manipulation; background: #fff; }
.air-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.air-controls .lead { flex: 1; min-width: 260px; }
.air-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.air-legend { font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: middle; }
.dot-blue { background: #1F5AA6; } .dot-pink { background: #E0457F; }
.air-stats { font-size: 14px; margin: 12px 0 0; color: var(--ink); min-height: 22px; }
@media (max-width: 480px) { .air { padding: 10px; } .air-controls .lead { min-width: 0; } }

/* footer: credit on the left, partner logos on the right, stacked on phones */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 0 16px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.foot-text { min-width: 0; }
.credit-by { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; } .credit-by a { color: var(--ink); }
.credit-by a:hover { color: var(--blue); text-decoration: none; border-bottom: 2px solid var(--blue); }
.credit-org { font-size: 14px; color: var(--muted); margin-top: 3px; } .credit-links { font-size: 13px; margin-top: 6px; }
.foot-logos { display: flex; align-items: center; gap: 14px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.foot-logos a { display: flex; align-items: center; justify-content: center; height: 60px; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.foot-logos img { display: block; height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.foot-logos a.tile-amc { background: #22395a; border-color: #22395a; height: 96px; padding: 8px 14px; }
.foot-logos img.lg-amc { height: 80px; max-width: 150px; } .foot-logos img.lg-uh { height: 34px; } .foot-logos img.lg-lut { height: 40px; } .foot-logos img.lg-lumi { height: 30px; } .foot-logos img.lg-csc { height: 42px; }
.fine { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
@media (max-width: 860px) { .foot { flex-direction: column; align-items: flex-start; gap: 16px; } .foot-logos { flex-wrap: wrap; gap: 12px; } }
@media (max-width: 480px) { .credit-by { font-size: 17px; } .credit-org, .credit-links { font-size: 13px; } .foot-logos a { height: 52px; padding: 5px 8px; } .foot-logos img { height: 34px; } .foot-logos a.tile-amc { height: 84px; padding: 6px 10px; } .foot-logos img.lg-amc { height: 72px; } .foot-logos img.lg-uh { height: 28px; } .foot-logos img.lg-lut { height: 32px; } .foot-logos img.lg-lumi { height: 26px; } .foot-logos img.lg-csc { height: 36px; } }

/* phones: the air-origin controls wrap (label on its own line) */
@media (max-width: 600px) { .air-controls .lead { flex-wrap: wrap; min-width: 0; width: 100%; } .air-controls .air-label { flex-basis: 100%; }
  .air-controls .lead input[type=range] { min-width: 0; } .air-controls .lead output { min-width: 0; } .air-legend { width: 100%; } }

/* one-column story sections (results), architecture figure and the benchmark table */
.story-fig { margin: 18px 0 6px; }
.story-fig img { display: block; width: 100%; height: auto; }
.story-fig figcaption { font-size: 13.5px; max-width: 880px; }
.story { margin: 40px 0 0; }
.story:first-of-type { margin-top: 26px; }
.story h3 { font-size: 21px; margin: 0 0 8px; letter-spacing: -.005em; }
.story > p { max-width: 860px; margin: 0; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 22px; }
.cols2 p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 4px 0 10px; -webkit-overflow-scrolling: touch; }
table.bench { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.bench th, table.bench td { padding: 8px 11px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.bench th:first-child, table.bench td:first-child { text-align: left; white-space: normal; }
table.bench thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
table.bench tr:last-child td { border-bottom: none; }
table.bench tr.best td { font-weight: 700; color: var(--blue-dark); background: var(--tint); }
@media (max-width: 860px) { .cols2 { grid-template-columns: minmax(0, 1fr); gap: 14px; } .story h3 { font-size: 19px; } }
details.bench-table { margin: 10px 0 0; }
details.bench-table summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 14.5px; padding: 6px 0; }
details.bench-table[open] summary { margin-bottom: 6px; }
.arch-anim video { display: block; width: 100%; height: auto; background: #fff; }
.anim-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 8px 0 4px; }
.anim-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.anim-step { font: inherit; font-size: 13px; line-height: 1.2; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.anim-step b { color: var(--ink); margin-right: 3px; }
.anim-step:hover { background: var(--bg-soft); }
.anim-step.on { border-color: var(--blue); color: var(--blue); background: var(--tint); }
.anim-step.on b { color: var(--blue); }
.anim-tools { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.arch-anim figcaption { min-height: 3.2em; }
@media (max-width: 700px) { .arch-anim figcaption { min-height: 6.4em; } }
section.band-dark { background: #0C0F14; border-top: 0; color: #E8EAED; }
section.band-dark h2 { color: #fff; }
section.band-dark .sub { color: #A7AFB9; }
.explainer-feature { margin: 18px 0 0; }
.explainer-feature video { display: block; width: 100%; height: auto; background: #000; border-radius: 12px;
  box-shadow: 0 0 0 1px #2A3240, 0 18px 50px rgba(0, 0, 0, .55); }
.explainer-feature figcaption { color: #8F98A3; font-size: 13px; margin-top: 10px; }
.btn-watch { box-shadow: 0 6px 18px rgba(31, 90, 166, .35); }
.ex-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.ex-tab { font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid #3A4452; background: transparent; color: #C9CFD6; cursor: pointer; }
.ex-tab:hover { border-color: #58C4DD; }
.ex-tab.on { background: #58C4DD; border-color: #58C4DD; color: #0C0F14; font-weight: 600; }
.hero-media .ex-tabs { justify-content: center; margin: 0 0 12px; }
.hero-media .ex-tab { color: var(--ink); border-color: var(--line); background: var(--surface); }
.hero-media .ex-tab:hover { border-color: var(--blue); }
.hero-media .ex-tab.on { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.hero-media .explainer-feature { max-width: 1060px; margin: 0 auto; }
/* chapters under the film: one pill per scene, the current one lit while playing */
.ex-chapters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.ex-ch { font: inherit; font-size: 12.5px; line-height: 1.2; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.ex-ch:hover { border-color: var(--blue); color: var(--ink); }
.ex-ch.on { border-color: var(--blue); color: var(--ink); box-shadow: inset 0 0 0 1px var(--blue); }
.ex-ch-t { font-variant-numeric: tabular-nums; color: var(--blue); margin-right: 2px; }
video::cue { background: rgba(12, 15, 20, 0.72); color: #F2F4F7; font-size: 0.9em; line-height: 1.3; }
.hero-media .explainer-feature figcaption { color: var(--muted); text-align: center; }

/* the theme switch and the two versions of the logo */
.top-right { display: flex; align-items: center; gap: 16px; }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; } :root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; } }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; } :root[data-theme="dark"] .logo-light { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-dark { display: block !important; } :root:not([data-theme="light"]) .logo-light { display: none !important; } }

/* the four animated globes under the logo (the same as at the top of the README) */
.globe-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; max-width: 780px; margin: 18px 0 20px; }
.globe-row figure { margin: 0; text-align: center; }
.globe-row img { width: 100%; max-width: 170px; height: auto; display: block; margin: 0 auto; border: 0; background: transparent; }
.globe-row figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.35; }
@media (max-width: 600px) { .globe-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .globe-row img { max-width: 150px; } }

/* hero in two columns on wide screens: name and words on the left, the four globes as a 2 x 2 grid on the right;
   on narrow screens: the name first, then the globes, then the words and the buttons */
.hero-top { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); grid-template-areas: "head globes" "body globes";
  column-gap: 44px; align-items: center; }
.hero-head { grid-area: head; min-width: 0; align-self: end; }
.hero-body { grid-area: body; min-width: 0; align-self: start; }
.hero-right { grid-area: globes; min-width: 0; }
.globe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; max-width: 460px; margin: 0 0 0 auto; }
.globe-grid img { max-width: 190px; }
.hero .stats { margin-top: 26px; }
@media (max-width: 960px) { .hero-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "globes" "body"; }
  .globe-grid { margin: 4px 0 18px; max-width: 760px; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .globe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
