/* Exam pages: WeLearnFrench colours (dist/brand.css), system fonts only, no external resource. */
:root {
  --gold: #daa520; --blue: #13598b; --burgundy: #800020; --red: #b00020;
  --gray-50: #f9fafb; --gray-200: #e5e7eb; --gray-600: #4b5563; --gray-800: #1f2937;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; color: var(--gray-800); background: var(--gray-50); line-height: 1.5; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
a { color: var(--blue); }
.muted { color: var(--gray-600); }
.warn { color: var(--burgundy); font-weight: 600; }
.error { color: var(--red); min-height: 1.5em; margin: .5em 0 0; }

.bar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: white; border-bottom: 4px solid var(--gold); flex-wrap: wrap; }
.brand { color: var(--blue); }
.who { margin-left: auto; font-weight: 600; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgb(218 165 32 / .14); }
.timer:empty { display: none; }
.timer.warning { color: var(--burgundy); background: rgb(128 0 32 / .1); }
main { max-width: 1200px; margin: 0 auto; padding: 20px; }
.center { max-width: 560px; margin: 40px auto; text-align: center; }
.narrow { max-width: 420px; }
.card { background: white; border: 1px solid var(--gray-200); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.columns { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.columns > aside { flex: 0 0 280px; }
.grow { flex: 1 1 420px; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.scroll { overflow-x: auto; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.check, label.row { font-weight: 400; display: flex; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #c7ccd4; border-radius: 10px; width: 100%; background: white; }
input[type=checkbox] { width: auto; }
input[type=number] { max-width: 110px; }
fieldset { border: 1px solid var(--gray-200); border-radius: 12px; margin: 12px 0; }
button, .button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 12px; border: 1px solid #c7ccd4; background: white; color: var(--gray-800); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--blue); color: var(--blue); }
button:focus-visible, .button:focus-visible, input:focus-visible, .option:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--gold); border-color: var(--gold); color: white; }
.primary:hover { background: var(--blue); border-color: var(--blue); color: white; }
.danger { border-color: var(--burgundy); color: var(--burgundy); }
.danger:hover { background: var(--burgundy); color: white; }
.link { border: 0; background: none; color: var(--blue); text-decoration: underline; }
.notice { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--gray-800); color: white; padding: 10px 18px; border-radius: 12px; z-index: 30; }
.notice.ok { background: var(--blue); }

/* Student copy */
.candidate main { max-width: 860px; }
.grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cell { min-width: 42px; padding: 6px; }
.cell.answered { background: rgb(19 89 139 / .12); border-color: var(--blue); }
.cell.flagged { box-shadow: inset 0 -4px 0 var(--gold); }
.cell.current { outline: 3px solid var(--gold); }
.question .sentence { font-size: 1.5rem; margin: 20px 0; }
.gap { display: inline-block; min-width: 5ch; border-bottom: 3px solid var(--gold); text-align: center; font-weight: 700; color: var(--blue); padding: 0 6px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.option { display: flex; gap: 12px; align-items: center; text-align: left; font-size: 1.15rem; padding: 14px; }
.option .letter { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gray-200); font-weight: 700; }
.option.selected { border-color: var(--blue); background: rgb(19 89 139 / .1); }
.option.selected .letter { background: var(--blue); color: white; }
.save { min-height: 1.5em; color: var(--gray-600); }
.save.saved { color: var(--blue); }
.save.error { color: var(--red); font-weight: 700; }
.actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; }
.flag.on { border-color: var(--gold); background: rgb(218 165 32 / .14); }
.instructions { white-space: pre-line; }
.waiting { font-size: 1.25rem; font-weight: 600; color: var(--blue); }
#code { font-size: 1.6rem; text-align: center; letter-spacing: .2em; text-transform: uppercase; }
.overlay { position: fixed; inset: 0; background: rgb(31 41 55 / .92); display: grid; place-items: center; z-index: 20; padding: 20px; }
.overlay[hidden] { display: none; }
.overlay-box { background: white; border-radius: 16px; padding: 28px; max-width: 520px; width: 100%; text-align: center; }
#suspended .overlay-box { border-top: 8px solid var(--burgundy); }
#suspended h1 { color: var(--burgundy); font-size: 2rem; }

/* Teacher */
.tabs { display: flex; gap: 6px; }
.tab.on { background: var(--blue); border-color: var(--blue); color: white; }
.list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.item { width: 100%; text-align: left; font-weight: 400; }
.item.on { border-color: var(--blue); background: rgb(19 89 139 / .08); }
.questions li { padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.questions li.neutral { opacity: .6; }
.sentence-small { margin: 0; font-weight: 600; }
.editor { background: var(--gray-50); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.roster { width: 100%; border-collapse: collapse; }
.roster th, .roster td { text-align: left; padding: 8px; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
.roster thead th { font-size: .85rem; color: var(--gray-600); }
.roster tr.suspended { background: rgb(128 0 32 / .06); }
.roster tr.alerting { animation: blink 1s steps(2) infinite; }
@keyframes blink { 0% { background: rgb(176 0 32 / .35); } 50% { background: rgb(176 0 32 / .08); } }
@media (prefers-reduced-motion: reduce) { .roster tr.alerting { animation: none; background: rgb(176 0 32 / .3); } }
.incidents { margin: 0; padding-left: 1em; font-size: .85rem; }
.incidents li.new { color: var(--red); font-weight: 700; }
.online { color: #1a7f37; } .offline { color: var(--red); }
.ok-pill { padding: 6px 12px; border-radius: 999px; background: rgb(26 127 55 / .12); color: #1a7f37; font-weight: 600; }
.alert-banner { position: sticky; top: 0; z-index: 10; background: var(--red); color: white; padding: 14px 20px; font-size: 1.1rem; }
.link-banner { background: var(--burgundy); color: white; padding: 10px 20px; font-weight: 600; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; margin-top: 16px; }
.slip { border: 1px dashed var(--gray-600); padding: 14px; text-align: center; break-inside: avoid; }
.slip p { margin: 4px 0; }
.slip-name { font-weight: 700; font-size: 1.1rem; }
.slip-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; letter-spacing: .15em; }
.print-only { display: none; }

@media print {
  .no-print, .bar, .alert-banner, .link-banner, .notice { display: none !important; }
  body { background: white; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-only { display: block; }
  .copy { break-after: page; }
}
