/* keithjmenezes.com mockup. Structure only: every value comes from tokens.css.
   Breakpoints (media queries cannot read custom properties): 1200px rail, 1024px tablet, 760px phone.
   One more raw value: 12px, the floor under the two sizes set in em (a figure beside small capitals, a note's reference number). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--c-paper); color: var(--c-ink);
  font-family: var(--f-text); font-variant-numeric: lining-nums;
  caret-color: var(--c-ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
::selection { background: var(--c-ink); color: var(--c-paper); }
a { color: var(--c-ink); text-decoration-thickness: var(--line); text-underline-offset: var(--underline-offset); transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease); }
@media (hover: hover) { a:hover { color: var(--c-ink-2); } }
:focus-visible { outline: var(--line-state) solid var(--c-ink); outline-offset: var(--line-state); }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.caps { font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); }
.fig { font-size: max(var(--fig-caps), 12px); letter-spacing: var(--track-figure); font-variant-numeric: lining-nums tabular-nums; }

/* Drawn arrows: 1px lines, never glyphs */
.arrow { display: inline-block; width: var(--arrow-size); height: var(--arrow-size); flex: none; overflow: visible; stroke: currentColor; stroke-width: var(--line); fill: none; vector-effect: non-scaling-stroke; }
.arrow path { vector-effect: non-scaling-stroke; }

.skip { position: absolute; left: var(--pad); top: 0; z-index: 10; padding: var(--sp-2) var(--sp-3); background: var(--c-ink); color: var(--c-paper); transform: translateY(-120%); }
.skip:is(:hover, :focus, :active) { color: var(--c-paper); } /* paper on ink in every state: the plain link hover (ink-2, line 18) would leave it at 2.6:1 */
.skip:focus-visible { transform: none; }

.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  max-width: calc(var(--max) + 2 * var(--pad));
}

/* ---------- Running head ---------- */
.head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  min-height: var(--head-h);
  padding-inline: max(var(--pad), calc((100% - var(--max)) / 2));
  border-bottom: var(--line) solid var(--c-rule-soft);
  font-size: var(--fs-nav); line-height: var(--lh-ui);
}
.head a { text-decoration: none; }
.head-name { display: inline-flex; align-items: center; min-height: var(--target); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); color: var(--c-ink); }
.head-nav { display: flex; align-items: center; gap: var(--sp-head); }
.head-nav ul { display: flex; gap: var(--sp-head); margin: 0; padding: 0; list-style: none; }
.head-nav li a {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--target);
  color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps);
  text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset-title);
}
.head-nav li a[aria-current] { color: var(--c-ink); text-decoration-color: currentColor; }
@media (hover: hover) { .head-nav li a:hover, .head-name:hover { color: var(--c-ink); text-decoration-color: currentColor; } }
.head-nav .arrow { margin-left: var(--line); transform: translateY(var(--arrow-lift)); }
.head-cta {
  position: relative; display: inline-flex; align-items: center; height: var(--key); padding: 0 var(--sp-3);
  border: var(--line) solid var(--c-ink); color: var(--c-ink);
  font-variant-caps: all-small-caps; letter-spacing: var(--track-caps);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.head-cta::before { content: ""; position: absolute; inset: calc((var(--key) - var(--target)) / 2 - var(--line)) calc(-1 * var(--line)); } /* a 44px tall target, counted from outside the 1px edge */
@media (hover: hover) { .head-cta:hover { background: var(--c-ink); color: var(--c-paper); } }

/* ---------- Shared type ---------- */
.mast {
  margin: 0; font-family: var(--f-display); font-weight: 400; -webkit-text-stroke: var(--stroke-display) currentColor;
  font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--track-display); text-wrap: balance;
}
.headline {
  margin: 0; font-family: var(--f-display); font-weight: 400; -webkit-text-stroke: var(--stroke-display) currentColor;
  font-size: var(--fs-headline); line-height: var(--lh-head); letter-spacing: var(--track-head); text-wrap: balance;
}
.note { margin: var(--sp-3) 0 0; max-width: var(--measure-note); font-size: var(--fs-note); line-height: var(--lh-note); color: var(--c-ink-2); font-variant-numeric: oldstyle-nums proportional-nums; text-wrap: pretty; }

/* ---------- Home hero ---------- */
.hero { padding-top: var(--sp-hero-top); padding-bottom: var(--sp-hero-bottom); row-gap: 0; align-items: end; }
.hero-text { grid-column: 1 / span 10; }
.tagline { display: flex; align-items: center; gap: var(--sp-3); margin: 0; font-size: var(--fs-meta); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); }
.tagline::before { content: ""; width: var(--sp-7); height: var(--line); background: var(--c-rule); }
/* Home's headline is Keith's sentence, under the tagline, as on the Framer site: his name is the running head's (Keith, 15 November 2026) */
.statement {
  margin: var(--sp-5) 0 0; max-width: var(--measure-statement);
  font-family: var(--f-display); font-weight: 400; -webkit-text-stroke: var(--stroke-display) currentColor;
  font-size: var(--fs-statement); line-height: var(--lh-statement); letter-spacing: var(--track-head); text-wrap: pretty;
}
.lede {
  margin: var(--sp-5) 0 0; max-width: var(--measure-lede);
  font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor;
  font-size: var(--fs-lede); line-height: var(--lh-lede); text-wrap: pretty;
}
.hero.has-globe .hero-text { grid-column: 1 / span 8; align-self: center; }
.globe { grid-column: 9 / -1; justify-self: end; width: var(--globe-size); aspect-ratio: 1; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.globe.is-dragging { cursor: grabbing; }
html:not(.globe-ok) .globe { display: none; }
.globe { position: relative; }
.globe::after { content: ""; position: absolute; inset: 10%; border: var(--line) solid var(--c-globe-edge); border-radius: 50%; pointer-events: none; } /* cobe's sphere is 80% of its canvas */
.globe canvas { display: block; width: 100%; height: 100%; filter: url(#globe-ink); }

/* ---------- Page sections: head left, body right ---------- */
.page { padding-top: var(--sp-section-top); padding-bottom: var(--sp-section-bottom); border-top: var(--line) solid var(--c-rule-soft); align-items: start; }
.page-first { border-top: 0; }
.page.grid { max-width: none; padding-inline: max(var(--pad), calc((100% - var(--max)) / 2)); }   /* the section spans the window and only its content is capped, as the running head's is, so the rule over it runs the full width like every other */
.page-h { grid-column: 1 / span 4; }
.page-h.sticky { position: sticky; top: var(--sp-6); }
.page-body { grid-column: 6 / -1; }

/* Writing list */
.work { margin: 0; padding: 0; list-style: none; border-top: var(--line) solid var(--c-rule-soft); }
.work li { border-bottom: var(--line) solid var(--c-rule-soft); }
.work a { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t d" "k d"; column-gap: var(--sp-5); row-gap: var(--sp-1); align-items: baseline; padding: var(--sp-4) 0; text-decoration: none; }
.work .t { grid-area: t; justify-self: start; font-size: var(--fs-list-title); line-height: var(--lh-title); text-wrap: balance; text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset-title); transition: text-decoration-color var(--dur) var(--ease); }
.work .k { grid-area: k; font-size: var(--fs-meta); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); font-variant-numeric: oldstyle-nums tabular-nums; white-space: nowrap; transition: color var(--dur) var(--ease); }
.work .d { grid-area: d; font-size: var(--fs-date); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-numeric: oldstyle-nums tabular-nums; white-space: nowrap; transition: color var(--dur) var(--ease); }
/* Pointed at, a row's own rule is drawn over in ink from the left, as the newsletter draws its lines */
.work a::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--line)); height: var(--line); background: var(--c-ink); transform: scaleX(0); transform-origin: left center; transition: transform var(--dur) var(--ease-out); pointer-events: none; }
@media (hover: hover) {
  .work a:hover { color: var(--c-ink); }
  .work a:hover::after { transform: none; }
  .work a:hover .t { text-decoration-color: currentColor; }
  .work a:hover .k, .work a:hover .d { color: var(--c-ink); }
}
/* Focused from the keyboard, the whole row is drawn round in ink at state weight, standing clear of its rules: a box, where
   pointing draws a line, so the two never read as one */
.work a:focus-visible { outline: var(--line-state) solid var(--c-ink); outline-offset: var(--line-state); }
.work a:focus-visible .t { text-decoration-color: currentColor; }
.work a:focus-visible .k, .work a:focus-visible .d { color: var(--c-ink); }

/* ---------- Gallery ---------- */
.gallery-h { grid-column: 1 / span 6; }
.stats { grid-column: 8 / -1; align-self: end; display: flex; justify-content: flex-end; gap: var(--sp-7); margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; gap: var(--sp-1); }
.stats dt { font-size: var(--fs-stat-label); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); }
.stats dd { margin: 0; font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-stat); line-height: var(--lh-tight); font-variant-numeric: lining-nums proportional-nums; }
.modes { grid-column: 1 / -1; display: none; gap: var(--sp-5); margin-top: var(--sp-5); border-bottom: var(--line) solid var(--c-rule-soft); }
.globe-ok .modes { display: flex; }
.modes a { position: relative; display: inline-flex; align-items: center; min-height: var(--target); color: var(--c-ink-2); text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset-title); font-size: var(--fs-nav); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); }
.modes a::before { content: ""; position: absolute; inset: 0 min(0px, (100% - var(--target)) / 2); } /* a short word still has a 44px wide target */
.modes a[aria-current] { color: var(--c-ink); text-decoration-color: currentColor; }
@media (hover: hover) { .modes a:hover { color: var(--c-ink); } }

.gallery { padding-top: var(--sp-gallery-top); }
.globe-mode, .grid-mode { grid-column: 1 / -1; }
.globe-mode { display: none; }
.globe-ok:not([data-mode="grid"]) .globe-mode { display: grid; grid-template-columns: minmax(0, 1fr) var(--viewer-w); column-gap: var(--gap); align-items: start; margin-top: var(--sp-5); animation: mode-in var(--dur-mode) var(--ease-out); }
.globe-ok:not([data-mode="grid"]) .grid-mode { display: none; }
.globe-ok[data-mode="grid"] .grid-mode { animation: mode-in var(--dur-mode) var(--ease-out); }
@keyframes mode-in { from { opacity: 0; } }

/* The large print: a count and the two steps above it, the place on its foot. It keeps its top right corner as photographs change shape, so the steps never move. */
.viewer { justify-self: end; display: grid; row-gap: var(--sp-2); width: min(100%, calc(var(--viewer-h) * var(--ar, .75) + 2 * var(--print-border) + 2 * var(--line))); }
.vw-bar { display: flex; justify-content: space-between; align-items: center; min-height: var(--target); }
.vw-steps { display: flex; gap: var(--sp-2); }
.vw-count { margin: 0; font-size: var(--fs-meta); color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; letter-spacing: var(--track-figure); }
.vw-btn { display: grid; place-items: center; width: var(--target); height: var(--target); padding: 0; border: var(--line) solid var(--c-rule-soft); background: transparent; color: var(--c-ink); font-size: var(--fs-voice); cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
@media (hover: hover) { .vw-btn:hover { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-paper); } }
.vw-print { margin: 0; padding: var(--print-border) var(--print-border) 0; background: var(--c-print); border: var(--line) solid var(--c-rule-soft); touch-action: pan-y; }
.vw-print img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, .75); background: var(--c-photo-fill); }
.vw-print img.is-in { animation: mode-in var(--dur) var(--ease); }
.vw-place { display: flex; align-items: center; min-height: var(--print-foot); padding: 0 var(--line); font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-caption); line-height: var(--lh-tight); }

.contact { columns: 3; column-gap: var(--gap); margin: var(--sp-7) 0 0; padding: 0; list-style: none; }
.contact li { break-inside: avoid; margin-bottom: var(--gap); }
.print { margin: 0; padding: var(--print-border) var(--print-border) 0; background: var(--c-print); border: var(--line) solid var(--c-rule-soft); }
.print img { width: 100%; height: auto; background: var(--c-photo-fill); }
.print figcaption { display: flex; align-items: center; min-height: var(--print-foot); padding: 0 var(--line); font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-caption); line-height: var(--lh-tight); }
@media (prefers-reduced-motion: no-preference) {
  .js .print.is-pending { opacity: 0; transform: translateY(var(--reveal-rise)); }
  .js .print { transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: var(--delay, 0s); }
}

/* ---------- Essay ---------- */
.essay { padding-top: var(--sp-section-top); padding-bottom: var(--sp-section-bottom); align-items: start; }
.essay-h, .prose { grid-column: 4 / span 7; max-width: var(--measure); }
.essay-title { width: fit-content; margin: 0; font-family: var(--f-display); font-weight: 400; -webkit-text-stroke: var(--stroke-display) currentColor; font-size: var(--fs-essay-title); line-height: var(--lh-head); letter-spacing: var(--track-head); text-wrap: balance; } /* as wide as its words, so a Writing title carried into it (transitions.js) scales to the words, not to the column */
.meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0 0; font-size: var(--fs-meta); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); font-variant-numeric: oldstyle-nums tabular-nums; }
.toc { grid-column: 1 / span 3; grid-row: 2; margin-top: var(--sp-7); position: sticky; top: var(--sp-6); max-height: calc(100vh - 2 * var(--sp-6)); overflow: auto; padding-right: var(--sp-5); }
.toc ol { margin: 0; padding: 0; list-style: none; border-top: var(--line) solid var(--c-rule-soft); }
.toc li { border-bottom: var(--line) solid var(--c-rule-soft); }
.toc a { display: flex; align-items: center; min-height: var(--target); padding: var(--sp-2) 0; font-size: var(--fs-rail); line-height: var(--lh-ui); color: var(--c-ink-2); text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset); text-wrap: pretty; }
.toc a[aria-current] { color: var(--c-ink); text-decoration-color: currentColor; }
@media (hover: hover) { .toc a:hover { color: var(--c-ink); } }

/* Below the rail's width the same contents fold under the title: a closed disclosure, in each essay's HTML beside the rail */
.toc-fold { display: none; margin: var(--sp-6) 0 0; border-top: var(--line) solid var(--c-rule-soft); border-bottom: var(--line) solid var(--c-rule-soft); }
.toc-fold summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--target); cursor: pointer; list-style: none; font-size: var(--fs-meta); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); transition: color var(--dur) var(--ease); }
.toc-fold summary::-webkit-details-marker { display: none; }
.toc-fold summary:focus-visible { outline-offset: calc(-1 * var(--line-state)); }
/* a drawn plus that closes to a minus: two 1px lines, never a glyph */
.toc-fold summary::after { content: ""; flex: none; width: var(--arrow-size); height: var(--arrow-size); background: linear-gradient(currentColor, currentColor) center / 100% var(--line) no-repeat, linear-gradient(currentColor, currentColor) center / var(--line) 100% no-repeat; transition: background-size var(--dur) var(--ease); }
.toc-fold[open] summary { color: var(--c-ink); }
.toc-fold[open] summary::after { background-size: 100% var(--line), var(--line) 0; }
@media (hover: hover) { .toc-fold summary:hover { color: var(--c-ink); } }
.toc-fold ol { margin: 0; padding: 0 0 var(--sp-2); list-style: none; }
.toc-fold li + li { border-top: var(--line) solid var(--c-rule-soft); }
.toc-fold a { display: flex; align-items: center; min-height: var(--target); padding: var(--sp-1) 0; font-size: var(--fs-rail); line-height: var(--lh-ui); color: var(--c-ink-2); text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset); text-wrap: pretty; }
@media (hover: hover) { .toc-fold a:hover { color: var(--c-ink); text-decoration-color: currentColor; } }

/* Reading progress: a hairline across the top of the window, ink over the part read. Drawn by site.js; decoration only */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 5; height: var(--progress-line); background: var(--c-ink); transform: scaleX(var(--read, 0)); transform-origin: left center; pointer-events: none; }
.prose { grid-row: 2; margin-top: var(--sp-7); font-size: var(--fs-body); line-height: var(--lh-body); hanging-punctuation: first; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 var(--em-para); text-wrap: pretty; }
.prose a { text-decoration-color: var(--c-field); }
@media (hover: hover) { .prose a:hover { color: var(--c-ink-2); text-decoration-color: currentColor; } }
.prose em { font-family: var(--f-display); font-style: normal; }
.prose strong { font-weight: 700; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: var(--sp-6); font-weight: 400; text-wrap: balance; } /* a jump lands the heading a breath below the window's edge, level with the top of the contents rail */
.prose h2 { margin: var(--em-h2-above) 0 var(--em-h2-below); font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-prose-h2); line-height: var(--lh-prose-h2); letter-spacing: var(--track-head); }
.prose h3 { margin: var(--em-h3-above) 0 var(--em-h-below); font-size: var(--fs-prose-h3); line-height: var(--lh-title); }
.prose h4 { margin: var(--em-h4-above) 0 var(--em-h-below); font-size: var(--fs-prose-h4); line-height: var(--lh-title); font-weight: 700; }
.prose h4 em { font-weight: 400; }
.prose h2 + h3, .prose h3 + h4 { margin-top: var(--em-para); }
.prose ul, .prose ol { margin: 0 0 var(--em-para); padding-left: var(--em-list-indent); }
.prose li { margin: var(--em-list-gap) 0; padding-left: var(--em-list-pad); }
.prose li > ul, .prose li > ol { margin: var(--em-list-gap) 0 var(--em-list-nest-below); }
.prose li::marker { color: var(--c-ink-2); }
.prose blockquote { margin: var(--em-quote-gap) 0; padding: 0 0 0 var(--sp-5); border-left: var(--line) solid var(--c-rule-soft); font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; }
.prose blockquote p { margin: 0 0 var(--em-quote-para); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote em { font-family: inherit; }
.prose .epigraph { margin: 0 0 var(--sp-7); padding: 0; border: 0; font-size: var(--fs-epigraph); line-height: var(--lh-quote); }
.fnref { font-size: max(var(--fnref-size), 12px); line-height: 0; vertical-align: var(--fnref-raise); font-variant-numeric: lining-nums tabular-nums; }
.fnref a { position: relative; padding: 0 var(--fnref-pad); color: var(--c-ink-2); text-decoration: none; }
.fnref a::before { content: ""; position: absolute; top: 50%; left: 50%; width: max(100%, var(--target-inline)); height: var(--target-inline); transform: translate(-50%, -50%); } /* a 24px target centred on the small number, as it looks */
@media (hover: hover) { .fnref a:hover { color: var(--c-ink); } }
/* The place a jump lands on (a part, a note, a reference) is marked for a moment and then let go: a heading or a note gets a state-weight
   ink rule in the margin beside it, drawn down, held about a second, faded; a reference number is underlined and the line fades.
   site.js sets .is-here on arrival and takes it off once the mark is gone; without JavaScript, :target carries the same mark. */
.prose :is(h2, h3, h4, .fn) { position: relative; }
.prose .is-here:not(a)::before, html:not(.js) .prose :target:not(a)::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--sp-4)); width: var(--line-state);
  background: var(--c-ink); transform-origin: center top; pointer-events: none;
  animation: arrive calc(var(--dur-reveal) * 2) var(--ease-out) both;
}
.prose .fns-h.is-here::before, html:not(.js) .prose .fns-h:target::before { top: var(--sp-6); }   /* the rule beside the words, not the padding above them */
.fnref a.is-here, html:not(.js) .fnref a:target { color: var(--c-ink); text-decoration: underline var(--line-state) transparent; text-underline-offset: var(--line-state); animation: arrive-line calc(var(--dur-reveal) * 2) var(--ease) both; }
@keyframes arrive { from { transform: scaleY(0); } 20% { transform: none; opacity: 1; } 62% { opacity: 1; } to { transform: none; opacity: 0; } }
@keyframes arrive-line { from, 62% { text-decoration-color: var(--c-ink); } to { text-decoration-color: transparent; } }
/* A jump further than two screens cuts to its place instead of scrolling through it (site.js): everything but the contents rail and the
   reading line fades out and back in, at the page turn's own pace, about a fifth of a second in all */
@media (prefers-reduced-motion: no-preference) {
  html.cut-out :is(.head, .essay-h, .prose, .pn, main > .page, body > .foot) { opacity: 0; transition: opacity calc(var(--dur-page) * .4) var(--ease); }
  html.cut-in :is(.head, .essay-h, .prose, .pn, main > .page, body > .foot) { transition: opacity calc(var(--dur-page) * .6) var(--ease-out); }
}
.prose .fns-h { margin-top: var(--em-fns-above); padding-top: var(--sp-6); border-top: var(--line) solid var(--c-rule-soft); }
.prose .fns { font-size: var(--fs-note); line-height: var(--lh-fn); color: var(--c-ink); }
.prose .fn { display: grid; grid-template-columns: var(--sp-6) minmax(0, 1fr); align-items: baseline; margin: 0 0 var(--sp-3); scroll-margin-top: var(--sp-5); }
.prose .fn > .fn-n { position: relative; display: inline-flex; align-items: baseline; gap: var(--hair-gap); color: var(--c-ink-2); text-decoration: none; font-variant-numeric: lining-nums tabular-nums; }
.prose .fn > .fn-n::before { content: ""; position: absolute; top: 50%; left: 50%; width: var(--target); height: var(--target); transform: translate(-50%, -50%); } /* a 44px square target centred on the number */
.prose .fn-body a { position: relative; } /* a link in the note itself lies over that target where the two meet, so it keeps every tap on it */
.prose .fn > .fn-n .arrow { width: var(--arrow-size-sm); height: var(--arrow-size-sm); }
@media (hover: hover) { .prose .fn > .fn-n:hover { color: var(--c-ink); } }
.prose .fn-body p { margin: 0 0 var(--em-fn-para); }
.prose .fn-body p:last-child { margin-bottom: 0; }

/* ---------- Footnote previews (assets/notes.js; tokens --slip-* in tokens.css) ----------
   The note read where it is cited, on a slip of paper laid on the page: the same note as in the list at the end, its number in the
   margin (a link down to it) and its words in the note's type, so the slip and the list read as one thing. With a pointer the slip is
   drawn down out of the line under the number (up, when it opens above it); on a touchscreen it rises from the foot of the
   screen as a sheet. The number it belongs to stays underlined while it is out. */
.fnref a.is-open { color: var(--c-ink); text-decoration: underline var(--line) currentColor; text-underline-offset: var(--line-state); }
.slip {
  position: absolute; z-index: 40; width: min(var(--slip-w), calc(100vw - 2 * var(--pad))); max-height: var(--slip-h); overflow: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: var(--sp-6) minmax(0, 1fr); align-items: baseline;
  padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-3);
  background: var(--c-slip); border: var(--line) solid var(--c-rule-soft); box-shadow: var(--slip-shadow);
  font-size: var(--fs-note); line-height: var(--lh-fn); color: var(--c-ink); font-variant-numeric: oldstyle-nums proportional-nums;
  opacity: 0; clip-path: inset(0 0 100% 0);
}
.slip.is-up { clip-path: inset(100% 0 0 0); }
.slip.is-in { opacity: 1; clip-path: inset(-1px -40px -60px -40px); transition: opacity calc(var(--slip-in) * .5) var(--ease), clip-path var(--slip-in) var(--ease-out); }   /* the open clip reaches past the edges, so the shadow is never cut */
.slip.is-out { opacity: 0; clip-path: inset(-1px -40px -60px -40px); transition: opacity var(--slip-out) var(--ease); }
.slip-n { position: relative; display: inline-flex; align-items: baseline; gap: var(--hair-gap); color: var(--c-ink-2); text-decoration: none; font-variant-numeric: lining-nums tabular-nums; }
.slip-n::before { content: ""; position: absolute; top: 50%; left: 50%; width: var(--target); height: var(--target); transform: translate(-50%, -50%); }   /* a 44px target */
.slip-n .arrow { width: var(--arrow-size-sm); height: var(--arrow-size-sm); }
@media (hover: hover) { .slip-n:hover { color: var(--c-ink); } }
.slip-body p { margin: 0 0 var(--em-fn-para); }
.slip-body p:last-child { margin-bottom: 0; }
.slip-body a { position: relative; color: var(--c-ink); text-decoration: underline var(--line) var(--c-field); text-underline-offset: var(--underline-offset); }
@media (hover: hover) { .slip-body a:hover { text-decoration-color: currentColor; } }
.slip ::selection { background: var(--c-ink); color: var(--c-paper); }
/* On a touchscreen: a sheet at the foot of the screen, the number and a close button on its top edge, the note under them */
.slip-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: min(64svh, 30em);
  grid-template-columns: minmax(0, 1fr); padding: 0 var(--pad) calc(var(--sp-5) + env(safe-area-inset-bottom));
  border-width: var(--line) 0 0; opacity: 1; clip-path: none; transform: translateY(100%);
  transition: transform var(--slip-in) var(--ease-out);
}
.slip-sheet.is-in { clip-path: none; transform: none; }
.slip-sheet.is-held { transition: none; }
.slip-sheet:focus { outline: none; }
.slip-bar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: var(--target); margin-bottom: var(--sp-1); padding-top: var(--sp-2); background: var(--c-slip); touch-action: none; }
.slip-bar::before { content: ""; position: absolute; top: var(--sp-2); left: 50%; width: 36px; height: 3px; margin-left: -18px; border-radius: 3px; background: var(--c-rule-soft); }   /* the grip: it can be pulled down */
.slip-x { display: grid; place-items: center; width: var(--target); height: var(--target); margin-right: calc(-1 * var(--sp-3)); padding: 0; border: 0; background: none; color: var(--c-ink-2); cursor: pointer; }
.slip-x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.4; fill: none; }
.slip-x:focus-visible { outline: var(--line-state) solid var(--c-ink); outline-offset: calc(-1 * var(--line-state)); }
.slip-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(20, 20, 20, .14); opacity: 0; transition: opacity var(--slip-in) var(--ease); }
.slip-scrim.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .slip, .slip.is-up, .slip.is-in, .slip.is-out { clip-path: none; transition: opacity var(--slip-out) linear; }
  .slip-sheet, .slip-sheet.is-in { transform: none; transition: opacity var(--slip-out) linear; }
  .slip-sheet:not(.is-in) { opacity: 0; }
}

/* Previous / next */
.pn { padding-top: var(--sp-6); padding-bottom: var(--sp-section-bottom); }
.pn-in { grid-column: 4 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); border-top: var(--line) solid var(--c-rule-soft); padding-top: var(--sp-5); }
.pn a { display: flex; flex-direction: column; gap: var(--sp-2); text-decoration: none; min-height: var(--target); }
.pn .next { grid-column: 2; text-align: right; align-items: flex-end; }
.pn .lbl { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-meta); line-height: var(--lh-ui); color: var(--c-ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); transition: color var(--dur) var(--ease); }
.pn .ttl { width: fit-content; max-width: 100%; font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-voice); line-height: var(--lh-title); text-wrap: balance; text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset-title); transition: text-decoration-color var(--dur) var(--ease); }
@media (hover: hover) { .pn a:hover { color: var(--c-ink); } .pn a:hover .ttl { text-decoration-color: currentColor; } .pn a:hover .lbl { color: var(--c-ink); } }

/* ---------- 404 ---------- */
.lost { padding-top: var(--sp-hero-top); padding-bottom: var(--sp-hero-top); }
.lost .hero-text { grid-column: 1 / span 9; }

/* ---------- Footer ---------- */
.foot { border-top: var(--line) solid var(--c-rule-soft); }
.foot-main { padding-top: var(--sp-foot); padding-bottom: var(--sp-foot); align-items: end; }
.foot-line { grid-column: 1 / span 6; margin: 0; max-width: var(--measure-foot); font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-voice); line-height: var(--lh-quote); text-wrap: pretty; }
.keys { grid-column: 8 / -1; justify-self: end; display: flex; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.keys a { position: relative; display: grid; place-items: center; width: var(--key); height: var(--key); border: var(--line) solid var(--c-rule-soft); color: var(--c-ink); transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.keys a::before { content: ""; position: absolute; inset: calc((var(--key) - var(--target)) / 2 - var(--line)); } /* a 44px square target (the inset counts from inside the 1px edge); neighbours meet in the middle of the gap */
.keys svg { width: var(--key-icon); height: var(--key-icon); }
@media (hover: hover) { .keys a:hover { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-paper); } }
.foot-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-5); border-top: var(--line) solid var(--c-rule-soft); padding-top: var(--sp-1); padding-bottom: var(--sp-1); font-size: var(--fs-meta); font-variant-numeric: oldstyle-nums; line-height: var(--lh-ui); color: var(--c-ink-2); }   /* the foot is the reading time's size, its year in old-style figures, so © 2026 sits with the small capitals (Keith, 15 Nov: too big on desktop) */
.foot-bar p { margin: 0; font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); }
.foot-bar a { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--target); color: var(--c-ink-2); text-decoration: underline var(--line) transparent; text-underline-offset: var(--underline-offset); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps); }
@media (hover: hover) { .foot-bar a:hover { color: var(--c-ink); text-decoration-color: currentColor; } }
/* The letter (chosen 15 November 2026 from the footer lab, lab-footers.html F, after G; the lab stays as the record): two halves of one
   band, each a line in his voice with its way to answer under it. Left, write to me: his line and the four keys. Right, I write to you:
   the letter's line, then the newsletter's addressing: To beside the ruled field and Subscribe (the head's Letters key, a hairline box
   filled under the pointer), From and Keith, in his voice, under it. The form posts to /api/subscribe; site.js answers in place in the
   newsletter's words, and without it the answer lands on the Letters page. On phones the halves stack; down to a tablet they stay side by side. */
.foot-pair { align-items: stretch; }   /* both halves as tall as the taller, so their last rows meet: */
.foot-half { grid-column: 1 / span 6; display: grid; grid-template-rows: auto 1fr; row-gap: var(--sp-5); }
.foot-half + .foot-half { grid-column: 7 / -1; }
.foot-half .foot-line, .foot-half .keys { grid-column: 1 / -1; }
.foot-half .keys { justify-self: start; }
.foot-half .keys, .foot-half .letter { align-self: end; }   /* the keys stand level with From Keith, the two lines level at the top */
.letter { display: grid; grid-template-columns: minmax(var(--letter-k), max-content) minmax(0, 1fr); column-gap: var(--letter-gap); align-items: end; margin: 0; }
.letter-k { font-size: var(--fs-foot); line-height: var(--lh-ui); letter-spacing: var(--track-caps); font-variant-caps: all-small-caps; color: var(--c-ink-2); }
.letter-to { grid-column: 1; grid-row: 1; padding-bottom: var(--sp-2); }   /* To stands on the line, beside the address */
.letter-row { grid-column: 2; grid-row: 1; display: flex; align-items: flex-end; gap: var(--sp-3); }
.letter-field {
  flex: 1 1 auto; min-width: 0; height: var(--target); padding: 0 2px;
  background: transparent; border: 0; border-bottom: var(--line) solid var(--c-field); border-radius: var(--radius);
  color: var(--c-ink); caret-color: var(--c-ink); font: 400 var(--fs-nav) / 1.4 var(--f-text);
  outline: none; -webkit-appearance: none; appearance: none;
}
.letter-field::placeholder { color: var(--c-field); opacity: 1; }
.letter-field:focus-visible { outline: var(--line-state) solid transparent; outline-offset: var(--line-state); border-bottom-color: var(--c-ink); box-shadow: inset 0 calc(-1 * var(--line)) 0 var(--c-ink); }
.letter-field[aria-invalid="true"], .letter-field[aria-invalid="true"]:focus-visible { border-bottom: 3px double var(--c-ink); box-shadow: none; }
.letter-field:-webkit-autofill { -webkit-text-fill-color: var(--c-ink); box-shadow: inset 0 0 0 100px var(--c-paper); }
.letter-btn {
  position: relative; flex: none; height: var(--key); padding: 0 var(--sp-3); border: var(--line) solid var(--c-ink); border-radius: var(--radius);
  background: transparent; color: var(--c-ink); cursor: pointer; -webkit-appearance: none; appearance: none;
  font: 400 var(--fs-nav) / var(--lh-ui) var(--f-text); font-variant-caps: all-small-caps; letter-spacing: var(--track-caps);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--press-dur) ease-out;
}
.letter-btn::before { content: ""; position: absolute; inset: calc((var(--key) - var(--target)) / 2 - var(--line)) calc(-1 * var(--line)); }   /* a 44px tall target */
@media (hover: hover) { .letter-btn:hover { background: var(--c-ink); color: var(--c-paper); } }
.letter-btn:active { transform: translateY(var(--press)); background: var(--c-ink); color: var(--c-paper); transition-duration: var(--dur), var(--press-dur), var(--press-dur); }
.letter-btn[aria-disabled="true"] { cursor: progress; background: transparent; color: var(--c-ink-2); border-color: var(--c-ink-2); }
.letter-msg { grid-column: 2; grid-row: 2; margin: var(--sp-2) 0 0; font-size: var(--fs-msg); line-height: var(--lh-msg); color: var(--c-ink); }
.letter-msg:empty { display: none; }
.letter-src { display: none; }   /* the messages' words, read by site.js */
.letter-from { grid-column: 1; grid-row: 3; margin-top: var(--letter-from); align-self: baseline; }
.letter-v { grid-column: 2; grid-row: 3; justify-self: start; margin-top: var(--letter-from); align-self: baseline; font-family: var(--f-display); -webkit-text-stroke: var(--stroke-voice) currentColor; font-size: var(--fs-voice); line-height: var(--lh-title); color: var(--c-ink); }
/* The narrowest phones (320px): the row gives up a little air round Subscribe, so the field still shows its whole placeholder. */
@media (max-width: 359px) { .letter-row { gap: var(--sp-2); } .letter-btn { padding: 0 var(--sp-2); } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }   /* the newsletter's honeypot: only bots fill it */
/* The one moment: as the form first comes half into view, Keith writes himself in on the From line, left to right (site.js adds
   .has-moment). The clip reaches past the italic's overhang, so the finished name is never cut. */
@media (prefers-reduced-motion: no-preference) {
  .foot.has-moment .letter-v { clip-path: inset(-.3em -.4em -.3em -.3em); transition: clip-path var(--letter-write) var(--ease) var(--letter-wait); }
  .foot.is-pending .letter-v { clip-path: inset(-.3em calc(100% + .3em) -.3em -.3em); }   /* nothing at all before he writes: the clip's right edge starts on its left, out past the K's overhang */
}

/* ---------- Below the rail width ---------- */
@media (max-width: 1199px) {
  .toc { display: none; }
  .toc-fold { display: block; }
  .essay-h, .prose, .pn-in { grid-column: 1 / -1; width: 100%; justify-self: center; }
  .pn-in { max-width: var(--measure); }
}

/* ---------- Tablets ---------- */
@media (max-width: 1024px) {
  .page-h { grid-column: 1 / -1; }
  .page-h.sticky { position: static; }
  .page-body { grid-column: 1 / -1; margin-top: var(--sp-6); }
  .hero-text, .hero.has-globe .hero-text { grid-column: 1 / -1; }
  .globe { grid-column: 1 / -1; justify-self: start; margin-top: var(--sp-6); }
  .gallery-h { grid-column: 1 / -1; }
  .stats { grid-column: 1 / -1; justify-content: flex-start; margin-top: var(--sp-6); }
  .contact { columns: 2; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .head { display: grid; grid-template-columns: 1fr auto; row-gap: 0; padding-top: var(--sp-1); }
  .head-nav { display: contents; }
  .head-nav ul { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 0; border-top: var(--line) solid var(--c-rule-soft); margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); }
  .head-cta { grid-column: 2; grid-row: 1; }
  .hero { padding-top: var(--sp-7); padding-bottom: var(--sp-7); }
  .globe { justify-self: center; }
  .work a { grid-template-columns: 1fr auto; grid-template-areas: "t t" "k d"; column-gap: var(--sp-4); }
  .work .d { justify-self: end; }
  .globe-ok:not([data-mode="grid"]) .globe-mode { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-2); }
  .gallery .stage { margin-inline: calc(-1 * var(--pad)); }
  .viewer { width: 100%; }
  .contact { margin-top: var(--sp-6); }
  .stats { gap: var(--sp-6); }
  .essay { padding-top: var(--sp-7); }
  .prose { margin-top: var(--sp-6); }
  .prose .epigraph { margin-bottom: var(--sp-6); }
  .prose blockquote { padding-left: var(--sp-4); }
  .pn-in { grid-template-columns: 1fr; row-gap: var(--sp-5); }
  .pn .next { grid-column: 1; }
  .foot-half, .foot-half + .foot-half { grid-column: 1 / -1; width: 100%; max-width: var(--measure-letter); }
  /* on a phone the letter comes first and the four keys under From Keith, without his line above them (Keith, 15 November 2026) */
  .foot-half:first-child { order: 1; }
  .foot-half:first-child .foot-line { display: none; }
  .foot-pair { row-gap: var(--sp-6); }   /* the keys a short step under From Keith */
  .foot-main { row-gap: var(--sp-5); }
  .foot-line, .keys { grid-column: 1 / -1; }
  .lost .hero-text { grid-column: 1 / -1; }
  .keys { justify-self: start; }
}

/* ---------- The phone menu ----------
   Below 760px, with JavaScript, the running head is one row that stays at the top: the name, Letters, and the menu button, a
   swatch of the hero's halftone dots. Tapped, site.js blooms the swatch's dots across the screen until they merge into a page of ink;
   the head's own list of destinations is that page, set large in paper, the page you are on underlined and marked with one paper dot.
   Closing draws the ink back into the swatch. Without JavaScript the phone keeps the two-row head above. Chosen 15 November 2026
   from the phone nav lab (lab-nav.html?v=d, which stays as the record; its own heads are .nl-head, so these rules leave them alone).
   The head carries: .menu-on while the page of ink is shown, .menu-open from opening until the ink has drawn back; the list carries
   .is-solid once the bloom has filled the screen and .is-in while its words are shown. html.menu-carry (transitions.js) is the
   same solid ink on a page opened from the menu, held for its first frame, until site.js draws it back. */
.head-menu, .head-bloom { display: none; }
@media (max-width: 760px) {
  html.js .head:not(.nl-head) {
    position: sticky; top: 0; z-index: 30;
    display: flex; gap: var(--sp-3); min-height: var(--menu-row); padding-top: 0; padding-bottom: 0;
    background: var(--c-paper); transition: border-color var(--menu-flip) var(--ease);
  }
  html.js .head-name { position: relative; z-index: 3; margin-right: auto; white-space: nowrap; transition: color var(--menu-flip) var(--ease); }
  html.js .head-cta { z-index: 3; flex: none; transition: background-color var(--menu-flip) var(--ease), color var(--menu-flip) var(--ease), border-color var(--menu-flip) var(--ease); }
  html.js .head-nav ul { display: none; }
  html.js .head-menu {
    position: relative; z-index: 3; display: grid; place-items: center; flex: none; width: var(--target); height: var(--target);
    margin-right: calc((var(--menu-icon) - var(--target)) / 2);   /* the drawn swatch, not the target, lines up with the page margin */
    padding: 0; border: 0; background: transparent; color: var(--c-ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: color var(--menu-flip) var(--ease);
  }
  html.js .head-menu:focus-visible { outline-offset: calc(-1 * var(--line-state)); }
  /* the swatch: three rows of dots graded like a corner of the halftone; open, the four edge dots go and the five left are a cross */
  .head-sw { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: var(--menu-icon); height: var(--menu-icon); }
  .head-sw i { place-self: center; width: var(--menu-sw-dot); height: var(--menu-sw-dot); border-radius: 50%; background: currentColor; transform: scale(var(--s)); transition: transform var(--menu-flip) var(--ease-out); }
  .head-sw i:nth-child(1) { --s: .55; } .head-sw i:nth-child(2) { --s: .75; } .head-sw i:nth-child(3) { --s: .95; }
  .head-sw i:nth-child(4) { --s: .4; }  .head-sw i:nth-child(5) { --s: .6; }  .head-sw i:nth-child(6) { --s: .75; }
  .head-sw i:nth-child(7) { --s: .3; }  .head-sw i:nth-child(8) { --s: .45; } .head-sw i:nth-child(9) { --s: .6; }
  :is(.head.menu-open, html.menu-carry .head) .head-sw i:nth-child(odd) { --s: .8; }
  :is(.head.menu-open, html.menu-carry .head) .head-sw i:nth-child(even) { --s: 0; }
  .head.menu-open .head-sw i:nth-child(4) { transition-delay: .03s; } .head.menu-open .head-sw i:nth-child(6) { transition-delay: .06s; }
  .head.menu-open .head-sw i:nth-child(8) { transition-delay: .09s; }

  /* open: the head's paper and rule give way to the ink (the bloom paints the row's paper until the ink reaches it) */
  html.js .head.menu-open:not(.nl-head), html.menu-carry .head:not(.nl-head) { background: transparent; border-bottom-color: transparent; }
  html.js .head-bloom { display: block; position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; visibility: hidden; }
  html.js .head-bloom.is-on { visibility: visible; }
  /* the name, Letters and the swatch turn to paper as the ink reaches them, and back as it leaves */
  html.js .head .is-inked:is(.head-name, .head-menu), html.menu-carry .head :is(.head-name, .head-menu) { color: var(--c-paper); }
  html.js .head .head-cta.is-inked, html.menu-carry .head .head-cta { background: var(--c-paper); border-color: var(--c-paper); color: var(--c-ink); }
  html.js .head .is-inked:focus-visible { outline-color: var(--c-paper); }
  html.menu-locked { overflow: hidden; }

  /* the page of ink: the head's own list */
  html.js .head.menu-on .head-nav ul, html.menu-carry .head-nav ul {
    position: fixed; inset: 0; z-index: 2; display: block; overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: calc(var(--menu-row) + var(--sp-2)) var(--pad) calc(var(--sp-7) + env(safe-area-inset-bottom)); border: 0;
    color: var(--c-paper);
  }
  /* a breath short of opaque, on purpose (the lab's finding): over a fully opaque layer the browser stops painting the page under it,
     and closing then waits on a repaint of the whole page before the ink can draw back. The difference is not visible. */
  html.js .head-nav ul.is-solid, html.menu-carry .head-nav ul { background: color-mix(in srgb, var(--c-ink) 99.5%, transparent); }
  html.js .head-nav li { position: relative; --i: 0; }
  html.js .head-nav li:nth-child(2) { --i: 1; }
  html.js .head-nav li:nth-child(3) { --i: 2; }
  html.js .head-nav li a {
    display: block; min-height: var(--menu-link-row); padding: var(--sp-5) 0 var(--sp-4); border-bottom: var(--line) solid var(--c-menu-rule);
    font-family: var(--f-display); -webkit-text-stroke: var(--stroke-display) currentColor; font-size: var(--fs-menu); line-height: var(--lh-head);
    letter-spacing: var(--track-head); font-variant-caps: normal; color: var(--c-paper); text-decoration: none;
    opacity: 0; transform: translateY(var(--menu-rise));
    transition: opacity var(--menu-words-out) var(--ease), transform var(--menu-words-out) var(--ease);
  }
  html.js .head-nav .head-w { text-decoration: underline var(--line) transparent; text-underline-offset: var(--menu-underline); transition: text-decoration-color var(--dur) var(--ease); }
  html.js .head-nav ul.is-in a { opacity: 1; transform: none; transition: opacity var(--menu-words-in) var(--ease-out) calc(var(--i) * var(--menu-stagger)), transform var(--menu-words-in) var(--ease-out) calc(var(--i) * var(--menu-stagger)); }
  html.js .head-nav li a[aria-current] { color: var(--c-paper); }
  html.js .head-nav li a[aria-current] .head-w { text-decoration-color: currentColor; }   /* the page you are on: underlined, as everywhere on the site, */
  html.js .head-nav li a[aria-current]::after { content: ""; position: absolute; right: 0; top: calc(50% - var(--menu-here-dot) / 2); width: var(--menu-here-dot); height: var(--menu-here-dot); border-radius: 50%; background: currentColor; }   /* and one paper dot, the hero's own mark */
  @media (hover: hover) { html.js .head-nav li a:hover { color: var(--c-paper); } html.js .head-nav li a:hover .head-w { text-decoration-color: currentColor; } }
  html.js .head-nav li a:focus-visible { outline-color: var(--c-paper); outline-offset: calc(-1 * var(--line-state)); }
  html.js .head-nav li a .arrow { width: var(--menu-arrow); height: var(--menu-arrow); margin-left: var(--menu-arrow-gap); vertical-align: var(--menu-arrow-raise); transform: none; }   /* Favourites leaves the site */
  html.js .head-nav ul ::selection { background: var(--c-paper); color: var(--c-ink); }

  /* the sticky head: jumps land below it; the essay's reading line runs along its rule, under the menu when that is open */
  html.js main [id], html.js .prose :is(h2, h3, h4, .fn) { scroll-margin-top: calc(var(--menu-row) + var(--sp-4)); }
  html.js .progress { top: calc(var(--menu-row) - var(--line)); z-index: 31; }
  html.menu-locked .progress, html.menu-carry .progress { visibility: hidden; }
  html.js .skip { z-index: 31; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  /* no bloom: the ink page and the head's words fade together, the one change that is not a move */
  html.js .head-nav li a { transition: none !important; }
  html.js .head.menu-on .head-nav ul { opacity: 0; transition: opacity var(--dur) var(--ease) !important; }
  html.js .head.menu-on .head-nav ul.is-in { opacity: 1; }
  html.js .head :is(.head-name, .head-cta, .head-menu) { transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease) !important; }
}
@media (max-width: 760px) and (forced-colors: active) {
  html.js .head-nav ul.is-solid { forced-color-adjust: none; }
}

/* ---------- Page transitions ----------
   Every page to every other is one page turn, in three parts that never lie one over the other. The page left fades out quickly;
   the page opened waits for it, then fades in, rising a few pixels into place; the running head, when both pages show it, holds
   still throughout. Anything else named for a transition that only one of the two pages has (the head when one page is scrolled
   past it, the Gallery's pieces) leaves or arrives with its page.
   The one thing that travels is an essay's title. From a list of essays (Home, Writing, an essay's Other articles, its previous
   and next) the essay's own heading sets off from the row, at the row's size, and grows into place: it takes over from the row's
   title in the first moments, while the two are small and lie one on the other, so the face never changes mid-flight. Going back,
   the heading shrinks onto its row and the row's own title takes over as it lands. transitions.js measures both ends and names
   the pieces as a page is left and as the next is shown (html.vt-carry-in, html.vt-carry-back, --vt-carry-from, --vt-carry-to).
   Home to the Gallery and back, the same turn runs under the globe, which is carried with its heading and figures (photo-globe.css).
   Plain navigation where the browser has no cross-document view transitions, and always under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .head { view-transition-name: head; }
  ::view-transition-group(head) { animation-duration: var(--dur-page-in); }
  ::view-transition-old(root), ::view-transition-old(*):only-child { animation: vt-page-out var(--dur-page-out) var(--ease) both; }
  ::view-transition-new(root), ::view-transition-new(*):only-child { animation: vt-page-in var(--dur-page-in) var(--ease) var(--page-in-wait) both; }
  html:is(.vt-carry-in, .vt-carry-back) { --page-in-wait: var(--page-in-wait-carry); }
  /* the carried title: one picture of the heading, moved and scaled from its top left corner, never stretched */
  ::view-transition-group(title-carry) { transform-origin: 0 0; }
  html:is(.vt-carry-in, .vt-carry-back)::view-transition-group(title-carry) { animation: vt-carry var(--dur-title) var(--ease-carry) both; }
  html.vt-carry-in::view-transition-new(title-carry):only-child { animation: vt-ink-in calc(var(--dur-title) * var(--title-swap)) var(--ease) both; }
  html.vt-carry-in::view-transition-old(title-rest):only-child { animation: vt-ink-out calc(var(--dur-title) * var(--title-swap) * .6) var(--ease) both; }   /* the row's own title gives way first, so it is not left behind as the heading sets off */
  html.vt-carry-back::view-transition-old(title-carry):only-child { animation: vt-ink-out calc(var(--dur-title) * var(--title-swap)) var(--ease) calc(var(--dur-title) * (1 - var(--title-swap))) both; }
  html.vt-carry-back::view-transition-new(title-rest):only-child { animation: vt-ink-in calc(var(--dur-title) * var(--title-swap)) var(--ease) calc(var(--dur-title) * (1 - var(--title-swap))) both; }
}
@keyframes vt-page-out { to { opacity: 0; } }
@keyframes vt-page-in { from { opacity: 0; transform: translateY(var(--page-rise)); } }
@keyframes vt-carry { from { transform: var(--vt-carry-from); } to { transform: var(--vt-carry-to); } }
@keyframes vt-ink-in { from { opacity: 0; } }
@keyframes vt-ink-out { to { opacity: 0; } }

/* ---------- Reduced motion and forced colours ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .work a:focus-visible { outline: var(--line-state) solid Highlight; }
  .keys a, .head-cta { border-color: ButtonText; }
  .letter-field:focus-visible { outline: var(--line-state) solid Highlight; }
  .letter-btn { border: var(--line) solid ButtonText; }
}
