:root {
  --bg: #f5f4f1;
  --surface: #fff;
  --ink: #15120d;
  --muted: #5a554c;
  --line: #e4e1da;
  --red: #da2828;
  --red-ink: #b21f1f;
  --red-wash: #fcedec;
  --green: #176c45;
  --green-wash: #e9f5ee;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.top { position: sticky; top: 0; z-index: 2; background: #f5f4f1ed; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1160px; min-height: 62px; margin: auto; padding: 10px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 750; }
.mark { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; background: var(--red); color: white; }
.context, .brand-divider { color: var(--muted); font-size: 13px; }
.timer { display: flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; font-size: 13px; white-space: nowrap; }
.timer time { font: 700 16px var(--mono); font-variant-numeric: tabular-nums; }
.timer[data-low="true"] { background: var(--red-wash); color: var(--red-ink); border-color: #efbdbb; }
main { max-width: 1160px; margin: 36px auto; padding: 0 24px 36px; }
.sheet { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; }
.entrance { max-width: 625px; margin: 60px auto 0; padding: clamp(22px, 5vw, 40px); }
.entrance, .question { animation: appear .2s ease-out; }
@keyframes appear { from { opacity: .55; transform: translateY(4px); } }
h1, h2 { font-family: var(--display); line-height: 1.23; margin: 0; }
.entrance h1 { font-size: clamp(25px, 4vw, 34px); letter-spacing: -.025em; }
.intro { color: var(--muted); margin: 10px 0 20px; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 24px; gap: 10px; border-block: 1px solid var(--line); padding: 14px 0; }
.rules dt { color: var(--muted); font-size: 12px; }
.rules dd { margin: 0; font-weight: 700; }
.names { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
#enter label { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin-bottom: 16px; font-weight: 600; }
#enter input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; color: var(--ink); background: var(--surface); font-weight: 400; }
.primary, .secondary { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 16px; background: var(--surface); color: var(--ink); font-weight: 650; transition: background .14s ease; }
.primary { background: var(--red); border-color: var(--red); color: white; }
.primary:hover:enabled { background: var(--red-ink); border-color: var(--red-ink); }
.secondary:hover:enabled { background: var(--bg); }
.quiz-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 32px; }
.navigation { position: sticky; top: 86px; padding: 18px; }
.navigation h2 { font-size: 15px; margin-bottom: 13px; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.steps button { border: 1px solid var(--line); border-radius: 7px; min-height: 34px; background: var(--surface); color: var(--muted); font: 650 13px var(--mono); }
.steps button:hover { background: var(--bg); }
.steps button[data-answered="true"] { background: var(--green-wash); color: var(--green); }
.steps button[aria-current="step"] { color: var(--red-ink); background: var(--red-wash); border-color: var(--red); }
.progress-label { color: var(--muted); margin-top: 14px; font-size: 13px; }
progress { display: block; width: 100%; height: 7px; margin-top: 7px; border: 0; border-radius: 8px; overflow: hidden; background: var(--bg); accent-color: var(--red); }
progress::-webkit-progress-bar { background: var(--bg); }
progress::-webkit-progress-value { background: var(--red); transition: width .2s ease; }
progress::-moz-progress-bar { background: var(--red); }
.question { padding: clamp(18px, 4vw, 32px); }
.question-meta { font: 13px var(--mono); color: var(--muted); margin-bottom: 10px; }
.question h1 { font-size: clamp(20px, 3.2vw, 27px); }
.question fieldset { display: grid; gap: 8px; margin: 22px 0; border: 0; padding: 0; min-width: 0; }
.choice { display: flex; align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; cursor: pointer; }
.choice:hover { background: var(--bg); }
.choice:has(:checked) { background: var(--red-wash); border-color: #efbdbb; }
.choice input { margin: 5px 0 0; accent-color: var(--red); }
.choice input:disabled { cursor: default; }
.choice .letter { flex: 0 0 auto; font-weight: 700; }
.controls { display: flex; justify-content: space-between; gap: 10px; }
.finish { display: block; color: var(--red-ink); background: none; border: 0; padding: 8px 0; margin: 12px 0 0 auto; text-decoration: underline; text-underline-offset: 3px; }
.glossary { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; color: var(--muted); font-size: 13px; }
.glossary summary { width: fit-content; cursor: pointer; }
.glossary dl { margin: 12px 0 0; display: grid; gap: 8px; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0; }
.feedback { max-width: 625px; padding: 0 2px; margin: 12px auto; color: var(--muted); }
.feedback[data-error="true"] { color: var(--red-ink); }
.reconnect { display: block; margin: auto; }
.result h1[data-passed="true"] { color: var(--green); }
.score { font-family: var(--display); font-weight: 750; font-size: clamp(28px, 5vw, 48px); margin: 8px 0 22px; }
dialog { width: min(450px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 14px; padding: 24px; color: var(--ink); }
dialog::backdrop { background: #15120d59; }
dialog h2 { font-size: 22px; }
dialog p { margin: 10px 0 20px; color: var(--muted); }
@media (max-width: 760px) {
  main { margin-top: 20px; padding-inline: 14px; }
  .top-inner { padding-inline: 14px; }
  .quiz-layout { grid-template-columns: 1fr; gap: 14px; }
  .navigation { position: static; padding: 12px; }
  .steps { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .entrance { margin-top: 27px; }
}
@media (max-width: 460px) {
  .context, .brand-divider, .timer span { display: none; }
  .steps { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
  .names { grid-template-columns: 1fr; gap: 0; }
  .rules dd { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
