/* ─────────────────────────────────────────────────────────────────────────
   Compound — design tokens
   Light + dark are both selected sets, not an automatic inversion.
   Chart colours are the validated dataviz palette (slots 1–3).
   ───────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;

  --surface-1: #fcfcfb;
  --surface-2: #f9f9f7;
  --surface-3: #f2f1ed;
  --surface-sunk: #edece7;

  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;

  --rule: #e1e0d9;
  --rule-strong: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);

  --accent: #2a78d6;
  --accent-soft: #cde2fb;
  --accent-ink: #184f95;

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;

  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  --shadow-sm: 0 1px 2px rgba(11, 11, 11, 0.05);
  --shadow-md: 0 4px 16px rgba(11, 11, 11, 0.08);

  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --sidebar-w: 296px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme='light'])) {
    color-scheme: dark;

    --surface-1: #1a1a19;
    --surface-2: #0d0d0d;
    --surface-3: #232322;
    --surface-sunk: #111110;

    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;

    --rule: #2c2c2a;
    --rule-strong: #383835;
    --border: rgba(255, 255, 255, 0.1);

    --accent: #3987e5;
    --accent-soft: #184f95;
    --accent-ink: #9ec5f4;

    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;

    --good-text: #0ca30c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --surface-1: #1a1a19;
  --surface-2: #0d0d0d;
  --surface-3: #232322;
  --surface-sunk: #111110;

  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;

  --rule: #2c2c2a;
  --rule-strong: #383835;
  --border: rgba(255, 255, 255, 0.1);

  --accent: #3987e5;
  --accent-soft: #184f95;
  --accent-ink: #9ec5f4;

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;

  --good-text: #0ca30c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body, #root { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface-2);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

button { font-family: inherit; }

a { color: var(--accent); }

/* ── Layout ───────────────────────────────────────────────────────────── */

.app { display: flex; min-height: 100%; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface-1);
  border-right: 1px solid var(--rule);
  padding: 24px 0 40px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 0 24px 20px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-mark {
  font-size: 21px;
  font-weight: 640;
  letter-spacing: -0.025em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
}

.progress-block { padding: 0 24px 20px; }

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 6px;
  background: var(--surface-sunk);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-heading {
  padding: 0 24px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 24px;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.4;
  transition: background 120ms, color 120ms;
}

.nav-item:hover { background: var(--surface-3); color: var(--text-primary); }

.nav-item.active {
  border-left-color: var(--accent);
  background: var(--surface-3);
  color: var(--text-primary);
  font-weight: 560;
}

.nav-num {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 640;
  color: var(--text-muted);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.nav-item.active .nav-num { border-color: var(--accent); color: var(--accent); }

.nav-num.done {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}

/* Started but not finished — visibly distinct from both empty and complete. */
.nav-num.progress {
  border-color: var(--accent);
  color: var(--accent);
  background: linear-gradient(to top, var(--accent-soft) 50%, transparent 50%);
}

.nav-num.large { width: 26px; height: 26px; flex-basis: 26px; font-size: 12px; }

.card-status {
  display: inline-block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}

/* ── Completion checklist ─────────────────────────────────────────────── */

.status-panel {
  margin-top: 22px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 20px;
  background: var(--surface-1);
}

.status-panel.complete {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 7%, var(--surface-1));
}

.status-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.status-panel.complete .status-title { color: var(--good-text); }

.status-list { list-style: none; margin: 0; padding: 0; }

.status-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.status-list li.met { color: var(--text-primary); }

.status-list .tick {
  flex: 0 0 16px;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.5;
}

.status-list li.met .tick { color: var(--good); }

.status-hint { color: var(--text-muted); }

.nav-title { flex: 1; }

.nav-meta { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; font-weight: 400; }

.sidebar-foot {
  padding: 20px 24px 0;
  margin-top: 20px;
  border-top: 1px solid var(--rule);
}

.ghost-btn {
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}

.ghost-btn:hover { background: var(--surface-3); color: var(--text-primary); }

/* ── Main column ──────────────────────────────────────────────────────── */

.main { flex: 1; min-width: 0; display: flex; justify-content: center; }

.page { width: 100%; max-width: 760px; padding: 56px 40px 120px; }

.eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 640;
  margin-bottom: 12px;
}

h1 {
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 660;
  margin: 0 0 12px;
}

.deck {
  font-size: 18.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 20px;
}

.lesson-meta {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 34px;
}

h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
  font-weight: 640;
  margin: 40px 0 12px;
  line-height: 1.25;
}

.body-p {
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--text-primary);
  margin: 0 0 18px;
}

.body-list {
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: 16.5px;
  line-height: 1.68;
}

.body-list li { margin-bottom: 10px; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--surface-1);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 24px;
}

.callout.warn { border-left-color: var(--serious); }

.callout-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 650;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.callout p { margin: 0; font-size: 15.5px; line-height: 1.6; }

.pullquote {
  margin: 0 0 26px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--rule-strong);
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-style: italic;
}

.keypoints {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 40px 0 32px;
}

.keypoints h3 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 650;
}

.keypoints ul { margin: 0; padding-left: 18px; font-size: 15.5px; line-height: 1.6; }
.keypoints li { margin-bottom: 7px; }

/* ── Quiz ─────────────────────────────────────────────────────────────── */

.quiz {
  border: 1px solid var(--rule);
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  margin: 36px 0 0;
}

.quiz-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.quiz-head h3 { margin: 0; font-size: 17px; font-weight: 640; letter-spacing: -0.012em; }

.quiz-count { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.quiz-q { font-size: 16px; font-weight: 560; margin: 20px 0 14px; line-height: 1.5; }

.opt {
  display: flex;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--rule-strong);
  background: var(--surface-1);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color 120ms, background 120ms;
}

.opt:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-3); }
.opt:disabled { cursor: default; }

.opt-key {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--surface-sunk);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-muted);
  margin-top: 1px;
}

.opt.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 9%, var(--surface-1)); }
.opt.correct .opt-key { background: var(--good); color: #fff; }
.opt.wrong { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 9%, var(--surface-1)); }
.opt.wrong .opt-key { background: var(--critical); color: #fff; }

.explain {
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.explain strong { color: var(--text-primary); }

.quiz-result {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.score { font-size: 15px; font-weight: 560; }

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 560;
  cursor: pointer;
  transition: filter 120ms;
}

.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface-3); color: var(--text-primary); border: 1px solid var(--rule-strong); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

/* ── Widgets (calculators) ────────────────────────────────────────────── */

.widget {
  border: 1px solid var(--rule);
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 28px;
}

.widget-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.controls { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.control label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.control .val {
  font-weight: 640;
  color: var(--text-primary);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
  height: 20px;
  cursor: pointer;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2px;
  margin: 22px 0 6px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}

.stat {
  background: var(--surface-1);
  padding: 14px 16px;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 5px;
}

.stat-value { font-size: 25px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; }
.stat-value.accent { color: var(--accent-ink); }
.stat-value.bad { color: var(--critical); }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-item { display: flex; align-items: center; gap: 7px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }

.chart-wrap { position: relative; margin-top: 4px; }

.tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-1);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  z-index: 5;
  min-width: 150px;
}

.tooltip-head {
  font-weight: 640;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.tooltip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: space-between;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.tooltip-row .lhs { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.tooltip-row .rhs { font-weight: 620; color: var(--text-primary); }

.table-toggle {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 0 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

.data-table th, .data-table td {
  text-align: right;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rule);
}

.data-table th { color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table td:first-child, .data-table th:first-child { text-align: left; }

/* ── Home ─────────────────────────────────────────────────────────────── */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 30px 0 40px;
}

.card-grid { display: grid; gap: 12px; margin-top: 18px; }

.lesson-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 17px 20px;
  border: 1px solid var(--rule);
  background: var(--surface-1);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-primary);
  transition: border-color 120ms, transform 120ms, box-shadow 120ms;
}

.lesson-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.lesson-card h3 { margin: 0 0 3px; font-size: 16.5px; font-weight: 620; letter-spacing: -0.012em; }
.lesson-card p { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.lesson-card .nav-num { width: 26px; height: 26px; flex-basis: 26px; font-size: 12px; }

.disclaimer {
  margin-top: 48px;
  padding: 18px 20px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.mobile-bar { display: none; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar {
    position: static;
    width: 100%;
    flex: none;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    display: none;
  }
  .sidebar.open { display: block; }
  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .page { padding: 32px 20px 90px; }
  h1 { font-size: 31px; }
  .deck { font-size: 17px; }
}

/* ── Additions for the no-build version ──────────────────────────────── */

.quiz-intro { margin: 2px 0 0; font-size: 14px; color: var(--text-secondary); }

.score.muted { color: var(--text-muted); font-weight: 400; font-size: 13.5px; }

.widget-note { font-size: 12.5px; color: var(--text-muted); margin-top: 14px; line-height: 1.55; }

.home-hint { font-size: 14px; color: var(--text-muted); margin: 0 0 4px; }

.foot-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.ghost-btn.on { border-color: var(--accent); color: var(--accent); font-weight: 650; }

.lesson-meta .spacer { flex: 1; }

.audio-btn {
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--text-secondary);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 560;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.audio-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-3); }

@media (max-width: 900px) {
  body.menu-open .sidebar { display: block; }
}

/* ── Quiz: deferred feedback ─────────────────────────────────────────── */

/* Selected but not yet submitted — indicates choice without revealing truth. */
.opt.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-1));
  font-weight: 520;
}

.opt.selected .opt-key { background: var(--accent); color: #fff; }

.opt:disabled { cursor: default; opacity: 1; }

.quiz-submit {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.submit-hint { font-size: 13.5px; color: var(--text-muted); }

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: none;
}

.quiz-result {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--surface-3);
}

.quiz-result.pass {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 8%, var(--surface-1));
}

.quiz-result.fail {
  border-color: var(--serious);
  background: color-mix(in srgb, var(--serious) 8%, var(--surface-1));
}

.result-figure {
  display: flex;
  flex-direction: column;
  min-width: 96px;
}

.result-pct {
  font-size: 38px;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1;
}

.quiz-result.pass .result-pct { color: var(--good-text); }
.quiz-result.fail .result-pct { color: var(--critical); }

.result-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }

.result-verdict {
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.result-verdict strong { color: var(--text-primary); }

.result-best { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }

/* ── Locked lessons ──────────────────────────────────────────────────── */

.nav-item.locked,
.lesson-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-item.locked:hover { background: none; color: var(--text-secondary); }
.lesson-card.locked:hover { border-color: var(--rule); transform: none; box-shadow: none; }

.nav-num.locked {
  border-style: dashed;
  border-color: var(--rule-strong);
  color: var(--text-muted);
  font-size: 9px;
}

.card-status.locked { color: var(--text-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }

.pager-locked { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.pager-note { font-size: 12.5px; color: var(--text-muted); align-self: center; }

/* ── Sliders ─────────────────────────────────────────────────────────── */

/* Explicit thumb/track styling — the default macOS control is small and the
   larger hit area makes fine dragging much easier, especially on touch. */
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

input[type='range']:active { cursor: grabbing; }

input[type='range']::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 100ms;
}

input[type='range']:active::-webkit-slider-thumb { transform: scale(1.12); }

input[type='range']::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
}

input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

input[type='range']:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ── Language switcher ───────────────────────────────────────────────── */

.foot-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 7px;
}
