:root {
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #27211e;
  background: #f6f1e9;
  --ink: #27211e;
  --quiet: #665852;
  --accent: #a72b24;
  --line: #ded4ca;
  --surface: #fffdfa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.top { background: var(--ink); color: #fffdfa; }
.top-inner { max-width: 76rem; margin: auto; display: flex; flex-wrap: wrap; gap: .45rem 1.35rem; align-items: center; padding: 1rem clamp(1rem, 5vw, 2.6rem); }
.brand { color: #fffdfa; font-size: 1.3rem; font-weight: 900; letter-spacing: .07em; text-decoration: none; }
.brand span { color: #ffa89a; }
.top-label { font-size: .88rem; color: #f0ded3; }
main { width: min(calc(100% - 2rem), 49rem); margin: clamp(1.5rem, 5vw, 4rem) auto; }
main:has(.director-nav) { width: min(calc(100% - 2rem), 70rem); }
.card { border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--line); padding: clamp(1.1rem, 4vw, 2.5rem); box-shadow: 0 .5rem 2rem #3827190b; }
h1 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4.5vw, 2.65rem); line-height: 1.06; letter-spacing: -.04em; overflow-wrap: anywhere; }
p { margin: 0 0 1rem; }
.quiet { color: var(--quiet); }
a { color: var(--accent); text-underline-offset: .2em; font-weight: 650; }
.form { display: grid; gap: 1rem; max-width: 38rem; }
.form > button { justify-self: start; }
label { display: grid; gap: .35rem; font-weight: 650; }
input:not([type=radio]), select { width: 100%; min-width: 0; min-height: 2.9rem; border: 1px solid #a9998e; border-radius: .6rem; color: var(--ink); background: #fff; padding: .55rem .75rem; font: inherit; font-weight: 400; }
button { background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: .6rem; padding: .63rem 1rem; min-height: 2.9rem; cursor: pointer; font: inherit; font-weight: 700; }
button:hover { background: #8d231c; }
button.secondary { color: var(--ink); border-color: #a9998e; background: #fffdfa; }
button.secondary:hover { background: #eee4d9; }
:focus-visible { outline: 3px solid #1e6c83; outline-offset: 2px; }
.actions { display: flex; align-items: center; gap: .65rem 1rem; flex-wrap: wrap; }
.director-nav { padding: 0 0 1rem; }
.director-nav form { margin-left: auto; }
.alert { color: #8c2019; background: #fbe7e3; padding: .7rem; border-radius: .4rem; }
.progress { display: grid; gap: .3rem; font-size: .85rem; color: var(--quiet); margin-bottom: 1rem; }
.quiz-time { color: var(--quiet); font-variant-numeric: tabular-nums; }
progress { width: 100%; height: .78rem; accent-color: var(--accent); }
fieldset { padding: 1rem 0 .6rem; min-width: 0; margin: 1.3rem 0; border: 0; border-bottom: 1px solid var(--line); }
legend { padding: 0; font-size: clamp(1.12rem, 3vw, 1.45rem); font-weight: 750; line-height: 1.35; width: 100%; }
.question-number { display: block; margin-bottom: .45rem; font-size: .83rem; color: var(--quiet); font-weight: 650; }
[data-quiz][data-enhanced] .question-number { font-size: 0; margin: 0; }
.option { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--line); border-radius: .6rem; padding: .65rem .7rem; margin: 0 0 .55rem; min-height: 2.8rem; font-weight: 500; background: #fff; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: #fff0eb; }
.option input { accent-color: var(--accent); margin: 0; flex: 0 0 1rem; height: 1rem; width: 1rem; }
.short { padding-bottom: .55rem; }
.filter { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-bottom: 1rem; }
.filter label { flex: 0 1 18rem; }
.scroll { overflow-x: auto; margin-block: 1rem; }
table { width: 100%; border-collapse: collapse; background: #fff; }
td, th { text-align: left; vertical-align: top; padding: .7rem .8rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { background: #f1e7dc; }
td:last-child, th:last-child { min-width: 5rem; }
.ok { color: #226345; font-weight: 700; }
.wrong { color: #992921; font-weight: 700; }
