:root {
  font: 16px/1.5 system-ui, sans-serif;
  color-scheme: light dark;
  --background: #f7f7f3;
  --panel: #fff;
  --ink: #172525;
  --muted: #486160;
  --accent: #195d57;
  --on-accent: #fff;
  --border: #c1d0ce;
  --correct: #e5f4e8;
  --wrong: #f9e8e5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #151a1c;
    --panel: #20282a;
    --ink: #eef5f4;
    --muted: #b1c6c5;
    --accent: #a5d9ce;
    --on-accent: #142524;
    --border: #455859;
    --correct: #263f33;
    --wrong: #4a302d;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
header, main { margin-inline: auto; width: min(1120px, calc(100% - 32px)); }
header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 15px 0; border-bottom: 1px solid var(--border); }
header strong { font-size: 1.15rem; }
main { padding: 20px 0 40px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.15; margin-bottom: .4em; }
h2 { font-size: 1.1rem; overflow-wrap: anywhere; }
p { margin-bottom: 12px; }
.question + img { margin-top: 12px; }
a { color: var(--accent); }
button, input { font: inherit; }
button { color: var(--ink); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; min-height: 44px; padding: 7px 13px; cursor: pointer; }
button:not(:disabled):hover { border-color: var(--accent); }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 650; }
.muted { color: var(--muted); }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: clamp(14px, 2.5vw, 24px); margin-top: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.download-info { flex: 1 1 260px; }
.download-info p { margin: 3px 0; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.choice { display: flex; align-items: flex-start; gap: 9px; text-align: left; overflow-wrap: anywhere; }
.choice > span { min-width: 0; }
.choice.correct { background: var(--correct); border-color: var(--accent); }
.choice.wrong { background: var(--wrong); border-style: dashed; }
.question { margin-top: 16px; font-size: clamp(1.2rem, 2.5vw, 1.75rem); white-space: pre-wrap; }
img { display: block; max-width: 100%; max-height: 300px; border-radius: 8px; object-fit: contain; }
.choice img { max-height: 160px; }
input { width: 100%; max-width: 110px; min-height: 44px; padding-inline: 7px; }
label { display: grid; gap: 4px; }
#timer { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
