:root {
  --bg: #fbfcfa;
  --surface: #eef3ee;
  --text: #1c2420;
  --muted: #5b6862;
  --accent: #1f6f43;
  --accent-text: #ffffff;
  --border: #d6e0d8;
  --right: #1f7a3f;
  --right-bg: #e1f3e6;
  --wrong: #b3261e;
  --wrong-bg: #fbe4e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121714;
    --surface: #1b231e;
    --text: #e6ece8;
    --muted: #9aa8a0;
    --accent: #5fc58a;
    --accent-text: #0d1a12;
    --border: #2c3831;
    --right: #6fd394;
    --right-bg: #173323;
    --wrong: #f2a29c;
    --wrong-bg: #3a1c1a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1rem 0 0.5rem; }
h2 { font-size: 1.3rem; margin-top: 2rem; }
.site-header { border-bottom: 1px solid var(--border); padding: 12px 0; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.site-nav { display: flex; gap: 14px; font-size: 0.95rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 16px 0; font-size: 0.9rem; }
.muted, .crumbs, .meta { color: var(--muted); font-size: 0.9rem; }
.crumbs { margin-top: 12px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--muted); margin: 0; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 1.5rem 0; }
.feature h2 { margin: 0.25rem 0 0.5rem; }
.button, button.share, button.print {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px;
  padding: 10px 18px; text-decoration: none;
}
button.print { background: transparent; color: var(--accent); border: 1px solid var(--border); font-weight: 600; }
.positions { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.positions a {
  display: grid; gap: 2px; padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); text-decoration: none; color: var(--text);
}
.positions a:hover { border-color: var(--accent); }
.positions span { color: var(--muted); font-size: 0.85rem; }
.quiz-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.quiz-list a { font-weight: 700; }
.quiz-list p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.quiz { padding-left: 1.4rem; display: grid; gap: 18px; }
.question { padding-left: 4px; }
.q-text { font-weight: 700; margin: 0 0 8px; }
.choices { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice {
  width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px;
}
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice:disabled { cursor: default; }
.choice.right { background: var(--right-bg); border-color: var(--right); color: var(--right); font-weight: 700; }
.choice.wrong { background: var(--wrong-bg); border-color: var(--wrong); color: var(--wrong); }
.reveal { margin-top: 8px; }
.reveal summary { cursor: pointer; color: var(--accent); }
.reveal p { margin: 6px 0 0; }
.answer-line { color: var(--right); }
.result { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 1.5rem 0; }
.score { font-size: 1.3rem; font-weight: 800; margin: 0 0 10px; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { background: var(--surface); }
.print-only { display: none; }
@media print {
  .site-header, .site-footer, .crumbs, .reveal, .result, .tools, ins.adsbygoogle { display: none !important; }
  .print-only { display: block; break-before: page; }
  .choice { border: 0; background: none; padding: 2px 0; }
  .choices { list-style: upper-alpha; padding-left: 1.4rem; gap: 2px; }
  body { font-size: 12pt; }
}
