/* The lessons site (learn/README.md): the documentation site's type and colours (site/assets/site.css), light and dark.
   The lessons under lessons/ may link it too: <link rel="stylesheet" href="/assets/learn.css">. */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/jost-latin-wght-normal.woff2") format("woff2");
}
:root {
  --page: #ffffff; --surface: #f4f4f5; --line: #eaeaec; --line-strong: #d3d3d3;
  --heading: #111518; --text: #3f4245; --muted: #6d7072;
  --accent: #a8977b; --accent-ink: #7f715c; --on-accent: #ffffff; --error: #b42318;
  --radius: 4px; --radius-lg: 10px; --maxw: 820px;
  --font: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #111518; --surface: #1a1f24; --line: #2a3138; --line-strong: #3a424a;
    --heading: #f4f5f6; --text: #d7dade; --muted: #a3a8ad;
    --accent: #c9b99c; --accent-ink: #c9b99c; --on-accent: #111518; --error: #ff8f80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #111518; --surface: #1a1f24; --line: #2a3138; --line-strong: #3a424a;
  --heading: #f4f5f6; --text: #d7dade; --muted: #a3a8ad;
  --accent: #c9b99c; --accent-ink: #c9b99c; --on-accent: #111518; --error: #ff8f80;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.6 var(--font); }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--heading); font-weight: 600; line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 16px; }
code, pre { font-family: var(--mono); font-size: 0.9em; background: var(--surface); border-radius: var(--radius); }
code { padding: 1px 5px; }
pre { padding: 12px 14px; overflow-x: auto; }
img, video { max-width: 100%; height: auto; }
.top { border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.top .brand { color: var(--heading); font-weight: 600; text-decoration: none; letter-spacing: 0.02em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 32px 16px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
label { font-weight: 500; color: var(--heading); }
textarea { width: 100%; font: 14px/1.4 var(--mono); padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--page); color: var(--text); resize: vertical; }
button { font: inherit; font-weight: 500; padding: 8px 18px; border-radius: var(--radius); border: 1px solid var(--accent-ink); background: var(--accent-ink); color: var(--on-accent); cursor: pointer; align-self: flex-start; }
button.secondary { background: transparent; color: var(--accent-ink); }
form + form { margin-top: 10px; }
.error { color: var(--error); font-weight: 500; }
.muted { color: var(--muted); }
.lessons { list-style: none; padding: 0; display: grid; gap: 12px; }
.lessons li { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; }
.lessons li a { font-weight: 600; }
.badge { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* ---- lesson pages (lessons/m*/): a module's steps, callouts, the pager ---------------------------------------- */
.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 6px; }
.crumbs a { color: var(--muted); }
.lede { font-size: 1.1rem; color: var(--heading); }
.goals { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 20px 0; }
.goals h2 { font-size: 1rem; margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.goals ul { margin: 0; padding-left: 20px; }
.callout { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 16px; margin: 18px 0; background: var(--surface); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout .label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }
.callout.sim .label::before { content: "▶ "; }
.callout.warn { border-color: var(--error); }
.callout.warn .label { color: var(--error); }
kbd { font-family: var(--mono); font-size: 0.85em; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--radius); background: var(--page); }
pre code { background: none; padding: 0; }
.out { border-left: 3px solid var(--line-strong); }
.out::before { content: "Terminal"; display: block; font: 600 0.72rem/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
figure { margin: 18px 0; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
figure img { border: 1px solid var(--line); border-radius: var(--radius-lg); }
details { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 16px; margin: 14px 0; }
details > summary { cursor: pointer; font-weight: 600; color: var(--heading); }
details[open] > summary { margin-bottom: 8px; }
table.ref { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 0.95rem; }
table.ref th, table.ref td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ref th { color: var(--heading); font-weight: 600; }
.steps { padding-left: 22px; }
.steps > li { margin: 8px 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; }
.pager a { text-decoration: none; font-weight: 500; }
.pager .next { margin-left: auto; text-align: right; }
.pager small { display: block; color: var(--muted); font-weight: 400; }
.toc { counter-reset: lesson; list-style: none; padding: 0; display: grid; gap: 10px; }
.toc li { counter-increment: lesson; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 16px 12px 52px; position: relative; }
.toc li::before { content: counter(lesson); position: absolute; left: 16px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-ink); color: var(--on-accent); font-size: 0.85rem; font-weight: 600; display: grid; place-items: center; }
.toc li a { font-weight: 600; }
.toc li span { display: block; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 520px) { body { font-size: 16px; } h1 { font-size: 1.6rem; } }
figure img.narrow { max-width: 300px; }
