/* ============================================================================
   Antique Ink v3 — "the scholar's edition" (2026-10-15)
   Two columns: a Tiempos text column (640 px) and a Forma margin column
   (304 px) for notes, sources, downloads, citation. One rule weight. Three
   series colours in three places only (series word, note numbers, ledger
   word). Design system: https://claude.ai/artifact/XeoyEvHmKjxSyCcuyoiHta
   ============================================================================ */

/* ---- Tiempos Text — variable font, 300–700 -------------------- */
@font-face {
  font-family: "Tiempos Text";
  src: url("/fonts/TiemposText-VF-Roman.woff2") format("woff2-variations"),
       url("/fonts/TiemposText-VF-Roman.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Tiempos Text";
  src: url("/fonts/TiemposText-VF-Italic.woff2") format("woff2-variations"),
       url("/fonts/TiemposText-VF-Italic.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
/* ---- Tiempos Headline — static cuts --------------------------- */
@font-face { font-family: "Tiempos Headline"; src: url("/fonts/TiemposHeadline-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tiempos Headline"; src: url("/fonts/TiemposHeadline-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Tiempos Headline"; src: url("/fonts/TiemposHeadline-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Tiempos Headline"; src: url("/fonts/TiemposHeadline-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Tiempos Headline"; src: url("/fonts/TiemposHeadline-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
/* ---- Forma DJR — the margin sans (DJR Type, licensed 2026-10-15; variable, opsz 7–72) ---- */
@font-face {
  font-family: "Forma DJR";
  src: url("/fonts/FormaDJR-VF.woff2") format("woff2-variations"),
       url("/fonts/FormaDJR-VF.woff2") format("woff2");
  font-weight: 275 900; font-style: oblique 0deg 12deg; font-display: swap;
}
@font-face {
  font-family: "Forma DJR Mono";
  src: url("/fonts/FormaDJRMono-VF.woff2") format("woff2-variations"),
       url("/fonts/FormaDJRMono-VF.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

/* ---- Tokens ---------------------------------------------------- */
:root {
  /* Paper — a shade lighter than the old vellum; warmth stays, "aged" leaves */
  --paper-0: #ffffff; --paper-1: #fbf8f2; --paper-2: #f3eee4; --paper-3: #e9e1d2; --paper-4: #ddd3c0; --paper-5: #b5a882;
  /* Ink and sepia */
  --ink-0: #e8edf2; --ink-1: #b8cad9; --ink-2: #6a8fa8; --ink-3: #2e5470; --ink-4: #1c3a50; --ink-5: #0d1f2d;
  --sepia-1: #5a4030; --sepia-2: #4a3320; --sepia-3: #221a14;
  /* Series colours — the only colour on the page besides links */
  --c-papers: #2a5c4d;   /* verdigris, as on the PDF series since WP 1 */
  --c-writing: #2e5470;  /* Prussian */
  --c-book: #8b2020;     /* oxide */
  --signal: var(--c-book);

  /* Semantic — light */
  --fg-1: var(--sepia-3);
  --fg-2: var(--sepia-1);
  --fg-3: #7a6a5a;
  --fg-link: var(--sepia-3);
  --fg-link-rule: var(--ink-3);
  --fg-link-hover: var(--ink-3);
  --fg-brand: var(--c-book);
  --fg-kicker: var(--fg-2);
  --bg-page: var(--paper-1);
  --bg-card: var(--paper-0);
  --bg-inset: var(--paper-2);
  --bg-rule: var(--paper-4);
  --bg-strong: var(--ink-5);
  --rule-ink: var(--sepia-3);

  /* Type families */
  --font-display:  "Tiempos Headline", "Charter", Georgia, serif;
  --font-body:     "Tiempos Text", "Charter", "Iowan Old Style", Georgia, serif;
  --font-headline: "Tiempos Headline", "Charter", Georgia, serif;
  --font-deck:     "Tiempos Text", Georgia, serif;
  --font-sans:     "Forma DJR", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:     "Forma DJR Mono", "SF Mono", Menlo, Consolas, monospace;

  --fs-12: 0.75rem; --fs-13: 0.8125rem; --fs-14: 0.875rem; --fs-15: 0.9375rem; --fs-16: 1rem;
  --fs-17: 1.0625rem; --fs-18: 1.125rem; --fs-19: 1.1875rem; --fs-20: 1.25rem; --fs-22: 1.375rem; --fs-24: 1.5rem;
  --fs-28: 1.75rem; --fs-30: 1.875rem; --fs-32: 2rem; --fs-40: 2.5rem; --fs-44: 2.75rem; --fs-48: 3rem; --fs-60: 3.75rem; --fs-72: 4.5rem;

  --lh-tight: 1.08; --lh-snug: 1.25; --lh-body: 1.58; --lh-loose: 1.65;
  --ls-tight: -0.015em; --ls-caps: 0.08em; --ls-meta: 0.04em; --ls-label: 0.06em;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  --bw-hair: 1px; --bw-rule: 1px; --bw-section: 1px;
  --shadow-1: 0 1px 2px rgba(13, 31, 45, 0.08);
  --shadow-pop: 0 12px 32px rgba(13, 31, 45, 0.18);
  --ease-standard: cubic-bezier(.2, .0, .2, 1);
  --dur-1: 120ms; --dur-2: 200ms;

  /* Layout — the two columns */
  --text-col: 640px;
  --margin-col: 304px;
  --col-gap: 56px;
  --measure: 40rem;
  --content-max: 1040px;
  --gutter: 24px;
}

/* ---- Dark mode ------------------------------------------------- */
:root[data-theme="dark"] {
  --fg-1: #f2e9dc;
  --fg-2: #c4b8a8;
  --fg-3: #9a8d7e;
  --fg-link: #f2e9dc;
  --fg-link-rule: var(--ink-1);
  --fg-link-hover: var(--ink-1);
  --fg-brand: #c85a5a;
  --fg-kicker: #c4b8a8;
  --bg-page: var(--ink-5);
  --bg-card: #1a2a38;
  --bg-inset: #14232f;
  --bg-rule: #2a3d4d;
  --rule-ink: #f2e9dc;
  --c-papers: #6fb39d;
  --c-writing: #8fb3cc;
  --c-book: #d4716a;
}

/* ---- Reset & base --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { color: var(--fg-1); background: var(--bg-page); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-19);
  line-height: 30px;
  color: var(--fg-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
img, svg { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: var(--bw-hair) solid var(--bg-rule); margin: var(--s-8) 0; }
/* Lining tabular figures in the apparatus; Tiempos keeps old-style in running text */
time, .meta, .rail, .sidenote, .ledger__meta, .post-content table, .book-toc__num, .book-toc__meta, .wp-no { font-variant-numeric: lining-nums tabular-nums; }

/* ---- Typography ----------------------------------------------- */
h1, .h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(var(--fs-32), 3.6vw, var(--fs-44)); line-height: 1.1; letter-spacing: var(--ls-tight);
  color: var(--fg-1); margin: 0 0 var(--s-4); text-wrap: balance;
}
h2, .h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--fs-24); line-height: 30px; letter-spacing: 0.005em;
  color: var(--fg-1); margin: var(--s-10) 0 var(--s-3);
}
h3, .h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-19); line-height: 28px; margin: var(--s-8) 0 var(--s-2); }
h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-19); margin: var(--s-6) 0 var(--s-2); }

p { margin: 0 0 var(--s-5); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--s-5); padding-left: 1.4em; }
li { margin-bottom: var(--s-2); }
li::marker { color: var(--fg-2); }

blockquote {
  font-family: var(--font-body); font-style: normal;
  font-size: var(--fs-18); line-height: 28px; color: var(--fg-1);
  border-left: var(--bw-hair) solid var(--rule-ink);
  margin: var(--s-8) 0; padding: var(--s-1) 0 var(--s-1) var(--s-6);
}
blockquote p:last-child { margin-bottom: 0; }

a { color: var(--fg-link); text-decoration: none; transition: color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard); }
.post-content a, .about-content a, .home-statement a, .rail a, .sidenote a, .ledger__meta a, .site-footer a {
  border-bottom: 1px solid var(--fg-link-rule);
}
a:hover { color: var(--fg-link-hover); }
.post-content a:hover, .about-content a:hover { border-bottom-color: var(--fg-link-hover); }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-inset); padding: 0.1em 0.35em; border-radius: 2px; }
pre { font-family: var(--font-mono); font-size: var(--fs-14); line-height: 1.55; background: var(--bg-inset); border: var(--bw-hair) solid var(--bg-rule); padding: var(--s-4) var(--s-5); overflow-x: auto; margin: var(--s-6) 0; }
pre code { background: none; padding: 0; font-size: inherit; }

/* ---- Apparatus atoms (all Forma) ------------------------------ */
.kicker, .eyebrow, .list-page__kicker {
  display: inline-block; font-family: var(--font-sans); font-weight: 500;
  font-size: var(--fs-12); letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--fg-kicker); margin-bottom: var(--s-4);
}
.kicker--papers { color: var(--c-papers); }
.kicker--writing { color: var(--c-writing); }
.kicker--book, .kicker--chapters { color: var(--c-book); }
.meta { font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); }
.meta b, .meta strong { font-weight: 500; color: var(--fg-1); }
.standfirst, .deck {
  font-family: var(--font-body); font-weight: 400; font-style: normal;
  font-size: var(--fs-22); line-height: 32px; color: var(--fg-1);
  margin: 0 0 var(--s-6); text-wrap: balance;
}
.byline { font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; letter-spacing: 0.01em; color: var(--fg-2); margin: 0; }
.byline .sep { margin: 0 0.5em; color: var(--fg-3); }
.rule { border: 0; border-top: var(--bw-hair) solid var(--rule-ink); margin: var(--s-6) 0; }
.rule--hair { border-top-color: var(--bg-rule); }

/* ---- Layout shell --------------------------------------------- */
.page { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }

.site-header { background: transparent; }
.site-header__inner {
  max-width: var(--content-max); margin: 0 auto; padding: var(--s-4) var(--gutter) 14px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  border-bottom: var(--bw-hair) solid var(--rule-ink);
}
.site-header__top { display: flex; align-items: center; order: 3; }
.site-title { display: flex; align-items: center; gap: 14px; border-bottom: 0; order: 1; }
.site-title:hover { opacity: 0.85; }
.site-title__mark svg { height: 36px; width: auto; }
.site-title__word { display: block; }
.site-title__word svg { display: block; height: 20px; width: auto; }
.site-title__tag {
  display: block; margin-top: 5px; font-family: var(--font-sans); font-size: 10.5px; line-height: 1;
  font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap;
}
.site-logo__name { fill: var(--fg-1); }
.site-logo__tagline { fill: var(--fg-2); }
.site-mark__text { fill: var(--fg-1); }
.site-footer__logo svg { display: block; width: auto; height: 26px; }

.site-nav { display: flex; gap: var(--s-6); order: 2; align-items: baseline; }
.site-nav a { font-family: var(--font-sans); font-size: var(--fs-15); font-weight: 450; letter-spacing: 0.005em; color: var(--fg-1); border-bottom: 0; padding: var(--s-1) 0; }
.site-nav a:hover { color: var(--fg-link-hover); }
.site-nav a.active { border-bottom: 1px solid var(--fg-1); padding-bottom: 1px; }
.theme-toggle {
  font-family: var(--font-sans); font-size: var(--fs-15); font-weight: 450; letter-spacing: 0.005em;
  background: transparent; border: 0; color: var(--fg-2); padding: var(--s-1) 0; cursor: pointer; margin-left: var(--s-2);
}
.theme-toggle:hover { color: var(--fg-1); }
.theme-toggle .label-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .label-light { display: none; }
:root[data-theme="dark"] .theme-toggle .label-dark { display: inline; }

.content { padding: var(--s-16) 0 var(--s-24); }

/* ---- Site footer: one line ------------------------------------ */
.site-footer { margin-top: var(--s-20); }
.site-footer__inner {
  max-width: var(--content-max); margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-10);
  border-top: var(--bw-hair) solid var(--bg-rule);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  font-family: var(--font-sans); font-size: var(--fs-13); color: var(--fg-2);
}
.site-footer__left { display: flex; align-items: center; gap: var(--s-3); }
.site-footer__logo { opacity: 0.7; border-bottom: 0; }
.site-footer__links { display: flex; gap: var(--s-5); }
.site-footer a { color: var(--fg-2); border-bottom: 0; }
.site-footer a:hover { color: var(--fg-1); }

/* ---- Two columns: text + margin --------------------------------- */
.cols { display: grid; grid-template-columns: var(--text-col) minmax(0, 1fr); column-gap: var(--col-gap); align-items: start; }
.text { min-width: 0; }
.rail { font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); }
.rail__block { margin: 0 0 var(--s-3); }
.rail__block b { display: block; font-weight: 500; color: var(--fg-1); }
.rail__block a { color: var(--fg-link); }
.rail__block .mono { font-family: var(--font-mono); font-size: 12.5px; }
.rail--top { padding-top: 42px; }
.rail__list { list-style: none; margin: 0; padding: 0; }
.rail__list li { margin: 0 0 var(--s-1); }
.rail__v { font-weight: 500; color: var(--fg-1); }
.rail__note { color: var(--fg-2); }
.rail__actions { display: block; margin-top: var(--s-1); }
.linklike { font: inherit; color: var(--fg-link); background: none; border: 0; padding: 0; cursor: pointer; border-bottom: var(--bw-hair) solid var(--fg-link-rule); }
.linklike:hover { color: var(--fg-link-hover); }
.linklike.is-done { color: var(--fg-2); border-bottom-color: transparent; }
/* sticky contents for long papers: the rail stretches to the row so the nav can travel; it yields to margin notes (JS) */
.cols--paper .rail { align-self: stretch; }
.rail__toc { position: sticky; top: var(--s-6); margin-top: var(--s-8); padding-top: var(--s-4); border-top: var(--bw-hair) solid var(--rule-ink); transition: opacity .2s; }
.rail__toc b { display: block; font-weight: 500; color: var(--fg-1); margin-bottom: var(--s-1); }
.rail__toc a { color: var(--fg-2); border-bottom: 0; }
.rail__toc a:hover, .rail__toc a.is-current { color: var(--fg-1); }
.rail__toc a.is-current { font-weight: 500; }
.rail__toc--yield { opacity: 0; pointer-events: none; }

/* ---- Home: statement + ledger ----------------------------------- */
.home-statement {
  font-family: var(--font-headline); font-weight: 500;
  font-size: var(--fs-30); line-height: 40px; letter-spacing: -0.01em; margin: 0; text-wrap: balance;
}
.home-statement p { margin: 0; }
.home-letter { margin-bottom: var(--s-16); }
.home-prose { margin-top: var(--s-8); font-size: var(--fs-18); line-height: 28px; }
.home-prose img { margin: var(--s-6) 0; }
.ledger__year {
  font-family: var(--font-headline); font-weight: 500; font-size: var(--fs-20); line-height: 1.2;
  padding: var(--s-4) 0 var(--s-4); margin-top: var(--s-6); border-top: var(--bw-hair) solid var(--rule-ink);
}
.ledger__year:first-child { margin-top: 0; }
.ledger__row {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: var(--s-8);
  padding: var(--s-4) 0; border-top: var(--bw-hair) solid var(--bg-rule); align-items: baseline; color: var(--fg-1);
}
.ledger__title { color: var(--fg-1); border-bottom: 0; }
.ledger__title:hover { color: var(--fg-link-hover); }
.ledger__meta { font-family: var(--font-sans); font-size: var(--fs-13); line-height: 19px; color: var(--fg-2); }
.ledger__meta b { display: block; font-weight: 500; font-size: var(--fs-12); letter-spacing: var(--ls-label); text-transform: uppercase; }
.ledger__meta a { color: var(--fg-link); }
.ledger__title { font-family: var(--font-headline); font-weight: 500; font-size: var(--fs-22); line-height: 28px; }
.ledger__desc { display: block; font-family: var(--font-body); font-size: var(--fs-16); line-height: 24px; color: var(--fg-2); margin-top: var(--s-1); }
.ledger--end { border-bottom: var(--bw-hair) solid var(--bg-rule); }

/* ---- Section index (writing, papers, ventures) ------------------ */
.list-page__head { margin-bottom: var(--s-8); }
.list-page__head h1 { font-size: clamp(var(--fs-32), 3.4vw, var(--fs-40)); margin-bottom: var(--s-3); }
.list-page__intro { max-width: var(--measure); color: var(--fg-2); font-size: var(--fs-18); line-height: 28px; }
.list-page__intro p { margin-bottom: var(--s-3); }

/* ---- Article (single) ---------------------------------------- */
.post-header { margin-bottom: var(--s-10); }
.post-header .kicker { margin-bottom: 18px; }
.post-header h1 { margin-bottom: 18px; }
.post-header .standfirst { margin-bottom: 0; }
.post-content p { margin: 0; text-indent: 1.1em; }
.post-content > p:first-of-type, .post-content h2 + p, .post-content h3 + p, .post-content figure + p,
.post-content blockquote + p, .post-content ul + p, .post-content ol + p, .post-content table + p,
.post-content .abstract + p, .post-content div + p, .post-content aside + p, .post-content hr + p, .post-content pre + p { text-indent: 0; }
.post-content p + ul, .post-content p + ol { margin-top: var(--s-3); }
.post-content ul, .post-content ol { margin-bottom: var(--s-5); }
.post-content img { margin: var(--s-8) 0; }
.post-content figure { margin: var(--s-8) 0; }
.post-content figure img { margin: 0; border-top: var(--bw-hair) solid var(--rule-ink); border-bottom: var(--bw-hair) solid var(--bg-rule); padding: var(--s-4) 0; }
.post-content figcaption { font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); margin-top: var(--s-2); }
.post-content figcaption strong { font-weight: 500; color: var(--fg-1); }
.post-content hr { border-top-color: var(--bg-rule); }

/* Working papers: abstract block, section numbers, paper-meta in the margin */
.post-content .abstract { font-size: var(--fs-18); line-height: 28px; padding-bottom: var(--s-5); border-bottom: var(--bw-hair) solid var(--bg-rule); margin-bottom: var(--s-6); }
.post-content .abstract p { text-indent: 0; margin-bottom: var(--s-3); }
.post-content .abstract strong { font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-12); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-2); margin-right: 0.5em; }
.post-content .paper-meta {
  font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); margin: 0 0 var(--s-6);
}
.post-content .paper-meta p { margin: 0 0 var(--s-1); text-indent: 0; font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; }
.post-content .paper-meta a { color: var(--fg-link); white-space: nowrap; }
.post-content .paper-meta img { display: inline; margin: 0; }
.post--papers .paper-meta { display: none; } /* the rail carries downloads and DOI from front matter */
.post-content table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; margin: var(--s-6) 0; }
.post-content th, .post-content td { text-align: left; padding: 7px var(--s-3) 7px 0; border-bottom: var(--bw-hair) solid var(--bg-rule); vertical-align: top; }
.post-content th { font-weight: 500; font-size: var(--fs-12); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-2); border-bottom-color: var(--rule-ink); }
.post-content td:last-child, .post-content th:last-child { padding-right: 0; }

/* Margin notes: Goldmark footnotes moved beside their paragraph by notes.js */
.post-content sup.fn-ref, .footnote-ref { font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-12); color: var(--fg-2); }
.sidenote {
  float: right; clear: right; width: var(--margin-col); margin-right: calc(-1 * (var(--margin-col) + var(--col-gap)));
  margin-top: 0; margin-bottom: var(--s-3); font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); text-indent: 0;
  position: relative;
}
.sidenote__num { font-weight: 500; margin-right: 6px; color: var(--fg-1); }
.sidenote__label { display: block; font-weight: 500; font-size: var(--fs-12); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--fg-1); margin-bottom: 2px; }
.post--papers .sidenote__label { color: var(--c-papers); }
.post--writing .sidenote__label { color: var(--c-writing); }
.post--chapters .sidenote__label { color: var(--c-book); }
.sidenote--named { margin-bottom: var(--s-4); }
.post--papers .sidenote__num { color: var(--c-papers); }
.post--writing .sidenote__num { color: var(--c-writing); }
.post--chapters .sidenote__num { color: var(--c-book); }
.sidenote p { margin: 0; text-indent: 0; display: inline; }
.sidenote .footnote-backref { display: none; }
.footnotes { margin-top: var(--s-12); padding-top: var(--s-4); border-top: var(--bw-hair) solid var(--rule-ink); font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); }
.footnotes hr { display: none; }
.footnotes ol { padding-left: 1.4em; }
.footnotes p { text-indent: 0; display: inline; }
.has-sidenotes .footnotes { display: none; }

.post-footer {
  margin-top: var(--s-16); padding-top: var(--s-4); border-top: var(--bw-hair) solid var(--rule-ink);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); font-family: var(--font-sans); font-size: var(--fs-13); line-height: 19px; color: var(--fg-2);
}
.post-footer b { display: block; font-weight: 500; color: var(--fg-1); }
.post-footer a { color: var(--fg-1); border-bottom: 0; font-family: var(--font-body); font-size: var(--fs-17); }
.post-footer a:hover { color: var(--fg-link-hover); }
.post-footer .next { text-align: right; }

/* ---- About / generic page ------------------------------------ */
.about-page { max-width: var(--text-col); }
.about-page h1 { margin-bottom: var(--s-8); }
.about-content { font-size: var(--fs-19); line-height: 30px; }
.about-content p { margin-bottom: var(--s-5); }
.about-content .motto { font-family: var(--font-sans); font-size: var(--fs-12); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); margin-bottom: var(--s-8); }


/* v3.1: Books shelf as a ledger row; tables in prose pages; list air */
.ledger__row--book .ledger__body { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.ledger__cover { display: block; border-bottom: 0; border: var(--bw-hair) solid var(--bg-rule); }
.ledger__cover img { display: block; width: 100%; height: auto; }
.ledger__formats { font-family: var(--font-sans); font-size: var(--fs-13); line-height: 19px; color: var(--fg-2); margin: var(--s-1) 0 0; }
.about-content table, .home-prose table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; margin: var(--s-6) 0; }
.about-content th, .about-content td, .home-prose th, .home-prose td { text-align: left; padding: 7px var(--s-3) 7px 0; border-bottom: var(--bw-hair) solid var(--bg-rule); vertical-align: top; }
.about-content th, .home-prose th { font-weight: 500; font-size: var(--fs-12); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--fg-2); border-bottom-color: var(--rule-ink); }
.about-content td:last-child, .about-content th:last-child { padding-right: 0; }
.post-content li + li, .about-content li + li { margin-top: var(--s-1); }


/* v3.1: inline SVG figures on a printed plate (house fonts apply inside) */
.fig { margin: var(--s-8) 0; }
.fig__plate { background: #FDFAF4; border-top: var(--bw-hair) solid var(--rule-ink); border-bottom: var(--bw-hair) solid var(--bg-rule); padding: var(--s-4) 0; }
.fig__svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-family: var(--font-sans); font-size: var(--fs-14); line-height: 20px; color: var(--fg-2); margin-top: var(--s-2); }
.fig figcaption strong { font-weight: 500; color: var(--fg-1); }
.fig + p, .fig + em { text-indent: 0; }
.post-content .fig + p { margin-top: calc(-1 * var(--s-6)); }
.chapter-figure .fig__plate { border: 0; padding: 0; background: transparent; }

/* v3.3: no one-word last lines in titles and standfirsts */
h1, .post-header h1, .standfirst, .home-statement { text-wrap: balance; }
.ledger__title { text-wrap: pretty; }

/* ---- Breakpoints ------------------------------------------------ */
@media (max-width: 1199px) {
  :root { --text-col: 600px; --margin-col: 260px; --col-gap: 40px; }
}
@media (max-width: 979px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .rail__toc { display: none; }
  .cols--paper .rail--top { order: 1; margin-top: var(--s-10); margin-bottom: 0; padding-top: var(--s-5); border-top: var(--bw-hair) solid var(--rule-ink); } /* on narrow screens the paper's apparatus follows the text; the title comes first */
  .rail--top { padding-top: 0; order: -1; margin-bottom: var(--s-8); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4) var(--s-6); }
  .sidenote { float: none; width: auto; margin: var(--s-3) 0 var(--s-4); padding: var(--s-2) var(--s-3); background: var(--bg-inset); display: block; }
  .ledger__row { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-1); }
  .ledger__meta b { display: inline; margin-right: 0.6em; }
}
@media (max-width: 719px) {
  :root { --gutter: 16px; }
  body { font-size: var(--fs-17); line-height: 27px; }
  .site-header__inner { flex-wrap: wrap; row-gap: var(--s-3); }
  .site-title__word svg { height: 17px; }
  .site-title__mark svg { height: 30px; }
  .site-nav { gap: var(--s-4); overflow-x: auto; }
  .content { padding: var(--s-10) 0 var(--s-16); }
  .home-statement { font-size: var(--fs-24); line-height: 32px; }
  .ledger__title { font-size: var(--fs-19); line-height: 26px; }
  .post-footer { grid-template-columns: 1fr; }
  .post-footer .next { text-align: left; }
  .about-content { font-size: var(--fs-17); line-height: 27px; }
}

/* ---- Print ---------------------------------------------------- */
@media print {
  .site-header, .site-footer, .theme-toggle { display: none; }
  body { background: white; color: black; }
  .post { max-width: none; }
}

/* ============================================================
   Book mode — The Price of Thinking (priceofthinking.com)
   Scoped to .book-*, .chapter-* classes and the chapters section,
   so the other brands are unaffected.
   ============================================================ */

/* ---- Home / cover --------------------------------------------- */
.book-cover {
  margin: var(--s-8) auto var(--s-10);
  max-width: 24rem;
}
.book-cover img {
  width: 100%;
  border: var(--bw-hair) solid var(--bg-rule);
  box-shadow: var(--shadow-pop);
}
.book-download {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-12);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  text-align: center;
  margin: var(--s-3) 0 0;
}
.book-download a { color: var(--fg-brand); text-decoration: none; }
.book-download a:hover { text-decoration: underline; }
.book-disclosure {
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--fg-2);
  border-top: var(--bw-hair) solid var(--bg-rule);
  padding-top: var(--s-4);
  margin-top: var(--s-8);
}
.book-cite {
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--fg-2);
  margin-top: var(--s-3);
}
.book-cite a { word-break: break-word; }
.book-home { max-width: var(--measure); margin: var(--s-12) auto 0; }

/* ---- Table of contents ----------------------------------------- */
.book-toc { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.book-toc__item { margin: 0; }
.book-toc__item a {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: var(--s-4);
  align-items: baseline;
  border-bottom: 0;
  border-top: var(--bw-hair) solid var(--bg-rule);
  padding: var(--s-4) var(--s-1);
  transition: background var(--dur-1) var(--ease-standard);
}
.book-toc__item:first-child a { border-top: 0; }
.book-toc__item a:hover { background: var(--bg-card); }
.book-toc__num {
  font-family: var(--font-headline);
  font-feature-settings: "onum" 1;
  font-size: var(--fs-18);
  color: var(--fg-brand);
  text-align: right;
}
.book-toc__title {
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: var(--fs-20);
  line-height: 1.25;
  color: var(--fg-1);
}
.book-toc__item a:hover .book-toc__title { color: var(--ink-3); }
:root[data-theme="dark"] .book-toc__item a:hover .book-toc__title { color: var(--fg-link); }
.book-toc__meta {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}
.book-toc__item--front .book-toc__title { font-style: italic; font-weight: 400; }

/* ---- Chapter figures — printed plates -------------------------- */
.chapter-figure {
  margin: var(--s-8) 0;
}
.chapter-figure img {
  width: 100%;
  background: #FDFAF4;            /* stays a light plate in dark mode */
  border: var(--bw-hair) solid var(--bg-rule);
  padding: var(--s-3);
}
.chapter-figure figcaption {
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  line-height: 19px;
  color: var(--fg-2);
  margin-top: var(--s-2);
}

/* ---- End-of-chapter apparatus: What to watch / Dig deeper ------ */
.chapter-endmatter {
  margin-top: var(--s-10);
  background: var(--bg-inset);
  border-top: var(--bw-section) solid var(--ink-3);
  padding: var(--s-5) var(--s-6) var(--s-6);
}
:root[data-theme="dark"] .chapter-endmatter { border-top-color: var(--ink-2); }
.chapter-endmatter h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-12);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-3);
  margin: var(--s-6) 0 var(--s-3);
}
:root[data-theme="dark"] .chapter-endmatter h2 { color: var(--ink-2); }
.chapter-endmatter h2:first-child { margin-top: 0; }
.chapter-endmatter ul { font-size: var(--fs-16); }
.chapter-endmatter li { margin-bottom: var(--s-3); }

/* ---- Prev / next chapter navigation ---------------------------- */
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin-top: var(--s-12);
  border-top: var(--bw-rule) solid var(--ink-3);
  padding-top: var(--s-5);
}
.chapter-nav__link {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  border-bottom: 0;
  padding: var(--s-3);
  margin: calc(-1 * var(--s-3));
  margin-top: 0;
}
.chapter-nav__link--next { text-align: right; }
.chapter-nav__label {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--fg-2);
}
.chapter-nav__title {
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: var(--fs-18);
  line-height: 1.3;
  color: var(--fg-1);
}
.chapter-nav__link:hover .chapter-nav__title { color: var(--ink-3); }
:root[data-theme="dark"] .chapter-nav__link:hover .chapter-nav__title { color: var(--fg-link); }

@media (max-width: 720px) {
  .chapter-nav { grid-template-columns: 1fr; }
  .chapter-nav__link--next { text-align: left; }
}
@media print {
  .chapter-nav { display: none; }
}

/* ============================================================
   Reading view — sidebar contents, progress, parts, continue
   (priceofthinking.com; scoped to .reader / .book-rail / .reading-*)
   ============================================================ */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 20; background: transparent; pointer-events: none;
}
.reading-progress > span {
  display: block; height: 100%; width: 0;
  background: var(--fg-brand); transition: width 80ms linear;
}

.reader {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: var(--s-10);
  align-items: start;
}
.reader__rail {
  position: sticky; top: 92px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  padding-right: var(--s-2);
}
.reader .post { margin-top: 0; }
.reader__toggle { display: none; }

.book-rail__home {
  display: block; font-family: var(--font-display);
  font-size: var(--fs-18); color: var(--fg-1); border-bottom: 0;
  margin-bottom: var(--s-4); line-height: 1.15;
}
.book-rail__home:hover { color: var(--fg-brand); border-bottom: 0; }
.book-rail__list { list-style: none; margin: 0; padding: 0; }
.book-rail__part {
  font-family: var(--font-sans); font-size: var(--fs-12);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--fg-brand); margin: var(--s-5) 0 var(--s-2);
}
.book-rail__part:first-child { margin-top: 0; }
.book-rail__item a {
  display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--s-2);
  align-items: baseline; font-family: var(--font-sans);
  font-size: var(--fs-14); line-height: 1.3; color: var(--fg-2);
  border-bottom: 0; padding: var(--s-2); border-left: 2px solid transparent;
}
.book-rail__item a:hover { color: var(--fg-1); background: var(--bg-card); border-bottom: 0; }
.book-rail__item a.is-current {
  color: var(--fg-1); background: var(--bg-inset); border-left-color: var(--fg-brand);
}
.book-rail__n { color: var(--fg-3); font-feature-settings: "onum" 1; }
.book-rail__item a.is-current .book-rail__n { color: var(--fg-brand); }

/* part dividers in the full contents list */
.book-toc__part {
  font-family: var(--font-sans); font-size: var(--fs-12);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--fg-brand); margin: var(--s-6) 0 var(--s-2);
  padding-top: var(--s-4); border-top: var(--bw-hair) solid var(--bg-rule);
}
.book-toc__part:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

/* "What to watch" reads as the live, watch-this aside */
.chapter-endmatter h2:first-child { color: var(--fg-brand); }

/* continue reading */
.book-continue {
  font-family: var(--font-sans); font-size: var(--fs-14);
  color: var(--fg-2); margin: 0 0 var(--s-5);
}
.book-continue a { color: var(--fg-brand); font-weight: 600; }

/* reader responsive — collapse the sidebar into a Contents toggle */
@media (max-width: 1024px) {
  .reader { display: block; }
  .reader__rail {
    display: none; position: static; max-height: none;
    margin-bottom: var(--s-6); padding-right: 0;
  }
  .reader.toc-open .reader__rail { display: block; }
  .reader__toggle {
    display: flex; align-items: baseline; gap: var(--s-3);
    width: 100%; text-align: left; cursor: pointer;
    background: var(--bg-inset); border: var(--bw-hair) solid var(--bg-rule);
    color: var(--fg-1); font-family: var(--font-sans);
    padding: var(--s-3) var(--s-4); margin-bottom: var(--s-6);
  }
  .reader__toggle-label { font-weight: 600; font-size: var(--fs-14); letter-spacing: 0.02em; }
  .reader__toggle-meta { font-size: var(--fs-12); color: var(--fg-2); }
}

/* ============================================================
   Bookshelf — Books section on philosophersmint.com
   ============================================================ */
.bookshelf__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-8) var(--s-6);
}
.book-card { margin: 0; }
.book-card__link {
  display: grid; grid-template-columns: 92px 1fr; gap: var(--s-5);
  align-items: start; border-bottom: 0; padding: 0;
}
.book-card__link:hover { border-bottom: 0; }
.book-card__cover {
  display: block; aspect-ratio: 3 / 4.4; overflow: hidden;
  background: var(--bg-inset); border: var(--bw-hair) solid var(--bg-rule);
  box-shadow: var(--shadow-1); transition: box-shadow var(--dur-2) var(--ease-standard);
}
.book-card__link:hover .book-card__cover { box-shadow: var(--shadow-pop); }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__title {
  display: block; font-family: var(--font-headline); font-weight: 600;
  font-size: var(--fs-20); line-height: 1.2; color: var(--fg-1);
}
.book-card__link:hover .book-card__title { color: var(--ink-3); }
:root[data-theme="dark"] .book-card__link:hover .book-card__title { color: var(--fg-link); }
.book-card__sub {
  display: block; font-family: var(--font-body); font-size: var(--fs-16);
  color: var(--fg-2); margin-top: var(--s-1);
}
.book-card__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.book-card__pill {
  font-family: var(--font-sans); font-size: var(--fs-12); letter-spacing: 0.03em;
  color: var(--fg-2); border: var(--bw-hair) solid var(--bg-rule);
  border-radius: 999px; padding: 1px 8px;
}
.book-card__domain {
  display: block; font-family: var(--font-sans); font-size: var(--fs-12);
  letter-spacing: 0.03em; color: var(--fg-brand); margin-top: var(--s-3);
}

/* ============================================================
   Polish (2026-06-22): richer shelf cards + cover depth.
   Appended so it overrides the earlier shelf rules.
   ============================================================ */
.book-cover { position: relative; }
.book-cover img {
  box-shadow: 0 3px 6px rgba(13, 31, 45, 0.14), 0 22px 48px rgba(13, 31, 45, 0.22);
}
.book-cover::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 9px;
  background: linear-gradient(90deg, rgba(0,0,0,0.26), rgba(0,0,0,0.05) 60%, transparent);
  pointer-events: none;
}
.bookshelf__grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 440px));
  justify-content: start; gap: var(--s-6);
}
.book-card__link {
  grid-template-columns: 132px 1fr; gap: var(--s-6);
  align-items: center; padding: var(--s-5);
  background: var(--bg-card); border: var(--bw-hair) solid var(--bg-rule);
  transition: border-color var(--dur-2) var(--ease-standard),
              transform var(--dur-2) var(--ease-standard),
              box-shadow var(--dur-2) var(--ease-standard);
}
.book-card__link:hover {
  border-color: var(--ink-3); transform: translateY(-3px); box-shadow: var(--shadow-pop);
}
.book-card__cover {
  position: relative;
  box-shadow: 0 2px 4px rgba(13, 31, 45, 0.12), 0 16px 32px rgba(13, 31, 45, 0.20);
}
.book-card__link:hover .book-card__cover {
  box-shadow: 0 2px 4px rgba(13,31,45,0.12), 0 16px 32px rgba(13,31,45,0.20);
}
.book-card__cover::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 7px;
  background: linear-gradient(90deg, rgba(0,0,0,0.28), rgba(0,0,0,0.05) 55%, transparent);
  pointer-events: none;
}
.book-card__title { font-size: var(--fs-24); line-height: 1.18; }
@media (max-width: 520px) {
  .book-card__link { grid-template-columns: 96px 1fr; gap: var(--s-4); padding: var(--s-4); }
}

/* sidebar book-progress meter + firmer current state */
.book-rail__progress { margin: 0 0 var(--s-5); }
.book-rail__pl {
  display: block; font-family: var(--font-sans); font-size: var(--fs-12);
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-2);
  margin-bottom: var(--s-2);
}
.book-rail__pl span { color: var(--fg-3); }
.book-rail__meter { display: block; height: 3px; background: var(--bg-rule); }
.book-rail__meter > i { display: block; height: 100%; background: var(--fg-brand); }
.book-rail__item a.is-current { font-weight: 600; }

/* pin the rail header (title + progress) while the chapter list scrolls */
.book-rail__head {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-page);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: var(--bw-hair) solid var(--bg-rule);
}
.book-rail__head .book-rail__home { margin-bottom: var(--s-3); }
.book-rail__head .book-rail__progress { margin-bottom: 0; }

/* ---- Working paper series: number + imprint -------------------- */
.wp-no {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: var(--s-3);
  white-space: nowrap;
}
:root[data-theme="dark"] .wp-no { color: var(--ink-2); }

.imprint {
  margin-top: var(--s-9, 48px);
  padding-top: var(--s-5);
  border-top: var(--bw-rule) solid var(--bg-rule);
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  line-height: 1.6;
  color: var(--fg-2);
}
.imprint h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--s-2);
}
:root[data-theme="dark"] .imprint h2 { color: var(--ink-2); }
.imprint__issn { margin: 0 0 var(--s-4); }
.imprint__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s-4) var(--s-8);
  margin-bottom: var(--s-4);
}
.imprint__cols p { margin: 0; }
.imprint__note { max-width: 40em; margin: 0 0 var(--s-2); }
