/* The Post-Paper essay, on top of the Shoal Journal kit (kit/shoal.css).
   One axis: every block is centred on the page. Three widths and no others: text (the reading column), wide (exhibits,
   --out further on each side), full (cover print, bar, closing plate, footer). Prose, tables and lists are deep-water
   ink on a white ground; only exhibits are lifted sheets. Scene plates keep the print's own charcoal; Shoal's colours
   and marks are accents: the rules that draw themselves, the drawings, the controls, the photograph banner over the
   opening, the strip of photograph over each chapter, and the logo's five fish above the contents rail. How things
   move is the last block of this file. Earlier versions are in old/: before the layout (essay-1110-before-layout.css),
   the foam ground with everything at rest (essay-1110-before-motion.css), and the five switchable versions of the
   opening and the chapter heads (essay-1112-before-rgi.css). */
:root {
  --gut: clamp(20px, 4vw, 40px);
  --gut-l: max(var(--gut), env(safe-area-inset-left, 0px)); --gut-r: max(var(--gut), env(safe-area-inset-right, 0px));
  --col: min(100%, 1184px); --text: 680px; --out: 180px;
  --plate-dim: none;
  /* Colours are the site's own, as the landing uses them (public/app.css): a white ground, neutral ink and greys, and
     the brand only as accent. Three colours a reader can tell apart in the text: ink for what is read, --mark (lagoon,
     lifted a step so it holds at text size) for the brand's accents, --link (a plain blue, used for nothing else) for
     what can be followed. */
  --fg: #1f1f1f; --fg-2: #3c4043; --muted: #5f6368; --faint: #9aa0a6; --line: #dadce0; --line-2: #ebedf0;
  --surface: #f8f9fa; --surface-2: #f1f3f4; --hover: #f6f7f8; --mark: #1F7389; --link: #1F5FC4;
  --accent: linear-gradient(180deg, #03586F 0%, #23708A 55%, #4A8A9C 100%);
  --sheet: 0 0 0 1px var(--hair), 0 1px 2px rgba(14, 44, 51, .05), 0 28px 56px -36px rgba(14, 44, 51, .34);
  --grain: url(../kit/img/photo-school-grain-b.png);
  --feather: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 76%, transparent);
}
:root[data-theme="dark"] {   /* the landing's dark: a neutral charcoal ground, not deep water; the logo turns to ink, teal stays an accent */
  --plate-dim: brightness(.9);
  --bg: #1f2023; --fg: #e8eaed; --fg-2: #c4c7c5; --muted: #9aa0a6; --faint: #6f7479; --line: #3c4043; --line-2: #2e3033;
  --surface: #26282b; --surface-2: #2f3134; --hover: #292b2e; --mark: #6FB9C9; --link: #8AB4F8;
  --win: #26282b; --paper: #26282b; --chip-bg: #2a2c2f; --grid: #2e3033; --panel-bg: linear-gradient(180deg, #2a2c2f, #252729);
  --brand: #0e5466; --on-brand: #fff; --accent: linear-gradient(180deg, #B6DBE3 0%, #6FB9C9 60%, #57A2B2 100%);
  --sheet: 0 0 0 1px var(--hair), 0 28px 56px -36px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"] :is(.nav, .foot) .logo { color: var(--fg); }
:root[data-theme="dark"] .btn.primary { background: var(--brand); color: var(--on-brand); }
/* Default scale: nine tenths of every size, on anything wider than a phone (the reader's own zoom still applies on top;
   phones keep full size so that 17px text and the drawings' 10px labels stay readable). */
@media (min-width: 761px) { :root { zoom: .9; } }
/* Weights, after the brand manual: Light is for titles, which get their rank from size; every sentence that is read is
   Regular (the kit's base is Light, which suits Latin and leaves Chinese text thin), emphasis is Medium. Nothing is
   set thinner than Light. */
body { padding-left: var(--gut-l); padding-right: var(--gut-r); font-weight: 400; }
.nav { top: calc(18px + env(safe-area-inset-top, 0px)); max-width: calc(100vw - var(--gut-l) - var(--gut-r)); }
.pill .nav { top: calc(6px + env(safe-area-inset-top, 0px)); }
.foot { margin-left: calc(-1 * var(--gut-l)); margin-right: calc(-1 * var(--gut-r)); padding-left: var(--gut-l); padding-right: var(--gut-r); }
.foot-in { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
/* how far through the page: a line along the floating bar, drawn by the scroll position itself */
@supports (animation-timeline: scroll()) {
  .pill .nav::after { content: ""; position: absolute; left: 28px; right: 28px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brand-ink), var(--teal));
    transform-origin: 0 50%; animation: read linear both; animation-timeline: scroll(root); }
  @keyframes read { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---- opening: head, the print, the standfirst ---------------------------------------------------------------- */
.opening { position: relative; isolation: isolate; padding-top: 78px; }
/* the kit's banner (its feathering and drift are the kit's), as wide as the page allows */
.opening .banner { width: min(100vw, 1440px); height: 250px; margin: 0 0 30px calc(50% - min(50vw, 720px));
  background-image: var(--grain); }   /* named here: a relative address in a variable is read against the sheet that uses it */
.head { gap: 22px; max-width: 1000px; }
.head .eyebrow { font: 400 12.5px/1.6 var(--code); letter-spacing: .06em; color: var(--muted); }
.head h1.tp { font-size: clamp(30px, 5.2vw, 70px); }   /* 30px: nine characters of the second line fit a 320px phone */
.head h1 .tp-accent { word-break: keep-all; }
.hang { display: inline-block; width: 0; white-space: nowrap; }   /* the title's colon hangs past the line, so the four characters sit on the axis */
.hero-plate { width: var(--col); margin: 48px auto 0; }
.hero-plate img, .plate img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: var(--lift); filter: var(--plate-dim); }
.hero-plate figcaption, .plate figcaption { margin-top: 14px; font: 400 12.5px/1.7 var(--code); color: var(--muted); }
.hero-plate figcaption { max-width: var(--text); margin-inline: auto; text-align: center; text-wrap: balance; }
.dek { max-width: var(--text); margin: 72px auto 0; font: 400 clamp(17px, 1.5vw, 20px)/1.85 var(--font); color: var(--fg-2); text-align: justify; }

/* ---- the grid: text in the middle, exhibits reach --out on both sides, chapters and sections span it -------------- */
.doc { display: block; width: auto; max-width: none; margin: 0; }
.col, .sec { display: grid; grid-template-columns: [full-start] minmax(0, 1fr) [wide-start] minmax(0, var(--out)) [text-start] min(var(--text), 100%) [text-end] minmax(0, var(--out)) [wide-end] minmax(0, 1fr) [full-end]; }
.col > *, .sec > * { grid-column: text; min-width: 0; }
.col > .sec, .col > .chap { grid-column: full; }
.sec > :is(.fg, .pair), .sec > .wide:has(.tb th:nth-child(4)) { grid-column: wide; }
.col > .fg { grid-column: wide; }   /* credit essay: the opening figure stands before the first chapter, as wide as the others */   /* stats stay in the reading column: they are part of the paragraph above */
.col > .prose:first-child { margin-top: 56px; }

/* ---- running text ------------------------------------------------------------------------------------------- */
.prose { max-width: none; margin-top: 28px; }
.prose p, .prose li { font-size: 18px; line-height: 1.9; color: var(--fg); text-align: justify; line-break: strict; hanging-punctuation: allow-end; }
.prose p + p, .prose ul, .prose ol { margin-top: 1em; }
:is(.prose, .dek, .claim, .limits, .tb, figcaption) a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--link) 36%, transparent); text-underline-offset: 5px; }
:is(.prose, .dek, .claim, .limits, .tb, figcaption) a:hover { text-decoration-color: currentColor; }
::selection { background: color-mix(in srgb, var(--teal) 24%, transparent); }
:is(.fg, .wide, .limits, .pull) + .prose { margin-top: 40px; }

/* ---- what stands out in running text -------------------------------------------------------------------------------
   The headings' three colours, each with one job here. Ink, two weights up: the clause a paragraph rests on; read
   alone, these are the argument (kept under a tenth of the characters: more reads as noise). Lagoon, without extra
   weight beyond Medium: a term at the place it is defined, most of them words the next drawing uses. Grey, a size down: where a
   statement comes from (a bracket of links, marked by build.py), so the only blue in a paragraph is no longer its
   least important part. The running text itself steps back one tone to leave room for the ink. */
.prose p, .prose li { color: var(--fg-2); }
:is(.prose, .dek) b { font-weight: 600; color: var(--fg); }
em.k { font-style: normal; font-weight: 500; color: var(--mark); }
em.k code { font-weight: 500; }
.src { font-size: .78em; color: var(--muted); }
.prose .src a, .tb .src a, figcaption .src a { color: inherit; text-decoration-color: var(--line); }
.prose .src a:hover { color: var(--link); text-decoration-color: currentColor; }
/* someone else's words, set apart: a book face (the reading face is a sans), an opening mark in lagoon, who and where */
.pull { position: relative; margin: 44px 0 0; padding: 30px 0 0; }
.pull::before { content: "\201C"; position: absolute; left: -.04em; top: -6px; font: 400 64px/1 Georgia, "Times New Roman", serif; color: var(--mark); }
.pull p { font: 400 clamp(22px, 2.3vw, 30px)/1.5 "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC", "KaiTi", "SimSun", serif; color: var(--fg); text-wrap: balance; }
.pull footer { margin-top: 12px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.pull footer a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line); text-underline-offset: 4px; }

/* ---- a chapter opens like a chapter of the landing: its label, a title in two lines (ink, then the lagoon gradient), a
   lead; centred, on the page's own ground, under a slice of photograph, one per chapter: the school nearer the surface
   (the opening banner is the same school, lower down), the braided river, the sand. */
.chap { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 136px; padding: 160px 0 8px; text-align: center;
  --strip: url(img/strip-school.png); }
.chap ~ .chap { --strip: url(../kit/img/photo-braids-grain-b.png); }
.chap ~ .chap ~ .chap { --strip: url(../kit/img/photo-grains-grain-b.png); }
.chap::before { content: ""; position: absolute; z-index: -1; top: 0; left: calc(50% - min(50vw, 720px)); width: min(100vw, 1440px); height: 124px;
  background: var(--strip) 50% 46% / 1440px 320px; image-rendering: pixelated; filter: var(--photo); animation: drift 90s steps(18) infinite alternate;
  -webkit-mask-image: var(--feather); -webkit-mask-composite: source-in; mask-image: var(--feather); mask-composite: intersect; }
/* Headings are set in three colours and no others: ink for the first line, the brand's lagoon (solid, not the landing's
   fading gradient) for the second, grey for the label above and the lead below. Under the cover both lines are a step
   heavier than the kit's (Regular over Light instead of Light over Thin), so the strokes hold at 40-54px. */
:is(.head, .chap, .sec-h) .tp-accent { background: none; color: var(--brand-ink); -webkit-text-fill-color: currentColor; }
:is(.chap, .sec-h) .tp-lead { font-weight: 400; }
:is(.chap, .sec-h) .tp-accent { font-weight: 300; }
.chap .eyebrow { font: 500 14.5px/1.5 var(--font); color: var(--muted); }
.chap h2.tp { max-width: 16em; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.16; letter-spacing: -.01em; }
.chap .lead { margin: 8px auto 0; font-weight: 400; color: var(--muted); }

/* ---- a section opens the way the kit's sections do: its number and label, then a light title in two lines, ink and
   the lagoon gradient, at the text's left edge (kit: h2.tp 300 clamp(28px, 3vw, 40px), second line 200) ---------------- */
.sec { padding-top: 96px; }
.chap + .sec { padding-top: 48px; }
.sec-h { gap: 14px; margin-bottom: 30px; }
.sec-h .eyebrow { gap: 10px; font-weight: 600; color: var(--fg); }
.sec-h + .prose { margin-top: 0; }
.plate { margin: 0; }
.plate img { aspect-ratio: 2.2 / 1; object-fit: cover; }
.plate + .prose { margin-top: 30px; }

/* ---- a judgement: the reading face a step larger, beside a lagoon rule that hangs in the margin -------------------- */
.claim, .idea { position: relative; max-width: none; margin-top: 56px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.claim, .idea p { font: 400 clamp(19px, 1.8vw, 23px)/1.7 var(--font); letter-spacing: 0; color: var(--fg); text-wrap: balance; }
.claim::before, .idea::before { content: ""; position: absolute; left: -28px; top: .5em; bottom: .5em; width: 3px; border-radius: 2px; background: linear-gradient(180deg, var(--brand-ink), var(--teal)); }
.claim:has(b) { color: var(--fg-2); }   /* a lead sentence carries the judgement; what follows it steps back */
.claim b { font-weight: 500; color: var(--fg); }
:is(.claim, .idea) + .prose { margin-top: 40px; }

/* ---- exhibits: one white sheet each, lifted off the ground; the caption returns to the reading column -------------- */
.fg, .wide, .limits { margin-top: 44px; }
.fg .panel { padding: 0; border-radius: 0; background: none; box-shadow: none; }
.fg .win { padding: 30px 32px 24px; border-radius: 18px; box-shadow: var(--sheet); }
.fg[data-fig="forge"] .win, .fg[data-fig="shop"] .win { padding: 8px; }
.fg figcaption { width: min(var(--text), 100%); max-width: none; margin: 16px auto 0; text-align: left; font: 400 13.5px/1.75 var(--font); color: var(--muted); }
.fg figcaption b { margin-right: 2px; font: 500 12px var(--code); letter-spacing: .06em; color: var(--mark); }
#forge .fg-control > span { white-space: nowrap; }

/* ---- tables, definition rows and findings: ruled, on the ground, no card ------------------------------------------- */
.wide:has(> .tb), .rows, .recs { padding: 0; border-radius: 0; background: none; box-shadow: none; border-block: 1.5px solid var(--fg); }
.tb { font-size: 15.5px; }
.tb th { padding: 11px 20px 10px 0; font: 500 12.5px/1.5 var(--font); color: var(--muted); border-bottom: 1px solid var(--fg); white-space: normal; vertical-align: bottom; }
.tb td { padding: 13px 20px 13px 0; border-bottom: 1px solid var(--line); line-height: 1.7; }
.tb :is(th, td):last-child { padding-right: 0; }
.tb td:first-child, .tb th:first-child { white-space: nowrap; }
.tb td:first-child { font: 500 15.5px/1.7 var(--font); }
.rows > div { grid-template-columns: 4em minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rows b { font: 500 15.5px/1.75 var(--font); }
.finds { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 36px; }   /* :::stats: a reading set large, what it counts, under which conditions */
.finds > div, .finds > div:hover { position: relative; padding: 18px 0 20px; border-radius: 0; background: none; box-shadow: none; transform: none; }
.finds > div::before { content: ""; position: absolute; inset: 0 0 auto; height: 1.5px; background: var(--fg); }
.finds > div:hover::before { background: var(--brand-ink); }
.finds > div { gap: 6px; }
.finds b { font: 300 clamp(32px, 3.3vw, 44px)/1.15 var(--display); letter-spacing: -.01em; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.finds b i { margin-left: 7px; font: 400 14px/1 var(--font); letter-spacing: 0; color: var(--muted); }
.finds b em.k { font-weight: 300; }
.finds span { font-size: 15.5px; line-height: 1.6; font-weight: 500; color: var(--fg); }
.finds small { margin-top: 0; padding-top: 0; border-top: 0; font: 400 13px/1.65 var(--font); color: var(--muted); }
.limits { padding: 20px 24px; border-radius: 16px; }
.limits li { font-size: 16px; }
.tiles .bigc { font-size: 30px; }
/* what the essay rests on: apparatus, so smaller and lighter than a table */
.records { margin-top: 72px; }
.records .eyebrow { font: 400 12.5px var(--code); letter-spacing: .1em; color: var(--muted); }
.recs { border-block: 1px solid var(--line); }
.recs > div { grid-template-columns: 15em minmax(0, 1fr); padding: 9px 0; border-bottom-color: var(--line); font-size: 13.5px; }

/* ---- two lists on one sheet, a hairline between them and the step from one to the other on it; under both, the states
   one submission passes through, drawn with the stops the repository figure uses (open, checked, on the trunk) ------- */
.pair { padding: 28px 32px 22px; border-radius: 18px; background: var(--win); box-shadow: var(--sheet); }
.pair-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 72px; }
.pair-cols > div { position: relative; }
.pair-cols > div + div::before { content: ""; position: absolute; left: -36px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.pair-cols > div + div::after { content: "\2192"; position: absolute; left: -49px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--win); box-shadow: inset 0 0 0 1px var(--line);
  font: 400 14px/26px var(--font); text-align: center; color: var(--muted); }
.pair-k { font: 500 12.5px var(--code); letter-spacing: .08em; color: var(--muted); }
.pair-cols > div + div .pair-k { color: var(--mark); }
.pair h4 { margin: 6px 0 12px; font: 500 19px/1.4 var(--display); color: var(--fg); }
.pair-cols ol { margin: 0; padding: 0; list-style: none; counter-reset: s; font-size: 15.5px; line-height: 1.65; color: var(--fg-2); }
.pair-cols li { position: relative; padding: 7px 0 7px 30px; border-top: 1px solid var(--line-2); counter-increment: s; }
.pair-cols li::before { content: counter(s); position: absolute; left: 0; top: 8px; font: 400 12.5px/1.9 var(--code); color: var(--faint); }
.pair-track { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.pair-track p { font-size: 13px; color: var(--muted); }
.pair-track ol { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0; padding: 0; list-style: none; }
.pair-track li { display: inline-flex; align-items: center; gap: 9px; font: 500 14.5px/1.4 var(--font); color: var(--fg); }
.pair-track li::before { content: ""; flex: none; width: 11px; height: 11px; box-sizing: border-box; border: 1.5px solid var(--fg); border-radius: 50%; }
.pair-track li:nth-child(2)::before { background: var(--fg); box-shadow: inset 0 0 0 2px var(--win); }
.pair-track li:nth-child(n + 3)::before { border-color: var(--mark); background: var(--mark); }
.pair-track li:not(:last-child)::after { content: ""; width: 34px; height: 1px; margin: 0 14px 0 5px; background: var(--faint); }

/* ---- contents: under the standfirst, one line per chapter -------------------------------------------------------------
   Markup (build.py otp): .la-ch per chapter = .la-c (number, name, minutes) + .la-ss > .la-in > .la-s per section
   (number, label, a square per figure); .la-thumb, .la-fish and .la-left serve the wide rail only. */
:root { --wash-nav: linear-gradient(100deg, rgba(237,214,168,.42), rgba(194,210,190,.26) 70%, rgba(168,196,214,.12)); }   /* the workbench's selected-row haze: sand, shallows, water */
:root[data-theme="dark"] { --wash-nav: linear-gradient(100deg, rgba(111,185,201,.16), rgba(237,214,168,.05) 75%, transparent); }
.otp { position: static; display: block; max-width: var(--text); margin: 56px auto 0; padding: 16px 0; border-block: 1px solid var(--line); font-size: 14.5px; line-height: 2.1; }
.otp-head, .la-thumb, .la-fish, .la-left, .la-m, .la-sn, .la-f { display: none; }
.la { display: grid; gap: 4px; }
.la-ch { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); align-items: baseline; column-gap: 18px; }   /* a long chapter wraps under its own sections */
.la-ss { display: block; }
.la-in { display: flex; flex-wrap: wrap; column-gap: 18px; }
.otp .la a { display: block; padding: 0; border: 0; color: var(--fg-2); font-weight: 400; text-decoration: none; }
.otp .la .la-c { display: flex; gap: .5em; font: 400 12px var(--code); letter-spacing: .1em; color: var(--muted); }
.otp .la a:hover { color: var(--brand-ink); }
.otp .la .la-c.long .la-name { display: none; }   /* a whole title does not fit beside the sections: the numeral alone */
.la-ch:has(> .la-c.long) { grid-template-columns: 2.2em minmax(0, 1fr); }

/* On a wide screen the page has two columns below the cover: the reading column on the left, with the standfirst, the
   text and every heading on one left edge and the exhibits reaching the column's right edge; and the contents as a
   column that stays in view on the right, its right edge the cover print's, with no frame of its own. It is drawn in the
   brand's own terms and the page's three colours: lagoon for where the reader is, ink for what is read, grey for the rest.
   The contents are a route folded by chapter: each chapter one row with its reading time, only the chapter being read
   open on the route's hairline, one haze over the sections on screen, a fish at the section being read, and in the
   head the logo's five fish, one per chapter (build.py otp and RAIL; the 11-13 proposal toc-proposals.html, option A). */
@media (min-width: 1160px) {
  :root { --col: min(100%, 1240px); --text: 720px; }
  .dek { width: var(--col); max-width: none; padding-right: calc(var(--col) - var(--text)); }
  .doc { display: grid; grid-template-columns: minmax(0, 1fr) 232px; column-gap: 48px; align-items: start; width: var(--col); margin: 0 auto; }
  .doc > .col { grid-area: 1 / 1; }
  .col, .sec { grid-template-columns: [full-start wide-start text-start] minmax(0, var(--text)) [text-end] minmax(0, 1fr) [wide-end full-end]; }
  .fg figcaption { margin-left: 0; }
  .chap { align-items: flex-start; text-align: left; }   /* chapters open on the same edge, under a strip as wide as the column */
  .chap::before { left: 0; width: 100%; }
  .chap .lead { margin-left: 0; }
  .otp { grid-area: 1 / 2; position: sticky; top: 92px; max-width: none; margin: 62px 0 0; padding: 0; border: 0; font-size: 14px; line-height: 1.4; }
  .otp-head { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 12px; margin: 0 0 10px -6px; }   /* the school, then the word: with no frame, they stay together above the route */
  .otp-t { font: 600 14px var(--font); color: var(--fg); }
  .otp-mark { display: block; width: 40px; color: var(--mark); }
  .otp-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
  .otp-mark .slot { opacity: .16; }
  .pill .nav::after { display: none; }   /* one gauge at a time: beside the school, the bar's line would say the same thing twice */
  /* the logo's five fish are the five chapters: a faint slot until the chapter is reached, then the fish swims in from
     the lower left (the brand's direction); the chapter being read keeps swimming, a finished one rests */
  .otp-mark .fish { opacity: 0; transform: translate(-180px, 110px); transition: opacity var(--shoal-scene) var(--shoal-ease), transform var(--shoal-scene) var(--shoal-ease); }
  .otp-mark .fish.on { opacity: 1; transform: none; }
  .otp-mark .fish.now { animation: school-swim 3.84s var(--shoal-ease) infinite; }
  @keyframes school-swim { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, -14px); } }
  .la { position: relative; display: block; }
  .la-ch { display: block; }
  .otp .la .la-c { display: grid; grid-template-columns: 1.7em minmax(0, 1fr) auto; align-items: baseline; gap: 0 8px; width: auto; padding: 7px 10px 7px 6px;
    font: 400 14px/1.35 var(--font); letter-spacing: 0; color: var(--fg-2); transition: color var(--shoal-fast) var(--shoal-ease); }
  .la-n { font: 500 12px var(--code); color: var(--faint); }
  .la-name { font-weight: 500; }
  .otp .la .la-c.long .la-name { display: inline; }
  .la-m { display: inline; font: 400 11px var(--code); color: var(--faint); white-space: nowrap; }
  .la-ch.done .la-n, .la-ch.cur .la-n { color: var(--mark); }
  .otp .la .la-ch.done > .la-c { color: var(--fg); }
  .otp .la .la-ch.cur > .la-c { color: var(--brand-ink); }
  /* a chapter opens by its height, the sections hang on the route's hairline */
  .la-ss { display: grid; grid-template-rows: 0fr; margin-left: 15px; border-left: 1px solid var(--line); opacity: 0;
    transition: grid-template-rows var(--shoal-scene) var(--shoal-ease), opacity var(--shoal-panel) var(--shoal-ease); }
  .la-ch.cur .la-ss { grid-template-rows: 1fr; opacity: 1; }
  .la-in { display: block; min-height: 0; overflow: hidden; }
  .la-in > .la-s:last-child { margin-bottom: 6px; }
  .otp .la .la-s { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 4px 22px; font-size: 13.5px; line-height: 1.4; color: var(--muted);
    transition: color var(--shoal-fast) var(--shoal-ease); }
  .la-sn { display: inline; min-width: 2.3em; font: 400 11px var(--code); color: var(--faint); }
  .otp .la .la-s.done { color: var(--fg-2); }
  .otp .la .la-s.here { color: var(--brand-ink); font-weight: 600; }
  .otp .la a:hover { color: var(--fg); }
  .la-f { display: inline-flex; gap: 3px; margin-left: auto; align-self: center; }
  .la-f i { width: 6px; height: 6px; box-sizing: border-box; border: 1px solid var(--faint); border-radius: 1.5px; }
  .la-s.done .la-f i, .la-s.here .la-f i { border-color: var(--mark); background: var(--mark); }
  /* one haze over the sections on screen, and a fish beside the one being read (build.py RAIL places both) */
  .la-thumb { display: block; position: absolute; left: 16px; right: 0; top: 0; height: 0; z-index: 0; border-radius: 0 8px 8px 0; background: var(--wash-nav); opacity: 0; pointer-events: none;
    transition: transform var(--shoal-panel) var(--shoal-ease), height var(--shoal-panel) var(--shoal-ease), opacity var(--shoal-panel) var(--shoal-ease); }
  .la-thumb.on { opacity: 1; }
  .la-fish { display: block; position: absolute; left: 3px; top: 0; z-index: 2; width: 25px; height: 14px; color: var(--brand-ink); opacity: 0; pointer-events: none;
    transition: transform var(--shoal-scene) var(--shoal-ease), opacity var(--shoal-panel) var(--shoal-ease); }
  .la-fish.on { opacity: 1; }
  :root[data-theme="dark"] .la-fish { color: var(--mark); }
  .la-fish svg { display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
  .la-fish.moving svg { animation: fish-tail var(--shoal-scene) var(--shoal-ease); }
  @keyframes fish-tail { 35% { transform: rotate(-9deg); } 70% { transform: rotate(5deg); } }
  .la-left { display: block; margin: 14px 0 0 6px; font: 400 11.5px var(--code); color: var(--muted); }
}
@media (min-width: 1160px) and (prefers-reduced-motion: reduce) {
  .la-ss, .la-thumb, .la-fish, .otp-mark .fish { transition: none; }
  .otp-mark .fish.now, .la-fish.moving svg { animation: none; }
}

@media (max-width: 1100px) {
  /* a drawing or table wider than the column scrolls inside its frame; a shade marks the side that has more */
  .fg .win, .wide:has(> .tb) { --on: var(--bg); --shade: color-mix(in srgb, var(--fg) 22%, transparent);
    background: linear-gradient(90deg, var(--on) 40%, transparent) 0 0 / 32px 100% no-repeat local, linear-gradient(270deg, var(--on) 40%, transparent) 100% 0 / 32px 100% no-repeat local,
      linear-gradient(90deg, var(--shade), transparent) 0 0 / 12px 100% no-repeat scroll, linear-gradient(270deg, var(--shade), transparent) 100% 0 / 12px 100% no-repeat scroll, var(--on); }
  .fg .win { --on: var(--win); }
  .fg .lanes { min-width: 960px; }
}
@media (max-width: 820px) {   /* no margin left for the rule to hang in */
  .claim, .idea { padding-left: 20px; }
  .claim::before, .idea::before { left: 0; }
}
@media (max-width: 760px) {
  .hero-plate { margin-top: 28px; }
  .hero-plate img { aspect-ratio: 1.25 / 1; object-fit: cover; object-position: 46% 50%; border-radius: 16px; }
  .hero-plate figcaption { text-align: left; text-wrap: wrap; }
  .plate img { aspect-ratio: 1.5 / 1; border-radius: 16px; }
  .dek { margin-top: 40px; line-height: 1.75; }
  .otp { margin-top: 40px; }
  .sec-h h2.tp { font-size: 25px; }   /* a step under the chapter's 30px */
  .col > .prose:first-child { margin-top: 40px; }
  .prose p, .prose li { font-size: 17px; line-height: 1.8; }
  .chap { margin-top: 72px; padding-top: 148px; }
  .sec { padding-top: 72px; }
  .claim, .idea { margin-top: 44px; }
  /* exhibits take the gutter: the sheet stops 8px from the glass, and the drawing gets a fifth more width */
  .fg { margin-inline: calc(8px - var(--gut)); }
  .fg .win { padding: 16px 14px 12px; border-radius: 14px; }
  .fg figcaption { padding-inline: calc(var(--gut) - 8px); }
  .wide:has(> .tb) { overflow-x: auto; }
  .tb { font-size: 15px; }
  .tb :is(th, td) { padding-right: 14px; }
  .tb th:first-child { white-space: normal; }
  .wide:has(.tb th:nth-child(4)) .tb { min-width: 640px; }
  .finds { grid-template-columns: minmax(0, 1fr); }
  .recs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pair { margin-inline: calc(8px - var(--gut)); padding: 20px 18px 16px; border-radius: 14px; }
  .pair-cols { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .pair-cols > div + div::before, .pair-cols > div + div::after { display: none; }
  .pair-track li:not(:last-child)::after { width: 16px; margin: 0 8px 0 2px; }
  .pull { margin-top: 36px; }
}

/* ==== how things move ==================================================================================================
   Everything enters from the lower left on --shoal-ease, in the brand's three durations; what differs is who follows whom.
   Type: a title or a judgement arrives piece by piece. `.word` is one word with its punctuation, marked by the script in
     build.py; `.in` is set by the same script once the block is 14% into the window; the cover's title uses the kit's
     own `.seen`, which is set on load.
   Exhibits: sheets lift off the ground; columns, rows and cards follow each other (--n is the place in the row).
   Scroll: the cover recedes as it leaves. Only where the browser can tie
     an animation to the scroll position; elsewhere they stay still.
   Without script nothing is hidden; with reduced motion, or on paper, everything is simply there. */
.word { white-space: nowrap; }
:is(.finds > div, .rows > div, .tb tbody tr):nth-child(2) { --n: 1; } :is(.finds > div, .rows > div, .tb tbody tr):nth-child(3) { --n: 2; }
:is(.finds > div, .rows > div, .tb tbody tr):nth-child(4) { --n: 3; } :is(.finds > div, .rows > div, .tb tbody tr):nth-child(5) { --n: 4; }
:is(.rows > div, .tb tbody tr):nth-child(6) { --n: 5; } :is(.rows > div, .tb tbody tr):nth-child(n + 7) { --n: 6; }

/* -- type ------------------------------------------------------------------------------------------------------------ */
.js :is(.head h1, .chap h2, .sec-h h2) .word { display: inline-block; transition: opacity var(--shoal-scene) var(--shoal-ease), transform var(--shoal-scene) var(--shoal-ease), filter var(--shoal-scene) var(--shoal-ease);
  transition-delay: calc(var(--d, 0ms) + var(--i) * var(--step, 40ms)); }
.js :is(.head h1:not(.seen), .chap:not(.in) h2, .sec-h:not(.in) h2) .word { opacity: 0; transform: translate(-.22em, .5em); filter: blur(10px); }
/* the cover and each chapter: the first line arrives word by word, the second is wiped in (it carries a gradient, so
   it stays whole) */
.head h1 { --d: 120ms; --step: 110ms; }
.js .head h1[data-rv] { opacity: 1; transform: none; }
.js :is(.head h1, .chap h2, .sec-h h2) .tp-accent { clip-path: inset(-.1em -.1em -.2em 0); transition: clip-path var(--shoal-scene) var(--shoal-ease) 360ms, transform var(--shoal-scene) var(--shoal-ease) 360ms; }
.js :is(.head h1:not(.seen), .chap:not(.in) h2, .sec-h:not(.in) h2) .tp-accent { clip-path: inset(-.1em 100% -.2em 0); transform: translate(-.3em, .12em); }
.js .hero-plate[data-rv]:not(.seen) { transform: translate(-18px, 32px) scale(.985); }
@media (min-width: 1000px) {   /* where the line above the title fits on one line, its letters draw together */
  .js .head .eyebrow[data-rv] { transition: opacity var(--shoal-scene) var(--shoal-ease), transform var(--shoal-scene) var(--shoal-ease), letter-spacing var(--shoal-scene) var(--shoal-ease); }
  .js .head .eyebrow[data-rv]:not(.seen) { letter-spacing: .32em; }
}
/* a chapter: its label, then its title */
.chap h2 { --d: 120ms; --step: 70ms; }
.js .chap > [data-rv] { opacity: 1; transform: none; }
.js .chap .eyebrow { transition: opacity var(--shoal-scene) var(--shoal-ease), transform var(--shoal-scene) var(--shoal-ease); }
.js .chap:not(.in) .eyebrow { opacity: 0; transform: translate(-10px, 8px); }
.js .chap .lead { transition: opacity var(--shoal-scene) var(--shoal-ease) 480ms; }
.js .chap:not(.in) .lead { opacity: 0; }
/* a section: its label, then the title, the first line word by word and the second wiped in */
.sec-h h2 { --d: 120ms; --step: 50ms; }
.js .sec-h .eyebrow { transition: opacity var(--shoal-scene) var(--shoal-ease) 80ms, transform var(--shoal-scene) var(--shoal-ease) 80ms; }
.js .sec-h:not(.in) .eyebrow { opacity: 0; transform: translate(-10px, 8px); }
/* a judgement: its rule drops, and the sentence comes into focus from its first word to its last (no movement: the
   lines keep their breaks) */
.js :is(.claim, .idea)[data-rv] { opacity: 1; transform: none; }
.claim::before, .idea::before { transform-origin: 50% 0; transition: transform var(--shoal-scene) var(--shoal-ease); }
.js :is(.claim, .idea):not(.in)::before { transform: scaleY(0); }
.js :is(.claim, .idea) .word { transition: opacity var(--shoal-scene) var(--shoal-ease), filter var(--shoal-scene) var(--shoal-ease); transition-delay: calc(120ms + var(--i) * 14ms); }
.js :is(.claim, .idea):not(.in) .word { opacity: 0; filter: blur(6px); }

/* -- exhibits -------------------------------------------------------------------------------------------------------- */
.js .prose[data-rv]:not(.seen) { transform: translateY(12px); }
.js .fg[data-rv]:not(.seen) { transform: translate(-20px, 36px) scale(.98); }
.fg .win { transition: box-shadow var(--shoal-scene) var(--shoal-ease) 120ms; }
.js .fg:not(.seen) .win { box-shadow: 0 0 0 1px var(--hair); }
.js :is(.finds, .pair)[data-rv] { opacity: 1; transform: none; }
.js :is(.finds, .pair, .rows) > div { transition: opacity var(--shoal-scene) var(--shoal-ease) calc(var(--n, 0) * 80ms), transform var(--shoal-scene) var(--shoal-ease) calc(var(--n, 0) * 80ms); }
.js :is(.finds, .pair, .rows):not(.seen) > div { opacity: 0; transform: translate(-12px, 16px); }
.finds > div::before { transform-origin: 0 50%; transition: transform var(--shoal-scene) var(--shoal-ease) calc(120ms + var(--n, 0) * 80ms), background var(--shoal-fast) var(--shoal-ease); }
.js .finds:not(.seen) > div::before { transform: scaleX(0); }
.pair > div:last-child { --n: 2; }
.js .tb tbody tr { transition: opacity var(--shoal-scene) var(--shoal-ease) calc(120ms + var(--n, 0) * 50ms); }
.js .wide:not(.seen) > .tb tbody tr { opacity: 0; }
:is(.prose, .dek, .claim, .limits, .tb, figcaption) a { transition: text-decoration-color var(--shoal-fast) var(--shoal-ease); }

/* -- scroll ---------------------------------------------------------------------------------------------------------- */
@supports (animation-timeline: view()) {
  .hero-plate img { transform-origin: 50% 100%; animation: recede linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes recede { to { transform: scale(.93); opacity: .6; } }
}

@media (prefers-reduced-motion: reduce) {
  .js .opening *, .js .doc *, .js .doc *::before { transition: none !important; }
}
@media print {
  .js [data-rv], .js .word, .js .eyebrow, .js .lead, .js :is(.finds, .pair, .rows) > *, .js .tb tr { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js :is(.head h1, .chap h2, .sec-h h2) .tp-accent { clip-path: none !important; }
}

/* ---- v2: the academic apparatus ------------------------------------------------------------------------------
   :::thm is a definition, proposition or observation: the label in ink, the body as running text, a hairline on the
   left (no card). The proof steps back and ends with ∎. :::eq is a displayed equation with its number on the right.
   MathML is drawn by the browser; the math face falls back to the system's. :::refs is the numbered reference list. */
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math; font-size: 1.04em; }
.katex { white-space: nowrap; }
.thm { margin-top: 32px; padding: 2px 0 2px 20px; border-left: 1px solid var(--fg); }
.thm[data-kind="定义"], .thm[data-kind="Definition"] { border-left-color: var(--line); }
.thm p { font-size: 17px; line-height: 1.85; color: var(--fg); text-align: justify; line-break: strict; }
.thm p + p { margin-top: .7em; }
.thm .thm-k { font-weight: 600; color: var(--fg); }
.thm .thm-n { color: var(--fg-2); }
.thm .proof { font-size: 15.5px; line-height: 1.8; color: var(--fg-2); }
.thm .qed { margin-left: .4em; color: var(--muted); }
.thm + .prose, .mathblock + .prose { margin-top: 32px; }
.mathblock { position: relative; display: flex; align-items: center; justify-content: center; margin-top: 26px; padding: 4px 56px; overflow-x: auto; }
.mathblock .mb-m { font-size: 19px; color: var(--fg); }
.mathblock .mb-n { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 400 13px var(--code); color: var(--muted); }
.reflist { margin-top: 28px; padding: 0; list-style: none; }
.reflist li { padding: 8px 0 8px 1.8em; text-indent: -1.8em; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--fg-2); overflow-wrap: anywhere; }
.reflist .rk { margin-right: .7em; font-weight: 500; color: var(--fg); }
.reflist li:target { background: var(--wash, color-mix(in srgb, var(--link) 8%, transparent)); }
.reflist a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--link) 36%, transparent); text-underline-offset: 4px; }
@media (max-width: 560px) {
  .thm { padding-left: 14px; }
  .thm p { font-size: 16px; }
  .mathblock { padding: 4px 34px 4px 0; justify-content: flex-start; }
  .mathblock .mb-m { font-size: 17px; }
}
