/* NoPeWorld project page. Light, minimal; the obstacle is yellow, raw models red, NoPeWorld green, Unreal ink.
   Motion language: things glide up to a wall line and stop there (ease-out, no overshoot). */
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; 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; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111318;
  --ink-2: #454b58;
  --ink-3: #6a7180;
  --ink-4: #aab0bd;
  --surface: #ffffff;
  --panel: #f6f7fa;
  --panel-2: #eef1f6;
  --line: #e4e7ee;
  --line-2: #d4d9e3;
  --wall: #f2c200;
  --wall-soft: #fff6cc;
  --wall-ink: #8a6a00;
  --raw: #d33a2c;
  --raw-soft: #fde9e6;
  --ours: #1e9e5a;
  --ours-soft: #e3f5ea;
  --depth: #3b6bff;
  --depth-soft: #e7eeff;
  --text: #8b5cf6;
  --unreal: #22262e;
  --back: #e08a1e;
  --idle: #8a90a0;
  --radius: 20px;
  --radius-s: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 60px;
  --shadow: 0 1px 2px rgba(17, 19, 24, .04), 0 8px 28px rgba(17, 19, 24, .06);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--depth); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: 10px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.wide { max-width: 1440px; }
section { position: relative; padding: clamp(72px, 10vw, 140px) 0 0; }
section:last-of-type { padding-bottom: 80px; }

/* ---------- header: wordmark, section nav, progress rail ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.header.scrolled { border-bottom-color: var(--line); }
.header .bar { height: 100%; display: flex; align-items: center; gap: 18px; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; }
.nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav ol { list-style: none; display: flex; gap: 2px; margin: 0; padding: 4px; border-radius: 999px; background: var(--panel); overflow-x: auto; scrollbar-width: none; }
.nav ol::-webkit-scrollbar { display: none; }
.nav a { display: block; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: background .25s var(--ease), color .25s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17, 19, 24, .1); }
.tools { display: flex; align-items: center; gap: 8px; }
.lowdata { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; white-space: nowrap; }
.lowdata input { appearance: none; width: 30px; height: 18px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.lowdata input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.lowdata input:checked { background: var(--ink); }
.lowdata input:checked::after { transform: translateX(12px); }

/* the progress rail: a camera dot that runs to the wall at the end of the page and stays there */
.rail { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.rail .track { position: absolute; inset: 1px 14px 1px 0; background: linear-gradient(90deg, var(--ink) var(--p, 0%), transparent var(--p, 0%)); opacity: .9; }
.rail .wallseg { position: absolute; right: 0; top: -6px; width: 10px; height: 15px; border-radius: 2px;
  background: repeating-linear-gradient(135deg, var(--wall) 0 3px, #d9ad00 3px 5px); }
.rail .cam { position: absolute; top: -4px; left: 4px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--ink);
  transform: translateX(var(--x, 0px)); transition: border-color .2s; }
.rail .cam.touch { border-color: var(--wall-ink); box-shadow: 0 0 0 3px rgba(242, 194, 0, .35); }

@media (max-width: 1060px) { .nav { display: none; } .header .bar { justify-content: space-between; } }

/* ---------- typography ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow .wallbar { width: 3px; height: 16px; border-radius: 2px; background: var(--wall); }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.08; font-weight: 650; }
h2 { font-size: clamp(30px, 4.6vw, 54px); max-width: 18ch; }
h2 .soft { color: var(--ink-3); }
h3 { font-size: clamp(19px, 2vw, 23px); letter-spacing: -.015em; line-height: 1.25; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 64ch; margin: 18px 0 0; }
.small { font-size: 14px; color: var(--ink-3); }
.note { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.note b { color: var(--ink-2); font-weight: 600; }
.head { display: grid; gap: 4px; margin-bottom: clamp(28px, 4vw, 48px); }
.head .eyebrow { margin-bottom: 10px; }
kbd, .key { font-family: var(--mono); font-size: 12px; font-weight: 500; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 1.5px 0 var(--line-2); line-height: 1; }
.key.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 1.5px 0 #000; }
code, .mono { font-family: var(--mono); font-size: .88em; }

/* the reveal: glide to the wall line, stop there */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-x { opacity: 0; transform: translateX(-28px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.reveal-x.in { opacity: 1; transform: none; }
.head.in .wallbar { animation: contact .55s .55s var(--ease) both; }
@keyframes contact { 0% { box-shadow: 0 0 0 0 rgba(242, 194, 0, .0); } 30% { box-shadow: 0 0 0 6px rgba(242, 194, 0, .35); } 100% { box-shadow: 0 0 0 10px rgba(242, 194, 0, 0); } }

/* ---------- hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(36px, 7vw, 90px)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3.4vw, 40px); }
.h-body .tldr { margin-top: 0; }
.hero .kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-3); font-size: 14px; }
.hero .kicker .pill { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.title { font-size: clamp(42px, 8.2vw, 112px); line-height: .98; letter-spacing: -.045em; font-weight: 680; margin-top: 14px; max-width: 13ch; position: relative; }
.title .np { position: relative; display: inline-block; padding-right: .16em; }
.title .np::after { /* the wall the title touches: a short yellow bar standing right after "Non-" */
  content: ""; position: absolute; right: .03em; top: .14em; bottom: .04em; width: .075em; border-radius: .04em; background: var(--wall);
  transform: scaleY(0); transform-origin: 50% 100%; animation: rise .8s .35s var(--ease) forwards; }
@keyframes rise { to { transform: scaleY(1); } }
.authors { margin-top: 22px; font-size: 18px; color: var(--ink-2); }
.authors .anon { font-weight: 600; color: var(--ink); }
.tldr { margin-top: 18px; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.5; max-width: 50ch; color: var(--ink-2); }
.tldr b { color: var(--ink); font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); text-decoration: none; font-weight: 550; font-size: 15px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s, background .2s; }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #000; }
.btn svg { width: 17px; height: 17px; }
.btn[aria-disabled="true"] { color: var(--ink-3); border-style: dashed; cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; border-color: var(--line-2); }
.btn .soon { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); }

/* hero stage: the wipe */
.stage { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; background: #0b0c0f; box-shadow: var(--shadow); aspect-ratio: 16 / 9; user-select: none; touch-action: pan-y; }
.stage video, .stage canvas.ov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .clipR { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut, 50%)); }
.stage .handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 44px; margin-left: -22px; cursor: ew-resize; display: grid; place-items: center; z-index: 3; touch-action: none; }
.stage .handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: repeating-linear-gradient(180deg, var(--wall) 0 10px, #d9ad00 10px 14px); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.stage .handle span { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--wall); box-shadow: 0 2px 10px rgba(0,0,0,.35); display: grid; place-items: center; color: #3a2d00; }
.stage .handle span svg { width: 20px; height: 20px; }
.stage .tag { position: absolute; top: 14px; z-index: 2; padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(12, 13, 16, .66); display: flex; gap: 7px; align-items: center; }   /* no backdrop blur over playing video: it re-renders every frame */
.stage .tag.l { left: 14px; } .stage .tag.r { right: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.raw { background: var(--raw); } .dot.ours { background: var(--ours); } .dot.depth { background: var(--depth); } .dot.unreal { background: #c9ced8; } .dot.wall { background: var(--wall); }
.stage .hud { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; gap: 6px; align-items: center; color: #fff; font-size: 12.5px; }
.stage .hud .key { background: rgba(255,255,255,.92); }
.stage .hud .key.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--wall); }
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 14px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17, 19, 24, .12); font-weight: 550; }
.seg.dark button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: border-color .2s; }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn svg { width: 16px; height: 16px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { appearance: none; margin: 0; width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--wall); }
.toggle input:checked::after { transform: translateX(14px); }
.scrub { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 10px; }
.scrub input[type=range] { flex: 1; accent-color: var(--ink); }
.scrub .time { font: 500 12.5px var(--mono); color: var(--ink-3); min-width: 74px; text-align: right; }
input[type=range] { height: 22px; }

/* ---------- headline numbers ---------- */
.numbers { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; margin-top: clamp(40px, 6vw, 72px); }
.num { background: var(--panel); border-radius: var(--radius); padding: 22px 22px 20px; position: relative; overflow: hidden; }
.num .big { font-size: clamp(34px, 4.2vw, 56px); white-space: nowrap; font-weight: 680; letter-spacing: -.04em; line-height: 1; display: flex; align-items: baseline; gap: .25em; }
.num .big .from { color: var(--raw); }
.num .big .arrow { color: var(--ink-4); font-weight: 400; font-size: .7em; }
.num .big .to { color: var(--ours); }
.num .lab { margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.num .bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 16px; height: 64px; align-items: end; }
.num .bars .b { position: relative; height: 100%; }
.num .bars .b i { position: absolute; bottom: 0; width: 46%; border-radius: 4px 4px 2px 2px; transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease); }
.num .bars .b i.r { left: 2%; background: var(--raw); opacity: .85; }
.num .bars .b i.o { right: 2%; background: var(--ours); }
.num.in .bars .b i { transform: scaleY(1); }
.num .bars .b em { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.num .bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 8px; white-space: nowrap; z-index: 3; }
@media (max-width: 920px) { .numbers { grid-template-columns: 1fr 1fr; } .num:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .numbers { grid-template-columns: 1fr; } }

/* ---------- media tiles and grids ---------- */
.tile { position: relative; border-radius: var(--radius-s); overflow: hidden; background: #0e1014; aspect-ratio: 16 / 9; isolation: isolate; }
.tile video, .tile img.poster, .tile canvas.ov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile canvas.ov { pointer-events: none; z-index: 1; }
.tile .lbl { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 999px; background: rgba(12, 13, 16, .7);
  color: #fff; font-size: 12px; font-weight: 600; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .verdict { position: absolute; left: 8px; bottom: 8px; z-index: 2; }
.tile .play { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; background: rgba(0,0,0,.15); border: 0; cursor: pointer; color: #fff; }
.lowdata-on .tile .play.need { display: grid; }
.tile .play svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.tile.missing::after { content: attr(data-missing); position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-4); font-size: 13px; text-align: center; padding: 12px; }
.tile.hl { box-shadow: 0 0 0 2px var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.viol { color: #b4271b; background: var(--raw-soft); border-color: #f6c9c2; }
.chip.back { color: #a75f00; background: #fdf0de; border-color: #f4d6aa; }
.chip.ok { color: #157a44; background: var(--ours-soft); border-color: #bfe6cf; }
.chip.slide { color: #0d6b3a; background: #d2f0df; border-color: #a6dcbd; }
.chip.early, .chip.idle { color: #5b6170; background: var(--panel); border-color: var(--line); }
.chip.plain::before { display: none; }

.grid7 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid7 .tile.big { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.card { background: var(--panel); border-radius: var(--radius); padding: clamp(16px, 2vw, 22px); }
.card.white { background: var(--surface); border: 1px solid var(--line); }
.card h3 + p, .card h3 + .note { margin-top: 8px; }

/* top view */
.topview { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-s); overflow: hidden; background: #fafbfc; border: 1px solid var(--line); }
.topview canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 7px); height: 2px; }
.legend i.gt { background: rgba(34, 38, 46, .28); height: 6px; }
.legend i.raw { background: var(--raw); } .legend i.ours { background: var(--ours); } .legend i.depth { background: var(--depth); }
.legend i.wall { background: var(--wall); height: 8px; width: 12px; border-radius: 2px; }

/* ---------- the DiT knows ---------- */
.knows { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 960px) { .knows { grid-template-columns: 1fr; } }
.fanbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.fanbox svg { width: 100%; height: auto; }
.readout { font-size: 14.5px; color: var(--ink-2); min-height: 3.2em; line-height: 1.5; }
.readout b { color: var(--ink); }
.chunks { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.chunks button { flex: 1 0 auto; min-width: 64px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 8px 6px; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.chunks button .k { font: 500 11px var(--mono); color: var(--ink-3); }
.chunks button .c { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chunks button.kept .c { color: var(--ink-2); }
.chunks button.changed .c { color: var(--ours); }
.chunks button.now { border-color: var(--ink); background: var(--panel); }
.pstrip { display: grid; grid-template-columns: repeat(34, 1fr); gap: 2px; height: 46px; align-items: end; }
.pstrip i { display: block; border-radius: 2px 2px 0 0; background: var(--line-2); transition: height .45s var(--ease), background .3s; }
.pstrip i.safe { background: #8fd1ad; } .pstrip i.unsafe { background: #f0a59c; } .pstrip i.pick { background: var(--ink); }
.findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
@media (max-width: 860px) { .findings { grid-template-columns: 1fr; } }
.findings .card p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.findings .card .k { font-weight: 650; font-size: 28px; letter-spacing: -.03em; }

/* ---------- method ---------- */
.method-pin { position: relative; }
.method-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 28px; align-items: center; min-height: min(78vh, 720px); }
@media (max-width: 960px) { .method-stage { grid-template-columns: 1fr; min-height: 0; } }
.archbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(10px, 2vw, 20px); }
.archbox svg { width: 100%; height: auto; overflow: visible; }
.steps { display: grid; gap: 10px; }
.steps .step { border-radius: 16px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); opacity: .45; transition: opacity .4s var(--ease), border-color .3s, transform .5s var(--ease); cursor: pointer; }
.steps .step.on { opacity: 1; border-color: var(--ink); transform: translateX(4px); }
.steps .step .n { font: 500 12px var(--mono); color: var(--ink-3); }
.steps .step h3 { font-size: 17px; margin-top: 2px; }
.steps .step p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.arch .blk { transition: opacity .5s var(--ease), fill .4s; }
.arch .dim { opacity: .18; }
.arch text { font-family: Inter, system-ui, sans-serif; }
.arch .flow { stroke-dasharray: 5 6; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.timeline { margin-top: 18px; }
.timeline svg { width: 100%; height: auto; }
.costs { display: grid; gap: 10px; margin-top: 8px; }
.cost { display: grid; grid-template-columns: 150px 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.cost .bar { height: 12px; border-radius: 6px; background: var(--panel-2); position: relative; overflow: hidden; }
.cost .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.in .cost .bar i { transform: scaleX(1); }
.cost .v { font: 500 13px var(--mono); text-align: right; }
@media (max-width: 520px) { .cost { grid-template-columns: 104px 1fr 56px; font-size: 13px; } }
.eqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
@media (max-width: 960px) { .eqs { grid-template-columns: 1fr; } }
.eq { background: var(--panel); border-radius: var(--radius); padding: 18px; overflow-x: auto; }
.eq .m { font-size: 15.5px; margin: 12px 0 6px; }
.eq p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }

/* ---------- benchmark explorer ---------- */
.tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .tasks { grid-template-columns: 1fr; } }
.task { border-radius: var(--radius); padding: 20px; background: var(--panel); position: relative; overflow: hidden; }
.task .tag { font: 600 12px var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.task h3 { margin-top: 12px; font-size: 19px; }
.task p { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; }
.task .meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.filters { display: grid; gap: 10px; margin: 26px 0 16px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.frow .fl { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); width: 88px; flex: none; }
@media (max-width: 640px) { .frow .fl { width: 100%; } }
.fchip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.fchip:hover { border-color: var(--ink-3); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip .n { font: 500 11px var(--mono); opacity: .6; margin-left: 4px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 16px; }
.stat { background: var(--panel); border-radius: 14px; padding: 10px 14px; min-width: 120px; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.stat .l { font-size: 12.5px; color: var(--ink-3); }
.stat.raw .v { color: var(--raw); } .stat.ours .v { color: var(--ours); } .stat.depth .v { color: var(--depth); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.rcard { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; padding: 0; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; display: flex; flex-direction: column; }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.rcard .pics { display: grid; grid-template-columns: 1.35fr 1fr; background: var(--panel); }
.rcard .pics img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.rcard .pics canvas { width: 100%; height: 100%; min-height: 0; background: #fafbfc; border-left: 1px solid var(--line); }
.rcard .body { padding: 10px 12px 12px; display: grid; gap: 7px; }
.rcard .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .s { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .v { display: flex; gap: 6px; flex-wrap: wrap; }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* the route viewer (dialog) */
dialog.viewer { width: min(1240px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 0; padding: 0; border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.25); overflow: auto; }
dialog.viewer::backdrop { background: rgba(17, 19, 24, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vhead { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.vhead h3 { font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbody { padding: 18px; display: grid; gap: 16px; }
.vgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .vgrid { grid-template-columns: 1fr; } }
.vtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .vtiles { grid-template-columns: 1fr; } }
.vtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.vtable th, .vtable td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.vtable th { font-weight: 600; color: var(--ink-3); font-size: 12px; }
.vtable tr.sel td { background: var(--panel); }
.vtable .chip { height: 22px; font-size: 11.5px; }
.tablewrap { overflow-x: auto; }

/* ---------- results ---------- */
.chartbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(14px, 2.4vw, 26px); }
.chartbox svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: Inter, system-ui, sans-serif; }
.tooltip { position: fixed; z-index: 80; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 10px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; max-width: 280px; }
.tooltip.on { opacity: 1; transform: none; }
.maintable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.maintable th, .maintable td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.maintable th:first-child, .maintable td:first-child { text-align: left; }
.maintable thead th { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.maintable tr.g td { background: var(--panel); font-weight: 650; text-align: left; }
.maintable tr.ours td { background: #f4fbf7; }
.maintable td.best { font-weight: 700; }
.maintable td.second { text-decoration: underline; text-underline-offset: 3px; }
.mlegend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.mlegend span { display: inline-flex; align-items: center; gap: 7px; }
.mk { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ---------- compare ---------- */
.cmp-controls { display: grid; gap: 10px; margin-bottom: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cmp-below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 900px) { .cmp-below { grid-template-columns: 1fr; } }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; background: var(--panel); border-radius: 999px; }
@media (max-width: 640px) { .player { border-radius: 18px; } }
.scrubwrap { position: relative; flex: 1; min-width: 160px; display: flex; align-items: center; }
.scrubwrap input { width: 100%; }
.scrubwrap .tick { position: absolute; top: -4px; width: 2px; height: 30px; background: var(--wall); border-radius: 1px; pointer-events: none; }
.scrubwrap .tick::after { content: "contact"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--wall-ink); font-weight: 600; }
.casebar { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.casebtn { flex: none; width: 144px; border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--surface); overflow: hidden; cursor: pointer; text-align: left; scroll-snap-align: start; transition: border-color .2s, transform .25s var(--ease); }
.casebtn img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.casebtn span { display: block; padding: 7px 9px; font-size: 12.5px; line-height: 1.3; }
.casebtn span b { display: block; font-size: 12.5px; }
.casebtn span em { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.casebtn[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.wipebox { margin-top: 16px; }

/* ---------- open domain ---------- */
.t3grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; }
.t3 { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface); display: grid; gap: 10px; }
.t3 .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.t3 .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.t3 .top b { font-size: 14px; }
.t3 .vl { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- limits ---------- */
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .limits { grid-template-columns: 1fr; } }
.limit { border-radius: var(--radius); background: var(--panel); padding: 18px; display: grid; gap: 10px; align-content: start; }
.limit h3 { font-size: 18px; }
.limit p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.limit .src { font-size: 12.5px; color: var(--ink-3); }
.limit .tile { margin-top: 4px; }
.limit .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- playground ---------- */
.play-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 18px; align-items: start; }
@media (max-width: 860px) { .play-wrap { grid-template-columns: 1fr; } }
.pg { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #fafbfc; border: 1px solid var(--line); touch-action: none; cursor: crosshair; outline: none; }
.pg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg .hint { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.85); padding: 6px 10px; border-radius: 999px; }
.pg:focus-visible { box-shadow: 0 0 0 2px var(--depth); }
.pad { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 6px; justify-content: start; margin-top: 12px; }
.pad button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; font: 600 14px var(--mono); cursor: pointer; box-shadow: 0 2px 0 var(--line-2); touch-action: none; }
.pad button:active, .pad button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pad .w { grid-column: 2; } .pad .a { grid-column: 1; grid-row: 2; } .pad .s { grid-column: 2; grid-row: 2; } .pad .d { grid-column: 3; grid-row: 2; }

/* ---------- bibtex, footer ---------- */
.bib { position: relative; background: #0f1115; color: #e8eaf0; border-radius: var(--radius); padding: 22px 22px; font: 13.5px/1.65 var(--mono); overflow-x: auto; white-space: pre; }
.bib .copy { position: absolute; top: 12px; right: 12px; background: #1d2027; color: #fff; border: 1px solid #30343d; border-radius: 999px; padding: 6px 12px; font: 500 12.5px Inter, sans-serif; cursor: pointer; }
.bib .copy:hover { background: #2a2e37; }
footer { margin-top: 64px; padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; }
footer .wrap { display: grid; gap: 8px; }
.endwall { height: 10px; margin-top: 18px; border-radius: 3px; background: repeating-linear-gradient(135deg, var(--wall) 0 6px, #d9ad00 6px 10px); opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-x { opacity: 1; transform: none; }
}
@media print { .header, .controls, .player, .filters { display: none; } .reveal, .reveal-x { opacity: 1; transform: none; } }

/* grid and flex children may shrink below their content (keeps the phone layout inside the viewport) */
.knows > *, .split > *, .play-wrap > *, .vgrid > *, .cmp-below > *, .method-stage > *, .numbers > *, .tasks > *, .limits > *, .findings > *, .eqs > *, .t3grid > * { min-width: 0; }
.scrub input[type=range], .scrubwrap input { min-width: 0; }
.eq .m, .m { overflow-x: auto; overflow-y: hidden; max-width: 100%; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split.r14 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 960px) { .split.even, .split.r14 { grid-template-columns: 1fr; } }
.mlegend svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 700px) { .archbox { overflow-x: auto; } .archbox svg { min-width: 640px; } .timeline { overflow-x: auto; } .timeline svg { min-width: 720px; } }
/* wide screens: title left, the comparison right, both above the fold */
@media (min-width: 1200px) {
  .hero { padding-top: calc(var(--header-h) + 44px); }
  .hero .wrap { max-width: 1440px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: 'head media' 'body media'; align-items: end; column-gap: 52px; row-gap: 18px; }
  .h-head { grid-area: head; } .h-media { grid-area: media; align-self: center; } .h-body { grid-area: body; align-self: start; }
  .hero .title { font-size: clamp(44px, 4.15vw, 78px); }
  .hero .tldr { font-size: 18.5px; }
  .hero .links { margin-top: 22px; }
}
@media (min-width: 2200px) { .wrap { max-width: 1480px; } .hero .wrap, .wrap.wide { max-width: 1840px; } body { font-size: 18px; } }

/* phones and tablets: a compact section menu instead of the pill nav */
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; cursor: pointer; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; background: var(--panel); color: var(--ink-2); user-select: none; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav[open] summary { background: var(--ink); color: #fff; }
.mnav ol { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.mnav a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 15px; }
.mnav a:hover, .mnav a.active { background: var(--panel); }
@media (max-width: 1060px) { .mnav { display: block; } }
@media (max-width: 420px) { .lowdata span { display: none; } }
.h-head { order: 0; } .h-media { order: 1; } .h-body { order: 2; }

/* abstract: one collapsible block under the numbers */
.abstract { background: var(--panel); border-radius: var(--radius); padding: 18px 22px; }
.abstract summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.abstract summary::-webkit-details-marker { display: none; }
.abstract .more-txt { font-size: 13.5px; color: var(--ink-2); padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.abstract[open] .more-txt { visibility: hidden; }
.abstract p { margin: 14px 0 0; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); max-width: 82ch; }
.abstract p b { color: var(--ink); }

/* problem section: on desktop the six generators sit two per row so the column matches the Unreal + top-view column */
@media (min-width: 961px) { #prob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
