/* Champignon — the website's own stylesheet.
   Every colour, size and step is a custom property from assets/tokens.css, which is generated
   from src/design/tokens.json. There are no hex literals in this file and the build fails if one
   appears: design/TOKENS.md is the reasoning of record and a value invented here would have none.

   The look is the specimen plate from design/plates/, carried to the web: a clay ground, paper
   plates sitting on it, a mono eyebrow over a Newsreader display line, hairline rules, and no
   rounded corners on anything that is meant to read as printed. */

/* ── faces ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-standard-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-ext-standard-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-standard-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ── the ground ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--clay);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.62;
  font-variation-settings: "opsz" 16;
  text-rendering: optimizeLegibility;
}

/* The grain is procedural rather than the exported 2048² plate: same fractalNoise, same 11%,
   no asset to ship. design/TOKENS.md §"Exported — the headline only". */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='220' height='220' filter='url(%23g)'/></svg>");
}
body > * { position: relative; z-index: 2; }

::selection { background: var(--clayEdge); }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--hairline); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-4); top: var(--space-4); background: var(--paper); padding: var(--space-3) var(--space-4); z-index: 9; }

/* ── mono, the machine facts ───────────────────────────────────────────── */
.mono, code, pre, th, td.mono, .lbl {
  font-family: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}
.lbl {
  font-size: var(--size-label); line-height: var(--lh-label);
  letter-spacing: 0.10em; text-transform: uppercase; font-weight: 500; color: var(--inkSoft);
}
code { font-size: 0.88em; background: var(--paper); padding: 1px 4px; }
pre { background: var(--paper); padding: var(--space-4); overflow-x: auto; font-size: 14px; line-height: 1.5; border-left: 2px solid var(--clayEdge); }
pre code { background: none; padding: 0; }

/* ── masthead ──────────────────────────────────────────────────────────── */
.masthead { padding: var(--space-5) var(--gutter) 0; }
.masthead-bar {
  max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6);
  align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--clayEdge); padding-bottom: var(--space-3);
}
.wordmark {
  font-size: 25px; font-weight: 600; letter-spacing: -0.005em; text-decoration: none;
  font-variation-settings: "opsz" 36;
}
.masthead nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.masthead nav a {
  font-family: "Plex Mono", monospace; font-size: var(--size-label); letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--inkSoft); text-decoration: none; padding-bottom: 2px;
}
.masthead nav a:hover { color: var(--ink); }
.masthead nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* ── the plate ─────────────────────────────────────────────────────────── */
main { padding: var(--space-6) var(--gutter) var(--space-9); }
.plate {
  max-width: 1180px; margin: 0 auto; background: var(--paper);
  padding: var(--space-9) var(--space-8) var(--space-9);
  box-shadow: 0 1px 0 var(--clayEdge);
}
.plate-head { border-bottom: 1px solid var(--clayEdge); padding-bottom: var(--space-6); margin-bottom: var(--space-7); }
.eyebrow { margin: 0 0 var(--space-4); }
.crumb { margin: 0 0 var(--space-4); }
.crumb a { color: var(--inkSoft); }

h1 {
  font-size: clamp(38px, 6.4vw, 66px); line-height: 1.04; font-weight: 300;
  font-variation-settings: "opsz" 72; letter-spacing: -0.014em;
  margin: 0; max-width: 17ch; text-wrap: balance;
}
.lede {
  font-size: 21px; line-height: 1.5; font-style: italic; color: var(--inkSoft);
  max-width: 54ch; margin: var(--space-5) 0 0; text-wrap: pretty;
}

h2 {
  font-size: 30px; line-height: 1.18; font-weight: 400; font-variation-settings: "opsz" 48;
  letter-spacing: -0.006em; margin: var(--space-9) 0 var(--space-4); max-width: 32ch;
}
h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: var(--space-7) 0 var(--space-3); max-width: 42ch; }
h4 { font-size: 17px; font-weight: 600; margin: var(--space-6) 0 var(--space-2); }
h2 + h3 { margin-top: var(--space-5); }

p, ul, ol { max-width: 68ch; text-wrap: pretty; }
p { margin: 0 0 var(--space-5); }
ul, ol { margin: 0 0 var(--space-5); padding-left: 1.15em; }
li { margin-bottom: var(--space-2); }
li::marker { color: var(--inkSoft); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--clayEdge); margin: var(--space-8) 0; }

blockquote {
  margin: var(--space-6) 0; padding: var(--space-2) 0 var(--space-2) var(--space-5);
  border-left: 2px solid var(--left); max-width: 62ch;
}
blockquote p { font-size: 20px; line-height: 1.48; margin: 0; }

/* ── tables ────────────────────────────────────────────────────────────── */
.scroller { overflow-x: auto; margin: var(--space-6) 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
th {
  text-align: left; font-size: var(--size-label); letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500; color: var(--inkSoft); padding: 0 var(--space-4) var(--space-2) 0;
  border-bottom: 1px solid var(--ink); white-space: nowrap;
}
td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--clayEdge); vertical-align: top; }
td.num { text-align: right; padding-right: var(--space-5); }
td.mono { font-size: 13px; color: var(--inkSoft); white-space: nowrap; }
td.word { font-size: 14px; color: var(--inkSoft); font-style: italic; }
td.name { font-weight: 600; min-width: 22ch; }
table.rows tr.note td { border-bottom: 1px solid var(--clayEdge); font-size: 14px; color: var(--inkSoft); padding-top: 0; }
table.rows tr.note .lbl { margin-right: var(--space-2); }
.tag {
  font-family: "Plex Mono", monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--inkSoft); border: 1px solid var(--clayEdge); padding: 1px 5px; white-space: nowrap; font-weight: 400;
}

/* ── the row island ────────────────────────────────────────────────────── */
.row-island { margin: var(--space-7) 0; max-width: 640px; }
.row-island svg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: ew-resize; }
.row-island .caption { margin-top: var(--space-3); color: var(--inkSoft); font-size: 14px; max-width: 58ch; }
.row-island .task-name { font-weight: 600; font-size: 17px; margin: 0 0 2px; }
.row-island .task-meta { margin: 0 0 var(--space-2); }

/* ── panels ────────────────────────────────────────────────────────────── */
.panel {
  background: var(--clay); padding: var(--space-6) var(--space-6) var(--space-4);
  margin: var(--space-7) 0; border-top: 2px solid var(--ink);
}
.panel > :last-child { margin-bottom: 0; }
.panel h3 { margin-top: 0; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: var(--space-6); margin: var(--space-6) 0; }
.cols > div > :first-child { margin-top: 0; }
.cols p, .cols ul { max-width: none; }

.toc { margin: 0 0 var(--space-8); padding: var(--space-4) 0 var(--space-2); border-top: 1px solid var(--clayEdge); border-bottom: 1px solid var(--clayEdge); }
.toc p { margin: 0 0 var(--space-2); }
.toc ol { columns: 2; column-gap: var(--space-8); font-size: 15px; max-width: none; padding-left: 1.1em; }

/* ── footer ────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--clayEdge); padding: var(--space-7) var(--gutter) var(--space-9); }
.footer-inner { max-width: 1180px; margin: 0 auto; }
.footer-inner .claim { font-size: 16px; color: var(--inkSoft); max-width: 62ch; margin: var(--space-3) 0 var(--space-4); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.footer-inner nav a { font-family: "Plex Mono", monospace; font-size: var(--size-label); letter-spacing: 0.09em; text-transform: uppercase; color: var(--inkSoft); text-decoration: none; }
.footer-inner nav a:hover { color: var(--ink); }

/* ── narrow ────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .plate { padding: var(--space-7) var(--space-5) var(--space-8); }
  .toc ol { columns: 1; }
  main { padding-left: var(--space-4); padding-right: var(--space-4); }
  .masthead { padding-left: var(--space-4); padding-right: var(--space-4); }
  footer { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* ── the landing mark, on the home page only (D-166, amended 2026-10-21) ──────
   The app's landing screen, top to bottom: the wordmark, the mark growing once and settling, the
   purpose line. On the clay ground, as in the app, above the first plate. The wordmark's 34/36 is
   Typeface.wordmark's size — round F gave it as a size rather than a rung of the scale, and the app
   keeps it outside the scale with that citation; so does this file. The purpose line is the app's
   lede: italic, 19/28, in ink. The mark stops at 440px, the width the app's layers are drawn for. */
.landing { max-width: 440px; margin: 0 auto var(--space-7); text-align: center; }
.landing-name {
  margin: 0; font-size: 34px; line-height: 36px; font-weight: 300;
  font-variation-settings: "opsz" 60; letter-spacing: -0.008em;
}
.landing-line { margin: var(--space-1) 0 0; }
.landing-mark { display: block; width: 100%; height: auto; margin: var(--space-3) 0 0; overflow: visible; }
.landing-mark image { mix-blend-mode: multiply; }
.landing-purpose {
  margin: var(--space-3) auto 0; max-width: 32ch;
  font-size: var(--size-lede); line-height: var(--lh-lede); font-style: italic;
}
/* The page draws its own name, as the app's landing page does, so the masthead does not say it again. */
.has-hero .masthead .wordmark { display: none; }
.has-hero .masthead-bar { justify-content: flex-end; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* A fact the site needs and does not have yet (tools/web/build.py `_unset`). Visible on purpose:
   a plausible-looking placeholder is the kind of thing that ships. */
.unset {
  font-family: "Plex Mono", monospace; font-size: 13px; letter-spacing: 0.04em;
  border-bottom: 1px dashed var(--hairline); color: var(--inkSoft); padding-bottom: 1px;
}
