/* Tool pages: paper ground, ink rules as structure, serif display over a grotesque body,
   and the process-ink halftone as a field the masthead sits in, at watermark weight. */
:root {
  --paper: #ece6d8;
  --paper-2: #e3dccb;
  --ink: #1c1a17;
  --ink-2: #5b5548;
  --ink-3: #8a836f;
  --rule: #cbc3ae;
  --cyan: #00a3d9;
  --magenta: #e0007a;
  --yellow: #f2c200;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
p { text-wrap: pretty; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* ---- masthead ---- */
.mast { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--ink); }
.mast .field { position: absolute; inset: -10% -6% -10% -6%; z-index: -1; pointer-events: none; }
.mast .field svg { width: 100%; height: 100%; display: block; }
.mast .wrap { padding-top: 26px; padding-bottom: clamp(36px, 6vh, 64px); }
.crumbs {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-2);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs nav { display: flex; gap: 18px; }
h1 {
  margin: clamp(40px, 8vh, 96px) 0 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 9vw, 112px); line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance;
}
.deck {
  margin: 22px 0 0; max-width: 56ch; font-family: var(--serif); font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.35; color: var(--ink); font-style: italic;
}
.status {
  margin: 34px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--ink);
}
.status li { padding: 12px 28px 0 0; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.status li b { font-weight: 400; color: var(--ink-3); margin-right: 8px; }

/* ---- sections; each opens differently ---- */
section { padding: clamp(48px, 8vh, 96px) 0; }
section + section { border-top: 1px solid var(--rule); }
h2 {
  margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1; letter-spacing: -0.01em;
}
.prose p { margin: 18px 0 0; max-width: 64ch; }
.prose p:first-of-type { margin-top: 22px; }
.prose b { font-weight: 600; }
.aside { color: var(--ink-2); font-size: 15px; }

/* the diagram: ink on paper, drawn as structure */
.diagram { padding: clamp(28px, 5vh, 56px) 0; }
.diagram figure { margin: 0; }
.diagram svg { width: 100%; height: auto; display: block; color: var(--ink); font-family: var(--mono); }
.diagram figcaption { margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); max-width: 70ch; }
.diagram .serif { font-family: var(--serif); }

/* the ledger: rows, not cards */
.ledger { margin: 28px 0 0; border-top: 1px solid var(--ink); }
.ledger .row { display: grid; grid-template-columns: minmax(150px, 0.55fr) 1.9fr; gap: 8px 32px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.ledger dt { font-family: var(--serif); font-size: 22px; line-height: 1.2; margin: 0; }
.ledger dd { margin: 0; max-width: 60ch; color: var(--ink); }

/* the honest bit at the end */
.stands .wrap { position: relative; }
.stands .wrap::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(20px, 4vw, 48px); width: 2px; background: var(--ink); }
.stands h2, .stands p { padding-left: 24px; }
.note { margin-top: 26px; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

footer { border-top: 1px solid var(--ink); padding: 24px 0 56px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mast h1, .mast .deck, .mast .status { animation: settle .7s var(--ease) both; }
.mast .deck { animation-delay: .08s; }
.mast .status { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mast h1, .mast .deck, .mast .status { animation: none; }
}
@media (max-width: 700px) {
  .ledger .row { grid-template-columns: 1fr; gap: 4px; }
  .status li { padding-right: 20px; }
}
