/* ============ Tokens ============ */
:root {
  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
:root,
[data-theme="dark"] {
  --bg: #0a0b0d;
  --bg-2: #0f1114;
  --surface: #14161a;
  --surface-2: #1a1d22;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #edece7;
  --muted: #a3a29b;
  --faint: #6f6e69;
  --accent: #c9f45f;
  --accent-ink: #0b0d06;
  --accent-text: #c9f45f;
  --live: #9be564;
  --review: #f4b740;
  --dev: #8d95a1;
  --flap: #121418;
  --flap-2: #191c21;
  --flap-text: #f2f1ea;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  --glow: rgba(201, 244, 95, .14);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #ecE9e0;
  --surface: #ffffff;
  --surface-2: #f7f5ef;
  --line: rgba(20, 20, 18, .09);
  --line-2: rgba(20, 20, 18, .16);
  --text: #131311;
  --muted: #5d5c57;
  --faint: #8c8a83;
  --accent: #c9f45f;
  --accent-ink: #0b0d06;
  --accent-text: #3f6a0a;
  --live: #2f8a2a;
  --review: #a86a00;
  --dev: #66707c;
  --flap: #17191d;
  --flap-2: #20232a;
  --flap-text: #f2f1ea;
  --shadow: 0 30px 70px -35px rgba(30, 30, 20, .35);
  --glow: rgba(140, 190, 30, .16);
  color-scheme: light;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ============ Type ============ */
.display, .h2 { font-weight: 600; letter-spacing: -.035em; line-height: .98; margin: 0; }
.display { font-size: clamp(2.5rem, 5.4vw, 5.1rem); padding-bottom: .04em; }
.h2 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); }
.display em, .h2 em, .h2 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent-text);
}
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: -.025em; line-height: 1.05; margin: 0; font-weight: 600; }
.h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -.02em; line-height: 1.15; margin: 0; font-weight: 600; }
.h5 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; font-weight: 600; }
.kicker, .eyebrow, .panel-kicker, .card-index {
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.lede { font-size: clamp(1.06rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 40ch; margin: 30px 0 0; }
.lede strong { color: var(--text); font-weight: 600; }
.section-lede { color: var(--muted); max-width: 52ch; margin: 18px 0 0; font-size: 1.06rem; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, color .25s, box-shadow .25s;
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--glow), inset 0 -2px 0 rgba(0,0,0,.12); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(201,244,95,.45); }
.btn-ghost { border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; transition: border-color .2s, background-color .2s; }
.icon-btn:hover { border-color: var(--line-2); background: var(--surface); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s, gap .25s var(--ease); }
.link-arrow::after { content: "↗"; font-size: .9em; transition: transform .25s var(--ease); }
.link-arrow:hover { border-color: var(--accent-text); gap: 9px; }
.link-arrow:hover::after { transform: translate(2px, -2px); }

/* ============ Progress + Nav ============ */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.nav { position: sticky; top: 0; z-index: 50; }
.nav::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled::before { border-bottom-color: var(--line); }
.nav-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--text); color: var(--bg); font-family: var(--font-mono); font-size: .8rem; font-weight: 700; letter-spacing: -.02em; transition: transform .4s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .93rem; padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.menu-toggle span + span { margin-top: -10px; }
.menu-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-toggle span + span { margin-top: 0; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
.mobile-menu { position: relative; display: grid; gap: 4px; padding: 10px var(--gutter) 22px; background: var(--bg); border-bottom: 1px solid var(--line); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 14px 4px; font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 14px; }

/* ============ Hero ============ */
.hero { position: relative; padding: clamp(48px, 8vw, 110px) 0 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .grid {
  position: absolute; inset: -1px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .7;
}
.hero-bg .glow {
  position: absolute; width: 760px; height: 760px; border-radius: 50%;
  left: calc(var(--mx, 70%) - 380px); top: calc(var(--my, 35%) - 380px);
  background: radial-gradient(circle, var(--glow), transparent 62%);
  transition: left .6s var(--ease-out), top .6s var(--ease-out);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { min-width: 0; }
.display br { display: block; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-links { display: flex; gap: 22px; list-style: none; padding: 0; margin: 28px 0 0; }
.hero-links a { color: var(--muted); text-decoration: none; font-size: .93rem; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.hero-links a:hover { color: var(--text); border-color: var(--text); }

/* ============ Split-flap board ============ */
.board-wrap { min-width: 0; perspective: 1400px; container-type: inline-size; }
.board {
  --pad: clamp(14px, 3.4cqw, 22px);
  --fgap: 2px;
  --cell: min(20px, calc((100cqw - 2 * var(--pad) - 22 * var(--fgap) - 2px) / 26.9));
  position: relative; background: linear-gradient(180deg, #0d0f12, #08090b);
  border: 1px solid rgba(255,255,255,.07); border-radius: 18px;
  padding: var(--pad); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  color: var(--flap-text); transform: rotateX(4deg) rotateY(-6deg); transform-style: preserve-3d;
  transition: transform .8s var(--ease-out);
}
.board:hover { transform: rotateX(0) rotateY(0); }
.board::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.06), transparent 40%); }
.board-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: #9aa09a; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.bh-title { color: #f4b740; font-weight: 700; }
.bh-clock .clock { color: #f2f1ea; font-weight: 700; }
.board-cols { display: grid; grid-template-columns: calc(var(--cell) * 9 + 8 * var(--fgap)) calc(var(--cell) * 7 + 6 * var(--fgap)) 1fr; gap: calc(var(--cell) * .9); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #6c716d; padding: 12px 0 8px; }
.board-rows { display: grid; gap: calc(var(--cell) * .32); }
.board-fallback { margin: 0; padding: 0 0 0 1.1em; font-family: var(--font-mono); font-size: .85rem; line-height: 1.9; }
.board-fallback a { color: inherit; }
.brow { display: grid; grid-template-columns: auto auto 1fr; gap: calc(var(--cell) * .9); align-items: center; text-decoration: none; color: inherit; border-radius: 6px; position: relative; }
.brow:hover .flap, .brow:focus-visible .flap { background: var(--flap-2); }
.brow::after { content: "↗"; position: absolute; right: -2px; font-size: .8rem; color: #6c716d; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
a.brow:hover::after { opacity: 1; transform: none; }
.bcell { display: flex; gap: var(--fgap); }
.flap {
  width: var(--cell); height: calc(var(--cell) * 1.42);
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--flap); border-radius: 3px;
  font-family: var(--font-mono); font-weight: 700; font-size: calc(var(--cell) * .78); line-height: 1;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04);
  transition: background-color .2s;
}
.flap::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.65); z-index: 1; }
.flap.fa { animation: flipA .09s linear; }
.flap.fb { animation: flipB .09s linear; }
@keyframes flipA { 50% { transform: scaleY(.15); filter: brightness(1.6); } }
@keyframes flipB { 50% { transform: scaleY(.15); filter: brightness(1.6); } }
.st-live .flap { color: #a7f06c; }
.st-review .flap { color: #f4b740; }
.st-dev .flap { color: #9aa3ae; }
.board-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #8d938e; }
.board-foot b { color: #f2f1ea; }

/* ============ Stats + marquee ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: clamp(56px, 8vw, 96px) 0 0; border-top: 1px solid var(--line); }
.stat { padding: 22px 22px 6px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 22px; }
.stat:last-child { border-right: 0; }
.stat dt { color: var(--muted); font-size: .88rem; order: 2; }
.stat { display: flex; flex-direction: column-reverse; gap: 6px; }
.stat dd { margin: 0; font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.marquee { margin-top: clamp(48px, 7vw, 80px); border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; -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; gap: 44px; width: max-content; animation: marquee 48s linear infinite; }
.marquee-track span { font-family: var(--font-mono); font-size: .86rem; letter-spacing: .06em; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 44px; }
.marquee-track span::after { content: "✦"; color: var(--accent-text); font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { padding: clamp(84px, 12vw, 150px) 0; position: relative; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .kicker { margin-bottom: 18px; }

/* ============ Work cards ============ */
.cards { display: grid; gap: clamp(22px, 3vw, 34px); }
.card {
  position: sticky; top: calc(84px + var(--i, 0) * 14px);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(22px, 3.6vw, 48px); border-radius: calc(var(--radius) + 6px);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 -20px 60px -40px rgba(0,0,0,.6);
  overflow: hidden; isolation: isolate;
  transform-origin: 50% 0;
}
.card::before { content: ""; position: absolute; z-index: -1; right: -18%; top: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-local) 26%, transparent), transparent 65%); opacity: .55; }
.card-top { display: flex; gap: 16px; align-items: center; }
.app-icon { width: 56px; height: 56px; border-radius: 15px; box-shadow: 0 8px 22px -8px rgba(0,0,0,.5), 0 0 0 1px var(--line); flex: none; background: #fff; }
.card-index { font-size: .7rem; margin-bottom: 6px; }
.card-tag { margin: 6px 0 0; color: var(--muted); font-size: .98rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; padding: 6px 11px 6px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.live { color: var(--live); border-color: color-mix(in srgb, var(--live) 35%, transparent); }
.chip.review { color: var(--review); border-color: color-mix(in srgb, var(--review) 35%, transparent); }
.chip.dev { color: var(--dev); }
.role { margin: 20px 0 0; font-size: .98rem; }
.role span { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-right: 8px; }
.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 22px; color: var(--muted); font-size: .98rem; }
.points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 1.5px; background: var(--accent-local); }
.points b { color: var(--text); font-weight: 600; }
.points a { color: var(--text); font-weight: 600; text-underline-offset: 3px; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 22px 0 0; }
.stack li { font-size: .8rem; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.card-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.card-visual { display: grid; place-items: center; min-width: 0; }

/* phone */
.phone-stage { display: grid; justify-items: center; gap: 18px; }
.phone {
  width: clamp(200px, 22vw, 280px); aspect-ratio: 9 / 19.4; border-radius: 42px; padding: 9px;
  background: linear-gradient(145deg, #2a2d33, #0c0d10 55%, #23262b); position: relative;
  box-shadow: 0 50px 90px -40px rgba(0,0,0,.75), inset 0 0 0 1.5px rgba(255,255,255,.1);
  transform: rotate(var(--tilt, 0deg)); transition: transform .8s var(--ease-out);
}
.card:hover .phone { --tilt: -2deg; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #000; }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .55s var(--ease), transform .9s var(--ease-out); }
.phone-screen img.out { opacity: 0; transform: scale(1.03); }
.phone-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.dots { display: flex; gap: 6px; }
.dots button { width: 26px; height: 6px; border-radius: 999px; border: 0; padding: 0; background: var(--line-2); cursor: pointer; position: relative; overflow: hidden; }
.dots button.on { background: color-mix(in srgb, var(--accent-local) 30%, var(--line-2)); }
.dots button.on::after { content: ""; position: absolute; inset: 0; background: var(--accent-local); transform-origin: 0 50%; animation: dotfill var(--dur, 3.6s) linear forwards; }
.phone.paused + .phone-controls .dots button.on::after, .no-motion .dots button.on::after { animation: none; transform: none; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: background-color .25s, color .25s; }
.seg button.on { background: var(--text); color: var(--bg); }

/* browser */
.browser { width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--surface-2); transform: perspective(1200px) rotateY(var(--ry, -6deg)); transition: transform .8s var(--ease-out); }
.card:hover .browser { --ry: 0deg; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.browser-bar span { margin-left: 10px; font-family: var(--font-mono); font-size: .72rem; color: var(--faint); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.browser img { width: 100%; height: auto; }

/* ============ Layers matrix ============ */
.matrix-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: clamp(10px, 2vw, 24px); overflow-x: auto; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 620px; table-layout: fixed; }
.matrix thead th:first-child { width: 30%; }
.matrix th, .matrix td { padding: 14px 10px; text-align: center; border-bottom: 1px solid var(--line); transition: background-color .25s, opacity .25s; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.matrix thead th { font-size: .8rem; font-weight: 600; color: var(--muted); vertical-align: bottom; cursor: default; }
.matrix thead th img { width: 30px; height: 30px; border-radius: 9px; margin: 0 auto 8px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.matrix tbody th { text-align: left; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.matrix tbody th small { display: block; font-weight: 400; color: var(--faint); font-size: .78rem; }
.matrix td { font-size: 0; color: transparent; }
.matrix td::before { content: ""; display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; transition: transform .35s var(--ease-out); }
.m-full::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.m-half::before { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--accent); }
.m-ring::before { box-shadow: inset 0 0 0 1.5px var(--review); }
.m-none::before { width: 10px !important; height: 1.5px !important; border-radius: 1px !important; background: var(--line-2); }
.matrix.hovering td, .matrix.hovering thead th[data-col] { opacity: .28; }
.matrix.hovering .hl { opacity: 1; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.matrix.hovering td.hl::before { transform: scale(1.18); }
.matrix-wrap.in td::before { animation: pop .5s var(--ease-out) backwards; animation-delay: calc(var(--d, 0) * 28ms); }
@keyframes pop { from { transform: scale(0); } }
.matrix-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 16px 10px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 0; font-size: .84rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.legend i.m-full { background: var(--accent); }
.legend i.m-half { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--accent); }
.legend i.m-ring { box-shadow: inset 0 0 0 1.5px var(--review); }
.matrix-note { margin: 0; font-size: .9rem; color: var(--text); }

/* ============ AI panels ============ */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 28px); align-items: start; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); position: relative; overflow: hidden; }
.panel-head { margin-bottom: 18px; }
.panel-kicker { font-size: .7rem; margin-bottom: 10px; color: var(--accent-text); }
.neg-context { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.neg-context span { font-size: .82rem; color: var(--muted); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.neg-context b { color: var(--text); }
.neg-form { display: flex; gap: 8px; padding: 6px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.neg-form:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.neg-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; padding: 0 14px; outline: none; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.presets button { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .8rem; padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.presets button:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.pipeline { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 4px; counter-reset: s; }
.pipeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 12px 12px; border-radius: 14px; transition: background-color .35s, opacity .35s; }
.pipeline li b { font-size: .95rem; }
.pipeline li p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.pipeline li.active { background: var(--surface-2); }
.pipeline li.skip { opacity: .42; }
.lamp { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; background: var(--line-2); transition: background-color .3s, box-shadow .3s; }
.lamp.ok { background: var(--live); box-shadow: 0 0 12px color-mix(in srgb, var(--live) 60%, transparent); }
.lamp.warn { background: var(--review); box-shadow: 0 0 12px color-mix(in srgb, var(--review) 60%, transparent); }
.lamp.bad { background: #ef5b5b; box-shadow: 0 0 12px rgba(239,91,91,.6); }
.panel-note { margin: 16px 0 0; font-size: .8rem; color: var(--faint); }
.seg-wide { display: flex; width: 100%; }
.seg-wide button { flex: 1; }
.meters { display: grid; gap: 40px; margin: 26px 0 0; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; color: var(--muted); margin-bottom: 10px; }
.meter-val { color: var(--text); font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.meter-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); border-radius: inherit; background: var(--live); transition: width .9s var(--ease-out), background-color .5s; }
.meter.over .meter-fill { background: #ef5b5b; }
.meter-limit { position: absolute; top: -6px; bottom: -6px; left: var(--at); width: 2px; background: var(--text); border-radius: 2px; }
.meter-limit em { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-style: normal; font-family: var(--font-mono); font-size: .66rem; color: var(--faint); white-space: nowrap; }
.verdict { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 18px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--live) 40%, transparent); background: color-mix(in srgb, var(--live) 8%, transparent); margin-top: 34px; transition: border-color .4s, background-color .4s; }
.verdict-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--live); position: relative; transition: background-color .4s; }
.verdict-icon::after { content: ""; position: absolute; left: 13px; top: 9px; width: 8px; height: 14px; border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); transition: all .3s; }
.verdict[data-verdict="fail"] { border-color: rgba(239,91,91,.45); background: rgba(239,91,91,.08); }
.verdict[data-verdict="fail"] .verdict-icon { background: #ef5b5b; }
.verdict[data-verdict="fail"] .verdict-icon::after { left: 17px; top: 8px; width: 2.5px; height: 20px; border: 0; background: var(--bg); transform: rotate(45deg); box-shadow: none; }
.verdict[data-verdict="fail"] .verdict-icon::before { content: ""; position: absolute; left: 17px; top: 8px; width: 2.5px; height: 20px; background: var(--bg); transform: rotate(-45deg); }
.verdict b { display: block; font-size: 1rem; }
.verdict p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.verdict code, .verdict-text code { font-family: var(--font-mono); font-size: .82rem; color: var(--text); }
.ai-more { list-style: none; padding: 0; margin: clamp(28px, 4vw, 44px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ai-more li { background: var(--bg); padding: 22px; font-size: .92rem; color: var(--muted); }
.ai-more b { color: var(--text); display: block; margin-bottom: 4px; }
.ai-more a { color: var(--text); }

/* ============ Experience ============ */
.exp-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.sticky-head { position: sticky; top: 110px; margin-bottom: 0; }
.edu { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .94rem; }
.edu b { color: var(--text); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 38px 30px; display: grid; gap: 6px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); transition: border-color .4s, background-color .4s; }
.timeline li.in::before { border-color: var(--accent-text); }
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.t-when { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }
.t-what h3 { margin: 0; font-size: 1.32rem; letter-spacing: -.02em; }
.t-what h3 a { text-decoration: none; background: linear-gradient(var(--accent-text), var(--accent-text)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.t-what h3 a:hover { background-size: 100% 1.5px; }
.t-role { margin: 4px 0 0; font-size: .9rem; color: var(--accent-text); }
.t-what p:last-child { margin: 8px 0 0; color: var(--muted); font-size: .97rem; }

/* ============ Words ============ */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 24px); }
.quote { margin: 0; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 26px; position: relative; overflow: hidden; transition: transform .5s var(--ease-out), border-color .3s; }
.quote:hover { transform: translateY(-4px); border-color: var(--line-2); }
.quote::before { content: "“"; position: absolute; right: 18px; top: -26px; font-family: var(--font-serif); font-size: 9rem; line-height: 1; color: var(--accent-text); opacity: .16; }
.quote blockquote { margin: 0; font-family: var(--font-serif); font-size: clamp(1.25rem, 1.9vw, 1.55rem); line-height: 1.32; letter-spacing: -.005em; }
.quote figcaption { display: grid; gap: 2px; font-size: .92rem; }
.quote figcaption span { color: var(--muted); }
.words-src { margin: 22px 0 0; color: var(--faint); font-size: .88rem; }

/* ============ Recognition ============ */
.recog-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: clamp(16px, 2vw, 24px); }
.prize { display: flex; flex-direction: column; gap: 10px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); text-decoration: none; position: relative; overflow: hidden; transition: transform .5s var(--ease-out); }
.prize:hover { transform: translateY(-4px) rotate(-.4deg); }
.prize::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; border: 22px solid rgba(0,0,0,.06); }
.prize-amt { font-size: clamp(3rem, 5.4vw, 4.6rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.prize-title { font-weight: 600; font-size: 1.08rem; }
.prize-sub { opacity: .75; font-size: .95rem; }
.prize .link-arrow { margin-top: auto; border-color: rgba(0,0,0,.25); align-self: flex-start; }
.pubs { padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; }
.pubs a { display: grid; gap: 4px; text-decoration: none; padding: 14px 0; border-top: 1px solid var(--line); transition: padding-left .3s var(--ease); }
.pubs a:hover { padding-left: 6px; }
.pubs a b { font-weight: 600; font-size: .98rem; line-height: 1.35; }
.pubs a span { font-size: .82rem; color: var(--faint); font-family: var(--font-mono); }

/* ============ Contact + footer ============ */
.contact { text-align: left; }
.contact-title { margin-top: 18px; font-size: clamp(2.4rem, 6.4vw, 5.6rem); }
.contact-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.copy-email { padding-right: 8px; }
.copy-hint { font-size: .78rem; font-family: var(--font-mono); background: rgba(0,0,0,.12); border-radius: 999px; padding: 5px 10px; }
.footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--faint); font-size: .86rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 160%); opacity: 0; visibility: hidden; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; z-index: 80; transition: transform .45s var(--ease-out), opacity .3s, visibility .3s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ============ Reveal ============ */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--rd, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .display.reveal { transform: translateY(34px); }
.js .display.reveal.in { transform: none; }

/* ============ View transition for theme ============ */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .board-wrap { max-width: 640px; }
  .board { transform: none; }
  .ai-more { grid-template-columns: 1fr 1fr; }
  .recog-grid { grid-template-columns: 1fr 1fr; }
  .prize { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .card { position: relative; top: auto; grid-template-columns: 1fr; }
  .card-visual { order: -1; }
  .phone { width: min(62vw, 250px); }
  .ai-grid { grid-template-columns: 1fr; }
  .exp-grid { grid-template-columns: 1fr; }
  .sticky-head { position: static; margin-bottom: 36px; }
  .quotes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(86%, 420px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .quotes::-webkit-scrollbar { display: none; }
  .quote { scroll-snap-align: start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .nav-cv { display: none; }
  .board { --fgap: 1.5px; }
  .ai-more { grid-template-columns: 1fr; }
  .recog-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
  .contact-row .btn { flex: 1 1 100%; }
  .neg-form { border-radius: 18px; flex-direction: column; }
  .matrix { min-width: 540px; }
  .matrix th, .matrix td { padding: 12px 6px; }
  .neg-form input { padding: 10px 12px; }
  .meter-top { font-size: .85rem; }
}
@media (hover: none) {
  .board { transform: none; }
  .card:hover .phone { --tilt: 0deg; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* portrait */
.who { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.who .eyebrow { margin: 4px 0 0; }
.who-pic { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 8px 24px -10px var(--glow); }
.who-name { margin: 0; font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.contact-grid { display: grid; grid-template-columns: 1fr minmax(220px, 320px); gap: 48px; align-items: center; }
.contact-pic { margin: 0; position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); }
.contact-pic img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.contact-pic figcaption { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .8rem; color: #fff; background: rgba(10, 10, 10, .6); backdrop-filter: blur(8px); }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-pic { max-width: 280px; order: -1; }
}

/* custom scrollbar */
:root { --sb-thumb: rgba(201, 244, 95, .38); --sb-thumb-hover: var(--accent); }
:root[data-theme="light"] { --sb-thumb: rgba(63, 106, 10, .45); --sb-thumb-hover: #3f6a0a; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --sb-thumb: rgba(63, 106, 10, .45); --sb-thumb-hover: #3f6a0a; } }
::-webkit-scrollbar { width: 12px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 999px; border: 3px solid var(--bg); background-clip: padding-box; min-height: 48px; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--sb-thumb-hover); background-clip: padding-box; border-width: 2px; }
::-webkit-scrollbar-corner { background: var(--bg); }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) var(--bg); } }

/* transparent header over the hero; frosted once scrolled */
.nav::before { opacity: 0; transition: opacity .35s var(--ease), border-color .3s; }
.nav.scrolled::before, .nav:has(.menu-toggle[aria-expanded="true"])::before { opacity: 1; }
.hero { margin-top: -68px; padding-top: calc(68px + clamp(48px, 8vw, 110px)); }
.dot-live { flex: none; }
.who .eyebrow { align-items: flex-start; } .who .eyebrow .dot-live { margin-top: .35em; }

/* mobile menu as an overlay (doesn't push the page down) */
.mobile-menu { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 68px); overflow-y: auto; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .55); animation: menu-in .28s var(--ease-out); }
.nav:has(.menu-toggle[aria-expanded="true"])::after { content: ""; position: fixed; inset: 68px 0 0; z-index: -1; background: rgba(0, 0, 0, .45); animation: fade-in .28s ease; }
html.menu-open { overflow: hidden; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mobile-menu, .nav::after { animation: none; } }

/* mobile menu — floating sheet */
.mobile-menu { top: calc(100% + 6px); left: 10px; right: 10px; display: flex; flex-direction: column; gap: 18px; padding: 10px 10px 14px; border: 1px solid var(--line-2); border-radius: 26px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05); max-height: calc(100dvh - 86px); transform-origin: top right; animation: sheet-in .34s var(--ease-out); }
.mm-links { display: grid; }
.mobile-menu a.mm-link { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border: 0; border-radius: 16px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; text-decoration: none; color: var(--text); transition: background-color .2s, color .2s; animation: item-in .45s var(--ease-out) both; animation-delay: calc(60ms + var(--i) * 40ms); }
.mm-num { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; color: var(--muted); min-width: 22px; }
.mm-label { flex: 1; }
.mm-arrow { font-size: 1.05rem; color: var(--muted); opacity: .5; transform: translateX(-6px); transition: transform .25s var(--ease-out), opacity .25s, color .25s; }
.mobile-menu a.mm-link:hover, .mobile-menu a.mm-link:focus-visible, .mobile-menu a.mm-link.active { background: var(--surface-2); }
.mobile-menu a.mm-link:hover .mm-arrow, .mobile-menu a.mm-link.active .mm-arrow { opacity: 1; transform: none; color: var(--accent-text); }
.mobile-menu a.mm-link.active .mm-num { color: var(--accent-text); }
.mm-foot { display: grid; gap: 12px; padding: 14px 12px 2px; border-top: 1px solid var(--line); animation: item-in .45s var(--ease-out) both; animation-delay: calc(60ms + var(--i) * 40ms); }
.mm-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mm-social { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-menu .mm-social a { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9rem; font-weight: 500; text-decoration: none; color: var(--text); transition: border-color .2s, background-color .2s; }
.mobile-menu .mm-social a:hover { border-color: var(--accent-text); background: var(--surface-2); }
.mobile-menu .mm-cv { margin-top: 2px; width: 100%; justify-content: center; }
.nav:has(.menu-toggle[aria-expanded="true"])::after { inset: 0; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes item-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .mm-link, .mm-foot { animation: none; } }

/* F1GPT RAG panel */
.panel.rag { margin-top: clamp(18px, 2.4vw, 28px); display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: clamp(20px, 3vw, 40px); align-items: center; }
.rag-art { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; }
.rag-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.panel.rag:hover .rag-art img { transform: scale(1.04); }
.rag-lede { margin: 0; color: var(--muted); max-width: 62ch; }
.rag-lede b { color: var(--text); }
.rag-flow { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; counter-reset: s; }
.rag-flow li { position: relative; padding: 12px 12px 11px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); counter-increment: s; }
.rag-flow li::before { content: "0" counter(s); display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.rag-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); z-index: 1; font-size: .8rem; color: var(--muted); background: var(--surface); border-radius: 50%; width: 12px; text-align: center; }
.rag-flow b { display: block; font-size: .95rem; }
.rag-flow span { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.panel.rag.in .rag-flow li, .panel.rag.is-visible .rag-flow li { animation: rag-pulse 5s var(--ease) infinite; animation-delay: calc(var(--i) * 1s); }
@keyframes rag-pulse { 0%, 22%, 100% { border-color: var(--line-2); box-shadow: none; } 8% { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--glow); } }
.panel.rag .chips { margin-top: 18px; }
@media (max-width: 900px) {
  .panel.rag { grid-template-columns: 1fr; }
  .rag-art { max-width: 240px; }
  .rag-flow { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .rag-flow li::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rag-flow li { animation: none !important; } }
.prize-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 22px; position: relative; z-index: 1; }
.prize-links .link-arrow { margin-top: 0; color: var(--accent-ink); }
