:root {
  --bg: #060709;
  --bg-2: #0a0c10;
  --surface: rgba(255, 255, 255, .025);
  --surface-strong: rgba(255, 255, 255, .045);
  --line: rgba(236, 228, 214, .08);
  --line-strong: rgba(236, 228, 214, .16);
  --fg: #f2ede4;
  --fg-soft: #c9c3b8;
  --muted: #8a867f;
  --faint: #55524d;
  --light: #f4d7a8;
  --light-hot: #ffe9c7;
  --light-glow: rgba(244, 215, 168, .35);
  --night: #7fa3c9;
  --night-glow: rgba(127, 163, 201, .25);
  --warn: #e8a38f;
  --radius: 20px;
  --radius-small: 12px;
  --font: 'Mona Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Mona Sans', ui-sans-serif, system-ui, sans-serif;
  --font-accent: 'Boska', 'Times New Roman', serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --compare-position: 50%;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); }
button, select, input { font: inherit; }
button { color: inherit; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--light); color: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); font-size: 11px; }

/* ---------- atmosphere ---------- */
.grain { position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); }
.aurora span:first-child { top: -32vh; left: 50%; width: 80vw; height: 60vh; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(244, 215, 168, .16), transparent); animation: breathe 9s ease-in-out infinite; }
.aurora span:last-child { bottom: -30vh; left: -10vw; width: 60vw; height: 60vh; background: radial-gradient(closest-side, rgba(127, 163, 201, .08), transparent); }
@keyframes breathe { 50% { opacity: .65; transform: translateX(-50%) scale(1.08); } }

.app-shell { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 0 40px 32px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 76px; margin: 0 -40px; padding: 0 40px; background: linear-gradient(rgba(6, 7, 9, .82) 30%, rgba(6, 7, 9, 0)); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.brand-mark { position: relative; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--light-hot), var(--light) 35%, #8a6a3c 75%, #2a2015); box-shadow: 0 0 24px var(--light-glow); }
.brand-word { font: 400 26px/1 var(--font-display); letter-spacing: -.01em; }
.main-nav { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: rgba(14, 15, 18, .7); backdrop-filter: blur(16px); }
.nav-tab { padding: 9px 18px; border: 0; border-radius: 99px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 500; transition: color .25s, background .25s; }
.nav-tab:hover { color: var(--fg); }
.nav-tab.is-active { color: var(--bg); background: var(--fg); }
.health { justify-self: end; display: flex; align-items: center; gap: 10px; color: var(--muted); font: 500 11px var(--font-mono); letter-spacing: .04em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--light); box-shadow: 0 0 10px var(--light); }
.health.is-ready .status-dot { background: #9be3b8; box-shadow: 0 0 10px #9be3b8; animation: pulse 2.4s ease-in-out infinite; }
.health.is-offline .status-dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
@keyframes pulse { 50% { opacity: .4; } }
.mock-badge, .count-pill { padding: 4px 9px; border: 1px solid rgba(244, 215, 168, .3); border-radius: 99px; color: var(--light); background: rgba(244, 215, 168, .06); font: 500 10px var(--font-mono); letter-spacing: .08em; }

/* ---------- type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--light); font: 500 11px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.eyebrow-line { width: 28px; height: 1px; background: currentColor; opacity: .6; }
.label { display: block; margin-bottom: 12px; color: var(--muted); font: 500 10px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-weight: 400; }
em { font-style: italic; }

/* ---------- flashlight hero ---------- */
.page-heading h1, .rh-copy h1 { margin: 22px 0 18px; font: 400 clamp(48px, 7.4vw, 108px)/.92 var(--font-display); letter-spacing: -.035em; }
.page-heading h1 em, .rh-copy h1 em, .console-heading h2 em { color: var(--light); text-shadow: 0 0 60px var(--light-glow); }
.page-heading p, .rh-copy p { max-width: 560px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }

.reveal-hero { --x: 50%; --y: 50%; --r: 0px; --hero-progress: 0; position: relative; height: 100svh; min-height: 620px; margin: -76px calc(50% - 50vw) 0; overflow: hidden; background: #000; cursor: none; isolation: isolate; }
.rh-media { position: absolute; inset: 0; transform: scale(calc(1.04 + var(--hero-progress) * .08)); transform-origin: 50% 40%; will-change: transform; }
.rh-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rh-dark { filter: saturate(.85); }
.rh-lit { -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0%, #000 38%, rgba(0, 0, 0, .55) 62%, transparent 100%); mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0%, #000 38%, rgba(0, 0, 0, .55) 62%, transparent 100%); }
.rh-media img:not([src]), .reveal-hero.is-pending .rh-lit { visibility: hidden; }
.rh-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle calc(var(--r) * 1.15) at var(--x) var(--y), rgba(255, 233, 199, .16), rgba(244, 215, 168, .05) 45%, transparent 70%); mix-blend-mode: screen; }
.rh-glow::after { position: absolute; top: var(--y); left: var(--x); width: 8px; height: 8px; border-radius: 50%; background: var(--light-hot); box-shadow: 0 0 18px 4px var(--light), 0 0 60px 10px var(--light-glow); transform: translate(-50%, -50%); content: ''; transition: opacity .4s; }
.reveal-hero.is-flooded .rh-glow::after { opacity: 0; }
.rh-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 7, 9, .7) 0%, transparent 22%, transparent 48%, rgba(6, 7, 9, .55) 72%, var(--bg) 100%), radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(6, 7, 9, .55)); }
.rh-copy { position: absolute; left: max(40px, calc(50vw - 680px)); right: 40px; bottom: 120px; z-index: 2; max-width: 980px; pointer-events: none; opacity: calc(1 - var(--hero-progress) * 1.6); transform: translateY(calc(var(--hero-progress) * -60px)); }
.rh-copy > * { animation: rise 1.2s var(--ease) both; }
.rh-copy > :nth-child(2) { animation-delay: .1s; }
.rh-copy > :nth-child(3) { animation-delay: .2s; }
.rh-copy h1 { text-shadow: 0 4px 40px rgba(0, 0, 0, .6); }
.rh-copy p { color: var(--fg-soft); text-shadow: 0 2px 20px rgba(0, 0, 0, .8); }
.rh-hint { position: absolute; top: 96px; left: 50%; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; background: rgba(6, 7, 9, .45); backdrop-filter: blur(12px); color: var(--fg-soft); font-size: 11px; letter-spacing: .08em; transform: translateX(-50%); animation: rise 1s .6s var(--ease) both; pointer-events: none; }
.rh-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--light); box-shadow: 0 0 10px var(--light); animation: pulse 1.6s ease-in-out infinite; }
.rh-meta { position: absolute; right: max(40px, calc(50vw - 680px)); bottom: 128px; z-index: 2; max-width: 300px; color: var(--muted); font-size: 11px; line-height: 1.7; letter-spacing: .04em; text-align: right; pointer-events: none; opacity: calc(1 - var(--hero-progress) * 1.6); }
.rh-meta strong { display: block; color: var(--fg-soft); font-weight: 500; }
.rh-cta { position: absolute; left: 50%; bottom: 36px; z-index: 3; display: flex; align-items: center; gap: 14px; padding: 13px 22px; border: 1px solid rgba(244, 215, 168, .4); border-radius: 99px; background: rgba(6, 7, 9, .4); backdrop-filter: blur(12px); color: var(--light); font-size: 14px; font-weight: 500; text-decoration: none; transform: translateX(-50%); cursor: pointer; transition: background .3s, color .3s, box-shadow .3s; }
.rh-cta:hover { color: var(--bg); background: var(--light); box-shadow: 0 0 40px var(--light-glow); }
.rh-arrow { display: inline-block; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

.console-heading { padding: 96px 0 32px; }
.console-heading h2 { margin: 18px 0 0; font: 400 clamp(40px, 5vw, 72px)/1 var(--font-display); letter-spacing: -.03em; }

[data-reveal] { opacity: 0; transform: translateY(48px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- console ---------- */
.console { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.stage-col { min-width: 0; }

.viewer { --ar: 16 / 10; position: relative; width: 100%; aspect-ratio: var(--ar); max-height: 74vh; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(ellipse at 50% 40%, #12141a, #07080a 70%); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04); isolation: isolate; user-select: none; touch-action: pan-y; transition: box-shadow .8s var(--ease); }
.viewer:not([data-state="empty"]) { width: min(100%, calc(74vh * var(--ar-num, 1.6)), var(--source-width, 100%)); max-height: min(74vh, var(--source-height, 74vh)); }
.viewer[data-state="done"] { cursor: ew-resize; box-shadow: 0 50px 140px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(244, 215, 168, .08), 0 0 120px -60px var(--light-glow); }
.v-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.v-layer:not([src]), .v-layer[src=""] { visibility: hidden; }
.v-before { z-index: 3; clip-path: inset(0 calc(100% - var(--compare-position)) 0 0); }
.v-overlay { z-index: 2; opacity: .88; mix-blend-mode: screen; animation: fade .5s var(--ease); }
.v-after { z-index: 1; }
.v-after.is-flash { animation: develop .5s var(--ease); }
@keyframes develop { from { opacity: .35; filter: brightness(1.6) blur(4px); } }
@keyframes fade { from { opacity: 0; } }

.viewer[data-state="empty"] .v-layer, .viewer[data-state="empty"] .v-tag { display: none; }
.viewer[data-state="loaded"] .v-before { clip-path: none; filter: brightness(.95); }
.viewer[data-state="loaded"] .v-after, .viewer[data-state="loaded"] .v-tag-after, .viewer[data-state="running"] .v-before { display: none; }
.viewer[data-state="loaded"] .v-tag-before { opacity: 1; }
.viewer:not([data-state="empty"]):not([data-state="loaded"]) .dropzone { display: none; }
.viewer[data-state="loaded"] .dropzone { opacity: 0; }
.viewer[data-state="loaded"] .dropzone:hover, .viewer[data-state="loaded"] .dropzone.is-dragging { opacity: 1; background: rgba(6, 7, 9, .72); backdrop-filter: blur(6px); }

.v-tag { position: absolute; top: 16px; z-index: 5; padding: 6px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; background: rgba(6, 7, 9, .55); backdrop-filter: blur(10px); color: var(--fg-soft); font: 500 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; opacity: 0; transition: opacity .4s; }
.v-tag-before { left: 16px; }
.v-tag-after { right: 16px; color: var(--light); }
.viewer[data-state="done"] .v-tag { opacity: 1; }

.v-handle { position: absolute; top: 0; bottom: 0; left: var(--compare-position); z-index: 6; width: 0; display: none; }
.v-handle::before { position: absolute; top: 0; bottom: 0; left: -.5px; width: 1px; background: linear-gradient(transparent, var(--light-hot) 15%, var(--light-hot) 85%, transparent); box-shadow: 0 0 18px var(--light); content: ''; }
.v-handle span { position: absolute; top: 50%; left: 0; width: 46px; height: 46px; border: 1px solid rgba(255, 233, 199, .7); border-radius: 50%; background: rgba(6, 7, 9, .45); backdrop-filter: blur(10px); box-shadow: 0 0 30px var(--light-glow); transform: translate(-50%, -50%); transition: transform .3s var(--ease); }
.v-handle span::before, .v-handle span::after { position: absolute; top: 50%; width: 6px; height: 6px; border: solid var(--light-hot); border-width: 0 0 1.5px 1.5px; content: ''; }
.v-handle span::before { left: 12px; transform: translateY(-50%) rotate(45deg); }
.v-handle span::after { right: 12px; transform: translateY(-50%) rotate(-135deg); }
.viewer[data-state="done"] .v-handle { display: block; }

.v-modes { position: absolute; left: 50%; bottom: 16px; z-index: 9; display: none; gap: 2px; padding: 4px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; background: rgba(6, 7, 9, .55); backdrop-filter: blur(12px); transform: translateX(-50%); }
.viewer[data-state="done"] .v-modes { display: flex; }
.v-modes button { padding: 7px 14px; border: 0; border-radius: 99px; color: var(--fg-soft); background: transparent; font: 500 11px var(--font-mono); letter-spacing: .06em; }
.v-modes button.is-active { color: var(--bg); background: var(--light); }
.viewer[data-view="flashlight"][data-state="done"] { cursor: none; }
.viewer[data-view="flashlight"][data-state="done"] .v-before { clip-path: none; }
.viewer[data-view="flashlight"][data-state="done"] .v-after { z-index: 4; -webkit-mask-image: radial-gradient(circle var(--r, 120px) at var(--x, 50%) var(--y, 50%), #000 0%, #000 40%, transparent 100%); mask-image: radial-gradient(circle var(--r, 120px) at var(--x, 50%) var(--y, 50%), #000 0%, #000 40%, transparent 100%); }
.viewer[data-view="flashlight"][data-state="done"] .v-handle, .viewer[data-view="flashlight"][data-state="done"] .v-tag-before { display: none; }
.viewer[data-view="flashlight"][data-state="done"] .v-scan { display: block; background: radial-gradient(circle calc(var(--r, 120px) * 1.1) at var(--x, 50%) var(--y, 50%), rgba(255, 233, 199, .12), transparent 70%); mix-blend-mode: screen; }
.viewer[data-view="flashlight"][data-state="done"] .v-scan::before, .viewer[data-view="flashlight"][data-state="done"] .v-scan::after { display: none; }

.relief-card { position: relative; height: min(72vh, 640px); min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #060709; }
.relief-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.relief-card canvas.is-dragging { cursor: grabbing; }
.relief-copy { position: absolute; top: 0; left: 0; right: 0; padding: 28px 28px 60px; background: linear-gradient(rgba(6, 7, 9, .85), transparent); pointer-events: none; }
.relief-copy .block-head { max-width: 560px; margin: 0; }
.relief-hint { position: absolute; right: 20px; bottom: 18px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.viewer.is-dragging .v-handle span { transform: translate(-50%, -50%) scale(1.15); }

.v-scan { position: absolute; inset: 0; z-index: 4; display: none; pointer-events: none; }
.v-scan::before { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, rgba(244, 215, 168, .12) 80%, rgba(255, 233, 199, .55) 99%, transparent); content: ''; animation: scan 2.2s cubic-bezier(.6, 0, .4, 1) infinite; mix-blend-mode: screen; }
.v-scan::after { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); content: ''; }
.viewer[data-state="running"] .v-scan { display: block; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }

.v-caption { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 7; display: none; align-items: flex-end; justify-content: space-between; gap: 20px; }
.viewer[data-state="running"] .v-caption { display: flex; }
.v-caption .cap-text { max-width: 560px; padding: 14px 18px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(6, 7, 9, .62); backdrop-filter: blur(14px); animation: rise .6s var(--ease) both; }
.v-caption .cap-text strong { display: block; margin-bottom: 4px; font: 400 26px/1.1 var(--font-display); }
.v-caption .cap-text span { color: var(--fg-soft); font-size: 13px; line-height: 1.5; }
.v-caption .cap-count { white-space: nowrap; color: var(--light); font: 400 64px/1 var(--font-display); text-shadow: 0 0 40px var(--light-glow); }
.v-caption .cap-count small { color: var(--muted); font-size: 24px; }

.dropzone { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; cursor: pointer; transition: opacity .3s, background .3s; }
.dropzone::before { position: absolute; inset: 14px; border: 1px dashed rgba(244, 215, 168, .18); border-radius: calc(var(--radius) - 8px); content: ''; transition: border-color .3s, inset .4s var(--ease); }
.dropzone:hover::before, .dropzone.is-dragging::before { inset: 10px; border-color: rgba(244, 215, 168, .55); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { margin-top: 18px; color: var(--fg); font: 400 34px/1 var(--font-display); }
.dropzone span:not(.drop-orb) { font-size: 14px; }
.dropzone u { color: var(--light); text-decoration-color: rgba(244, 215, 168, .4); text-underline-offset: 3px; }
.dropzone small { margin-top: 6px; color: var(--faint); font: 10px var(--font-mono); letter-spacing: .1em; }
.drop-orb { position: relative; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(244, 215, 168, .35), rgba(244, 215, 168, .04) 60%, transparent 70%); animation: breatheOrb 4s ease-in-out infinite; }
.drop-orb span { position: absolute; inset: 30px; border-radius: 50%; background: var(--light-hot); box-shadow: 0 0 30px var(--light), 0 0 80px var(--light-glow); }
.drop-orb::before, .drop-orb::after { position: absolute; inset: 0; border: 1px solid rgba(244, 215, 168, .25); border-radius: 50%; content: ''; animation: ripple 4s ease-out infinite; }
.drop-orb::after { animation-delay: 2s; }
@keyframes breatheOrb { 50% { transform: scale(1.06); } }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

/* ---------- pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; margin: 22px 0 0; padding: 0; list-style: none; }
.pipe-node { position: relative; padding: 16px 8px 0 0; color: var(--faint); font: 500 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; transition: color .5s; }
.pipe-node::before { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-strong); content: ''; }
.pipe-node::after { position: absolute; top: 0; left: 0; width: 0; height: 1px; background: var(--light); box-shadow: 0 0 12px var(--light); content: ''; transition: width .9s var(--ease); }
.pipe-node i { position: absolute; top: -4px; left: 0; width: 9px; height: 9px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); transition: all .5s var(--ease); }
.pipe-node b { display: block; margin-bottom: 3px; color: var(--faint); font-weight: 500; }
.pipe-node.is-active { color: var(--light); }
.pipe-node.is-active i { border-color: var(--light); background: var(--light); box-shadow: 0 0 0 5px rgba(244, 215, 168, .15), 0 0 18px var(--light); animation: pulse 1s ease-in-out infinite; }
.pipe-node.is-done { color: var(--fg-soft); }
.pipe-node.is-done::after { width: 100%; }
.pipe-node.is-done i { border-color: var(--light); background: var(--light); }
.pipe-node.is-skipped { opacity: .35; }
.pipe-node.is-warning i { border-color: var(--warn); background: var(--warn); }
.pipe-node .pipe-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: none; }

/* ---------- control panel ---------- */
.control-panel { position: sticky; top: 92px; display: grid; gap: 22px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)); backdrop-filter: blur(20px); }
.control-block { min-width: 0; }
.selected-file { margin-bottom: 8px; padding: 10px 12px; overflow: hidden; border: 1px solid rgba(244, 215, 168, .2); border-radius: var(--radius-small); background: rgba(244, 215, 168, .04); color: var(--light); font: 11px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.file-button { display: block; padding: 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); color: var(--fg-soft); font-size: 13px; text-align: center; cursor: pointer; transition: border-color .25s, color .25s; }
.file-button:hover { border-color: var(--light); color: var(--fg); }
.segmented { display: grid; gap: 6px; }
.segmented button { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-small); background: transparent; text-align: left; transition: all .25s var(--ease); }
.segmented button strong { font-size: 14px; font-weight: 500; }
.segmented button small { color: var(--muted); font: 10px var(--font-mono); }
.segmented button:hover { border-color: var(--line-strong); }
.segmented button.is-active { border-color: rgba(244, 215, 168, .5); background: linear-gradient(90deg, rgba(244, 215, 168, .1), rgba(244, 215, 168, .02)); box-shadow: inset 2px 0 0 var(--light); }
.segmented button.is-active small { color: var(--light); }

.primary-button { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 17px 20px; overflow: hidden; border: 0; border-radius: 99px; color: #1a140c; background: linear-gradient(100deg, var(--light-hot), var(--light) 55%, #e7bd83); font-size: 15px; font-weight: 600; box-shadow: 0 10px 40px -10px var(--light-glow), inset 0 1px 0 rgba(255, 255, 255, .6); transition: transform .3s var(--ease), box-shadow .3s, opacity .3s; }
.primary-button::after { position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); content: ''; transform: skewX(-20deg); animation: sheen 3.5s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 50px -10px var(--light-glow), inset 0 1px 0 rgba(255, 255, 255, .6); }
.primary-button:disabled { opacity: .3; cursor: not-allowed; filter: grayscale(.6); }
.primary-button:disabled::after { display: none; }
.primary-button.is-busy::after { animation-duration: 1.1s; }
.primary-button.inline { width: auto; gap: 28px; margin-top: 32px; }
.btn-arrow { font-size: 18px; transition: transform .3s var(--ease); }
.primary-button:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

.row-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery-item { position: relative; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-small); background: #000; aspect-ratio: 4 / 3; transition: border-color .3s, transform .4s var(--ease); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .4s, transform .8s var(--ease); }
.gallery-item span { position: absolute; left: 8px; right: 8px; bottom: 7px; color: var(--fg); font-size: 11px; font-weight: 500; text-align: left; text-shadow: 0 1px 8px #000; }
.gallery-item::after { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .8)); content: ''; }
.gallery-item span { z-index: 1; }
.gallery-item-reference img { opacity: 1; }
.gallery-item-reference::after, .gallery-item-reference span { display: none; }
.gallery-item:hover { border-color: rgba(244, 215, 168, .5); transform: translateY(-2px); }
.gallery-item:hover img { opacity: 1; transform: scale(1.06); }

/* ---------- run view ---------- */
.run-view { padding-top: 72px; animation: rise 1s var(--ease) both; }
.run-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.run-header h2 { max-width: 900px; margin: 16px 0 0; font: 400 clamp(30px, 3.6vw, 52px)/1.04 var(--font-display); letter-spacing: -.02em; }
.download-button { flex: none; display: flex; align-items: center; gap: 14px; padding: 15px 22px; border: 1px solid rgba(244, 215, 168, .45); border-radius: 99px; color: var(--light); background: rgba(244, 215, 168, .05); font-size: 14px; font-weight: 500; transition: all .3s var(--ease); }
.download-button:hover:not(:disabled) { color: var(--bg); background: var(--light); box-shadow: 0 0 40px var(--light-glow); }
.download-button:disabled { opacity: .3; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-bottom: 1px solid var(--line); }
.stat { padding: 30px 24px 30px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat strong { display: block; font: 400 clamp(44px, 5vw, 72px)/1 var(--font-display); letter-spacing: -.03em; }
.stat strong small { margin-left: 4px; color: var(--light); font-size: .42em; letter-spacing: 0; }
.stat > span { display: block; margin-top: 10px; color: var(--muted); font: 500 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }

.block { padding: 56px 0 0; }
.block-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.block-head > div { flex: 1; }
.block-head h3 { margin: 0 0 6px; font: 400 32px/1.1 var(--font-display); letter-spacing: -.01em; }
.block-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.index { padding-top: 8px; color: var(--light); font: 500 11px var(--font-mono); letter-spacing: .1em; }

.lens-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lens { position: relative; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #000; text-align: left; transition: border-color .3s, transform .4s var(--ease); }
.lens img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; opacity: .7; transition: opacity .3s, transform .8s var(--ease); }
.lens span { display: block; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--fg-soft); font-size: 12px; font-weight: 500; }
.lens span small { display: block; margin-top: 2px; color: var(--muted); font: 10px var(--font-mono); font-weight: 400; }
.lens:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.lens:hover img { opacity: 1; transform: scale(1.05); }
.lens.is-active { border-color: var(--light); box-shadow: 0 0 0 1px var(--light), 0 0 40px -10px var(--light-glow); }
.lens.is-active img { opacity: 1; }
.lens.is-active span { color: var(--light); }

.stage-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 14px; padding-bottom: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.stage-card { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); text-align: left; scroll-snap-align: start; transition: border-color .3s, transform .4s var(--ease); animation: rise .7s var(--ease) both; }
.stage-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .8s var(--ease); }
.stage-card .stage-body { padding: 14px 16px 16px; }
.stage-card .stage-num { color: var(--light); font: 500 10px var(--font-mono); letter-spacing: .12em; }
.stage-card strong { display: block; margin: 6px 0; font: 400 21px/1.15 var(--font-display); }
.stage-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.stage-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.stage-card:hover img { transform: scale(1.04); }
.stage-card.is-active { border-color: var(--light); box-shadow: 0 0 0 1px var(--light); }

.duo { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.surface { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)); }
.duo .block-head h3 { font-size: 26px; }
.ridge-card canvas { display: block; width: 100%; height: 340px; }
.relight-card canvas { display: block; width: 100%; max-height: 260px; margin-bottom: 18px; object-fit: contain; border-radius: var(--radius-small); background: #000; }
.slider-row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.slider-row output { color: var(--light); font: 11px var(--font-mono); }
input[type="range"] { width: 100%; height: 20px; background: transparent; -webkit-appearance: none; appearance: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--light), var(--line-strong)); }
input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--light-hot); box-shadow: 0 0 14px var(--light); -webkit-appearance: none; }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-strong); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--light-hot); }

/* ---------- under the hood ---------- */
.hood { margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hood summary { display: flex; align-items: center; gap: 20px; padding: 28px 0; list-style: none; cursor: pointer; }
.hood summary::-webkit-details-marker { display: none; }
.hood summary .index { padding-top: 0; }
.hood summary > span:nth-child(2) { flex: 1; }
.hood summary strong { display: block; font: 400 32px/1.1 var(--font-display); font-weight: 400; }
.hood summary small { color: var(--muted); font-size: 14px; }
.hood-chevron { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--light); font-size: 22px; font-weight: 300; transition: transform .4s var(--ease); }
.hood[open] .hood-chevron { transform: rotate(45deg); }
.hood-body { display: grid; gap: 16px; padding-bottom: 32px; animation: rise .6s var(--ease) both; }
.hood-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.chip-grid { display: grid; gap: 8px; }
.metric-chip { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--fg-soft); }
.metric-chip strong { font: 500 12px var(--font-mono); color: var(--fg); }
.metric-chip.severity-med strong { color: var(--light); }
.metric-chip.severity-high strong { color: var(--warn); }
.decision-list { margin: 16px 0 0; padding: 0; list-style: none; }
.decision-list li { position: relative; padding: 8px 0 8px 18px; border-top: 1px solid var(--line); color: var(--fg-soft); font-size: 13px; line-height: 1.5; }
.decision-list li::before { position: absolute; top: 15px; left: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--light); content: ''; }
.timing-list { display: grid; gap: 10px; }
.timing-row { display: grid; grid-template-columns: 90px 1fr 60px; align-items: center; gap: 12px; font: 11px var(--font-mono); color: var(--muted); }
.timing-row .bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timing-row .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(244, 215, 168, .4), var(--light)); transform-origin: left; animation: grow 1.2s var(--ease) both; }
.timing-row b { color: var(--fg-soft); font-weight: 500; text-align: right; }
.timing-row.is-total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--fg); }
@keyframes grow { from { transform: scaleX(0); } }
.metrics-table { display: grid; }
.metric-row { display: grid; grid-template-columns: 1fr 70px 70px 20px; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font: 12px var(--font-mono); color: var(--fg-soft); }
.metric-row.is-head { border-top: 0; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.metric-delta { color: #9be3b8; text-align: right; }
.metric-delta.is-worse { color: var(--warn); }
.metrics-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.candidate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.candidate-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); animation: rise .5s var(--ease) both; }
.candidate-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; opacity: .6; }
.candidate-card.is-winner { border-color: var(--light); box-shadow: 0 0 30px -8px var(--light-glow); }
.candidate-card.is-winner img { opacity: 1; }
.candidate-info { padding: 8px 10px 10px; }
.candidate-title { display: flex; justify-content: space-between; gap: 6px; font: 500 10px var(--font-mono); color: var(--fg-soft); }
.winner-tag { color: var(--light); }
.candidate-info p { margin: 4px 0 0; color: var(--muted); font: 10px var(--font-mono); }
.warning-list { display: grid; gap: 8px; }
.warning-item { padding: 12px 16px; border: 1px solid rgba(232, 163, 143, .25); border-radius: 12px; background: rgba(232, 163, 143, .05); color: #ecc3b7; font-size: 13px; line-height: 1.5; }
main > .warning-item { margin: 16px 0; }

/* ---------- compare ---------- */
.page-heading { max-width: 980px; padding: 48px 0 48px; }
.compare-method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.method-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); animation: rise .7s var(--ease) both; }
.method-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .8s var(--ease); }
.method-card:hover img { transform: scale(1.04); }
.method-card .method-ph { display: grid; place-items: center; aspect-ratio: 16 / 10; background: radial-gradient(ellipse, #12141a, #07080a); }
.method-card .method-ph::after { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-top-color: var(--light); border-radius: 50%; content: ''; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.method-card > div:last-child { padding: 18px 20px 20px; }
.method-card .method-kicker { color: var(--light); font: 500 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.method-card h3 { margin: 8px 0 8px; font: 400 30px/1.05 var(--font-display); }
.method-card p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.method-card .method-time { color: var(--fg-soft); font: 12px var(--font-mono); }
.method-card.is-original h3 { color: var(--night); }

/* ---------- live ---------- */
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.live-grid figure { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(ellipse, #12141a, #07080a); aspect-ratio: 4 / 3; }
.live-grid video, .live-grid img { width: 100%; height: 100%; object-fit: cover; }
.live-grid img:not([src]) { visibility: hidden; }
.live-grid figcaption { position: absolute; top: 14px; left: 14px; padding: 6px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; background: rgba(6, 7, 9, .55); backdrop-filter: blur(10px); color: var(--fg-soft); font: 500 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.live-grid figure:last-child figcaption { color: var(--light); }
.live-stats { margin-top: 16px; color: var(--muted); font-size: 12px; }

/* ---------- benchmarks ---------- */
.benchmark-content p { margin: 0; color: var(--muted); font-size: 14px; }
.benchmark-content h3 { font: 400 26px var(--font-display); }
.benchmark-table { width: 100%; border-collapse: collapse; font: 12px var(--font-mono); }
.benchmark-table th, .benchmark-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.benchmark-table th { color: var(--muted); font-weight: 500; }
.benchmark-content > img { max-width: 100%; margin-top: 20px; border-radius: var(--radius-small); }

.footer { display: flex; justify-content: space-between; margin-top: 96px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font: 11px var(--font-mono); letter-spacing: .06em; }

/* ---------- type system ----------
   One loud moment (the hero headline); everything else steps down a clear scale.
   Display: Mona Sans semi-expanded caps. Accent: Boska italic for the single key word. */
.rh-copy h1, .page-heading h1, .console-heading h2, .story-head h2 { font-family: var(--font-display); font-stretch: 112%; font-weight: 500; text-transform: uppercase; letter-spacing: -.025em; }
.rh-copy h1 em, .page-heading h1 em, .console-heading h2 em, .story-head h2 em, .run-header h2 em { font-family: var(--font-accent); font-stretch: normal; font-weight: 400; font-style: italic; text-transform: none; letter-spacing: -.01em; font-size: 1.1em; line-height: .8; color: var(--light); }
.rh-copy h1 { max-width: 15ch; font-size: clamp(36px, 4.6vw, 70px); line-height: .98; }
.page-heading h1 { max-width: 18ch; font-size: clamp(30px, 3.4vw, 50px); line-height: 1; }
.console-heading h2, .story-head h2 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.02; }
.block-head h3, .hood summary strong, .method-card h3, .sp-body h3, .benchmark-content h3 { font-family: var(--font-display); font-stretch: 112%; font-weight: 500; text-transform: uppercase; letter-spacing: .01em; }
.block-head h3 { font-size: 15px; line-height: 1.25; }
.duo .block-head h3 { font-size: 14px; }
.block-head p { font-size: 13px; }
.hood summary strong { font-size: 15px; }
.hood summary small { font-size: 13px; }
.method-card h3 { font-size: 15px; }
.sp-body h3 { font-size: 13px; line-height: 1.3; }
.stage-card strong { font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: -.005em; line-height: 1.3; text-transform: none; }
.v-caption .cap-text strong { font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.v-caption .cap-count { font-size: 40px; }
.v-caption .cap-count small { font-size: 16px; }
.dropzone strong { font-family: var(--font-accent); font-size: 26px; font-weight: 400; font-style: italic; letter-spacing: -.01em; text-transform: none; }
.run-header h2 { font-family: var(--font-accent); font-weight: 400; font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.015em; line-height: 1.12; }
.stat strong, .v-caption .cap-count { font-family: var(--font-display); font-stretch: 112%; font-weight: 300; letter-spacing: -.04em; }
.stat strong { font-size: clamp(32px, 3.2vw, 48px); }
.stat strong small { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: 0; }
.rh-copy p, .page-heading p { font-size: 15px; }
.eyebrow { font-size: 10px; }

.brand { gap: 10px; }
.brand-mark { width: 24px; height: 24px; overflow: visible; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 0 10px rgba(244, 215, 168, .25)); }
.brand-word { font: 600 13px/1 var(--font-display); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }

.split-word { display: inline-block; white-space: nowrap; }
.split-char { display: inline-block; animation: charRise 1s var(--ease) both; animation-delay: calc(var(--i) * 22ms + .15s); }
@keyframes charRise { from { opacity: 0; transform: translateY(.5em); filter: blur(6px); } }
.rh-copy h1 { animation: none; }

/* ---------- marquee ---------- */
.marquee { position: relative; margin: 0 calc(50% - 50vw); padding: 22px 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track > * { flex: none; white-space: nowrap; font-size: clamp(22px, 2.4vw, 36px); line-height: 1; }
.marquee-track span { font-family: var(--font-display); font-stretch: 112%; font-weight: 500; text-transform: uppercase; letter-spacing: -.01em; color: var(--fg-soft); }
.marquee-track b { font-family: var(--font-display); font-stretch: 112%; font-weight: 500; text-transform: uppercase; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1px rgba(244, 215, 168, .5); }
.marquee-track em { font-family: var(--font-accent); font-weight: 400; font-style: italic; color: var(--light); }
.marquee-track .mq-thumb { width: 76px; height: 40px; overflow: hidden; border-radius: 99px; border: 1px solid rgba(244, 215, 168, .25); }
.marquee-track .mq-thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.7) saturate(1.1); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- pinned story ---------- */
.story { position: relative; margin: 0 calc(50% - 50vw); }
.story-pin { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; gap: 36px; height: 100vh; overflow: hidden; padding: 96px 0 48px; }
.story-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 0 max(40px, calc(50vw - 680px)); }
.story-head > div { display: grid; gap: 16px; }
.story-head h2 { max-width: 22ch; margin: 0; }
.story-head p { max-width: 260px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; }
.story-track { display: flex; gap: 24px; width: max-content; padding: 0 max(40px, calc(50vw - 680px)); will-change: transform; }
.story-panel { position: relative; flex: none; width: clamp(280px, 28vw, 440px); }
.sp-img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 14px; background: #000; }
.sp-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.4s var(--ease); }
.story-panel:hover .sp-img img { transform: scale(1.01); }
.sp-num { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; background: rgba(6, 7, 9, .55); backdrop-filter: blur(10px); color: var(--light); font: 500 10px var(--font-mono); letter-spacing: .12em; }
.sp-body { display: grid; gap: 6px; padding: 14px 2px 0; }
.sp-body p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.story-panel.is-final .sp-img { border-color: rgba(244, 215, 168, .5); box-shadow: 0 0 80px -20px var(--light-glow); }
.story-panel.is-final .sp-body h3 { color: var(--light); }
.story-panel .sp-cta { justify-self: start; margin-top: 8px; padding: 10px 16px; border: 1px solid rgba(244, 215, 168, .45); border-radius: 99px; color: var(--light); background: transparent; font-size: 13px; font-weight: 500; text-decoration: none; transition: all .3s var(--ease); }
.story-panel .sp-cta:hover { color: var(--bg); background: var(--light); }
.story-progress { height: 1px; margin: 0 max(40px, calc(50vw - 680px)); background: var(--line-strong); }
.story-progress i { display: block; width: 100%; height: 100%; background: var(--light); box-shadow: 0 0 12px var(--light); transform: scaleX(0); transform-origin: left; }

/* ---------- 3D hero scene ---------- */
.rh-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: none; }
.reveal-hero.has-3d .rh-canvas { display: block; animation: fade 1.6s var(--ease) both; }
.reveal-hero.has-3d .rh-media { display: none; }
.reveal-hero.has-3d::after { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(6, 7, 9, .55) 0%, transparent 20%, transparent 55%, rgba(6, 7, 9, .7) 82%, var(--bg) 100%); content: ''; transition: opacity 1.2s var(--ease); }
.reveal-hero.is-raised::after { opacity: .35; }
.reveal-hero.has-3d .rh-copy, .reveal-hero.has-3d .rh-meta { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-hero.is-raised .rh-copy, .reveal-hero.is-raised .rh-meta { opacity: 0 !important; transform: translateY(24px); }
.reveal-hero.is-raised { cursor: grab; }
.reveal-hero.is-raised:active { cursor: grabbing; }

/* ---------- ambient image glow ---------- */
.stage-col { position: relative; isolation: isolate; }
.ambient { position: absolute; inset: -6% -4% 6%; z-index: -1; pointer-events: none; }
.ambient img { width: 100%; height: 100%; object-fit: cover; opacity: .34; filter: blur(70px) saturate(1.6) brightness(1.5); transform: scale(1.05); transition: opacity 1s var(--ease); }
.ambient img:not([src]) { opacity: 0; }

/* ---------- cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; display: none; }
.cursor-dot, .cursor-ring { position: absolute; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-dot { width: 6px; height: 6px; background: var(--light-hot); box-shadow: 0 0 12px var(--light); }
.cursor-ring { width: 34px; height: 34px; border: 1px solid rgba(244, 215, 168, .55); transition: width .35s var(--ease), height .35s var(--ease), background .35s, border-color .35s; }
.cursor.is-hover .cursor-ring { width: 64px; height: 64px; border-color: var(--light); background: rgba(244, 215, 168, .08); }
.cursor.is-hidden { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor label, body.has-cursor .viewer, body.has-cursor canvas { cursor: none; }
}

/* ---------- console notices + secondary action ---------- */
.notice { padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--surface-strong); color: var(--fg-soft); font-size: 13px; line-height: 1.5; animation: rise .4s var(--ease) both; }
.notice.is-error { border-color: rgba(232, 163, 143, .35); background: rgba(232, 163, 143, .07); color: #f0cbbf; }
.notice.is-info { border-color: rgba(244, 215, 168, .3); background: rgba(244, 215, 168, .05); color: var(--light); }
.secondary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: -10px; padding: 14px 20px; border: 1px solid rgba(244, 215, 168, .35); border-radius: 99px; color: var(--light); background: transparent; font-size: 14px; font-weight: 500; transition: all .3s var(--ease); }
.secondary-button:hover:not(:disabled) { color: var(--bg); background: var(--light); }
.secondary-button:disabled { opacity: .3; cursor: not-allowed; }

/* ---------- compare all three ---------- */
.compare-section { padding-top: 64px; animation: rise .8s var(--ease) both; }
.compare-section .compare-method-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.method-card .method-open { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--light); font-size: 12px; font-weight: 500; }
.method-card .method-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.method-card .method-time { display: block; }
.compare-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; font: 12px var(--font-mono); }
.compare-table th, .compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table th:first-child { color: var(--muted); font-weight: 500; text-align: left; }
.compare-table tr:first-child th { color: var(--fg-soft); font-family: var(--font); font-weight: 500; }
.compare-table td { color: var(--fg-soft); }
.compare-table td.is-best { color: var(--light); font-weight: 500; background: rgba(244, 215, 168, .06); }

/* ---------- report: readout, recoverability, decisions, safety ---------- */
.report-grid, .perf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.recover-sentence { margin: 0 0 16px; color: var(--fg); font: 400 20px/1.35 var(--font-accent); }
.recover-bar { display: flex; height: 10px; overflow: hidden; border-radius: 99px; background: var(--line); }
.recover-bar i { height: 100%; transition: width 1.2s var(--ease); }
.is-recovered { --tone: #28b45a; }
.is-estimated { --tone: #e6a01e; }
.is-unrecoverable { --tone: #dc322f; }
.recover-bar i { background: var(--tone); }
.recover-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.recover-item { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid var(--tone); }
.recover-item b { color: var(--fg); font: 500 18px var(--font-display); font-stretch: 112%; }
.recover-item span { color: var(--fg-soft); font-size: 12px; }
.recover-item small { color: var(--muted); font-size: 11px; }
.recover-note { grid-column: 1 / -1; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.guard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.guard-chip { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.guard-top { display: flex; justify-content: space-between; gap: 8px; color: var(--fg-soft); font-size: 13px; }
.guard-top b { font: 500 10px var(--font-mono); letter-spacing: .1em; }
.guard-chip.is-pass { border-color: rgba(40, 180, 90, .3); }
.guard-chip.is-pass b { color: #7fdca0; }
.guard-chip.is-flag { border-color: rgba(230, 160, 30, .45); background: rgba(230, 160, 30, .06); }
.guard-chip.is-flag b { color: #f2c46b; }
.guard-values { margin-top: 4px; color: var(--muted); font-size: 11px; }
.guard-rule { margin-top: 4px; color: var(--faint); font-size: 11px; line-height: 1.4; }

/* ---------- map legend ---------- */
.lens-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; min-height: 44px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-small); color: var(--fg-soft); font-size: 13px; line-height: 1.5; }
.lens-legend strong { color: var(--light); font-weight: 500; }
.legend-key { display: inline-flex; gap: 12px; }
.legend-key i { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: normal 11px var(--font-mono); }
.legend-key i::before { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); content: ''; }

/* ---------- performance ---------- */
.metric-row { grid-template-columns: 1.4fr 80px 80px 22px; }
.metric-row .is-missing { color: var(--faint); cursor: help; }
.metric-delta.is-unavailable { color: var(--faint); }
.timing-stack { display: flex; height: 12px; margin: 4px 0 18px; overflow: hidden; border-radius: 99px; background: var(--line); }
.seg-0 { --seg: #f4d7a8; } .seg-1 { --seg: #d9a86a; } .seg-2 { --seg: #9fb8d6; } .seg-3 { --seg: #7fdca0; } .seg-4 { --seg: #c9a3e0; } .seg-5 { --seg: #e8a38f; }
.timing-stack i { height: 100%; background: var(--seg); }
.timing-row .bar i[class^="seg-"] { background: var(--seg); }

/* ---------- adaptive search ---------- */
.candidate-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.candidate-score { color: var(--fg-soft) !important; }
.candidate-reason { margin-top: 6px !important; color: var(--muted); font: 11px/1.45 var(--font) !important; }
.candidate-card.is-winner .candidate-reason { color: var(--light); }
.candidate-card.is-infeasible { opacity: .75; }
.notes-block { padding-top: 48px; }

/* ---------- results page ---------- */
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 72px; padding-bottom: 24px; animation: rise .8s var(--ease) both; }
.results-block, .table-wrap, .compare-table-wrap, .compare-section { min-width: 0; }
.callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.callout { display: grid; align-content: start; gap: 8px; padding: 28px 24px 28px 0; }
.callout + .callout { padding-left: 24px; border-left: 1px solid var(--line); }
.callout strong { color: var(--light); font: 300 clamp(40px, 4.4vw, 64px)/1 var(--font-display); font-stretch: 112%; letter-spacing: -.04em; }
.callout span { color: var(--fg); font-size: 14px; line-height: 1.4; }
.callout small { color: var(--muted); font-size: 11px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.results-table { width: 100%; border-collapse: collapse; font: 12.5px var(--font-mono); }
.results-table th, .results-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.results-table tr:last-child > * { border-bottom: 0; }
.results-table tr:first-child th { position: sticky; top: 0; color: var(--muted); background: var(--bg-2); font: 500 10px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.results-table th:first-child { color: var(--fg-soft); font-family: var(--font); font-weight: 500; text-align: left; }
.results-table th small { color: var(--faint); font-weight: 400; }
.results-table td { color: var(--fg-soft); }
.results-table td.is-best { color: var(--light); font-weight: 500; }
.results-table tr.is-ours { background: linear-gradient(90deg, rgba(244, 215, 168, .08), rgba(244, 215, 168, .02)); }
.results-table tr.is-ours th:first-child { color: var(--light); box-shadow: inset 2px 0 0 var(--light); }
.results-table.is-compact th, .results-table.is-compact td { padding: 10px 14px; }
.results-table td:nth-child(2), .results-table td:nth-child(3) { text-align: left; }
.results-table .more-row td { color: var(--muted); text-align: left; }
.results-table.is-failures th, .results-table.is-failures td { text-align: left; }
.results-table.is-failures th:last-child, .results-table.is-failures td:last-child { text-align: right; }
.table-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.ablation-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bar-panel { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent); }
.bar-panel figcaption { margin-bottom: 14px; color: var(--muted); font: 500 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 70px; align-items: center; gap: 10px; padding: 5px 0; border-radius: 6px; cursor: default; }
.bar-row:hover { background: rgba(255, 255, 255, .03); }
.bar-label { overflow: hidden; color: var(--fg-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bar-row.is-full .bar-label { color: var(--fg); font-weight: 500; }
.bar-track { height: 8px; }
.bar-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: rgba(244, 215, 168, .45); transform-origin: left; animation: grow 1s var(--ease) both; }
.bar-row.is-full .bar-track i { background: var(--light); }
.bar-value { color: var(--fg-soft); font-size: 11px; text-align: right; }
.ablation-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.ablation-note { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.ablation-note p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.an-head { display: flex; justify-content: space-between; gap: 10px; }
.an-head strong { color: var(--fg); font-size: 13.5px; font-weight: 500; }
.an-verdict { flex: none; padding: 3px 8px; border: 1px solid rgba(244, 215, 168, .35); border-radius: 99px; color: var(--light); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; }
.ablation-note.is-neutral .an-verdict { border-color: var(--line-strong); color: var(--muted); }
.ablation-note .an-effect { color: var(--fg-soft); font-size: 11px; }
.duo-results { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ft-col { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.ft-row { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); color: var(--fg-soft); font-size: 13px; }
.ft-row b { color: var(--fg); font-weight: 500; }
.ft-verdict { margin: 14px 0 0; color: var(--fg); font: 400 18px/1.4 var(--font-accent); }
.limit-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.limit-list li { display: grid; gap: 3px; padding: 12px 0 0 14px; border-top: 1px solid var(--line); border-left: 2px solid rgba(232, 163, 143, .5); }
.limit-list strong { color: var(--fg); font-size: 13.5px; font-weight: 500; }
.limit-list span { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.flag-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.flag-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(230, 160, 30, .35); border-radius: 99px; background: rgba(230, 160, 30, .05); color: var(--fg-soft); font-size: 12px; }
.flag-chip b { color: #f2c46b; font-weight: 500; }
.flag-chip.is-small { padding: 3px 8px; font-size: 11px; }
.flag-cell { display: flex; gap: 6px; justify-content: flex-start; }
.results-table td.flag-cell { text-align: left; }
.dataset-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dataset-chip { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: transparent; text-align: left; transition: all .25s var(--ease); }
.dataset-chip span { color: var(--fg-soft); font-size: 13px; font-weight: 500; }
.dataset-chip small { color: var(--muted); font-size: 10.5px; }
.dataset-chip:hover { border-color: var(--line-strong); }
.dataset-chip.is-active { border-color: rgba(244, 215, 168, .5); background: rgba(244, 215, 168, .06); box-shadow: inset 2px 0 0 var(--light); }
.dataset-chip.is-active span { color: var(--light); }
.chart-tip { position: fixed; top: 0; left: 0; z-index: 150; max-width: 320px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(10, 12, 16, .94); color: var(--fg); font: 12px/1.4 var(--font-mono); pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* ---------- about page ---------- */
.about-panel { padding-bottom: 24px; }
.about-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 56px; padding: 48px 0 96px; }
.about-hero-copy h1 { margin: 22px 0 20px; max-width: 13ch; font: 500 clamp(36px, 4.4vw, 66px)/.98 var(--font-display); font-stretch: 112%; letter-spacing: -.025em; text-transform: uppercase; }
.about-hero-copy h1 em { font-family: var(--font-accent); font-stretch: normal; font-weight: 400; font-style: italic; text-transform: none; color: var(--light); text-shadow: 0 0 60px var(--light-glow); font-size: 1.1em; }
.about-hero-copy p { max-width: 480px; margin: 0; color: var(--fg-soft); font-size: 16px; line-height: 1.65; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.about-tags span { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--fg-soft); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.about-hero-media { position: relative; margin: 0; overflow: hidden; border: 1px solid rgba(244, 215, 168, .18); border-radius: 24px; background: #000; aspect-ratio: 3 / 2; box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .9), 0 0 120px -60px var(--light-glow); }
.about-hero-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 24s ease-in-out infinite alternate; }
.about-hero-media::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(6, 7, 9, .85)); content: ''; }
.about-hero-media figcaption { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; color: var(--fg-soft); font-size: 10.5px; letter-spacing: .04em; line-height: 1.6; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-2%, -1%); } }

.about-section-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 48px; }
.about-section-head h2 { margin: 0; font: 500 clamp(26px, 2.6vw, 40px)/1.02 var(--font-display); font-stretch: 112%; letter-spacing: -.025em; text-transform: uppercase; }
.about-section-head h2 em { font-family: var(--font-accent); font-stretch: normal; font-weight: 400; font-style: italic; text-transform: none; color: var(--light); font-size: 1.1em; }
.about-section-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.step-timeline { position: relative; display: grid; gap: 72px; margin: 0; padding: 0; list-style: none; }
.step-timeline::before { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(180deg, transparent, rgba(244, 215, 168, .55) 8%, rgba(244, 215, 168, .55) 92%, transparent); box-shadow: 0 0 14px rgba(244, 215, 168, .45); content: ''; }
.step { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
.step::before { position: absolute; top: 50%; left: 50%; width: 13px; height: 13px; border: 1px solid var(--light); border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 6px rgba(244, 215, 168, .08), 0 0 18px var(--light-glow); transform: translate(-50%, -50%); content: ''; }
.step:nth-child(even) .step-media { order: 2; }
.step-media { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #000; aspect-ratio: 3 / 2; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.step-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.step:hover .step-media img { transform: scale(1.04); }
.step-copy { max-width: 440px; }
.step:nth-child(even) .step-copy { justify-self: end; }
.step-num { display: block; margin-bottom: 14px; color: transparent; font: 300 64px/1 var(--font-display); font-stretch: 125%; letter-spacing: -.05em; -webkit-text-stroke: 1px rgba(244, 215, 168, .6); }
.step-copy h3 { margin: 0 0 12px; font: 500 20px/1.15 var(--font-display); font-stretch: 112%; letter-spacing: -.005em; text-transform: uppercase; }
.step-copy p { margin: 0; color: var(--fg-soft); font-size: 14.5px; line-height: 1.65; }
.step-copy .step-log { margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); border-left: 2px solid var(--light); border-radius: 8px; background: rgba(255, 255, 255, .02); color: var(--muted); font-size: 11px; line-height: 1.55; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 120px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles article { padding: 36px 28px 36px 0; }
.principles article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.principles span { color: var(--light); font-size: 11px; letter-spacing: .14em; }
.principles h3 { margin: 14px 0 10px; font: 400 26px/1.15 var(--font-accent); letter-spacing: -.01em; }
.principles p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.team-section { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 64px; margin-bottom: 120px; padding: 56px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: radial-gradient(ellipse at 20% 50%, rgba(244, 215, 168, .09), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .005)); }
.team-mark { display: grid; place-items: center; }
.team-mark svg { width: min(100%, 300px); filter: drop-shadow(0 0 40px rgba(244, 215, 168, .25)); animation: floatMark 7s ease-in-out infinite; }
@keyframes floatMark { 50% { transform: translateY(-10px) rotate(-2deg); } }
.team-name { margin: 18px 0 26px; font: 600 clamp(34px, 4vw, 58px)/1 var(--font-display); font-stretch: 125%; letter-spacing: .02em; text-transform: uppercase; }
.team-list { display: grid; margin: 0 0 28px; padding: 0; list-style: none; }
.team-list li { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--fg); font: 400 26px/1.2 var(--font-accent); }
.team-list li:last-child { border-bottom: 1px solid var(--line); }
.team-list li span { color: var(--light); font-size: 11px; letter-spacing: .1em; }
.ghost-link { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid rgba(244, 215, 168, .45); border-radius: 99px; color: var(--light); font-size: 14px; font-weight: 500; text-decoration: none; transition: all .3s var(--ease); }
.ghost-link:hover { color: var(--bg); background: var(--light); box-shadow: 0 0 40px var(--light-glow); }

.credit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.credit-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent); transition: border-color .3s; }
.credit-grid article:hover { border-color: var(--line-strong); }
.credit-grid .label { margin-bottom: 10px; }
.credit-grid h3 { margin: 0 0 8px; font: 500 15px var(--font-display); font-stretch: 112%; text-transform: uppercase; }
.credit-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .console { grid-template-columns: 1fr; }
  .control-panel { position: static; grid-template-columns: 1fr 1fr; }
  .control-panel .primary-button { grid-column: 1 / -1; order: 5; }
  .duo { grid-template-columns: 1fr; }
  .compare-section .compare-method-grid { grid-template-columns: 1fr 1fr; }
  .ablation-charts { grid-template-columns: 1fr; }
  .about-hero, .team-section { grid-template-columns: 1fr; gap: 40px; }
  .about-hero-copy h1 { max-width: none; }
  .step { gap: 40px; }
  .team-mark svg { width: 180px; }
}
@media (max-width: 720px) {
  .app-shell { padding: 0 16px 24px; }
  .topbar { grid-template-columns: 1fr auto; height: auto; margin: 0 -16px; padding: 14px 16px 10px; row-gap: 12px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; overflow-x: auto; }
  .nav-tab { padding: 8px 12px; }
  .health [data-role="health-label"] { display: none; }
  .page-heading p, .rh-copy p { font-size: 14px; }
  .reveal-hero { margin-top: -110px; min-height: 560px; height: 92svh; cursor: auto; }
  .rh-copy { left: 16px; right: 16px; bottom: 96px; }
  .rh-meta { display: none; }
  .rh-hint { top: 124px; white-space: nowrap; }
  .rh-cta { bottom: 24px; white-space: nowrap; }
  .console-heading { padding: 64px 0 24px; }
  .relief-card { height: 420px; }
  .relief-copy { padding: 20px 18px 50px; }
  .relief-copy p { display: none; }
  .marquee { padding: 22px 0; }
  .story { height: auto !important; }
  .story-pin { position: static; height: auto; padding: 64px 0 24px; gap: 24px; }
  .story-head { flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 16px; }
  .story-head .eyebrow { position: static; }
  .story-head p { text-align: left; }
  .story-track { width: auto; padding: 0 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; transform: none !important; }
  .story-panel { width: 78vw; scroll-snap-align: start; }
  .story-progress { display: none; }
  .report-grid, .perf-grid { grid-template-columns: 1fr; }
  .compare-section .compare-method-grid { grid-template-columns: 1fr 1fr; }
  .callouts { grid-template-columns: 1fr 1fr; }
  .callout { padding: 20px 12px 20px 0; }
  .callout:nth-child(odd) { padding-left: 0; border-left: 0; }
  .callout:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .ablation-charts, .duo-results, .ft-grid { grid-template-columns: 1fr; }
  .about-hero { padding: 28px 0 64px; }
  .about-hero-copy p { font-size: 14.5px; }
  .step-timeline { gap: 48px; padding-left: 26px; }
  .step-timeline::before { left: 6px; }
  .step { grid-template-columns: 1fr; gap: 18px; }
  .step::before { top: 0; left: -20px; transform: translate(-50%, 0); }
  .step:nth-child(even) .step-media { order: 0; }
  .step:nth-child(even) .step-copy { justify-self: start; }
  .step-num { font-size: 44px; margin-bottom: 8px; }
  .principles { grid-template-columns: 1fr; margin: 72px 0; }
  .principles article, .principles article + article { padding: 24px 0; border-left: 0; }
  .principles article + article { border-top: 1px solid var(--line); }
  .team-section { padding: 28px 22px; gap: 24px; margin-bottom: 72px; }
  .team-mark svg { width: 120px; }
  .team-list li { font-size: 22px; }
  .recover-legend { grid-template-columns: 1fr; }
  .guard-grid { grid-template-columns: 1fr; }
  .secondary-button { margin-top: 0; }
  .viewer { aspect-ratio: 4 / 5; }
  .viewer:not([data-state="empty"]) { aspect-ratio: var(--ar); }
  .dropzone strong { font-size: 26px; }
  .control-panel { grid-template-columns: 1fr; padding: 18px; }
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; }
  .v-caption .cap-count { display: none; }
  .v-caption { left: 10px; right: 10px; bottom: 10px; }
  .v-caption .cap-text strong { font-size: 19px; }
  .v-caption .cap-text span { font-size: 12px; }
  .run-view { padding-top: 48px; }
  .run-header { flex-direction: column; align-items: stretch; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat { padding: 22px 12px 22px 0; }
  .stat + .stat { padding-left: 16px; }
  .block { padding-top: 44px; }
  .block-head { gap: 12px; }
  .block-head > .muted { display: none; }
  .lens-row { grid-template-columns: 1fr 1fr; }
  .stage-strip { grid-auto-columns: 78%; }
  .ridge-card canvas { height: 240px; }
  .slider-row { grid-template-columns: 1fr; gap: 4px; }
  .live-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grain { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
