/* Recap and topic pages: plain reading pages in the lesson's colours. They load no scripts. */
:root {
  color-scheme: light;
  --paper: #f7f3ec;
  --card: #fffdf9;
  --ink: #1f1a16;
  --ink-2: #463b32;
  --muted: #64574b;
  --line: #d9cdbd;
  --accent: #9a3d2f;
  --accent-soft: #f3e0d9;
  --term-bg: #1f1b18;
  --term-ink: #f4ede4;
  --radius: 0.6rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

.site,
.site-foot {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 16px;
}

.site a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-foot {
  color: var(--muted);
  font-size: 0.9rem;
}

.doc {
  display: grid;
  gap: 1.25rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 16px 2rem;
}

.doc > * {
  margin: 0;
}

.kicker {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

section {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

section > :last-child {
  margin-bottom: 0;
}

.takeaway {
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}

.lede {
  font-size: 1.1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.button {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #7d2f23;
}

ol,
ul {
  margin: 0;
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.35rem;
}

.steps a {
  color: var(--ink);
  text-decoration: none;
}

.steps a:hover {
  text-decoration: underline;
}

.step-label {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.copies {
  columns: 2 14rem;
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

pre {
  margin: 0.35rem 0 0;
  padding: 0.6rem 0.75rem;
  overflow-x: auto;
  border-radius: 0.35rem;
  background: var(--term-bg);
  color: var(--term-ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.commands li p,
.commands li pre {
  margin: 0;
}

.sources a {
  display: inline-block;
  min-height: 24px;
}

/* Printed recaps: one clean page, with the link targets written out. */
@media print {
  body {
    background: #ffffff;
    font-size: 11pt;
  }

  .site,
  .actions,
  .keep-going,
  .site-foot {
    display: none;
  }

  section {
    padding: 0;
    border: 0;
    break-inside: avoid;
  }

  .doc {
    gap: 0.8rem;
    padding: 0;
  }

  .steps a::after {
    content: none;
  }

  pre {
    border: 1px solid #999999;
    background: #ffffff;
    color: #000000;
  }
}
