:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6862;
  --line: #e2ded5;
  --accent: #1f5f5b;
  --accent-ink: #ffffff;
  --good: #2f6b3a;
  --good-bg: #e7f0e4;
  --bad: #9a3324;
  --bad-bg: #f6e5e1;
  --radius: 12px;
  --serif: "Iowan Old Style", "Charter", "Georgia", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1d1d1b;
    --text: #ecebe6;
    --muted: #a19e96;
    --line: #34332f;
    --accent: #6fb7ad;
    --accent-ink: #0f1a19;
    --good: #9ccf9f;
    --good-bg: #1f2e21;
    --bad: #f0a493;
    --bad-bg: #36211c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--sans);
  min-height: 100dvh;
}
main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 28px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 2rem; line-height: 1.15; }
h2 { font-size: 1.45rem; line-height: 1.25; }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stack > * + * { margin-top: 14px; }
.spacer { flex: 1; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 26px; }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }

.options { display: grid; gap: 10px; margin-top: 22px; }
.opt {
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  min-height: 52px;
}
.opt:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt[disabled] { cursor: default; }
.opt.correct { border-color: var(--good); background: var(--good-bg); color: var(--good); font-weight: 600; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }

.feedback {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.feedback .verdict { font-weight: 600; margin-bottom: 6px; }
.feedback .verdict.good { color: var(--good); }
.feedback .verdict.bad { color: var(--bad); }
.feedback a { display: inline-block; margin-top: 8px; font-size: 0.9rem; }

.btn {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius);
  padding: 15px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  margin-top: 22px;
  text-align: center;
  text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat b { display: block; font-size: 1.4rem; font-family: var(--serif); }
.stat span { font-size: 0.78rem; color: var(--muted); }

.say { list-style: none; padding: 0; margin: 0; }
.say li { padding: 14px 0; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.08rem; }
.say li:last-child { border-bottom: 1px solid var(--line); }
.sources { padding-left: 18px; margin: 0; }
.sources li { margin: 6px 0; font-size: 0.9rem; word-break: break-word; }
.tag { display: inline-block; font-size: 0.72rem; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
