/* zerotogodhood.com. No JavaScript; one stylesheet. Code token colours are appended by build.py. */

@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/NotoSans.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/NotoSans-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --ink: #1b1b1f;
  --ink-soft: #3a3d44;
  --muted: #5d6169;
  --accent: #234e78;
  --accent-ink: #ffffff;
  --rule: #dcdee3;
  --code-bg: #f5f6f8;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 10%);
  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --measure: 70ch;
  --wrap: 1180px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --ink: #e8e9ec;
    --ink-soft: #c9ccd2;
    --muted: #9ba1aa;
    --accent: #8fb8e2;
    --accent-ink: #0f1115;
    --rule: #2b2f37;
    --code-bg: #171a20;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); font-weight: 750; margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 2.4rem 0 0.8rem; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 1.9rem 0 0.6rem; }
h4 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--accent); color: var(--accent-ink); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); margin-bottom: 1.2rem; }
.button {
  display: inline-block; padding: 0.7rem 1.25rem; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

/* header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; column-gap: 1.5rem; row-gap: 0.35rem; min-height: 4rem; flex-wrap: wrap; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.wordmark { font-weight: 750; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark span { color: var(--accent); }
.site-header nav { display: flex; gap: 1.4rem; }
@media (max-width: 480px) {
  .wrap { padding: 0 1.1rem; }
  .site-header .wrap { padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .site-header nav { gap: 1.1rem; }
  .hero { padding-top: 2.5rem; }
  .site-footer a { margin-left: 0; margin-right: 1.1rem; }
}
.site-header nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--accent); }
main { flex: 1 0 auto; width: 100%; }
.site-footer { border-top: 1px solid var(--rule); margin-top: 5rem; color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.6rem; padding-bottom: 2rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); margin-left: 1.2rem; }
.site-footer a:first-child { margin-left: 0; }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 1.6rem 0 0; font-size: 0.875rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--rule); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* covers: drawn in CSS to match the print covers */
.cover {
  container-type: inline-size;
  aspect-ratio: 3 / 4;
  background: #ffffff;
  color: #1b1b1f;
  border-radius: 3px 6px 6px 3px;
  box-shadow: var(--shadow), inset 3px 0 0 rgb(0 0 0 / 5%);
  font-family: var(--sans);
  line-height: 1.12;
  text-align: center;
  user-select: none;
}
/* cqi units resolve against .cover's content box, so the padding lives on this inner box. */
.cover-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  padding: 8cqi 9cqi;
}
.cover-inner > span { display: block; }
.cover-rule { width: 15cqi; height: max(2px, 0.45cqi); background: #234e78; }
.cover-rule:first-child { margin-bottom: auto; }
.cover-rule:last-child { margin-top: auto; }
.cover-lang { font-weight: 750; font-size: 11.5cqi; letter-spacing: -0.01em; }
.cover-series { font-weight: 750; font-size: 10cqi; color: #234e78; white-space: nowrap; letter-spacing: -0.015em; }
.cover-sub { font-size: 3.6cqi; color: #5d6169; margin-top: 5cqi; line-height: 1.4; max-width: 80cqi; }
.cover-author { font-weight: 700; font-size: 4cqi; margin-top: 11cqi; }
.cover-book { font-size: 3cqi; color: #5d6169; margin-top: 2cqi; }

/* home */
.hero { padding: 4.5rem 0 2.5rem; max-width: 52rem; }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4.4rem); letter-spacing: -0.025em; }
.hero .series { color: var(--accent); }
.hero .lead { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); }
.hero-desc { color: var(--muted); max-width: var(--measure); }
.books h2 { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 1.5rem; }
.book-card { display: flex; flex-direction: column; gap: 1.4rem; }
.book-card-cover { display: block; text-decoration: none; transition: transform 0.2s ease; }
.book-card-cover:hover { transform: translateY(-3px); }
.book-card h3 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.book-card h3 a { color: var(--ink); text-decoration: none; }
.book-card h3 a:hover { color: var(--accent); }
.book-card-sub { font-weight: 600; color: var(--ink-soft); }
.book-card p { margin-bottom: 0.7rem; }
.book-card-links { display: flex; gap: 1.2rem; font-weight: 600; font-size: 0.95rem; }
@media (max-width: 960px) {
  .book-grid { grid-template-columns: 1fr; gap: 3rem; }
  .book-card { flex-direction: row; align-items: flex-start; }
  .book-card-cover { flex: 0 0 min(40%, 220px); }
}
@media (max-width: 520px) {
  .book-card { flex-direction: column; }
  .book-card-cover { width: 70%; flex-basis: auto; }
}

/* book page */
.book-hero { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 3.5rem; align-items: center; padding: 2.5rem 0 3rem; border-bottom: 1px solid var(--rule); }
.book-hero .hook { color: var(--muted); max-width: var(--measure); }
.book-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 4rem; padding-top: 1rem; }
.book-side h2 { font-size: 1.1rem; }
.sample-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.sample-list a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; color: var(--ink); }
.sample-list a:hover { border-color: var(--accent); }
.sample-title { font-weight: 600; }
.sample-meta { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.vol-list { padding-left: 1.4rem; margin: 0; font-size: 0.95rem; }
.vol-list li { margin-bottom: 0.7rem; padding-left: 0.2rem; }
.vol-list li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.vol-title { display: block; font-weight: 600; }
.vol-detail { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 860px) {
  .book-hero { grid-template-columns: 1fr; gap: 2rem; }
  .book-hero-cover { max-width: 260px; }
  .book-body { grid-template-columns: 1fr; gap: 1rem; }
}

/* prose */
.prose { max-width: var(--measure); overflow-wrap: break-word; }
.prose a { overflow-wrap: anywhere; }
.prose.narrow { margin-top: 2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose blockquote { margin: 1.4rem 0; padding: 0.2rem 0 0.2rem 1.2rem; border-left: 3px solid var(--accent); color: var(--ink-soft); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { font-family: var(--mono); font-size: 0.86rem; line-height: 1.55; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem; overflow-x: auto; margin: 1.3rem 0; tab-size: 4; }
.prose :is(h1, h2, h3, h4) code { font-size: 0.9em; padding: 0 0.2em; }
.prose pre code { background: none; padding: 0; font-size: inherit; border-radius: 0; }
.prose div.sourceCode { margin: 1.3rem 0; }
.prose div.sourceCode pre { margin: 0; }
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.55; }
pre > code.sourceCode > span:empty { height: 1.2em; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
.table-wrap { overflow-x: auto; margin: 1.4rem 0; }
.prose table { border-collapse: collapse; font-size: 0.92rem; min-width: 100%; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 650; border-bottom-width: 2px; }
.prose math[display="block"] { display: block; overflow-x: auto; margin: 1.2rem 0; }

/* chapter page */
.chapter-layout { display: grid; grid-template-columns: 250px minmax(0, var(--measure)); gap: 4rem; justify-content: center; margin-top: 2rem; }
.chapter-side { position: relative; }
.toc { font-size: 0.875rem; line-height: 1.45; }
.toc-side { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; padding-bottom: 1rem; }
.toc-title, .toc summary { font-weight: 650; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.8rem; }
.toc summary { cursor: pointer; margin: 0; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc ul ul { padding-left: 0.9rem; margin: 0.3rem 0 0.5rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.toc-inline { display: none; border: 1px solid var(--rule); border-radius: 6px; padding: 0.8rem 1rem; margin: -0.8rem 0 2rem; }
.toc-inline[open] summary { margin-bottom: 0.8rem; }
.chapter-head { margin-bottom: 2.4rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--rule); }
.chapter-meta { color: var(--muted); font-size: 0.95rem; margin: 0; }
.chapter { font-size: 1.0625rem; line-height: 1.72; }
.chapter h2 { scroll-margin-top: 1.5rem; }
.chapter-foot { margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.sample-note { color: var(--muted); font-size: 0.95rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.6rem; }
.pager a { display: block; padding: 0.9rem 1rem; border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--accent); }
.pager a span { display: block; font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.pager .next { grid-column: 2; text-align: right; }
@media (max-width: 1100px) {
  .chapter-layout { grid-template-columns: minmax(0, var(--measure)); gap: 0; }
  .chapter-side { display: none; }
  .toc-inline { display: block; }
}

.notfound { padding: 3rem 0; }

@media (prefers-reduced-motion: reduce) {
  .book-card-cover { transition: none; }
}
@media print {
  .site-header, .site-footer, .chapter-side, .pager, .skip { display: none; }
  body { font-size: 11pt; }
}

/* Generated by build.py from pandoc's pygments and breezedark themes. */
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
@media (prefers-color-scheme: dark) {
code span.al { color: #95da4c; background-color: #4d1f24; font-weight: bold; } /* Alert */
code span.an { color: #3f8058; } /* Annotation */
code span.at { color: #2980b9; } /* Attribute */
code span.bn { color: #f67400; } /* BaseN */
code span.bu { color: #7f8c8d; } /* BuiltIn */
code span.cf { color: #fdbc4b; font-weight: bold; } /* ControlFlow */
code span.ch { color: #3daee9; } /* Char */
code span.cn { color: #27aeae; font-weight: bold; } /* Constant */
code span.co { color: #7a7c7d; } /* Comment */
code span.cv { color: #7f8c8d; } /* CommentVar */
code span.do { color: #a43340; } /* Documentation */
code span.dt { color: #2980b9; } /* DataType */
code span.dv { color: #f67400; } /* DecVal */
code span.er { color: #da4453; text-decoration: underline; } /* Error */
code span.ex { color: #0099ff; font-weight: bold; } /* Extension */
code span.fl { color: #f67400; } /* Float */
code span.fu { color: #8e44ad; } /* Function */
code span.im { color: #27ae60; } /* Import */
code span.in { color: #c45b00; } /* Information */
code span.kw { color: #cfcfc2; font-weight: bold; } /* Keyword */
code span.op { color: #cfcfc2; } /* Operator */
code span.ot { color: #27ae60; } /* Other */
code span.pp { color: #27ae60; } /* Preprocessor */
code span.re { color: #2980b9; background-color: #153042; } /* RegionMarker */
code span.sc { color: #3daee9; } /* SpecialChar */
code span.ss { color: #da4453; } /* SpecialString */
code span.st { color: #f44f4f; } /* String */
code span.va { color: #27aeae; } /* Variable */
code span.vs { color: #da4453; } /* VerbatimString */
code span.wa { color: #da4453; } /* Warning */
}
