:root {
  --bg: #070b14;
  --bg2: #0c1222;
  --card: rgba(255, 255, 255, 0.035);
  --card-b: rgba(255, 255, 255, 0.08);
  --text: #e6e9f2;
  --muted: #98a2b8;
  --needle: #34d399;
  --pred: #fbbf24;
  --rand: #f87171;
  --ours: #60a5fa;
  --ours2: #a78bfa;
  --radius: 16px;
  --maxw: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, pre { font-family: "JetBrains Mono", ui-monospace, monospace; }
.c-needle { color: var(--needle); }
.c-pred { color: var(--pred); }
.c-rand { color: var(--rand); }

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - var(--maxw)) / 2)); background: rgba(7, 11, 20, 0.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background .3s;
}
.nav.scrolled { background: rgba(7, 11, 20, 0.85); }
.brand { font-weight: 800; color: #fff; letter-spacing: .02em; }
.brand span { color: var(--needle); }
.nav-links { display: flex; gap: 18px; flex: 1; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-gh { font-size: 13px; font-weight: 600; color: #fff; border: 1px solid var(--card-b); padding: 6px 14px; border-radius: 999px; }
.nav-gh:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }

/* hero */
.hero { position: relative; padding: 120px 16px 40px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; animation: float 18s ease-in-out infinite alternate; }
.b1 { width: 520px; height: 520px; background: #1d4ed8; top: -160px; left: -120px; }
.b2 { width: 460px; height: 460px; background: #059669; top: 80px; right: -140px; animation-delay: -6s; }
.b3 { width: 380px; height: 380px; background: #7c3aed; bottom: -180px; left: 35%; animation-delay: -12s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 40px) scale(1.15); } }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  animation: gridmove 30s linear infinite;
}
@keyframes gridmove { to { background-position: 48px 48px, 48px 48px; } }
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.eyebrow { color: var(--muted); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 14px; }
.title { font-size: clamp(32px, 5.2vw, 60px); line-height: 1.08; margin: 0 0 22px; font-weight: 800; letter-spacing: -.02em; }
.grad {
  background: linear-gradient(90deg, #34d399, #60a5fa, #a78bfa, #34d399); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 300% 0; } }
.authors { font-size: 18px; margin: 0 0 6px; }
.authors a { color: #dbeafe; }
.affil { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); margin: 0 0 22px; font-weight: 600; }
.affil img { height: 26px; background: #fff; border-radius: 6px; padding: 2px 6px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, rgba(96, 165, 250, .25), rgba(167, 139, 250, .25)); border: 1px solid rgba(147, 197, 253, .35);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(96, 165, 250, .3); text-decoration: none; }
.btn.disabled { opacity: .5; cursor: default; }
.btn.disabled:hover { transform: none; box-shadow: none; }
.btn small { font-size: 11px; opacity: .8; }

.hero-card {
  background: rgba(12, 18, 34, .72); border: 1px solid var(--card-b); border-radius: 22px; padding: 18px; max-width: 920px; margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset; backdrop-filter: blur(10px);
}
.hero-video-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.hero-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-badge {
  position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); transition: all .35s;
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; transition: background .35s, box-shadow .35s; }
.hero-badge.in .dot { background: var(--needle); box-shadow: 0 0 12px var(--needle); }
.hero-badge.in { color: var(--needle); box-shadow: 0 0 0 1px rgba(52, 211, 153, .5); }
.hero-speed { position: absolute; top: 14px; right: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .55); font: 600 13px "JetBrains Mono", monospace; }
.hero-timeline { margin: 16px 4px 6px; }
.ex-card { margin-bottom: 18px; max-width: 920px; }
.ex-card .hero-video-wrap { border-radius: 12px; }
.tl-track { position: relative; height: 14px; background: rgba(255, 255, 255, .08); border-radius: 999px; }
.tl-needle {
  position: absolute; top: -3px; bottom: -3px; background: linear-gradient(90deg, rgba(52, 211, 153, .55), rgba(52, 211, 153, .9));
  border-radius: 6px; box-shadow: 0 0 18px rgba(52, 211, 153, .45);
}
.tl-needle span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--needle); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tl-head { position: absolute; top: -6px; width: 3px; height: 26px; background: #fff; border-radius: 2px; box-shadow: 0 0 10px #fff; transform: translateX(-1px); }
.tl-ticks { position: relative; height: 18px; margin-top: 6px; font-size: 11px; color: var(--muted); font-family: "JetBrains Mono", monospace; }
.tl-ticks span { position: absolute; transform: translateX(-50%); }
.hero-q { text-align: left; margin: 10px 4px 4px; font-size: 15px; }
.q-tag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(96, 165, 250, .25); color: #bfdbfe; font-size: 12px; font-weight: 800; margin-right: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.opt { padding: 5px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--card-b); font-size: 14px; transition: all .4s; }
.opt.correct.show { border-color: var(--needle); background: rgba(52, 211, 153, .15); color: #d1fae5; }
.hero-cap { color: var(--muted); font-size: 14px; margin: 12px 4px 2px; text-align: left; }
.tldr { max-width: 860px; margin: 34px auto 0; font-size: 17px; color: #cbd5e1; }

/* stats */
.stats { max-width: var(--maxw); margin: 10px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.stats .stat { flex: 1 1 200px; max-width: 270px; }
.stat { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); padding: 18px 14px; text-align: center; }
.stat .num { font-size: 30px; font-weight: 800; background: linear-gradient(90deg, #34d399, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: 13px; line-height: 1.35; }

/* sections */
.section { max-width: var(--maxw); margin: 0 auto; padding: 90px 16px 10px; }
.h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 14px; letter-spacing: -.01em; }
.h3 { font-size: 22px; margin: 50px 0 8px; }
.kicker { font: 700 14px "JetBrains Mono", monospace; color: var(--needle); margin-right: 10px; vertical-align: middle; }
.lead { color: #c7cfe0; font-size: 17px; max-width: 900px; margin: 0 0 24px; }
.lead.small { font-size: 15px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); padding: 22px; }
.prose p { margin: 0; color: #cdd5e3; }
.figure { margin: 26px 0 0; }
.figure img { border-radius: 14px; background: #fff; padding: 10px; }
.figure figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.note { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.callout {
  margin-top: 22px; padding: 18px 22px; border-radius: var(--radius); border: 1px solid rgba(251, 191, 36, .35);
  background: linear-gradient(135deg, rgba(251, 191, 36, .10), rgba(248, 113, 113, .06)); color: #fde68a;
}
.callout b { color: #fff; }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ReGAP demo */
.demo-top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.seg { display: inline-flex; background: rgba(255, 255, 255, .05); border: 1px solid var(--card-b); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { background: none; border: 0; color: var(--muted); font: 600 14px Inter, sans-serif; padding: 8px 14px; border-radius: 9px; cursor: pointer; transition: all .25s; }
.seg button:hover { color: #fff; }
.seg button.on { background: rgba(96, 165, 250, .22); color: #fff; box-shadow: 0 0 0 1px rgba(147, 197, 253, .45) inset; }
.strip-wrap { position: relative; }
.strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.strip .fr { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; }
.strip .fr img { width: 100%; height: 100%; object-fit: cover; transition: filter .5s, opacity .5s, transform .5s; }
.strip .fr::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
  background: repeating-linear-gradient(45deg, rgba(248, 113, 113, .55) 0 6px, rgba(0, 0, 0, .6) 6px 12px); }
.strip .fr.del img { filter: grayscale(1) brightness(.35); transform: scale(.92); }
.strip .fr.del::after { opacity: 1; }
.strip .fr.in-needle { box-shadow: 0 -3px 0 var(--needle) inset; }
.lanes { margin-top: 10px; display: grid; gap: 6px; }
.lane { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 10px; }
.lane-lbl { font: 600 12px "JetBrains Mono", monospace; text-align: right; }
.lane-track { position: relative; height: 10px; background: rgba(255, 255, 255, .05); border-radius: 999px; }
.lane-track .sp { position: absolute; top: 0; bottom: 0; border-radius: 999px; transition: left .5s, width .5s, opacity .5s; }
#laneNeedle .sp { background: var(--needle); box-shadow: 0 0 10px rgba(52, 211, 153, .5); }
#lanePred .sp { background: var(--pred); box-shadow: 0 0 10px rgba(251, 191, 36, .5); }
#laneRand .sp { background: var(--rand); opacity: .35; }
#laneRand.active .sp { opacity: 1; box-shadow: 0 0 10px rgba(248, 113, 113, .5); }
.demo-bottom { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; margin-top: 18px; align-items: start; }
.qbox { font-size: 15px; color: #dbe2ee; }
.qbox .ans { display: block; margin-top: 8px; color: var(--needle); font-weight: 600; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 150px 1fr 54px; align-items: center; gap: 10px; font-size: 13.5px; }
.bar .bt { height: 16px; background: rgba(255, 255, 255, .06); border-radius: 999px; overflow: hidden; }
.bar .bf { height: 100%; width: 0; border-radius: 999px; transition: width .9s cubic-bezier(.2, .8, .2, 1), background .5s; }
.bar .bv { font: 600 13px "JetBrains Mono", monospace; text-align: right; }
.bar .bn { color: #cbd5e1; }
.bar.ours .bf { background: linear-gradient(90deg, var(--ours), var(--ours2)); }
.bar.other .bf { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.formula { margin-top: 18px; padding: 18px 22px; border-radius: var(--radius); background: rgba(52, 211, 153, .06); border: 1px solid rgba(52, 211, 153, .25); }
.formula .fx { font: 600 17px "JetBrains Mono", monospace; color: #d1fae5; margin-bottom: 6px; }
.formula p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ReliaNeedle build: all rows use the frame width of the merged row (--nf frames, set by main.js), so each frame sits above its place */
.build { position: relative; display: grid; gap: 14px; --nf: 10; --fw: calc((100% - (var(--nf) - 1) * 4px) / var(--nf)); }
.build-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; }
.row-lbl { font-weight: 700; font-size: 14px; }
.row-lbl small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.row-frames { display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.row-frames img { flex: none; width: var(--fw); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.row-frames .slot { flex: none; align-self: stretch; border: 1.5px dashed rgba(52, 211, 153, .55); border-radius: 5px; background: rgba(52, 211, 153, .06); }
.row-frames.needle-row img { box-shadow: 0 0 0 2px var(--needle); }
.merged img { opacity: 0; transform: translateY(var(--from, -30px)); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.merged img.n { box-shadow: 0 0 0 2px var(--needle), 0 0 16px rgba(52, 211, 153, .5); }
.merged img.show { opacity: 1; transform: none; }
.replay { justify-self: end; background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--card-b); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.replay:hover { color: #fff; }

/* leaderboard */
.table-card { padding: 16px 18px; overflow-x: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg.ours::before { background: linear-gradient(90deg, var(--ours), var(--ours2)); }
.lg.backbone::before { background: #94a3b8; }
.lg.tgr::before { background: #f59e0b; }
table.lb { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.lb th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--card-b); cursor: pointer; user-select: none; white-space: nowrap; }
.lb th.sorted { color: #fff; }
.lb td { padding: 9px 8px; border-bottom: 1px solid rgba(255, 255, 255, .04); white-space: nowrap; }
.lb tr.ours td { background: rgba(96, 165, 250, .07); }
.lb tr.ours td:first-child { font-weight: 700; color: #dbeafe; }
.lb tr.backbone td:first-child { color: #cbd5e1; font-style: italic; }
.lb .rg { display: grid; grid-template-columns: 1fr 56px; align-items: center; gap: 8px; min-width: 230px; }
.lb .rg .t { position: relative; height: 10px; background: rgba(255, 255, 255, .05); border-radius: 999px; }
.lb .rg .f { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; transition: width 1s cubic-bezier(.2, .8, .2, 1); width: 0; }
.lb tr.ours .f { background: linear-gradient(90deg, var(--ours), var(--ours2)); }
.lb tr.backbone .f { background: #94a3b8; }
.lb tr.tgr .f { background: #f59e0b; }
.lb .rg .v { font: 600 13px "JetBrains Mono", monospace; text-align: right; }
.lb td.num { font-family: "JetBrains Mono", monospace; font-size: 13.5px; color: #cbd5e1; }
.lb td.neg { color: var(--rand); }
.lb tbody tr { transition: transform .4s; }

/* EviCe certification */
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cert { position: relative; }
.cert h4 { margin: 0 0 4px; font-size: 15px; }
.cert .cq { color: #cbd5e1; font-size: 14px; margin: 0 0 12px; min-height: 66px; }
.cert .cstrip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.cert .cstrip .fr { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; }
.cert .cstrip .fr img { width: 100%; height: 100%; object-fit: cover; transition: filter .5s, opacity .5s; }
.cert .cstrip .fr.ev { box-shadow: 0 0 0 2px var(--needle) inset; }
.cert .cstrip .fr.dim img { filter: brightness(.18) grayscale(1); }
.cert .cstrip .fr.cut img { filter: brightness(.2) grayscale(1); }
.cert .cstrip .fr.cut::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(248, 113, 113, .5) 0 5px, rgba(0, 0, 0, .55) 5px 10px); }
.cert .ctl { position: relative; height: 8px; margin: 8px 0 2px; background: rgba(255, 255, 255, .05); border-radius: 999px; }
.cert .ctl .sp { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--needle); box-shadow: 0 0 10px rgba(52, 211, 153, .5); }
.cert .ctl-lbl { display: flex; justify-content: space-between; font: 11px "JetBrains Mono", monospace; color: var(--muted); }
.cert .modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.cert .mode { border: 1px solid var(--card-b); border-radius: 12px; padding: 10px; font-size: 12.5px; transition: all .4s; cursor: pointer; background: rgba(255, 255, 255, .02); }
.cert .mode .mt { font-weight: 700; font-size: 13px; color: #e2e8f0; }
.cert .mode .jr { margin-top: 6px; color: var(--muted); line-height: 1.4; }
.cert .mode.on { border-color: rgba(147, 197, 253, .6); background: rgba(96, 165, 250, .10); transform: translateY(-2px); }
.cert .ok { color: var(--needle); font-weight: 700; }
.cert .bad { color: var(--rand); font-weight: 700; }
.cert .verdict { margin-top: 12px; font-size: 13.5px; color: var(--needle); font-weight: 600; }

.audit { display: grid; grid-template-columns: .9fr 1.4fr; gap: 26px; margin-top: 22px; align-items: center; }
.audit h4 { margin: 0 0 6px; }
.audit p { color: var(--muted); margin: 0; font-size: 14.5px; }
.ab { display: grid; grid-template-columns: 140px 1fr 58px; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 8px; }
.ab-track { height: 14px; background: rgba(255, 255, 255, .06); border-radius: 999px; overflow: hidden; }
.ab-fill { height: 100%; width: 0; background: linear-gradient(90deg, #f59e0b, #f87171); border-radius: 999px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.ab.ours .ab-fill { background: linear-gradient(90deg, var(--needle), #10b981); }
.ab b { font: 600 13px "JetBrains Mono", monospace; text-align: right; }
.ab.ours span, .ab.ours b { color: var(--needle); }
.ab-cap { font-size: 12.5px !important; margin-top: 6px !important; }

/* kale stepper */
.steps-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.steps-nav button { background: rgba(255, 255, 255, .04); border: 1px solid var(--card-b); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: 600 12.5px Inter, sans-serif; cursor: pointer; transition: all .25s; }
.steps-nav button.on { color: #fff; border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .12); }
.steps-nav button.done { color: #cbd5e1; }
.kale-q { font-size: 15px; color: #dbe2ee; margin-bottom: 12px; }
.kale-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.kale-strip .fr { aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; }
.kale-strip .fr img { width: 100%; height: 100%; object-fit: cover; transition: filter .5s; }
.kale-strip .fr.dim img { filter: brightness(.25) grayscale(.8); }
.kale-svg { width: 100%; height: auto; aspect-ratio: 1000 / 150; margin-top: 8px; display: block; }
.kale-svg text { font-family: "JetBrains Mono", monospace; }
.kale-panel { min-height: 120px; margin-top: 8px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--card-b); font-size: 14.5px; color: #d4dbe8; }
.kale-panel h5 { margin: 0 0 6px; font-size: 14px; color: #fff; }
.kale-panel .mono { font-family: "JetBrains Mono", monospace; font-size: 13px; color: #cbd5e1; }
.kale-panel .caps { display: grid; gap: 4px; max-height: 150px; overflow: auto; }
.kale-panel .cap { font-size: 13px; color: var(--muted); }
.kale-panel .cap.hit { color: #d1fae5; }
.kale-panel .cap b { font-family: "JetBrains Mono", monospace; color: #94a3b8; margin-right: 6px; }
.kale-panel .cap.hit b { color: var(--needle); }
.kale-panel .jt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kale-panel .jt td, .kale-panel .jt th { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, .06); text-align: left; }
.kale-panel .frames { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 8px; }
.kale-panel .frames img { border-radius: 4px; box-shadow: 0 0 0 2px var(--needle); }
.kale-ctrl { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.kale-ctrl button { background: rgba(255, 255, 255, .05); border: 1px solid var(--card-b); color: #e2e8f0; padding: 7px 14px; border-radius: 10px; cursor: pointer; font: 600 13px Inter, sans-serif; }
.kale-ctrl button:hover { background: rgba(255, 255, 255, .1); }

/* recipe */
.takeaways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tk { position: relative; padding-top: 26px; }
.tk-n { position: absolute; top: -14px; left: 18px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--needle), var(--ours)); color: #04111f; }
.tk h4 { margin: 0 0 6px; font-size: 16px; }
.tk p { margin: 0; color: var(--muted); font-size: 14px; }
.fix { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; }
.fix .note { grid-column: 1 / -1; }
.fx-col h5 { margin: 0 0 10px; color: #cbd5e1; font-size: 14px; }
.fb { display: grid; grid-template-columns: 150px 1fr 56px; gap: 10px; align-items: center; font-size: 13.5px; margin-bottom: 9px; }
.fb-track { height: 14px; background: rgba(255, 255, 255, .06); border-radius: 999px; overflow: hidden; }
.fb-fill { height: 100%; width: 0; border-radius: 999px; background: #64748b; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.fb-fill.ours { background: linear-gradient(90deg, var(--ours), var(--ours2)); box-shadow: 0 0 14px rgba(96, 165, 250, .45); }
.fb b { font: 600 13px "JetBrains Mono", monospace; text-align: right; }

/* resources & bib */
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.res { display: block; color: inherit; transition: transform .25s, border-color .25s; }
.res:hover { transform: translateY(-4px); border-color: rgba(147, 197, 253, .5); text-decoration: none; }
.res h4 { margin: 0 0 6px; color: #fff; }
.res p { margin: 0; color: var(--muted); font-size: 14px; }
.bib { position: relative; }
.bib pre { margin: 0; white-space: pre-wrap; font-size: 13.5px; color: #cbd5e1; }
.copy { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--card-b); color: #e2e8f0; padding: 5px 12px; border-radius: 8px; cursor: pointer; font: 600 12px Inter, sans-serif; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 60px 16px 40px; }

/* responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .stats .stat { flex-basis: 40%; }
  .demo-bottom, .cert-grid, .audit, .takeaways, .fix { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: repeat(12, 1fr); }
  .build-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bar { grid-template-columns: 110px 1fr 50px; }
}
@media (max-width: 560px) {
  .res-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 96px; }
  .ab, .fb { grid-template-columns: 110px 1fr 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .grid, .grad { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

.sound-btn {
  position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .25); font: 600 13px Inter, sans-serif; cursor: pointer;
  backdrop-filter: blur(6px); transition: background .25s, border-color .25s; z-index: 2;
}
.sound-btn:hover { background: rgba(52, 211, 153, .25); border-color: rgba(52, 211, 153, .7); }
.sound-btn.on { border-color: rgba(52, 211, 153, .7); }

/* ReGAP section v2 */
.dotc { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.bars-title { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-family: "JetBrains Mono", monospace; }
.bar { opacity: .55; transition: opacity .3s; }
.bar.sel { opacity: 1; }
.small-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.fcard { margin-top: 18px; }
.f-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.f-step { position: relative; padding: 18px 18px 14px; border-radius: 14px; background: rgba(255, 255, 255, .025); border: 1px solid var(--card-b); }
.f-num { position: absolute; top: -12px; left: 16px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, var(--needle), var(--ours)); color: #04111f; }
.f-step h4 { margin: 4px 0 8px; font-size: 15.5px; }
.f-step p, .f-step li { color: #c7cfe0; font-size: 14px; }
.f-step ul { margin: 6px 0 0; padding-left: 18px; }
.f-step li { margin-bottom: 4px; }
.tex-block { margin: 10px 0; padding: 10px 6px; border-radius: 10px; background: rgba(52, 211, 153, .06); border: 1px solid rgba(52, 211, 153, .22); overflow-x: auto; color: #e7fff5; }
.katex { color: inherit; font-size: 1.04em; }
.tex-block .katex-display { margin: 0; }
.f-scale { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.f-scale span { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--card-b); font-size: 13px; color: var(--muted); }
.f-scale b { color: #fff; margin-right: 6px; }
.f-live { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: rgba(96, 165, 250, .07); border: 1px solid rgba(147, 197, 253, .3); }
.f-live .lv-h { font-size: 14px; color: #dbeafe; margin-bottom: 4px; }
.f-live .lv-row { overflow-x: auto; }
.f-live .katex-display { margin: 6px 0; }
.f-live .lv-p { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
@media (max-width: 900px) { .f-steps { grid-template-columns: 1fr; } }
