/* Writing: the article page. Tokens, masthead, labels and the Writing list come from site.css;
   nothing here adds a colour. Blue appears only inside figures, for data. Both themes: the tokens flip
   with the page; what the article holds of its own for the light theme is in the last section. */

/* The reading type (D060): the body's size, line height and column, and one scale from the body, each
   size a step of --ratio: 1.2 on phones, 1.25 from 900 px (59.2, 30.3, 24.3, 19.4 and 15.5 px). The
   column keeps the width it had at 19 px, so a line holds about 66 characters. */
:root {
  --body: 17px;
  --leading: 1.66;
  --col: 35.5em;
  --ratio: 1.2;
  --step--1: calc(var(--body) / var(--ratio));
  --step-1: calc(var(--body) * var(--ratio));
  --step-2: calc(var(--body) * var(--ratio) * var(--ratio));
  --step-5: calc(var(--body) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio));
}
@media (min-width: 900px) { :root { --body: 19.4px; --leading: 1.62; --col: 30.6em; --ratio: 1.25; } }

/* ------------------------------------------------------------------ the article */

.article { padding-bottom: 120px; }

/* One reading column, centred; the contents sit in the left gutter on wide screens. */
.grid {
  font-size: var(--body);
  display: grid;
  grid-template-columns: var(--margin) minmax(0, 1fr) min(var(--col), calc(100% - 2 * var(--margin))) minmax(0, 1fr) var(--margin);
}
.grid > * { grid-column: 3; }

.art-head { padding-top: calc(var(--header-h) + 48px); }
@media (min-width: 900px) { .art-head { padding-top: calc(var(--header-h) + 104px); } }
.kicker, .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6em;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
/* the kicker link: padding makes a 24 px target, negative margins keep the line where it was */
.kicker a { padding: 4px 0; margin: -4px 0; color: var(--ink-2); transition: color 160ms var(--ease); }
.kicker a:hover { color: var(--ink); }
/* The title: the scale's fifth step, a touch heavier and tighter than a page title, since it sits in
   the reading column above smaller text. */
.art-head h1 {
  font-family: var(--font-display);
  margin-top: 20px;
  font-size: clamp(34px, 8.6vw, var(--step-5));
  line-height: 1.05;
  font-weight: calc(var(--title-weight) + 20);
  letter-spacing: -0.034em;
  text-wrap: balance;
}
@media (min-width: 900px) { .art-head h1 { font-size: clamp(46px, 4.2vw, var(--step-5)); line-height: 1.04; } }
/* One step above the prose (--body). */
.standfirst {
  margin-top: 22px;
  font-size: var(--step-1);
  line-height: 1.45;
  letter-spacing: -0.004em;
  color: var(--ink-2);
  text-wrap: pretty;
}
@media (min-width: 900px) { .standfirst { line-height: 1.42; } }
.meta-line { margin-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--hair); }
@media (max-width: 559.98px) {
  .meta-line .draft { flex-basis: 100%; }
  .meta-line span[aria-hidden]:has(+ .draft) { display: none; }
}

/* The cover: above the head on narrow screens; in the right gutter beside it on wide ones. */
.art-cover { order: -1; height: clamp(180px, 46vw, 240px); margin-bottom: 24px; }
@media (min-width: 900px) { .art-head:has(.art-cover) { padding-top: calc(var(--header-h) + 48px); } }
@media (min-width: 1240px) { .art-head .art-shot { grid-column: 2 / 5; height: 340px; } }
/* A close view of the article's own figure, its walk lit, fading into the page at the edges. */
.art-shot { position: relative; overflow: hidden; border-radius: 4px; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent), linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent), linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-composite: intersect; }
.art-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.6); transform-origin: 70% 40%; }
.meta-line .draft { color: var(--ink); }
/* a republished piece says where it first appeared, on its own line under the date */
.meta-line .repub { flex-basis: 100%; margin-top: 6px; }

/* body: a touch tight (-0.006em) at the text's own optical size, and one step below the titles' Ink in
   the dark (--ink-body); a title and a bold word keep Ink */
.prose { font-size: var(--body); line-height: var(--leading); font-weight: 400; letter-spacing: -0.006em; color: var(--ink-body); }
.prose section { margin-top: 72px; }
@media (min-width: 900px) { .prose section { margin-top: 104px; } }
.prose section:first-child { margin-top: 64px; }
/* a section's title: the scale's second step, 1.56 times the body, heavier than the text it opens */
.prose h2 { font-size: var(--step-2); line-height: 1.18; font-weight: 480; letter-spacing: -0.022em; text-wrap: balance; color: var(--ink); }
:root[data-theme="light"] .prose h2 { font-weight: 520; }
/* Its number is part of the title: the title's own face, size and weight in Ink 2, with figures of one width
   (D060). The text's left edge never breaks. From 900 px the number hangs in the margin on the first line's
   baseline, so every title starts on the text's own edge; the gap to the contents, when they show, is never
   under 40 px. Under 900 px there is no margin to hang in, so it runs into the title's first line and the
   title's other lines return to the edge. */
.prose h2 .sec {
  margin-right: 0.4em;
  text-decoration: none;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition: color 160ms var(--ease);
}
.prose h2 .sec:hover { color: var(--ink); }
@media (min-width: 900px) {
  .prose h2:has(> .sec) { display: grid; grid-template-columns: 1.3em minmax(0, 1fr); column-gap: 0.45em; align-items: baseline; margin-left: -1.75em; }
  .prose h2 .sec { justify-self: end; margin-right: 0; }
}
.prose h2 + p, .prose h2 + .ph { margin-top: 24px; }
.prose p + p { margin-top: 1.05em; }
.prose p, .prose li { text-wrap: pretty; hanging-punctuation: first; }
.prose a { text-decoration: underline; text-decoration-color: var(--hair-2); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 160ms var(--ease); }
.prose a:hover { text-decoration-color: var(--ink-2); }
.prose code { font-family: var(--font-mono); font-size: 0.84em; padding: 0.08em 0.32em; border: 1px solid var(--hair); border-radius: 4px; white-space: nowrap; }
.prose pre code { padding: 0; border: 0; border-radius: 0; font-size: inherit; white-space: inherit; }
.prose a.ref { padding: 0.26em 0.15em; font-family: var(--font-label); font-size: 0.78em; letter-spacing: 0.02em; color: color-mix(in oklab, var(--ink) 80%, var(--ground)); text-decoration: none; transition: color 160ms var(--ease); }
.prose a.ref:hover { color: var(--ink); }
.prose * + .code, .prose * + .table, .prose * + .ph, .prose * + .fig { margin-top: 30px; }
.prose .code + *, .prose .table + *, .prose .ph + *, .prose .fig + * { margin-top: 30px; }

/* lists in the body: a short hairline for a marker, the item's lead words a step heavier */
.prose section > ul { display: grid; gap: 0.6em; }
.prose section > * + ul, .prose section > ul + * { margin-top: 1.05em; }
.prose h2 + ul { margin-top: 24px; }
.prose section > ul > li { position: relative; padding-left: 1.5em; }
.prose section > ul > li::before { content: ""; position: absolute; left: 0; top: calc(var(--leading) * 0.5em); width: 0.7em; border-top: 1px solid var(--ink-2); }
.prose strong { font-weight: 500; color: var(--ink); }

/* a disclosure closes the piece in full, quieter than the text but never hidden */
.prose .disclosure { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--hair); }
.prose .disclosure h2 { font-family: var(--font-label); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
/* At its smaller size the disclosure keeps its lines under 80 characters. */
.prose .disclosure p { max-width: 34em; margin-top: 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

/* code: IBM Plex Mono, a quiet copy control that works from the keyboard */
.code { border: 1px solid var(--hair); border-radius: 6px; }
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 4px 0 16px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}
.copy {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms var(--ease);
}
.copy:hover { color: var(--ink); }
.copy[data-done] { color: var(--ink); }
.code pre {
  overflow-x: auto;
  padding: 16px 16px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  tab-size: 2;
}
@media (min-width: 900px) { .code pre { font-size: 13px; padding: 18px 20px 20px; } }
.code pre:focus-visible { outline-offset: -2px; }
.code pre.is-clipped { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.code { position: relative; }
.code:has(pre.is-clipped) .code-bar > span::after { content: "  ·  scroll →"; white-space: pre; color: var(--ink-2); }
.code .c { color: var(--ink-2); }

/* tables: the architect's schedule (D058). Under each column's name a dimension line spans the column, as on the
   garden's plan; rows are parted by the faintest line. The first column names the row, quietly; the values are Ink.
   The lines are drawn once, by the pen, when the table comes into view */
.table { overflow-x: auto; }
.table table { width: 100%; border-collapse: collapse; font-size: var(--step--1); line-height: 1.45; }
.table thead th { padding: 0 16px 10px 0; font-size: 13px; line-height: 1.5; font-weight: 500; text-align: left; vertical-align: bottom; color: var(--ink); }
.table thead th:not(:empty)::after {
  content: ""; display: block; height: 9px; margin-top: 10px; transform-origin: left center;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) left center / 1px 9px no-repeat,
    linear-gradient(var(--ink-2), var(--ink-2)) right center / 1px 9px no-repeat,
    linear-gradient(var(--ink-2), var(--ink-2)) center / 100% 1px no-repeat;
}
.table td, .table tbody th { padding: 13px 16px 13px 0; border-top: 1px solid var(--hair); vertical-align: baseline; font-weight: 400; text-align: left; color: var(--ink); }
.table tbody tr:first-child > * { border-top: 0; }
.table tr > :last-child { padding-right: 0; }
.table tbody tr > :first-child { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.table td code { border: 0; padding: 0; font-size: 0.86em; color: var(--ink); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table thead .num::after { transform-origin: right center; }
/* a column named for products carries their makers' marks before its name */
.table .th-marks { display: inline-flex; align-items: center; column-gap: 6px; vertical-align: -3px; margin-right: 6px; }
.table .th-marks svg { width: 16px; height: 16px; fill: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .js .table:not(.is-in) thead th::after { transform: scaleX(0); }
  .js .table.is-in thead th::after { transition: transform 700ms var(--ease) calc(var(--i, 0) * 80ms); }
}
/* a table that follows a figure's caption stands clear of it, so the caption stays the figure's */
.prose .dia + .table { margin-top: 64px; }

/* placeholders: dashed, as the hero marks a proposal */
.ph { padding: 2px 0 2px 18px; border-left: 1px dashed var(--hair-2); }
.ph-label { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.ph p:not(.ph-label) { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.prose h2.is-ph span:last-child { color: var(--ink-2); }

/* sources and next: the page ends with its content */
.prose .sources { margin-top: 96px; padding-top: 24px; border-top: 1px solid var(--hair); }
.prose .sources h2 { font-family: var(--font-label); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.prose .sources ol { margin-top: 14px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); counter-reset: s; }
.sources li { display: grid; grid-template-columns: 2.2em 1fr; }
.sources li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--font-label); font-size: 11px; line-height: 2; }
.sources a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair-2); text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* the article's two actions, at the end of the meta line (D058, D059): a disc of the theme switch's sand each, with its mark,
   and a label. Copy for agents puts the essay on the clipboard as Markdown; Share opens the phone's own sheet or a short
   menu. Made by writing/page.js, so a page without scripts has neither */
.art-acts { display: flex; align-items: center; column-gap: 18px; margin-left: auto; }
.act { position: relative; display: inline-flex; align-items: center; column-gap: 8px; min-height: 44px; margin: -14px 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); cursor: pointer; transition: color 160ms var(--ease); -webkit-tap-highlight-color: transparent; }
/* each action is a disc of the theme switch's sand, the same render, the same inset and the same light patch behind
   its mark; the mark is drawn as the switch's moon and sun are, a solid shape and 1.3 px strokes, in their colour */
.act-sand {
  --act-sand: 35, 37, 38;
  position: relative; flex: none; width: 32px; height: 32px; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(circle 9.6px at 50% 50%, rgba(var(--act-sand), 0.96), rgba(var(--act-sand), 0.9) 62%, rgba(var(--act-sand), 0)),
    url(/assets/img/theme/track-dark.webp) center / 60px 32px no-repeat;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(var(--line-rgb), 0.06), 0 0 0 1px var(--hair);
  transition: transform 160ms var(--ease);
}
[data-act="share"] .act-sand { background-position: center, 72% 50%; }
:root[data-theme="light"] .act-sand {
  --act-sand: 237, 233, 227;
  background-image: radial-gradient(circle 9.6px at 50% 50%, rgba(var(--act-sand), 0.96), rgba(var(--act-sand), 0.9) 62%, rgba(var(--act-sand), 0)), url(/assets/img/theme/track-light.webp);
  box-shadow: inset 0 1px 2.5px rgba(var(--line-rgb), 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.7), 0 0 0 1px var(--hair);
}
.act-sand svg { position: absolute; inset: 8px; width: 16px; height: 16px; fill: var(--act-mark, var(--ink-2)); stroke: none; transition: fill 400ms var(--ease); }
.act-sand svg .ln { fill: none; stroke: var(--act-mark, var(--ink-2)); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke 400ms var(--ease); }
@media (hover: hover) { .act:hover { color: var(--ink); --act-mark: var(--ink); } .act:hover .act-sand { transform: translateY(-1px); } }
.act[data-done] { --act-mark: var(--ink); }
.act:active .act-sand, .act[data-done] .act-sand { transform: translateY(1px) scale(0.94); }
.act[data-done] { color: var(--ink); }
.act:focus-visible { outline: none; }
.act:focus-visible .act-l { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 3px; }
.act-menu { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; display: grid; min-width: 148px; padding: 6px; background: var(--ground); border: 1px solid var(--hair-2); border-radius: 6px; }
.act-menu[hidden] { display: none; }
.act-menu :is(a, button) { display: flex; align-items: center; min-height: 36px; padding: 0 10px; border: 0; border-radius: 3px; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; color: var(--ink-2); cursor: pointer; }
.act-menu :is(a, button):is(:hover, :focus-visible) { color: var(--ink); background: rgba(var(--line-rgb), 0.06); outline: none; }
.act-wrap { position: relative; display: inline-flex; }
/* on a phone the actions take a row of their own, before any note; the row is kept for them until the script has
   made them, so nothing below moves */
@media (max-width: 559.98px) {
  .art-acts { flex-basis: 100%; margin: 14px 0 0; }
  .js .art-head .meta-line:not(:has(.art-acts)) { padding-bottom: 58px; }
}

/* the end mark (D058, D059): one stone in its raked rings, a lit picture under the site's lamp, whose light falls to
   the page before every edge (tools/lit/make-end-mark.py). It says the piece is over and asks nothing */
.end-mark {
  width: 320px; max-width: 100%; aspect-ratio: 2; margin: 48px auto 0;
  background: url(/assets/img/theme/end-mark-dark.webp) center / 100% 100% no-repeat;
  -webkit-mask-image: radial-gradient(closest-side, #000 76%, transparent); mask-image: radial-gradient(closest-side, #000 76%, transparent);
}
:root[data-theme="light"] .end-mark { background-image: url(/assets/img/theme/end-mark-light.webp); }

/* contents: a slim list in the left gutter, only where the gutter is wide enough; never over text */
.toc { display: none; }
@media (min-width: 1240px) {
  .toc {
    display: block;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 64px);
    max-width: 236px;
    margin-top: 56px;
    padding-right: 32px;
  }
  /* a figure as wide as the page is passing: the contents step out of its way, and arrive again once it has gone by
     (page.js). The selector outweighs the arrival's own (site.css, data-reveal) */
  .js .toc[data-reveal].is-out { opacity: 0; visibility: hidden; transition: opacity 260ms var(--ease), visibility 260ms step-end; }
  .prose { grid-row: 1; }
}
.toc-label { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.toc ol { position: relative; margin-top: 14px; border-left: 1px solid var(--hair); }
.toc-mark {
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: var(--h, 0px);
  background: var(--line);
  box-shadow: 0 0 6px var(--glow);
  transform: translateY(var(--y, 0px));
}
.toc-mark.is-ready { transition: transform 700ms var(--ease), height 700ms var(--ease); }
.toc a {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  margin-left: -1px;
  padding: 6px 0 6px 12px;
  border-left: 1px solid transparent;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.toc a .n { font-family: var(--font-label); font-size: 11px; line-height: 1.75; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); }

/* ------------------------------------------------------------------ figures */

.fig { --col-x: 0px; }
.fig-stage {
  --col-x: 0px;
  position: relative;
  aspect-ratio: 390 / 470;
  overflow: hidden;
  background: var(--ground);
}
@media (min-width: 640px) { .fig-stage { aspect-ratio: 640 / 610; } }
@media (max-width: 639.98px) {
  /* phones: the drawing runs to both edges; the names keep the text's left edge */
  .fig-bleed { margin-left: calc(-1 * var(--margin)); margin-right: calc(-1 * var(--margin)); }
  .fig-bleed .fig-stage { --col-x: 20px; }
  .fig-bleed .fig-text { padding: 0 var(--margin); }
}
.fig-stage canvas { --cx: 55%; --cy: 45%; }
.fig-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 400ms linear; }
.fig.is-live .fig-stage canvas { opacity: 1; }
.fig-still { position: absolute; inset: 0; display: none; }
.fig-still img { width: 100%; height: 100%; object-fit: contain; display: block; }
:is(.figs-still, .no-js) .fig-still, .fig.is-still .fig-still { display: block; }
:is(.figs-still, .no-js) :is(.fig-stage canvas, .names), .fig.is-still canvas, .fig.is-still .names { display: none; }
:is(.figs-still, .no-js) .fig-steps { display: none; }
.fig.is-still .fig-steps { visibility: hidden; }

.fig-text { margin-top: 18px; }
.fig-cap { display: grid; gap: 6px; }
.fig-n { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
/* a caption one step below the body */
.fig-idea { font-size: var(--step--1); line-height: 1.45; color: var(--ink); text-wrap: pretty; }

.fig-steps { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 14px 0 0 -10px; }
.fig-steps button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  font-family: var(--font-label);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 160ms var(--ease);
}
.fig-steps button span { margin-right: 0.6em; }
.fig-steps button:hover { color: var(--ink); }
.fig-steps button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 6px; }

/* the readout: every state's text in one cell, so the page never moves when the state changes */
.fig-readout { display: grid; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--hair); }
.fig-readout > div { grid-area: 1 / 1; visibility: hidden; }
.fig-readout > .on { visibility: visible; }
:is(.figs-still, .no-js) .fig-readout > div:not([data-state="3"]) { display: none; }
:is(.figs-still, .no-js) .fig-readout > [data-state="3"] { visibility: visible; }
.fig-readout p { font-size: 15px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.fig-readout p + p, .fig-readout p + ol, .fig-readout ol + p { margin-top: 8px; }
.fig-readout .q { color: var(--ink); }
.fig-readout ol { display: grid; gap: 2px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--ink-2); counter-reset: c; }
.fig-readout li { display: grid; grid-template-columns: 1.8em 1fr; }
.fig-readout li::before { counter-increment: c; content: counter(c); color: var(--ink-2); opacity: 0.7; }
.fig-readout li b { font-weight: 400; color: var(--ink); }
.k-info { color: var(--accent-text); }

/* the name column: as the hero's, value for value */
.names { --nm-dim: #8E8981; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.nm-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nm-lead { fill: none; stroke: var(--line); stroke-width: 1; stroke-opacity: calc((0.2 + 0.42 * var(--lit, 0)) * var(--ink-gain, 1)); transition: stroke-opacity 300ms var(--ease); }
.nm-dot { fill: var(--line); opacity: calc(0.45 + 0.55 * var(--lit, 0)); }
.nm { position: absolute; left: 0; top: 0; will-change: transform; }
.nm-name {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: color-mix(in oklab, var(--ink) calc(var(--lit, 0) * 100%), var(--nm-dim));
  transition: color 300ms var(--ease);
}
@media (min-width: 900px) { .nm-name { font-size: 12px; line-height: 16px; } }

/* test aid: ?figonly fills the window with the first figure's stage, for the fallback stills */
.figonly body { overflow: hidden; }
.figonly .fig-stage.solo { position: fixed; inset: 0; z-index: 100; aspect-ratio: auto; }
.figonly .masthead { display: none; }

/* Sources beside the text (page.js), only where the right gutter is wide enough. */
.prose { position: relative; }
.sidenote { display: none; }
@media (min-width: 1240px) {
  .sidenote {
    display: grid;
    grid-template-columns: 2em 1fr;
    position: absolute;
    left: calc(100% + 56px);
    width: min(250px, calc((100vw - 100%) / 2 - 104px));
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-2);
    text-wrap: pretty;
  }
  .sn-n { font-family: var(--font-label); font-size: 11px; line-height: 1.8; color: var(--ink-2); }
  .sidenote code { font-size: 0.9em; border: 0; padding: 0; }
  .sidenote a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--hair-2); text-decoration-thickness: 1px; text-underline-offset: 4px; }
}

/* Contents on narrow screens: a small control at the foot of the screen, and a sheet above it. */
.toc-mini {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 8px var(--margin) calc(8px + env(safe-area-inset-bottom));
  background: var(--glass-bar);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--hair);
  transform: translateY(100%);
  transition: transform 600ms var(--ease);
}
.toc-mini.is-shown { transform: none; }
.toc-mini::before { content: ""; position: fixed; inset: -100vh 0 100% 0; background: var(--scrim-sheet); opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease); }
.toc-mini.is-open::before { opacity: 1; pointer-events: auto; }
.article { padding-bottom: 160px; }
@media (min-width: 1240px) { .toc-mini { display: none; } }
.toc-mini > button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 400 11px/1 var(--font-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.tm-now { color: var(--ink-2); }
.tm-sheet {
  position: absolute;
  bottom: calc(100% + 10px);
  left: var(--margin);
  right: var(--margin);
  padding: 10px 6px;
  border: 1px solid var(--hair-2);
  border-radius: 14px;
  background: var(--glass);
  box-shadow: var(--shadow-sheet);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
/* On a touch or narrow screen the bar and its sheet are the page's ground, with their hairlines: Safari on a phone
   paints what passes under a blur again on every frame of a scroll */
@media (hover: none), (max-width: 899.98px) {
  .toc-mini, .tm-sheet { background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.tm-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 8px 12px; font: 400 11px/1 var(--font-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.tm-head > span { flex: 1; }
.tm-sheet .tm-close { width: auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--hair-2); border-radius: 22px; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); cursor: pointer; }
.tm-sheet a { display: grid; grid-template-columns: 2.4em 1fr; min-height: 44px; align-items: center; padding: 6px 12px; font-size: 14px; line-height: 1.35; color: var(--ink-2); border-radius: 8px; }
.tm-sheet a[aria-current] { color: var(--ink); background: rgba(var(--line-rgb), 0.06); }
.tm-sheet .n { font-family: var(--font-label); font-size: 11px; }


/* ------------------------------------------------------------------ garden figures (article two)
   Three figures in the garden plan's hand (tools/repo-figures.mjs, drawn in
   tools/figures/garden.mjs): the path through raked ground, its words
   beside each step, the question as one blue bead. A wide drawing and a phone drawing; one shows. */
.fig-garden { margin: 52px 0 48px; }
@media (min-width: 1100px) { .fig-garden { margin-right: -60px; } }
.fig-garden .plan-art { position: relative; width: 100%; margin: 0; }
.fig-garden .plan-art .dw { position: absolute; inset: 0; }
.fig-garden .names { position: absolute; inset: 0; pointer-events: none; }
.fig-garden .lb { position: absolute; display: grid; gap: 4px; max-width: 360px; transition: opacity 280ms var(--ease); }
.fig-garden .lb::before { content: ""; position: absolute; inset: -6px -10px; z-index: -1; background: var(--ground); -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent); mask-image: radial-gradient(closest-side, #000 70%, transparent); }
.fig-garden .lb .role, .fig-garden .lb.tag-only { font-family: var(--font-mono); font-size: 11px; line-height: 1.35; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.fig-garden .lb .role b { font-weight: 500; color: var(--ink); margin-right: 0.8em; }
.fig-garden .lb .q { font-size: 17px; line-height: 1.35; color: var(--ink); text-wrap: balance; }
.fig-garden .lb .num { font-weight: 400; color: var(--accent-text); }
/* The head name stands out by its ink, not by wider tracking. */
.fig-garden .lb.tag-only.head { color: var(--ink); }
.fig-garden .at-right { transform: translate(0, -50%); }
.fig-garden .at-left { transform: translate(-100%, -50%); text-align: right; justify-items: end; }
.fig-garden .at-top { transform: translate(-50%, -100%); text-align: center; justify-items: center; }
.fig-garden .at-bottom { transform: translate(-50%, 0); text-align: center; justify-items: center; }
.fig-garden .dw .field { --k: 0.27; }
.fig-garden .dw .hidden { --k: 0.34; }
.fig-garden .dw .info { stroke: var(--accent); }
.fig-garden .fig-cap { margin-top: 22px; }
.fig-garden .for-phone { display: none; }
/* The scroll moves the question (assets/js/writing/garden-scroll.js); the step it is at is white, the
   others grey, so the figure reads in order. Names step down to Ink 2 rather than fading, so every name
   keeps 4.5:1 at its dimmest (site-figure budget). */
.fig-garden .plan-art .dw :is(path, circle, line, polyline, polygon, rect, ellipse) { stroke-opacity: calc(var(--k, 0.36) * var(--f, 1) * var(--lit, 1) * var(--ink-gain, 1)); transition: stroke-opacity 320ms var(--ease); }
.fig-garden .plan-art.is-scrub .dw .st { --lit: 0.3; }
.fig-garden .plan-art.is-scrub .dw .st.is-here { --lit: 1; }
.fig-garden .lb :is(.q, .role b), .fig-garden .lb.tag-only.head { transition: color 280ms var(--ease); }
.fig-garden .plan-art.is-scrub .lb[data-d]:not(.is-here) :is(.q, .role b),
.fig-garden .plan-art.is-scrub .lb.tag-only.head[data-d]:not(.is-here) { color: var(--ink-2); }
.fig-garden .plan-art.is-scrub .walk .lit { opacity: 0; transition: opacity 160ms linear; }
.fig-garden .plan-art.is-scrub .walk .lit.is-lit { opacity: 1; }
@media (max-width: 899.98px) {
  .fig-garden .for-wide { display: none; }
  .fig-garden .for-phone { display: block; }
  .fig-garden .lb { max-width: 260px; }
  .fig-garden .lb .role { white-space: normal; }
  .fig-garden .lb.wide-only { display: none; }
}
@media (max-width: 599.98px) { .fig-garden .lb .q { font-size: 15px; } }
/* The bead and its landing. */
.fig-plan .dw .bead { fill: var(--accent); stroke: none; }
.fig-plan .dw .pulse { stroke: var(--accent); stroke-width: 1; fill: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .fig-plan .dw.pen.is-on:not(.is-walking):not(.is-still) .bead { opacity: 0; }
.fig-plan.is-landed .dw .pulse { animation: plan-pulse 1100ms var(--ease) both; }
@keyframes plan-pulse { 0% { opacity: 0; transform: scale(0.2); } 4% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1); } }
.js .fig-plan .dw.pen.is-still > * { transition: none; }
/* The names come after the pen (H9). */
.js .fig-plan .names { opacity: 0; transition: opacity 420ms var(--ease); }
.js .fig-plan .plan-art:has(.dw.is-on) .names { opacity: 1; transition-delay: 800ms; }
.js .fig-plan .plan-art:has(.dw.is-still) .names { transition: none; }

/* ------------------------------------------------------------------ connection figures
   "From a need to a working connection" (tools/connection-figures.mjs): a protection as a bar or a
   gate along the path, and the capability map before and after. Words sit in or beside the marks. */
.fig-connection .lb.nm { font-size: 15px; line-height: 1.3; color: var(--ink); white-space: nowrap; }
.fig-connection .lb.sm { font-size: 13px; line-height: 1.3; color: var(--ink); white-space: nowrap; }
.fig-connection .lb.info { color: var(--accent); }
.fig-connection .at-center { transform: translate(-50%, -50%); text-align: center; }
.fig-connection .at-above { transform: translate(0, -100%); }
.fig-connection .at-above-end { transform: translate(-100%, -100%); text-align: right; }
.fig-key .info { color: var(--accent); }
@media (min-width: 1100px) { .fig-connection { margin-right: -90px; } }
.fig-key { display: grid; gap: 6px; margin-top: 14px; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.fig-key b { font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------------------ the light theme
   Every colour above is a token that flips in site.css: the contents bar and sheet are glass of the
   page, the dimming and the shadow are the sheet's tokens, lines of ink are one step heavier
   (--ink-gain), information set as text takes --accent-text and --glow is clear. What the article
   holds of its own for the light theme is here (design/light-mode/plan.md). */
:root[data-theme="light"] .names { --nm-dim: var(--ink-2); }
/* The title takes the light theme's weight (--title-weight) and a little less tracking, so it keeps the
   dark title's measure and breaks its lines in the same places. */
:root[data-theme="light"] .art-head h1 { letter-spacing: -0.034em; }
/* Figures drawn in lines of light, and their stills, are mapped to lines of ink by one colour matrix
   (#fig-ink, writing/ink.js). */
:root[data-theme="light"] :is(.fig[data-figure] .fig-stage canvas, .fig[data-figure] .fig-still img, .art-shot img) { filter: url(#fig-ink); }

/* ---------- a quote (proposed, 23 November 2026): words quoted as they were said or asked. One step above the
   prose, in Ink. Its opening mark hangs in the margin from 900 px, as a section's number does (D060), so the
   words start on the text's own edge; under 900 px it runs in. A label in Plan, set as a piece's label is,
   says whose words they are. Sizes, faces and colours already in use: no new debt. */
.quote { margin: 0; }
.quote .q-label { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.quote blockquote { margin: 12px 0 0; }
.quote blockquote p { font-size: var(--step-1); line-height: 1.42; letter-spacing: -0.004em; color: var(--ink); text-wrap: balance; }
.quote blockquote p::before { content: "\201C"; color: var(--ink-2); }
.quote blockquote p::after { content: "\201D"; color: var(--ink-2); }
@media (min-width: 900px) {
  .quote blockquote p { position: relative; }
  .quote blockquote p::before { position: absolute; right: 100%; padding-right: 0.08em; }
}
.prose * + .quote, .prose .quote + * { margin-top: 36px; }
/* A note to the author inside the prose (Proposed, To come): the dashed Draft tag, so it can't be read as the text. */
.prose p > .draft { display: inline-block; margin-right: 0.6em; padding: 1px 6px; border: 1px dashed var(--hair-2); border-radius: 3px; font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); vertical-align: 0.15em; }
