/* Guess the line and Class check (/for/teachers/live/, /join/, /for/teachers/check/, /check/) */
.cr-msg:empty { display: none; }
.cr-msg { margin: 10px 0 0; padding: 12px 16px; background: var(--card); border-left: 4px solid var(--green); }
.cr-msg.bad { border-color: var(--red); }
.cr-off[hidden] { display: none; }
.cr-setup, .cr-code { margin: var(--space-5) 0; max-width: 820px; }
.cr-setup fieldset { border: 0; padding: 0; margin: 0 0 var(--space-4); }
.cr-setup legend { font-family: var(--serif); font-weight: 700; font-size: 22px; margin-bottom: 10px; }
.cr-setup input:not([type]), .cr-setup input[type=text] { display: block; width: 100%; max-width: 480px; min-height: 48px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--card); color: var(--ink); font: inherit; }
.cr-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cr-pick { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.cr-pick input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--green); }
.cr-pick .lab { display: inline-block; min-width: 8.5em; text-transform: uppercase; letter-spacing: 0.06em; }
.cr-topic { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; border-bottom: 1px solid var(--rule); }
.cr-topic .cr-pick { flex: 1 1 260px; border-bottom: 0; align-items: center; }
.cr-topic .cr-pick strong { font-weight: 600; }
.cr-n { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.cr-n select { min-height: 40px; min-width: 56px; padding: 0 8px; border: 1px solid var(--ink); border-radius: 0; background: var(--card); color: var(--ink); font: inherit; }
.cr-n select:disabled { opacity: 0.4; }
.cr-total { margin: 12px 0 0; font-weight: 600; }
.cr-total.bad { color: var(--red); }
.cr-all { margin-top: 10px; }
.cr-all summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.cr-all > ul { padding-left: 1.2em; font-size: 15px; }
.cr-all > ul > li { margin-top: 10px; }
.cr-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-row input { flex: 1 1 160px; min-width: 0; min-height: 56px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 0; background: var(--card); color: var(--ink); font: 500 28px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; }
.cr-code label { display: block; font-weight: 600; margin-bottom: 6px; }
.cr-row button { min-height: 52px; }
button.alt { background: var(--card); color: var(--ink); border: 1px solid var(--ink); }
.cr-recent { margin: var(--space-4) 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--rule); }
.cr-recent .lab { text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.cr-recent ul { margin: 0; padding-left: 1.2em; }

/* the projector stage (the same look as the starter of the day) */
.cr-stage { container-type: inline-size; margin: var(--space-5) 0; background: var(--paper); border: 1px solid var(--ink); }
.cr-stage[hidden] { display: none; }
.cr-stage .stage-bar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 12px clamp(16px, 3cqi, 48px); background: var(--green); color: var(--on-green); }
.cr-stage .stage-brand { font-family: var(--serif); font-weight: 800; font-size: clamp(20px, 2cqi, 34px); letter-spacing: -0.02em; }
.cr-stage .stage-day { font-family: var(--mono); font-size: clamp(12px, 1.1cqi, 18px); letter-spacing: 0.08em; text-transform: uppercase; }
.cr-barcode { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: clamp(22px, 2.4cqi, 44px); letter-spacing: 0.15em; }
.cr-body { display: flex; flex-wrap: wrap; gap: clamp(20px, 3cqi, 48px); padding: clamp(18px, 3cqi, 44px) clamp(16px, 3cqi, 48px); }
.cr-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cr-side { flex: 1 1 220px; display: flex; flex-direction: column; gap: 14px; }
.cr-box { border-top: 2px solid var(--ink); padding-top: 8px; }
.cr-box .lab, .cr-stats .lab, .cr-share .lab { margin: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.cr-code { font-family: var(--mono); font-weight: 500; font-size: clamp(36px, 4.4cqi, 72px); letter-spacing: 0.12em; line-height: 1.1; margin: 4px 0; }
.cr-q .cr-code { font-size: inherit; color: var(--red); }
.cr-num { font-family: var(--serif); font-weight: 800; font-size: clamp(32px, 3.6cqi, 60px); line-height: 1; margin: 4px 0 0; }
.cr-names { font-weight: 600; font-size: clamp(16px, 1.5cqi, 24px); margin: 4px 0 0; }
.cr-qr { margin-top: 10px; width: 150px; min-height: 150px; padding: 6px; background: #fff; font-size: 11px; word-break: break-all; color: #000; }
.cr-qr img, .cr-qr canvas { display: block; }
.cr-note { padding: 12px 14px; background: var(--card); border-left: 4px solid var(--green); font-size: clamp(15px, 1.3cqi, 20px); line-height: 1.45; }
.cr-q { margin: 0; font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3.2cqi, 56px); line-height: 1.1; letter-spacing: -0.015em; }
.cr-main .kicker, #cr-pupil .kicker { margin: 0; }
.cr-say { margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.8cqi, 30px); line-height: 1.4; }
.cr-stage .stage-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px clamp(16px, 3cqi, 48px) 16px; border-top: 1px solid var(--rule); }
.cr-stage .stage-sp { flex: 1; }
.cr-stage:fullscreen { margin: 0; border: 0; width: 100vw; height: 100vh; overflow: auto; }

/* charts */
.cr-chart { width: 100%; height: auto; display: block; font-family: var(--mono); font-size: 18px; }
.cr-chart text { fill: var(--muted); }
.cr-chart .g { stroke: var(--rule); }
.cr-chart .hid { fill: var(--track); opacity: 0.45; }
.cr-chart .cut { stroke: var(--hatch); stroke-dasharray: 5 5; }
.cr-chart .real, .cr-legend .real { fill: none; stroke: var(--green); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; }
.cr-chart .gs, .cr-legend .gs { fill: none; stroke: var(--hatch); stroke-width: 1.6; opacity: 0.75; }
.cr-chart .avg, .cr-legend .avg { fill: none; stroke: var(--ink); stroke-width: 4; stroke-dasharray: 12 8; }
.cr-chart .mine, .cr-legend .mine { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.cr-chart .start { fill: var(--red); }
.cr-chart .end { fill: var(--red); }
.cr-chart .cursor { fill: var(--ink); opacity: 0.2; }
.cr-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; font-size: 14px; color: var(--muted); }
.cr-legend span { display: inline-flex; gap: 8px; align-items: center; }
.cr-drawbox { background: var(--card); border: 1px solid var(--ink); padding: 6px; }
.cr-drawbox svg { touch-action: none; cursor: crosshair; }
.cr-drawbox svg:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (max-width: 639px) { #cr-pupil .cr-chart { font-size: 32px; } }
.cr-read { min-height: 1.5em; margin: 0; font-family: var(--mono); }
#cr-pupil { display: flex; flex-direction: column; gap: 12px; margin: var(--space-4) 0; container-type: inline-size; }
#cr-pupil[hidden] { display: none; }

/* class check results and answering */
.cr-share { background: var(--card); border: 1px solid var(--ink); padding: 18px 20px; margin: var(--space-4) 0; }
#main .cr-share p { max-width: none; }
.cr-link { font-family: var(--mono); font-size: 18px; word-break: break-all; margin: 4px 0 10px; }
.cr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin: var(--space-4) 0; }
.cr-stats > div { border-top: 2px solid var(--ink); padding-top: 8px; }
.cr-reslist { padding-left: 1.4em; display: flex; flex-direction: column; gap: 18px; }
.cr-res p { margin: 4px 0 0; }
.cr-rq { font-weight: 600; }
.cr-rq .lab { display: inline-block; margin-right: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 400; }
.cr-rbar { height: 16px; background: var(--track); max-width: 520px; margin-top: 6px; }
.cr-rbar span { display: block; height: 100%; background: var(--green); }
.cr-res.hard { padding: 12px 14px; background: var(--card); border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--red); }
.cr-res.ok { border-left: 4px solid var(--green); padding-left: 12px; }
.cr-res.no { border-left: 4px solid var(--red); padding-left: 12px; }
.cr-people ul { columns: 2 220px; }
.cr-quiz { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.cr-qq { border: 0; border-top: 2px solid var(--ink); padding: 10px 0 0; margin: 0; }
.cr-qq legend { font-weight: 600; font-size: 18px; padding: 0; margin-bottom: 8px; }
.cr-qn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 14px; margin-right: 6px; }
.cr-opt { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 6px 12px; margin-top: 6px; background: var(--card); border: 1px solid var(--rule); cursor: pointer; }
.cr-opt:has(input:checked) { border-color: var(--ink); background: var(--track); }
.cr-opt input { width: 20px; height: 20px; accent-color: var(--green); }
