/* learner.css — this screen's own layout over v2.css. It reads the tokens and carries no colour. */
[hidden] { display: none !important; }
.content > .notice { margin: 1rem 1rem 0; }
.notice[data-kind="error"] { color: var(--danger); border-color: var(--danger); }
.notice[data-kind="ok"] { color: var(--accent); border-color: var(--accent); }
input { width: 100%; font: inherit; padding: 0 0.75rem; border: 1px solid var(--line);
        border-radius: var(--radius); background: var(--surface); color: var(--text); }
/* every page scrolls in the content column the viva frame bounds */
.content > .wrap { width: 100%; min-height: 0; overflow-y: auto; }
.question { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0.75rem; }
.asked { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.5rem; font-weight: 600; }
.stack { display: grid; gap: 0.75rem; }
.tree { font-family: ui-monospace, monospace; font-size: 0.9rem; white-space: pre; overflow-x: auto; }
.tree .falter { color: var(--danger); font-weight: 700; }
.verdict { margin: 0 0 0.75rem; }
.verdict b { color: var(--danger); }
.said { white-space: pre-wrap; overflow-wrap: anywhere; }
.label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.probe { display: flex; gap: 0.75rem; align-items: flex-start; }
.probe input { width: auto; min-height: var(--target); min-width: var(--target); margin: 0; }
/* the text viva: the Chat column scrolls as one, turns above the composer */
.viva-chat { overflow-y: auto; }
.viva-chat > .chat { flex: none; display: block; }
.turns { display: grid; gap: 0.6rem; }
#viva-feedback { margin-top: 1rem; }
.voice-opt { display: flex; align-items: center; gap: 0.5rem; min-height: var(--target); margin: 0.25rem 0; }
.voice-opt input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; accent-color: var(--accent); } /* the label is the 44px target */
.voice-pause:disabled { display: none; }
.voice-note { font-size: 0.9rem; margin: 0 0 0.5rem; }

/* The active viva, immersive: the shell's chrome gives way; the stimulus is centred and large; the
   current question, the speaking state and the mic are held at the foot. Tokens only. */
.immersive-bar, .transcript-toggle { display: none; }
.shell.immersive { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "main"; }
.shell.immersive > .topbar, .shell.immersive > .sidebar, .shell.immersive > .backdrop { display: none; }
.shell.immersive .content { overflow-y: auto; }
.shell.immersive .content > .wrap { max-width: 64rem; padding: 0 1rem; overflow: visible; }
.shell.immersive .viva { display: flex; flex-direction: column; gap: 1rem; min-height: 100dvh; }
.shell.immersive .immersive-bar { display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 6;
  padding: 0.5rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.shell.immersive .immersive-title { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell.immersive .viva > .unit-head, .shell.immersive .viva-tabs, .shell.immersive #viva-clock,
.shell.immersive .viva-chat > .prompts-title, .shell.immersive #question, .shell.immersive #world-pick,
.shell.immersive #world-shown, .shell.immersive #btn-end, .shell.immersive .answer-label { display: none; }
.shell.immersive .viva-data, .shell.immersive .viva-chat { display: block; width: 100%; overflow: visible; padding: 0; }
.shell.immersive .viva-data { flex: 1 0 auto; }
.shell.immersive .stimulus-figure { text-align: center; }
.shell.immersive .stimulus { margin: 0 auto; max-height: 70dvh; width: auto; }
/* the foot: the current question first, then the mic, then the voice switch and a compact answer box */
.shell.immersive .viva-chat { display: flex; flex-direction: column; gap: 0.5rem; background: var(--bg); border-top: 1px solid var(--line); padding: 0.75rem 0; }
.shell.immersive #viva-run { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.shell.immersive #turns { order: -1; width: 100%; }
.shell.immersive .viva-chat > .mic-bar { order: 1; position: static; justify-content: center; background: none; border: 0; box-shadow: none; padding: 0; }
.shell.immersive #composer { order: 2; }
.shell.immersive .transcript-toggle { display: inline-flex; min-height: var(--target); }
.shell.immersive #viva-run:not(.show-transcript) .turn:not(.turn-now) { display: none; }
.shell.immersive #viva-run.show-transcript .turns { max-height: 40dvh; overflow-y: auto; }
.shell.immersive .turn-now { max-width: none; width: 100%; font-size: 1.15rem; text-align: center; }
.shell.immersive .turn-now .speaker { display: block; }
.shell.immersive .now-badge { margin: 0.25rem 0 0; }
.shell.immersive .mic-bar-btn { width: 5rem; height: 5rem; }
.shell.immersive #answer { height: 3.5rem; min-height: 3.5rem; }
.shell.immersive #composer .actions { margin-top: 0.5rem; }
.shell.immersive .voice-opt { justify-content: center; margin: 0; }
.shell.immersive .voice-note { text-align: center; font-size: 0.8rem; margin: 0; }
@media (min-width: 56.25rem) and (min-height: 50rem) { /* wide and tall: the foot is held in view while the stimulus scrolls above it */
  .shell.immersive .viva-chat { position: sticky; bottom: 0; z-index: 5; }
}
.privacy h1 { margin-top: 0.5rem; }
.privacy ul { padding-left: 1.25rem; }

/* After the mic stops: send what was heard, or keep it as a draft to correct. */
.mic-choice { display: flex; gap: 0.5rem; }
.mic-choice[hidden] { display: none; }
.mic-bar { flex-wrap: wrap; }
@media (max-width: 36rem) { .mic-choice { flex: 1 0 100%; justify-content: center; } } /* a phone: the choice on its own row, the caption beside the mic */
