:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #5b6168;
  --line: #dcd8cf;
  --accent: #1d5c63;
  --accent-soft: #e3efef;
  --warn: #8a4b08;
  --warn-soft: #fbefdf;
  --measure: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181b; --surface: #1d2126; --ink: #e8e6e1; --muted: #a3a9b0; --line: #343a41;
    --accent: #7cc4c9; --accent-soft: #1f3337; --warn: #f0b46a; --warn-soft: #3a2c1b;
  }
}
:root[data-theme="dark"] {
  --bg: #15181b; --surface: #1d2126; --ink: #e8e6e1; --muted: #a3a9b0; --line: #343a41;
  --accent: #7cc4c9; --accent-soft: #1f3337; --warn: #f0b46a; --warn-soft: #3a2c1b;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 1rem/1.6 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }
main { max-width: var(--measure); margin: 0 auto; padding: 1.5rem 16px 3rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.25rem; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
th, td { border-bottom: 1px solid var(--line); padding: 0.4rem 0.5rem; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
blockquote { margin: 1rem 0; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
blockquote p { margin: 0.25rem 0; }
code { font-size: 0.9em; }
.callout, .note { background: var(--accent-soft); padding: 0.75rem 1rem; border-radius: 6px; }
.warn { background: var(--warn-soft); color: var(--ink); padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid var(--warn); }
.write-in { display: block; border-bottom: 1px solid var(--muted); height: 2.2rem; }

header.site {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: baseline;
  padding: 0.75rem 16px; border-bottom: 1px solid var(--line); background: var(--surface);
}
header.site .brand { font-weight: 700; color: var(--ink); text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.9rem; }
header.site nav a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
footer.site { max-width: var(--measure); margin: 0 auto; padding: 1rem 16px 2rem; color: var(--muted); font-size: 0.85rem; }

/* Slides: one at a time on screen (slides.js), every slide on its own page in print. */
body.slides main { max-width: none; padding: 0; }
.deck .slide {
  min-height: calc(100vh - 3.5rem); padding: 6vh 8vw; display: flex; flex-direction: column; justify-content: center;
  font-size: clamp(1.1rem, 2.4vw, 2rem); border-bottom: 1px solid var(--line);
}
.deck .slide h1 { font-size: 2.2em; }
.deck .slide h2 { font-size: 1.6em; border: 0; margin-top: 0; }
.js .deck .slide { display: none; border: 0; }
.js .deck .slide.current { display: flex; }
.deck .notes { display: none; }
.show-notes .deck .notes { display: block; font-size: 0.6em; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 2rem; padding-top: 0.5rem; }
.deck-help { position: fixed; right: 12px; bottom: 8px; font-size: 0.8rem; color: var(--muted); }

@media print {
  /* Paper is always light, whatever the screen theme. */
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #bbb;
    --accent: #000; --accent-soft: #f1f1f1; --warn: #000; --warn-soft: #f6f0e6;
  }
  @page { size: letter; margin: 0.6in; }
  @page deck { size: letter landscape; margin: 0.3in; }
  html { font-size: 11pt; }
  body { background: #fff; color: #000; }
  header.site, footer.site, .deck-help { display: none; }
  main { max-width: none; padding: 0; }
  a { color: #000; }
  h2 { break-after: avoid; }
  .page-break { break-before: page; }
  .deck .slide, .js .deck .slide {
    display: flex; page: deck; min-height: 0; height: 7in; break-after: page; border: 0; padding: 0.4in 0.6in;
    font-size: 24pt;
  }
}
