:root {
  --bg: #f2f4f0; --surface: #ffffff; --fg: #1c231f; --muted: #5a675f; --rule: #d3dbd5;
  --felt: #1d5a41; --felt-soft: #e2ece6; --chip: #a8322a; --gold: #8a6a12; --ink-chip: #1c1f1d;
  --font-display: "Zilla Slab", "Rockwell", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101713; --surface: #172019; --fg: #e2e9e4; --muted: #95a59b; --rule: #2b3730;
    --felt: #6cc096; --felt-soft: #1b2c23; --chip: #e27a6f; --gold: #d9b45a; --ink-chip: #e2e9e4; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101713; --surface: #172019; --fg: #e2e9e4; --muted: #95a59b; --rule: #2b3730;
  --felt: #6cc096; --felt-soft: #1b2c23; --chip: #e27a6f; --gold: #d9b45a; --ink-chip: #e2e9e4; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 18px; line-height: 1.65; }
.wrap { max-width: 700px; margin: 0 auto; padding-inline: 16px; padding-block: 40px 72px; display: grid; gap: 18px; }
.wrap > * { min-width: 0; }
a { color: var(--felt); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--felt); outline-offset: 2px; }
p, ul, ol, blockquote, table, pre, figure { margin: 0; }
img { max-width: 100%; height: auto; }
.back { font-family: var(--font-mono); font-size: 13px; }
.eyebrow, p.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.1; font-weight: 700; }
p.dek, .dek { font-size: 20px; line-height: 1.5; color: var(--muted); font-style: italic; }
p.byline, .byline { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.since { font-size: 15.5px; background: var(--felt-soft); border-radius: 6px; padding: 12px 16px; }
.since b { color: var(--felt); }
h2 { font-size: 24px; font-weight: 700; line-height: 1.2; margin-top: 14px; }
h3 { font-size: 19px; font-weight: 700; margin-top: 6px; }
p.q { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.35; margin-top: 8px; color: var(--felt); }
span.who { color: var(--chip); }
ul, ol { padding-left: 1.3em; display: grid; gap: 6px; }
blockquote.pull { font-family: var(--font-display); font-style: italic; font-size: 23px; line-height: 1.3; color: var(--felt); padding: 4px 0 4px 16px; border-left: 3px solid var(--felt); text-wrap: balance; }
blockquote.pull p + p, p.attrib { font-family: var(--font-mono); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 8px; }
code { font-family: var(--font-mono); font-size: .86em; background: var(--felt-soft); color: var(--felt); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
pre, pre.code { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 14px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
pre code { background: none; color: var(--fg); padding: 0; font-size: inherit; }
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }
th { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: left; vertical-align: bottom; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.hands td { border: none; padding: 6px; vertical-align: middle; }
td.hn { font-family: var(--font-mono); color: var(--muted); width: 2em; }
td.hcards { white-space: nowrap; width: 9.5em; }
span.card { display: inline-block; border: 1px solid var(--rule); background: var(--surface); border-radius: 3px; padding: 0 4px; margin-right: 2px; font-weight: 700; font-size: .95em; color: var(--ink-chip); }
span.card.red { color: var(--chip); }
table.grid2 td { border: 1px solid var(--rule); width: 50%; padding: 10px; }
b.g { color: var(--felt); }
aside.box { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 16px 18px; display: grid; gap: 10px; }
aside.box.red { border-color: var(--chip); } aside.box.red p.label { color: var(--chip); }
aside.box.gold { border-color: var(--gold); } aside.box.gold p.label { color: var(--gold); }
aside.box.bar { background: transparent; border: none; border-left: 3px solid var(--felt); border-radius: 0; padding: 4px 0 4px 16px; }
aside.box p, aside.box li { font-size: 16px; }
p.label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--felt); font-weight: 500; }
span.done { font-style: italic; font-size: .88em; color: var(--muted); }
p.note { font-size: 15px; color: var(--muted); font-style: italic; }
p.src { font-size: 14.5px; color: var(--muted); overflow-wrap: anywhere; }
figure.fig { text-align: center; }
figure.fig img { border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
figcaption { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.endnote { font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 16px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.pager a { display: grid; gap: 2px; text-decoration: none; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--fg); }
.pager a:hover { border-color: var(--felt); }
.pager span { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pager b { font-family: var(--font-display); font-size: 16px; line-height: 1.25; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 480px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }
/* Field Notes article pieces (Part 27) */
.byline .pill, .byline span.pill { border-color: var(--rule); color: var(--muted); margin-left: 0; }
div.byline { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.story { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--felt); border-radius: 6px; padding: 20px 22px; display: grid; gap: 14px; }
.story p { font-size: 17.5px; }
.story .lead { font-family: var(--font-display); font-weight: 500; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 16px 18px; display: grid; gap: 12px; }
.panel h3 { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.panel p, .panel li { font-size: 16px; }
blockquote:not(.pull) { font-family: var(--font-display); font-style: italic; font-size: 23px; line-height: 1.3; color: var(--felt); text-wrap: balance; }
blockquote:not(.pull) p + p { font-family: var(--font-mono); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 8px; }
.sources { font-size: 14.5px; color: var(--muted); }
/* Home page */
.hero { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: start; }
.hero .chip { width: 100%; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.hero .dek { font-size: 19px; }
@media (max-width: 560px) { .hero { grid-template-columns: 110px 1fr; gap: 16px; } .hero .dek { font-size: 17px; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps div { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; font-size: 15px; line-height: 1.45; }
.steps b { display: block; font-family: var(--font-display); font-size: 18px; color: var(--felt); }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.cta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-family: var(--font-mono); font-size: 14px; }
.part { display: grid; gap: 8px; }
.part > p { font-size: 16px; color: var(--muted); }
.chapters { list-style: none; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--rule); margin-left: 7px; }
.chapters li { position: relative; padding: 9px 0 9px 22px; }
.chapters li::before { content: ""; position: absolute; left: -8px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-chip); box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3px var(--ink-chip); }
.chapters a { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.3; text-decoration: none; }
.chapters a:hover { text-decoration: underline; }
.chapters .kind { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.chapters li.web::before { background: var(--chip); box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3px var(--chip); }
.chapters li.coming { color: var(--muted); font-style: italic; }
.chapters li.coming::before { background: transparent; border: 2px dashed var(--muted); box-shadow: none; }
.pill { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--chip); color: var(--chip); white-space: nowrap; letter-spacing: .04em; margin-left: 6px; vertical-align: 2px; }
.foot { font-size: 14px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 16px; display: grid; gap: 8px; }
@media print { body { background: #fff; } h2 { break-after: avoid; } .back, .pager { display: none; } }
