:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --surface: #fff;
  --text: #08090a;
  --muted: #595963;
  --border: #dcdce0;
  --green: #00744a;
  --green-soft: #ecf6f1;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090a;
  --surface: #101113;
  --text: #f7f8f8;
  --muted: #b1b1ba;
  --border: #2e2f33;
  --green: #38b780;
  --green-soft: #12291f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #08090a;
    --surface: #101113;
    --text: #f7f8f8;
    --muted: #b1b1ba;
    --border: #2e2f33;
    --green: #38b780;
    --green-soft: #12291f;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.wrap { max-width: 850px; margin: auto; padding: 24px; }
a { color: var(--green); text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.skip-link { position: absolute; top: -100px; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 650; text-decoration: none; }
/* Match the quiz header's theme icon control. */
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease; padding: 0; flex-shrink: 0; }
.icon-btn:hover { background: var(--green-soft); color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; }
.intro { margin: 36px 0 28px; }
.eyebrow { font-size: 12px; font-weight: 650; color: var(--green); }
h1 { max-width: 700px; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -0.035em; margin: 12px 0 20px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.02em; }
h3 { font-size: 18px; line-height: 1.45; margin: 12px 0 16px; }
p { margin: 12px 0; }
.intro > p:not(.eyebrow), .topic-intro { color: var(--muted); }
.notice { padding: 16px 18px; border-left: 3px solid var(--green); background: var(--green-soft); font-size: 14px; }
.topic-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.topic-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-decoration: none; font-weight: 600; }
.topic-links span { color: var(--muted); font-size: 12px; }
#topics > p { font-size: 14px; }
section { margin-top: 48px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading span, .question-meta { font-size: 12px; color: var(--muted); }
.question { background: var(--surface); padding: 24px; border: 1px solid var(--border); border-radius: 12px; margin: 20px 0; scroll-margin-top: 20px; }
.question-meta { margin-top: 0; }
.sign-wrap { width: 160px; padding: 18px; margin: 16px 0; background: #fff; border: 1px solid #dcdce0; border-radius: 8px; }
.sign-wrap img, .sign-wrap svg { display: block; width: 100%; height: auto; max-height: 130px; }
.sign-wrap:has(.diagram-image) { width: min(100%, 320px); }
.sign-wrap img.diagram-image { max-height: none; }
.answer-options { padding-left: 24px; }
.answer-options li { margin: 6px 0; padding-left: 4px; }
.answer { background: var(--green-soft); padding: 12px 16px; border-radius: 8px; color: var(--text); }
.explanation { color: var(--muted); }
.question-source { font-size: 13px; }
.section-end { font-size: 14px; }
.source-list { padding-left: 22px; }
.source-list li { margin: 16px 0; }
footer { padding: 32px 0 12px; margin-top: 32px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
@media (max-width: 480px) {
  .wrap { padding: 16px; }
  .intro { margin-top: 28px; }
  .topic-links { grid-template-columns: 1fr; }
  .question { padding: 18px; }
  h2 { font-size: 21px; }
  h3 { font-size: 17px; }
  .section-heading { flex-wrap: wrap; gap: 4px; }
  .sign-wrap { width: 146px; }
}

/* About page */
.intro-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 18px 0; }
.intro-links a { padding: 8px 0; }
.about-faq { margin-top: 28px; }
.faq-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.faq-item h3 { margin: 0 0 8px; }
.faq-item p { margin: 0; color: var(--muted); }
.source-note { font-size: 13px; }
