:root {
  --fog: #E8ECF1; --paper: #FFFFFF; --ink: #121A2B; --quiet: #586377;
  --line: #C9D1DC; --blue: #2456E6; --red: #D92C3A; --marker: #FFDA3D;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fog); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.45; }
#app { max-width: 520px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px calc(40px + env(safe-area-inset-bottom)); min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 30px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.quiet { color: var(--quiet); }
.small { font-size: 15px; }
.stack > * + * { margin-top: 14px; }
.gap { margin-top: 26px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); font-weight: 650; }
.btn.go { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.wide { width: 100%; }
.btn.plain { border-color: transparent; background: transparent; padding: 0 6px; min-height: 44px; color: var(--blue); }
.btn.danger { color: var(--red); }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.tabs button { min-height: 48px; border: 0; background: transparent; font-weight: 650; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.drills { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.drills li { border-bottom: 1px solid var(--line); }
.drills button { width: 100%; text-align: left; border: 0; background: transparent; padding: 16px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.drills .name { font-family: var(--display); font-size: 24px; font-weight: 700; }
.drills .secs { font-variant-numeric: tabular-nums; color: var(--quiet); }
.drills .blurb { grid-column: 1 / -1; color: var(--quiet); font-size: 15px; }

.prompt { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.15; }
.prompt.read { font-size: 23px; font-weight: 500; line-height: 1.3; }
.think { margin: 0; padding-left: 20px; color: var(--quiet); font-size: 15.5px; }
.think li + li { margin-top: 4px; }

.talk { display: grid; justify-items: center; gap: 10px; padding: 8px 0 4px; }
.talk-btn { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-family: var(--display); font-size: 22px; font-weight: 700; }
.talk-btn svg { position: absolute; inset: -9px; width: 150px; height: 150px; transform: rotate(-90deg); pointer-events: none; }
.talk-btn circle { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.talk-btn.rec { background: var(--red); box-shadow: 0 0 0 calc(var(--level, 0) * 34px) rgba(217, 44, 58, 0.18); }
.talk-btn.wait { background: var(--quiet); }
.talk-btn:disabled { cursor: default; }
.clock { font-variant-numeric: tabular-nums; font-weight: 650; }

.proof { background: var(--paper); border: 2px solid var(--ink); border-radius: 4px 14px 14px 4px; border-left-width: 8px; padding: 16px; font-size: 19px; line-height: 1.6; }
.proof s { color: var(--red); text-decoration-thickness: 2px; }
.proof mark { background: var(--marker); color: var(--ink); padding: 1px 3px; border-radius: 3px; }
.margin { list-style: none; margin: 0; padding: 0; }
.margin li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.margin b { background: var(--marker); padding: 1px 4px; border-radius: 3px; }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.figures div { padding: 12px 6px 10px 0; }
.figures div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.figures strong { display: block; font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.figures span { font-size: 13.5px; color: var(--quiet); }
.note b { font-family: var(--display); }
.error { border: 2px solid var(--red); border-radius: 12px; padding: 12px 14px; background: #fff; }

.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); }
.field { width: 100%; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); padding: 12px 14px; }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.45; }
.take { border-left: 4px solid var(--blue); padding-left: 12px; }
.goal { border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); padding: 14px; }
.goal .n { font-family: var(--display); font-weight: 800; font-size: 22px; }
.doc h3 { margin-top: 22px; }
.doc p { margin-top: 8px; white-space: pre-wrap; }
.lock { display: grid; gap: 16px; padding-top: 18vh; }
.lock input { font-size: 28px; letter-spacing: 0.3em; text-align: center; }
@media (prefers-reduced-motion: no-preference) { .talk-btn.rec { transition: box-shadow 90ms linear; } }
