:root {
  color-scheme: light;
  font: 16px ui-monospace, "SFMono-Regular", Consolas, monospace;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --field: #fff8f0;
  --text: #292929;
  --muted: #4b4b4b;
  --line: #b8b8b8;
  --dot: #d6d6d6;
  --shadow: #404041;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1b1b1b;
    --surface: #262626;
    --field: #302b27;
    --text: #f7f7f7;
    --muted: #dddddd;
    --line: #666666;
    --dot: #414141;
    --shadow: #090909;
  }
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: radial-gradient(var(--dot) 1px, var(--bg) 1px) 0 0 / 18px 18px; }
.shell { width: min(100% - 32px, 780px); margin: 36px auto; }
.masthead, .panel { padding: 28px 30px; background: var(--surface); border: 3px dotted #f48120; box-shadow: 7px 7px var(--shadow); }
.masthead { margin-bottom: 25px; }
.tag, .count { display: inline-block; padding: 5px 8px; background: #f48120; color: #191919; font-size: .875rem; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 14px 0; }
h2 { font-size: 1.25rem; margin: 0; }
p { line-height: 1.55; color: var(--muted); }
.masthead p { max-width: 58ch; margin-bottom: 0; }
.cursor { color: #f48120; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.name-field { display: grid; gap: 9px; margin-bottom: 24px; }
label { font-weight: 700; }
input, select, button { min-height: 48px; font: inherit; border-radius: 0; }
input, select { width: 100%; padding: 10px 13px; color: var(--text); background: var(--surface); border: 2px solid var(--line); }
input::placeholder { color: var(--muted); }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23f48120' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
:focus-visible { outline: 3px solid #f48120; outline-offset: 3px; }
.questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.question { display: grid; gap: 10px; padding: 16px; background: var(--field); border: 1px solid var(--line); }
button { cursor: pointer; padding: 10px 20px; color: #191919; background: #f48120; border: 2px solid #191919; font-weight: 800; box-shadow: 4px 4px var(--shadow); }
button:hover { background: #faad3f; }
button:disabled { opacity: .6; cursor: wait; }
#submit-button { width: 100%; margin-top: 24px; border: 3px dotted #191919; }
.message { margin: 20px 0 0; }
.result { border-top: 1px solid var(--line); padding-top: 22px; }
.result h2 { font-size: 1.5rem; }
.result ul { list-style: none; display: grid; gap: 10px; padding: 0; margin: 22px 0; }
.result li { padding: 12px 15px; line-height: 1.5; background: var(--field); border-left: 4px solid #f48120; }
.result li.correct { border-color: #21835a; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 20px 2px; color: var(--muted); font-size: .875rem; }
[hidden] { display: none !important; }

@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 780px); margin: 18px auto; }
  .masthead, .panel { padding: 22px 18px; box-shadow: 5px 5px var(--shadow); }
  .questions { grid-template-columns: 1fr; }
}
