/* ScoreAbroad Classroom — teacher console, student join page and projector view.
 * Built on the site tokens in style.css (dark by default, light via theme.js).
 * Every class is prefixed cr- so nothing leaks into the rest of the site. */

.cr-body { min-height: 100vh; background: var(--bg-base); color: var(--text-2); }
:root[data-theme="light"] .cr-body { background: var(--bg-base); }
.cr-body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 500px at 85% -10%, rgba(255,92,53,0.12), transparent 60%), radial-gradient(700px 500px at -10% 110%, rgba(255,179,71,0.08), transparent 60%); }
.cr-body [hidden] { display: none !important; }
.cr-body h1, .cr-body h2, .cr-body h3 { font-family: 'Poppins', sans-serif; color: var(--text-1); letter-spacing: -0.4px; line-height: 1.25; }
.cr-body h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.cr-body h2 { font-size: 1.3rem; font-weight: 700; }
.cr-body h3 { font-size: 1rem; font-weight: 700; }
.cr-body p { line-height: 1.65; }
.cr-body button:disabled { opacity: .5; cursor: default; transform: none !important; }
.cr-body :focus-visible { outline: 3px solid rgba(255,92,53,0.55); outline-offset: 3px; }
.cr-skip { position: fixed; left: 12px; top: -80px; z-index: 50; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; }
.cr-skip:focus-visible { top: 12px; }

/* Header */
.cr-head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem clamp(16px, 4vw, 48px);
  background: rgba(6,6,8,0.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--glass-border); }
:root[data-theme="light"] .cr-head { background: rgba(255,255,255,0.85); }
.cr-brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.cr-brand .brand-logo { font-size: 1.15rem; text-decoration: none; }
.cr-brand-tag { border-left: 1px solid var(--glass-border-bright); padding-left: .75rem; font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--text-2); font-size: .95rem; white-space: nowrap; }
.cr-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.cr-conn { font-size: .75rem; font-weight: 700; color: #10B981; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.cr-conn::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cr-conn.offline { color: #F59E0B; }

.cr-main { max-width: 1400px; margin: 0 auto; padding: 1.75rem clamp(16px, 4vw, 48px) 4rem; width: 100%; }
.cr-main.narrow { max-width: 860px; }

/* Cards & layout */
.cr-card { background: var(--glass-1); border: 1px solid var(--glass-border); border-radius: var(--r-xl); padding: 1.6rem; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); min-width: 0; }
:root[data-theme="light"] .cr-card { background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 12px 32px -18px rgba(15,23,42,0.18); }
.cr-card + .cr-card { margin-top: 1.25rem; }
.cr-stack { display: grid; gap: 1.25rem; }
.cr-row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.cr-between { justify-content: space-between; }
.cr-eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--brand); margin-bottom: .5rem; }
.cr-muted { color: var(--text-muted); }
.cr-small { font-size: .82rem; }
.cr-note { font-size: .8rem; color: var(--text-muted); line-height: 1.6; margin-top: .75rem; }
.cr-pill { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .28rem .7rem; font-size: .74rem; font-weight: 700; background: var(--brand-dim); color: var(--brand); border: 1px solid var(--brand-border); line-height: 1.3; }
.cr-pill.green { background: rgba(16,185,129,0.12); color: #10B981; border-color: rgba(16,185,129,0.3); }
.cr-pill.amber { background: rgba(245,158,11,0.12); color: #F59E0B; border-color: rgba(245,158,11,0.3); }
.cr-pill.grey { background: var(--glass-2); color: var(--text-2); border-color: var(--glass-border); }
.cr-private { font-size: .65rem; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 800; color: var(--text-muted); }
.cr-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35); color: #F87171; padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1.25rem; font-size: .9rem; }
:root[data-theme="light"] .cr-error { color: #B91C1C; }
.cr-notice { background: var(--brand-dim); border: 1px solid var(--brand-border); color: var(--text-1); padding: 1rem 1.15rem; border-radius: var(--r); font-size: .9rem; line-height: 1.6; margin-bottom: 1.25rem; }
.cr-notice .btn { margin-top: .75rem; }

/* Forms */
.cr-field { display: grid; gap: .4rem; min-width: 0; }
.cr-field label, .cr-label { font-size: .78rem; font-weight: 700; color: var(--text-2); }
.cr-field input, .cr-field select, .cr-field textarea { width: 100%; min-width: 0; background: var(--glass-2); border: 1px solid var(--glass-border-bright); border-radius: var(--r); padding: .7rem .85rem; color: var(--text-1); font-size: .92rem; min-height: 44px; }
.cr-field select option { color: #111827; }
.cr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cr-fields .full { grid-column: 1 / -1; }
.cr-auth { max-width: 440px; margin: 2.5rem auto; }
.cr-auth form { margin-top: 1.25rem; display: grid; gap: 1rem; }

/* Lobby */
.cr-hero { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-bottom: 1.75rem; }
.cr-hero p { max-width: 640px; margin-top: .6rem; color: var(--text-2); }
.cr-hero-icon { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; font-size: 2.3rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 16px 40px -10px rgba(255,92,53,0.55); flex-shrink: 0; }
.cr-lobby { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.cr-tiles { display: grid; gap: .75rem; margin-top: 1rem; }
.cr-tile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--r-lg); border: 1px solid var(--glass-border); background: var(--glass-1); }
.cr-tile h3 { margin-bottom: .25rem; }
.cr-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; font-weight: 700; }
.cr-empty { padding: 1.75rem 1rem; text-align: center; border: 1px dashed var(--glass-border-bright); border-radius: var(--r-lg); color: var(--text-muted); line-height: 1.7; }

/* Workspace */
.cr-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.cr-track { list-style: none; display: flex; gap: .5rem; margin: 0 0 1.25rem; padding: 0; }
.cr-track li { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; color: var(--text-muted); border-bottom: 3px solid var(--glass-border); padding-bottom: .6rem; }
.cr-track li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; background: var(--glass-2); flex-shrink: 0; }
.cr-track li.current { color: var(--brand); border-color: var(--brand); }
.cr-track li.current span { background: var(--brand); color: #fff; }
.cr-track li.done { color: #10B981; border-color: rgba(16,185,129,0.45); }
.cr-work { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.cr-side { display: grid; gap: 1.25rem; }
.cr-join { text-align: center; }
.cr-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 2.2rem; font-weight: 800; letter-spacing: 6px; color: var(--brand); margin: .3rem 0 .5rem; }
.cr-qr { display: flex; justify-content: center; margin: .75rem auto; min-height: 60px; }
.cr-qr img, .cr-qr canvas { background: #fff; padding: 8px; border-radius: 12px; max-width: 136px; height: auto; }
.cr-people { display: grid; gap: .5rem; max-height: 260px; overflow: auto; margin-top: .85rem; }
.cr-person { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--text-1); }
.cr-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-dim); color: var(--brand); font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.cr-person .cr-pname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cr-dot { width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
.cr-dot.away { background: var(--text-muted); }
.cr-x { background: transparent; color: var(--text-muted); width: 28px; height: 28px; border-radius: 8px; font-size: 1.1rem; }
.cr-x:hover { color: #F87171; background: var(--glass-2); }

/* Activity picker */
.cr-variant { display: inline-flex; border: 1px solid var(--glass-border-bright); border-radius: 999px; padding: 3px; gap: 3px; }
.cr-variant button { background: transparent; color: var(--text-2); padding: .45rem .95rem; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.cr-variant button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.cr-skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-top: 1.1rem; }
.cr-skill { border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: .9rem; background: var(--glass-1); min-width: 0; }
.cr-skill h3 { display: flex; align-items: center; gap: .5rem; font-size: .92rem; margin-bottom: .6rem; }
.cr-skill h3 i { color: var(--brand); }
.cr-act { display: block; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: .5rem .6rem; color: var(--text-2); font-size: .84rem; line-height: 1.35; margin-bottom: .2rem; }
.cr-act small { display: block; color: var(--text-muted); font-size: .72rem; margin-top: .1rem; }
.cr-act:hover { background: var(--glass-2); color: var(--text-1); }
.cr-act[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-dim); color: var(--text-1); }
.cr-act.mock { margin-top: .5rem; border: 1px dashed var(--brand-border); }
.cr-act.mock::before { content: 'MOCK'; font-size: .6rem; font-weight: 800; letter-spacing: 1px; color: var(--brand); display: block; }
.cr-chosen { margin-top: 1.1rem; padding: 1rem 1.1rem; border-radius: var(--r-lg); background: var(--brand-dim); border: 1px solid var(--brand-border); }
.cr-chosen strong { color: var(--text-1); }
.cr-setup-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--glass-border); }
.cr-body details { border-top: 1px solid var(--glass-border); margin-top: 1.1rem; padding-top: 1rem; }
.cr-body summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--text-2); }
.cr-body details .cr-fields { margin-top: 1rem; }

/* Session panel */
.cr-preparing { text-align: center; padding: 2.25rem 1rem; }
.cr-spinner { width: 54px; height: 54px; margin: 0 auto 1.1rem; border-radius: 50%; border: 4px solid var(--brand-dim); border-top-color: var(--brand); animation: cr-spin 1s linear infinite; }
@keyframes cr-spin { to { transform: rotate(360deg); } }
.cr-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.1rem 0; }
.cr-metric { padding: .9rem; border-radius: var(--r-lg); background: var(--glass-2); border: 1px solid var(--glass-border); }
.cr-metric strong { display: block; font-family: 'Poppins', sans-serif; font-size: 1.45rem; color: var(--text-1); }
.cr-metric span { font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.cr-meta { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cr-timer { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.1; }
.cr-timer.late { color: #F87171; }
.cr-timer-label { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 600; text-align: right; }
.cr-progress { height: 4px; border-radius: 4px; background: var(--glass-2); overflow: hidden; margin: .5rem 0 1.25rem; }
.cr-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s; }
.cr-stage-title { font-size: clamp(1.4rem, 2.6vw, 2rem) !important; margin-bottom: 1rem; }
.cr-stage-say { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.7; color: var(--text-1); }
.cr-board { margin-top: 1.25rem; padding: 1.1rem 1.25rem; border-radius: var(--r-lg); background: var(--brand-dim); border: 1px solid var(--brand-border); color: var(--text-1); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.6; }
.cr-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; border-top: 1px solid var(--glass-border); padding-top: 1rem; margin-top: 1.25rem; }
.cr-preview { padding: .85rem 0; border-bottom: 1px solid var(--glass-border); }
.cr-preview p { font-size: .88rem; margin-top: .35rem; }
.cr-guide h3 { margin: 1rem 0 .4rem; font-size: .88rem; }
.cr-guide p, .cr-guide li { font-size: .84rem; color: var(--text-2); line-height: 1.6; }
.cr-guide ul { padding-left: 1.1rem; }

/* Response board */
.cr-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin: .9rem 0; }
.cr-counts span { text-align: center; padding: .55rem .2rem; border-radius: 10px; font-size: .68rem; font-weight: 700; background: var(--glass-2); color: var(--text-2); }
.cr-counts strong { display: block; font-family: 'Poppins', sans-serif; font-size: 1.3rem; color: var(--text-1); }
.cr-counts .low { background: rgba(239,68,68,0.12); color: #F87171; }
.cr-counts .high { background: rgba(16,185,129,0.12); color: #10B981; }
.cr-students { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .45rem; max-height: 420px; overflow: auto; }
.cr-student { padding: .6rem .7rem; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-1); }
.cr-student-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text-1); }
.cr-student-head strong { min-width: 0; overflow-wrap: anywhere; }
.cr-student .cr-pill { white-space: nowrap; }
.cr-student small { display: block; color: var(--text-muted); font-size: .74rem; margin-top: .2rem; }
.cr-student.low { border-color: rgba(239,68,68,0.4); }
.cr-student button { background: none; color: var(--brand); font-size: .74rem; font-weight: 700; padding: 0; margin-top: .25rem; }
.cr-qbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: .35rem; margin-top: .6rem; }
.cr-qbar span { font-size: .68rem; text-align: center; padding: .35rem .2rem; border-radius: 8px; background: var(--glass-2); color: var(--text-2); font-weight: 700; }
.cr-qbar span.low { background: rgba(239,68,68,0.14); color: #F87171; }
.cr-qbar span.mid { background: rgba(245,158,11,0.14); color: #F59E0B; }
.cr-qbar span.high { background: rgba(16,185,129,0.14); color: #10B981; }

/* ── Item rendering (shared by teacher, student and projector) ───────────── */
.cr-item { display: grid; gap: 1.1rem; }
.cr-item-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cr-pane { min-width: 0; }
.cr-passage { max-height: 68vh; overflow: auto; padding: 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--glass-1); border: 1px solid var(--glass-border); font-size: .95rem; line-height: 1.8; color: var(--text-1); }
:root[data-theme="light"] .cr-passage { background: #FAFBFD; }
.cr-passage h3 { margin-bottom: .6rem; }
.cr-passage h4 { font-family: 'Poppins', sans-serif; font-size: .9rem; margin: 1rem 0 .4rem; color: var(--text-1); }
.cr-passage p { margin-bottom: .85rem; }
.cr-plabel { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--brand-dim); color: var(--brand); font-weight: 800; font-size: .78rem; margin-right: .45rem; }
.cr-instr { font-size: .86rem; color: var(--text-2); background: var(--glass-2); border-left: 3px solid var(--brand); padding: .6rem .8rem; border-radius: 0 10px 10px 0; }
.cr-group { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.cr-group-head { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--text-1); font-size: .92rem; }
.cr-q { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-1); }
.cr-q.ok { border-color: rgba(16,185,129,0.55); background: rgba(16,185,129,0.06); }
.cr-q.bad { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.05); }
.cr-qn { min-width: 1.75rem; height: 1.75rem; border-radius: 8px; display: grid; place-items: center; background: var(--glass-2); color: var(--text-1); font-weight: 800; font-size: .78rem; }
.cr-qtext { color: var(--text-1); font-size: .93rem; line-height: 1.6; }
.cr-opts { display: grid; gap: .4rem; margin-top: .5rem; }
.cr-opts.inline { display: flex; flex-wrap: wrap; }
.cr-opt { display: flex; align-items: flex-start; gap: .55rem; padding: .5rem .65rem; border-radius: 10px; border: 1px solid var(--glass-border-bright); cursor: pointer; font-size: .9rem; color: var(--text-1); background: transparent; }
.cr-opt input { margin-top: .25rem; accent-color: var(--brand); }
.cr-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-dim); }
.cr-opt.key { border-color: rgba(16,185,129,0.7); background: rgba(16,185,129,0.1); }
.cr-letter { font-weight: 800; color: var(--brand); min-width: 1rem; }
.cr-in, .cr-sel { background: var(--glass-2); border: 1px solid var(--glass-border-bright); color: var(--text-1); border-radius: 8px; padding: .38rem .55rem; font-size: .9rem; min-height: 36px; max-width: 100%; }
.cr-sel option { color: #111827; }
.cr-in { width: 12rem; }
.cr-in.wide { width: 100%; max-width: 22rem; }
.cr-gap { display: inline-flex; align-items: center; gap: .3rem; margin: .1rem .15rem; vertical-align: middle; }
.cr-gap .cr-qn { min-width: 1.4rem; height: 1.4rem; font-size: .68rem; }
.cr-gap .cr-in { width: 9.5rem; }
.cr-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cr-table th, .cr-table td { border: 1px solid var(--glass-border-bright); padding: .5rem .6rem; text-align: left; vertical-align: top; color: var(--text-1); }
.cr-table th { background: var(--glass-2); font-size: .78rem; }
.cr-box { border: 1px solid var(--glass-border-bright); border-radius: 12px; padding: .8rem 1rem; background: var(--glass-1); }
.cr-box ol, .cr-box ul { padding-left: 1.2rem; display: grid; gap: .25rem; }
.cr-box li { font-size: .88rem; color: var(--text-1); }
.cr-form-row { display: grid; grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr); gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--glass-border); color: var(--text-1); font-size: .9rem; }
.cr-note-line { padding: .3rem 0; color: var(--text-1); font-size: .9rem; }
.cr-note-line.l1 { padding-left: 1.2rem; } .cr-note-line.l2 { padding-left: 2.4rem; }
.cr-chart { background: #fff; border-radius: 14px; padding: .6rem; max-width: 640px; }
.cr-chart svg { width: 100%; height: auto; display: block; }
.cr-prompt { font-size: 1rem; line-height: 1.7; color: var(--text-1); white-space: pre-line; }
.cr-cue { border: 2px solid var(--brand-border); border-radius: var(--r-lg); padding: 1rem 1.2rem; background: var(--brand-dim); }
.cr-cue strong { color: var(--text-1); font-size: 1.05rem; }
.cr-cue ul { margin-top: .5rem; padding-left: 1.2rem; color: var(--text-1); }
.cr-essay { width: 100%; min-height: 280px; resize: vertical; background: var(--glass-2); border: 1px solid var(--glass-border-bright); border-radius: var(--r-lg); padding: 1rem; color: var(--text-1); font-size: .98rem; line-height: 1.7; }
.cr-essay-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .6rem; font-size: .82rem; color: var(--text-muted); }
.cr-rec { display: inline-flex; align-items: center; gap: .5rem; }
.cr-rec.on { color: #F87171; }
.cr-rec.on::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #EF4444; animation: cr-blink 1s infinite; }
@keyframes cr-blink { 50% { opacity: .2; } }

/* Audio bar */
.cr-audio { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: var(--r-lg); border: 1px solid var(--brand-border); background: var(--brand-dim); flex-wrap: wrap; }
.cr-audio-track { flex: 1; min-width: 120px; height: 6px; border-radius: 6px; background: var(--glass-3); overflow: hidden; }
.cr-audio-track span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s; }
.cr-audio small { color: var(--text-2); font-size: .78rem; }

/* Review */
.cr-review { display: grid; gap: .5rem; }
.cr-rv { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .6rem .75rem; border-radius: 12px; border: 1px solid var(--glass-border); font-size: .88rem; }
.cr-rv.ok { border-color: rgba(16,185,129,0.45); }
.cr-rv.bad { border-color: rgba(239,68,68,0.45); }
.cr-rv b { color: var(--text-1); }
.cr-rv .cr-exp { color: var(--text-muted); font-size: .8rem; margin-top: .2rem; }
.cr-rv .cr-pct { font-weight: 800; font-size: .8rem; color: var(--text-2); white-space: nowrap; }
.cr-mark { font-weight: 900; }
.cr-mark.ok { color: #10B981; } .cr-mark.bad { color: #F87171; }
.cr-feedback { border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: 1rem 1.1rem; display: grid; gap: .6rem; }
.cr-feedback .cr-band { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--brand); }
.cr-feedback li { font-size: .86rem; color: var(--text-2); }
.cr-transcript { max-height: 260px; overflow: auto; font-size: .86rem; line-height: 1.7; color: var(--text-2); border: 1px solid var(--glass-border); border-radius: 12px; padding: .75rem .9rem; }
.cr-transcript b { color: var(--text-1); }
.cr-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cr-tabs button { background: var(--glass-2); color: var(--text-2); border: 1px solid var(--glass-border); border-radius: 999px; padding: .45rem .9rem; font-weight: 700; font-size: .8rem; }
.cr-tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.cr-tabs button .cr-done { margin-left: .35rem; opacity: .85; }

/* Tables (recap) */
.cr-tablewrap { overflow: auto; margin-top: .75rem; }
.cr-recap { width: 100%; border-collapse: collapse; font-size: .86rem; }
.cr-recap th { font-size: .68rem; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); text-align: left; white-space: nowrap; }
.cr-recap th, .cr-recap td { padding: .6rem .5rem; border-bottom: 1px solid var(--glass-border); color: var(--text-1); vertical-align: top; }

/* Student page */
.cr-welcome { text-align: center; padding: 1.5rem .5rem; }
.cr-welcome .cr-hero-icon { margin: 0 auto 1.1rem; }
.cr-welcome p { margin-top: .6rem; }
.cr-code-input { text-transform: uppercase; letter-spacing: 8px; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.7rem !important; font-weight: 800; }
.cr-status { min-height: 1.4rem; font-size: .84rem; font-weight: 700; color: var(--brand); margin-top: .75rem; }
.cr-sticky { position: sticky; top: 64px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .9rem; margin: -0.25rem 0 1rem; border-radius: var(--r-lg); background: var(--bg-surface); border: 1px solid var(--glass-border); }
:root[data-theme="light"] .cr-sticky { background: #fff; }

/* Projector */
.cr-present .cr-main { max-width: 1600px; }
.cr-present .cr-stage-say { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.cr-present .cr-stage-title { font-size: clamp(2rem, 3.4vw, 3rem) !important; }
.cr-present .cr-board { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.cr-present .cr-passage { font-size: 1.1rem; max-height: none; }
.cr-present .cr-qtext { font-size: 1.1rem; }
.cr-present .cr-code { font-size: 3.4rem; }
.cr-bigstat { font-family: 'Poppins', sans-serif; font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 800; color: var(--brand); line-height: 1; }

/* Toast + dialog */
.cr-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--bg-overlay); color: var(--text-1); border: 1px solid var(--glass-border-bright); border-radius: 12px; padding: .75rem 1.2rem; font-size: .9rem; max-width: 90vw; box-shadow: var(--shadow-lg); }
.cr-body dialog { border: 1px solid var(--glass-border-bright); border-radius: var(--r-xl); padding: 1.5rem; max-width: 440px; width: calc(100% - 32px); background: var(--bg-surface); color: var(--text-2); }
.cr-body dialog.wide { max-width: 760px; }
.cr-body dialog::backdrop { background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); }
.cr-body dialog p { margin: .75rem 0 1.25rem; }

@media (max-width: 1180px) {
  .cr-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-work { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 960px) {
  .cr-work, .cr-lobby { grid-template-columns: 1fr; }
  .cr-side { grid-template-columns: 1fr 1fr; }
  .cr-item-split { grid-template-columns: 1fr; }
  .cr-passage { max-height: 55vh; }
  .cr-present .cr-passage { max-height: none; }
}
@media (max-width: 600px) {
  .cr-head { flex-wrap: wrap; position: static; padding-top: .6rem; padding-bottom: .6rem; }
  .cr-brand-tag { font-size: .85rem; }
  .cr-fields, .cr-skills, .cr-side { grid-template-columns: 1fr; }
  .cr-fields .full { grid-column: auto; }
  .cr-metrics { gap: .45rem; }
  .cr-metric strong { font-size: 1.15rem; }
  .cr-hero-icon { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 18px; }
  .cr-track li { font-size: .66rem; gap: .3rem; }
  .cr-track li span { width: 18px; height: 18px; }
  .cr-card { padding: 1.15rem; border-radius: var(--r-lg); }
  .cr-setup-foot, .cr-foot { flex-direction: column; align-items: stretch; }
  .cr-setup-foot .btn, .cr-foot > .btn { width: 100%; }
  .cr-form-row { grid-template-columns: 1fr; }
  .cr-in { width: 100%; }
  .cr-gap .cr-in { width: 8rem; }
  .cr-rv { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .cr-rv .cr-pct { grid-column: 2; }
  .cr-sticky { top: 0; position: relative; }
}
@media (prefers-reduced-motion: reduce) { .cr-body *, .cr-body *::before, .cr-body *::after { animation: none !important; transition: none !important; } }
@media print { .cr-head, .cr-side, .cr-track, .cr-title .cr-row, .btn, .cr-toast, dialog { display: none !important; } .cr-work { display: block; } .cr-card { border: 0; box-shadow: none; } }

/* ── Full IELTS mock + test instructions (27 Oct 2026) ───────────────────── */
.cr-act.full { display: flex; align-items: center; gap: .9rem; margin: 1.1rem 0 0; padding: .85rem 1rem; border: 1px solid var(--brand-border); background: var(--glass-1); border-radius: var(--r-lg); }
.cr-act.full > i { font-size: 1.3rem; color: var(--brand); flex-shrink: 0; }
.cr-act.full strong { display: block; color: var(--text-1); font-size: .95rem; }
.cr-ins { text-align: left; max-width: 760px; margin: 0 auto; }
.cr-ins h2 { margin-bottom: .4rem; }
.cr-ins h3 { margin: 1.15rem 0 .45rem; font-size: .98rem; }
.cr-ins-summary { color: var(--text-2); line-height: 1.6; margin-bottom: .9rem; }
.cr-ins-list { margin: 0; padding-left: 1.2rem; color: var(--text-2); line-height: 1.6; }
.cr-ins-list li + li { margin-top: .3rem; }
.cr-ins-table td:first-child { font-weight: 700; color: var(--text-1); }
.cr-ins-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cr-ins-sec { border: 1px solid var(--glass-border); border-radius: 12px; padding: .55rem .8rem; margin-top: .5rem; }
.cr-ins-sec summary { cursor: pointer; font-weight: 700; color: var(--text-1); }
.cr-ins-sec p { margin: .5rem 0; font-size: .9rem; }
.cr-ins-start { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.25rem; padding: .9rem 1rem; border-radius: var(--r); background: var(--brand-dim); border: 1px solid var(--brand-border); color: var(--text-1); font-weight: 600; line-height: 1.5; }
.cr-ins-start i { color: var(--brand); margin-top: .2rem; }
.cr-guide-list { margin: .4rem 0 0; padding-left: 1.2rem; line-height: 1.6; color: var(--text-2); }
.cr-guide-list li + li { margin-top: .3rem; }
@media (max-width: 640px) { .cr-ins-metrics { grid-template-columns: 1fr; } .cr-act.full { align-items: flex-start; } }

/* Live video (Zoom component view, classroom-video.js): Zoom's toolbar docks bottom-right and
   its video window floats above it, so the lesson keeps the page. */
.cr-video-dock { position: fixed; right: 16px; bottom: 16px; z-index: 45; width: min(640px, calc(100vw - 32px)); background: var(--bg-surface); border: 1px solid var(--glass-border-bright); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: .5rem .6rem; }
:root[data-theme="light"] .cr-video-dock { background: #fff; }
.cr-video-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .35rem; }
.cr-video-title { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700; color: var(--text-1); }
.cr-video-actions { gap: .3rem; }
.cr-video-actions .btn { padding: .3rem .55rem; font-size: .72rem; min-height: 0; }
.cr-video-root { min-height: 44px; }
.cr-video-launch { position: fixed; right: 16px; bottom: 16px; z-index: 44; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cr-video-launch .btn-primary { box-shadow: 0 12px 30px -10px rgba(255,92,53,0.75); }
#video-card .cr-field input { min-height: 38px; padding: .5rem .7rem; font-size: .86rem; }
@media (max-width: 600px) {
  .cr-video-dock { right: 8px; bottom: 8px; left: 8px; width: auto; }
  .cr-video-launch { left: 16px; }
  .cr-video-launch .btn-primary { flex: 1; }
}
