/* ═══════════ Tokens ═══════════ */
:root {
  --bg: #0E0F11;
  --panel: #16181C;
  --panel-2: #1D2025;
  --line: rgba(237, 237, 237, .09);
  --text: #EDEDEB;
  --muted: #9A9DA5;
  --dim: #6B6F78;
  --accent: #C6F432;          /* acid lime */
  --accent-ink: #11140A;
  --violet: #A38BFF;
  --red: #FF6B6B;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --drawer: cubic-bezier(.32, .72, 0, 1);
  --r: 18px;
  --max: 1200px;
  --pad: clamp(18px, 4vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;               /* no grey flash on tap */
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
code { font: 500 .88em var(--mono); background: var(--panel-2); padding: 1px 6px; border-radius: 6px; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ═══════════ Buttons ═══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; font: 500 15px/1 var(--sans);
  transition: transform .16s var(--ease-out), background-color .2s, border-color .2s, color .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.96); }                     /* buttons press back */
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover { background: #D4FA5A; }
  .btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(237, 237, 237, .3); }
}

/* ═══════════ Top bar ═══════════ */
.top {
  position: sticky; top: 0; z-index: 40; height: 62px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad);
  background: rgba(14, 15, 17, .78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 17px var(--display); letter-spacing: -.01em; }
.logo-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 18px rgba(198, 244, 50, .5); }
.top-nav { display: flex; gap: 4px; }
.top-nav a { padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .2s, background-color .2s; }
@media (hover: hover) and (pointer: fine) { .top-nav a:hover { color: var(--text); background: var(--panel); } }
.top-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.top-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ═══════════ Hero ═══════════ */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(70px, 12vw, 150px) var(--pad) 40px; }
.eyebrow { margin: 0 0 22px; font: 500 13px var(--mono); color: var(--muted); letter-spacing: .02em; }
.hero-title { margin: 0; font: 700 clamp(56px, 10vw, 140px)/.92 var(--display); letter-spacing: -.045em; }
.hero-title span { display: block; }
.accent { color: var(--accent); }
.hero-sub { max-width: 40ch; margin: 28px 0 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); text-wrap: pretty; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }

/* varied stagger, lead travels furthest, decoration only fades */
.hero-in { opacity: 0; animation: heroIn .7s var(--ease-out) forwards; }
.hero-title .hero-in:nth-child(1) { transform: translateY(40px); animation-delay: .05s; }
.hero-title .hero-in:nth-child(2) { transform: translateY(32px); animation-delay: .16s; }
.eyebrow.hero-in { transform: translateY(12px); animation-delay: .28s; }
.hero-sub.hero-in { transform: translateY(16px); animation-delay: .34s; }
.hero-cta.hero-in { transform: translateY(12px); animation-delay: .4s; }
.marquee.hero-in { animation-name: fadeOnly; animation-delay: .5s; animation-duration: 1s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }
@keyframes fadeOnly { to { opacity: 1; } }

.marquee { margin-top: clamp(50px, 8vw, 90px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { padding: 8px 14px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ═══════════ Chapters ═══════════ */
.chapter {
  max-width: var(--max); margin: clamp(80px, 12vw, 150px) auto 0; padding: 0 var(--pad);
  display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.chapter span { font: 500 13px var(--mono); color: var(--accent); grid-row: span 2; }
.chapter h2 { margin: 0; font: 700 clamp(36px, 5vw, 64px)/1 var(--display); letter-spacing: -.035em; }
.chapter p { margin: 8px 0 0; color: var(--muted); }

/* ═══════════ Demo blocks ═══════════ */
.demo {
  max-width: var(--max); margin: clamp(48px, 7vw, 80px) auto 0; padding: 0 var(--pad);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center;
}
.demo.flip .demo-copy { order: 2; }
.demo.wide { grid-template-columns: 1fr; }
.demo.wide .demo-copy { max-width: 720px; }
.topic-tag { margin: 0 0 12px; font: 500 12.5px var(--mono); color: var(--violet); }
.topic-tag::before { content: "/"; margin-right: 6px; color: var(--dim); }
.demo h3 { margin: 0; font: 600 clamp(28px, 3.2vw, 40px)/1.08 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.demo-copy > p:not(.topic-tag) { margin: 16px 0 0; color: var(--muted); text-wrap: pretty; }
.facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--muted); }
.facts b { font: 500 12px var(--mono); color: var(--text); background: var(--panel-2); padding: 2px 8px; border-radius: 6px; margin-right: 8px; }

.stage {
  position: relative; background: var(--panel); border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line); padding: clamp(18px, 3vw, 30px); min-height: 320px;
}
.stage-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; }
.stage-controls.over { position: absolute; left: 20px; right: 20px; bottom: 18px; margin: 0; }
.slider-label { display: inline-flex; align-items: center; gap: 10px; font: 500 12.5px var(--mono); color: var(--muted); }
.slider-label output { color: var(--text); min-width: 46px; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 130px; accent-color: var(--accent); }
.track-label { font: 500 12.5px var(--mono); color: var(--text); }
.track-label em { font-style: normal; color: var(--dim); margin-left: 6px; }
.hint { font: 500 12.5px var(--mono); color: var(--dim); }

/* Easing */
.track { position: relative; padding: 12px 0 14px; border-bottom: 1px dashed var(--line); }
.track .ball { position: relative; display: block; width: 30px; height: 30px; margin-top: 10px; border-radius: 50%; background: var(--dim); }
.track.good .ball { background: var(--accent); box-shadow: 0 0 22px rgba(198, 244, 50, .35); }
.track.good .track-label em { color: var(--accent); }

/* Springs */
.spring-stage { min-height: 380px; overflow: hidden; touch-action: none; }
.spring-target { position: absolute; left: 50%; top: 42%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; border: 1px dashed rgba(237, 237, 237, .2); }
.puck {
  position: absolute; left: 50%; top: 42%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #EBFF9E, var(--accent) 55%, #7FA41B); box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  cursor: grab; touch-action: none; will-change: transform;
}
.puck.dragging { cursor: grabbing; }

/* Choreography */
.chor-stage { min-height: 380px; }
.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 236px; }
.note {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line);
  will-change: transform;
}
.note-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 600 13px var(--mono); color: var(--accent-ink); }
.note b { display: block; font-weight: 500; font-size: 14.5px; }
.note small { color: var(--dim); font-size: 12.5px; }
.note-x { width: 32px; height: 32px; border-radius: 8px; color: var(--dim); font-size: 18px; position: relative; }
.note-x::before { content: ""; position: absolute; inset: -6px; }      /* 44px hit area */
@media (hover: hover) and (pointer: fine) { .note-x:hover { background: rgba(237, 237, 237, .06); color: var(--text); } }
.note.enter { animation: noteIn .45s var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes noteIn { from { opacity: 0; transform: translateY(calc(var(--dist, 14px))) scale(.98); } }
.note.leaving { opacity: 0; transform: scale(.96); transition: opacity .2s ease, transform .2s ease; }

/* Vocabulary */
.vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.term {
  position: relative; display: grid; grid-template-rows: 96px auto; gap: 10px; text-align: left;
  padding: 12px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
}
.term-stage { position: relative; display: grid; place-items: center; border-radius: 10px; background: var(--panel-2); overflow: hidden; }
.term b { font: 600 15px var(--display); letter-spacing: -.01em; }
.term small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.spec { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); }
.spec-row { display: flex; gap: 6px; }
.spec-row .spec { width: 18px; height: 18px; border-radius: 5px; }
.shimmer-bar { width: 70%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #2A2D33 0%, #3A3E46 50%, #2A2D33 100%); background-size: 200% 100%; }
.term.play .t-fade .spec { animation: vFade .5s var(--ease-out) both; }
.term.play .t-slide .spec { animation: vSlide .5s var(--ease-out) both; }
.term.play .t-scale .spec { animation: vScale .4s var(--ease-out) both; }
.term.play .t-pop .spec { animation: vPop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.term.play .t-reveal .spec { animation: vReveal .6s var(--ease-out) both; width: 90px; border-radius: 6px; }
.t-reveal .spec { width: 90px; border-radius: 6px; }
.term.play .t-stagger .spec { animation: vSlideUp .45s var(--ease-out) both; }
.term.play .t-stagger .spec:nth-child(2) { animation-delay: .06s; }
.term.play .t-stagger .spec:nth-child(3) { animation-delay: .11s; }
.term.play .t-stagger .spec:nth-child(4) { animation-delay: .15s; }
.term.play .t-shimmer .shimmer-bar { animation: vShimmer 1.2s linear 2; }
.term.play .t-shake .spec { animation: vShake .45s cubic-bezier(.36, .07, .19, .97) both; }
.term.play .t-morph .spec { animation: vMorph .9s var(--ease-in-out) both; }
.term.play .t-cross .x1 { animation: vOut .4s ease both; }
.term.play .t-cross .x2 { animation: vIn .4s ease both; }
.t-cross { position: relative; }
.t-cross .spec { position: absolute; }
.t-cross .x2 { background: var(--violet); opacity: 0; border-radius: 50%; }
@keyframes vFade { from { opacity: 0; } }
@keyframes vSlide { from { transform: translateX(-80px); opacity: 0; } }
@keyframes vSlideUp { from { transform: translateY(18px); opacity: 0; } }
@keyframes vScale { from { transform: scale(.6); opacity: 0; } }
@keyframes vPop { from { transform: scale(.3); opacity: 0; } }
@keyframes vReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes vShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes vShake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes vMorph { 50% { border-radius: 50%; transform: rotate(90deg) scale(1.15); background: var(--violet); } }
@keyframes vOut { to { opacity: 0; transform: scale(.9); } }
@keyframes vIn { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: none; } }

/* Performance */
.lane { padding: 14px 0 16px; border-bottom: 1px dashed var(--line); overflow: hidden; }
.slab { position: relative; display: block; width: 72px; height: 26px; margin-top: 10px; border-radius: 8px; background: var(--dim); }
.lane.good .slab { background: var(--accent); }
.slab-left { animation: moveLeft 1.6s var(--ease-in-out) infinite alternate; }
.slab-tf { animation: moveTf 1.6s var(--ease-in-out) infinite alternate; }
@keyframes moveLeft { from { left: 0; } to { left: calc(100% - 72px); } }
@keyframes moveTf { from { transform: translateX(0); } to { transform: translateX(var(--travel, 300px)); } }
.jam-status { font: 500 12.5px var(--mono); color: var(--dim); }
.jam-status.on { color: var(--red); }

/* Gestures */
.gest-stage { min-height: 400px; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.deck { position: relative; min-height: 290px; touch-action: pan-y; }
.card {
  position: absolute; left: 50%; top: 50%; width: min(300px, 82%); height: 210px; margin: -105px 0 0 calc(min(300px, 82%) / -2);
  border-radius: 20px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform;
}
.card.dragging { cursor: grabbing; }
.card small { font: 500 12px var(--mono); opacity: .75; }
.card b { font: 700 30px/1.05 var(--display); letter-spacing: -.03em; }
.deck-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font: 500 13px var(--mono); }

/* Toasts */
.toast-stage { min-height: 360px; overflow: hidden; }
.toast-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.toaster { list-style: none; margin: 0; padding: 0; position: absolute; left: 50%; bottom: 22px; width: min(340px, calc(100% - 32px)); transform: translateX(-50%); height: 0; }
.toast {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center;
  padding: 13px 15px; border-radius: 14px; background: #24272D; box-shadow: 0 12px 30px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .07);
  font-size: 14px; transform-origin: bottom center; touch-action: pan-y;
  transition: transform .4s var(--ease-out), opacity .4s var(--ease-out);
  user-select: none; -webkit-user-select: none;
}
.toast.dragging { transition: none; }
.toast .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--mono); color: var(--accent-ink); background: var(--muted); }
.toast.success .ic { background: var(--accent); }
.toast.error .ic { background: var(--red); }
.toast.loading .ic { background: none; border: 2px solid var(--dim); border-top-color: var(--text); animation: spin .7s linear infinite; }
.toast b { font-weight: 500; }
.toast small { display: block; color: var(--muted); font-size: 12.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Break UI */
.break-stage { min-height: 360px; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; padding: 4px; border-radius: 999px; background: var(--panel-2); margin-bottom: 18px; isolation: isolate; }
.seg button { position: relative; z-index: 1; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .25s; }
.seg button[aria-checked="true"] { color: var(--accent-ink); }
.seg-pill { position: absolute; z-index: 0; inset: 4px; border-radius: 999px; background: var(--accent); clip-path: inset(0 50% 0 0 round 999px); transition: clip-path .25s var(--ease-out); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.person { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 14px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); align-items: start; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 600 15px var(--display); color: var(--accent-ink); background-size: cover; background-position: center; }
.person h4 { margin: 0; font: 600 15px/1.25 var(--sans); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .role { margin: 2px 0 8px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 12px var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.person .bio { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .bio.empty { color: var(--dim); font-style: italic; }
.people.swap .person { animation: swapIn .35s var(--ease-out) both; }
@keyframes swapIn { from { opacity: .3; transform: translateY(6px); } }

/* Modes */
.modes { background: var(--panel); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; color: var(--muted); transition: color .2s, background-color .2s; flex: none; }
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.mode-view { position: relative; min-height: 340px; }
.mv { position: absolute; inset: 0; padding: clamp(22px, 4vw, 44px); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s ease, transform .3s var(--ease-out); }
.mode-view.instant .mv { transition: none; }
.mode-view.instant .mv-big, .mode-view.exp-seen .mv-big { animation: none !important; }
.mode-view[data-mode="persuade"] .mv-persuade, .mode-view[data-mode="operate"] .mv-operate,
.mode-view[data-mode="read"] .mv-read, .mode-view[data-mode="experience"] .mv-experience { opacity: 1; transform: none; pointer-events: auto; }
.mv-persuade { background: radial-gradient(120% 120% at 100% 0, #2B2410, transparent 60%), #1A1712; color: #F4EBDD; display: flex; flex-direction: column; justify-content: center; }
.mv-kicker { margin: 0 0 12px; font: 500 12.5px var(--mono); color: #C9A86A; }
.mv-persuade h4 { margin: 0; font: 700 clamp(30px, 4vw, 52px)/1 var(--display); letter-spacing: -.035em; max-width: 14ch; }
.mv-persuade p { margin: 16px 0 0; max-width: 46ch; color: #CBBFAE; }
.mv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.mv-btn { display: inline-block; padding: 13px 20px; border-radius: 999px; background: #F4EBDD; color: #1A1712; font-weight: 600; font-size: 15px; }
.mv-note { font-size: 13px; color: #9C8F7C; }
.mv-operate { background: #F7F7F5; color: #16181C; font-size: 14px; overflow-x: auto; overscroll-behavior-x: contain; }
.mv-op-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mv-op-head b { font: 600 18px var(--sans); }
.mv-chip { font: 500 12px var(--mono); padding: 4px 10px; border-radius: 999px; background: #E9E9E4; }
.mv-operate table { width: 100%; border-collapse: collapse; }
.mv-operate th { text-align: left; font: 500 12px var(--mono); color: #7A7D84; padding: 8px 10px; border-bottom: 1px solid #E2E2DD; }
.mv-operate td { padding: 11px 10px; border-bottom: 1px solid #ECECE8; white-space: nowrap; }
.mv-operate .num { text-align: right; font-variant-numeric: tabular-nums; }
.st { font-style: normal; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.st.ok { background: #E1F3E6; color: #1C7A40; }
.st.wait { background: #FFF1D6; color: #9A6200; }
.mv-read { background: #FBFAF7; color: #23211D; overflow: auto; }
.mv-read h4 { margin: 0 0 14px; font: 600 30px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
.mv-read p { margin: 0 0 12px; max-width: 62ch; font: 18px/1.65 Georgia, "Times New Roman", serif; }
.mv-read .mv-kicker { font-family: var(--mono); color: #8A7F6E; font-size: 12px; }
.mv-experience { background: #000; display: grid; place-items: center; text-align: center; }
.mv-big { font: 700 clamp(70px, 14vw, 180px)/.85 var(--display); letter-spacing: -.06em; color: #F4EBDD; }
.mode-view[data-mode="experience"] .mv-big { animation: expIn 1s var(--ease-out) both; }
@keyframes expIn { from { opacity: 0; transform: scale(1.06); filter: blur(8px); } }
.mv-cap { display: block; margin-top: 14px; font: 500 12.5px var(--mono); color: #8F8678; }

/* Chart */
.data-stage { min-height: 380px; }
.chart-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chart-toggles button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; font: 500 12.5px var(--mono); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); transition: opacity .2s; }
.chart-toggles button i { width: 10px; height: 10px; border-radius: 3px; }
.chart-toggles button[aria-pressed="false"] { opacity: .4; }
.chart-wrap { position: relative; }
#chart { width: 100%; height: auto; overflow: visible; }
#chart .grid line { stroke: rgba(237, 237, 237, .07); }
#chart .axis text { fill: var(--dim); font: 500 11px var(--mono); }
#chart .series path { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; transition: opacity .3s; }
#chart .series text { font: 600 12px var(--mono); }
#chart .series.off { opacity: 0; }
#chart .guide { stroke: rgba(237, 237, 237, .25); stroke-dasharray: 3 4; }
.chart-tip { position: absolute; pointer-events: none; padding: 10px 12px; border-radius: 10px; background: #24272D; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); font: 500 12px/1.6 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; transform: translate(-50%, -110%); }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Taste compare */
.compare { position: relative; height: clamp(360px, 46vw, 460px); border-radius: var(--r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.cmp { position: absolute; inset: 0; padding: clamp(18px, 3vw, 34px) clamp(20px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.cmp-slop { background: linear-gradient(135deg, #6D28D9, #DB2777 60%, #F59E0B); color: #fff; text-align: center; align-items: center; font-family: Arial, sans-serif; }
.slop-nav, .taste-nav { position: absolute; top: 20px; left: clamp(20px, 4vw, 48px); right: clamp(20px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; font-size: 13px; gap: 10px; }
.slop-nav i { font-style: normal; padding: 7px 14px; border-radius: 999px; background: #fff; color: #6D28D9; font-weight: 700; }
.cmp-slop h4 { margin: 0; font: 800 clamp(26px, 4vw, 48px)/1.1 Arial, sans-serif; }
.cmp-slop p { margin: 14px 0 0; max-width: 40ch; opacity: .9; }
.slop-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.slop-cards span { padding: 14px 20px; border-radius: 16px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.cmp-taste { background: #F3EDE3; color: #1E1A14; clip-path: inset(0 0 0 var(--pos)); }
.taste-nav b { font: 700 17px var(--display); letter-spacing: -.02em; }
.taste-nav span { color: #6E6555; }
.cmp-taste h4 { margin: 0; font: 600 clamp(30px, 4.6vw, 58px)/1 var(--display); letter-spacing: -.04em; max-width: 13ch; }
.cmp-taste p { margin: 16px 0 0; max-width: 38ch; color: #5D5446; font-size: 17px; }
.taste-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 26px; }
.taste-btn { padding: 13px 20px; border-radius: 999px; background: #1E1A14; color: #F3EDE3; font-weight: 600; font-size: 15px; }
.taste-meta { font: 500 12.5px var(--mono); color: #8B8170; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 44px; margin-left: -22px; cursor: ew-resize; display: grid; place-items: center; touch-action: none; z-index: 2; }
.cmp-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 21px; width: 2px; background: var(--accent); }
.cmp-handle i { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.cmp-handle i::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 15px var(--mono); color: var(--accent-ink); letter-spacing: 2px; }
.cmp-label { position: absolute; bottom: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font: 500 11.5px var(--mono); z-index: 1; }
.cmp-label.l { left: 14px; } .cmp-label.r { right: 14px; }

/* ═══════════ Index ═══════════ */
.index { padding-bottom: 40px; }
.index-groups { max-width: var(--max); margin: 30px auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.group { padding: 20px; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.group h3 { margin: 0 0 4px; font: 600 18px var(--display); }
.group > p { margin: 0 0 14px; color: var(--dim); font: 500 12px var(--mono); }
.group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.group li { display: grid; gap: 1px; padding-top: 10px; border-top: 1px solid var(--line); }
.group li b { font: 500 13px var(--mono); color: var(--accent); }
.group li span { font-size: 14px; color: var(--muted); }

.foot { max-width: var(--max); margin: 40px auto 0; padding: 30px var(--pad) 50px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.foot b { color: var(--text); font-weight: 500; }

/* ═══════════ Scroll reveal ═══════════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
/* index cards arrive as a short wave, not all at once (the stagger shrinks as it goes) */
.index-groups .group:nth-child(2) { transition-delay: 60ms; }
.index-groups .group:nth-child(3) { transition-delay: 105ms; }
.index-groups .group:nth-child(4) { transition-delay: 135ms; }

/* ═══════════ Responsive ═══════════ */
@media (max-width: 900px) {
  .demo { grid-template-columns: 1fr; }
  .demo.flip .demo-copy { order: 0; }
  .top-nav { display: none; }
}
@media (max-width: 520px) {
  .mv-operate th:nth-child(3), .mv-operate td:nth-child(3) { display: none; }
  .mv-operate td, .mv-operate th { padding-left: 6px; padding-right: 6px; }
  .stage-controls.over { position: static; margin-top: 260px; }
  .spring-stage { min-height: 0; }
  input[type="range"] { width: 100px; }
}

/* ═══════════ Reduced motion: keep feedback, drop travel ═══════════ */
/* Reduced motion means gentler, not none: movement goes, short fades and colour
   changes stay, and press feedback stays because it confirms the tap. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* entrances: fade in place, no travel */
  .hero-in, .hero-title .hero-in:nth-child(n), .eyebrow.hero-in, .hero-sub.hero-in, .hero-cta.hero-in { transform: none !important; animation: fadeOnly .3s ease forwards !important; }
  .reveal { transform: none !important; transition: opacity .3s ease; }
  .note.enter { animation: vFade .2s ease both; }
  .note.leaving { transform: none; }
  .people.swap .person { animation: vFade .2s ease both; }
  .mv { transform: none; transition: opacity .2s ease; }
  .mode-view[data-mode="experience"] .mv-big { animation: vFade .3s ease both; }
  /* stacked toasts fade; they jump to their slot instead of sliding */
  .toast { transition: opacity .2s ease; }
  /* nothing loops on its own: the marquee stops, the speed demo waits for its button */
  .marquee-track { animation: none; }
  .perf-stage:not(.running) .slab { animation-play-state: paused; }
}
