/* Farm guide (07-farm-guide): a workshop band, the chapter index beside the reading panel, three written
   chapter intros and five folded chapters. Lengths are mockup px at the 1086 px desktop mockup and half
   the 724 px phone mockup; columns, art and tiles are shares of the panel, so wide windows widen the
   index, the reading panel and the chapter art. Long guide text is 18 px on desktop and 16 px on phones,
   at most 68 characters a line. */

.guide { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%237d1f2c' stroke-width='3.2' stroke-linecap='square'/%3E%3C/svg%3E"); }

/* ---------- Workshop band ---------- */
/* The band runs into the 10 px gutters like the mockup's scene, and grows taller with the column. */
.guide-hero { --art-w: 66%; --art-pos: 50% 40%; --band-h: 320px; aspect-ratio: 1086 / 320; max-height: 380px; margin: 0 -10px -6px; }
.guide-hero__art { --fade-l: 15%; --fade-t: 0%; --fade-b: 0%; }
.guide-hero__text { display: flex; flex-direction: column; align-items: flex-start; padding: 0 0 18px 38px; }
/* "Your first harvest" / "starts here.", the mockups' two lines, at every width. */
.guide-hero__title { max-width: 9.6em; font-size: 46px; line-height: 48px; }
.guide-hero__lede { max-width: 340px; margin-top: 15px; font: 400 21px/25px var(--sans); }
.guide-hero__cta { margin-top: 25px; min-height: 52px; }
/* Once the column stops filling the window the scene's right edge meets the navy too. */
@media (min-width: 1660px) { .guide-hero__art { --fade-r: 7%; } }

/* ---------- Index and reading panel ---------- */
.guide-layout { display: grid; grid-template-columns: clamp(216px, 23.6%, 300px) minmax(0, 1fr); gap: 2px; align-items: stretch; }
.guide-toc { padding: 28px 14px 28px; }
.guide-toc__inner { position: sticky; top: 16px; }
.guide-toc__title { padding-left: 14px; font-size: 26.5px; line-height: 1.2; }
.guide-toc .rule { margin: 10px 12px 14px; }
.guide-toc__list { display: grid; }
.guide-toc__list li { position: relative; }
/* A bronze line under each entry, except around the burgundy current one. */
.guide-toc__list li::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: rgb(176 128 70 / 0.5); }
.guide-toc__list li:has(> a[aria-current])::after, .guide-toc__list li:has(+ li > a[aria-current])::after { display: none; }
.guide-toc__list a { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 46px; padding: 0 4px 2px 17px; font: 700 18px/1.2 var(--sans); color: var(--ink); transition: color var(--hover); }
.guide-toc__list a:hover { color: var(--burgundy); }
.guide-toc__list a[aria-current] { min-height: 48px; padding-bottom: 4px; color: var(--cream); }
.guide-toc__list a[aria-current]::before {
  content: ''; position: absolute; z-index: -1; inset: 2px 0 6px; clip-path: var(--notch-sm);
  background: linear-gradient(var(--burgundy-top), var(--burgundy-bottom)); box-shadow: inset 0 0 0 1px rgb(60 8 18 / 0.5);
}

/* The panel is a container so the chapter intros lay out by the room the panel has, not by the window. */
.guide-main { container: guide-main / inline-size; padding: 19px 30px 30px; }
.guide-picker { display: flex; align-items: center; gap: 26px; }
.guide-picker__label { font-size: 18px; }
select.guide-picker__select { flex: 0 1 360px; width: auto; min-width: 0; min-height: 36px; padding-left: 16px; border-radius: 6px; background-color: #fcefd6; background-image: var(--chevron); background-size: 16px 10px; background-position: right 16px center; font-size: 18px; }
.guide-main > .rule { margin-block: 12px 11px; }
.guide-main > .chapter-rule { margin-block: 14px 4px; }

/* ---------- Chapters ---------- */
.chapter { scroll-margin-top: 12px; }
.chapter :is(h2, h3, h4) { scroll-margin-top: 12px; }
.chapter__title { font: 700 32.5px/1.15 var(--display); color: var(--ink); }
.chapter__num { color: var(--burgundy); }
/* Text on the left, the chapter's picture on the right, each half the panel. */
.chapter__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.chapter :is(.chapter__intro, .chapter__body)[hidden] { padding: 0; }
.chapter__text { display: flex; flex-direction: column; align-items: flex-start; }
.chapter__summary { max-width: 24em; margin-top: 5px; font: 400 18px/23px var(--sans); color: var(--ink); }
.chapter__summary strong { font-weight: 700; }
.chapter__more {
  display: inline-flex; align-items: center; gap: 8px; min-height: 24px; margin-top: 4px; padding: 0; border: 0; background: none;
  font: 700 16px/1.2 var(--sans); color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer;
}
.chapter__more:hover { color: var(--burgundy-hover); }
.chapter__more::after { content: ''; width: 8px; height: 8px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chapter[data-state="full"] .chapter__more::after { margin-top: 4px; transform: rotate(-135deg); }

.chapter__art img { image-rendering: auto; }
/* A scene in the small bronze frame (.pic). The captain fills the height of the text beside it. */
.chapter__art--scene { align-self: stretch; min-height: 200px; }
.chapter--folded .chapter__art--scene { align-self: center; min-height: 0; aspect-ratio: 2 / 1; }

/* The three city tiles under the first chapter: each city's art in the frame, its name on a plate. */
.city-tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-self: stretch; max-width: 470px; margin-top: 14px; }
.city-tag { aspect-ratio: 112 / 108; }
.city-tag__art { display: block; height: 100%; overflow: hidden; }
.city-tag__art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); transform: scale(var(--zoom-art)); transform-origin: var(--focus); }
.city-tag--thais { --focus: 22% 18%; --zoom-art: 1.9; }
.city-tag--carlin { --focus: 62% 20%; --zoom-art: 2.1; }
.city-tag--venore { --focus: 24% 22%; --zoom-art: 1.8; }
.city-tag__name { position: absolute; left: 6px; right: 6px; bottom: 5px; display: grid; place-items: center; height: 31%; isolation: isolate; font: 800 18px/1 var(--sans); color: var(--ink); }
.city-tag__name::before { content: ''; position: absolute; z-index: -1; inset: 0; border: 4px solid transparent; border-image: url(/assets/art/frame-sm.svg) 8 / 8px; clip-path: var(--notch-sm); background: linear-gradient(#fdf1d4, #f1d6a2); background-origin: border-box; }

/* Debris, an arrow, tilled soil: cut-out drawings standing on the parchment. */
.chapter__art--process { display: flex; align-items: center; justify-content: flex-end; gap: 4%; }
.chapter__art--process img { flex: 0 1 auto; width: clamp(104px, 15cqw, 190px); max-width: 41%; height: auto; }
.process__arrow { flex: none; width: 26px; height: 22px; background: var(--burgundy); clip-path: polygon(0 30%, 50% 30%, 50% 0, 100% 50%, 50% 100%, 50% 70%, 0 70%); }

/* Seeds, a watering can and the harvest, composed as one still life. */
.chapter__art--still { position: relative; justify-self: end; width: 100%; max-width: 460px; aspect-ratio: 384 / 150; }
.chapter__art--still img { position: absolute; height: auto; }
.still__seeds { left: 0; bottom: 2.7%; width: 29.2%; }
.still__can { left: 21.9%; bottom: 14.7%; width: 33.3%; }
.still__wheat { left: 59.4%; bottom: 22.7%; width: 26%; }
.still__carrot { left: 46.9%; bottom: 0; width: 24%; }
.still__cucumber { left: 74%; bottom: 4%; width: 26%; }

.day-note { position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; min-height: 44px; margin-top: 18px; padding: 4px 18px 4px 14px; font: 600 18px/1.2 var(--sans); color: var(--burgundy); }
.day-note::before { content: ''; position: absolute; z-index: -1; inset: 0; border: 4px solid transparent; border-image: url(/assets/art/frame-sm.svg) 8 / 8px; clip-path: var(--notch-sm); background: #fcebc8; }
.day-note__icon { width: auto; height: 26px; }

/* A group of the package's item drawings, shoulder to shoulder on one line. */
.chapter__art--row { display: flex; justify-content: flex-end; align-items: flex-end; gap: 2px; }
.chapter__art--row img { flex: 0 1 clamp(52px, 8cqw, 84px); min-width: 0; width: clamp(52px, 8cqw, 84px); height: auto; aspect-ratio: 1; object-fit: contain; }

/* Folded chapters: a framed title row with a chevron. */
.chapter--folded { margin-inline: -6px; }
.chapter--folded + .chapter--folded { margin-top: 2px; }
.guide-main > .chapter--folded:first-of-type, .chapter:not(.chapter--folded) + .chapter--folded { margin-top: 30px; }
.chapter__toggle {
  position: relative; isolation: isolate; display: block; width: 100%; min-height: 48px; padding: 8px 60px 9px 14px;
  border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.chapter__toggle::before { content: ''; position: absolute; z-index: -1; inset: 0; border: 2px solid rgb(74 48 32 / 0.85); border-radius: 5px; background: rgb(255 244 221 / 0.4); box-shadow: inset 0 0 0 1px rgb(255 247 228 / 0.75), 0 1px 0 rgb(173 130 73 / 0.55); }
.chapter__toggle::after { content: ''; position: absolute; right: 19px; top: 50%; width: 18px; height: 11px; margin-top: -5px; background: var(--chevron) center / contain no-repeat; transition: transform var(--hover); }
.chapter__toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.chapter__toggle:hover { color: var(--burgundy); }
.chapter--folded .chapter__title { font-size: 27px; }
.chapter--folded .chapter__intro { padding: 18px 6px 0; }
.chapter--folded[data-state="full"] { margin-block: 0 24px; }
.chapter--folded[data-state="full"] + .chapter--folded { margin-top: 24px; }

/* A panel too narrow for two halves stacks each intro: text, then its picture. */
@container guide-main (max-width: 600px) {
  .chapter__intro { grid-template-columns: minmax(0, 1fr); }
  .chapter__art--scene { aspect-ratio: 2.4 / 1; min-height: 0; }
  .chapter__art--process, .chapter__art--row { justify-content: flex-start; }
  .chapter__art--still { justify-self: start; }
}

/* ---------- Full chapter text ---------- */
.chapter__body { padding: 22px 0 8px; font: 400 18px/1.55 var(--sans); color: var(--ink); }
.chapter--folded .chapter__body { padding-inline: 6px; }
.chapter__body::after { content: ''; display: block; clear: both; }
/* 29em holds at most 68 characters of Manrope on a line. Pictures, the captains, tables and plant stages
   take the rest of a wide panel. */
.chapter__body > :is(p, ul:not(.cities), ol, h3, h4, dl) { max-width: 29em; }
.chapter__lede { font-size: 20px; line-height: 1.5; color: var(--ink-2); }
:where(.chapter__body) :is(p, ul, ol, dl) { margin-top: 14px; }
:where(.chapter__body) > :first-child { margin-top: 0; }
.chapter__body h3 { clear: both; margin-top: 44px; font: 700 28px/1.2 var(--display); color: var(--ink); }
.chapter__body h4 { margin-top: 30px; font: 700 22px/1.25 var(--display); color: var(--burgundy); }
:where(.chapter__body) :is(h3, h4) + * { margin-top: 10px; }
.chapter__body .has-emblem { display: flex; align-items: center; gap: 12px; }
.emblem { flex: none; width: 40px; height: 40px; object-fit: contain; }
h4 .emblem { width: 32px; height: 32px; }
.chapter__body a:not([class]) { color: var(--link); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.chapter__body a:not([class]):hover { color: var(--burgundy-hover); }
:where(.chapter__body) ul:not([class]) { padding-left: 24px; }
:where(.chapter__body) ul:not([class]) > li::marker { color: var(--bronze-dark); }
:where(.chapter__body) li + li { margin-top: 6px; }
.chapter__body strong { font-weight: 700; }
.chapter__body .muted { font-size: 16px; line-height: 1.45; color: var(--muted); }
.chapter__body code { padding: 1px 5px; border: 1px solid rgb(173 130 73 / 0.55); border-radius: 3px; background: var(--surface); font: 600 0.88em/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--ink); white-space: nowrap; }

.vignette { float: right; width: clamp(150px, 24%, 240px); margin: 4px 0 12px 24px; }
.vignette img { width: 100%; height: auto; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps > li { position: relative; padding-left: 44px; counter-increment: step; }
.chapter__body .steps > li + li { margin-top: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 28px;
  clip-path: var(--notch-sm); background: linear-gradient(var(--burgundy-top), var(--burgundy-bottom)); color: var(--cream); font: 700 15px/1 var(--sans);
}

.chapter__body .ref-link a { display: inline-flex; align-items: center; gap: 8px; color: var(--link); font: 700 17px/1.4 var(--sans); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Item sprites from the game, next to their names. */
.item { display: flex; align-items: center; gap: 10px; }
.item img, .noimg { flex: none; width: 32px; height: 32px; object-fit: contain; object-position: right bottom; image-rendering: pixelated; }
.item img.pix { object-position: center; image-rendering: auto; }
.inline-img { display: inline-flex; vertical-align: middle; }
.inline-img img { width: 32px; height: 32px; object-fit: contain; object-position: right bottom; image-rendering: pixelated; }
.mats { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.mats span { white-space: nowrap; }

/* The seven growth stages share one row whenever the panel has room for them. */
.stages { clear: both; display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; max-width: 840px; margin-top: 18px; }
.stages figure { position: relative; isolation: isolate; padding: 12px 6px 10px; text-align: center; }
.stages figure::before { content: ''; position: absolute; z-index: -1; inset: 0; border: 4px solid transparent; border-image: url(/assets/art/frame-sm.svg) 8 / 8px; clip-path: var(--notch-sm); background: var(--surface); }
.stages img { width: 64px; height: 64px; margin: 0 auto 6px; object-fit: contain; image-rendering: pixelated; }
.stages .on-soil img { background: url(../img/54271.png) center / 64px 64px no-repeat; }
.stages figcaption { font: 600 13px/1.25 var(--sans); }

/* The three captains. */
.cities { clear: both; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.chapter__body .city { position: relative; isolation: isolate; margin: 0; padding: 16px 18px 18px; }
.city::before { content: ''; position: absolute; z-index: -1; inset: 0; border: 4px solid transparent; border-image: url(/assets/art/frame-sm.svg) 8 / 8px; clip-path: var(--notch-sm); background: var(--surface); }
.chapter__body .city__name { margin: 0; font: 700 24px/1.2 var(--display); color: var(--ink); }
.chapter__body .city__captain { margin-top: 2px; font: 700 15px/1.4 var(--sans); color: var(--burgundy); }
.chapter__body .city__facts { margin-top: 10px; font: 400 15px/1.45 var(--sans); }
.city__facts div + div { margin-top: 8px; }
.city__facts dt { font: 700 12px/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.city__facts dd { margin: 2px 0 0; }

/* Good to know */
.callout { position: relative; isolation: isolate; clear: both; max-width: calc(29em + 40px); margin-top: 24px; padding: 16px 20px 18px; }
.callout::before { content: ''; position: absolute; z-index: -1; inset: 0; border: 4px solid transparent; border-image: url(/assets/art/frame-sm.svg) 8 / 8px; clip-path: var(--notch-sm); background: #fcebc8; }
.chapter__body .callout__title { margin: 0; font: 700 15px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--burgundy); }
.chapter__body .callout__title + p { margin-top: 6px; font-size: 17px; line-height: 1.5; }

/* Tables */
.table-wrap { clear: both; margin-top: 18px; overflow-x: auto; border: 2px solid var(--line); border-radius: 3px; background: rgb(253 243 223 / 0.6); }
.table-wrap table { width: 100%; border-collapse: collapse; font: 400 15px/1.4 var(--sans); }
.table-wrap :is(th, td) { padding: 8px 12px; text-align: left; vertical-align: middle; }
.table-wrap thead th { background: linear-gradient(var(--burgundy-top), var(--burgundy-bottom)); font: 700 13px/1.25 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--cream); white-space: nowrap; }
.table-wrap tbody :is(th, td) { border-top: 1px solid rgb(173 130 73 / 0.45); }
.table-wrap tbody th { font-weight: 700; }
.table-wrap tr.group th { padding-top: 12px; background: var(--parchment-2); font: 700 20px/1.3 var(--display); color: var(--burgundy); }
.table-wrap .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap:focus-visible { outline-offset: 2px; }

/* Next chapter */
.chapter-next { position: relative; isolation: isolate; clear: both; display: flex; flex-direction: column; justify-content: center; max-width: 495px; min-height: 76px; margin-top: 36px; padding: 8px 24px; color: var(--cream); }
.chapter-next::before {
  content: ''; position: absolute; z-index: -1; inset: 0; border: 4px solid transparent; border-image: url(/assets/art/frame-sm.svg) 8 / 8px; clip-path: var(--notch-sm);
  background: linear-gradient(var(--burgundy-top), var(--burgundy-bottom)); background-origin: border-box; transition: filter var(--hover);
}
.chapter-next:hover::before { filter: brightness(1.16); }
.chapter-next__eyebrow { font: 600 14px/1.3 var(--sans); color: var(--cream-muted); }
.chapter-next__title { display: flex; align-items: center; gap: 12px; margin-top: 2px; font: 700 24px/1.2 var(--display); }
.chapter-next__title::after { content: ''; width: 10px; height: 10px; border: solid currentColor; border-width: 3px 3px 0 0; transform: rotate(45deg); }

/* ---------- Tablets: a narrower index, a smaller band title ---------- */
@media (min-width: 768px) and (max-width: 1066px) {
  .guide-hero { --art-w: 62%; }
  .guide-hero__text { padding-left: 28px; }
  .guide-hero__title { font-size: 38px; line-height: 40px; }
  .guide-hero__lede { max-width: 300px; font-size: 19px; line-height: 23px; }
  .guide-toc { padding-inline: 10px; }
  .guide-toc__title { padding-left: 10px; font-size: 22px; }
  .guide-toc__list a { min-height: 42px; padding-left: 12px; font-size: 15.5px; }
  .guide-main { padding-inline: 24px; }
  .guide-picker { flex-wrap: wrap; gap: 6px 20px; }
  .vignette { width: 130px; }
}

/* ---------- Phones: the scene above the copy, the picker instead of the index ---------- */
@media (max-width: 767px) {
  .guide-hero { --art-pos: 50% 22%; aspect-ratio: auto; max-height: none; margin: 0 0 8px; }
  .guide-hero__art { order: 0; height: auto; min-height: 0; max-height: 240px; aspect-ratio: 2.95; overflow: hidden; --fade-l: 5%; --fade-r: 5%; --fade-t: 0%; --fade-b: 24%; }
  .guide-hero__text { align-items: stretch; padding: 0 13px 0; }
  .guide-hero__title { margin-top: -2px; font-size: 27px; line-height: 25px; }
  .guide-hero__lede { max-width: none; margin-top: 8px; font-size: 13.5px; line-height: 16px; }
  .guide-hero__cta { min-height: 32px; margin-top: 12px; font-size: 16px; }

  .guide-layout { display: block; }
  .guide-main { padding: 5px 23.5px 9px; }
  .guide-main__title { text-align: center; font-size: 24px; line-height: 1.15; }
  .guide-main .rule { height: 10px; gap: 6px; }
  .guide-main .rule > i { width: 10px; height: 10px; background-size: 10px; }
  .guide-main > .rule { margin-block: 4px 5px; }
  .guide-picker { display: grid; gap: 3px; }
  .guide-picker__label { font-size: 13px; }
  select.guide-picker__select { width: 100%; min-height: 26px; padding: 1px 30px 1px 10px; border-radius: 4px; background-size: 12px 8px; background-position: right 12px center; font-size: 12.5px; }
  .guide-main > .chapter-rule { margin-block: 7px 2px; }

  /* Title, summary and link, then the picture, then the tiles or the note. */
  .chapter__intro { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chapter__text { display: contents; }
  .chapter__intro > .chapter__art { order: 1; margin-top: 6px; }
  .chapter__intro :is(.city-tags, .day-note) { order: 2; }
  .chapter__title { font-size: 20px; }
  .chapter__summary { max-width: none; margin-top: 3px; font-size: 12.5px; line-height: 13.75px; }
  .chapter__more { justify-self: start; min-height: 24px; margin-top: 0; font-size: 12.5px; text-underline-offset: 3px; }
  .chapter__art--scene { align-self: auto; min-height: 0; margin: 6px 9px 0; padding: 3px; aspect-ratio: 2.95 / 1; }
  .chapter--folded .chapter__art--scene { aspect-ratio: 2.4 / 1; }
  .city-tags { max-width: none; gap: min(16px, 4cqw); margin: 5px min(9px, 2cqw) 0; }
  .city-tag { aspect-ratio: 84 / 65; padding: 3px; }
  .city-tag__name { left: 4px; right: 4px; bottom: 3px; height: 34%; font-size: 12px; }
  .chapter__art--process { justify-content: center; gap: 12px; margin-top: 4px; }
  .chapter__art--process img { width: 30%; max-width: 104px; }
  .process__arrow { width: 20px; height: 17px; }
  .chapter__art--still { justify-self: center; max-width: 236px; margin-top: 4px; }
  .day-note { justify-content: center; min-height: 23px; margin-top: 8px; padding: 2px 10px; gap: 10px; font-size: 12.2px; }
  .day-note__icon { height: 19px; }
  .chapter__art--row { justify-content: flex-start; margin-top: 8px; }
  .chapter__art--row img { flex-basis: 40px; width: 40px; }

  .chapter--folded { margin-inline: -5px; }
  .guide-main > .chapter--folded:first-of-type, .chapter:not(.chapter--folded) + .chapter--folded { margin-top: 11px; }
  .chapter--folded + .chapter--folded { margin-top: 0; }
  .chapter__toggle { min-height: 21px; padding: 2px 34px 3px 13px; }
  .chapter__toggle::before { border-width: 1.5px; border-radius: 4px; }
  .chapter__toggle::after { right: 13px; width: 12px; height: 8px; margin-top: -3px; }
  .chapter--folded .chapter__title { font-size: 14.5px; line-height: 1.1; }
  .chapter--folded .chapter__intro { padding: 10px 5px 0; }
  .chapter--folded[data-state="full"] { margin-block: 0 16px; }
  .chapter--folded[data-state="full"] + .chapter--folded { margin-top: 16px; }

  .chapter__body { padding: 16px 0 6px; font-size: 16px; line-height: 1.55; }
  .chapter--folded .chapter__body { padding-inline: 5px; }
  .chapter__lede { font-size: 17px; }
  .chapter__body h3 { margin-top: 34px; font-size: 22px; }
  .chapter__body h4 { margin-top: 24px; font-size: 18px; }
  .emblem { width: 32px; height: 32px; }
  h4 .emblem { width: 26px; height: 26px; }
  .chapter__body .muted { font-size: 14px; }
  .chapter__body code { white-space: normal; }
  .vignette { float: none; width: 150px; margin: 12px auto 0; }
  :where(.chapter__body) ul:not([class]) { padding-left: 20px; }
  .steps > li { padding-left: 40px; }
  .cities { grid-template-columns: minmax(0, 1fr); }
  .stages { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
  .stages figure { padding: 10px 4px 8px; }
  .stages img { width: 52px; height: 52px; }
  .stages .on-soil img { background-size: 52px 52px; }
  .stages figcaption { font-size: 12px; }
  .callout { padding: 14px 14px 16px; }
  .chapter__body .callout__title + p { font-size: 16px; }
  .chapter-next { min-height: 64px; margin-top: 28px; padding: 8px 16px; }
  .chapter-next__title { font-size: 19px; }

  /* One record per card; the mine's find chances stay a scrolling grid. */
  .table-wrap:not(.table-wrap--matrix) { overflow: visible; border: 0; background: none; }
  .table-wrap:not(.table-wrap--matrix) :is(table, tbody, tr, th, td) { display: block; }
  .table-wrap:not(.table-wrap--matrix) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-wrap:not(.table-wrap--matrix) tr { margin-top: 8px; padding: 10px 12px 8px; border: 2px solid var(--line); border-radius: 3px; background: rgb(253 243 223 / 0.7); }
  .table-wrap:not(.table-wrap--matrix) tr:first-child { margin-top: 0; }
  .table-wrap:not(.table-wrap--matrix) tr:has(+ tr.cont) { padding-bottom: 6px; border-bottom: 0; }
  .table-wrap:not(.table-wrap--matrix) tr.cont { margin-top: 0; padding-top: 6px; border-top: 1px dashed var(--line); }
  .table-wrap:not(.table-wrap--matrix) tr.cont:has(+ tr.cont) { border-bottom: 0; }
  .table-wrap:not(.table-wrap--matrix) tbody :is(th, td) { padding: 0; border-top: 0; }
  .table-wrap:not(.table-wrap--matrix) tbody th { margin-bottom: 6px; font: 700 16px/1.4 var(--sans); }
  /* The label sits in a fixed left column; the cell's own content flows beside it. */
  .table-wrap:not(.table-wrap--matrix) tbody td { position: relative; min-height: 26px; padding: 3px 0 3px calc(7.5em + 12px); text-align: left; }
  .table-wrap:not(.table-wrap--matrix) td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 7.5em; font: 700 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
  .table-wrap:not(.table-wrap--matrix) .num { white-space: normal; }
  .table-wrap:not(.table-wrap--matrix) tr.group { margin-top: 18px; padding: 0; border: 0; background: none; }
  .table-wrap:not(.table-wrap--matrix) tr.group:first-child { margin-top: 0; }
  .table-wrap:not(.table-wrap--matrix) tr.group th { margin: 0; padding: 0; background: none; font: 700 20px/1.3 var(--display); }
  .table-wrap--matrix table { width: max-content; }
  .table-wrap--matrix :is(tbody th, thead th:first-child) { position: sticky; left: 0; z-index: 1; width: 150px; min-width: 150px; padding-right: 10px; box-shadow: inset -1px 0 var(--line); }
  .table-wrap--matrix tbody th { background: var(--surface); }
}
