/* ───────────── Tokens ───────────── */
:root {
  color-scheme: dark;
  --void: oklch(0.13 0.018 255);
  --deep: oklch(0.17 0.02 255);
  --hull: oklch(0.21 0.022 255);
  --plate: oklch(0.26 0.022 255);
  --rivet: oklch(0.36 0.02 255);
  --dust: oklch(0.58 0.02 255);
  --haze: oklch(0.76 0.015 255);
  --star: oklch(0.95 0.01 230);

  --cyan: oklch(0.83 0.14 205);
  --cyan-dim: oklch(0.62 0.11 210);
  --cyan-ghost: oklch(0.83 0.14 205 / 0.12);
  --amber: oklch(0.82 0.14 75);
  --coral: oklch(0.7 0.17 25);
  --mint: oklch(0.82 0.14 160);
  --violet: oklch(0.72 0.12 290);

  --f-display: "Syne", sans-serif;
  --f-body: "Instrument Sans", sans-serif;
  --f-mono: "JetBrains Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--haze);
  font-family: var(--f-body);
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--cyan); color: var(--void); }
a { color: var(--cyan); text-underline-offset: 3px; }
strong { color: var(--star); font-weight: 600; }
code, kbd {
  font-family: var(--f-mono);
  font-size: 0.86em;
  color: var(--cyan);
  background: var(--cyan-ghost);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* ───────────── Space background ───────────── */
#cosmos {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main { position: relative; z-index: 2; }

/* ───────────── HUD nav ───────────── */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dust);
  background: linear-gradient(var(--void), transparent);
}
.hud .brand { color: var(--star); font-weight: 700; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.hud .brand i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2.4s infinite var(--ease-out);
}
.hud nav { display: flex; gap: 18px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.hud nav a { color: inherit; text-decoration: none; white-space: nowrap; transition: color .3s; }
.hud nav a:hover, .hud nav a.on { color: var(--cyan); }
.hud .gauge { width: 90px; height: 3px; background: var(--plate); position: relative; flex: none; }
.hud .gauge b { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
@media (max-width: 760px) { .hud nav { display: none; } .hud .gauge { margin-left: auto; } }

@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .5; } }

/* ───────────── Sections ───────────── */
section { padding: clamp(80px, 14vh, 160px) var(--gutter); position: relative; }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cyan); display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
h1, h2, h3 { font-family: var(--f-display); color: var(--star); margin: 0; line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(32px, 4.6vw, 64px); font-weight: 700; max-width: 21ch; }
h3 { font-size: clamp(20px, 1.6vw, 26px); font-weight: 600; letter-spacing: -0.01em; }
.lede { font-size: clamp(17px, 1.2vw, 21px); max-width: 60ch; color: var(--haze); margin: 24px 0 0; }
.note { font-size: 13px; color: var(--dust); }
.src { font-family: var(--f-mono); font-size: 11px; color: var(--dust); text-decoration: none; border-bottom: 1px dotted var(--rivet); }
.src:hover { color: var(--cyan); }

/* ───────────── Hero ───────────── */
.hero { min-height: 100svh; display: grid; align-content: end; padding-bottom: 12vh; }
.hero h1 { font-size: clamp(44px, 7.4vw, 124px); font-weight: 800; line-height: 0.88; letter-spacing: -0.045em; }
.hero h1 span { display: block; }
.hero h1 .thin { font-weight: 400; color: var(--cyan); letter-spacing: -0.03em; }
.hero .meta { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 80px); margin-top: 48px; align-items: end; }
.readout { font-family: var(--f-mono); font-size: 12px; color: var(--dust); letter-spacing: .08em; text-transform: uppercase; }
.readout b { display: block; font-family: var(--f-display); font-size: clamp(28px, 3vw, 44px); color: var(--star); letter-spacing: -0.02em; text-transform: none; font-weight: 700; }
.readout b em { font-style: normal; color: var(--cyan); }
.scroll-cue { margin-left: auto; display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; color: var(--dust); }
.scroll-cue i { width: 1px; height: 48px; background: linear-gradient(var(--cyan), transparent); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }

.readout .unit { display: block; margin-top: 6px; font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; color: var(--dust); text-transform: none; }

/* ───────────── Glossaire ───────────── */
.glossary { margin: 56px 0 0; border-top: 1px solid var(--plate); }
.glossary > div {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px clamp(24px, 5vw, 72px);
  padding: 26px 0; border-bottom: 1px solid var(--plate); align-items: baseline;
}
.glossary dt { font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 38px); font-weight: 700; color: var(--star); letter-spacing: -0.02em; text-shadow: 0 0 18px var(--void); }
.glossary dd { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 28px; align-items: baseline; }
.glossary dd p { margin: 0; max-width: 58ch; text-shadow: 0 0 14px var(--void); }
.glossary .analogy {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan);
  white-space: nowrap; padding: 6px 10px; border: 1px solid color-mix(in oklch, var(--cyan) 35%, transparent); border-radius: 999px;
}
@media (max-width: 820px) {
  .glossary > div, .glossary dd { grid-template-columns: 1fr; }
  .glossary .analogy { justify-self: start; white-space: normal; }
}

/* ───────────── « Pour les curieux » ───────────── */
details.deep { margin-top: 18px; border: 1px dashed var(--rivet); border-radius: 6px; background: color-mix(in oklch, var(--void) 70%, transparent); }
details.deep summary {
  cursor: pointer; list-style: none; padding: 10px 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dust); display: flex; align-items: center; gap: 10px; transition: color .25s;
}
details.deep summary::-webkit-details-marker { display: none; }
details.deep summary::before { content: "+"; color: var(--cyan); font-size: 14px; width: 12px; transition: transform .3s var(--ease-out); }
details.deep[open] summary::before { transform: rotate(45deg); }
details.deep summary:hover, details.deep summary:focus-visible { color: var(--cyan); }
details.deep summary:focus-visible { outline: 1px dashed var(--cyan); outline-offset: 2px; }
details.deep > p { margin: 0; padding: 0 14px 14px; font-size: 13px; color: var(--haze); line-height: 1.6; }
details.deep[open] > p { animation: logIn .45s var(--ease-out); }
.duel-head .side .note { margin: 10px 0 0; }

/* ───────────── Split layout ───────────── */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: 56px; }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.sticky { position: sticky; top: 90px; }
@media (max-width: 920px) { .split, .split.rev { grid-template-columns: 1fr; } .sticky { position: static; } }
h2, h3, .lede, .note, .eyebrow, .readout, .kv, .big-num, .verdict-grid li { text-shadow: 0 0 18px var(--void), 0 0 4px var(--void); }

/* ───────────── Panels (instrument plates) ───────────── */
.plate {
  background: color-mix(in oklch, var(--deep) 88%, transparent);
  border: 1px solid var(--plate);
  border-radius: 6px;
  position: relative;
  backdrop-filter: blur(6px);
}
.plate::before, .plate::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--cyan-dim); border-style: solid;
}
.plate::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.plate::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.plate-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--plate);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dust);
}
.plate-body { padding: 20px 18px; }

/* ───────────── /context terminal replica ───────────── */
.term { font-family: var(--f-mono); font-size: 13px; color: var(--haze); }
.term .prompt { color: var(--dust); margin-bottom: 14px; }
.term .prompt b { color: var(--cyan); font-weight: 400; }
.ctx-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-bottom: 18px; }
.ctx-grid i {
  aspect-ratio: 1; border-radius: 2px; background: var(--plate);
  transition: background .5s var(--ease-out), transform .5s var(--ease-out), box-shadow .5s;
}
.ctx-grid i.pop { transform: scale(1.35); }
.legend { display: grid; gap: 6px; }
.legend div { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 12px; }
.legend s { width: 10px; height: 10px; border-radius: 2px; text-decoration: none; }
.legend span:nth-child(3) { color: var(--star); text-align: right; min-width: 64px; }
.legend span:nth-child(4) { color: var(--dust); text-align: right; min-width: 48px; }

/* ───────────── Controls ───────────── */
.ctrl {
  display: grid; gap: 18px; padding: 22px; border: 1px solid var(--plate); border-radius: 6px;
  background: color-mix(in oklch, var(--void) 72%, transparent); backdrop-filter: blur(10px);
}
.ctrl label { display: grid; gap: 8px; font-size: 14px; }
.ctrl .row { display: flex; justify-content: space-between; gap: 12px; }
.ctrl .row output { font-family: var(--f-mono); color: var(--cyan); font-size: 13px; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--cyan) var(--p, 50%), var(--plate) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 2px; background: var(--plate); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--cyan); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%;
  background: var(--void); border: 2px solid var(--cyan); box-shadow: 0 0 10px var(--cyan);
}
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--void); border: 2px solid var(--cyan); }
input[type=range]:focus-visible { outline: 1px dashed var(--cyan); outline-offset: 4px; }

.seg { display: inline-flex; border: 1px solid var(--rivet); border-radius: 4px; overflow: hidden; }
.seg button { border-radius: 0; border: 0; border-right: 1px solid var(--rivet); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed=true] { background: var(--cyan); color: var(--void); }

button, .btn {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  background: transparent; color: var(--haze); border: 1px solid var(--rivet); border-radius: 4px;
  padding: 10px 14px; cursor: pointer; transition: all .25s var(--ease-out);
}
button:hover { border-color: var(--cyan); color: var(--cyan); }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
button.primary { background: var(--cyan); color: var(--void); border-color: var(--cyan); font-weight: 700; }
button.primary:hover { background: var(--star); border-color: var(--star); color: var(--void); }
button.warn { border-color: var(--amber); color: var(--amber); }
button.warn:hover { background: var(--amber); color: var(--void); }
button:disabled { opacity: .35; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ───────────── Turn / resend animation ───────────── */
.pipe { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; min-height: 260px; }
.pipe .node { text-align: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dust); }
.pipe .node .orb { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; border: 1px solid var(--rivet); display: grid; place-items: center; position: relative; }
.pipe .node .orb::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed var(--cyan-dim); animation: spin 14s linear infinite; }
.pipe .node.api .orb { border-color: var(--cyan); box-shadow: 0 0 30px var(--cyan-ghost), inset 0 0 20px var(--cyan-ghost); }
.pipe .beam { position: relative; height: 180px; min-width: 120px; }
.stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; width: 100%; height: 100%; }
.stack i { flex: 1 1 0; max-height: 7px; min-height: 1px; border-radius: 1px; background: var(--cyan-dim); transition: background .5s, box-shadow .5s; }
.dot { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan), 0 0 30px var(--cyan); pointer-events: none; }
.dot.back { background: var(--amber); box-shadow: 0 0 14px var(--amber), 0 0 30px var(--amber); }
.stack i.sys { background: var(--violet); }
.stack i.new { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.stack i.out { background: var(--amber); }
.packet { position: absolute; left: 0; top: 50%; width: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

.big-num { font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 5vw, 76px); color: var(--star); letter-spacing: -0.03em; line-height: 1; }
.big-num small { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dust); font-weight: 400; margin-top: 10px; }
.q-result .big-num small, .kv .big-num small { display: inline; margin-left: 6px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; margin-top: 20px; }
.kv dt { color: var(--dust); }
.kv dd { margin: 0; font-family: var(--f-mono); color: var(--star); text-align: right; }

/* ───────────── Session simulator ───────────── */
.sim-bar { position: relative; height: 54px; border: 1px solid var(--rivet); border-radius: 4px; overflow: hidden; background: var(--void); }
.sim-bar .seg-fill { position: absolute; top: 0; bottom: 0; transition: width .6s var(--ease-out), left .6s var(--ease-out), background .4s; }
.sim-bar .thresh { position: absolute; top: -1px; bottom: -1px; width: 0; border-left: 1px dashed var(--amber); z-index: 3; }
.sim-bar .thresh span { position: absolute; top: 2px; left: 6px; font-family: var(--f-mono); font-size: 10px; color: var(--amber); white-space: nowrap; }
.sim-scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 10px; color: var(--dust); margin-top: 6px; }
.log {
  font-family: var(--f-mono); font-size: 12px; height: 210px; overflow-y: auto; margin-top: 16px; padding: 12px;
  background: var(--void); border: 1px solid var(--plate); border-radius: 4px; scrollbar-width: thin; scrollbar-color: var(--rivet) transparent;
}
.log p { margin: 0 0 4px; opacity: 0; animation: logIn .5s var(--ease-out) forwards; }
.log p .t { color: var(--dust); }
.log p.warn { color: var(--amber); }
.log p.bad { color: var(--coral); }
.log p.good { color: var(--mint); }
@keyframes logIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ───────────── Compaction stage ───────────── */
.collapse-stage { position: relative; height: 380px; overflow: hidden; }
.collapse-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.collapse-caption { position: absolute; left: 18px; bottom: 16px; right: 18px; font-family: var(--f-mono); font-size: 12px; color: var(--haze); }
.steps { counter-reset: s; display: grid; gap: 4px; }
.steps li {
  list-style: none; counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--plate); opacity: .38; transition: opacity .5s;
}
.steps li.on { opacity: 1; }
.steps li::before { content: "0" counter(s); font-family: var(--f-mono); font-size: 12px; color: var(--cyan); padding-top: 3px; }
.steps { padding: 0; margin: 0; }

.keeplose { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--plate); margin-top: 32px; border: 1px solid var(--plate); }
.keeplose > div { background: var(--deep); padding: 20px; }
.keeplose h4 { margin: 0 0 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.keeplose ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.keeplose li { padding-left: 18px; position: relative; }
.keeplose li::before { position: absolute; left: 0; font-family: var(--f-mono); }
.keep h4 { color: var(--mint); } .keep li::before { content: "+"; color: var(--mint); }
.lose h4 { color: var(--coral); } .lose li::before { content: "−"; color: var(--coral); }
@media (max-width: 640px) { .keeplose { grid-template-columns: 1fr; } }

/* ───────────── Charts ───────────── */
.chart-box { position: relative; height: 320px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--plate); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; border-radius: 0; border-bottom: 2px solid transparent; padding: 12px 16px; color: var(--dust); }
.tabs button[aria-selected=true] { color: var(--cyan); border-bottom-color: var(--cyan); }
.fact-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--plate); margin-top: 56px; }
.fact-strip > div { padding: 24px 24px 24px 0; border-right: 1px solid var(--plate); margin-right: 24px; }
.fact-strip > div:last-child { border-right: 0; }
.fact-strip b { display: block; font-family: var(--f-display); font-size: clamp(30px, 3vw, 46px); color: var(--star); letter-spacing: -.03em; line-height: 1.1; }
.fact-strip p { margin: 8px 0 6px; font-size: 14px; }

/* ───────────── Duel ───────────── */
.duel-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: end; margin-top: 56px; }
.duel-head .vs { font-family: var(--f-display); font-size: 28px; color: var(--dust); padding-bottom: 8px; }
.duel-head .side h3 { font-size: clamp(22px, 2.4vw, 34px); }
.duel-head .side.b { text-align: right; }
.duel-head .tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.side.a .tag { color: var(--cyan); } .side.b .tag { color: var(--violet); }
@media (max-width: 720px) { .duel-head { grid-template-columns: 1fr; } .duel-head .side.b { text-align: left; } .duel-head .vs { display: none; } }

.lanes { display: grid; gap: 28px; margin-top: 32px; }
.lane-label { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dust); margin-bottom: 8px; }
.lane { position: relative; height: 90px; border-bottom: 1px solid var(--plate); }
.lane svg { width: 100%; height: 100%; overflow: visible; }

.verdict-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--plate); border: 1px solid var(--plate); margin-top: 40px; }
.verdict-grid > div { background: var(--deep); padding: 24px; }
.verdict-grid h4 { margin: 0 0 14px; font-family: var(--f-display); font-size: 18px; color: var(--star); font-weight: 600; }
.verdict-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 14px; }
.verdict-grid li { position: relative; padding-left: 26px; }
.verdict-grid li::before { position: absolute; left: 0; top: 5px; font-family: var(--f-mono); font-weight: 700; font-size: 11px; }
.verdict-grid li.p::before { content: "▲"; color: var(--mint); }
.verdict-grid li.m::before { content: "▼"; color: var(--coral); }
@media (max-width: 720px) { .verdict-grid { grid-template-columns: 1fr; } }

.metrics { margin-top: 24px; border: 1px solid var(--plate); background: color-mix(in oklch, var(--deep) 92%, transparent); font-family: var(--f-mono); font-size: 14px; }
.metrics > div { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding: 11px 16px; border-top: 1px solid var(--plate); align-items: baseline; }
.metrics > div:first-child { border-top: 0; }
.metrics span { text-align: right; }
.metrics .k { text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dust); }
.metrics span:nth-child(2) { color: var(--cyan); }
.metrics span:nth-child(3) { color: var(--violet); }
.metrics span:nth-child(4) { color: var(--coral); }
.metrics .head span { font-size: 11px; letter-spacing: .14em; font-weight: 700; }
@media (max-width: 520px) {
  .metrics { font-size: 13px; }
  .metrics > div { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 12px; gap: 4px 8px; }
  .metrics .k { grid-column: 1 / -1; }
  .metrics .head span:first-child { display: none; }
  .metrics span:nth-child(2) { text-align: left; }
}

/* ───────────── Forfait + indice ───────────── */
.forfait {
  margin-top: 48px; padding: clamp(20px, 3vw, 32px); max-width: 880px;
  border-left: 2px solid var(--cyan); background: color-mix(in oklch, var(--void) 78%, transparent);
}
.forfait h3 { margin-bottom: 12px; }
.forfait p { margin: 0 0 12px; }
.duel-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--plate); border: 1px solid var(--plate); }
.duel-index > div { background: color-mix(in oklch, var(--deep) 92%, transparent); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.duel-index .k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.duel-index b { font-family: var(--f-display); font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -0.03em; font-weight: 700; }
.duel-index .note { margin: 0; }
.duel-says { margin: 16px 0 0; font-size: 16px; text-shadow: 0 0 14px var(--void); }
@media (max-width: 520px) { .duel-index { grid-template-columns: 1fr; } }

/* ───────────── Decay chain (months) ───────────── */
.chain { display: grid; gap: 10px; margin-top: 28px; }

/* ───────────── Quiz ───────────── */
.quiz { max-width: 860px; margin: 56px auto 0; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-family: var(--f-mono); font-size: 12px; color: var(--dust); }
.quiz-progress { display: flex; gap: 4px; }
.quiz-progress i { width: 22px; height: 3px; background: var(--plate); transition: background .4s; }
.quiz-progress i.ok { background: var(--mint); } .quiz-progress i.ko { background: var(--coral); } .quiz-progress i.cur { background: var(--cyan); }
.q-card { padding: clamp(22px, 4vw, 44px); }
.q-card h3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; margin-bottom: 28px; }
.q-opts { display: grid; gap: 10px; }
.q-opts button {
  text-align: left; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 16px;
  padding: 16px 18px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; color: var(--haze);
}
.q-opts button kbd { background: transparent; border: 1px solid var(--rivet); color: var(--dust); padding: 0 6px; text-align: center; }
.q-opts button.ok { border-color: var(--mint); color: var(--mint); background: oklch(0.82 0.14 160 / .08); }
.q-opts button.ko { border-color: var(--coral); color: var(--coral); background: oklch(0.7 0.17 25 / .08); }
.q-explain { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--rivet); font-size: 15px; display: none; }
.q-explain.on { display: block; animation: logIn .5s var(--ease-out); }
.q-foot { display: flex; justify-content: flex-end; margin-top: 22px; }
.q-result { text-align: center; }
.q-result .big-num { font-size: clamp(64px, 10vw, 140px); }

/* ───────────── Sources ───────────── */
.sources { columns: 2 320px; column-gap: 48px; margin-top: 40px; font-size: 14px; padding-left: 0; list-style: none; }
.sources li { break-inside: avoid; margin-bottom: 14px; padding-left: 28px; position: relative; }
.sources li::before { content: attr(data-n); position: absolute; left: 0; font-family: var(--f-mono); font-size: 11px; color: var(--cyan); top: 3px; }
.sources a { color: var(--haze); }
.sources a:hover { color: var(--cyan); }
footer { padding: 40px var(--gutter) 60px; font-family: var(--f-mono); font-size: 11px; color: var(--dust); position: relative; z-index: 2; border-top: 1px solid var(--plate); }

/* ───────────── Reveal ───────────── */
.rv { opacity: 0; transform: translateY(28px); }
.split-chars .word { display: inline-block; white-space: nowrap; }
.split-chars .ch { display: inline-block; opacity: 0; transform: translateY(0.6em) rotate(6deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .rv, .split-chars .ch { opacity: 1 !important; transform: none !important; }
}
