/* Code-Any-Shape project page.
   Layout: a light studio opening where the paper's five-domain stage sits behind the title, then quiet sections
   in which programs stay in dark code panels and shapes in light viewports. Colours follow the paper's figures
   (figures/_common/style.json); "Code" in the title wears the blue of the word GeoFunc on the stage. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  /* paper and ink */
  --bg: #F4F3F0; --bg-0: rgba(244, 243, 240, 0); --tint: #ECEAE5; --surface: #FFFFFF;
  --ink: #1F2328; --ink-2: #474C55; --muted: #6B7280; --rule: #D6D4CF; --rule-soft: #E4E2DD;
  /* code panels */
  --night: #1B1D26; --night-1: #22252F; --night-2: #2C303C; --night-rule: rgba(255, 255, 255, .1);
  --on-night: #ECEDF1; --on-night-2: #B9BDCB; --on-night-muted: #8A90A3;
  /* brand: the word GeoFunc on the stage, the language slate and its accent; red only marks an edit */
  --geo: #4C5577; --slate: #69759E; --accent: #5560D6; --accent-ink: #3F49B4; --accent-soft: #E7E9FB; --accent-night: #A3ADFF;
  --edit: #E0282E; --ok: #23764A; --bad: #B23A30;
  /* the five domains (ui colour) */
  --d-part: #2B5F9E; --d-arch: #D86F3D; --d-item: #66A17A; --d-eqpt: #E9B940; --d-orga: #C27BAE;
  /* code tokens on the dark panel */
  --c-text: #D8DBE6; --c-kw: #D9A9CC; --c-gf: #A3ADFF; --c-fn: #C9D0F2; --c-num: #F1B58A; --c-str: #A9D6B8;
  --c-com: #737A8E; --c-par: #F2D58C; --c-ln: #596074;
  /* type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* measure */
  --wrap: 1200px; --gut: clamp(16px, 4vw, 40px); --r: 10px; --r-s: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.6 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.code:focus-visible { outline-color: var(--accent-night); }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gut)); margin-inline: auto; padding-inline: max(var(--gut), env(safe-area-inset-left, 0px)) max(var(--gut), env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: var(--r-s); }
.skip:focus { left: 12px; }
.num { font-variant-numeric: tabular-nums; }
code { font: 0.9em var(--mono); }
.eyebrow { font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }

/* ───────────── navigation ───────────── */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; padding-top: env(safe-area-inset-top, 0px); color: var(--ink); border-bottom: 1px solid transparent; transition: background-color .25s, border-color .25s; }
.nav-in { display: flex; align-items: center; gap: 24px; height: 58px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 600 15px var(--text); letter-spacing: -.01em; white-space: nowrap; flex: none; }
.brand b { font-weight: 700; color: var(--geo); }
.mark { width: 24px; height: 24px; flex: none; --mark-accent: var(--accent); }
.nav-links { margin-left: auto; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: inherit; opacity: .66; text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 6px 10px; border-radius: 99px; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="true"] { opacity: 1; }
.nav-links a[aria-current="true"] { background: rgba(31, 35, 40, .07); }
.nav.solid { background: rgba(244, 243, 240, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: var(--rule-soft); }

/* ───────────── opening: the stage behind the title ───────────── */
/* title centred at the top, the stage rising behind it under a veil of the paper colour;
   a background video takes the stage's place when one is configured */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center;
  height: clamp(640px, 100svh, 1040px); padding-top: clamp(100px, 14vh, 150px);
  background: radial-gradient(110% 80% at 50% 70%, #FCFBFA 0%, #F6F5F2 50%, #ECEAE5 100%); perspective: 1600px; }
.hero-in { position: relative; display: flex; flex-direction: column; align-items: center; animation: fade .9s .1s cubic-bezier(.2, .7, .2, 1) both; }
/* on short screens the stage rises a little more, so its "617K programs" sign stays above the play button */
.hero-media { position: relative; z-index: -2; flex: none; width: min(106vw, 1900px); margin-top: calc(-1 * clamp(90px, 16vw, 300px) - clamp(0px, (940px - 100svh) * .9, 110px));
  transform: translate3d(calc(var(--px, 0) * -18px), calc(var(--py, 0) * -10px), 0) rotateX(calc(var(--py, 0) * 2deg)) rotateY(calc(var(--px, 0) * -2.6deg));
  will-change: transform; }
.hero-img { width: 100%; height: auto; animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both; }
video.hero-img { aspect-ratio: 16 / 9; object-fit: cover; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* the veil: solid behind the text (whose bottom main.js measures into --fade), clear over the stage below */
.hero-veil { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0, rgba(244, 243, 240, .94) calc(var(--fade, 470px) - 120px),
              rgba(244, 243, 240, .55) calc(var(--fade, 470px) - 10px), var(--bg-0) calc(var(--fade, 470px) + 110px)),
              linear-gradient(0deg, var(--bg) 0%, var(--bg-0) 9%); }
/* a drafting grid that the pointer reveals behind the stage */
.hero-grid { position: absolute; inset: 0; z-index: -3; pointer-events: none; opacity: 0; transition: opacity .6s;
  background-image: radial-gradient(circle, rgba(31, 35, 40, .26) 1px, transparent 1.6px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(300px circle at var(--lx, -600px) var(--ly, -600px), #000 0%, transparent 70%);
  mask-image: radial-gradient(300px circle at var(--lx, -600px) var(--ly, -600px), #000 0%, transparent 70%); }
.hero.pointer .hero-grid { opacity: 1; }
.title { font: 760 clamp(38px, 6.6vw, 112px)/.95 var(--display); font-stretch: 118%; letter-spacing: -.035em; white-space: nowrap; }
.t-code { color: var(--geo); }
.subtitle { margin-top: 20px; font: 500 clamp(21px, 2.15vw, 30px)/1.25 var(--text); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.authors { margin-top: 30px; max-width: 900px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 17.5px; font-weight: 550; }
.authors a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.authors a:hover { border-bottom-color: currentColor; }
.authors sup, .orgs-eq sup { font: 500 .68em var(--mono); color: var(--muted); margin-left: 1px; vertical-align: .55em; line-height: 0; }
/* each affiliation is its number and its logo: inline SVG, height --h (balanced by eye) and aspect ratio --r per logo */
.orgs { margin-top: 16px; max-width: 980px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 36px; }
.orgs li { display: flex; align-items: flex-start; gap: 4px; }
.orgs sup { font: 500 11px/1 var(--mono); color: var(--muted); }
.org-logo { display: block; height: calc(var(--h) * var(--k, 1)); width: calc(var(--h) * var(--k, 1) * var(--r)); flex: none; }
.orgs-eq sup { margin: 0 2px 0 0; }
.orgs-eq { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; font-size: 13.5px; color: var(--muted); }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 19px 0 16px; border: 1px solid var(--rule); border-radius: 99px;
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); font-weight: 560; font-size: 15.5px;
  text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .15s; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:hover { background: #fff; border-color: var(--ink-2); color: var(--ink); transform: translateY(-1px); }
.btn-solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-solid:hover { background: #000; border-color: #000; color: #fff; }
.btn[aria-disabled="true"] { border-style: dashed; color: var(--muted); background: rgba(255, 255, 255, .4); cursor: default; transform: none; }
.btn[aria-disabled="true"]::after { content: "soon"; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--tint); color: var(--muted); }

/* ───────────── the film: a play button on the opening, a dimmed theater over it, a mini player further down ───────────── */
.reel { position: absolute; left: 0; right: 0; bottom: clamp(22px, 5vh, 52px); z-index: 3; width: max-content; margin-inline: auto;
  display: flex; align-items: center; gap: 14px; padding: 6px 24px 6px 6px; border: 1px solid rgba(255, 255, 255, .92); border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .68)); color: var(--ink); text-align: left; cursor: pointer;
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 1px rgba(31, 35, 40, .07), 0 14px 34px -12px rgba(31, 35, 40, .34);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s, opacity .3s; transform-origin: 50% 100%;
  animation: fade .9s .6s cubic-bezier(.2, .7, .2, 1) backwards, hop 3.2s 2.2s infinite; }
/* a double hop with a small squash every 3.2 s; it waits while the pointer is on the button and stops once the film was opened */
@keyframes hop {
  0%, 50%, 100% { translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(.25, .6, .35, 1); }
  58% { translate: 0 -14px; scale: 1; animation-timing-function: cubic-bezier(.55, 0, .85, .4); }
  66% { translate: 0 0; scale: 1.03 .95; animation-timing-function: cubic-bezier(.25, .6, .35, 1); }
  70% { scale: 1; }
  74% { translate: 0 -6px; animation-timing-function: cubic-bezier(.55, 0, .85, .4); }
  80% { translate: 0 0; scale: 1.015 .975; }
  84% { scale: 1; } }
.reel:hover, .reel:focus-visible { animation-play-state: running, paused; }
.reel.seen { animation: none; }
.reel:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 1px rgba(31, 35, 40, .09), 0 22px 44px -14px rgba(31, 35, 40, .42); }
.reel:focus-visible { outline-color: var(--accent); outline-offset: 3px; }
/* a frame of the film (the hydrant taken apart, 0:18) with a play disc; a glint passes over it now and then */
.reel-thumb { position: relative; flex: none; display: grid; place-items: center; width: 80px; height: 45px; overflow: hidden; border-radius: 12px;
  background: #0C0D12 url("../video/thumb.webp") center / cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.reel-thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .34) 50%, transparent 65%);
  transform: translateX(-120%); animation: glint 5s 1.6s ease-in-out infinite; }
@keyframes glint { 0% { transform: translateX(-120%); } 28%, 100% { transform: translateX(120%); } }
.reel-play { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 2px 10px rgba(0, 0, 0, .35); transition: transform .35s cubic-bezier(.2, .7, .2, 1), background-color .35s; }
.reel-play svg { width: 11px; height: 11px; margin-left: 2px; color: #fff; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.reel:hover .reel-play { transform: scale(1.14); background: rgba(255, 255, 255, .34); }
.reel-t { display: flex; flex-direction: column; gap: 4px; line-height: 1.1; }
.reel-t b { font: 650 15.5px var(--text); letter-spacing: -.012em; }
.reel-t small { display: flex; align-items: center; gap: 7px; font: 500 12px var(--mono); color: var(--muted); }
.reel-t small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: beacon 2.4s ease-out infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(85, 96, 214, .5); } 70%, 100% { box-shadow: 0 0 0 6px rgba(85, 96, 214, 0); } }
.reel[aria-expanded="true"] { opacity: 0; pointer-events: none; }
/* the theater covers the opening only (its height is the opening's, --hero-h), so the page below still scrolls */
.theater { position: absolute; left: 0; right: 0; top: 0; z-index: 25; height: var(--hero-h, 100svh); display: grid; place-items: center;
  padding: 58px 0 64px; }
/* only the dark backdrop fades; the picture grows on its own, so the page never shows through it */
.theater::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease;
  background: radial-gradient(120% 90% at 50% 45%, rgba(20, 21, 29, .9) 0%, rgba(8, 9, 12, .97) 70%); }
.theater.open::before { opacity: 1; }
.theater-frame { position: relative; width: min(1480px, 88vw, calc((min(var(--hero-h, 100svh), 100svh) - 170px) * 1.7778)); aspect-ratio: 16 / 9; }
.tf-screen { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
.tf-screen video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tf-btns { position: absolute; top: -48px; right: 0; display: flex; gap: 8px; }
.tf-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background-color .2s; }
.tf-btn:hover { background: rgba(255, 255, 255, .2); }
.tf-btn svg { width: 16px; height: 16px; }
.t-scroll { position: absolute; left: 0; right: 0; bottom: 18px; width: max-content; margin-inline: auto; display: flex; flex-direction: column;
  align-items: center; gap: 2px; font: 500 12.5px var(--text); color: rgba(255, 255, 255, .62); text-decoration: none; opacity: 0; transition: opacity .5s .25s, color .2s; }
.theater.open .t-scroll { opacity: 1; }
.t-scroll:hover { color: #fff; }
.t-scroll svg { width: 18px; height: 18px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
/* the mini player: while the film plays and the opening has scrolled away */
/* a phone held upright plays the 9:16 cut */
.theater.portrait .theater-frame { aspect-ratio: 9 / 16; width: min(calc(100vw - 24px), calc((min(var(--hero-h, 100svh), 100svh) - 130px) * .5625)); }
.theater.portrait .theater-frame.docked { width: min(128px, 33vw); }
.theater-frame.docked { position: fixed; z-index: 35; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  width: min(380px, 46vw); }
.docked .tf-screen { border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .1); }
.docked .tf-btns { top: 8px; right: 8px; z-index: 2; opacity: 0; transition: opacity .2s; }
.docked:hover .tf-btns, .docked:focus-within .tf-btns { opacity: 1; }
.docked .tf-btn { width: 30px; height: 30px; background: rgba(14, 15, 21, .72); }
@media (hover: none) { .docked .tf-btns { opacity: 1; } }
/* the navigation over the theater */
.nav.on-dark { color: #fff; }
.nav.on-dark .brand b { color: #A3ADFF; }
.nav.on-dark .mark { --mark-accent: #A3ADFF; }
.nav.on-dark .nav-links a[aria-current="true"] { background: rgba(255, 255, 255, .12); }
.nav.on-dark.solid { background: rgba(12, 13, 18, .72); border-bottom-color: rgba(255, 255, 255, .08); }

/* ───────────── shared controls ───────────── */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 11px; border: 1px solid var(--rule); border-radius: 99px; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; position: relative; overflow: hidden; }
.chip:hover { color: var(--ink); border-color: var(--ink-2); }
.chip[aria-selected="true"] { color: var(--ink); background: var(--surface); border-color: var(--ink); }
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip .prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.ctl { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ctl:hover { border-color: var(--ink-2); }
.ctl svg { width: 14px; height: 14px; }
.ctl[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ctl:disabled { opacity: .45; cursor: default; }
.ctl-dark { background: none; border-color: var(--night-rule); color: var(--on-night-2); }
.ctl-dark:hover { border-color: rgba(255, 255, 255, .4); color: var(--on-night); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--tint); border: 1px solid var(--rule-soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; height: 28px; padding: 0 11px; border-radius: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 35, 40, .12); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
[data-d="PART"] { --d: var(--d-part); } [data-d="ARCH"] { --d: var(--d-arch); } [data-d="ITEM"] { --d: var(--d-item); }
[data-d="EQPT"] { --d: var(--d-eqpt); } [data-d="ORGA"] { --d: var(--d-orga); }
.dom { white-space: nowrap; }
.dom::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--d); margin-right: 6px; }
@media (hover: none) { .hover-only { display: none; } }
@media (hover: hover) { .touch-only { display: none; } }

/* ───────────── code panel ───────────── */
.code { margin: 0; overflow: auto; background: var(--night-1); color: var(--c-text); font: 400 12.5px/1.62 var(--mono); padding: 10px 0 14px; tab-size: 4; scrollbar-color: #4a5063 transparent; scrollbar-width: thin; }
.code .l { display: block; white-space: pre; padding-right: 18px; min-height: 1.62em; }
.code .l::before { content: attr(data-n); display: inline-block; width: 3.4em; padding-right: 1.1em; text-align: right; color: var(--c-ln); -webkit-user-select: none; user-select: none; }
.code .l.hl { background: rgba(163, 173, 255, .16); box-shadow: inset 3px 0 0 var(--accent-night); }
.code .l.hl::before { color: var(--accent-night); }
.code .l.chg { background: rgba(224, 40, 46, .2); box-shadow: inset 3px 0 0 #FF5A5F; }
.code .l.chg::before { color: #FF9A9D; }
.code .l.note::after { content: attr(data-note); margin-left: 16px; padding: 1px 8px; border-radius: 99px; background: var(--accent-night); color: var(--night); font: 600 11px var(--text); }
.code .caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 1px; vertical-align: -.16em; background: var(--accent-night); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tk-k { color: var(--c-kw); } .tk-g { color: var(--c-gf); font-weight: 500; } .tk-f { color: var(--c-fn); } .tk-n { color: var(--c-num); }
.tk-s { color: var(--c-str); } .tk-c { color: var(--c-com); font-style: italic; } .tk-p { color: var(--c-par); }

/* ───────────── sections ───────────── */
.sec { padding-block: clamp(64px, 9vw, 112px); }
.sec-tint { background: var(--tint); }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 48px; row-gap: 14px; align-items: end; margin-bottom: 36px; }
.sec-head .eyebrow { grid-column: 1 / -1; }
h2 { font: 720 clamp(28px, 3.7vw, 46px)/1.04 var(--display); font-stretch: 112%; letter-spacing: -.028em; text-wrap: balance; }
.h2-s { font-size: clamp(24px, 2.6vw, 32px); margin-top: 12px; }
h3 { font: 620 17px/1.3 var(--text); letter-spacing: -.012em; }
.lead { font-size: 17.5px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.foot { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 96ch; }
.foot-line { max-width: none; }                /* one line on desktop */

/* overview: the live stage (image -> program -> shape) */
.live { display: grid; grid-template-columns: 200px 148px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 440px auto; gap: 12px; --ay: 127px; }
.pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.pane-h { flex: none; display: flex; align-items: center; gap: 9px; padding: 10px 12px; font: 600 11.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule-soft); }
.pane-note { margin-left: auto; font: 400 11.5px var(--text); letter-spacing: 0; text-transform: none; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--tint); color: var(--ink); font: 600 10.5px var(--mono); letter-spacing: 0; transition: background-color .3s, color .3s; }
.p-code { background: var(--night-1); border-color: var(--night-1); }
.p-code .pane-h { color: var(--on-night-2); border-bottom-color: var(--night-rule); }
.p-code .pane-note { color: var(--on-night-muted); }
.p-code .step { background: var(--night-2); color: var(--on-night); }
.live[data-step="1"] .p-in .step, .live[data-step="2"] .p-code .step, .live[data-step="3"] .p-3d .step { background: var(--accent); color: #fff; }
.in-img { margin: 12px 12px 0; border-radius: var(--r-s); background: #000; aspect-ratio: 1; overflow: hidden; }
.in-img img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .35s; }
.in-img img.on { opacity: 1; }
.in-facts { margin: 12px 12px 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px 12px; font-size: 12.5px; line-height: 1.3; }
.in-facts div { min-width: 0; }
.in-facts div.w { grid-column: 1 / -1; }
.in-facts dt { font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.in-facts dd { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-facts .ok { color: var(--ok); font-weight: 600; }
.live .code { flex: 1; min-height: 0; }
.p-3d .view-light { flex: 1; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.live-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.live-bar .ctl { margin-left: auto; height: 34px; border-radius: 99px; }
/* the flow: image -> model -> program -> shape. The model sits between the image and the program; the arrows sit in the
   gaps at the height of the image centre (--ay) and light up for the current step */
.p-in { grid-column: 1; grid-row: 1; } .p-model { grid-column: 2; grid-row: 1; } .p-code { grid-column: 3; grid-row: 1; } .p-3d { grid-column: 4; grid-row: 1; }
.live-bar { grid-row: 2; }
.p-model { min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid #CDD1F3; border-radius: var(--r);
  background: linear-gradient(180deg, #F2F3FD 0%, #E5E8FB 100%); transition: border-color .3s, box-shadow .3s; }
.p-model .pane-h { justify-content: center; color: var(--accent-ink); border-bottom-color: rgba(85, 96, 214, .16); }
.m-chip { align-self: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #727CEA 0%, #3F49B4 100%); box-shadow: 0 6px 16px rgba(63, 73, 180, .28), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .3s; }
.m-chip svg { width: 30px; height: 30px; --mark-accent: #C9CEFF; }
.m-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px 12px; text-align: center; }
.m-name { font: 680 14px/1.2 var(--text); letter-spacing: -.01em; color: var(--ink); }
.m-spec { font-size: 12px; line-height: 1.35; color: var(--ink-2); text-wrap: balance; }
.m-out { padding: 12px 12px 14px; border-top: 1px solid rgba(85, 96, 214, .16); text-align: center; }
.m-state { font: 600 10.5px/1.25 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.m-tok { margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.m-tok b { margin-right: 2px; font: 740 22px/1 var(--display); font-stretch: 112%; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-bar { margin-top: 8px; height: 3px; border-radius: 2px; background: rgba(85, 96, 214, .16); overflow: hidden; }
.m-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.live[data-step="2"] .p-model { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(85, 96, 214, .14); }
.live[data-step="2"] .m-chip { animation: think 1.1s ease-in-out infinite; }
@keyframes think { 50% { transform: scale(1.06); box-shadow: 0 8px 22px rgba(63, 73, 180, .4), inset 0 1px 0 rgba(255, 255, 255, .25); } }
.flow { grid-row: 1; justify-self: start; align-self: start; z-index: 2; margin: var(--ay) 0 0 -18px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); border: 1px solid var(--rule); color: var(--muted);
  transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s; }
.flow svg { width: 13px; height: 13px; }
.a1 { grid-column: 2; } .a2 { grid-column: 3; } .a3 { grid-column: 4; }
.live[data-step="1"] .a1, .live[data-step="2"] .a2, .live[data-step="3"] .a3 { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(85, 96, 214, .16); }
.claims { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.claim { padding: 22px 24px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.claim + .claim { padding-left: 24px; border-left: 1px solid var(--rule); }
.claim h3 { font: 640 21px/1.18 var(--text); letter-spacing: -.02em; text-wrap: balance; }
.claim h3 .num { font: 740 1.16em/1 var(--display); font-stretch: 112%; letter-spacing: -.03em; color: var(--accent-ink); font-variant-numeric: normal; }
.claim p:last-child { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.abstract { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 18px 48px; align-items: start; }
.abs-text { display: grid; gap: 12px; max-width: 78ch; font-size: 15.5px; line-height: 1.68; color: var(--ink-2); }

/* thumbnail strips */
.strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.strip-c { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.thumb { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--surface); cursor: pointer; overflow: hidden; text-align: left; transition: border-color .15s; }
.thumb:hover { border-color: var(--ink-2); }
.thumb[aria-selected="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.thumb .im { position: relative; aspect-ratio: 1; background: #000; }
.thumb .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .25s; }
/* the color image shows under the pointer */
.thumb .im img.alt { opacity: 0; }
.thumb:hover .im img.alt, .thumb:focus-visible .im img.alt { opacity: 1; }
.thumb .tx { padding: 6px 8px 7px; display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; font-weight: 550; line-height: 1.2; min-width: 0; flex: 1; }
.thumb .tx span::first-letter { text-transform: uppercase; }
.thumb .tx .dot { transform: translateY(-1px); }
.strip-c .thumb { flex-direction: row; align-items: center; }
.strip-c .thumb .im { width: 56px; flex: none; }
.strip-c .thumb .tx { font-size: 14px; padding: 0 12px; align-items: center; }

/* viewers: 3D left, program right */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.v-stage { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-left: auto; }
.meta b { color: var(--ink); font-weight: 600; text-transform: capitalize; }
.meta-l { margin: 0 0 10px; }
.view { position: relative; min-height: 0; overflow: hidden; }
.view-light { aspect-ratio: 1; border: 1px solid var(--rule); border-radius: var(--r); background: radial-gradient(80% 62% at 50% 58%, #FFFFFF 0%, #F7F6F3 50%, #EAE8E3 100%); }
.view canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline-offset: -3px; }
.view canvas:active { cursor: grabbing; }
.view .poster, .view .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.view .still { background: #000; z-index: 2; }
.view .poster { padding: 6%; opacity: 0; pointer-events: none; transition: opacity .4s; }
.view.fallback .poster { opacity: 1; }
.view.loading::after { content: "Loading the shape…"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 13px; color: var(--muted); opacity: 0; animation: late .2s .5s forwards; pointer-events: none; }
@keyframes late { to { opacity: 1; } }
.view-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); pointer-events: none; z-index: 3; }
.view-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; font-size: 14px; color: var(--muted); pointer-events: none; z-index: 3; }
.tip { position: absolute; z-index: 4; pointer-events: none; padding: 4px 9px; border-radius: 5px; background: rgba(27, 29, 38, .92); color: #fff; font: 500 12px var(--mono); white-space: nowrap; transform: translate(14px, 12px); }
.view .inset { position: absolute; right: 10px; top: 10px; width: 21%; aspect-ratio: 1; border-radius: var(--r-s); background: #000; object-fit: contain; z-index: 3; pointer-events: none; box-shadow: 0 0 0 1px var(--rule); }
.v-code { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--night-1); position: relative; }
.v-code .code { position: absolute; inset: 41px 0 0 0; }
.code-h { flex: none; height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--night-rule); font-size: 12.5px; color: var(--on-night-2); }
.code-h .ctl { height: 26px; font-size: 12px; }
.chg-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--on-night-muted); }
.chg-key i { width: 12px; height: 12px; background: rgba(224, 40, 46, .3); border-left: 3px solid #FF5A5F; }

/* edit */
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.legend button { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 8px; border: 1px solid var(--rule); border-radius: 99px; background: var(--surface); font-size: 12.5px; cursor: pointer; }
.legend button:hover { border-color: var(--ink); }
.legend i { width: 11px; height: 11px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.legend small { color: var(--muted); font: 11.5px var(--mono); }
.knobs { display: grid; gap: 14px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.knob { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 16px; align-items: center; }
.knob label { font: 500 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knob output { color: var(--edit); font-weight: 700; }
.knob output.same { color: var(--accent-ink); }
.knob input[type=range] { width: 100%; margin: 0; accent-color: var(--accent); height: 22px; }
.knob .ticks { grid-column: 2; display: flex; justify-content: space-between; font: 10.5px var(--mono); color: var(--muted); padding-inline: 2px; }
.knob .ticks .o { color: var(--ink); font-weight: 700; }
.ops { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--rule-soft); font-size: 13px; }
.ops > b { font-weight: 600; margin-right: 4px; }
.ops .ctl[aria-pressed="true"] { background: var(--edit); border-color: var(--edit); color: #fff; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.steps > b { font-weight: 600; margin-right: 6px; }
.steps .ctl { font-family: var(--mono); font-size: 12px; }
.viewer-edit .view-light { aspect-ratio: 5 / 4; }

/* compare */
.board { display: grid; gap: 10px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.board-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px; align-items: center; }
.board-row > span { font-size: 12.5px; color: var(--muted); line-height: 1.25; }
.board-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--rule); border-radius: 99px; background: var(--bg); font-size: 13px; font-weight: 500; cursor: pointer; }
.pick::before { content: ""; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--rule); background: var(--surface); }
.pick:hover { border-color: var(--ink-2); }
.pick[aria-checked="true"] { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.pick[aria-checked="true"]::before { box-shadow: inset 0 0 0 3.5px var(--ink); }
.pick b { font: 500 11.5px var(--mono); }
.pick .ok, .verdict .ok { color: var(--ok); } .pick .bad, .verdict .bad { color: var(--bad); }
.viewer-cmp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.view-split { aspect-ratio: 2 / 1.02; }
.view-split::after { content: ""; position: absolute; left: 50%; top: 12%; bottom: 12%; width: 1px; background: var(--rule); pointer-events: none; }
.split-l, .split-r { position: absolute; top: 10px; z-index: 3; pointer-events: none; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); }
.split-l { left: 10px; } .split-r { left: calc(50% + 10px); box-shadow: 0 0 0 1px var(--ink); }
.verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding: 14px 18px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); font-size: 14px; }
.verdict b { font: 700 22px var(--display); font-stretch: 112%; letter-spacing: -.02em; }
.verdict span { color: var(--muted); font-size: 13px; }
.renders { display: flex; gap: 8px; margin-left: auto; }
.renders img { width: 72px; height: 72px; border-radius: var(--r-s); background: var(--bg); }

/* ───────────── benchmark ───────────── */
.chartgrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; }
.chart { margin: 0; padding: 22px 24px 20px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); min-width: 0; }
.chart-wide { grid-column: 1 / -1; }
.chart-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-h > div { min-width: 0; }
.chart-h h3 { font-size: 18px; }
.chart-h p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.chart-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; max-width: 100%; }
.chart figcaption { margin-top: 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 100ch; }
.chart-b { position: relative; min-width: 0; }
.chart-b .fig { width: 100%; height: auto; }
.ctip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; max-width: 260px; padding: 9px 11px; border-radius: 7px; background: rgba(27, 29, 38, .96); color: #fff; font-size: 12.5px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.ctip b { display: block; font: 700 16px var(--text); letter-spacing: -.01em; }
.ctip span { color: #B9BDCB; }
.bars { display: grid; row-gap: 3px; }
.bgroup { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 0 6px; }
.bgroup:first-child { padding-top: 2px; }
.bar { display: grid; grid-template-columns: 178px minmax(0, 1fr) 48px; column-gap: 12px; align-items: center; min-height: 24px; font-size: 13.5px; border-radius: 4px; }
.bar:hover, .bar:focus-visible { background: var(--bg); }
.bar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bar .nm small { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.bar .tr { position: relative; height: 12px; }
.bar .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: #A9ADB8; min-width: 2px; transition: width .35s cubic-bezier(.2, .7, .2, 1); }
.bar .v { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-2); }
.bar.ours .nm { color: var(--ink); font-weight: 650; } .bar.ours .tr i { background: var(--accent); } .bar.ours .v { color: var(--ink); font-weight: 700; }
.bar.unranked .tr i { background: repeating-linear-gradient(135deg, #C9CCD4 0 4px, #E3E4E9 4px 7px); }
.bar.unranked .nm, .bar.unranked .v { color: var(--muted); }
.axis { display: grid; grid-template-columns: 178px minmax(0, 1fr) 48px; column-gap: 12px; margin-top: 6px; }
.axis div { grid-column: 2; display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--muted); border-top: 1px solid var(--rule); padding-top: 5px; }
.ext { margin-bottom: 14px; } .ext:last-child { margin-bottom: 0; }
.ext .bgroup { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; text-transform: none; letter-spacing: 0; font: 400 12.5px/1.3 var(--text); padding-top: 4px; }
.ext .bgroup b { font: 650 14.5px var(--text); color: var(--ink); }
.ext .bgroup span { margin-left: auto; font: 11.5px var(--mono); }
.ext .bar { grid-template-columns: 190px minmax(0, 1fr) 46px; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t th, table.t td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--rule-soft); }
table.t th:first-child, table.t td:first-child, table.t th:nth-child(2), table.t td:nth-child(2) { text-align: left; }
table.t thead th { font-weight: 600; color: var(--muted); font-size: 12px; border-bottom-color: var(--rule); }
table.t tr.g td { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 14px; text-align: left; border-bottom-color: var(--rule); }
table.t tr.ours td { font-weight: 700; background: var(--accent-soft); }
table.t tr.unranked td { color: var(--muted); }
table.t td.best { font-weight: 700; color: var(--ink); }

/* ───────────── GeoFunc ───────────── */
.gf { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: start; }
.gf-props { display: grid; gap: 22px; }
.prop h3 { margin-bottom: 5px; }
.prop p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.vocab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fam { padding: 12px 14px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); min-width: 0; }
.fam h4 { margin: 0 0 8px; font: 620 13.5px/1.2 var(--text); display: flex; justify-content: space-between; gap: 8px; }
.fam h4 span { font: 500 11.5px var(--mono); color: var(--muted); }
.fam h4 code { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-right: auto; margin-left: 6px; }
.fam-sel { background: none; border-style: dashed; }
.glyphs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0 -4px 8px; }
.glyphs figure { min-width: 0; text-align: center; }
.glyphs img { width: 100%; max-width: 68px; margin-inline: auto; aspect-ratio: 1; object-fit: contain; }
.glyphs figcaption { font: 500 11.5px var(--mono); color: var(--ink-2); }
.words { display: flex; flex-wrap: wrap; gap: 3px 9px; font: 11.5px/1.5 var(--mono); color: var(--muted); }

/* ───────────── cite ───────────── */
.cite { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(48px, 6vw, 72px); }   /* minmax: the BibTeX scrolls, the page does not */
.bib { margin-top: 20px; max-width: 880px; border-radius: var(--r); overflow: hidden; background: var(--night-1); }
.bib .code { padding: 14px 18px 16px; font-size: 12.5px; white-space: pre; overflow-x: auto; }
.ack { margin-top: 14px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); max-width: 70ch; }
.footer { border-top: 1px solid var(--rule); }
.footer-in { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--muted); }
.footer-in b { font-weight: 700; color: var(--geo); }
.footer-in span:first-child { color: var(--ink); font-weight: 600; }
.footer-in a { margin-left: auto; color: var(--ink-2); }
.noscript { margin: 0; padding: 12px 20px; background: #FBE7E8; color: var(--ink); font-size: 14px; text-align: center; }

/* ───────────── responsive ───────────── */
@media (max-width: 1080px) {
  .live { grid-template-columns: 168px 118px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 400px auto; --ay: 111px; }
  .m-body { padding: 12px 8px; } .m-chip { width: 44px; height: 44px; border-radius: 12px; } .m-chip svg { width: 26px; height: 26px; } .m-name { font-size: 12.5px; } .m-spec { font-size: 11px; } .m-out { padding-inline: 8px; } .m-tok b { font-size: 19px; }
  .claims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .claim:nth-child(3) { padding-left: 0; border-left: 0; }
  .claim:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 18px; }
  .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .gf { grid-template-columns: minmax(0, 1fr); }
  .gf-props { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { height: auto; padding: 92px 0 0; perspective: none; }
  .hero-media { width: 124vw; max-width: none; margin: 10px 0 -4%; transform: none; }
  .hero-veil { background: linear-gradient(0deg, var(--bg) 0%, var(--bg-0) 12%); }
  .authors { font-size: 16px; gap: 3px 14px; }
  .orgs { gap: 12px 26px; --k: .85; }
  .hero-grid { display: none; }
  .live { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .p-in { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .p-in .pane-h { width: 100%; }
  .in-img { width: 96px; margin: 10px; flex: none; }
  .in-facts { flex: 1; margin: 10px 12px 10px 4px; }
  .p-in, .p-model, .p-code, .p-3d, .live-bar { grid-column: auto; grid-row: auto; }
  .flow { display: none; }
  .p-model { order: 2; flex-direction: row; align-items: stretch; }
  .p-model .pane-h { border-bottom: 0; border-right: 1px solid rgba(85, 96, 214, .16); }
  .m-body { padding: 10px 12px; gap: 2px; text-align: left; }
  .m-chip { display: none; }
  .m-out { display: flex; flex-direction: column; justify-content: center; min-width: 104px; padding: 10px 12px; border-top: 0; border-left: 1px solid rgba(85, 96, 214, .16); }
  .m-tok { margin-top: 3px; } .m-tok b { font-size: 18px; }
  .p-code { order: 3; } .p-3d { order: 4; } .live-bar { order: 5; }
  .p-3d .view-light { aspect-ratio: 4 / 3; flex: none; }
  .live .code { flex: none; height: 250px; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .viewer, .viewer-cmp, .chartgrid, .abstract { grid-template-columns: minmax(0, 1fr); }
  .v-code { height: 62vh; max-height: 520px; }
  .board-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .vocab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knob { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } .knob .ticks { grid-column: 1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-t { display: none; }
  .nav-in { gap: 12px; }
  .claims, .gf-props, .vocab { grid-template-columns: minmax(0, 1fr); }
  .claim, .claim + .claim { padding: 18px 0 2px; border-left: 0; border-top: 1px solid var(--rule); margin-top: 14px; }
  .claim:first-child { border-top: 0; margin-top: 0; }
  .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .strip .thumb .tx { display: none; }
  .strip-c .thumb { flex-direction: column; align-items: stretch; } .strip-c .thumb .im { width: auto; }
  .bar, .axis, .ext .bar { grid-template-columns: 124px minmax(0, 1fr) 42px; column-gap: 8px; font-size: 12.5px; }
  .bar .nm small { display: none; }
  .chart { padding: 16px 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; } .chip { flex: none; }
  .seg button { padding: 0 9px; }
  .live-bar { flex-wrap: wrap; }
  .renders { margin-left: 0; }
  .orgs { gap: 14px 22px; --k: .8; }
  .actions { gap: 8px; }
  .reel { gap: 11px; padding: 5px 18px 5px 5px; border-radius: 15px; } .reel-thumb { width: 64px; height: 36px; border-radius: 10px; }
  .reel-play { width: 22px; height: 22px; } .reel-t b { font-size: 14px; }
  .theater { padding: 52px 0 58px; } .theater-frame { width: calc(100vw - 24px); } .tf-btns { top: -44px; }
  .actions .btn { height: 40px; padding: 0 14px 0 12px; font-size: 14px; gap: 7px; }
  .actions .btn svg { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
@media print { .nav, .live-bar, .ctl, .hero-grid { display: none; } .hero { height: auto; } }
