/* Light-only, and now it has to say so: the figures are transparent PNGs of
   near-black ink, so a browser force-darkening the page would composite them
   to invisible. Upstream guards the EPUBs with a white plate behind every
   image; here the page itself opts out, which also keeps the plate from
   showing as a white rectangle on the off-white background. */
:root {
  color-scheme: only light;
}

body {
  max-width: 40em;
  margin: 3em auto;
  padding: 0 1.25em;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
  color: #1a1a1a;
  background: #fdfdfb;
}
a { color: #1a4d8f; }

nav.top {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: 0.85em;
  margin-bottom: 2em;
}

h1 {
  font-size: 1.9em;
  margin-bottom: 0.3em;
}
h2 { font-size: 1.4em; }
h3 { font-size: 1.15em; }

.chapter-meta {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: 0.8em;
  color: #7a4a00;
  background: #fdf1d6;
  border: 1px solid #e8c477;
  border-radius: 3px;
  padding: 0.4em 0.7em;
  margin: 0 0 2em;
}

img {
  max-width: 100%;
  height: auto;
}

/* The living resource pages (/template, /further-reading) carry tables and
   fenced blocks. No chapter uses either, so this is the first styling for
   both — without it markdown-it's bare <table> renders as unaligned runs
   of text. */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  font-size: 0.95em;
}
th,
td {
  border-bottom: 1px solid #ddd;
  padding: 0.5em 0.7em 0.5em 0;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: 0.8em;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #555;
  border-bottom: 2px solid #ccc;
}
/* Every table here is short labels against one wide prose column, and
   the browser's automatic widths starve the labels: "Session lead" and
   "Read-back" both break in half. Keep the label column intact and let
   the prose column take what's left. */
td:first-child {
  white-space: nowrap;
  padding-right: 1em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre {
  background: #f6f5f1;
  border: 1px solid #e3e0d8;
  border-radius: 4px;
  padding: 0.9em 1em;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.45;
}
p code,
li code,
td code {
  background: #f6f5f1;
  border: 1px solid #e3e0d8;
  border-radius: 3px;
  padding: 0.05em 0.3em;
  font-size: 0.9em;
}

/* A blockquote in this manuscript is a takeaway, not a quotation: the
   chapter's one portable line. Upstream sets them centred and upright,
   because italic is the epigraph register, so the old quotation styling
   (left rule, grey) would have said the wrong thing about them. */
blockquote {
  margin: 2em 0;
  text-align: center;
  font-size: 1.05em;
  color: #1a1a1a;
}
blockquote p {
  margin: 0;
}

/* The register the blockquote vacated. These are genuine quotation, the
   sentences the driver types on the shared screen in Appendix C, and they
   arrive as a pandoc fenced div that reader.js converts. */
.spec {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 3px solid #ddd;
  color: #444;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2.5em 0;
}

.footnotes {
  font-size: 0.85em;
  color: #444;
}
.footnotes-sep {
  margin-top: 3em;
}

.chapter-nav {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid #ddd;
}
.chapter-nav .next { margin-left: auto; text-align: right; }

footer {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  font-size: 0.85em;
  color: #666;
  margin-top: 3em;
}

.reader-error {
  font-family: -apple-system, Helvetica, Arial, sans-serif;
  color: #8a1f1f;
}
