/* Evals Explained: a calm, dark study space with teal and amber accents. */
:root {
  --bg: #0a0f1d;
  --bg2: #0d1426;
  --panel: #121a2f;
  --panel2: #172139;
  --panel3: #1d2944;
  --line: rgba(160, 180, 220, .12);
  --line2: rgba(160, 180, 220, .22);
  --text: #e7ecf6;
  --muted: #94a1ba;
  --faint: #66738d;
  --accent: #2dd4bf;
  --accent-2: #5eead4;
  --accent-ink: #042f2e;
  --amber: #fbbf24;
  --violet: #a78bfa;
  --good: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font);
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(45, 212, 191, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(167, 139, 250, .07), transparent 60%);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
code { font-family: var(--mono); font-size: .9em; background: rgba(148, 163, 184, .14); padding: .1em .35em; border-radius: 5px; }
kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--panel2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 60px; }
.wrap.narrow { max-width: 720px; }
.lead { color: var(--muted); font-size: 18px; max-width: 62ch; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; justify-content: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
#app.loading::after { content: ''; position: fixed; top: 0; left: 0; height: 2px; width: 40%; background: var(--accent); animation: load 1s ease-in-out infinite; }
@keyframes load { from { left: -40%; } to { left: 100%; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2);
  color: var(--text); padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 15px;
  transition: background .15s, border-color .15s, transform .1s; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { background: var(--panel3); border-color: rgba(160, 180, 220, .35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.lg { padding: 13px 20px; font-size: 16px; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, .4); }
.btn.busy { color: var(--accent); border-color: var(--accent); }
.pbtn {
  display: inline-grid; place-items: center; gap: 6px; grid-auto-flow: column; min-width: 38px; height: 38px; padding: 0 9px;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.pbtn:hover { background: var(--panel3); color: var(--text); }
.pbtn.on { color: var(--accent); }
.pbtn:disabled { opacity: .35; cursor: default; }
.pbtn.sm { min-width: 30px; height: 30px; }
.pbtn.main { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.pbtn.main:hover { background: var(--accent-2); color: var(--accent-ink); }
.pbtn.pill { font-weight: 600; font-size: 13px; min-width: 48px; border: 1px solid var(--line2); height: 30px; }
.pbtn.ask { background: rgba(45, 212, 191, .12); color: var(--accent-2); border: 1px solid rgba(45, 212, 191, .3); font-weight: 600; font-size: 14px; padding: 0 12px; }
.pbtn.ask:hover { background: rgba(45, 212, 191, .2); }
.pbtn.close { position: absolute; top: 10px; right: 10px; z-index: 2; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel + .panel { margin-top: 16px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--violet); background: rgba(167, 139, 250, .12); border-radius: 99px; padding: 2px 9px; }
.badge .ic { width: 13px; height: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 99;
  background: var(--panel3); border: 1px solid var(--line2); padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow);
  transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); font-weight: 500;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { border-color: rgba(74, 222, 128, .5); }
.toast.bad { border-color: rgba(248, 113, 113, .5); }

/* top bar */
.topbar { display: flex; align-items: center; gap: 18px; max-width: 1120px; margin: 0 auto; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 19px; text-decoration: none !important; }
.brand b { font-weight: 700; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(45, 212, 191, .25), rgba(167, 139, 250, .2)); color: var(--accent); border: 1px solid rgba(45, 212, 191, .3); }
.topbar nav { display: flex; gap: 4px; margin-left: auto; }
.topbar nav a { display: flex; align-items: center; gap: 7px; color: var(--muted); padding: 8px 12px; border-radius: 9px; font-weight: 500; font-size: 15px; text-decoration: none; }
.topbar nav a:hover { color: var(--text); background: var(--panel); }
.topbar nav a.on { color: var(--text); background: var(--panel2); }
.streak { display: flex; align-items: center; gap: 5px; font-weight: 700; color: var(--faint); font-size: 15px; }
.streak.hot { color: var(--amber); }

/* home */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center; padding: 34px 0 30px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); max-width: 14ch; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hstat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.hstat b { display: block; font-family: var(--display); font-size: 28px; }
.hstat small { color: var(--muted); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.howcard { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.howcard b { font-family: var(--display); font-size: 18px; display: block; margin: 8px 0 4px; }
.howcard p { color: var(--muted); margin: 0; font-size: 14.5px; }
.howic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(45, 212, 191, .12); color: var(--accent); }
.howic .ic { width: 21px; height: 21px; }
.banner { display: flex; align-items: center; gap: 12px; background: rgba(167, 139, 250, .1); border: 1px solid rgba(167, 139, 250, .3); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 22px; }
.banner span:nth-child(2) { flex: 1; }
.module { margin-top: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
.module.soon { opacity: .72; }
.mhead { display: flex; gap: 16px; align-items: center; padding: 14px 14px 10px; }
.mhead small { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: 12px; }
.mhead h2 { margin: 2px 0 4px; }
.mhead p { color: var(--muted); margin: 0; font-size: 14.5px; }
.mhead > div:nth-child(2) { flex: 1; }
.mnum { width: 50px; height: 50px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 25px; background: var(--panel2); border: 1px solid var(--line); }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 80% 100%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--panel3) 0); }
.ring b { font-size: 12px; }
.ring.big { width: 120px; height: 120px; margin: 0 auto 14px; background: radial-gradient(closest-side, var(--panel) 82%, transparent 84% 100%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--panel3) 0); }
.ring.big b { font-size: 28px; font-family: var(--display); }
.lessons { display: grid; gap: 4px; padding: 4px; }
.lesson { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 11px; color: var(--text); background: var(--bg2); border: 1px solid transparent; text-decoration: none !important; transition: .15s; }
a.lesson:hover { border-color: rgba(45, 212, 191, .35); background: var(--panel2); }
.lesson.off { color: var(--faint); }
.lnum { font-family: var(--mono); color: var(--faint); font-size: 13px; width: 30px; }
.ltitle { flex: 1; font-weight: 500; }
.lesson .ic { color: var(--faint); }
.soon-tag { font-size: 12px; color: var(--faint); border: 1px dashed var(--line2); padding: 2px 8px; border-radius: 99px; }
.pips3 { display: flex; gap: 5px; }
.pips3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--panel3); border: 1px solid var(--line2); }
.pips3 i.half { background: linear-gradient(90deg, var(--accent) 50%, var(--panel3) 50%); }
.pips3 i.f { background: var(--accent); border-color: var(--accent); }
.foot { color: var(--faint); font-size: 13px; text-align: center; margin-top: 30px; }

/* lesson page */
.lhead { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: end; padding: 8px 0 18px; }
.backlink { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; align-self: center; }
.lmeta small { color: var(--accent); font-weight: 600; font-size: 13px; }
.lmeta h1 { font-size: clamp(22px, 3vw, 30px); margin: 2px 0 0; }
.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tab { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--panel3); color: var(--text); }
.tab .tick { color: var(--good); display: inline-flex; }
.tab .tick .ic { width: 15px; height: 15px; }
.tab .tick + .tick { display: none; }
.lfoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.lfoot .btn { white-space: normal; text-align: left; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.two .panel + .panel { margin-top: 0; }
ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
ul.ticks li { padding-left: 26px; position: relative; color: #cdd5e5; }
ul.ticks li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); opacity: .8; }
dl.terms { margin: 0; display: grid; gap: 10px; }
dl.terms dt { font-weight: 700; color: var(--accent-2); }
dl.terms dd { margin: 2px 0 0; color: #cdd5e5; font-size: 14.5px; }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; border-color: rgba(45, 212, 191, .35); }
.next-card p { margin: 0; color: var(--muted); }

/* player */
.player { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.stage {
  position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 120% at 50% 0%, #15203a 0%, #0c1223 70%);
  border-bottom: 1px solid var(--line); overflow: hidden; container-type: inline-size;
}
.stage::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; opacity: .25; mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent); }
.stage-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 2.2cqi 3cqi 0; z-index: 1; font-size: clamp(11px, 1.15cqi, 14px); color: var(--faint); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.canvas { position: absolute; inset: 0; display: grid; place-items: center; padding: 6.5cqi 6cqi 4cqi; }
.canvas.enter .visual { animation: slidein .55s cubic-bezier(.2, .7, .2, 1); }
@keyframes slidein { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.start { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 6px; border: 0; cursor: pointer;
  background: rgba(8, 12, 24, .62); backdrop-filter: blur(3px); color: var(--text); font-family: var(--display); }
.start b { font-size: clamp(18px, 2.4cqi, 28px); }
.start small { color: var(--muted); font-family: var(--font); }
.start-ring { width: clamp(64px, 9cqi, 96px); height: clamp(64px, 9cqi, 96px); border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px rgba(45, 212, 191, .15), 0 0 60px rgba(45, 212, 191, .35); margin-bottom: 10px; transition: transform .2s; }
.start:hover .start-ring { transform: scale(1.06); }
.start-ring .ic { width: 40%; height: 40%; margin-left: 6%; }
.caption { padding: 14px 22px 4px; min-height: 64px; font-size: 18px; line-height: 1.5; color: var(--faint); text-align: center; text-wrap: balance; }
.caption .w { transition: color .2s; }
.caption .w.lit { color: var(--text); }
.controls { display: flex; align-items: center; gap: 6px; padding: 8px 14px 12px; flex-wrap: wrap; }
.tl { flex: 1; min-width: 120px; height: 22px; position: relative; cursor: pointer; display: flex; align-items: center; }
.tl::before { content: ''; position: absolute; left: 0; right: 0; height: 5px; border-radius: 9px; background: var(--panel3); }
.tl .fill { position: absolute; left: 0; height: 5px; border-radius: 9px; background: var(--accent); width: 0; }
.tl .ticks span { position: absolute; top: 50%; width: 2px; height: 11px; margin-top: -5.5px; background: rgba(231, 236, 246, .35); border-radius: 2px; }
.ptime { font-family: var(--mono); font-size: 12.5px; color: var(--muted); min-width: 92px; text-align: center; }
.transcript { max-height: 320px; overflow: auto; border-top: 1px solid var(--line); padding: 14px 22px; position: relative; }
.tr-slide h4 { font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.transcript p { color: var(--muted); margin: 0 0 6px; cursor: pointer; padding: 4px 8px; border-radius: 7px; }
.transcript p:hover { background: var(--panel2); }
.transcript p.now { color: var(--text); background: rgba(45, 212, 191, .1); }

/* ---------- visuals on the stage ---------- */
.visual { width: 100%; max-height: 100%; font-size: clamp(12px, 1.8cqi, 26px); display: flex; flex-direction: column; gap: 1.1em; }
.visual.dense { font-size: clamp(11px, 1.55cqi, 23px); }
.v[data-at] { opacity: 0; transform: translateY(.5em); transition: opacity .5s, transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s, background .3s; }
.v[data-at].on { opacity: 1; transform: none; }
.v.dimmed { opacity: .32 !important; }
.v.hl { border-color: var(--amber) !important; box-shadow: 0 0 0 .14em rgba(251, 191, 36, .25), 0 0 2em rgba(251, 191, 36, .2); }
.v-heading { font-family: var(--display); font-size: 1.55em; font-weight: 600; text-align: center; color: var(--text); }
.v-foot { text-align: center; color: var(--muted); font-size: .8em; }
.t-good { --tone: var(--good); }
.t-bad { --tone: var(--bad); }
.t-warn, .t-amber { --tone: var(--amber); }
.t-accent { --tone: var(--accent); }
.t-violet { --tone: var(--violet); }
.t-muted { --tone: var(--faint); }

.k-hero { text-align: center; display: grid; justify-items: center; gap: .5em; }
.hero-emoji { font-size: 3.6em; line-height: 1; filter: drop-shadow(0 .2em .6em rgba(45, 212, 191, .25)); }
.kicker { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .78em; }
.hero-title { font-size: 2.5em; margin: 0; max-width: 20ch; text-wrap: balance; }
.hero-sub { color: var(--muted); font-size: 1.08em; max-width: 46ch; margin: 0; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; }
.chip { border: 1px solid var(--line2); background: var(--panel2); padding: .3em .8em; border-radius: 99px; font-size: .85em; }
.chip.t-good, .chip.t-bad, .chip.t-accent, .chip.t-amber, .chip.t-violet { border-color: color-mix(in srgb, var(--tone) 50%, transparent); color: var(--tone); }

.k-bullets { display: grid; gap: .7em; max-width: 46em; margin: 0 auto; width: 100%; }
.bullet { display: flex; gap: .8em; align-items: flex-start; background: rgba(18, 26, 47, .7); border: 1px solid var(--line); border-radius: .7em; padding: .7em 1em; }
.b-icon { font-size: 1.35em; line-height: 1.2; width: 1.4em; text-align: center; flex: none; }
.b-body b { display: block; font-weight: 600; }
.b-body small { display: block; color: var(--muted); font-size: .84em; margin-top: .15em; }
.k-bullets.big .bullet { padding: 1em 1.2em; }
.bullet.t-good, .bullet.t-bad, .bullet.t-accent, .bullet.t-amber, .bullet.t-violet { border-left: .25em solid var(--tone); }

.k-flow { display: grid; gap: 1.2em; justify-items: center; }
.flow-row { display: flex; align-items: stretch; justify-content: center; gap: .2em; flex-wrap: nowrap; width: 100%; }
.node { flex: 1 1 0; max-width: 11em; min-width: 0; background: var(--panel2); border: 1px solid var(--line2); border-radius: .8em; padding: .8em .6em; text-align: center; display: grid; gap: .25em; align-content: center; }
.node b { font-size: .95em; line-height: 1.25; }
.node small { color: var(--muted); font-size: .74em; line-height: 1.3; }
.n-emoji { font-size: 1.7em; line-height: 1.1; }
.node.t-accent, .node.t-amber, .node.t-good, .node.t-bad, .node.t-violet { border-color: color-mix(in srgb, var(--tone) 55%, transparent); background: color-mix(in srgb, var(--tone) 10%, var(--panel2)); }
.arrow { flex: 0 0 1.8em; display: grid; place-items: center; }
.arrow i { width: 100%; height: .14em; background: var(--line2); position: relative; border-radius: 2px; }
.arrow i::after { content: ''; position: absolute; right: -.1em; top: 50%; width: .5em; height: .5em; border-top: .14em solid var(--line2); border-right: .14em solid var(--line2); transform: translateY(-50%) rotate(45deg); }
.k-flow.vertical .flow-row { flex-direction: column; align-items: center; max-width: 22em; }
.k-flow.vertical .node { max-width: none; width: 100%; }
.k-flow.vertical .arrow { flex-basis: 1.3em; width: 1.3em; }
.k-flow.vertical .arrow i { transform: rotate(90deg); }
.loop { color: var(--amber); border: 1px dashed rgba(251, 191, 36, .5); border-radius: 99px; padding: .35em 1.1em; font-size: .88em; }

.k-split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2em; align-items: stretch; width: 100%; }
.side { background: var(--panel2); border: 1px solid var(--line2); border-radius: .9em; padding: 1em 1.2em; }
.side.t-good, .side.t-bad, .side.t-accent, .side.t-amber, .side.t-violet { border-top: .25em solid var(--tone); }
.side h3 { font-size: 1.15em; margin-bottom: .6em; }
.side ul { margin: 0; padding-left: 1.1em; display: grid; gap: .45em; }
.side li { color: #cfd7e6; }
.vs { align-self: center; color: var(--faint); font-weight: 700; font-family: var(--display); font-size: 1.1em; }

.k-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: .9em; width: 100%; }
.card { position: relative; background: var(--panel2); border: 1px solid var(--line2); border-radius: .9em; padding: 1em 1.1em; display: grid; gap: .35em; align-content: start; }
.card b { font-size: 1.02em; }
.card p { margin: 0; color: #cfd7e6; font-size: .9em; }
.card small { color: var(--muted); font-size: .78em; }
.card.mono p { font-family: var(--mono); font-size: .8em; }
.card .tag { justify-self: start; font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tone, var(--accent)); background: color-mix(in srgb, var(--tone, var(--accent)) 14%, transparent); padding: .15em .6em; border-radius: 99px; }
.card.t-good, .card.t-bad, .card.t-amber, .card.t-accent, .card.t-violet { border-color: color-mix(in srgb, var(--tone) 45%, transparent); }
.stamp { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; font-weight: 800; font-size: .95em; }
.card .stamp { position: absolute; top: -.55em; right: -.55em; width: 2em; height: 2em; font-size: 1.05em; transform: scale(0) rotate(-30deg); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 .3em 1em rgba(0, 0, 0, .4); }
.card:not([data-stamp-at]) .stamp, .card.stamped .stamp { transform: scale(1) rotate(0); }
.s-pass { background: var(--good); color: #052e16; }
.s-fail { background: var(--bad); color: #450a0a; }
.s-warn { background: var(--amber); color: #451a03; }

.k-table { width: 100%; overflow: hidden; border-radius: .8em; border: 1px solid var(--line2); }
.k-table table, .k-score table { width: 100%; border-collapse: collapse; font-size: .88em; }
.k-table th, .k-score th { text-align: left; font-weight: 600; color: var(--muted); background: var(--panel3); padding: .55em .8em; font-size: .9em; }
.k-table td { padding: .5em .8em; border-top: 1px solid var(--line); background: rgba(18, 26, 47, .75); vertical-align: middle; }
.k-table tfoot td { background: var(--panel3); font-weight: 700; }
.cellmark { display: inline-flex; gap: .5em; align-items: center; }
.cellmark .stamp { width: 1.4em; height: 1.4em; font-size: .85em; }
tr.m-fail td { background: rgba(248, 113, 113, .07); }

.k-bars { display: grid; gap: .7em; width: 100%; max-width: 44em; margin: 0 auto; }
.bar { display: grid; grid-template-columns: 9em 1fr 4.5em; gap: .8em; align-items: center; }
.b-label { text-align: right; color: #cfd7e6; font-size: .92em; }
.b-track { height: 1.3em; background: var(--panel3); border-radius: .4em; overflow: hidden; }
.b-track i { display: block; height: 100%; width: 0; background: var(--tone, var(--accent)); border-radius: .4em; transition: width 1s cubic-bezier(.2, .7, .2, 1) .15s; }
.bar.on .b-track i { width: var(--w); }
.b-val { font-family: var(--mono); font-weight: 600; font-size: .9em; }
.k-bars .note { text-align: center; color: var(--muted); font-size: .85em; margin: .3em 0 0; }

.k-stat { display: flex; gap: 1.2em; justify-content: center; flex-wrap: wrap; }
.statbox { background: var(--panel2); border: 1px solid var(--line2); border-radius: 1em; padding: 1.1em 1.5em; text-align: center; min-width: 11em; display: grid; gap: .2em; }
.statbox .num { font-family: var(--display); font-size: 3em; font-weight: 700; color: var(--tone, var(--accent)); line-height: 1.05; }
.statbox b { font-weight: 600; }
.statbox small { color: var(--muted); font-size: .82em; max-width: 18em; justify-self: center; }

.k-chat { display: grid; gap: .7em; max-width: 44em; width: 100%; margin: 0 auto; }
.msg { display: grid; gap: .2em; max-width: 85%; }
.msg .who { font-size: .72em; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.msg .bubble { background: var(--panel2); border: 1px solid var(--line2); padding: .65em .95em; border-radius: .9em; font-size: .92em; display: flex; gap: .6em; align-items: flex-start; justify-content: space-between; }
.msg .bubble .stamp { flex: none; }
.w-user { justify-self: end; }
.w-user .who { text-align: right; }
.w-user .bubble { background: rgba(45, 212, 191, .12); border-color: rgba(45, 212, 191, .3); }
.w-judge .bubble { background: rgba(167, 139, 250, .12); border-color: rgba(167, 139, 250, .35); }
.w-note { justify-self: center; max-width: 100%; }
.w-note .bubble { background: transparent; border-style: dashed; color: var(--muted); font-size: .84em; }

.k-code { width: 100%; max-width: 48em; margin: 0 auto; border-radius: .8em; overflow: hidden; border: 1px solid var(--line2); background: #0a1020; }
.k-code .file { font-family: var(--mono); font-size: .72em; color: var(--muted); background: var(--panel3); padding: .45em 1em; }
.k-code pre { margin: 0; padding: .9em 1em; font-size: .8em; line-height: 1.6; overflow: hidden; }
.k-code .line { white-space: pre; border-radius: .3em; padding: 0 .4em; border: 1px solid transparent; }
.k-code code { background: none; padding: 0; font-size: 1em; }
.k-code .c { color: #64748b; }
.k-code .s { color: #fcd34d; }
.k-code .k { color: #5eead4; }

.k-score { width: 100%; max-width: 46em; margin: 0 auto; border: 1px solid var(--line2); border-radius: .8em; overflow: hidden; }
.k-score th { text-align: center; }
.k-score tbody th { text-align: left; background: rgba(23, 33, 57, .9); color: #cfd7e6; }
.k-score td { text-align: center; padding: .55em; border-top: 1px solid var(--line); background: rgba(18, 26, 47, .75); }
.col-emoji { display: block; font-size: 1.4em; }
.dots { display: inline-flex; gap: .3em; }
.dots i { width: .7em; height: .7em; border-radius: 50%; background: var(--panel3); border: 1px solid var(--line2); }
.dots i.f { background: var(--accent); border-color: var(--accent); }

.k-funnel { display: grid; gap: .55em; justify-items: center; width: 100%; }
.layer { width: 100%; display: grid; justify-items: center; gap: .15em; }
.l-bar { width: var(--w); background: linear-gradient(90deg, color-mix(in srgb, var(--tone, var(--accent)) 22%, var(--panel2)), color-mix(in srgb, var(--tone, var(--accent)) 10%, var(--panel2))); border: 1px solid color-mix(in srgb, var(--tone, var(--accent)) 45%, transparent); border-radius: .7em; padding: .6em 1em; text-align: center; }
.layer small { color: var(--muted); font-size: .8em; }

.k-quote { display: grid; gap: .8em; justify-items: center; text-align: center; }
.k-quote blockquote { font-family: var(--display); font-size: 1.7em; margin: 0; max-width: 26ch; line-height: 1.3; text-wrap: balance; }
.k-quote blockquote::before { content: '“'; color: var(--accent); }
.k-quote blockquote::after { content: '”'; color: var(--accent); }
.k-quote cite { color: var(--muted); font-style: normal; }

.k-stack { display: grid; gap: .5em; max-width: 34em; width: 100%; margin: 0 auto; }
.stack-title { text-align: center; color: var(--muted); font-size: .85em; text-transform: uppercase; letter-spacing: .08em; }
.tier { display: flex; align-items: center; gap: .8em; background: var(--panel2); border: 1px solid var(--line2); border-radius: .7em; padding: .65em 1em; }
.tier .n-emoji { font-size: 1.4em; }
.tier small { color: var(--muted); margin-left: auto; font-size: .8em; text-align: right; }
.tier.t-accent, .tier.t-amber, .tier.t-violet, .tier.t-good, .tier.t-bad { border-left: .25em solid var(--tone); }

.k-grid { display: grid; gap: 1em; justify-items: center; }
.tiles { display: grid; grid-template-columns: repeat(50, 1fr); gap: .14em; width: 100%; max-width: 40em; }
.tiles i { aspect-ratio: 1; background: var(--panel3); border-radius: .12em; }
.tiles i.lit { background: var(--amber); box-shadow: 0 0 .5em rgba(251, 191, 36, .6); }
.grid-notes p { text-align: center; color: #cfd7e6; margin: .2em 0; }

/* ---------- quiz ---------- */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz-intro, .quiz-done { text-align: center; padding: 34px 26px; }
.qi-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 14px; background: rgba(45, 212, 191, .12); color: var(--accent); }
.qi-icon .ic { width: 30px; height: 30px; }
.qbar { height: 6px; background: var(--panel3); border-radius: 9px; overflow: hidden; margin-bottom: 16px; }
.qbar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.qhead { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.qcard h3 { font-size: 20px; line-height: 1.4; font-family: var(--font); font-weight: 600; margin-bottom: 16px; }
.opts { display: grid; gap: 9px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; transition: .15s; }
.opt:hover:not(:disabled) { border-color: rgba(45, 212, 191, .45); }
.opt .dot, .opt .box { width: 18px; height: 18px; border: 2px solid var(--line2); border-radius: 50%; flex: none; transition: .15s; }
.opt .box { border-radius: 5px; }
.opt.sel { border-color: var(--accent); background: rgba(45, 212, 191, .08); }
.opt.sel .dot, .opt.sel .box { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--bg2); }
.opt.right { border-color: var(--good); background: rgba(74, 222, 128, .1); }
.opt.wrong { border-color: var(--bad); background: rgba(248, 113, 113, .1); }
.opt.missed { border-color: var(--good); border-style: dashed; }
.opt:disabled { cursor: default; }
.hint { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; margin-bottom: 12px; }
.chip-btn { border: 1px solid var(--line2); background: var(--panel2); padding: 8px 13px; border-radius: 99px; cursor: pointer; font-size: 14.5px; text-align: left; }
.chip-btn.sel { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(251, 191, 36, .2); }
.chip-btn.right { border-color: var(--good); }
.chip-btn.wrong { border-color: var(--bad); }
.chip-btn small { color: var(--good); }
.buckets { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 10px; }
.bucket { border: 1px dashed var(--line2); border-radius: 12px; padding: 12px; min-height: 120px; cursor: pointer; background: var(--bg2); transition: .15s; }
.bucket:hover { border-color: var(--accent); }
.bucket > b { display: block; font-size: 14px; color: var(--accent-2); margin-bottom: 8px; }
.bucket-items { display: flex; flex-wrap: wrap; gap: 6px; }
ol.order { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: o; }
ol.order li { counter-increment: o; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--bg2); }
ol.order li::before { content: counter(o); font-family: var(--mono); color: var(--faint); width: 18px; }
ol.order li.right { border-color: var(--good); }
ol.order li.wrong { border-color: var(--bad); }
.o-text { flex: 1; }
.o-btns { display: flex; gap: 4px; }
.correct-order { margin-top: 12px; color: var(--muted); font-size: 14px; }
.correct-order ol { margin: 4px 0 0; }
.num-row { display: flex; align-items: center; gap: 10px; }
.num-in, textarea, input[type=password], input[type=text], input[type=search], select {
  background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; outline: none;
}
.num-in { width: 160px; font-size: 20px; font-family: var(--mono); }
.num-in:focus, textarea:focus, input:focus, select:focus { border-color: var(--accent); }
.num-in.right { border-color: var(--good); }
.num-in.wrong { border-color: var(--bad); }
.unit { color: var(--muted); font-size: 18px; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
.lab { overflow-x: auto; }
.lab table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lab th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; font-size: 13px; border-bottom: 1px solid var(--line2); }
.lab td { padding: 8px; border-bottom: 1px solid var(--line); }
.lab tr.right td { background: rgba(74, 222, 128, .07); }
.lab tr.wrong td { background: rgba(248, 113, 113, .09); }
.lbl { font-family: var(--mono); font-size: 13px; background: var(--panel3); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.lbl.ai { background: rgba(167, 139, 250, .16); }
.marks { white-space: nowrap; }
.mark { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; font-weight: 700; margin-right: 4px; }
.mark.sel:first-child { background: var(--good); color: #052e16; border-color: var(--good); }
.mark.sel:last-child { background: var(--bad); color: #450a0a; border-color: var(--bad); }
.lab-score { margin-top: 12px; color: var(--muted); }
.lab-score b { color: var(--text); }
.feedback { margin-top: 16px; border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line2); background: var(--bg2); }
.feedback.good { border-color: rgba(74, 222, 128, .5); }
.feedback.warn { border-color: rgba(251, 191, 36, .5); }
.feedback.bad { border-color: rgba(248, 113, 113, .5); }
.fb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fb-head b { flex: 1; }
.feedback.good .fb-head { color: var(--good); }
.feedback.warn .fb-head { color: var(--warn); }
.feedback.bad .fb-head { color: var(--bad); }
.fb-body { color: #d6dcea; }
.fb-body p:last-child { margin-bottom: 0; }
.qactions { display: flex; justify-content: flex-end; margin-top: 18px; }
.missed { text-align: left; background: var(--bg2); border-radius: 12px; padding: 14px 18px; margin: 10px 0 18px; }
.missed ul { margin: 6px 0 0; padding-left: 20px; color: #cfd7e6; }
.quiz-done .row { justify-content: center; }

/* ---------- Ada ---------- */
.ada { display: inline-block; flex: none; }
.ada svg { width: 100%; height: 100%; overflow: visible; display: block; }
.ada.sm { width: 30px; height: 30px; }
.ada.md { width: 44px; height: 44px; }
.ada.lg { width: 84px; height: 84px; }
.ada.xl { width: 150px; height: 150px; }
.ada .pulse { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transform-origin: 50% 50%; }
.ada.talking .pulse { animation: ping 1.4s ease-out infinite; }
.ada.talking .r2 { animation-delay: .7s; }
.ada.talking .mouth { animation: talk .28s ease-in-out infinite alternate; transform-origin: 50% 60%; }
.ada.thinking svg { animation: think 1.6s ease-in-out infinite; }
.ada .face ellipse { animation: blink 5s infinite; transform-origin: center 47px; }
@keyframes ping { from { transform: scale(.72); opacity: .8; } to { transform: scale(1.12); opacity: 0; } }
@keyframes talk { from { transform: scaleY(.6); } to { transform: scaleY(1.5); } }
@keyframes think { 50% { transform: translateY(-3px) rotate(-4deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

/* ---------- tutor ---------- */
.tutor { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; min-height: 560px; max-height: calc(100vh - 160px); overflow: hidden; }
.tutor.compact { border: 0; border-radius: 0; background: transparent; min-height: 0; max-height: none; height: 100%; }
.thead { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tutor.compact .thead { padding-right: 52px; }
.t-name b { display: block; font-family: var(--display); font-size: 17px; }
.t-status { color: var(--muted); }
.modes { display: flex; gap: 6px; padding: 10px 16px 0; flex-wrap: wrap; }
.mode { border: 1px solid var(--line2); background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 99px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.mode:hover { color: var(--text); }
.mode.on { background: rgba(45, 212, 191, .14); color: var(--accent-2); border-color: rgba(45, 212, 191, .45); }
.check-meter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 16px 0; padding: 8px 12px; border-radius: 10px; background: var(--bg2); color: var(--muted); font-size: 13px; }
.check-meter.done { color: var(--good); }
.pips { display: flex; gap: 5px; }
.pips i { width: 22px; height: 8px; border-radius: 9px; background: var(--panel3); }
.pips i.half { background: linear-gradient(90deg, var(--good) 50%, var(--panel3) 50%); }
.pips i.f { background: var(--good); }
.tlog { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.tmsg { display: flex; gap: 10px; align-items: flex-start; max-width: 88%; }
.tmsg.me { align-self: flex-end; }
.tmsg .tb { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; position: relative; }
.tmsg.me .tb { background: rgba(45, 212, 191, .12); border-color: rgba(45, 212, 191, .28); }
.tmsg.note { align-self: center; max-width: 100%; }
.tmsg.note .tb { background: transparent; border-style: dashed; color: var(--muted); font-size: 14px; }
.tmsg .tb p:last-child { margin-bottom: 0; }
.tmsg .tb ul, .tmsg .tb ol { margin: 0 0 .8em; padding-left: 20px; }
.tmsg .tb pre { background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.verdict { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; margin-bottom: 6px; }
.v-correct { background: rgba(74, 222, 128, .15); color: var(--good); }
.v-partial { background: rgba(251, 191, 36, .15); color: var(--warn); }
.v-incorrect { background: rgba(248, 113, 113, .15); color: var(--bad); }
.replay { position: absolute; right: -36px; bottom: 2px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.replay:hover { color: var(--accent); background: var(--panel2); }
.replay .ic { width: 15px; height: 15px; }
.dots3 { display: inline-flex; gap: 5px; padding: 4px 0; }
.dots3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.dots3 i:nth-child(2) { animation-delay: .15s; }
.dots3 i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 30% { transform: translateY(-5px); opacity: 1; } 0%, 60%, 100% { opacity: .4; transform: none; } }
.tinput { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.tinput textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; }
.pbtn.mic, .pbtn.send { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); }
.pbtn.send { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pbtn.send:hover { background: var(--accent-2); color: var(--accent-ink); }
.pbtn.mic.rec { background: var(--bad); color: #fff; border-color: transparent; animation: recpulse 1.2s infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 7px rgba(248, 113, 113, .2); } }
.locked { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 50px 24px; margin: auto; max-width: 440px; }
.locked .row { justify-content: center; margin-top: 8px; }
.tutor-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.tutor-side { position: sticky; top: 16px; }
.tutor-side li { font-size: 14.5px; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--panel); border-left: 1px solid var(--line2); z-index: 50; transform: translateX(102%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); box-shadow: -20px 0 50px rgba(0, 0, 0, .4); }
.drawer.open { transform: none; }
.shade { position: fixed; inset: 0; background: rgba(4, 7, 15, .5); z-index: 49; opacity: 0; pointer-events: none; transition: opacity .3s; }
.shade.open { opacity: 1; pointer-events: auto; }

/* ---------- live ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(4, 7, 15, .78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.live-box { --lvl: 0; position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.live-top small { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: 12px; display: block; }
.live-top b { font-family: var(--display); font-size: 19px; }
.live-stage { display: grid; justify-items: center; gap: 10px; padding: 10px 0 4px; }
.live-box[data-mode=listen] .ada { filter: drop-shadow(0 0 calc(var(--lvl) * 30px) rgba(45, 212, 191, .9)); transform: scale(calc(1 + var(--lvl) * .06)); transition: transform .1s; }
.live-status { font-weight: 600; color: var(--muted); min-height: 1.5em; }
.live-box[data-mode=listen] .live-status { color: var(--accent-2); }
.live-time { width: 60%; height: 4px; background: var(--panel3); border-radius: 9px; overflow: hidden; }
.live-time i { display: block; height: 100%; width: 100%; background: var(--accent); transition: width 1s linear; }
.live-log { overflow-y: auto; max-height: 30vh; display: flex; flex-direction: column; gap: 6px; }
.lb { font-size: 14.5px; padding: 7px 11px; border-radius: 11px; max-width: 88%; }
.lb.ada { background: var(--panel2); align-self: flex-start; }
.lb.me { background: rgba(45, 212, 191, .12); align-self: flex-end; }

/* ---------- settings & glossary ---------- */
.toggle { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { width: 44px; height: 26px; border-radius: 99px; background: var(--panel3); position: relative; flex: none; transition: .2s; border: 1px solid var(--line2); }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .2s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { left: 21px; background: var(--accent-ink); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle small { display: block; color: var(--muted); }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.search { width: 100%; max-width: 420px; margin-bottom: 18px; }
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gloss-grid .panel + .panel { margin-top: 0; }
.gterm b { color: var(--accent-2); font-family: var(--display); font-size: 17px; }
.gterm p { color: #cfd7e6; font-size: 14.5px; margin: 6px 0; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .two, .tutor-wrap { grid-template-columns: 1fr; }
  .tutor-side { position: static; }
  .lhead { grid-template-columns: 1fr; gap: 10px; }
  .backlink { justify-self: start; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px 50px; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar nav a span { display: none; }
  .brand > span:last-child { display: none; }
  .how { grid-template-columns: 1fr; }
  .mhead { flex-wrap: wrap; }
  .mprog { display: none; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 9px 6px; }
  .stage { aspect-ratio: auto; min-height: 100vw; }
  .canvas { position: relative; inset: auto; min-height: 100vw; padding: 50px 14px 20px; }
  .start { position: absolute; }
  .stage-top { padding: 14px 16px 0; }
  .visual { font-size: 3.55vw; }
  .visual.dense { font-size: 3.2vw; }
  .k-split { grid-template-columns: 1fr; }
  .vs { justify-self: center; }
  .k-cards { grid-template-columns: 1fr 1fr; }
  .flow-row { flex-direction: column; align-items: center; }
  .flow-row .node { max-width: none; width: 100%; }
  .flow-row .arrow { flex-basis: 1.2em; width: 1.4em; }
  .flow-row .arrow i { transform: rotate(90deg); }
  .bar { grid-template-columns: 6.5em 1fr 3.6em; }
  .caption { font-size: 16px; padding: 12px 16px 2px; }
  .controls { padding: 6px 8px 10px; gap: 2px; }
  .tl { order: -1; flex-basis: 100%; margin: 0 6px 4px; }
  .pbtn.ask span { display: none; }
  .ptime { min-width: 0; margin-right: auto; }
  .buckets { grid-template-columns: 1fr; }
  .tutor { min-height: 70vh; max-height: none; }
  .replay { right: -30px; }
  .tmsg { max-width: 92%; }
  .tmsg.ada-msg .tb { margin-right: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
