/* VOICE: friendly study tool, quick and encouraging
   IDEA: a plain white card on a black desk
   PICTURE: the card itself, large, with a mic ring that pulses while listening
   COLOUR and TYPE: black, plain white card, crimson accent; Inter on the card, Schibsted Grotesk for UI
   LAYOUT: first screen is only the card + heard-text + controls; title and deck editor sit below the fold */

/* Fonts are self-hosted (no requests to Google). Both are SIL Open Font License, see fonts/OFL-*.txt */
@font-face{font-family:Inter;font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/inter-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/inter-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/schibsted-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/schibsted-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
/* SCHEME: black / white / crimson */
:root{color-scheme:dark;--bg:#0b0b0b;--mat:#1d1d1d;--card:#ffffff;--cardink:#111111;--ink:#f5f5f5;--muted:#a3a3a3;--acc:#dc143c;--miss-ink:#b0102f;--ok:#2fbf71;--focus:#ffffff}
/* SCHEME (original): desk green / coral
:root{color-scheme:light dark;--bg:light-dark(#0f3d34,#071c18);--mat:light-dark(#145045,#0b2a24);--card:#ffffff;--cardink:#1d2a2a;--ink:#eaf4f0;--muted:light-dark(#a9cfc4,#8fb3a9);--acc:#ff6b4a;--miss-ink:#c2401f;--ok:#3ddc97;--focus:#3ddc97} */
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 "Schibsted Grotesk",system-ui,sans-serif;overflow-x:clip}
.band{padding:clamp(20px,4vw,48px) max(5vw,16px);max-width:1000px;margin:0 auto}
h1{font-weight:800;font-size:clamp(30px,5vw,44px);line-height:1.05;margin:0 0 4px;text-wrap:balance}
h2{font-size:22px;margin:0 0 10px}
.sub{color:var(--muted);margin:0 0 22px}
.play{min-height:100vh;min-height:100svh;display:flex;flex-direction:column;gap:14px;padding-block:clamp(14px,3vh,32px)}
.stage{flex:1;display:flex;flex-direction:column;gap:14px}
.stage .card{flex:1;display:flex;flex-direction:column;justify-content:center}
.more{align-self:flex-start;margin-left:-12px;margin-top:14px;color:var(--muted);font-size:14px;text-decoration:none;padding:6px 12px;border-radius:999px}
.more.up{display:block;width:fit-content;margin:0 -12px 14px auto}
.more:hover{color:var(--ink)}.more:focus-visible{outline:3px solid var(--focus)}
.setup-head{margin-bottom:18px}
.card{position:relative;background:var(--card);color:var(--cardink);border-radius:10px;min-height:280px;padding:56px clamp(20px,5vw,48px) 36px;
 box-shadow:0 2px 0 #0002,0 18px 40px -12px #0008;transition:transform .25s,box-shadow .25s}
.card.ok{box-shadow:0 0 0 4px var(--ok),0 18px 40px -12px #0008}
.card.miss{box-shadow:0 0 0 4px var(--acc),0 18px 40px -12px #0008}
.card .meta{position:absolute;top:12px;left:clamp(20px,5vw,48px);right:16px;display:flex;justify-content:space-between;font-size:13px;color:#5b6b6b}
.prompt{font-family:Inter,system-ui,sans-serif;font-weight:500;letter-spacing:-.02em;font-size:clamp(32px,6.5vw,52px);line-height:1.15;text-align:center;margin:20px 0 10px;overflow-wrap:anywhere}
.answer{font-family:Inter,system-ui,sans-serif;font-weight:400;font-size:clamp(20px,3.5vw,26px);text-align:center;color:#0d7a55;min-height:1.4em}
.card.miss .answer{color:var(--miss-ink)}
.mic{position:absolute;right:16px;bottom:14px;width:46px;height:46px;border-radius:50%;background:#e8eeee;display:grid;place-items:center}
.mic svg{width:22px;height:22px;fill:#5b6b6b}
.live .mic{background:var(--acc)}.live .mic svg{fill:#fff}
.live .mic::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:3px solid var(--acc);animation:pulse 1.4s ease-out infinite}
@keyframes pulse{from{opacity:.9;transform:scale(.9)}to{opacity:0;transform:scale(1.35)}}
@media (prefers-reduced-motion:reduce){.live .mic::after{animation:none;opacity:.6}.card{transition:none}}
.heard{background:var(--mat);border-radius:10px;padding:12px 16px;min-height:52px;color:var(--muted)}
.heard b{color:var(--ink);font-weight:600}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.upload-row{margin:10px 0 6px}
button,select,input,textarea{font:inherit;font-size:16px}
button{min-height:44px;padding:0 18px;border-radius:999px;border:0;background:var(--mat);color:var(--ink);font-weight:600;cursor:pointer}
button.primary{background:var(--acc);color:#fff}
button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
input[type=text],select,textarea{background:var(--mat);color:var(--ink);border:1px solid #ffffff22;border-radius:8px;min-height:44px;padding:8px 12px}
#typed{flex:1 1 200px}
.stats{display:flex;gap:18px;flex-wrap:wrap;font-size:15px;color:var(--muted)}
.stats strong{color:var(--ink);font-size:20px;margin-right:4px}
.warn{background:color-mix(in srgb,var(--acc) 14%,transparent);border:1px solid var(--acc);border-radius:10px;padding:12px 16px}
.edit{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;margin-top:8px}
textarea{width:100%;min-height:260px;font-family:ui-monospace,Menlo,monospace;font-size:15px;line-height:1.6;resize:vertical}
label{display:block;font-size:14px;color:var(--muted);margin:12px 0 4px}
.hint{font-size:14px;color:var(--muted)}
.hint code{background:var(--mat);padding:1px 6px;border-radius:4px;color:var(--ink)}
/* native radio look, on/off toggle behaviour (see app.js) */
.opts{margin-top:12px}
label.opt{display:flex;align-items:center;gap:8px;margin:0;min-height:44px;color:var(--ink);font-size:16px;cursor:pointer}
.opt input{accent-color:var(--acc);width:18px;height:18px;margin:0;flex:none}
.upload{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:999px;background:var(--acc);color:#fff;font-weight:600;cursor:pointer;margin:0;font-size:16px}
#file:focus-visible+select,.upload:focus-within{outline:3px solid var(--focus)}
textarea.drop{outline:3px dashed var(--acc);outline-offset:2px}
#upStatus.ok{color:var(--ok)}#upStatus.bad{color:var(--acc)}
.privacy{margin-top:36px;padding-top:20px;border-top:1px solid #ffffff1a;max-width:68ch}
.privacy h2{font-size:17px;margin-bottom:6px}
.privacy p{margin:0 0 8px}
@media(max-width:700px){.edit{grid-template-columns:minmax(0,1fr)}}
[hidden]{display:none!important}
