:root {
  color-scheme: light;
  /* "On air": a calm studio teal for everything you do, a recording red only while the mic is live,
     and warm amber for streaks and goals. */
  --bg: #eef3f2; --surface: #ffffff; --surface-2: #f4f8f7; --line: #dce6e3;
  --ink: #17232b; --ink-2: #44535b; --muted: #6c7b81;
  --accent: #0d7a6b; --accent-ink: #ffffff; --accent-soft: #dcf1ec; --accent-strong: #08594e;
  --prev: #b6c2c0;
  --good: #1d7a45; --good-soft: #e3f4e9; --bad: #b42318; --bad-soft: #fdecea;
  --warn: #8a5a00; --warn-soft: #fff3d1;
  --rec: #e0443a; --rec-soft: #fde9e7;
  --sun: #f2b33d; --sun-soft: #fff4dc; --sun-ink: #7a5000;
  --header: #0f2b2a; --header-ink: #eef7f5; --header-muted: #9fbdb8;
  --shadow: 0 1px 2px rgba(15,43,42,.05), 0 6px 18px rgba(15,43,42,.06);
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1716; --surface: #152120; --surface-2: #1b2928; --line: #263735;
    --ink: #eaf3f1; --ink-2: #bfd0cc; --muted: #86a09b;
    --accent: #3fb8a3; --accent-ink: #062a25; --accent-soft: #143a35; --accent-strong: #7fd8c8;
    --prev: #4f625f;
    --good: #5cc27a; --good-soft: #17301f; --bad: #f07a6f; --bad-soft: #3a1c1a;
    --warn: #f0c060; --warn-soft: #33290f;
    --rec: #ff6b5f; --rec-soft: #3d1d1a;
    --sun: #f5c25a; --sun-soft: #33280f; --sun-ink: #f5c25a;
    --header: #0a1a19; --header-ink: #eaf3f1; --header-muted: #8fb0aa;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1716; --surface: #152120; --surface-2: #1b2928; --line: #263735;
  --ink: #eaf3f1; --ink-2: #bfd0cc; --muted: #86a09b;
  --accent: #3fb8a3; --accent-ink: #062a25; --accent-soft: #143a35; --accent-strong: #7fd8c8;
  --prev: #4f625f;
  --good: #5cc27a; --good-soft: #17301f; --bad: #f07a6f; --bad-soft: #3a1c1a;
  --warn: #f0c060; --warn-soft: #33290f;
  --rec: #ff6b5f; --rec-soft: #3d1d1a;
  --sun: #f5c25a; --sun-soft: #33280f; --sun-ink: #f5c25a;
  --header: #0a1a19; --header-ink: #eaf3f1; --header-muted: #8fb0aa;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }
code { font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
h3 { font-size: 14px; margin: 18px 0 6px; }
ul, ol { margin: 0; padding-left: 20px; } li { margin: 3px 0; }

/* header */
.top { background: var(--header); color: var(--header-ink); }
.top-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 14px; gap: 12px; }
.brand { display: flex; gap: 14px; align-items: center; min-width: 0; }
.logo { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex: none; }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.brand p { margin: 2px 0 0; color: var(--header-muted); font-size: 13.5px; }
.top-right { display: flex; gap: 8px; align-items: center; }
.badge { font-size: 12px; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--header-ink); white-space: nowrap; }
.badge.local { background: rgba(240,192,96,.18); }
.icon-btn { background: rgba(255,255,255,.08); color: var(--header-ink); border: 0; width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 16px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tab { background: transparent; color: var(--header-muted); border: 0; padding: 11px 14px; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--header-ink); border-bottom-color: var(--accent); }

main.wrap { padding-top: 20px; padding-bottom: 60px; }
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { font-weight: 700; font-size: 15.5px; margin-bottom: 12px; }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; margin-right: 6px; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap-s { gap: 8px; } .wrap-row { flex-wrap: wrap; gap: 8px; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }

/* controls */
button, .btn-link { font: inherit; font-weight: 650; border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.07); }
.ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.ghost:hover { border-color: var(--muted); }
.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.record { background: var(--rec-soft); color: var(--rec); border: 1px solid transparent; }
.record.on { background: var(--rec); color: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(196,50,31,.35); } 50% { box-shadow: 0 0 0 8px rgba(196,50,31,0); } }
textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
select { width: auto; padding: 8px 10px; }
textarea { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); padding: 7px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.small-chips { margin-top: 10px; }
.small-chips .chip { cursor: default; font-size: 12.5px; padding: 3px 9px; }

.prompt-box { margin-top: 14px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.prompt-text { font-size: 17px; font-weight: 650; line-height: 1.4; }
.pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

.take { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; margin-left: 6px; font-weight: 600; color: var(--ink-2); }
.timer { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 750; }
.timebar { position: relative; height: 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
#timeFill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .3s linear; }
#timeTarget { position: absolute; top: 0; bottom: 0; background: rgba(31,122,58,.22); }
.interim { font-style: italic; color: var(--muted); font-size: 13.5px; margin-bottom: 6px; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider { width: 38px; height: 22px; border-radius: 99px; background: var(--prev); position: relative; flex: none; transition: background .2s; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }

.banner { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.banner b { color: var(--accent-strong); }
.warn { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }

/* results */
.empty { text-align: center; padding: 40px 12px; color: var(--ink-2); }
.empty-icon { font-size: 34px; }
.score-row { display: flex; gap: 20px; align-items: center; }
@media (max-width: 520px) { .score-row { flex-direction: column; align-items: stretch; } .ring { align-self: center; } }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ring-label b { font-size: 34px; line-height: 1; } .ring-label span { font-size: 12px; color: var(--muted); }
.dims { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dim { display: grid; grid-template-columns: 128px 1fr 34px; gap: 8px; align-items: center; font-size: 13px; }
.dim-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.dim-bar > div { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .6s ease; }
.dim b { text-align: right; font-variant-numeric: tabular-nums; }
.dim.weak > span:first-child { font-weight: 700; } .dim.weak > span:first-child::after { content: " ← focus"; color: var(--bad); font-weight: 600; font-size: 11.5px; }

.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
@media (max-width: 520px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.metric b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.metric span { font-size: 11.5px; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .split { grid-template-columns: 1fr; } }
.smap { display: flex; flex-direction: column; gap: 6px; }
.sm-item { display: grid; grid-template-columns: 22px 130px 1fr; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.sm-item .ico { font-weight: 800; text-align: center; }
.sm-item.present .ico { color: var(--good); } .sm-item.weak .ico { color: var(--warn); } .sm-item.missing .ico { color: var(--bad); }
@media (max-width: 520px) { .sm-item { grid-template-columns: 22px 1fr; } .sm-item .note { grid-column: 2; } }
.coach { margin-top: 16px; background: var(--warn-soft); border-radius: 12px; padding: 14px; }
.coach-h { font-weight: 750; margin-bottom: 4px; }
.coach p { margin: 0 0 8px; }
.coach ol { margin-bottom: 4px; }
#outlineWrap { margin-top: 10px; }
.next { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.next p { margin: 4px 0 12px; font-weight: 600; }

/* compare */
.verdict { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.verdict.improved { background: var(--good-soft); color: var(--good); }
.verdict.regressed { background: var(--bad-soft); color: var(--bad); }
.verdict.steady { background: var(--surface-2); color: var(--ink-2); }
.lead { margin: 0 0 10px; font-weight: 600; }
.ctable, .ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ctable th, .ctable td, .ptable th, .ptable td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.ctable th:first-child, .ctable td:first-child, .ptable th:first-child, .ptable td:first-child { text-align: left; }
.ctable th, .ptable th { font-size: 12px; color: var(--muted); font-weight: 600; }
.delta.up { color: var(--good); font-weight: 700; } .delta.down { color: var(--bad); font-weight: 700; } .delta.flat { color: var(--muted); }
.takes-spark { display: flex; gap: 6px; align-items: flex-end; height: 64px; margin: 4px 0 12px; }
.takes-spark .tk { flex: 1; max-width: 54px; background: var(--prev); border-radius: 4px 4px 0 0; position: relative; min-height: 4px; }
.takes-spark .tk.cur { background: var(--accent); }
.takes-spark .tk span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.transcript-quote { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; margin: 8px 0 0; }
details summary { cursor: pointer; }

/* progress */
.rec-card { margin-bottom: 18px; border-left: 4px solid var(--accent); }
.rec-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
@media (max-width: 800px) { .rec-grid { grid-template-columns: 1fr; } }
.rec-title { font-size: 20px; font-weight: 750; margin: 2px 0 6px; }
.rec-evidence { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; margin: 8px 0; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi .d { font-size: 12.5px; margin-top: 2px; }
.chart { width: 100%; min-height: 220px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .dot.retry { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .bar-cur { fill: var(--accent); } .chart .bar-prev { fill: var(--prev); }
.chart .lbl { fill: var(--ink-2); font-size: 12px; }
.chart .val { fill: var(--ink); font-size: 11.5px; font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.fbar { display: grid; grid-template-columns: 110px 1fr 30px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.fbar .t { height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.fbar .t div { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.fbar b { text-align: right; font-variant-numeric: tabular-nums; }

/* history */
.hchain { border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; overflow: hidden; }
.hchain-h { padding: 10px 12px; background: var(--surface-2); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hchain-h .p { font-weight: 650; }
.hattempt { border-top: 1px solid var(--line); }
.hattempt summary { padding: 10px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; }
.hattempt summary::-webkit-details-marker { display: none; }
.hattempt .body { padding: 0 12px 12px; }
.score-pill { font-weight: 800; font-variant-numeric: tabular-nums; background: var(--accent-soft); color: var(--accent-strong); padding: 2px 9px; border-radius: 8px; }
.tag { font-size: 12px; border: 1px solid var(--line); padding: 1px 8px; border-radius: 99px; color: var(--ink-2); }
.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); padding: 5px 10px; font-size: 12.5px; }

.tooltip { position: fixed; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px; padding: 7px 9px; border-radius: 8px; z-index: 50; max-width: 260px; line-height: 1.4; }

@media (max-width: 640px) {
  .brand p { display: none; }
  .brand h1 { font-size: 19px; white-space: nowrap; }
  .logo { width: 38px; height: 38px; }
  .badge { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .prompt-box > .row.between { flex-wrap: wrap; gap: 8px; }
  .sm { white-space: nowrap; }
}
@media (max-width: 480px) { .badge { display: none; } }

/* ---------------- v3: Learn ---------------- */
.today-card { margin-bottom: 18px; border-left: 4px solid var(--accent); }
.today-title { font-size: 20px; font-weight: 750; }
.today-progress { font-size: 13px; color: var(--ink-2); text-align: right; }
.today-progress b { font-size: 22px; color: var(--ink); }
.today-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 900px) { .today-items { grid-template-columns: 1fr; } }
.today-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.today-item.done { border-color: var(--good); background: var(--good-soft); }
.today-item .ti-h { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.today-item .ti-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--prev); display: grid; place-items: center; font-size: 12px; flex: none; }
.today-item.done .ti-check { background: var(--good); border-color: var(--good); color: #fff; }
.today-item p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.today-item .ti-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }
.journey-meter { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.jm-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
#journeyFill { height: 100%; background: var(--good); width: 0; transition: width .5s; }
.module { margin-top: 18px; }
.module-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.module-h b { font-size: 15px; }
.lesson-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; cursor: pointer; background: var(--surface); width: 100%; text-align: left; font: inherit; color: inherit; }
.lesson-row:hover { border-color: var(--accent); }
.lesson-row.current { border-color: var(--accent); background: var(--accent-soft); }
.lr-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px solid var(--prev); color: var(--ink-2); }
.lesson-row.done .lr-icon { background: var(--good); border-color: var(--good); color: #fff; }
.lesson-row.current .lr-icon { border-color: var(--accent); color: var(--accent-strong); }
.lr-title { font-weight: 650; }
.lr-sub { font-size: 12.5px; color: var(--muted); }
.lr-meta { font-size: 12.5px; color: var(--ink-2); text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .lr-meta { display: none; } }

.lesson-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-top: 12px; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr; } }
.lesson-title { margin: 4px 0 4px; font-size: 26px; letter-spacing: -.01em; }
.concept p { margin: 0 0 12px; color: var(--ink-2); }
.ex-prompt { font-weight: 650; margin: 0 0 10px; }
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
@media (max-width: 600px) { .ex-grid { grid-template-columns: 1fr; } }
.ex { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ex p { margin: 4px 0 0; }
.ex.before { background: var(--bad-soft); } .ex.before .eyebrow { color: var(--bad); }
.ex.after { background: var(--good-soft); } .ex.after .eyebrow { color: var(--good); }
.fw-card { border-top: 4px solid var(--accent); }
.fw-name { font-size: 20px; font-weight: 800; margin: 2px 0 8px; }
.fw-steps { list-style: none; padding: 0; counter-reset: s; }
.fw-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fw-steps li:last-child { border-bottom: 0; }
.fw-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.fw-steps b { display: block; }
.fw-steps span { font-size: 13.5px; color: var(--ink-2); }
.cheat li { margin: 6px 0; font-size: 14px; }
.exercise-card { background: var(--accent-soft); border-color: var(--accent); }
.pass-list { margin: 4px 0 10px; }
select.full { width: 100%; margin-top: 4px; }

.lesson-result { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.lesson-result.pass { background: var(--good-soft); border: 1px solid var(--good); }
.lesson-result.fail { background: var(--warn-soft); border: 1px solid var(--warn); }
.lesson-result h4 { margin: 0 0 6px; font-size: 15px; }
.lesson-result ul { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13.5px; }
.lesson-result li { display: flex; gap: 8px; }
.lesson-result .ok { color: var(--good); font-weight: 800; } .lesson-result .no { color: var(--bad); font-weight: 800; }
.ctx-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 640px) { .today-progress { text-align: left; } .journey-meter { min-width: 0; width: 100%; } }

/* ---------------- v4: real audio ---------------- */
.mic-row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.mic-label { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.level { flex: 1; height: 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
#levelFill { height: 100%; width: 0; background: var(--good); transition: width .08s linear; }
.voice { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.waveform { margin: 10px 0 4px; cursor: pointer; }
.waveform svg { width: 100%; height: 90px; display: block; }
.waveform .wbar { fill: var(--accent); }
.waveform .p-natural { fill: rgba(122,127,137,.18); }
.waveform .p-long { fill: rgba(240,176,40,.35); }
.waveform .p-stall { fill: rgba(196,50,31,.35); }
.waveform .pl { fill: var(--bad); font-size: 10px; font-weight: 700; }
.waveform .head { stroke: var(--ink); stroke-width: 1.5; }
.waveform .axis { fill: var(--muted); font-size: 10px; }
.wave-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.lg { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.lg.natural { background: rgba(122,127,137,.35); } .lg.long { background: rgba(240,176,40,.6); } .lg.stall { background: rgba(196,50,31,.6); }
#player { width: 100%; height: 36px; margin-bottom: 10px; }
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 600px) { .voice-grid { grid-template-columns: 1fr; } }
.mini-chart svg { width: 100%; height: 60px; display: block; }
.mini-chart .band { fill: rgba(31,122,58,.14); }
.mini-chart .pb { fill: var(--accent); }
.mini-chart .pl2 { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.mini-chart .zero { stroke: var(--line); }
.mini-chart text { fill: var(--muted); font-size: 9.5px; }

/* ---------------- v5: pronunciation, vocabulary, sentences ---------------- */
.today-items { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.today-words { margin-top: 14px; }
.tw-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.tw-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tw { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.tw.used { border-style: solid; border-color: var(--good); background: var(--good-soft); }
.journey-card { margin-bottom: 18px; }
.jm-fill { height: 100%; background: var(--good); transition: width .5s; }

.w { cursor: pointer; border-bottom: 1px dotted var(--muted); }
.w:hover, .w:focus-visible { color: var(--accent-strong); border-bottom-color: var(--accent); outline: none; }
.w.focus { font-weight: 750; border-bottom: 2px solid var(--accent); }
.w.st-good { background: var(--good-soft); border-radius: 4px; padding: 0 2px; }
.w.st-unclear { background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 0 2px; font-weight: 700; }
.w.st-substituted, .w.st-missed { background: var(--bad-soft); color: var(--bad); border-radius: 4px; padding: 0 2px; font-weight: 700; }
.w.st-missed { text-decoration: line-through; }
.lg.st-good { background: var(--good-soft); border: 1px solid var(--good); }
.lg.st-unclear { background: var(--warn-soft); border: 1px solid var(--warn); }
.lg.st-substituted { background: var(--bad-soft); border: 1px solid var(--bad); }
.lg.st-missed { background: var(--bad-soft); border: 1px dashed var(--bad); }
.prompt-text .w { border-bottom-color: transparent; }
.prompt-text .w.focus { border-bottom-color: var(--accent); }

.word-pop { position: absolute; z-index: 60; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 260px; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.respell { font-size: 22px; font-weight: 800; letter-spacing: .02em; margin: 6px 0 2px; color: var(--accent-strong); }
.respell-sm { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--accent-strong); }

#results.read-aloud #structureWrap, #results.read-aloud #outlineWrap { display: none; }
.pron, .language { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ra-target { font-size: 18px; line-height: 1.9; margin: 4px 0 8px; }
.pron-table { margin-top: 10px; }
.pron-table td { vertical-align: middle; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .lang-grid { grid-template-columns: 1fr; } }
.language .eyebrow { display: block; margin: 10px 0 4px; }
.chip.good { background: var(--good-soft); border-color: var(--good); color: var(--good); cursor: default; }
.chip.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); cursor: default; }
.language .chip, .pron .chip { font-size: 12.5px; padding: 3px 9px; }
.sent-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: 6px; border-bottom: 1px solid var(--line); }
.sent-bars .sb { flex: 1; max-width: 22px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 4px; }
.sent-bars .sb.long { background: var(--bad); }
.quote { border-left: 3px solid var(--bad); padding-left: 8px; color: var(--ink-2); }
.tip { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }

.sound-summary { min-width: 240px; }
.ra-items { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ra-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.ra-text { font-size: 17px; line-height: 1.8; margin: 0 0 6px; }
.pairs { display: flex; flex-direction: column; gap: 8px; }
.pair { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pron-table th, .pron-table td { text-align: left !important; }

/* accounts */
input[type="text"], input[type="email"], input[type="password"] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
body.signed-out .top, body.signed-out #appMain { display: none; }
.auth-card { width: 100%; max-width: 400px; padding: 28px; }
.auth-card h2 { margin: 14px 0 4px; font-size: 22px; letter-spacing: -.01em; }
.auth-card form { display: grid; gap: 14px; margin-top: 18px; }
.auth-card label { display: grid; gap: 5px; font-weight: 600; font-size: 13.5px; }
.auth-card .primary { justify-content: center; margin-top: 4px; }
.auth-switch { margin: 16px 0 0; text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 650; }
.auth-privacy { margin: 14px 0 0; text-align: center; }
.auth-error { margin: 0; color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.account { position: relative; }
.account-btn { font-size: 13.5px; font-weight: 750; border-radius: 99px; }
.account-pop { position: absolute; right: 0; top: 42px; z-index: 20; min-width: 220px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.18); display: grid; gap: 10px; }
.account-pop #accountEmail { word-break: break-all; }
.danger-zone { margin-top: 16px; }
.danger-zone input { max-width: 280px; }
@media (max-width: 640px) { .badge { display: none; } }

/* 28-Day Speaking Sprint (v7) — built from the app's own theme tokens, so it follows light and dark mode */
.program { background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 60%); color: var(--ink);
  border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 16px; padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.pg-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pg-eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); font-weight: 800; }
.pg-title { margin: 4px 0 4px; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.15; letter-spacing: -.015em; font-weight: 800; color: var(--ink); }
.pg-tag { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 560px; }
.pg-stats { display: flex; gap: 18px; }
.pg-stats div { display: grid; text-align: right; }
.pg-stats b { font-size: 26px; line-height: 1.1; }
.pg-stats span { font-size: 12px; color: var(--muted); }
.pg-track { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); margin: 18px 0 8px; }
.pg-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s; }
.pg-mark { position: absolute; top: -4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.pg-mark.hit { background: var(--accent); }
.pg-milestones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pg-ms { display: grid; font-size: 12.5px; color: var(--muted); text-align: right; }
.pg-ms span { font-weight: 750; color: var(--ink-2); }
.pg-ms.hit span { color: var(--accent-strong); }
.pg-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; }
.pg-cta .small { color: var(--muted); }
.pg-weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.pg-week-h { font-size: 12.5px; font-weight: 800; color: var(--ink); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pg-day { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; width: 100%; text-align: left; background: transparent;
  color: var(--ink); border: 0; border-radius: 8px; padding: 6px; font-weight: 500; font-size: 13px; }
.pg-day:hover { background: var(--surface-2); }
.pg-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pg-dn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; border: 1.5px solid var(--line); color: var(--muted); }
.pg-dt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-ds { font-size: 11px; color: var(--muted); }
.pg-day.done .pg-dn { background: var(--good); border-color: var(--good); color: #fff; }
.pg-day.available .pg-dn { border-color: var(--accent); color: var(--accent-strong); }
.program.enrolled .pg-day.available { background: var(--accent-soft); }
.pg-day.available .pg-ds { color: var(--accent-strong); font-weight: 700; }
.pg-day.locked .pg-dt, .pg-day.tomorrow .pg-dt { color: var(--muted); }
@media (max-width: 1000px) { .pg-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pg-ms { text-align: left; } .pg-weeks, .pg-milestones { grid-template-columns: 1fr 1fr; } .program { padding: 18px 16px; } .pg-stats div { text-align: left; } }
@media (max-width: 420px) { .pg-weeks { grid-template-columns: 1fr; } }
.gate-note { margin: 10px 0 0; font-size: 13px; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; }
.milestone-hit { margin: 0 0 8px; font-size: 14px; background: var(--surface); border: 1px solid var(--good); border-radius: 8px; padding: 8px 10px; }

/* three-angle review (v8) */
.rv { display: grid; gap: 12px; margin: 16px 0 4px; }
.rv-sec { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.rv-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rv-who { font-weight: 750; font-size: 15px; }
.rv-sec .eyebrow { display: block; margin: 10px 0 4px; }
.rv-sec p { margin: 6px 0; font-size: 14px; }
.rv-qn { margin-top: 0 !important; }
.rv-sum { font-size: 15px !important; font-weight: 600; }
.rv-badge { font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.rv-eval { border-left: 4px solid var(--prev); }
.rv-eval.v-strong_yes { border-left-color: var(--good); } .rv-eval.v-strong_yes .rv-badge { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.rv-eval.v-lean_yes { border-left-color: var(--accent); } .rv-eval.v-lean_yes .rv-badge { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }
.rv-eval.v-lean_no { border-left-color: var(--warn); } .rv-eval.v-lean_no .rv-badge { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.rv-eval.v-no { border-left-color: var(--bad); } .rv-eval.v-no .rv-badge { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.rv-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .rv-2col { grid-template-columns: 1fr; } }
.rv-quotes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.rv-quotes li { margin: 0; }
.rv q, .rv-strong { font-style: italic; color: var(--ink); }
.rv q::before { content: "“"; } .rv q::after { content: "”"; }
.rv-quotes span { color: var(--ink-2); }
.rv-follow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.rv-follow .eyebrow { margin: 0 !important; }
.rv-follow p { margin: 2px 0 0 !important; font-weight: 650; }
.rv-parts { display: grid; gap: 6px; }
.rv-part { display: grid; grid-template-columns: 20px 120px 1fr; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 7px 9px; border-radius: 8px; background: var(--surface-2); }
.rv-part .ico { font-weight: 800; text-align: center; }
.rv-part.present .ico { color: var(--good); } .rv-part.weak .ico { color: var(--warn); } .rv-part.missing .ico { color: var(--bad); }
@media (max-width: 520px) { .rv-part { grid-template-columns: 20px 1fr; } .rv-part > span:last-child { grid-column: 2; } }
.rv-note { color: var(--warn); }
.rv-coach { background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.rv-fixes { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; }
.rv-fixes li span { color: var(--ink-2); }
.rv-next { margin: 0; font-size: 14px; font-weight: 600; }
.rv-actions { margin: 12px 0 4px; }
.rv-drill { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.rv-drill summary { cursor: pointer; }
.rv-strong { line-height: 1.65; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.rv-mentor { border-left: 4px solid var(--accent); }
.rv-src { margin: 0; text-align: right; }
.rv-fix { border-left: 4px solid var(--warn); }
.rv-corr { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 12px; font-size: 14px; }
.rv-said, .rv-better { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: baseline; }
.rv-said .eyebrow, .rv-better .eyebrow { margin: 0 !important; }
.rv-said q { color: var(--ink-2); }
.rv-better span:last-child { font-weight: 650; color: var(--good); }
.rv-why { margin: 4px 0 0 72px; padding-left: 16px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 520px) { .rv-said, .rv-better { grid-template-columns: 1fr; gap: 2px; } .rv-why { margin-left: 0; } }

/* scoring provenance (v8.2) */
.pb { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .03em; padding: 0 5px; border-radius: 4px; vertical-align: 1px; line-height: 15px; }
.pb.ai { background: var(--accent-soft); color: var(--accent-strong); }
.pb.est { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.metric.estimated b { color: var(--ink-2); }
.metric sup { font-size: 9px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.prov-line { margin: 6px 0 0; line-height: 1.6; }
.dot.faded { opacity: .28; }
.scoring-note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; }
.cmp-warn { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; }
.verdict.incompatible { background: var(--warn-soft); color: var(--warn); }

/* focused results (v8.3) */
.focus { display: grid; gap: 10px; margin: 14px 0 12px; }
.fc-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.fc-row p { margin: 3px 0 0; font-size: 14.5px; }
.fc-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.fc-row.good { border-left: 4px solid var(--good); } .fc-row.good .fc-ico { background: var(--good); }
.fc-row.pri { border-left: 4px solid var(--warn); } .fc-row.pri .fc-ico { background: var(--warn); }
.fc-row.retry { border-left: 4px solid var(--accent); background: var(--accent-soft); } .fc-row.retry .fc-ico { background: var(--accent); }
.fc-row.retry button { margin-top: 8px; }
.fc-quote { font-size: 13.5px !important; color: var(--ink-2); }
.fc-quote q, .rv q { font-style: italic; }
.fc-quote q::before { content: "“"; } .fc-quote q::after { content: "”"; }
button.ts { padding: 1px 7px; font-size: 11.5px; font-weight: 700; border-radius: 99px; background: var(--surface-2); color: var(--accent-strong); border: 1px solid var(--line); margin-left: 4px; vertical-align: 1px; }
button.ts:hover { border-color: var(--accent); }
details.more { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--surface); }
details.more > summary { cursor: pointer; padding: 11px 14px; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; display: inline-block; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary span { font-weight: 500; }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.more > .rv, details.more > .voice, details.more > .language { margin-top: 12px; margin-bottom: 14px; }
details.more > .metrics { margin-top: 12px; }
details.more > #fillerChips { margin-bottom: 14px; }
.hfocus { list-style: none; padding: 0; display: grid; gap: 4px; }

/* adaptive learning (v9) */
.baseline { margin-bottom: 18px; border-left: 4px solid var(--good); }
.bl-items { display: grid; gap: 8px; margin-top: 12px; }
.bl-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.bl-item p { margin: 2px 0 0; color: var(--ink-2); }
.bl-item.done { background: var(--good-soft); border-color: var(--good); }
.bl-item .ti-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--prev); display: grid; place-items: center; font-size: 12px; }
.bl-item.done .ti-check { background: var(--good); border-color: var(--good); color: #fff; }
.adaptive-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .adaptive-row { grid-template-columns: 1fr; } }
.sk-list { display: grid; gap: 8px; }
.sk { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.sk.due { border-color: var(--warn); background: var(--warn-soft); }
.sk-h { display: flex; justify-content: space-between; gap: 8px; }
.sk-h .due { color: var(--warn); font-weight: 700; }
.sk-box { display: flex; gap: 4px; align-items: center; margin: 4px 0 2px; }
.sk-box i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.sk-box i.on { background: var(--accent); }
.sk-box span { margin-left: 6px; }
.sk-why { line-height: 1.4; }
.sk-base { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.wk-prompt { font-weight: 650; font-size: 15px; margin: 0 0 10px; }
.wk-hist { display: flex; gap: 4px; align-items: flex-end; height: 48px; margin-top: 12px; }
.wk-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.wk-bar span { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; }
.wk-bar.faded span { opacity: .3; }


/* =================================================================== v9.3: engaging first-run & studio */
/* Type: rounded display for the things you read at a glance — names, prompts, scores, timers. */
.brand h1, .card-h, .prompt-text, .timer, .ring-label b, .today-title, .kpi b, .auth-hero, .auth-card h2,
.lesson-title, .fw-name, .empty-title, .score-headline, .ds-text b, .demo-h b { font-family: var(--display); }
.brand h1 { font-weight: 750; letter-spacing: -.015em; }
/* Labels in sentence case: quieter, and they read like words rather than signage. */
.eyebrow { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }

/* logo: a small sound wave instead of initials */
.logo { background: var(--accent); }
.logo-wave { display: flex; gap: 3px; align-items: center; height: 20px; }
.logo-wave i { width: 4px; border-radius: 2px; background: #fff; }
.logo-wave i:nth-child(1) { height: 8px; } .logo-wave i:nth-child(2) { height: 18px; }
.logo-wave i:nth-child(3) { height: 12px; } .logo-wave i:nth-child(4) { height: 6px; }
.badge.local { background: rgba(255,255,255,.1); }
.tab.active { border-bottom-color: var(--sun); }
.tab-ic { margin-right: 6px; }

/* ---------- day strip: today's goal, streak, one next step */
.day-strip { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 10px 14px; margin-bottom: 18px; box-shadow: var(--shadow); }
.ds-goal { position: relative; width: 44px; height: 44px; flex: none; }
.ds-goal svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ds-goal circle { fill: none; stroke: var(--line); stroke-width: 5; stroke-linecap: round; }
.ds-goal circle.on { stroke: var(--accent); }
.ds-goal.done circle.on { stroke: var(--sun); }
.ds-goal span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px var(--display); color: var(--ink-2); }
.ds-goal.done span { color: var(--sun-ink); font-size: 16px; }
.ds-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.ds-text b { font-size: 16px; } .ds-text span { color: var(--ink-2); font-size: 13.5px; }
.ds-streak { display: inline-flex; align-items: center; gap: 4px; background: var(--sun-soft); color: var(--sun-ink);
  font: 700 13px var(--display); padding: 6px 11px; border-radius: 99px; white-space: nowrap; }
.day-strip[data-tab="practice"] .ds-cta { display: none; }

/* ---------- the studio: one big mic button with a halo that follows your voice */
.studio { display: flex; align-items: center; gap: 22px; margin: 16px 0 14px; }
.record { --lvl: 0; position: relative; flex: none; width: 112px; height: 112px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; background: transparent; border: 0; color: var(--ink); }
.record:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.rec-core { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--rec);
  box-shadow: 0 6px 18px rgba(224,68,58,.32); transition: transform .15s ease; }
.record:hover .rec-core { transform: scale(1.04); }
.record:active .rec-core { transform: scale(.97); }
.rec-dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: border-radius .2s ease, width .2s, height .2s; }
.record.on .rec-dot { width: 24px; height: 24px; border-radius: 6px; }           /* ● → ■ : tap to stop */
.rec-halo { position: absolute; inset: 0; border-radius: 50%; background: var(--rec); opacity: 0;
  transform: scale(calc(.78 + var(--lvl) * .32)); transition: transform .12s linear, opacity .2s; }
.record.on .rec-halo { opacity: .22; }
.rec-label { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 700 13px var(--display); color: var(--ink-2); }
.record:disabled { opacity: .45; }
.record.on { animation: none; background: transparent; }
.studio-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.studio-side .mic-row { margin: 0; }
.studio-hint { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.studio-actions .primary { padding: 11px 18px; }
.link-btn { background: none; color: var(--ink-2); padding: 10px 6px; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.link-btn:hover { color: var(--ink); }
.transcript-label { display: block; margin-top: 26px; margin-bottom: 4px; }
.transcript-about { margin-top: 6px; }
.transcript-about summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.transcript-about p { margin: 6px 0 0; }
.prompt-text { font-size: 19px; font-weight: 700; line-height: 1.35; letter-spacing: -.005em; }
.timer { font-size: 24px; }
@media (prefers-reduced-motion: reduce) { .rec-halo, .rec-core, .rec-dot { transition: none; } }

/* ---------- coaching: empty state shows the loop; results open with one honest headline */
.empty { text-align: left; padding: 10px 4px 6px; }
.empty-title { font-size: 18px; font-weight: 750; margin: 0 0 14px; color: var(--ink); }
.loop { list-style: none; counter-reset: loop; padding: 0; margin: 0; display: grid; gap: 12px; }
.loop li { counter-increment: loop; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; margin: 0; }
.loop li::before { content: attr(data-ic); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid;
  place-items: center; background: var(--accent-soft); color: var(--accent-strong); font: 750 16px var(--display); }
.loop b { font-size: 15px; } .loop span { color: var(--ink-2); font-size: 13.5px; }
.score-headline { font-size: 18px; font-weight: 750; line-height: 1.3; margin: 0 0 12px; }
.ring[data-band="high"] .ring-fg { stroke: var(--good); }
.ring[data-band="mid"] .ring-fg { stroke: var(--accent); }
.ring[data-band="low"] .ring-fg { stroke: var(--sun); }
.ring-label b { font-weight: 750; }

/* ---------- toast (the daily-goal moment) */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  width: max-content; max-width: calc(100vw - 32px);
  background: var(--header); color: var(--header-ink); padding: 12px 18px 12px 46px; border-radius: 14px;
  font-weight: 650; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toast-in .35s ease both; }
.toast::before { content: "★"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--sun); font-size: 18px; }
.toast.out { opacity: 0; transition: opacity .4s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- sign-up: show what you get, next to the form */
.auth-layout { width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 400px);
  gap: 48px; align-items: center; }
.auth-card .logo { display: none; }
.auth-card h2 { margin-top: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; font: 750 17px var(--display); }
.auth-brand .logo { width: 36px; height: 36px; border-radius: 10px; }
.auth-brand .logo-wave { height: 16px; } .auth-brand .logo-wave i { width: 3px; }
.auth-hero { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; margin: 26px 0 14px; }
.auth-lead { font-size: 16px; color: var(--ink-2); max-width: 48ch; margin: 0 0 22px; }
.demo { margin: 0 0 22px; display: grid; gap: 8px; max-width: 520px; }
.demo-take { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.demo-take p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.demo-take.after { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.demo-take.after p { color: var(--ink); }
.demo-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.demo-h b { font-size: 20px; color: var(--sun-ink); }
.demo-take.after .demo-h b { color: var(--good); }
.demo-tip { justify-self: start; margin-left: 18px; background: var(--sun-soft); color: var(--sun-ink); border-radius: 99px;
  padding: 6px 12px; font-size: 13.5px; font-weight: 650; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.auth-points li { padding-left: 22px; position: relative; margin: 0; }
.auth-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; gap: 24px; max-width: 520px; }
  .auth-hero { margin-top: 18px; }
  .demo, .auth-points { display: none; }              /* phones: the promise, then straight to the form */
  .auth-lead { margin-bottom: 0; }
}

/* ---------- phones: tabs become a bottom bar you can reach with a thumb */
@media (max-width: 640px) {
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--header); max-width: none;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); gap: 0; justify-content: space-around; overflow: visible;
    box-shadow: 0 -4px 16px rgba(0,0,0,.18); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px;
    font-size: 11px; border-bottom: 0; border-top: 2px solid transparent; border-radius: 0; }
  .tab.active { border-top-color: var(--sun); border-bottom-color: transparent; }
  .tab-ic { margin: 0; font-size: 19px; line-height: 1; }
  main.wrap { padding-bottom: 96px; }
  .top-inner { padding-top: 14px; padding-bottom: 14px; }
  .brand p { display: none; }
  .day-strip { flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; }
  .ds-text { flex-basis: calc(100% - 60px); }
  .ds-streak { margin-left: 56px; }
  .ds-cta { margin-left: auto; }
  .studio { flex-direction: column; gap: 30px; text-align: center; margin-top: 18px; }
  .studio-side { align-items: center; }
  .studio-side .mic-row { width: 100%; }
  .studio-actions { justify-content: center; }
  .record { width: 104px; height: 104px; } .rec-core { width: 80px; height: 80px; }
  .toast { bottom: 84px; }
  /* get the mic above the fold: scenarios scroll sideways in one row, the goal line goes */
  #modeChips > .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
  #modeChips > .chips::-webkit-scrollbar { display: none; }
  #modeChips .chip { flex: none; }
  #scenarioGoal { display: none; }
  .prompt-text { font-size: 18px; }
}
body.signed-out .tabs { display: none; }

/* ---------- the mentor's rewrite: "say it like this" */
.fc-row.say { background: var(--surface); border-left: 4px solid var(--accent); }
.fc-row.say .fc-ico { background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; }
.say-intro { margin: 2px 0 10px; }
.say-parts { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.say-parts li { display: grid; grid-template-columns: 104px 1fr; gap: 10px; margin: 0; align-items: baseline; }
.say-label { font: 700 12.5px var(--display); color: var(--ink-2); display: flex; flex-direction: column; line-height: 1.25; }
.say-label em { font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.say-parts li.added .say-label em { color: var(--sun-ink); }
.say-text { font-size: 15px; line-height: 1.5; }
.say-parts li.added .say-text { background: var(--sun-soft); border-radius: 6px; padding: 1px 6px; margin-left: -6px; }
.say-parts li.fill .say-text { color: var(--muted); font-style: italic; }
.fc-starter { margin: 6px 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--sun-soft); color: var(--ink); font-size: 14px; }
.fc-starter span { display: block; font-size: 12.5px; font-weight: 650; color: var(--sun-ink); }
.rv-say .fc-row.say { display: block; border: 0; padding: 0; background: none; }
.rv-say .fc-row.say .fc-ico, .rv-say .fc-row.say > div > .eyebrow { display: none; }
@media (max-width: 520px) { .say-parts li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- grammar to practise */
.say-grammar { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
.gram { margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.gram-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.gram-list li { margin: 0; display: grid; gap: 2px; }
.gram-list li > span:not(.muted) { font-size: 14px; color: var(--ink-2); }
.gram-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.gram-ex code { font-family: var(--body); font-size: 12.5px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; padding: 2px 9px; color: var(--ink); }

/* ---------- public beta */
.beta-badge { display: inline-block; vertical-align: 3px; margin-left: 6px; font: 700 11px var(--body); letter-spacing: .02em;
  background: var(--sun); color: #3a2600; padding: 2px 7px; border-radius: 99px; }
.site-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 8px 16px 28px;
  font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--ink-2); }
body.signed-out .site-foot { display: none; }
.auth-privacy a { color: var(--accent); font-weight: 650; }
@media (max-width: 640px) { .site-foot { padding-bottom: 96px; } }
