/* ============================================================
   Matrix Mastery — Doodle design system
   Hand-drawn, playful, sketch-like. Tokens from DESIGN.md:
   primary #49B6E5 · secondary #263D5B · success #16A34A
   warning #D97706 · danger #DC2626 · surface #FFFFFF · text #111827
   fonts: Delius Swash Caps (display) · Delius (body) · JetBrains Mono
   ============================================================ */

:root {
  --primary: #49B6E5;
  --secondary: #263D5B;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --surface: #FFFFFF;
  --text: #111827;
  --paper: #FFFDF6;              /* warm paper ground for the doodle feel */

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --r-sm: 4px; --r-md: 8px;

  --font-display: "Delius Swash Caps", "Comic Sans MS", cursive;
  --font-body: "Delius", "Comic Sans MS", cursive;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --ink-soft: #64748B;
  --line: #C7D2E4;
  --cell: 52px;

  /* animation pacing multiplier (1 = normal, <1 = faster) — set by js/audio.js */
  --anim-mult: 1;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(73, 182, 229, 0.08), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(217, 119, 6, 0.06), transparent 30%),
    var(--paper);
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--secondary); line-height: 1.2; margin: 0 0 var(--sp-3); }

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 var(--sp-3); }
a { color: var(--secondary); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); }

strong { color: var(--secondary); }
code, .inline-code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(73, 182, 229, 0.12);
  color: var(--secondary);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

/* ---------- buttons (sketchy chunky) ---------- */

.btn {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff;
  background: var(--secondary);
  border: 2px solid var(--secondary);
  border-radius: var(--r-md);
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 3px 3px 0 rgba(38, 61, 91, 0.22);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s;
}
.btn:hover { transform: translate(-1px, -1px) rotate(-0.6deg); box-shadow: 4px 4px 0 rgba(38, 61, 91, 0.28); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(38, 61, 91, 0.3); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; box-shadow: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); box-shadow: 3px 3px 0 rgba(73, 182, 229, 0.4); }
.btn.primary:hover { box-shadow: 4px 4px 0 rgba(73, 182, 229, 0.5); }
.btn.ghost { background: transparent; color: var(--secondary); }
.btn.ghost:hover { background: rgba(73, 182, 229, 0.08); }
.btn.small { padding: 6px 10px; font-size: 0.75rem; }
.btn.big { padding: 14px 26px; font-size: 0.92rem; }

/* ---------- shared cards ---------- */

.card {
  background: var(--surface);
  border: 2px solid var(--secondary);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 rgba(38, 61, 91, 0.12);
  padding: var(--sp-5);
}

.callout {
  border: 2px dashed var(--warning);
  background: rgba(217, 119, 6, 0.07);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}
.callout-label { color: var(--warning); font-size: 1.05rem; margin-bottom: var(--sp-2); }
.callout p { margin: 0; }

/* ============================================================
   LANDING PAGE
   ============================================================ */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  max-width: 1180px; margin: 0 auto; flex-wrap: wrap;
}
.brand { font-family: var(--font-display); font-size: 1.4rem; color: var(--secondary); text-decoration: none; }
.brand .tick { color: var(--primary); }
.chip {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  color: var(--secondary); background: #fff;
  border: 2px solid var(--secondary); border-radius: 999px;
  padding: 6px 14px;
}
.chip--done { color: var(--success); border-color: var(--success); }

.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-6);
  max-width: 1180px; margin: var(--sp-5) auto var(--sp-6); padding: 0 var(--sp-6);
  align-items: center;
}
.hero-eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: var(--sp-2); }
.hero h1 { font-size: 3.3rem; margin-bottom: var(--sp-2); }
.hero-squiggle { display: block; margin: -4px 0 var(--sp-4); width: 240px; }
.hero-sub { font-size: 1.12rem; color: #334155; max-width: 30em; }
.hero-cta { display: flex; gap: var(--sp-3); align-items: center; margin-top: var(--sp-5); flex-wrap: wrap; }
.hero-note { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }

.hero-grid-wrap { text-align: center; }
.hero-grid { width: min(320px, 100%); transform: rotate(-1.2deg); }
.hero-grid .wobble { transform-origin: 50% 50%; animation: wiggle 5s ease-in-out infinite; }
@keyframes wiggle {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(-0.2deg); }
}
.hero-grid-caption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-top: var(--sp-2); }

.section { max-width: 1180px; margin: 0 auto var(--sp-6); padding: 0 var(--sp-6); }
.section-head { text-align: center; margin-bottom: var(--sp-5); }
.section-head .squiggle { width: 180px; margin: 0 auto; display: block; }

.how-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.how-card { position: relative; }
.how-card:nth-child(1) { transform: rotate(-0.8deg); }
.how-card:nth-child(3) { transform: rotate(0.8deg); }
.how-card:hover { transform: rotate(0deg); }
.how-num { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.how-card h3 { margin: var(--sp-2) 0 var(--sp-1); }
.how-card p { margin: 0; font-size: 0.97rem; }

/* module roadmap */

.mod-list { display: grid; gap: var(--sp-5); grid-template-columns: 1fr 1fr; }
.mod-card { display: flex; flex-direction: column; gap: var(--sp-3); position: relative; }
.mod-card:hover { transform: translateY(-2px) rotate(-0.3deg); box-shadow: 5px 5px 0 rgba(38, 61, 91, 0.16); }
.mod-card--soon { opacity: 0.82; border-style: dashed; box-shadow: none; }
.mod-card--soon:hover { transform: none; box-shadow: none; }
.mod-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.mod-num { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.mod-title { font-family: var(--font-display); font-size: 1.35rem; margin: 0; }
.mod-tagline { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.stamp {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--danger);
  border: 2.5px solid var(--danger); border-radius: var(--r-sm);
  padding: 3px 10px; transform: rotate(4deg); white-space: nowrap;
}
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lesson-row {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 5px 8px; border-radius: var(--r-sm);
  font-size: 0.93rem; text-decoration: none; color: var(--text);
}
.lesson-row:hover { background: rgba(73, 182, 229, 0.1); }
.lesson-row .check {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); color: transparent;
}
.lesson-row.done .check { background: var(--success); border-color: var(--success); color: #fff; }
.lesson-row .num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); width: 26px; flex: none; }

.progress { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; }
.progress-bar { flex: 1; height: 14px; background: #E5EAF3; border: 2px solid var(--secondary); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #7BD0F2); border-radius: 999px; transition: width 0.4s ease; }
.progress-num { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--secondary); white-space: nowrap; }

.mod-cta { margin-top: var(--sp-2); }

.footer {
  border-top: 2px dashed var(--line);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  max-width: 1180px; margin: var(--sp-6) auto 0;
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  color: var(--ink-soft); font-size: 0.9rem;
}
.footer a { color: var(--ink-soft); }

/* ============================================================
   LESSON PAGE
   ============================================================ */

.topbar {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 2px dashed var(--line);
  max-width: 1240px; margin: 0 auto;
}
.topbar-left { display: flex; align-items: center; gap: var(--sp-3); }
.topbar-title { text-align: center; }
.topbar-module { font-size: 0.74rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.topbar-lesson { display: block; font-size: 1.45rem; color: var(--secondary); }
.dots { display: flex; gap: 7px; justify-content: flex-end; }
.dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; color: #fff;
  text-decoration: none; transition: transform 0.1s;
}
.dot:hover { transform: scale(1.25); }
.dot--active { border-color: var(--primary); background: var(--primary); }
.dot--done { border-color: var(--success); background: var(--success); }

.lesson-main { max-width: 1240px; margin: 0 auto; padding: var(--sp-5) var(--sp-6) var(--sp-6); }

.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: var(--sp-5); align-items: start;
}
.panel-strip { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.panel { display: inline-block; }
.panel-label {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.5px;
  color: var(--ink-soft); margin-bottom: var(--sp-2);
  text-transform: uppercase;
}
.panel--numpy .cell { background: rgba(73, 182, 229, 0.09); border-style: dashed; }

/* the grid — spreadsheet metaphor */

.grid {
  display: grid; position: relative; width: max-content;
  border: 2px solid var(--secondary); border-radius: var(--r-md);
  background: #fff; overflow: hidden;
  box-shadow: 3px 3px 0 rgba(38, 61, 91, 0.12);
}
.gheader {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  color: var(--primary); background: rgba(73, 182, 229, 0.1);
  border: 1px solid #C9E4F5;
}
.gheader--corner { background: rgba(73, 182, 229, 0.16); }
.cell {
  width: var(--cell); height: var(--cell);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 1rem;
  color: var(--secondary); background: #fff; position: relative;
  transition: background 0.2s;
}
.cell--blank { border-style: dashed; border-color: #DDE4EF; background: repeating-linear-gradient(45deg, #FAFBFD, #FAFBFD 6px, #F2F5FA 6px, #F2F5FA 12px); }
.grid-empty {
  padding: 26px 34px; color: var(--ink-soft); font-size: 0.85rem;
  border: 2px dashed var(--line); border-radius: var(--r-sm);
}

.cell.trail { background: rgba(73, 182, 229, 0.12); }
.cell.flash { animation: flash calc(var(--anim-mult) * 0.5s) ease; }
@keyframes flash {
  0% { background: rgba(217, 119, 6, 0.45); }
  100% { background: rgba(217, 119, 6, 0.12); }
}
.cell.cell--writing { transform: scale(0.6); opacity: 0.4; transition: transform calc(var(--anim-mult) * 0.15s), opacity calc(var(--anim-mult) * 0.15s); }
.cell.cell--fresh { animation: fresh calc(var(--anim-mult) * 0.55s) ease; }
@keyframes fresh {
  0% { transform: scale(0.7); background: rgba(22, 163, 74, 0.55); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); background: rgba(22, 163, 74, 0.14); }
}
.cell.cell--pop { animation: pop calc(var(--anim-mult) * 0.3s) ease backwards; }
@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.cell.shared {
  outline: 2px dashed var(--warning); outline-offset: -2px;
  background: rgba(217, 119, 6, 0.08);
}

/* semantic cell states used across modules 1-6 */
.cell.dim { opacity: 0.32; }
.cell.diag { background: rgba(22, 163, 74, 0.16); outline: 2px solid var(--success); outline-offset: -2px; }
.cell.edge-top { box-shadow: inset 0 4px 0 var(--primary); }
.cell.edge-right { box-shadow: inset 4px 0 0 var(--success); }
.cell.edge-bottom { box-shadow: inset 0 -4px 0 var(--warning); }
.cell.edge-left { box-shadow: inset -4px 0 0 var(--danger); }
.cell.bug { background: rgba(220, 38, 38, 0.16); outline: 2px dashed var(--danger); outline-offset: -2px; }
.cell.found { background: rgba(22, 163, 74, 0.28); outline: 3px solid var(--success); outline-offset: -2px; animation: fresh calc(var(--anim-mult) * 0.9s) ease; }
.cell.padded { background: #EEF2F7; color: #94A3B8; }
.cell.blocked { background: repeating-linear-gradient(45deg, #475569, #475569 8px, #64748B 8px, #64748B 16px); color: #fff; border-color: #334155; }

/* value-class color palettes (flood fill, rotting oranges, DP colors) */
.cell.c1 { background: #FCA5A5; color: #7F1D1D; }
.cell.c2 { background: #93C5FD; color: #1E3A8A; }
.cell.c3 { background: #86EFAC; color: #14532D; }
.cell.c4 { background: #FDE047; color: #713F12; }
.cell.c5 { background: #D8B4FE; color: #4C1D95; }
.cell.c9 { background: #4ADE80; color: #052E16; font-weight: 800; }
.cell--land { background: #FDE68A; color: #92400E; }
.cell--water { background: #BAE6FD; color: #075985; }
.cell--rotten { background: #A78BFA; color: #4C1D95; }
.cell--orange { background: #FDBA74; color: #9A3412; }
.cell--gone { background: #E2E8F0; color: #64748B; }

.pointer {
  position: absolute; z-index: 5; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: flex-end;
  border: 3px solid var(--danger); border-radius: var(--r-sm);
  background: rgba(220, 38, 38, 0.06);
  transition: left calc(var(--anim-mult) * 0.18s) ease, top calc(var(--anim-mult) * 0.18s) ease,
              width calc(var(--anim-mult) * 0.18s) ease, height calc(var(--anim-mult) * 0.18s) ease;
}
.p-badge {
  font-size: 0.62rem; font-weight: 700; color: #fff; background: var(--danger);
  padding: 1px 5px; border-radius: 3px; transform: translate(3px, 3px);
  white-space: nowrap;
}

/* code pane */

.code-pane { min-width: 0; }
.code-pane-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: var(--sp-2);
}
.code {
  background: var(--secondary); color: #E2E8F0;
  border-radius: var(--r-md); padding: var(--sp-4);
  font-size: 0.84rem; line-height: 1.7; overflow-x: auto;
  box-shadow: 4px 4px 0 rgba(38, 61, 91, 0.18);
  margin: 0;
}
.code .ln { display: block; padding: 0 8px 0 0; border-left: 3px solid transparent; border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: pre; }
.code .lnno {
  display: inline-block; width: 26px; text-align: right; margin-right: 14px;
  color: #7C8DB5; user-select: none;
}
.code .ln.exec { background: rgba(73, 182, 229, 0.24); border-left-color: var(--primary); color: #fff; }
.inline-code { margin-top: var(--sp-3); }

/* explainer + controls */

.explain { margin-top: var(--sp-5); min-height: 120px; }
.explain p:last-child { margin-bottom: 0; }
.explain .diagram { margin-top: var(--sp-3); }

.controls {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin-top: var(--sp-4); flex-wrap: wrap;
}
.step-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 1px; }

.finish { margin-top: var(--sp-5); }
.finish .btn { margin-top: var(--sp-2); }
.banner {
  border: 3px solid var(--success); background: rgba(22, 163, 74, 0.08);
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  font-size: 1.25rem; color: var(--success); margin-bottom: var(--sp-5);
}
.recap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.recap-list li { display: flex; gap: var(--sp-2); align-items: baseline; }
.recap-list .check { color: var(--success); font-family: var(--font-mono); font-weight: 700; flex: none; }

/* diagrams + tables inside step text */

.diagram { display: inline-block; }
.dbox {
  border: 2px solid var(--secondary); border-radius: var(--r-sm);
  padding: var(--sp-3); font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--secondary); background: #fff; display: inline-block; min-width: 220px;
}
.d-outer { box-shadow: 3px 3px 0 rgba(38, 61, 91, 0.12); }
.drow {
  display: block; margin-top: var(--sp-2); padding: var(--sp-1) var(--sp-2);
  border: 1.5px dashed var(--primary); border-radius: var(--r-sm);
  background: rgba(73, 182, 229, 0.06);
}
.drow--shared { border-color: var(--warning); background: rgba(217, 119, 6, 0.08); }
.diagram-cap { font-size: 0.72rem; color: var(--ink-soft); margin: var(--sp-2) 0 0; }

.compare { border-collapse: collapse; margin-top: var(--sp-3); width: 100%; max-width: 620px; font-size: 0.9rem; }
.compare th, .compare td { border: 1.5px solid var(--line); padding: 8px 12px; text-align: left; background: #fff; }
.compare th { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(73, 182, 229, 0.1); color: var(--secondary); }
.compare tr:first-child td:first-child { background: rgba(73, 182, 229, 0.05); font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-soft); }

/* ============================================================
   SOUND / VOICE / PACING TOOLBAR + HELP
   ============================================================ */

.fxbar {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 40;
  display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap;
  justify-content: flex-end; max-width: calc(100vw - var(--sp-6));
}
.fx-btn {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.4px; color: var(--secondary);
  background: #fff; border: 2px solid var(--secondary);
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(38, 61, 91, 0.18);
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s;
}
.fx-btn:hover { transform: translateY(-1px); box-shadow: 3px 3px 0 rgba(38, 61, 91, 0.26); }
.fx-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.fx-btn.is-off { opacity: 0.45; }
.fx-btn.is-off:hover { opacity: 0.85; }

/* voice picker */
.voice-pick-wrap { position: relative; }
.voice-pick-btn { font-size: 0.72rem; }
.voice-picker-dd {
  display: none; position: absolute; bottom: calc(100% + 8px); right: 0;
  background: #fff; border: 2px solid var(--secondary); border-radius: var(--r-md);
  box-shadow: 4px 4px 0 rgba(38, 61, 91, 0.18);
  max-height: 280px; overflow-y: auto; min-width: 200px;
  z-index: 60; padding: var(--sp-1) 0;
  animation: fadein calc(var(--anim-mult) * 0.12s) ease;
}
.voice-picker-dd.open { display: block; }
.voice-pick-item {
  display: block; width: 100%; text-align: left;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  color: var(--ink); background: transparent; border: none;
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: background 0.1s;
}
.voice-pick-item:hover { background: rgba(73, 182, 229, 0.1); }
.voice-pick-item.active { background: rgba(73, 182, 229, 0.18); font-weight: 700; }

.help-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(38, 61, 91, 0.35);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
  animation: fadein calc(var(--anim-mult) * 0.18s) ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.help-card { width: min(420px, 100%); position: relative; }
.help-card h3 { margin-top: 0; }
.help-keys { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0; }
.help-row { display: flex; align-items: baseline; gap: var(--sp-3); font-size: 0.95rem; }
.kbd {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  color: var(--secondary); background: rgba(73, 182, 229, 0.1);
  border: 1.5px solid var(--secondary); border-bottom-width: 3px;
  border-radius: var(--r-sm); padding: 2px 8px; white-space: nowrap;
}
.help-note { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }

.kbd-hint {
  font-size: 0.74rem; color: var(--ink-soft);
  margin-top: var(--sp-2); text-align: center; letter-spacing: 0.4px;
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .stage { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-grid-wrap { order: -1; }
  .mod-list { grid-template-columns: 1fr; }
  .how-cards { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; text-align: center; }
  .topbar-left { justify-content: center; }
  .dots { justify-content: center; }
  :root { --cell: 44px; }
}
