/* Cambridge Mathematics Interview — shared styles */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:"Segoe UI","Microsoft YaHei",sans-serif;background:#0b1220;color:#e2e8f0;line-height:1.75;padding:24px 20px 80px}
.container{max-width:min(96vw,2000px);margin:0 auto}
a{color:#38bdf8;text-decoration:none}
a:hover{text-decoration:underline}
.back{display:inline-block;font-size:13px;color:#94a3b8;margin-bottom:14px}
.back:hover{color:#38bdf8}

/* ---------- index ---------- */
h1{font-size:26px;color:#f1f5f9;letter-spacing:.2px}
.sub{color:#94a3b8;font-size:14px;margin:6px 0 22px;max-width:78ch}
.cat-block{margin-bottom:26px}
.cat-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;border-bottom:1px solid #1e293b;padding-bottom:6px;margin-bottom:6px}
.cat-head h2{font-size:17px;color:#f1f5f9;font-weight:600}
.cat-head span{font-size:12px;color:#64748b}
.cat-gloss{font-size:12.5px;color:#64748b;margin:0 0 10px;max-width:78ch}
.q-row{display:grid;grid-template-columns:44px 1fr auto auto;gap:12px;align-items:baseline;padding:7px 10px;border-radius:8px;color:inherit;text-decoration:none}
.q-row:hover{background:#111d33}
.q-num{font-variant-numeric:tabular-nums;color:#38bdf8;font-weight:700;font-size:14px}
.q-topic{color:#cbd5e1;font-size:14px}
.q-meta{font-size:11.5px;color:#64748b;white-space:nowrap}
.q-tag{font-size:11px;padding:1px 7px;border-radius:5px;background:#1e293b;color:#94a3b8;white-space:nowrap}
.q-tag.ready{background:#14532d;color:#bbf7d0}
.q-tag.pending{background:#1e293b;color:#64748b}

/* ---------- interview page ---------- */
.q-head{border:1px solid #1e293b;border-radius:12px;padding:16px 20px;background:#0f1a2e;margin-bottom:16px}
.q-head .meta{font-size:12px;color:#94a3b8;display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.q-head .meta b{color:#38bdf8;font-weight:600}
.q-head .focus{font-size:15px;color:#f1f5f9;font-weight:600;margin-bottom:6px}
.q-head .scene{font-size:12.5px;color:#94a3b8;font-style:italic;border-left:2px solid #334155;padding-left:10px;margin-top:8px}
.statement{background:#f8fafc;color:#0f172a;border-radius:12px;padding:18px 22px;font-size:18px;margin-bottom:18px}
.statement mjx-container{font-size:118% !important}

.controls{position:sticky;top:0;z-index:20;background:#0b1220ee;backdrop-filter:blur(6px);padding:10px 0;display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-bottom:1px solid #1e293b;margin-bottom:18px}
.btn{background:#1e293b;color:#38bdf8;border:1px solid #334155;font-size:13px;font-weight:600;padding:5px 14px;border-radius:7px;cursor:pointer;font-family:inherit}
.btn:hover{border-color:#38bdf8}
.btn.primary{background:#0369a1;color:#e0f2fe;border-color:#0369a1}
.btn:disabled{opacity:.4;cursor:default}
.progress{font-size:12.5px;color:#94a3b8;margin-left:auto;font-variant-numeric:tabular-nums}
.toggles{display:flex;gap:12px;font-size:12.5px;color:#94a3b8}
.toggles label{cursor:pointer;user-select:none}

/* a beat = one moment on the whiteboard */
.beat{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px;margin-bottom:18px;opacity:.28;transition:opacity .25s}
.beat.live{opacity:1}
body.dim-off .beat{opacity:1}
@media(max-width:900px){.beat{grid-template-columns:1fr}}
/* Above 1500px the board takes the larger share; below it the old 1.35:1 split is kept, because
   there a wider board would buy it by making the say column narrower than it already is. */
@media(min-width:1500px){.beat{grid-template-columns:minmax(0,1.9fr) minmax(0,1fr)}}
.phase{font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:#f59e0b;margin-bottom:3px}
.beat h3{font-size:15px;color:#f1f5f9;font-weight:600;margin-bottom:9px}
.board{background:#f8fafc;color:#0f172a;border-radius:10px;padding:16px 18px;font-size:16.5px;
  background-image:linear-gradient(#e9eef5 1px,transparent 1px);background-size:100% 30px}
.board .line{margin:2px 0 12px}
.board .line:last-child{margin-bottom:2px}
.board mjx-container{font-size:115% !important}
.say{background:#101c30;border-left:3px solid #38bdf8;border-radius:0 10px 10px 0;padding:14px 16px;font-size:14.5px;color:#cbd5e1}
.say .head{font-size:11px;letter-spacing:1px;text-transform:uppercase;color:#38bdf8;margin-bottom:8px}
.say p{margin-bottom:9px;font-style:italic}
.say p:last-child{margin-bottom:0}
.note{grid-column:1/-1;font-size:12.5px;color:#7f8fa6;border-left:2px solid #f59e0b55;padding-left:10px;margin-top:-4px}
.fig{margin-top:12px;background:#0f1a2e;border:1px solid #1e293b;border-radius:10px;padding:10px}
/* 320px keeps a figure from driving its beat's zoom: at 74% of the board column a
   diagram costs the whole beat 2-4px of text size, and it stays legible capped. */
.fig svg{width:74%;max-width:320px;height:auto;display:block;margin:0 auto}
.fig .cap{font-size:12px;color:#94a3b8;margin-top:6px;text-align:center}
body.narration-off .say{display:none}
body.narration-off .beat{grid-template-columns:minmax(0,1fr)}

.sec{margin-top:26px;border-top:1px solid #1e293b;padding-top:18px}
.sec h2{font-size:17px;color:#f1f5f9;margin-bottom:12px}
.fu{background:#0f1a2e;border:1px solid #1e293b;border-radius:10px;padding:14px 16px;margin-bottom:12px}
.fu .q{color:#f59e0b;font-weight:600;font-size:14.5px;margin-bottom:8px}
.fu .board{margin:10px 0 0}
ul.plain{list-style:none}
ul.plain li{padding-left:18px;position:relative;margin-bottom:7px;font-size:14.5px;color:#cbd5e1}
ul.plain li:before{content:"→";position:absolute;left:0;color:#38bdf8}
ul.marks li:before{content:"✓";color:#22c55e}
ul.traps li:before{content:"✕";color:#ef4444}
.answer-line{font-size:17px;color:#f1f5f9;background:#0f1a2e;border:1px solid #14532d;border-radius:10px;padding:12px 16px;margin-top:8px}
footer{margin-top:34px;font-size:12px;color:#64748b;border-top:1px solid #1e293b;padding-top:14px}
