/* Theme styles stay screen-only so printing always uses the light palette. */
.nav { align-items: center; }
button.theme-toggle {
  padding: 7px 11px;
  min-height: 40px;
  font-size: 14px;
  white-space: nowrap;
}
.theme-toggle [data-theme-icon] { font-size: 20px; line-height: 1; }
@media screen and (max-width: 600px) {
  .chapter { overflow-wrap: break-word; }
}
@media screen {
  :root { color-scheme: light; }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #121b18;
    --card: #1c2822;
    --ink: #e6ece5;
    --muted: #b3c4b9;
    --line: #405449;
    --green: #9bd5b5;
    --light: #293e32;
    --orange: #ffb38b;
    --good: #98e2b5;
    --bad: #ffaaa1;
  }
  [data-theme="dark"] button,
  [data-theme="dark"] .button,
  [data-theme="dark"] .brand-mark,
  [data-theme="dark"] .question-links a.done {
    background: #2d745b;
    color: #fff;
    border-color: #72ae8f;
  }
  [data-theme="dark"] button:hover,
  [data-theme="dark"] .button:hover { background: #245e49; }
  [data-theme="dark"] button.secondary,
  [data-theme="dark"] .button.secondary {
    background: transparent;
    color: var(--green);
    border-color: var(--line);
  }
  [data-theme="dark"] button.secondary:hover,
  [data-theme="dark"] .button.secondary:hover { background: var(--light); }
  [data-theme="dark"] button.theme-toggle[aria-pressed="true"] {
    background: var(--light);
    border-color: #72ae8f;
  }
  [data-theme="dark"] button.danger {
    color: var(--bad);
    background: transparent;
    border-color: #a26e65;
  }
  [data-theme="dark"] input,
  [data-theme="dark"] select,
  [data-theme="dark"] textarea {
    color: var(--ink);
    background: #131e18;
    border-color: #829b89;
  }
  [data-theme="dark"] input::placeholder,
  [data-theme="dark"] textarea::placeholder { color: #a8baad; }
  [data-theme="dark"] .hero-card,
  [data-theme="dark"] .result { background: #204b3c; color: #fffefa; }
  [data-theme="dark"] .result .button { background: var(--light); color: var(--ink); }
  [data-theme="dark"] .notice { background: #382d1e; border-color: #d89d50; }
  [data-theme="dark"] details { background: #26372c; }
  [data-theme="dark"] .card-number { color: #a6c4af; }
  [data-theme="dark"] .question-links a:not(.done),
  [data-theme="dark"] .skip { background: var(--card); }
}
@media print {
  :root { color-scheme: light; background: white; }
  .theme-toggle { display: none !important; }
}
