/* Telos Interview — a black slate, white chalk.
   Colour is reserved: white chalk is the action, grey chalk is everything else,
   red appears only while the microphone is live or something has failed.
   The single gold mark belongs to the Telos wordmark, so the twin is
   recognisably family without borrowing the dashboard's look. */

:root {
  color-scheme: dark;
  --slate: #0e0e0e;      /* page */
  --board: #151515;      /* board surface */
  --board-2: #1b1b1b;    /* panels, inputs */
  --board-3: #242424;    /* raised controls */
  --edge: #2b2b2b;
  --edge-2: #3b3b3b;

  --chalk: #f3f1ec;      /* white chalk: text and primary action */
  --chalk-2: #d6d3cc;
  --dust: #9d9a94;       /* secondary text */
  --faint: #6d6a66;      /* tertiary text, captions */
  --ink: #0e0e0e;        /* text on white chalk */

  --signal: #e5484d;     /* recording + errors only */
  --gold: #c9a227;       /* Telos wordmark only */

  --hand: "Caveat", "Segoe Print", cursive;
  --voice: "Newsreader", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.4rem, 7vw, 3.75rem);

  --r-s: 8px;
  --r-m: 14px;
  --r-pill: 999px;
  --gutter: 16px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .04) inset;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0; background: var(--slate); color: var(--chalk);
  font-family: var(--ui); font-size: var(--step-0); line-height: 1.55;
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--chalk); text-decoration-color: var(--edge-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--chalk); }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--chalk); color: var(--ink); padding: 8px 12px; z-index: 50; border-radius: var(--r-s); }
.skip:focus { left: 8px; }
main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header: Telos wordmark + product switcher ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 14px var(--gutter); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wordmark { font-family: var(--voice); font-size: 1.45rem; font-weight: 500; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.wordmark i { font-style: italic; color: var(--gold); }
.switcher { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--board-2); border: 1px solid var(--edge); }
.switcher a { padding: 5px 12px; border-radius: var(--r-pill); font-size: .8125rem; font-weight: 500; color: var(--dust); text-decoration: none; white-space: nowrap; }
.switcher a[aria-current="page"] { background: var(--chalk); color: var(--ink); }
.switcher a:not([aria-current]):hover { color: var(--chalk); }
.site-nav { display: flex; gap: 18px; align-items: center; font-size: var(--step--1); }
.site-nav a { color: var(--dust); text-decoration: none; }
.site-nav a:hover { color: var(--chalk); }
.pass-pill { font-size: .78rem; color: var(--chalk); border: 1px solid var(--edge-2); padding: 3px 10px; border-radius: var(--r-pill); }
@media (max-width: 560px) { .site-nav .nav-hide-sm { display: none; } .switcher a { padding: 5px 10px; } }
.site-footer { max-width: 1080px; margin: 72px auto 0; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--edge); color: var(--faint); font-size: var(--step--1); }
.site-footer a { color: var(--dust); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--edge-2);
  font: 600 var(--step-0)/1 var(--ui); color: var(--chalk); background: transparent; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s, color .15s;
}
.btn:hover { border-color: var(--dust); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-quiet { background: transparent; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: var(--step--1); }
.btn-wide { width: 100%; }
.link-btn { background: none; border: 0; color: var(--dust); text-decoration: underline; font: inherit; cursor: pointer; padding: 4px; }
.link-btn:hover { color: var(--chalk); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); color: var(--dust); background: transparent; border: 0; cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--chalk); background: var(--board-3); }

/* ---------- the board ---------- */
.board {
  position: relative; isolation: isolate;
  background:
    radial-gradient(60% 40% at 18% 22%, rgba(255,255,255,.035), transparent 70%),
    radial-gradient(50% 35% at 82% 70%, rgba(255,255,255,.025), transparent 70%),
    radial-gradient(130% 100% at 50% 0%, #191919 0%, var(--board) 55%, #101010 100%);
  border-radius: var(--r-m);
  border: 1px solid var(--edge);
  box-shadow: inset 0 0 0 6px #0b0b0b, inset 0 2px 30px rgba(0,0,0,.5);
  padding: 24px 22px;
}
.board-chalk { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background-image: var(--noise); opacity: .06; mix-blend-mode: screen; }
.board-tag { font-size: .8125rem; color: var(--faint); margin: 0 0 6px; }

/* ---------- notices ---------- */
.notice { margin: 8px 0 16px; padding: 12px 16px; border-radius: var(--r-s); background: var(--board-2); border: 1px solid var(--edge); border-left: 3px solid var(--chalk); }
.notice-good { border-left-color: var(--chalk-2); }
.fine { font-size: var(--step--1); color: var(--faint); }
.center { text-align: center; }
.lede { font-size: var(--step-1); color: var(--dust); max-width: 60ch; }
.section-sub { color: var(--dust); max-width: 60ch; }

/* ---------- landing: hero ---------- */
.hero { display: grid; gap: 32px; padding: 28px 0 56px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.05fr; gap: 56px; padding-top: 48px; } }
.hero h1 { font-family: var(--voice); font-weight: 500; font-size: var(--step-4); letter-spacing: -.02em; line-height: 1.04; max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 10px; }
.hero-board { min-height: 340px; display: flex; flex-direction: column; padding: 28px 24px 24px; }
.chalk-write {
  font-family: var(--hand); font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.15; font-weight: 500; color: var(--chalk);
  margin: 4px 0 24px; min-height: 3.5em;
  text-shadow: 0 0 1px rgba(243,241,236,.55), 0 0 14px rgba(243,241,236,.06);
}
.chalk-write.writing::after { content: ""; display: inline-block; width: .5em; height: 3px; background: var(--chalk); margin-left: 2px; opacity: .7; }
.tutor-line { display: flex; gap: 12px; align-items: flex-start; opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .6s ease; }
.tutor-line.show { opacity: 1; transform: none; }
.tutor-line p { font-family: var(--voice); font-style: italic; font-size: var(--step-1); color: var(--chalk-2); margin: 0; max-width: 42ch; }
.tutor-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chalk); margin-top: 11px; flex: none; box-shadow: 0 0 0 4px rgba(243,241,236,.08); }
.hero-mic { margin-top: auto; align-self: center; position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--chalk); color: var(--ink); opacity: 0; transform: scale(.8); transition: opacity .5s, transform .5s; }
.hero-mic.show { opacity: 1; transform: none; }
.mic-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--chalk); opacity: 0; pointer-events: none; }
.hero-mic.show .mic-ring { animation: ring 2.4s ease-out 1 .4s; }
@keyframes ring { 0% { transform: scale(.85); opacity: .6; } 100% { transform: scale(1.45); opacity: 0; } }

/* ---------- landing: sections ---------- */
.subjects, .how, .report-preview, .pricing-teaser { padding: 40px 0; }
.subjects h2, .how h2, .report-preview h2, .pricing-teaser h2, .paywall h1, .narrow h1 { font-family: var(--voice); font-weight: 500; font-size: var(--step-3); letter-spacing: -.015em; }
.subject-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--edge); }
.subject-row { border-bottom: 1px solid var(--edge); }
.subject-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 22px 4px; text-decoration: none; grid-template-areas: "name go" "blurb go" "teaser teaser" "meta meta"; }
@media (min-width: 760px) { .subject-link { grid-template-columns: 220px 1fr auto; grid-template-areas: "name teaser go" "blurb teaser go" "meta teaser go"; align-items: center; column-gap: 32px; } }
.subject-name { grid-area: name; font-family: var(--hand); font-size: 2.1rem; font-weight: 700; line-height: 1; }
.subject-blurb { grid-area: blurb; color: var(--dust); font-size: var(--step--1); }
.subject-teaser { grid-area: teaser; font-family: var(--voice); font-style: italic; font-size: var(--step-1); color: var(--chalk-2); margin-top: 8px; }
@media (min-width: 760px) { .subject-teaser { margin: 0; } }
.subject-meta { grid-area: meta; color: var(--faint); font-size: .8rem; }
.subject-go { grid-area: go; align-self: center; padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--edge-2); font-weight: 600; font-size: var(--step--1); transition: background-color .15s, color .15s, border-color .15s; }
.subject-link:hover .subject-go, .subject-link:focus-visible .subject-go { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.subject-link:hover .subject-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 28px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; position: relative; padding-top: 44px; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; font-family: var(--hand); font-size: 2.4rem; font-weight: 700; color: var(--chalk); line-height: 1; }
.steps h3 { font-size: var(--step-1); }
.steps p { color: var(--dust); }

/* ---------- verdict + bars (shared) ---------- */
.mini-report { max-width: 560px; }
.verdict-word { font-family: var(--hand); font-weight: 700; font-size: 3.2rem; line-height: 1; margin: 0 0 8px; color: var(--chalk); display: inline-block; position: relative; }
/* Verdicts are told apart by their underline, never by colour alone */
.verdict-word::after { content: ""; position: absolute; left: 2%; right: 4%; bottom: -4px; height: 4px; border-radius: 3px; background: var(--chalk); transform: rotate(-1.2deg); opacity: .9; }
.verdict-promising::after { right: 30%; }
.verdict-borderline::after { right: 55%; opacity: .6; }
.verdict-not-yet::after { right: 75%; opacity: .45; }
.mini-headline { font-family: var(--voice); font-size: var(--step-1); }
.bars { margin: 18px 0 0; display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 12px; }
.bar dt { color: var(--dust); font-size: var(--step--1); }
.bar dd { margin: 0; display: flex; align-items: center; gap: 10px; }
.bar dd span { flex: 1; height: 8px; border-radius: 6px; background: rgba(243,241,236,.08); position: relative; overflow: hidden; }
.bar dd span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 10%); background: var(--chalk); border-radius: 6px; }
.bar dd b { min-width: 2.4em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar dd b small { color: var(--faint); font-weight: 400; }

/* ---------- pricing ---------- */
.plan-summary { display: grid; margin: 20px 0 24px; border-top: 1px solid var(--edge); max-width: 640px; }
.plan-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 16px 0; border-bottom: 1px solid var(--edge); }
.plan-line .plan-name { font-weight: 600; }
.plan-line .plan-price { font-family: var(--hand); font-size: 1.8rem; line-height: 1; }
.plan-line .plan-note { grid-column: 1 / -1; color: var(--dust); font-size: var(--step--1); }
.paywall { max-width: 520px; margin: 0 auto; padding: 32px 0 0; }
.plan-form fieldset { border: 0; padding: 0; margin: 24px 0 18px; display: grid; gap: 12px; }
.plan-option { display: block; cursor: pointer; }
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-body { display: grid; gap: 4px; padding: 18px 18px 18px 52px; border-radius: var(--r-m); border: 1px solid var(--edge); background: var(--board); position: relative; transition: border-color .15s, background-color .15s; }
.plan-body::before { content: ""; position: absolute; left: 18px; top: 22px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); }
.plan-option input:checked + .plan-body { border-color: var(--chalk); background: var(--board-2); }
.plan-option input:checked + .plan-body::before { border-color: var(--chalk); background: radial-gradient(circle, var(--chalk) 0 5px, transparent 6px); }
.plan-option input:focus-visible + .plan-body { outline: 2px solid var(--chalk); outline-offset: 3px; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-body .plan-name { font-weight: 600; font-size: var(--step-1); }
.plan-flag { flex: none; white-space: nowrap; font-size: .75rem; font-weight: 600; color: var(--ink); background: var(--chalk); padding: 3px 10px; border-radius: var(--r-pill); }
.plan-flag-quiet { background: transparent; color: var(--chalk-2); border: 1px solid var(--edge-2); }
.plan-body .plan-price { font-family: var(--hand); font-size: 2.2rem; line-height: 1; }
.plan-body .plan-price small { font-family: var(--ui); font-size: var(--step--1); color: var(--dust); }
.plan-body .plan-note { color: var(--dust); font-size: var(--step--1); }
.reassure { list-style: none; padding: 0; margin: 18px 0 28px; display: grid; gap: 8px; color: var(--dust); font-size: var(--step--1); }
.reassure li { padding-left: 24px; position: relative; }
.reassure li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 5px; border-left: 2px solid var(--chalk); border-bottom: 2px solid var(--chalk); transform: rotate(-45deg); }

/* ---------- narrow pages ---------- */
.narrow { max-width: 560px; margin: 0 auto; padding: 32px 0 0; }
.key-board { text-align: center; margin: 24px 0 18px; }
.access-key { font-family: var(--ui); font-size: 1.9rem; letter-spacing: .06em; font-variant-numeric: tabular-nums; font-weight: 700; margin: 4px 0 14px; word-break: break-all; }
.restore-form { display: grid; gap: 10px; margin: 20px 0; }
.restore-form input, .admin-form input, .admin-form select { min-height: 52px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--edge-2); background: var(--board-2); color: var(--chalk); font: 600 1.05rem/1 var(--ui); }
.restore-form input { letter-spacing: .06em; }
.restore-form input:focus, .admin-form input:focus, .admin-form select:focus { border-color: var(--chalk); outline: none; }
.form-error { color: var(--signal); margin: 0; }
.history { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--edge); }
.history a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 4px; border-bottom: 1px solid var(--edge); text-decoration: none; }
.h-title { font-weight: 600; }
.h-meta { color: var(--faint); font-size: var(--step--1); grid-row: 2; }
.h-verdict { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--hand); font-size: 1.5rem; color: var(--chalk-2); }

/* ---------- report ---------- */
.report { max-width: 760px; margin: 0 auto; padding: 24px 0 0; }
.report-sub { color: var(--dust); margin-bottom: 4px; }
.report-head .verdict-word { font-size: clamp(3.6rem, 14vw, 5.5rem); margin-bottom: 18px; }
.report-headline { font-family: var(--voice); font-size: var(--step-2); line-height: 1.3; max-width: 34ch; }
.report-stats { display: flex; gap: 28px; margin: 0 0 24px; }
.report-stats div { display: grid; }
.report-stats dt { color: var(--faint); font-size: var(--step--1); }
.report-stats dd { margin: 0; font-weight: 600; font-size: var(--step-1); }
.report-board .bars-big .bar { grid-template-columns: 130px 1fr; }
.bars-big .bar dd span { height: 12px; }
.scale-note { margin: 16px 0 0; font-size: var(--step--1); color: var(--faint); }
.moment { margin: 36px 0; }
.moment h2, .two-col h2, .approach h2, .replay h2 { font-size: var(--step-1); }
.moment blockquote { margin: 0 0 8px; font-family: var(--voice); font-style: italic; font-size: var(--step-2); line-height: 1.3; border-left: 3px solid var(--chalk); padding-left: 16px; }
.moment p { color: var(--dust); }
.two-col { display: grid; gap: 28px; margin: 28px 0; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }
.chalk-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.chalk-list li { padding-left: 24px; position: relative; }
.chalk-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 3px; border-radius: 2px; transform: rotate(-8deg); background: var(--chalk); }
.chalk-list.fix li::before { background: transparent; border: 1.5px solid var(--chalk-2); height: 10px; width: 10px; border-radius: 50%; top: .45em; transform: none; }
.approach { margin: 28px 0; padding-top: 24px; border-top: 1px solid var(--edge); }
.approach > p { font-family: var(--voice); font-size: var(--step-1); }
.solution, .replay details { margin-top: 12px; }
.solution summary, .replay summary { cursor: pointer; font-weight: 600; padding: 8px 0; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.solution summary::-webkit-details-marker, .replay summary::-webkit-details-marker { display: none; }
.solution summary::before, .replay summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--edge-2); font-weight: 400; }
.solution[open] summary::before, .replay details[open] summary::before { content: "–"; }
.solution p { color: var(--dust); }
.replay { margin: 28px 0; padding-top: 24px; border-top: 1px solid var(--edge); }
.replay ol { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.replay li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.replay .r-who { font-size: .78rem; color: var(--faint); padding-top: 3px; }
.replay .r-body { color: var(--chalk-2); }
.replay li.r-tutor .r-body { font-family: var(--voice); }
.replay li.r-you .r-body { color: var(--chalk); }
.replay mark { background: rgba(243,241,236,.16); color: var(--chalk); padding: 0 2px; border-radius: 3px; box-shadow: 0 2px 0 var(--chalk); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--edge-2); color: var(--chalk-2); margin-left: 6px; vertical-align: 2px; font-family: var(--ui); }
.practise-next { padding: 14px 16px; background: var(--board-2); border: 1px solid var(--edge); border-radius: var(--r-s); }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.upsell { color: var(--dust); }

/* ========== interview room ========== */
.page-room { height: 100dvh; overflow: hidden; }
.page-room main { max-width: none; padding: 0; height: 100%; }
.room { height: 100%; display: grid; grid-template-rows: auto auto 1fr auto auto; max-width: 820px; margin: 0 auto; position: relative; }
.room-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; padding-top: max(10px, env(safe-area-inset-top)); }
.room-title { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.room-subject { font-size: .78rem; color: var(--dust); }
.room-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.room-meta { display: grid; justify-items: end; gap: 4px; }
.timer { font-variant-numeric: tabular-nums; color: var(--dust); font-size: var(--step--1); }
.replies-meter { width: 64px; height: 3px; border-radius: 3px; background: var(--board-3); overflow: hidden; }
.replies-meter span { display: block; height: 100%; width: var(--left, 100%); background: var(--chalk-2); transition: width .3s; }

.room-board { margin: 0 12px; padding: 16px 18px 12px; }
.problem-head { display: flex; justify-content: space-between; align-items: center; }
.board-toggle { background: none; border: 0; color: var(--dust); font: inherit; font-size: var(--step--1); cursor: pointer; padding: 4px 6px; }
.board-toggle:hover { color: var(--chalk); }
.problem-text { font-family: var(--voice); font-size: var(--step-1); line-height: 1.5; margin: 6px 0 10px; max-height: 34vh; overflow-y: auto; }
.room-board.collapsed .problem-text, .room-board.collapsed .problem-foot { display: none; }
.problem-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .78rem; color: var(--faint); }
.hint-marks { display: inline-flex; align-items: center; gap: 5px; }
.hint-marks i { width: 14px; height: 3px; border-radius: 2px; background: rgba(243,241,236,.14); transform: rotate(-10deg); }
.hint-marks i.used { background: var(--chalk); }
.hint-label { margin-left: 4px; }

.transcript { overflow-y: auto; padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 20px; overscroll-behavior: contain; }
.msg { max-width: 92%; }
.msg .who { font-size: .72rem; color: var(--faint); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.msg-tutor .body { font-family: var(--voice); font-size: var(--step-1); line-height: 1.5; white-space: pre-wrap; padding-left: 14px; border-left: 2px solid var(--edge-2); }
.msg-tutor:last-of-type .body { font-size: 1.28rem; border-left-color: var(--chalk); }
.msg-tutor.thinking .body::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--chalk); animation: blink 1s ease-in-out infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .2; } }
.play-btn { background: none; border: 1px solid var(--edge-2); color: var(--dust); border-radius: var(--r-pill); font: 500 .7rem/1 var(--ui); padding: 4px 8px; cursor: pointer; }
.play-btn:hover { color: var(--chalk); border-color: var(--dust); }
.msg-you { align-self: flex-end; text-align: right; }
.msg-you .who { justify-content: flex-end; }
.msg-you .body { background: var(--board-2); color: var(--chalk); border: 1px solid var(--edge); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; text-align: left; display: inline-block; }
.shared-note { display: block; font-size: .75rem; color: var(--dust); margin-top: 4px; }
.msg-error .body { color: var(--chalk); border-left-color: var(--signal); font-family: var(--ui); font-size: var(--step--1); }
.msg-error .retry { margin-top: 8px; }

.ended-banner { margin: 0 12px 12px; padding: 16px; border-radius: var(--r-m); background: var(--board-2); border: 1px solid var(--edge); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ended-banner p { margin: 0; font-family: var(--voice); font-size: var(--step-1); }
.ended-banner[hidden] { display: none; }

.dock { padding: 8px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--edge); background: var(--slate); }
.dock[hidden] { display: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--edge); background: var(--board); color: var(--dust); font: 500 var(--step--1)/1 var(--ui); cursor: pointer; }
.chip:hover { color: var(--chalk); border-color: var(--edge-2); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--chalk); border-color: var(--chalk); }
.attach { display: flex; align-items: center; gap: 10px; padding: 6px 0 8px; font-size: var(--step--1); color: var(--dust); }
.attach[hidden] { display: none; }
.attach img { width: 64px; height: 44px; object-fit: contain; background: var(--board-2); border-radius: 6px; border: 1px solid var(--edge); }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-height: 52px; max-height: 160px; resize: none; padding: 14px 16px; border-radius: 26px; border: 1px solid var(--edge-2); background: var(--board-2); color: var(--chalk); font: var(--step-0)/1.4 var(--ui); }
.composer textarea:focus { outline: none; border-color: var(--chalk-2); }
.composer textarea::placeholder { color: var(--faint); }
.mic-btn, .send-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; position: relative; }
.mic-btn { background: var(--chalk); color: var(--ink); }
.mic-btn[aria-pressed="true"] { background: var(--signal); color: #fff; }
.mic-btn[aria-pressed="true"] .mic-ring { border-color: var(--signal); animation: ring 1.6s ease-out infinite; }
.send-btn { background: var(--board-3); color: var(--chalk); border: 1px solid var(--edge-2); }
.send-btn:disabled, .mic-btn:disabled { opacity: .4; cursor: not-allowed; }
.dock-meta { display: flex; justify-content: space-between; gap: 12px; margin: 6px 4px 0; font-size: .75rem; color: var(--faint); }
#status.live { color: var(--chalk); }
#status.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 6px; vertical-align: 1px; }
.kbd { font: 500 .7rem/1 var(--ui); border: 1px solid var(--edge-2); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--dust); }
@media (pointer: coarse) { .desk-only { display: none; } }

/* ---------- lobby (before the interview starts) ---------- */
.lobby { position: absolute; inset: 0; z-index: 30; background: var(--slate); overflow-y: auto; display: grid; place-items: start center; padding: 24px 16px; padding-top: max(24px, env(safe-area-inset-top)); }
.lobby[hidden] { display: none; }
.lobby-inner { width: 100%; max-width: 920px; display: grid; gap: 24px; }
@media (min-width: 860px) { .lobby-inner { grid-template-columns: 1.2fr 1fr; align-items: start; margin-top: 4vh; } }
.lobby h1 { font-family: var(--voice); font-weight: 500; font-size: var(--step-3); margin: 0 0 4px; }
.lobby .room-subject { font-size: var(--step--1); }
.lobby-board { padding: 22px; }
.lobby-board .problem-text { max-height: none; }
.expect { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.expect li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--chalk-2); font-size: var(--step--1); }
.expect svg { color: var(--dust); margin-top: 2px; }
.setup { background: var(--board); border: 1px solid var(--edge); border-radius: var(--r-m); padding: 18px; display: grid; gap: 16px; }
.setup h2 { font-size: var(--step-0); margin: 0; }
.mic-test { display: grid; gap: 10px; }
.level { height: 8px; border-radius: 6px; background: var(--board-3); overflow: hidden; }
.level span { display: block; height: 100%; width: 0; background: var(--chalk); transition: width .08s linear; }
.mic-state { font-size: var(--step--1); color: var(--dust); margin: 0; }
.mic-state.ok { color: var(--chalk); }
.mic-state.bad { color: var(--chalk); }
.mic-state.bad::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--step--1); color: var(--chalk-2); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--board-3); border: 1px solid var(--edge-2); transition: background-color .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--dust); transition: transform .15s, background-color .15s; }
.switch input:checked + span { background: var(--chalk); border-color: var(--chalk); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
#beginBtn { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); box-shadow: 0 0 0 8px var(--board), 0 -12px 24px var(--board); }

/* ---------- scratchpad ---------- */
.pad { position: fixed; inset: 0; z-index: 40; background: var(--slate); display: grid; grid-template-rows: auto 1fr; }
.pad[hidden] { display: none; }
.pad-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.pad-title { font-weight: 600; font-size: var(--step--1); color: var(--dust); }
.pad-stage { position: relative; min-height: 0; }
#padCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; background: var(--board); background-image: radial-gradient(60% 40% at 20% 20%, rgba(255,255,255,.03), transparent 70%), var(--noise); background-blend-mode: normal, soft-light; }
.pad-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--hand); font-size: 1.8rem; color: var(--faint); }
.pad-empty[hidden] { display: none; }
.toolbar { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: var(--r-pill); background: var(--board-3); border: 1px solid var(--edge-2); box-shadow: var(--shadow-pop); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.tool { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--dust); cursor: pointer; }
.tool:hover { color: var(--chalk); background: rgba(255,255,255,.06); }
.tool.active, .tool[aria-pressed="true"] { background: var(--chalk); color: var(--ink); }
.tool:disabled { opacity: .3; cursor: default; background: transparent; }
.tool .swatch { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; }
.tool .swatch.white { background: var(--chalk); }
.tool .swatch.grey { background: #8a8781; }
.tool-sep { width: 1px; height: 22px; background: var(--edge-2); margin: 0 4px; flex: none; }

.toast { position: fixed; left: 50%; top: max(72px, calc(env(safe-area-inset-top) + 64px)); transform: translateX(-50%); background: var(--chalk); color: var(--ink); padding: 10px 16px; border-radius: var(--r-pill); font-size: var(--step--1); font-weight: 600; z-index: 60; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow-pop); }
.toast[hidden] { display: none; }

@media (min-width: 900px) {
  .room { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto auto; max-width: 1320px; }
  .room-bar { grid-column: 1 / -1; }
  .room-board { grid-column: 1; grid-row: 2; margin: 0 12px 0 16px; }
  .problem-text { font-size: 1.35rem; max-height: 30vh; }
  .board-toggle { display: none; }
  .transcript { grid-column: 2; grid-row: 2 / span 2; }
  .ended-banner { grid-column: 2; grid-row: 4; }
  .dock { grid-column: 2; grid-row: 5; }
  .pad, .pad[hidden] { display: grid; position: relative; inset: auto; z-index: auto; grid-column: 1; grid-row: 3 / span 3; margin: 12px 12px 16px 16px; border: 1px solid var(--edge); border-radius: var(--r-m); overflow: hidden; min-height: 0; }
  .pad-bar { padding: 8px 12px; }
  #padClose, #openPad { display: none; }
  .toast { top: auto; bottom: 150px; left: 75%; }
}

/* ---------- terms ---------- */
.prose h2 { font-size: var(--step-1); margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; color: var(--dust); }
.prose li { margin-bottom: .5em; }
.prose p { color: var(--dust); }
.prose strong { color: var(--chalk); }

/* ---------- admin ---------- */
.admin { max-width: 1080px; margin: 0 auto; padding: 24px 0; }
.admin h1 { font-family: var(--voice); font-weight: 500; font-size: var(--step-3); }
.admin h2 { font-size: var(--step-1); margin-top: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 28px; }
.admin-stats div { background: var(--board); border: 1px solid var(--edge); border-radius: var(--r-s); padding: 14px; }
.admin-stats dt { color: var(--dust); font-size: var(--step--1); }
.admin-stats dd { margin: 4px 0 0; font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.admin-grid { display: grid; gap: 24px; margin-bottom: 28px; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 1fr 1.2fr; } }
.admin-form { display: grid; gap: 8px; margin-top: 12px; }
.admin-form label { font-size: var(--step--1); color: var(--dust); }
.admin-form input, .admin-form select { min-height: 46px; font-weight: 400; font-size: var(--step-0); }
.admin-form button { margin-top: 8px; }
.new-key { margin: 12px 0; padding: 12px; border: 1px dashed var(--chalk-2); border-radius: var(--r-s); }
.new-key .access-key { font-size: 1.6rem; margin: 0 0 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); margin-bottom: 24px; display: block; overflow-x: auto; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--edge); white-space: nowrap; }
.admin-table th { color: var(--dust); font-weight: 400; }
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--edge); }

/* KaTeX */
.katex { font-size: 1.05em; }
.chalk-write .katex, .subject-teaser .katex { font-style: normal; }
