/* v2 layer: display type, the hero, the pinned number, dark "theater" sections, info popovers, the bench marquee, the
   Task 3 strip, stacked limits, the intro. Motion grammar everywhere: things glide to a yellow wall and stop on it
   (ease-out, no overshoot); a short squash on contact. Every animated element's resting state is its CSS state, so
   reduced motion, no JS and print show the finished page. */
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("../assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { --display: "Archivo", "Inter", system-ui, sans-serif; --wd: 100%; }
h1, h2, .display { font-family: var(--display); }
h2 { font-size: clamp(30px, 4.4vw, 64px); font-weight: 760; font-stretch: var(--wd); letter-spacing: -.03em; line-height: 1; max-width: 22ch; }
h3 { font-family: var(--display); font-weight: 650; letter-spacing: -.01em; }
.lede { font-size: clamp(17px, 1.5vw, 21px); max-width: 52ch; margin-top: 20px; }
.note { font-size: 13px; }

/* ---------- section heads: chapter number, the wall, the headline that stops on it ---------- */
.head { margin-bottom: clamp(26px, 3.6vw, 44px); }
.head .eyebrow { font: 700 clamp(14px, 1.25vw, 17px) var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); gap: 12px; }
.head .eyebrow .chap { color: #241c00; background: var(--wall); font: 700 clamp(14px, 1.2vw, 16px) var(--mono); letter-spacing: 0; padding: 4px 10px; border-radius: 8px; }
.head h2 { position: relative; padding-left: .3em; }
.head h2::before { content: ""; position: absolute; left: 0; top: .1em; bottom: .06em; width: .075em; border-radius: .03em; background: var(--wall); transform-origin: 50% 100%; transform: scaleY(var(--bar, 1)); }
.head h2 .w { display: inline-block; will-change: transform; }

/* ---------- header ---------- */
.header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .35s var(--ease), border-color .35s var(--ease), color .35s; }
.header.scrolled { background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.header.on-dark { background: rgba(11, 12, 15, .72); color: #f4f5f7; border-bottom-color: rgba(255, 255, 255, .06); }
.header.on-dark .nav a { color: #9aa1af; } .header.on-dark .nav a.active, .header.on-dark .nav a:hover { color: #fff; }
.header.on-dark .lowdata, .header.on-dark .mnav summary { color: #c4c9d3; }
.header.on-dark .brand-mark circle { fill: #0b0c0f; stroke: #f4f5f7; } .header.on-dark .brand-mark path { fill: #f4f5f7; }
.header.on-dark .rail .track { background: linear-gradient(90deg, #f4f5f7 var(--p, 0%), transparent var(--p, 0%)); }
.nav { position: relative; }
.nav ol { background: transparent; padding: 0; gap: 0; }
.nav a { position: relative; padding: 8px 11px; font-size: 13px; color: var(--ink-3); border-radius: 0; }
.nav a i, .mnav a i { font: normal 500 10px var(--mono); color: var(--ink-4); margin-right: 5px; vertical-align: 1px; }
.nav a.active { background: transparent; box-shadow: none; color: var(--ink); }
.nav-ind { position: absolute; bottom: 2px; left: 0; height: 2px; width: 0; border-radius: 2px; background: var(--wall); transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s; opacity: 0; pointer-events: none; }
.nav-ind.on { opacity: 1; }

/* ---------- hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(26px, 4.4vw, 64px)); }
.hero .wrap.hero-wrap { max-width: 1440px; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 2.4vw, 30px); }
.title, .hero .title { font-size: clamp(40px, 9.4vw, 168px); line-height: .88; letter-spacing: -.045em; font-weight: 800; font-stretch: 104%; max-width: none; margin: 0; }
.title .t1, .title .t2 { display: block; }
.title .t2 { color: var(--ink); }
.title .np { padding-right: .2em; }
.title .np::after { width: .06em; right: .06em; top: .1em; bottom: .02em; }
.title .ch { display: inline-block; will-change: transform; }
.hero-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.tagline { margin: 0; font-family: var(--display); font-size: clamp(20px, 2.1vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.tagline span:last-child { color: var(--ink-3); }
.hero .authors { margin: 0; font-size: 15px; color: var(--ink-3); }
.hero .authors [data-cfg=authors] { display: block; color: var(--ink); font-weight: 600; }
.hero .authors .nm { white-space: nowrap; }
.hero .authors .affil { display: block; margin-top: 2px; }
.hero .authors .corr { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: var(--ink-3); }
.hero .authors .corr svg { width: 15px; height: 15px; }
.hero .authors .corr:hover { color: var(--ink); }
.hero .links { margin: 0; }
.h-media { margin: clamp(24px, 3.6vw, 48px) auto 0; max-width: 1280px; }
.stage { border-radius: clamp(18px, 2.2vw, 30px); box-shadow: 0 2px 4px rgba(17, 19, 24, .05), 0 30px 80px -20px rgba(17, 19, 24, .35); will-change: transform; }
.stage::after { /* a film grain over the upscaled 832 px clips: hides nothing, softens the scaling */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage .tag { top: 16px; font-size: 13px; } .stage .tag.l { left: 16px; } .stage .tag.r { right: 16px; }
.stage .handle::before { width: 6px; margin-left: -3px; box-shadow: 0 0 0 1px rgba(0,0,0,.18), 0 0 22px rgba(242, 194, 0, .55); }
.stage .handle span { width: 46px; height: 46px; }
.stage-controls { justify-content: flex-start; }
.stage-controls .cap { font-size: 13px; color: var(--ink-3); margin-left: auto; }
.cursor-tag { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; padding: 6px 11px; border-radius: 999px; background: var(--wall); color: #2a2100;
  font: 600 12px var(--mono); white-space: nowrap; opacity: 0; transform: translate(-50%, -150%) scale(.8); transition: opacity .2s, transform .25s var(--ease); }
.cursor-tag.on { opacity: 1; transform: translate(-50%, -150%) scale(1); }
@media (max-width: 760px) { .stage-controls .cap { margin-left: 0; width: 100%; order: 9; } }

/* ---------- the pinned number ---------- */
.statement { padding-top: clamp(56px, 8vw, 120px); }
.st-pin { position: relative; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); }
.st-num { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px clamp(24px, 4vw, 64px); }
.st-num .big { font-family: var(--display); font-size: clamp(64px, 12.5vw, 224px); font-weight: 800; font-stretch: 96%; letter-spacing: -.055em; line-height: .84;
  display: flex; align-items: center; gap: .1em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-num .big .from { color: var(--raw); } .st-num .big .to { color: var(--ours); }
.st-num .big .arrow { display: block; width: .06em; height: .78em; border-radius: .02em; background: var(--wall); flex: none; box-shadow: 0 0 0 0 rgba(242, 194, 0, .5); }
.st-num .big .arrow.hit { animation: contact2 .6s var(--ease); }
@keyframes contact2 { 0% { box-shadow: 0 0 0 0 rgba(242, 194, 0, .55); } 40% { box-shadow: 0 0 0 14px rgba(242, 194, 0, .2); } 100% { box-shadow: 0 0 0 26px rgba(242, 194, 0, 0); } }
.st-num .lab { margin: 0 0 .4em; flex: 1 1 280px; max-width: 34ch; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.4; color: var(--ink-2); }
.st-num .lab .la { color: var(--ink); font-weight: 600; }
.st-bars .bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 18px); height: clamp(170px, 19vw, 300px); align-items: end; margin: 0; padding-bottom: 28px; position: relative; }
.st-bars .b { position: relative; height: 100%; }
.st-bars .b i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 3px 3px; transform: none; transition: none; }
.st-bars .b i.r { background: transparent; border: 2px dashed rgba(211, 58, 44, .55); border-bottom: 0; opacity: 1; width: auto; }
.st-bars .b i.o { background: var(--ours); width: auto; }
.st-bars .b em { position: absolute; bottom: -24px; left: -6px; right: -6px; text-align: center; font: 500 11px var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bars .b .v { position: absolute; left: 50%; transform: translate(-50%, -6px); font: 600 12px var(--mono); white-space: nowrap; pointer-events: none; }
.st-bars .b .v.vr { color: var(--raw); } .st-bars .b .v.vo { color: var(--ours); }
.st-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: clamp(28px, 3.4vw, 52px); border-top: 1px solid var(--line); }
.mini { padding: 22px 22px 6px 0; display: grid; gap: 6px; align-content: start; position: relative; }
.mini + .mini { padding-left: 22px; border-left: 1px solid var(--line); }
.mini b { font-family: var(--display); font-size: clamp(38px, 4.6vw, 68px); font-weight: 780; letter-spacing: -.04em; line-height: 1; }
.mini span { font-size: 14.5px; color: var(--ink-2); max-width: 26ch; }
.mini .infobox { position: absolute; top: 22px; right: 0; }
@media (max-width: 900px) { .st-grid { grid-template-columns: 1fr; } .st-minis { grid-template-columns: 1fr; } .mini + .mini { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

/* abstract */
.abstract-wrap { padding-top: clamp(40px, 5vw, 72px); }
.abstract { background: transparent; border: 1px solid var(--line); }
.abstract .eyebrow { font: 500 12.5px var(--mono); text-transform: none; letter-spacing: .04em; }

/* ---------- info popovers: the provenance lines, one click away ---------- */
.infobox { position: relative; display: inline-flex; vertical-align: middle; margin-left: 2px; }
.info { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3);
  font: italic 700 12.5px/1 Georgia, "Times New Roman", serif; cursor: pointer; display: inline-grid; place-items: center; flex: none; transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease); }
.info:hover { color: var(--ink); border-color: var(--ink-3); }
.info[aria-expanded="true"] { background: var(--wall); border-color: var(--wall); color: #2a2100; }
.info-pop { position: fixed; z-index: 90; left: 0; top: 0; width: min(380px, calc(100vw - 24px)); padding: 13px 15px; border-radius: 14px; background: #111318; color: #e3e6ec;
  font: 400 13.5px/1.55 Inter, system-ui, sans-serif; font-style: normal; letter-spacing: 0; text-transform: none; text-align: left; box-shadow: 0 18px 50px rgba(0, 0, 0, .28); border: 1px solid rgba(255,255,255,.08);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .25s var(--ease), visibility 0s .25s; pointer-events: none; }
.info-pop b { color: #fff; }
.info-pop.on { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .25s var(--ease); pointer-events: auto; }
html:not(.js) .infobox .info-pop { position: static; opacity: 1; visibility: visible; transform: none; display: block; margin-top: 6px; pointer-events: auto; }
html:not(.js) .info { display: none; }

/* ---------- theater sections: white like the rest of the page (user 11-22); the dark look stays available as .theater.dark ---------- */
.theater.dark { --bg: #0b0c0f; --ink: #f4f5f7; --ink-2: #c4c9d3; --ink-3: #8f97a6; --ink-4: #5d6473; --panel: #14171c; --panel-2: #1b1f26; --line: #242931; --line-2: #353b46; --surface: #1c2028;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 44px rgba(0, 0, 0, .5);
  color: var(--ink); margin-top: clamp(72px, 10vw, 140px); padding-top: clamp(72px, 9vw, 128px); padding-bottom: clamp(72px, 9vw, 128px); }
.theater { position: relative; isolation: isolate; }
.theater.dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); border-radius: var(--tr, 0px); transform: scaleX(var(--ts, 1)); will-change: transform; }
.theater.dark + section { padding-top: clamp(72px, 9vw, 128px); }
.theater.dark .seg { background: var(--panel-2); }
.theater.dark .seg.dark button[aria-pressed="true"] { background: var(--wall); color: #241c00; }
.theater.dark .seg button[aria-pressed="true"] { box-shadow: none; }
.theater.dark .iconbtn, .theater.dark .btn { color: var(--ink); }
.theater.dark .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: var(--ink-2); }
.theater.dark .chip.viol { color: #ff8f80; background: rgba(211, 58, 44, .18); border-color: rgba(211, 58, 44, .4); }
.theater.dark .chip.back { color: #ffb45e; background: rgba(224, 138, 30, .16); border-color: rgba(224, 138, 30, .38); }
.theater.dark .chip.ok { color: #63d69a; background: rgba(30, 158, 90, .18); border-color: rgba(30, 158, 90, .4); }
.theater.dark .chip.slide { color: #7ce3ab; background: rgba(30, 158, 90, .26); border-color: rgba(30, 158, 90, .5); }
.theater.dark .tile .chip { background: rgba(10, 11, 14, .82); }
.theater.dark .legend i.gt { background: rgba(255, 255, 255, .35); }
.theater .casebtn[aria-pressed="true"] { border-color: var(--wall); box-shadow: 0 0 0 1px var(--wall); }
.theater .tile.hl { box-shadow: 0 0 0 2px var(--wall); }
.theater .head h2 { max-width: 22ch; }
.theater.dark .player { background: var(--panel-2); }
.theater .scrub input[type=range], .theater .scrubwrap input { accent-color: var(--wall); }
.theater.dark .pg .hint { background: rgba(255, 255, 255, .9); color: #454b58; }
.theater.dark .pg .hint kbd { background: #fff; color: #111318; border-color: #d4d9e3; box-shadow: 0 1.5px 0 #d4d9e3; }

/* problem */
.seg.big button { padding: 9px 18px; font-size: 14.5px; font-weight: 600; }
.prob-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
.sweep-host { position: relative; }
.sweep { position: absolute; top: -8px; bottom: -8px; left: 0; width: 6px; margin-left: -3px; border-radius: 3px; z-index: 6; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(180deg, var(--wall) 0 12px, #d9ad00 12px 16px); box-shadow: 0 0 30px 6px rgba(242, 194, 0, .45); }
.prob-side { display: grid; gap: 10px; align-content: start; }
#prob-top { aspect-ratio: 4 / 3; }
.theater.dark .topview { border-color: var(--line); }
.map3d { position: absolute; inset: 0; background: #fafbfc; cursor: grab; touch-action: pan-y; }
.map3d:active { cursor: grabbing; }
.map3d canvas { width: 100%; height: 100%; display: block; }
.view-tag { position: absolute; right: 10px; bottom: 10px; z-index: 2; font: 500 11px var(--mono); color: #4a4f5c; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px #e3e7ee; padding: 4px 8px; border-radius: 999px; pointer-events: none; }
.prob-side .legend { align-items: center; }

/* playground */
.play-wrap { margin-top: clamp(56px, 8vw, 104px); grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: clamp(18px, 3vw, 40px); align-items: center; }
.pg-tag { position: absolute; right: 12px; top: 12px; font: 500 11px var(--mono); color: #6a7180; background: rgba(255, 255, 255, .88); padding: 4px 9px; border-radius: 999px; pointer-events: none; }
.pg-side h3 { font-size: clamp(26px, 3vw, 40px); font-weight: 760; letter-spacing: -.03em; line-height: 1.02; margin-top: 14px; }
.pg-side .eyebrow { font: 700 clamp(14px, 1.25vw, 17px) var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); gap: 12px; }
.pg-side .eyebrow .chap { color: #241c00; background: var(--wall); font: 700 clamp(14px, 1.2vw, 16px) var(--mono); letter-spacing: 0; padding: 4px 10px; border-radius: 8px; }
.pg-legend { font-size: 15.5px; color: var(--ink-2); margin: 14px 0 0; }
.pg-legend .ghost { color: #d33a2c; font-weight: 600; } .theater.dark .pg-legend .ghost { color: #ff8f80; } .pg-legend .inkcam { color: var(--ink); font-weight: 600; }
.pg-side .eq { margin-top: 16px; background: var(--panel); padding: 12px 16px; }
.pg-side .eq .m { margin: 0; }
.pg-side .note { margin: 12px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theater.dark .pad button { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: 0 2px 0 var(--line-2); }
.theater.dark .pad button:active, .theater.dark .pad button.on { background: var(--wall); color: #241c00; border-color: var(--wall); }

/* ---------- insight ---------- */
.findings { margin-top: clamp(28px, 4vw, 52px); gap: clamp(16px, 3vw, 40px); }
.finding { border-top: 2px solid var(--ink); padding-top: 18px; position: relative; }
.finding::before { content: ""; position: absolute; left: 0; top: -2px; width: 34px; height: 2px; background: var(--wall); }
.finding .k { font-family: var(--display); font-size: clamp(26px, 2.8vw, 40px); font-weight: 760; letter-spacing: -.03em; line-height: 1.02; }
.finding p { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); max-width: 32ch; }

/* ---------- method ---------- */
.steps .step { padding: 12px 16px; }
.steps .step h3 { font-size: 18px; }
.steps .step p { font-size: 14px; }
.steps .step.on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--wall); }
.mode-card { margin-top: 28px; }
#costs { position: relative; } #costs > .infobox { position: absolute; top: 18px; right: 18px; }
details.math { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
details.math summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-family: var(--display); font-weight: 650; font-size: 18px; }
details.math summary::-webkit-details-marker { display: none; }
details.math .more-txt { font: 500 13px Inter, sans-serif; color: var(--ink-2); padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); }
details.math[open] .more-txt { visibility: hidden; }
details.math .eqs { margin-top: 14px; }

/* ---------- bench: marquee, tasks ---------- */
#bench { padding-top: clamp(56px, 7vw, 100px); }
.marquee { overflow: hidden; display: grid; gap: 10px; margin: 0 0 clamp(36px, 5vw, 64px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq-row { display: flex; gap: 10px; width: max-content; will-change: transform; }
.mq-row button { flex: none; padding: 0; border: 0; background: var(--panel); border-radius: 12px; overflow: hidden; cursor: pointer; width: clamp(128px, 12vw, 188px); aspect-ratio: 16 / 9; position: relative; }
.mq-row img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; }
.mq-row button:hover img { transform: scale(1.06); }
.mq-row button::after { content: attr(data-name); position: absolute; left: 6px; bottom: 6px; right: 6px; font: 600 11px Inter, sans-serif; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.7); opacity: 0; transition: opacity .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.mq-row button:hover::after { opacity: 1; }
.tasks { gap: 14px; perspective: 900px; }
.task { background: var(--panel); border: 1px solid var(--line); transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .4s; will-change: transform; padding: 22px 22px 20px; }
.task h3 { font-size: clamp(30px, 3.2vw, 46px); font-weight: 780; letter-spacing: -.035em; margin-top: 14px; }
.task p { font-size: 15px; }
.task::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 194, 0, .16), transparent 45%); }
.task:hover::after { opacity: 1; }
.stats .stat.wide .l { font-size: 12.5px; }
.more { align-items: center; gap: 10px; }

/* ---------- results ---------- */
#results .card .note { font-size: 13.5px; }

/* ---------- Task 3: a horizontal strip ---------- */
.t3-viewport { position: relative; }
.t3grid { gap: 14px; }
.t3 { background: var(--surface); }
@media (min-width: 961px) {
  .t3-viewport { overflow: hidden; }
  .t3grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none;
    grid-auto-columns: clamp(380px, calc((100svh - 540px) * 1.78), 620px); width: max-content; padding: 0 max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); will-change: transform; }
}
@media (max-width: 960px) {
  .t3-viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .t3-viewport::-webkit-scrollbar { display: none; }
  .t3grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(86vw, 520px); width: max-content; padding: 0 var(--gutter); }
  .t3 { scroll-snap-align: center; }
}
.t3-pick { margin-left: 4px; }

/* ---------- limits: cards that stack as you scroll ---------- */
.limits { display: block; }
.limit { position: sticky; top: calc(var(--header-h) + 18px + var(--i, 0) * 14px); margin: 0 0 22px; min-height: min(400px, 66svh);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(16px, 3vw, 40px); align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: clamp(18px, 3vw, 38px); box-shadow: 0 -12px 34px -12px rgba(17, 19, 24, .14); transform-origin: 50% 0; }
.limit .txt { display: grid; gap: 12px; align-content: center; }
.limit .num { font-family: var(--display); font-size: clamp(14px, 1.1vw, 15px); font: 500 12px var(--mono); color: var(--ink-3); }
.limit h3 { font-size: clamp(24px, 2.8vw, 40px); font-weight: 760; letter-spacing: -.03em; line-height: 1.04; }
.limit p { font-size: 15.5px; color: var(--ink-2); max-width: 46ch; }
.limit .side { display: grid; gap: 10px; }
.limit .big { font-family: var(--display); font-size: clamp(56px, 8vw, 128px); font-weight: 800; letter-spacing: -.05em; line-height: .9; color: var(--ink); }
.limit .big small { display: block; font: 500 13px var(--mono); letter-spacing: 0; color: var(--ink-3); margin-top: 10px; }
.limit .duo { gap: 10px; }
@media (max-width: 860px) { .limit { grid-template-columns: 1fr; position: relative; top: auto; min-height: 0; } }

/* ---------- footer ---------- */
footer { border-top: 0; padding-top: clamp(64px, 9vw, 140px); }
.foot-big { position: relative; display: grid; font-family: var(--display); font-size: clamp(34px, 7.2vw, 124px); font-weight: 800; letter-spacing: -.05em; line-height: .88; color: var(--ink); padding-right: .25em; }
.foot-big::after { content: ""; position: absolute; right: 0; top: .04em; bottom: .02em; width: .07em; border-radius: .03em; background: var(--wall); }
.foot-big span { display: block; justify-self: end; text-align: right; }
@media (min-width: 700px) { .foot-big span { white-space: nowrap; } }
.foot-big .fb2 { color: var(--ink-4); }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 6vw, 80px); padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- intro: the mark assembles, then flies into the header ---------- */
.intro { display: none; }
.intro-on .intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #fff; animation: introSafety .01s 3s forwards; }
@keyframes introSafety { to { visibility: hidden; opacity: 0; } }
.intro-mark { width: 156px; height: 156px; overflow: visible; }
.intro-word { position: absolute; left: 0; right: 0; bottom: 14vh; text-align: center; font: 500 13px var(--mono); color: var(--ink-3); letter-spacing: .2em; text-transform: uppercase; }
.intro-on .brand-mark { opacity: 0; }

/* print and no-JS: everything at rest */
@media print { .intro, .marquee, .cursor-tag, .sweep { display: none !important; } .info-pop { position: static !important; opacity: 1 !important; visibility: visible !important; display: block; } .theater::before { transform: none; border-radius: 0; } }

/* the hero waits for its entrance (motion.js adds .hero-go); a page whose scripts fail shows it after 2.5 s anyway */
.js:not(.hero-go) .hero-top, .js:not(.hero-go) .h-media { opacity: 0; animation: heroSafety .01s 2.5s forwards; }
@keyframes heroSafety { to { opacity: 1; } }
.js .title:not(.go) .np::after { animation: none; transform: scaleY(0); }
.title.go .np::after { animation: rise .7s .25s var(--ease) forwards; }

/* phones and tablets: the v2 two-column blocks fold to one column */
@media (max-width: 960px) {
  .prob-split, .play-wrap { grid-template-columns: minmax(0, 1fr); }
  .play-wrap { align-items: start; }
}
.header.on-dark .mnav summary { background: rgba(255, 255, 255, .1); color: #e4e7ee; }
.header.on-dark .lowdata input { background: #3a404b; }

/* Task 3 is pinned on wide screens: a one-line heading leaves the strip more height */
@media (min-width: 961px) { #open .head h2 { max-width: none; } #open .head { margin-bottom: 20px; } #open .head .lede { margin-top: 12px; } }

/* ---------- promotional video slot (filled from config.js `video`) ---------- */
.promo-wrap { padding-top: clamp(32px, 4vw, 56px); }
.promo { position: relative; aspect-ratio: 16 / 9; max-width: 1280px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #f4f6f9; border: 1px solid var(--line); }
.promo video, .promo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.promo-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--ink-3); }
.promo-play { width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 6px 24px rgba(20, 30, 50, .12); position: relative; margin-bottom: 8px; }
.promo-play::after { content: ""; position: absolute; left: 26px; top: 21px; border-left: 17px solid var(--ink-3); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.promo-t { font: 700 20px var(--display); color: var(--ink-2); letter-spacing: -.01em; }
.promo-s { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
@media print { .promo-wrap { display: none; } }

/* the slogan's "NoPe": the page's yellow under it, like the wall it stops at */
.tagline .nope { font-weight: 800; color: var(--ink); background: linear-gradient(transparent 64%, var(--wall) 64%, var(--wall) 90%, transparent 90%); padding: 0 .06em; }

/* NoPeBench's three tasks: the tag is the first thing read on each card */
.tasks .task .tag { display: inline-block; font: 700 15px var(--mono); letter-spacing: .02em; padding: 6px 12px; border-radius: 9px; background: var(--wall); color: #241c00; border: 0; }

/* ---------- one screen at a time (user 11-22): tighter section rhythm and compact heads, so a section's head and its main
   block fit in one desktop screen (1440 x 900 and 1280 x 800, minus the 64 px header) ---------- */
@media (min-width: 961px) {
  section { padding-top: clamp(48px, 7vh, 88px); }
  .theater.dark { margin-top: clamp(48px, 7vh, 88px); padding-top: clamp(48px, 7vh, 88px); padding-bottom: clamp(48px, 7vh, 88px); }
  .head { margin-bottom: clamp(18px, 2.6vh, 28px); gap: 2px; }
  .head .eyebrow { margin-bottom: 6px; }
  h2 { font-size: clamp(30px, 3.3vw, 52px); max-width: none; }
  .theater .head h2 { max-width: none; }
  .lede { font-size: clamp(16px, 1.25vw, 19px); max-width: 78ch; margin-top: 10px; }
  .title, .hero .title { font-size: clamp(40px, 7.2vw, 124px); }
  .h-media { max-width: min(1280px, calc((100svh - 380px) * 16 / 9)); margin-top: clamp(18px, 2.6vh, 32px); }
}

/* ---------- one screen per block, desktop (user 11-22) ---------- */
@media (min-width: 961px) {
  /* the hero: title, tagline, links and the comparison all in the first screen */
  .hero { padding-top: calc(var(--header-h) + clamp(16px, 3vh, 40px)); }
  .title, .hero .title { font-size: min(7.2vw, 12vh, 124px); }
  .h-media { max-width: min(1280px, calc((100svh - 470px) * 16 / 9)); }
  /* problem: the six-model grid scales with the screen height; the playground is its own screen */
  .play-wrap { margin-top: clamp(88px, 14vh, 150px); }
  /* insight */
  .findings { margin-top: clamp(14px, 2.2vh, 24px); }
  .finding { padding-top: 12px; }
  .finding .k { font-size: clamp(20px, 1.8vw, 28px); }
  .finding p { margin-top: 6px; font-size: 14.5px; }
  /* results: the chart scales with the screen height; Task 1 and open paths are the next screen */
  .chartbox svg.chart { display: block; max-width: min(100%, 1000px, calc((100svh - 470px) * 1.96)); margin-inline: auto; }
  #results .split.r14 { margin-top: clamp(88px, 14vh, 150px) !important; }
  .tables2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .tables2 .maintable td, .tables2 .maintable th { padding-top: 4px; padding-bottom: 4px; }
  /* compare: smaller case thumbnails; the route's details are the next screen */
  .casebtn { width: 128px; }
  .casebtn img { aspect-ratio: 2 / 1; height: auto; display: block; }
  .casebar { align-items: flex-start; }
  .cmp-below { margin-top: clamp(88px, 14vh, 150px); }
  /* limits: the stacked cards (styles above); user 11-22 asked for them back */
}
@media (min-width: 961px) {
  .h-media { max-width: min(1280px, calc((100svh - 500px) * 16 / 9)); }
  .promo { max-width: min(1280px, calc((100svh - 300px) * 16 / 9)); }
  .tables2 .maintable { font-size: 13.5px; }
  .tables2 .maintable td, .tables2 .maintable th { padding: 3px 8px; line-height: 1.25; }
  .tables2 .maintable tr.g td { padding-top: 9px; }
}
/* shorter desktop screens (about 800 px high): one more notch */
@media (min-width: 961px) and (max-height: 840px) {
  section { padding-top: 40px; }
  h2 { font-size: clamp(28px, 2.9vw, 42px); }
  .lede { font-size: 15.5px; margin-top: 6px; }
  .head { margin-bottom: 14px; }
  .finding p { font-size: 13.5px; }
  .tables2 .maintable { font-size: 12.5px; }
  .tables2 .maintable td, .tables2 .maintable th { padding: 2px 7px; }
  .tables2 .maintable tr.g td { padding-top: 6px; }
}

/* bar charts (results, Task 1, open paths) are drawn at their own width */
svg.chart#t1chart, svg.chart#openchart { width: 100%; height: auto; display: block; overflow: visible; }

/* user 11-22: the hero comparison large again (the video alone fits one screen; the title sits above it) */
@media (min-width: 961px) { .h-media { max-width: min(1280px, calc((100svh - 150px) * 16 / 9)); } }

/* user 11-22: BibTeX on a light card, not black */
.bib { background: #fbf7e6; color: #2b2410; border: 1px solid #f0e2a8; box-shadow: inset 4px 0 0 var(--wall); }
.bib .copy { background: #fff; color: var(--ink); border: 1px solid #e6d89a; }
.bib .copy:hover { background: var(--wall); color: #241c00; }

/* user 11-22: Insight used only part of the width (it looked broken). The player and the fan take the full left column and
   the three findings sit in a column on the right, so the section fills the width and still fits one screen. */
@media (min-width: 1100px) {
  #knows .wrap { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 22vw, 320px); column-gap: clamp(24px, 3vw, 44px); align-items: start; }
  #knows .head, #knows .wrap > .controls { grid-column: 1 / -1; }
  #knows .knows { grid-column: 1; max-width: none; margin: 0; }
  #knows .findings { grid-column: 2; grid-row: 3; margin-top: 0; grid-template-columns: 1fr; gap: 18px; }
  #knows .finding p { max-width: none; }
}

/* ---------- quiet motion in the demo areas (user 11-22): nothing moves on its own beyond the videos themselves ---------- */
.tile video { transition: opacity .6s var(--ease), filter .6s var(--ease); }
.tile:not(.live) video[src] { opacity: .92; filter: saturate(.9); }
.tile { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
@media (hover: hover) { .tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px rgba(17, 19, 24, .45); } }
.chip.pop { animation: chipPop .5s var(--ease) both; }
@keyframes chipPop { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
.tile.hit::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; box-shadow: inset 0 0 0 3px var(--wall); animation: tileHit 1.1s ease-out both; }
@keyframes tileHit { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chip.pop, .tile.hit::after { animation: none; } .tile:hover { transform: none; } }

/* ---------- Problem: raw and + NoPeWorld in one tile, a shared draggable wipe (user 11-22) ---------- */
#prob-grid { --cut: 100%; }
.duo-w { position: relative; border-radius: var(--radius-s); overflow: hidden; isolation: isolate; cursor: ew-resize; touch-action: pan-y; user-select: none; }
.duo-w > .tile { margin: 0; }
.duo-w > .tile.wipe-top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut)); }
.duo-w .tile, .duo-w .tile:hover { transform: none !important; box-shadow: none !important; }
.duo-w .wipe-top .lbl { left: auto; right: 8px; }
.duo-w .wipe-top .verdict { left: auto; right: 8px; }
.duo-w .wipe-top .play { display: none !important; }
.wipe-cut { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 3px; margin-left: -1.5px; z-index: 6; pointer-events: none; background: var(--wall); box-shadow: 0 0 12px rgba(242, 194, 0, .55); }
.wipe-cut span { position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--wall); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.wipe-cut span::before, .wipe-cut span::after { content: ""; position: absolute; top: 8px; border: 4px solid transparent; }
.wipe-cut span::before { left: 2px; border-right-color: #241c00; }
.wipe-cut span::after { right: 2px; border-left-color: #241c00; }
.duo-w .tile .lbl { font-size: 12px; padding: 3px 8px; }
.duo-w .tile .verdict .chip { font-size: 11.5px; padding: 3px 8px; }

/* promo: our own poster and play button until the reader presses play (then YouTube, Bilibili or our file) */
.promo-cover { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: #0b0c0f center / cover no-repeat; }
.promo-cover .promo-play { width: 76px; height: 76px; margin: 0; transition: transform .3s var(--ease); }
.promo-cover .promo-play::after { left: 31px; top: 25px; border-left-width: 20px; border-top-width: 13px; border-bottom-width: 13px; }
.promo-cover:hover .promo-play { transform: scale(1.08); }
.promo-cover .promo-wait { display: none; position: absolute; bottom: 18px; font: 500 12px var(--mono); color: #fff; background: rgba(0, 0, 0, .55); padding: 4px 10px; border-radius: 999px; }
.promo-cover.wait .promo-wait { display: block; }
.promo-alt { text-align: center; margin: 8px auto 0; }

/* user 11-22: the Problem comparison was squeezed into the middle; it now spans up to 1280 px (as wide as the hero video),
   past the text column, and the controls line up with it */
@media (min-width: 961px) {
  #problem .prob-split, #problem .wrap > .controls { max-width: none; margin-inline: calc(50% - min(640px, 50vw - 24px)); }
  #problem .prob-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

/* user 11-22: the promo video larger (up to 1280 px, past the text column; the whole video still fits one screen) */
@media (min-width: 961px) {
  .promo { max-width: none; width: min(1280px, calc(100vw - 48px), calc((100svh - 150px) * 16 / 9)); margin-inline: auto; position: relative; left: 50%; transform: translateX(-50%); }
  .promo-wrap .promo-alt { width: auto; }
}
/* the route table in Compare scrolls inside its card on narrow screens */
table.vtable { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* user 11-22: Compare's case row fills the width (each case an equal share, bigger thumbnails); phones scroll it sideways */
@media (min-width: 961px) {
  .casebar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); gap: 12px; overflow-x: auto; align-items: stretch; }
  .casebtn { width: auto; }
  .casebtn img { aspect-ratio: 16 / 9; }
}

/* phones: nothing may widen the layout viewport (words waiting off-screen for their entrance did, to 457 px at 390, which
   pushed the header's switch out of view and let the page zoom out) */
html { overflow-x: hidden; overflow-x: clip; }
/* phones: one wipe tile per row in the Problem grid, so both labels and verdicts fit */
@media (max-width: 600px) { #prob-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* user 11-22: the authors sit right under the title (before the tagline) */
.hero-top > .authors { margin: calc(-1 * clamp(4px, 1vw, 14px)) 0 0; font-size: clamp(15px, 1.15vw, 17px); }
.hero-top > .authors [data-cfg=authors] { font-size: clamp(16px, 1.3vw, 19px); }

/* the hero controls hide what a scene has no use for (the obstacle toggle without a track, the caption line where there is none) */
.stage-controls [hidden] { display: none !important; }
