@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #ffffff;
  --cream: #fbf8f1;
  --cream-2: #f4efe3;
  --ink: #20242b;
  --ink-2: #4a515c;
  --mute: #737b87;
  --line: #e8e3d8;
  --grid: #efebe2;
  --egg: #ffd43b;
  --egg-deep: #f2b90f;
  --egg-soft: #fff4c7;
  --eye: #49b867;
  --pa: #6f55b5;
  --pa-soft: #ece7f8;
  --pa-mid: #a999d6;
  --pa-light: #cfc6ea;
  --oft: #b97739;
  --oft-soft: #f6e8d8;
  --oft-light: #e6c9a6;
  --good: #1f9d78;
  --bad: #c9562f;
  --night: #1c1a3a;
  --sans: "Jakarta", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  --mono: "JBMono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, pre, ul, ol { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--egg-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid #2a78d6; outline-offset: 2px; border-radius: 4px; }
b, strong { font-weight: 650; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--cream-2); padding: 1px 6px; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.top { position: fixed; left: 0; right: 0; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); transition: transform .35s ease; }
.top.away { transform: translateY(-101%); }
.top-in { max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 30px; }
.top nav { display: flex; gap: 22px; font-size: 14.5px; }
.top nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.top nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { background: var(--cream); border-bottom: 1px solid #efeadf; padding: 0 0 40px; }
.hero-in { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 14px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-in .btns { padding-top: 8px; }
/* static layout (phones, reduced motion): title, then the film as a card */
.hero-pin { max-width: 1240px; margin: 0 auto; padding: 90px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative; }
.hero-head { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.scroll-hint { display: none; }
/* pinned layout: the film opens full-screen and shrinks into a card as you scroll */
.hero-scroll.pinned { height: calc(100vh + var(--len, 80vh)); }
.pinned .hero-pin { position: sticky; top: 0; height: 100vh; max-width: none; padding: 0; display: block; overflow: hidden; }
.pinned .hero-head { position: absolute; left: 0; right: 0; top: 100vh; padding: 0 20px; will-change: opacity, transform, top; }
.pinned .stage { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border-radius: 0; will-change: width, height, top, left; }
.pinned .scroll-hint { display: flex; position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%); z-index: 6; align-items: center; gap: 6px; font: 600 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(20, 22, 40, .5); backdrop-filter: blur(8px); padding: 9px 12px 9px 14px; border-radius: 999px; pointer-events: none; }
.scroll-hint svg { width: 13px; height: 13px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
.eyebrow { font: 600 12.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8a6a05; background: var(--egg-soft); border: 1px solid #f3dc82; padding: 7px 12px; border-radius: 999px; }
h1 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
h1 .h1-sub { font-size: clamp(18px, 2.05vw, 26px); line-height: 1.24; letter-spacing: -.018em; font-weight: 650; max-width: 860px; text-wrap: balance; }
mark { background: #ffe58a; color: inherit; border-radius: 4px; padding: 1px 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h1 .mark { background: linear-gradient(transparent 62%, var(--egg) 62%, var(--egg) 92%, transparent 92%); padding: 0 .08em; }
.subtitle { font-size: clamp(17px, 1.9vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 820px; text-align: center; text-wrap: balance; }

.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 76vh; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 120% at 60% 35%, #fff6e2, #f7dcc4 70%, #ead8ef); box-shadow: 0 40px 70px -50px rgba(90, 60, 10, .55), 0 0 0 1px rgba(90, 60, 10, .08); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stage.video canvas { display: none; }
.stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.stage.ready .stage-poster { opacity: 0; pointer-events: none; }
.stage-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--ink-2); transition: opacity .4s; }
.stage.ready .stage-load { opacity: 0; pointer-events: none; }
.stage-load svg { width: 64px; height: 74px; animation: bob 1.1s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-9px) scale(.97, 1.04); } }

.ov { position: absolute; z-index: 3; transition: opacity .5s, transform .5s; }
.ov.hide { opacity: 0; transform: translateY(8px); pointer-events: none; }
.ov-phase { left: 16px; top: 16px; display: flex; align-items: center; gap: 8px; font: 600 11.5px/1 var(--mono); letter-spacing: .05em; padding: 8px 12px; border-radius: 999px; background: rgba(22, 18, 52, .72); color: #fff; backdrop-filter: blur(8px); }
.ov-phase i { width: 7px; height: 7px; border-radius: 50%; background: var(--egg); display: block; }
.ov-phase.phys { background: rgba(255, 255, 255, .82); color: var(--ink); }
.ov-phase.phys i { background: var(--good); }
.ov-vig { inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(115% 100% at 50% 46%, rgba(3, 6, 20, 0) 52%, rgba(3, 6, 20, .5) 100%); transition: opacity .9s; }
.ov-vig.hide { opacity: 0; transform: none; }
.ov-vig { display: none; }
.ov-pip { right: 16px; bottom: 52px; width: min(21%, 244px); padding: 6px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); border-radius: 12px; box-shadow: 0 12px 30px -20px rgba(60, 40, 10, .6); }
.ov-pip img { width: 100%; border-radius: 8px; aspect-ratio: 2 / 1; background: #ddd; }
.ov-cap { font: 500 10px/1 var(--mono); color: var(--mute); padding: 6px 2px 1px; letter-spacing: .03em; text-align: center; }
.ov-sub { left: 16px; bottom: 52px; width: min(calc(100% - 32px), 430px); padding: 11px 16px 12px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); border-radius: 14px; box-shadow: 0 14px 34px -22px rgba(60, 40, 10, .7); display: flex; flex-direction: column; gap: 6px; }
.ov-sub.hide { transform: translateY(8px); }
.sub-h { display: flex; justify-content: space-between; font: 600 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.sub-h b { color: var(--pa); font-weight: 700; }
.sub-r { font-size: 14px; line-height: 1.42; color: var(--ink); height: 4.26em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sub-c { font: 500 11.5px/1.3 var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 1.3em; }
.ov-note p { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); } .ov-note p b { color: var(--ink); }
.sub-c .k { color: var(--pa); font-weight: 650; } .sub-c .n { color: var(--ink); } .sub-c .d { color: var(--mute); }
.ov-done { left: 50%; top: 16px; transform: translateX(-50%); padding: 9px 16px 9px 10px; display: flex; align-items: center; gap: 9px; font-size: 14.5px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-radius: 999px; box-shadow: 0 12px 30px -20px rgba(60, 40, 10, .6); white-space: nowrap; }
.ov-done.hide { transform: translateX(-50%) translateY(-8px); }
.ov-done span { font: 500 11.5px var(--mono); color: var(--mute); }
.ov-done i { width: 22px; height: 22px; border-radius: 50%; background: var(--good); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 13px; }
.ov-bar { left: 14px; right: 14px; bottom: 10px; display: flex; align-items: center; gap: 10px; }
.pb { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink); flex: none; box-shadow: 0 4px 12px -6px rgba(60, 40, 10, .5); }
.pb:hover { background: #fff; }
.pb svg { width: 12px; height: 12px; fill: currentColor; }
.track { position: relative; flex: 1; height: 30px; cursor: pointer; display: flex; align-items: center; }
.track-bg { position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(32, 36, 43, .16); overflow: hidden; }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); border-radius: 2px; }
.track-seg { position: absolute; top: 50%; height: 10px; width: 2px; margin-top: -5px; background: rgba(32, 36, 43, .45); border-radius: 1px; }
.src-note { font: 500 12px/1.4 var(--mono); color: var(--mute); text-align: center; max-width: 900px; }
.src-note b { color: var(--ink-2); font-weight: 600; }

.authors { font-size: 17px; font-weight: 600; color: var(--ink); padding-top: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.affil { font-size: 14.5px; color: var(--mute); display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.authors { align-items: baseline; }
.affil { align-items: center; gap: 6px 22px; }
.affil .gt { height: 44px; width: auto; display: block; }
.authors a { text-decoration: underline; text-decoration-color: rgba(32, 36, 43, .25); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.authors a:hover { text-decoration-color: var(--egg-deep); }
.authors sup, .affil sup { color: #b07a2a; font-weight: 700; margin-left: 1px; line-height: 0; }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px 9px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink); background: #fff; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { border-color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn .soon { font: 500 10px var(--mono); color: var(--mute); border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; margin-left: 2px; }
.btn.dark .soon { color: #cfd3da; border-color: #5a606b; }

/* ---------- layout ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 76px; padding: 44px 0 30px; font-size: 14px; overflow: visible; }
.toc-h { font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding-bottom: 12px; }
.toc ol { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: flex; gap: 8px; padding: 5px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); line-height: 1.35; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; }
.toc a span { font: 600 12px/1.6 var(--mono); color: var(--mute); min-width: 12px; }
.toc a:hover { color: var(--ink); background: var(--cream); }
.toc a.on { color: var(--ink); font-weight: 650; border-left-color: var(--egg-deep); background: var(--cream); }
.toc-egg { margin: 18px 0 0 0; display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; width: 100%; box-sizing: border-box; }
.egg-fig { position: relative; flex: none; width: 60px; height: 80px; display: block; }
.egg-fig svg { position: absolute; inset: 0; width: 60px; height: 80px; display: block; overflow: visible; }
.egg-fig .sparks { pointer-events: none; }
.egg-fig g, .egg-fig .sparks path, .egg-fig .bat, .egg-fig .batw { transform-box: fill-box; transform-origin: 50% 100%; }
.egg-fig .g-fx { opacity: 0; transition: opacity .35s; } .egg-fig.sig .g-fx { opacity: 1; }
/* the change: old outfit flies off while the egg flips edge-on … */
.egg-fig.out .g-body { animation: sw-body-out .21s ease-in forwards; }
.egg-fig.out .g-hat { animation: sw-hat-out .21s ease-in forwards; }
.egg-fig.out .g-front, .egg-fig.out .g-back { animation: sw-base-out .21s ease-in forwards; }
@keyframes sw-body-out { to { transform: translateY(-5px) scaleX(.05); } }
@keyframes sw-hat-out { to { transform: translateY(-24px) rotate(-22deg); opacity: 0; } }
@keyframes sw-base-out { to { transform: translateY(9px) scale(.82); opacity: 0; } }
/* … and the new one lands as it flips back, with a little burst of stars */
.egg-fig.in .g-body { animation: sw-body-in .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.egg-fig.in .g-hat { animation: sw-hat-in .5s cubic-bezier(.3, 1.6, .5, 1) .14s both; }
.egg-fig.in .g-front, .egg-fig.in .g-back { animation: sw-base-in .44s cubic-bezier(.3, 1.6, .5, 1) .06s both; }
@keyframes sw-body-in { 0% { transform: translateY(-5px) scaleX(.05); } 55% { transform: translateY(-9px) scaleX(1.08); } 82% { transform: translateY(0) scale(1.05, .94); } 100% { transform: none; } }
@keyframes sw-hat-in { 0% { transform: translateY(-34px) rotate(14deg); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes sw-base-in { 0% { transform: translateY(10px) scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
.egg-fig .sparks path { opacity: 0; transform-origin: center; }
.egg-fig.in .sparks path { animation: spark .56s ease-out both; }
@keyframes spark { 0% { opacity: 0; translate: 0 0; scale: .2; rotate: 0deg; } 30% { opacity: 1; scale: 1.7; } 100% { opacity: 0; translate: calc(var(--dx) * 1.4) calc(var(--dy) * 1.4); scale: .6; rotate: 90deg; } }
.egg-fig .sparks .ring { opacity: 0; transform-box: fill-box; transform-origin: center; }
.egg-fig.in .sparks .ring { animation: ring .46s ease-out both; }
@keyframes ring { 0% { opacity: .95; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }
/* each outfit's own bit, once the change has landed */
@keyframes hop-body { 0% { transform: none; } 14% { transform: translateY(1px) scale(1.07, .9); } 46% { transform: translateY(-13px) scale(.95, 1.06); } 80% { transform: translateY(0) scale(1.06, .93); } 100% { transform: none; } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(1.300px); } }
@keyframes wob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3.500deg); } }
.egg-fig.sig svg[data-o="plain"] .sig-body { animation: hop-body .66s cubic-bezier(.3, 0, .3, 1) .05s 1; }
.egg-fig.sig svg[data-o="onsen"] .sig-body, .egg-fig.sig svg[data-o="onsen"] .sig-hat { animation: bob 3s ease-in-out infinite; }
.egg-fig.sig svg[data-o="onsen"] .st { animation: steam 2.600s ease-in-out infinite backwards; }
.egg-fig.sig svg[data-o="onsen"] .st:nth-child(2) { animation-delay: .7s; } .egg-fig.sig svg[data-o="onsen"] .st:nth-child(3) { animation-delay: 1.400s; }
.egg-fig.sig svg[data-o="onsen"] .rip { animation: rip 3s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes steam { 0% { transform: translateY(4px); opacity: 0; } 35% { opacity: .95; } 100% { transform: translateY(-6px); opacity: 0; } }
@keyframes rip { 0%, 100% { transform: none; } 50% { transform: scaleY(1.180); } }
.egg-fig.sig svg[data-o="witch"] .sig-hat { animation: wob 2.800s ease-in-out infinite; }
.egg-fig.sig svg[data-o="witch"] .bat { animation: bat-fly 3.400s ease-in-out infinite; }
.egg-fig.sig svg[data-o="witch"] .batw { animation: bat-flap .24s ease-in-out infinite alternate; transform-origin: 50% 30%; }
@keyframes bat-fly { 0%, 100% { transform: none; } 25% { transform: translate(-9px, -4px); } 50% { transform: translate(-20px, 3px); } 75% { transform: translate(-8px, 6px); } }
@keyframes bat-flap { to { transform: scaleY(.45); } }
.egg-fig.sig svg[data-o="santa"] .sig-hat { animation: wob 3.200s ease-in-out infinite; }
.egg-fig svg[data-o="santa"] .sn { opacity: 0; }
.egg-fig.sig svg[data-o="santa"] .sn { animation: snow 3.200s linear infinite; }
@keyframes snow { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(-5px, 76px); opacity: 0; } }
.egg-fig.sig svg[data-o="grad"] .sig-hat { animation: toss 1.200s cubic-bezier(.3, 0, .3, 1) .1s 1; transform-origin: 50% 50%; }
@keyframes toss { 0% { transform: none; } 12% { transform: translateY(2px); } 46% { transform: translateY(-26px) rotate(170deg); } 80% { transform: translateY(-2px) rotate(352deg); } 90% { transform: translateY(1px) rotate(362deg); } 100% { transform: rotate(360deg); } }
.egg-fig.sig svg[data-o="coder"] .sig-body, .egg-fig.sig svg[data-o="coder"] .sig-hat { animation: bob .32s ease-in-out infinite; }
.egg-fig.sig svg[data-o="coder"] .logo { animation: blink 1.400s ease-in-out infinite; }
.egg-fig.sig svg[data-o="coder"] .gl { animation: rise 2.400s ease-out infinite; opacity: 0; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes rise { 0% { transform: translateY(6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.egg-fig svg[data-o="shades"] .drop { transform-origin: 50% 50%; }
.egg-fig svg[data-o="shades"] .m0 { opacity: 0; }
.egg-fig.in svg[data-o="shades"] .m0 { opacity: 1; }
.egg-fig.in svg[data-o="shades"] .drop, .egg-fig.in svg[data-o="shades"] .smirk { opacity: 0; }
.egg-fig.sig svg[data-o="shades"] .m0 { animation: fadeout .2s .3s both; }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
.egg-fig.sig svg[data-o="shades"] .drop { animation: drop .6s cubic-bezier(.3, 1.500, .5, 1) both; }
.egg-fig.sig svg[data-o="shades"] .smirk { animation: fadein .3s .55s both; }
.egg-fig.sig svg[data-o="shades"] .gli { animation: glint 2.600s 1s ease-in-out infinite; }
@keyframes drop { 0% { transform: translateY(-30px) rotate(-10deg); opacity: 0; } 25% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes glint { 0%, 70%, 100% { opacity: .85; } 80% { opacity: .1; } 90% { opacity: 1; } }
.egg-say { position: relative; flex: 1; min-width: 0; min-height: 66px; background: #fff; border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; padding: 8px 10px 9px; display: flex; flex-direction: column; justify-content: center; gap: 3px; box-shadow: 0 8px 18px -14px rgba(60, 40, 10, .5); transform-origin: 0 100%; }
.egg-say b { font: 700 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #b07a2a; }
.egg-say span { font-size: 13px; line-height: 1.32; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.egg-say.pop { animation: saypop .34s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes saypop { 0% { transform: scale(.82) translateY(4px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes lol { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-12deg) scale(1.08, .94); } 75% { transform: rotate(12deg) scale(1.08, .94); } }

.article { min-width: 0; padding: 26px 0 60px; }
.chap { padding: 46px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.chap:last-child { border-bottom: 0; }
.chap > p, .chap > ul, .chap > ol { max-width: 760px; }
.num { font: 700 13px/1 var(--mono); color: #8a6a05; background: var(--egg-soft); border-radius: 6px; padding: 5px 8px; display: inline-block; margin-right: 10px; vertical-align: .22em; }
h2 { font-size: clamp(25px, 2.7vw, 32px); font-weight: 750; line-height: 1.18; letter-spacing: -.022em; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.012em; padding-top: 14px; }
.lead { font-size: 19px; line-height: 1.5; color: var(--ink); font-weight: 550; max-width: 780px; text-wrap: pretty; }
.chap ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.note { font-size: 14.5px; color: var(--mute); max-width: 760px; }

/* ---------- figures ---------- */
.fig { margin: 8px 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.fig-b { padding: 22px 22px 20px; }
.fig.cream { background: var(--cream); }
figcaption { font-size: 14px; line-height: 1.5; color: var(--ink-2); padding: 12px 22px 16px; border-top: 1px solid var(--line); background: #fff; }
figcaption b { color: var(--ink); }
.fig-t { font: 600 11.5px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.fig-h { font-size: 17px; font-weight: 700; letter-spacing: -.01em; padding: 6px 0 2px; }
.fig-s { font-size: 13.5px; color: var(--mute); }

/* the three points the page is about */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pillars.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pillars.four .pillar { padding: 15px 14px 14px; }
.pillars.four .pillar-n { font-size: clamp(26px, 2.6vw, 33px); }
.pillars.four .pillar-n small { font-size: 13px; }
.pillars.four .pillar-d { font-size: 13px; }
.pillar { border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; background: #fff; transition: transform .2s, border-color .2s, box-shadow .2s; }
.pillar:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 14px 28px -20px rgba(0, 0, 0, .5); }
.pillar-k { font: 700 12px/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: #8a6a05; background: var(--egg-soft); border-radius: 6px; padding: 6px 8px; align-self: flex-start; }
.pillar-n { font-size: clamp(30px, 3.3vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; padding-top: 8px; }
.pillar-n small { font-size: 15px; font-weight: 600; color: var(--mute); letter-spacing: 0; margin-left: 5px; }
.pillar-d { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
/* highlight cards */
.hl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hl-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; background: #fff; transition: transform .2s, border-color .2s, box-shadow .2s; }
.hl-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 14px 28px -20px rgba(0, 0, 0, .5); }
.hl-t { font: 600 11.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); display: flex; justify-content: space-between; }
.hl-n { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; padding-top: 6px; }
.hl-n small { font-size: 15px; font-weight: 600; color: var(--mute); letter-spacing: 0; margin-left: 4px; }
.hl-d { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.c-pa { color: var(--pa); } .c-oft { color: var(--oft); } .c-good { color: var(--good); } .c-bad { color: var(--bad); }

/* vertical bar charts */
.bars { display: flex; align-items: flex-end; gap: 10px; height: var(--h, 220px); padding: 26px 4px 0; position: relative; border-bottom: 1.5px solid #c9c3b6; }
.bars::before { content: ""; position: absolute; inset: 26px 0 0 0; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--grid) calc(25% - 1px), var(--grid) 25%); pointer-events: none; }
.bgroup { display: flex; align-items: flex-end; gap: 5px; height: 100%; flex: 1; justify-content: center; position: relative; }
.bar { flex: 1; max-width: 46px; height: calc(var(--v) * 1%); min-height: 2px; background: var(--c, var(--pa)); border-radius: 5px 5px 0 0; position: relative; transform-origin: bottom; transform: scaleY(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.in .bar { transform: scaleY(1); }
.bar b { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -3px); font: 700 12.5px/1 var(--mono); color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .4s .7s; }
.in .bar b { opacity: 1; }
.bar.zero { background: transparent; border-bottom: 3px solid var(--c); }
.blabels { display: flex; gap: 10px; padding: 8px 4px 0; }
.blabels div { flex: 1; text-align: center; font-size: 13px; line-height: 1.3; color: var(--ink-2); font-weight: 600; }
.blabels small { display: block; font: 500 11px var(--mono); color: var(--mute); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); padding-bottom: 6px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.two.wide-l { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.panel-h { font-size: 14px; font-weight: 700; padding-bottom: 2px; }
.panel-s { font-size: 12.5px; color: var(--mute); padding-bottom: 6px; }

/* horizontal bars */
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hrow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; align-items: center; }
.hrow-l { font-size: 14px; font-weight: 650; line-height: 1.25; }
.hrow-l small { display: block; font: 500 11.5px/1.35 var(--mono); color: var(--mute); }
.htrack { position: relative; height: 34px; background: var(--cream-2); border-radius: 8px; }
.hfill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 1%); background: var(--c); border-radius: 8px; transform-origin: left; transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.in .hfill { transform: scaleX(1); }
.hval { position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--v) * 1% + 10px); font: 700 13.5px/1 var(--mono); white-space: nowrap; }
.haxis { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
.haxis div:last-child { display: flex; justify-content: space-between; font: 500 11px var(--mono); color: var(--mute); }
.big-x { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 4px 0 14px; }
.big-x b { font-size: clamp(44px, 6vw, 68px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.big-x span { font-size: 16px; color: var(--ink-2); max-width: 540px; line-height: 1.4; text-wrap: balance; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { font: 600 11.5px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
th:first-child, td:first-child { text-align: left; }
td:first-child { font-weight: 650; }
td small { display: block; font: 500 11px var(--mono); color: var(--mute); }
tr.ours td { background: var(--pa-soft); }
tr.ours td:first-child { color: var(--pa); }
tr.grp td { background: var(--cream); font: 600 11.5px/1.2 var(--mono); color: var(--mute); text-align: left; letter-spacing: .03em; }
tr.ref td { color: var(--mute); }
tr.ref td:first-child { font-weight: 500; }
td.best { font-weight: 750; }
td.dp { color: var(--good); font-weight: 650; } td.dn { color: var(--bad); font-weight: 650; } td.dz { color: var(--mute); }
th.sep, td.sep { border-left: 1px solid var(--line); }

/* definition + three-way comparison (Figure 1) */
.defn { border: 1px solid #f0d77a; background: var(--egg-soft); border-radius: 14px; padding: 16px 18px 17px; max-width: 780px; display: flex; flex-direction: column; gap: 7px; }
.defn-k { font: 700 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8a6a05; }
.defn p { font-size: 17px; line-height: 1.55; }
.lk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lk p { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px 16px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.lk p b { color: var(--ink); font-weight: 700; }
.pp { display: flex; align-items: stretch; gap: 8px; }
.pp > div { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 5px; }
.pp > div:first-child { background: var(--cream); }
.pp small { font: 600 11px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.pp b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.pp p { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pp-ar { align-self: center; flex: none; color: var(--mute); font-size: 16px; }
@media (max-width: 760px) { .lk { grid-template-columns: minmax(0, 1fr); } .pp { flex-direction: column; } .pp-ar { transform: rotate(90deg); } }
.lanes { display: flex; flex-direction: column; gap: 12px; }
.lane { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); }
.lane.ours { border-color: var(--pa-mid); background: #f7f4fd; box-shadow: 0 16px 32px -26px rgba(80, 50, 160, .7); }
.lane-h { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lane-n { font-weight: 800; font-size: 19px; line-height: 1.15; letter-spacing: -.02em; }
.lane-n small { display: block; font: 500 11px/1.4 var(--mono); color: var(--mute); letter-spacing: 0; padding-top: 3px; }
.lane.ours .lane-n { color: var(--pa); }
.lane.wide { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lane.wide .lane-h { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.lane.wide .lane-h .tks { margin-left: auto; }
.eq { font: 400 15.5px/1.5 "STIX Two Math", "Cambria Math", "Latin Modern Math", Georgia, "Times New Roman", serif; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--ink); overflow-wrap: anywhere; }
.eq sub { font-size: .68em; line-height: 0; }
.lane.ours .eq { border-color: var(--pa-light); }
.tks { display: flex; flex-wrap: wrap; gap: 6px; }
.tk { font: 600 11.5px/1 var(--sans); padding: 6px 9px 6px 7px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tk::before { font-weight: 800; font-size: 12px; }
.tk.y { background: #e3f4ec; color: #14694f; } .tk.y::before { content: "✓"; }
.tk.n { background: #fbe9e2; color: #9a3b1c; } .tk.n::before { content: "✕"; }
.lane-s { min-width: 0; }
.pipe { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.arr { color: #b3ab9c; font-size: 17px; flex: none; }
.pin, .pout { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; }
.pout { flex: 1 1 auto; min-width: 0; align-items: stretch; }
.pipe > .arr { margin: 0 -1px; }
.pipe small { font: 500 10px/1.3 var(--mono); color: var(--mute); text-align: center; }
.thumb { display: block; flex: none; width: 88px; height: 88px; border-radius: 9px; background: #ddd center / 200% 100% no-repeat; background-position: left center; border: 1px solid var(--line); transition: opacity .25s; }
.api { flex: none; font: 500 10.5px/1.5 var(--mono); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--ink-2); }
.mbox, .rbox { flex: none; border-radius: 10px; padding: 10px 11px; font-weight: 700; font-size: 13.5px; text-align: center; line-height: 1.25; transition: box-shadow .3s, background .3s, transform .3s; }
.mbox { background: #fff; border: 1.5px solid #cfc7b8; min-width: 84px; font-size: 16px; padding: 14px 12px; }
.mbox small, .rbox small { display: block; font: 500 10px/1.3 var(--mono); color: var(--mute); padding-top: 4px; font-weight: 500; }
.mbox.on { box-shadow: 0 0 0 4px rgba(185, 119, 57, .18); border-color: var(--oft); }
.rbox { background: var(--cream-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; min-width: 96px; }
.arm { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1.5px solid #cfc7b8; display: grid; place-items: center; color: var(--ink-2); transition: background .3s, border-color .3s, color .3s, transform .3s; }
.arm svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.arm.on { background: #e3f4ec; border-color: #62b997; color: #14694f; transform: scale(1.1) rotate(-6deg); }
.rbox.on { background: #e3f4ec; border-color: #9bd3bd; color: #14694f; transform: scale(1.03); }
.rbox.on small { color: #14694f; }
.chunk { display: flex; gap: 5px; justify-content: center; }
.chunk b { font: 400 15px/1 "STIX Two Math", "Cambria Math", Georgia, serif; min-width: 46px; padding: 16px 7px; white-space: nowrap; text-align: center; border: 1px solid var(--oft-light); border-radius: 8px; background: #fff; color: #7c4d1c; opacity: .28; transition: opacity .25s, background .25s, transform .25s; }
.chunk b.on { opacity: 1; background: var(--oft-soft); transform: translateY(-2px); }
.prog { flex: 0 1 auto; margin: 0; font: 500 10.5px/1.6 var(--mono); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; white-space: pre; overflow: hidden; min-height: 5.4em; }
.prog span { display: block; opacity: 0; border-radius: 4px; padding: 0 3px; margin: 0 -3px; transition: opacity .3s, background .3s; }
.prog span.typed { opacity: 1; }
.prog span.run { background: #fde9a8; }
.conv { position: relative; flex: 1 1 auto; min-width: 0; height: 116px; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 26px, #000 calc(100% - 10px), transparent); mask-image: linear-gradient(to right, transparent, #000 26px, #000 calc(100% - 10px), transparent); }
.conv-track { position: absolute; left: 0; top: 4px; display: flex; gap: 20px; width: max-content; will-change: transform; transition: transform .7s cubic-bezier(.45, 0, .2, 1); }
.ci { position: relative; flex: none; width: 90px; display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: .55; transition: opacity .35s, transform .35s; }
.ci:not(:last-child)::after { content: "→"; position: absolute; right: -17px; top: 32px; font-size: 14px; color: #b3a9cf; }
.ci.fut { opacity: 0; visibility: hidden; transform: translateX(14px); }
.ci.cur { opacity: 1; }
.ci.cur .cb { box-shadow: 0 0 0 3px var(--pa); }
.cb { width: 90px; height: 84px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--pa-light); transition: box-shadow .3s; }
.ci.o .cb { background: #ddd left center / 200% 100% no-repeat; border-color: #d9d3c6; }
.ci.r .cb { background: var(--pa-soft); padding: 7px 8px; font-size: 9.5px; line-height: 1.32; color: #3a2a78; }
.ci.a .cb { background: var(--night); color: #e9e6ff; border-color: var(--night); padding: 7px 8px; font: 500 9.5px/1.42 var(--mono); white-space: pre; }
.ci.a .cb .k { color: #ffd43b; } .ci.a .cb .n { color: #8fe3b6; } .ci.a .cb .d { color: #9a97c9; }
.ci.i .cb { background: #fff; border-color: #d9d3c6; padding: 8px; font-size: 10px; line-height: 1.32; color: var(--ink-2); }
.ci em { font: 400 13px/1 "STIX Two Math", "Cambria Math", Georgia, serif; color: var(--mute); }
.ci em sub { font-size: .7em; line-height: 0; }
.lane-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; font-size: 12px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 6px; } .lg > i:first-child { width: 12px; height: 12px; border-radius: 3px; display: block; }
.lg i:not(:first-child) { font-family: "STIX Two Math", "Cambria Math", Georgia, serif; font-size: 15px; }
.lg-o { background: #cfc9bb; } .lg-r { background: var(--pa-light); } .lg-a { background: var(--night); }
.lane-ctl button { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: 600 12.5px var(--sans); cursor: pointer; color: var(--ink); }
.lane-ctl button:hover { border-color: var(--ink); }
table.cmp3 td, table.cmp3 th { white-space: normal; text-align: left; vertical-align: top; line-height: 1.4; }
table.cmp3 td:first-child { width: 22%; } table.cmp3 td.us { background: var(--pa-soft); color: #3a2a78; font-weight: 600; } table.cmp3 th:last-child { color: var(--pa); }
/* between phone and full desktop the label column leaves the pipeline too little room, so stack the label above it */
@media (min-width: 901px) and (max-width: 1220px) {
  .lane { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lane .lane-h { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  .lane .lane-h .tks { margin-left: auto; }
}
@media (max-width: 900px) {
  .lane { grid-template-columns: minmax(0, 1fr); }
  .lane.wide .lane-h { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pipe { flex-wrap: wrap; }
  .conv { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .conv-track, .ci, .chunk b, .prog span, .mbox, .rbox { transition: none; } }
/* compare (VLA vs PA) */
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.cmp-col { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.cmp-col.ours { border-color: var(--pa-mid); background: linear-gradient(180deg, #faf8ff, #fff 60%); }
.cmp-h { font-weight: 750; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pill { font: 600 10.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 5px 8px; }
.pill.vla { background: var(--oft-soft); color: #7c4d1c; } .pill.pa { background: var(--pa-soft); color: #4a3690; }
.flow { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.flow div { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; }
.flow .x { border-color: var(--oft-light); background: var(--oft-soft); }
.flow .y { border-color: var(--pa-light); background: var(--pa-soft); }
.flow .a { border: 0; background: none; padding: 0 0 0 14px; color: var(--mute); font-size: 12px; line-height: 1; }
pre.code { font: 500 12px/1.55 var(--mono); background: var(--night); color: #e9e6ff; border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre; }
pre.code .k { color: #ffd43b; } pre.code .n { color: #8fe3b6; } pre.code .d { color: #9a97c9; } pre.code .t { color: #ff9ecb; }

/* turn explorer */
.tx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); grid-template-areas: "in out" "fb out"; grid-template-rows: auto 1fr; gap: 10px 22px; align-items: start; }
.tx-in { grid-area: in; } .tx-side { grid-area: out; } .tx-fbw { grid-area: fb; min-width: 0; }
.tx .fig-t { padding-bottom: 2px; }
.tx-in { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tx-obs { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; background: #ddd; }
.tx-obs img { width: 100%; aspect-ratio: 2 / 1; display: block; }
.tx-obs-l { position: absolute; left: 8px; bottom: 8px; font: 600 10.5px/1 var(--mono); background: rgba(255, 255, 255, .9); padding: 4px 6px; border-radius: 5px; }
.tx-obs-r { position: absolute; left: calc(50% + 8px); bottom: 8px; font: 600 10.5px/1 var(--mono); background: rgba(255, 255, 255, .9); padding: 4px 6px; border-radius: 5px; }
.tx-steps { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.tx-steps button { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 6px; overflow: hidden; cursor: pointer; background: #cfc9bb 0 50% / 200% 100% no-repeat; opacity: .45; transition: opacity .25s, box-shadow .25s; }
.tx-steps button.done, .tx-steps button:hover { opacity: .85; }
.tx-steps button.on { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.tx-steps button span { position: absolute; left: 0; right: 0; bottom: 0; font: 700 9.5px/1.6 var(--mono); color: #fff; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.tx-ctl { display: flex; gap: 6px; align-items: center; padding-top: 2px; }
.tx-ctl button { border: 1px solid var(--line); background: #fff; border-radius: 999px; min-width: 34px; padding: 6px 12px; font: 600 13px var(--sans); cursor: pointer; color: var(--ink); }
.tx-ctl button:hover { border-color: var(--ink); }
.tx-ctl #tx-play { min-width: 62px; }
.tx-meta { margin-left: auto; font: 500 11px/1.4 var(--mono); color: var(--mute); text-align: right; }
.tx-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.role { font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding-bottom: 5px; display: flex; gap: 8px; align-items: center; }
.role i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--mute)); display: block; }
.bubble { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; line-height: 1.5; background: #fff; }
.bubble.think { background: var(--pa-soft); border-color: var(--pa-light); }
.bubble.fb { background: #eaf6f1; border-color: #bfe3d5; font: 500 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.tx-call { background: var(--night); border-radius: 10px; overflow: hidden; }
.tx-call pre.code { background: none; border-radius: 0; padding-bottom: 8px; }
.tx-traj { padding: 4px 10px 8px; border-top: 1px solid rgba(255, 255, 255, .1); }
.tx-traj svg { display: block; width: 100%; height: auto; }
.tx-traj text { font: 500 9.5px var(--mono); fill: #9a97c9; }
.tx-side.sw > div, .tx-fbw.sw { animation: tx-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.tx-side.sw > div:nth-of-type(2) { animation-delay: .1s; } .tx-fbw.sw { animation-delay: .2s; }
@keyframes tx-in { from { opacity: 0; transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .tx-side.sw > div, .tx-fbw.sw { animation: none; } }
@media (max-width: 900px) { .tx { grid-template-columns: minmax(0, 1fr); grid-template-areas: "in" "out" "fb"; grid-template-rows: none; } }
@media (max-width: 760px) { .tx-call pre.code { font-size: 11px; padding: 10px 10px 6px; } }

/* ICL context strip */
/* Figure 5: what goes into the first turn */
.cx-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 14px; }
.cx-tog { margin-left: auto; display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); }
.cx-tog button { border: 0; background: none; border-radius: 999px; padding: 6px 13px; font: 600 12.5px/1.2 var(--sans); color: var(--ink-2); cursor: pointer; display: flex; align-items: baseline; gap: 7px; transition: background .25s, color .25s; }
.cx-tog button, .cx-tog button small { white-space: nowrap; }
.cx-tog button small { font: 500 10.5px/1 var(--mono); color: var(--mute); transition: color .25s; }
.cx-tog button.on { background: var(--ink); color: #fff; }
.cx-tog button.on small { color: rgba(255, 255, 255, .7); }
.cx { display: flex; align-items: stretch; gap: 8px; }
.cx-b { flex: none; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; line-height: 1.35; }
.cx-b > small { font: 700 10px/1.25 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); min-height: 12.5px; }
.cx-b.sys { width: 13%; }
.cx-b.cur { width: 19%; }
.cx-b.me { width: 15%; border-color: var(--pa-mid); background: var(--pa-soft); }
.cx-b.me > small { color: var(--pa); }
.cx-b.demo { flex: 1 1 0; border-color: #bcd9ea; background: #f2f8fc; transition: background .4s, border-color .4s; }
.cx-b.demo > small { color: #2c6f95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-b.demo > small .n { display: none; color: var(--mute); }
.cx-pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cx-p { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cx img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 7px; display: block; background: #ddd; }
.cx-chip { font: 600 10.5px/1.3 var(--mono); border-radius: 7px; padding: 5px 7px; border: 1px solid var(--line); background: var(--cream); color: var(--ink-2); }
.cx-chip em { display: block; font-style: normal; font-weight: 500; opacity: .7; }
.cx-chip.a { background: var(--ink); border-color: var(--ink); color: #fff; }
.cx-chip.r { background: #fff; border-color: var(--pa-light); color: #3a2a78; }
.cx-chip.q { background: #fff; font: 500 12px/1.35 var(--sans); color: var(--ink); }
.cx-lines { display: flex; flex-direction: column; gap: 5px; padding: 2px 0; }
.cx-lines i { height: 5px; border-radius: 3px; background: #e6e1d6; }
.cx-lines i:nth-child(2) { width: 82%; } .cx-lines i:nth-child(3) { width: 56%; }
.cx-ar { align-self: center; flex: none; color: var(--mute); font-size: 16px; }
.cx-p > * { transition: opacity .35s, transform .5s cubic-bezier(.3, 1.4, .5, 1); transition-delay: calc(var(--i) * 150ms + var(--j, 0) * 75ms); }
.cx-p > span { --j: 1; }
#cxf[data-m="0"] .cx-b.demo { background: none; border-style: dashed; border-color: #d9d3c6; }
#cxf[data-m="0"] .cx-b.demo > small .y { display: none; }
#cxf[data-m="0"] .cx-b.demo > small .n { display: inline; }
#cxf[data-m="0"] .cx-p > * { opacity: 0; transform: translateY(8px) scale(.94); transition-delay: 0s; }
@media (max-width: 760px) {
  .cx { flex-direction: column; }
  .cx-b.sys, .cx-b.cur, .cx-b.me { width: auto; }
  .cx-b.sys { flex-direction: row; flex-wrap: wrap; align-items: center; } .cx-b.sys > small { width: 100%; } .cx-lines { flex: 1; }
  .cx-b.cur { flex-direction: row; flex-wrap: wrap; align-items: center; } .cx-b.cur > small { width: 100%; } .cx-b.cur img { width: 46%; } .cx-b.cur .cx-chip { flex: 1; }
  .cx-b.me { flex-direction: row; flex-wrap: wrap; align-items: stretch; } .cx-b.me > small { width: 100%; } .cx-b.me .cx-chip { flex: 1; }
  .cx-b.demo > small { white-space: normal; }
  .cx-ar { transform: rotate(90deg); }
  .cx-tog { margin-left: 0; width: 100%; }
  .cx-tog button { flex: 1; flex-direction: column; align-items: center; gap: 3px; padding: 7px 8px; }
}
@media (prefers-reduced-motion: reduce) { .cx-p > * { transition: none; } }
/* Figure 6: in-context demonstrations, grouped by model on a shared 0-60 scale */
.g6 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding-top: 12px; }
.g6-h { font-size: 14.5px; font-weight: 700; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; padding-bottom: 34px; }
.g6-h small { font: 500 11px/1.3 var(--mono); color: var(--mute); }
.g6-plot { position: relative; height: 190px; margin: 0 0 66px 24px; display: flex; gap: 20px; padding: 0 6px; border-bottom: 1px solid #c9c3b6; }
.g6-plot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--grid), var(--grid)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--grid), var(--grid)) 0 33.333% / 100% 1px no-repeat, linear-gradient(var(--grid), var(--grid)) 0 66.667% / 100% 1px no-repeat; pointer-events: none; }
.g6-y { position: absolute; inset: 0; pointer-events: none; }
.g6-y span { position: absolute; right: calc(100% + 7px); bottom: calc(var(--t) / var(--max, 60) * 100%); transform: translateY(50%); font: 500 10.5px/1 var(--mono); color: var(--mute); }
.g6-g { --c: var(--pa); flex: 1; min-width: 0; height: 100%; position: relative; display: flex; align-items: flex-end; gap: 4px; }
.g6-g.oft { --c: var(--oft); }
.g6-g::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(var(--b) / var(--max, 60) * 100%); border-top: 1.5px dashed var(--c); opacity: .55; pointer-events: none; z-index: 0; }
.g6-g > p { position: absolute; left: 0; right: 0; top: calc(100% + 42px); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; }
.g6-g > p i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.g6-c { flex: 1; min-width: 0; height: 100%; position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.g6-c > span { position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); width: max-content; text-align: center; font-size: 10.5px; line-height: 1.2; color: var(--ink-2); }
.g6-bar { width: min(26px, 60%); height: calc(var(--v) / var(--max, 60) * 100%); min-height: 2px; background: var(--c); border-radius: 4px 4px 0 0; position: relative; transform-origin: bottom; transform: scaleY(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1), background .2s; transition-delay: calc(var(--i, 0) * 70ms), 0s; }
.fig.reveal.in .g6-bar { transform: none; }
.g6-bar b { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); font: 700 12px/1 var(--mono); color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .4s .75s; background: #fff; padding: 2px 3px 1px; border-radius: 3px; }
.g6-bar em { position: absolute; left: 50%; bottom: calc(100% + 21px); transform: translateX(-50%); font: 700 10.5px/1 var(--mono); font-style: normal; color: #0f6e53; background: #e2f3ed; border-radius: 999px; padding: 3px 6px; white-space: nowrap; opacity: 0; transition: opacity .4s .95s; }
.fig.reveal.in .g6-bar b, .fig.reveal.in .g6-bar em { opacity: 1; }
.g6-c:hover .g6-bar, .g6-c:focus-visible .g6-bar { background: color-mix(in srgb, var(--c) 82%, #fff); }
.g6-c:hover::after, .g6-c:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 6; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; font: 600 11px/1 var(--mono); color: #fff; background: var(--ink); border-radius: 7px; padding: 6px 9px; pointer-events: none; }
.g6-c:focus-visible { box-shadow: 0 0 0 2px var(--pa-mid); border-radius: 6px; }
@media (max-width: 760px) { .g6 { grid-template-columns: minmax(0, 1fr); gap: 22px; } .g6-plot { gap: 12px; padding: 0 2px; } .g6-c > span { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { .g6-bar, .g6-bar b, .g6-bar em { transition: none; } }
/* Figure 3: the same bars on a 0-100 scale, with one scene per condition underneath */
.g3-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 32px; }
.g3-top .legend { margin-left: auto; padding: 0; }
.g3-plot { margin-bottom: 14px; }
.g3-plot::before { background: repeating-linear-gradient(to bottom, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 25%); }
.g3-g { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.g3-g .g6-c { flex: 0 0 44px; }
.g6-bar em.z { color: var(--ink-2); background: var(--cream-2); }
.g3-cards { margin-left: 24px; padding: 0 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.g3-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: center; }
.g3-card b { font-size: 13.5px; font-weight: 700; padding-top: 7px; }
.g3-card small { font: 500 10.5px/1.35 var(--mono); color: var(--mute); }
.g3-img { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px solid var(--line); background: #ddd 0 58% / 200% auto no-repeat; overflow: hidden; }
.g3-img span { position: absolute; left: 7px; bottom: 7px; max-width: calc(100% - 14px); font: 600 11.5px/1.3 var(--sans); color: var(--ink); background: rgba(255, 255, 255, .94); border-radius: 8px; padding: 5px 8px; text-align: left; box-shadow: 0 3px 10px -5px rgba(0, 0, 0, .5); }
.g3-img mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 2px; }
@media (max-width: 760px) { .g3-cards { gap: 12px; padding: 0 2px; } .g3-img span { display: none; } .g3-g .g6-c { flex-basis: 34px; } .g3-card b { font-size: 12px; line-height: 1.25; } }
/* per-suite table */
table.t3 th { white-space: normal; }
table.t3 tr.sub th { font: 600 12px/1.25 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
table.t3 tr.sub th:first-child { font: 600 11.5px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
table.t3 th[colspan] { text-align: center; }
table.t3 .us { background: var(--pa-soft); }
table.t3 tr.sub th.us { color: var(--pa); }
table.t3 tr.avg td { border-top: 1.5px solid #c9c3b6; font-weight: 650; }
table.t3 tr.ref td[colspan] { text-align: center; }
table.t3 .s { display: none; }
@media (max-width: 760px) { table.t3 { font-size: 12px; } table.t3 th, table.t3 td { padding: 8px 4px; } table.t3 td:first-child, table.t3 th:first-child { padding-left: 2px; } table.t3 tr.sub th { font-size: 11px; } table.t3 .l { display: none; } table.t3 .s { display: inline; } table.t3 tr:first-child th { font-size: 10px; } table.t3 tr.grp td { white-space: normal; } }
/* Figure 7 */
.cases { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.case { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.case-h { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.case-h small { display: block; font: 500 11.5px/1.4 var(--mono); color: var(--mute); font-weight: 500; }
.case-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shot { position: relative; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.shot img { width: 100%; aspect-ratio: 2 / 1; }
.shot span { position: absolute; left: 6px; top: 6px; font: 700 10.5px/1 var(--mono); padding: 5px 7px; border-radius: 999px; color: #fff; background: var(--bad); }
.shot span.ok { background: var(--good); }
.case p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
#f7 .shot span { background: rgba(255, 255, 255, .93); color: var(--ink); box-shadow: 0 3px 10px -5px rgba(0, 0, 0, .55); }
#f7 .case-pair > div { min-width: 0; }
.sc { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; padding-top: 8px; }
.sc .tri { display: inline-flex; gap: 3px; }
.sc .tri i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #a9aeb7; }
.sc .tri i.y { background: var(--good); box-shadow: none; }
.sc b { font: 700 12px/1 var(--mono); color: var(--ink); }
.sc em { font-style: normal; flex-basis: 100%; }

/* recovery strip */
/* Figure 9: recovery viewer */
.rv-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 14px; }
.rv-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-tabs button, .rv-re { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: 600 13px var(--sans); cursor: pointer; color: var(--ink); }
.rv-tabs button:hover, .rv-re:hover { border-color: var(--ink); }
.rv-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rv-re { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.rv { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.rv-l { min-width: 0; }
.rv-view { position: relative; aspect-ratio: 709 / 454; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #cfc9bb; }
.rv-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.rv-view img.was { opacity: 1; z-index: 1; }
.rv-view img.on { opacity: 1; z-index: 2; transition: opacity .6s ease; }
.rv-chip { position: absolute; z-index: 4; left: 10px; top: 10px; display: flex; align-items: center; gap: 7px; font: 700 11.5px/1 var(--mono); letter-spacing: .02em; color: var(--ink); background: rgba(255, 255, 255, .93); border-radius: 999px; padding: 4px 10px 4px 4px; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .5); }
.rv-chip b { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 10.5px; }
.rv-box { position: absolute; z-index: 3; --c: #ffb468; --l: 13px; --w: 3px; opacity: 0; transform: scale(1.4); transition: opacity .2s, transform .2s; pointer-events: none; filter: drop-shadow(0 0 1.5px rgba(20, 24, 30, .95));
  background: linear-gradient(var(--c) 0 0) left top / var(--l) var(--w) no-repeat, linear-gradient(var(--c) 0 0) left top / var(--w) var(--l) no-repeat, linear-gradient(var(--c) 0 0) right top / var(--l) var(--w) no-repeat, linear-gradient(var(--c) 0 0) right top / var(--w) var(--l) no-repeat, linear-gradient(var(--c) 0 0) left bottom / var(--l) var(--w) no-repeat, linear-gradient(var(--c) 0 0) left bottom / var(--w) var(--l) no-repeat, linear-gradient(var(--c) 0 0) right bottom / var(--l) var(--w) no-repeat, linear-gradient(var(--c) 0 0) right bottom / var(--w) var(--l) no-repeat; }
.rv-box.ok { --c: #79e0c8; }
.rv-box.show { opacity: 1; transform: none; transition: opacity .25s .35s, transform .5s cubic-bezier(.2, 1.5, .4, 1) .35s; }
.rv-box::after { content: attr(data-t); position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); white-space: nowrap; font: 700 10.5px/1 var(--mono); color: #fff; background: var(--bad); border-radius: 999px; padding: 5px 8px; }
.rv-box.ok::after { background: var(--good); }
.rv-box.low::after { bottom: auto; top: calc(100% + 7px); }
.rv-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 8px; }
.rv-strip button { position: relative; aspect-ratio: 709 / 454; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #cfc9bb; }
.rv-strip img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .5; transition: opacity .3s; }
.rv-strip button.on img, .rv-strip button.done img, .rv-strip button:hover img { opacity: 1; }
.rv-strip button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.rv-strip b { position: absolute; left: 5px; top: 5px; width: 17px; height: 17px; border-radius: 50%; background: rgba(255, 255, 255, .93); color: var(--ink); display: grid; place-items: center; font: 700 10px/1 var(--mono); }
.rv-strip i { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .4); opacity: 0; }
.rv-strip i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
#rcv.play .rv-strip button.on i { opacity: 1; }
#rcv.play .rv-strip button.on i::after { animation: rv-fill var(--d, 3s) linear both; }
@keyframes rv-fill { to { transform: none; } }
.rv-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; min-width: 0; }
.rv-steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; cursor: pointer; transition: opacity .35s; }
.rv-steps li:last-child { padding-bottom: 0; }
.rv-steps li:not(:last-child) { flex: 1 1 auto; }
.rv-steps li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--line); transition: background .35s; }
.rv-steps li.done:not(:last-child)::before { background: var(--ink); }
.rv-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12.5px/1 var(--mono); color: var(--ink-2); background: #fff; border: 2px solid #d9d3c6; transition: background .3s, border-color .3s, color .3s, transform .3s; }
.rv-steps li.on .rv-num, .rv-steps li.done .rv-num { background: var(--ink); border-color: var(--ink); color: #fff; }
.rv-steps li.bad.on .rv-num, .rv-steps li.bad.done .rv-num { background: var(--bad); border-color: var(--bad); }
.rv-steps li.ok.on .rv-num { background: var(--good); border-color: var(--good); }
.rv-steps li.on .rv-num { transform: scale(1.12); }
.rv-h { display: flex; align-items: baseline; gap: 9px; line-height: 28px; }
.rv-h b { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.rv-h small { font: 500 11px/1 var(--mono); color: var(--mute); }
.rv-tx { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.rv-tx.q { margin-top: 3px; color: var(--ink); background: var(--pa-soft); border: 1px solid var(--pa-light); border-radius: 4px 12px 12px 12px; padding: 9px 12px; transition: box-shadow .3s; }
.rv-steps li.on .rv-tx.q { box-shadow: 0 0 0 2px var(--pa-mid); }
#rcv.play .rv-steps li:not(.on):not(.done) { opacity: .32; }
.rv-n { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--cream); }
.un { padding: 15px 22px 16px; } .un + .un { border-left: 1px solid var(--line); }
.un-t { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); } .un-t b { color: var(--ink); font-weight: 700; }
.un-g { display: flex; flex-wrap: wrap; gap: 12px 22px; padding-top: 12px; }
.un-g > div { display: flex; flex-direction: column; gap: 6px; }
.dots { display: flex; gap: 4px; height: 12px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.dots.hollow i { background: none; box-shadow: inset 0 0 0 2px var(--c); }
.fig.reveal .dots i { transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(.25s + var(--k) * 45ms); }
.fig.reveal.in .dots i { transform: none; }
.un small { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); white-space: nowrap; } .un small b { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) { .rv { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (max-width: 760px) { .rv-n { grid-template-columns: minmax(0, 1fr); } .un + .un { border-left: 0; border-top: 1px solid var(--line); } .un { padding: 14px; } .rv-re { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .rv-view img.on, .rv-box, .rv-box.show, .fig.reveal .dots i { transition: none; } .fig.reveal .dots i { transform: none; } }
/* limitations and future directions */
.nx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nx > div { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px 18px 16px; display: flex; flex-direction: column; gap: 5px; }
.nx small { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.nx > div > b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.nx dl { margin: 6px 0 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 10px; font-size: 14.5px; line-height: 1.45; }
.nx dt { font: 700 10.5px/2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.nx dt.n { color: var(--pa); }
.nx dd { margin: 0; color: var(--ink-2); }
.nx dd.n { color: var(--ink); font-weight: 600; }
.nx dd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.nx dd li { font-weight: 400; color: var(--ink-2); }
.nx dd li b { font-weight: 650; color: var(--ink); }
@media (max-width: 760px) { .nx { grid-template-columns: minmax(0, 1fr); } }

.collab { display: flex; gap: 18px; align-items: center; border: 1px solid #f0d77a; background: var(--egg-soft); border-radius: 16px; padding: 18px 20px; max-width: 780px; }
.collab svg { width: 84px; height: 97px; flex: none; }
.collab p { font-size: 16.5px; line-height: 1.55; }
.collab-c { padding-top: 8px; font-family: var(--mono); font-size: 13.5px !important; color: var(--ink-2); }
@media (max-width: 760px) { .collab { flex-direction: column; align-items: flex-start; } }
pre.bib { font: 500 12.5px/1.6 var(--mono); background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; position: relative; }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12.5px var(--sans); cursor: pointer; align-self: flex-start; }
.copy:hover { border-color: var(--ink); }

footer { border-top: 1px solid var(--line); background: var(--cream); padding: 30px 20px 40px; text-align: center; font-size: 13.5px; color: var(--mute); display: flex; flex-direction: column; align-items: center; gap: 10px; }
footer svg { width: 54px; height: 62px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 1180px) { .ov-pip { top: 16px; bottom: auto; } }
@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .hl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars, .pillars.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top nav { gap: 14px; white-space: nowrap; }
  .top nav a:first-child { display: none; }
  .brand { white-space: nowrap; }
  .stage { aspect-ratio: 4 / 3.4; border-radius: 14px; }
  .ov-pip { width: 38%; right: 10px; top: 10px; bottom: auto; padding: 4px; }
  .ov-cap { display: none; }
  .ov-phase { left: 10px; top: 10px; font-size: 10px; padding: 7px 9px; }
  .ov-sub { bottom: 46px; left: 8px; width: calc(100% - 16px); padding: 9px 12px; }
  .sub-r { font-size: 12.5px; height: 2.84em; -webkit-line-clamp: 2; }
  .sub-c { font-size: 10px; }
  .ov-bar { left: 8px; right: 8px; bottom: 6px; }
  .ov-done span { display: none; }
  .two, .two.wide-l, .cmp, .tx, .cases, .rc { grid-template-columns: minmax(0, 1fr); }
  .hrow, .haxis { grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
  .hl-n { font-size: 28px; }
  .fig-b { padding: 16px 14px; }
  figcaption { padding: 10px 14px 14px; }
  .tx-steps { grid-template-columns: repeat(6, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar, .hfill, .reveal { transition: none; transform: none; opacity: 1; }
  .bar b { opacity: 1; transition: none; }
  .stage-load svg, .scroll-hint svg, .egg-say.pop, .egg-fig * { animation: none !important; }
  .egg-fig .g-fx { opacity: 1; }
}
@media (max-width: 560px) { .top nav { font-size: 13.5px; } .top nav a:nth-child(2) { display: none; } }
@media (max-width: 380px) { .top nav { font-size: 13px; gap: 10px; } }
@media (max-width: 760px) { pre.bib { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11.5px; } }
