/* The site: tokens, base, masthead, page head, labels, the Writing list and the motion system.
   Every page loads this first, then its own sheet. The look is The Stack's: warm-white lines on
   near-black, and blue only for data, so no control, link or focus ring is ever blue.

   Motion has one idea: things arrive as light does. Text comes into focus, lines draw from the
   left, a pulse runs along a rule, drawings spread out from their centre. Arrivals use --ease
   (fast, then settling); nothing bounces; everything stops when the reader asks for less motion. */

/* The fonts, served from the site itself (no request leaves for Google): Inter (variable, optical size
   and weight), latin and latin-ext, cut by tools/fonts/build.py with the alternates the site uses (D060);
   IBM Plex Mono 400 and 500, for code, as Google Fonts serves them; both under the SIL Open Font License
   1.1. And Plan, the site's own lettering for labels, dates and numbers, drawn by tools/fonts/build.py. */
/* Plan is drawn a size up from what a label asks for, so a label set at 11 px is lettered at 11.5 px and
   every 11 px label in the stylesheets takes it without a size of its own. */
@font-face { font-family: "Plan"; font-style: normal; font-weight: 500; font-display: swap; size-adjust: 104.5%; src: url(/assets/fonts/plan-500.woff2) format("woff2"); }
@font-face { font-family: "Plan fallback"; src: local("Menlo"), local("Courier New"); size-adjust: 104.2%; ascent-override: 94%; descent-override: 26.1%; line-gap-override: 0%; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-mono-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-mono-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-mono-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-mono-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/inter-ours-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/inter-ours-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter fallback"; src: local("Arial"); size-adjust: 107.4%; ascent-override: 90.2%; descent-override: 22.48%; line-gap-override: 0%; }
/* Light display titles are about 12% narrower in Inter than in the text fallback, so a title set
   in the fallback could wrap onto one more line and jump when Inter arrives. */
@font-face { font-family: "Inter display fallback"; src: local("Arial"); size-adjust: 94.8%; ascent-override: 90.2%; descent-override: 22.48%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono fallback"; src: local("Menlo"), local("Courier New"); size-adjust: 99.7%; ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }

:root {
  color-scheme: dark;
  --ground: #07090C;
  --line: #E9E2D6;
  --ink: #F2EEE7;
  --ink-2: #9C978F;
  --accent: #8AD4FF;
  --hair: rgba(233, 226, 214, 0.12);
  --hair-2: rgba(233, 226, 214, 0.26);
  --glow: rgba(233, 226, 214, 0.45);
  /* The ground and the line as channels, so a stylesheet writes a shade of either without typing a
     colour: rgba(var(--line-rgb), 0.06). Each flips with the theme. */
  --ground-rgb: 7, 9, 12;
  --line-rgb: 233, 226, 214;
  --scrollbar: rgba(233, 226, 214, 0.18);
  --selection: rgba(233, 226, 214, 0.2);
  /* Glass: the scrolled masthead and the contents sheet at 97%, the contents bar at 90%. */
  --glass: rgba(7, 9, 12, 0.97);
  --glass-bar: rgba(7, 9, 12, 0.9);
  /* Behind the open contents sheet the page dims under a scrim darker than the ground; the sheet
     casts the site's one drop shadow. */
  --scrim-sheet: rgba(4, 5, 7, 0.72);
  --shadow-sheet: 0 -20px 60px rgba(0, 0, 0, 0.6);
  --title-weight: 300;
  /* Information set as text: the accent, which reads at 12.3:1 on the dark ground. */
  --accent-text: #8AD4FF;
  /* Drawn lines' strength, multiplied into every .dw and cover line: lines of ink on the light page
     go one step heavier, since dark lines on light read thinner. A figure sets 1 to keep its own. */
  --ink-gain: 1;
  --font-text: "Inter", "Inter fallback", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Inter", "Inter display fallback", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Plex Mono fallback", ui-monospace, Menlo, monospace;
  /* Labels, dates and small numbers: Plan (D060); a section title's number takes the title's own face.
     Code keeps --font-mono, and so do the words inside pictures. */
  --font-label: "Plan", "Plan fallback", ui-monospace, Menlo, monospace;
  /* Inter, ours (D060): text takes a tailed l, a serifed capital I and open digits, so I, l and 1 never
     meet; titles take a single-storey a and a compact t as well. */
  --ours-text: "cv05" 1, "cv08" 1, "ss01" 1;
  --ours-display: "cv05" 1, "cv08" 1, "ss01" 1, "cv11" 1, "cv13" 1;
  /* A long read in the dark: the body one step below the titles' Ink (13.1:1), so a page glares less
     and titles stand clear of the text. Bold words and titles keep Ink; in light the body is Ink. */
  --ink-body: color-mix(in oklab, var(--ink) 89%, var(--ground));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --margin: 20px;
  --header-h: 56px;
  --page-top: calc(var(--header-h) + 64px + env(safe-area-inset-top));
}
@media (min-width: 900px) { :root { --margin: 48px; --header-h: 64px; --page-top: calc(var(--header-h) + 128px); } }

/* The light theme (D055): the dark palette flipped. The dark theme's Ink is the light page (bone, not
   white, so light in a lit picture can rise above it), its ground is the light Ink, and the line and
   the blue darken to read on bone. The head of every page sets data-theme before first paint: the
   reader's choice, or the system's on a first visit. Glass, scrims and shadows take the light page's
   colour; a shadow is the line at low strength. A line of ink carries no glow (a glow of ink reads as
   a smudge), so --glow is clear. Dark type and dark lines on a light ground read thinner, so titles
   take more weight and drawn lines one step more strength. The accent is 4.0:1 on bone, enough for
   marks and not for text, so information set as text takes --accent-text. */
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #F2EEE7;
  --line: #1A1815;
  --ink: #07090C;
  --ink-2: #5E5A54;
  --accent: #0D7CB6;
  --hair: rgba(26, 24, 21, 0.12);
  --hair-2: rgba(26, 24, 21, 0.26);
  --glow: rgba(26, 24, 21, 0);
  --ground-rgb: 242, 238, 231;
  --line-rgb: 26, 24, 21;
  --scrollbar: rgba(26, 24, 21, 0.18);
  --selection: rgba(26, 24, 21, 0.14);
  --glass: rgba(242, 238, 231, 0.97);
  --glass-bar: rgba(242, 238, 231, 0.9);
  --scrim-sheet: rgba(250, 248, 244, 0.72);
  --shadow-sheet: 0 -20px 60px rgba(26, 24, 21, 0.06);
  --title-weight: 400;
  --accent-text: #0C6B9C;
  --ink-gain: 1.35;
  --ink-body: var(--ink);
}
/* A picture that has a version for each theme. */
:root:not([data-theme="light"]) .theme-light-only, :root[data-theme="light"] .theme-dark-only { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  scroll-behavior: smooth;
  scrollbar-color: var(--scrollbar) transparent;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 430;
  font-kerning: normal;
  font-feature-settings: var(--ours-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--selection); color: var(--ink); }
h1, h2, h3, p, ol, ul, figure, pre { margin: 0; padding: 0; }
/* Titles take the display alternates (D060); code keeps none of Inter's. */
h1, .title, .prose h2 { font-feature-settings: var(--ours-display); }
code, kbd, samp, pre { font-feature-settings: normal; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
/* Controls and code take the site's faces, never the browser's Arial or plain monospace. */
button, input, textarea, select { font: inherit; }
code, kbd, samp, pre { font-family: var(--font-mono); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.skip { position: fixed; left: var(--margin); top: 8px; z-index: 20; padding: 8px 12px; background: var(--ground); border: 1px solid var(--hair-2); border-radius: 4px; transform: translateY(-160%); }
.skip:focus-visible { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Smooth scroll on desktop (site.js): Lenis's required rules. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ------------------------------------------------------------------ masthead
   The name and four links on every page. It steps aside while the reader scrolls down and returns
   on the way up. The current page carries a line of light that glides to the next page's link
   during the page transition. On phones the name drops to the first name so every link fits. */
.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: env(safe-area-inset-top) var(--margin) 0;
  background: linear-gradient(var(--ground) 55%, rgba(var(--ground-rgb), 0));
  transition: transform 700ms var(--ease), opacity 500ms var(--ease), background-color 400ms var(--ease), border-color 400ms var(--ease);
  border-bottom: 1px solid transparent;
  view-transition-name: masthead;
}
/* Scrolled: frosted glass with a hairline, the site's one piece of glass in the page itself. */
.masthead.is-scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--hair);
}
/* On a touch or narrow screen the glass is the page's ground itself: Safari on a phone paints what passes under a
   blur again on every frame of a scroll, and at 97% the glass shows nothing through it anyway. */
@media (hover: none), (max-width: 899.98px) {
  .masthead.is-scrolled { background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.masthead.is-away { transform: translateY(-100%); opacity: 0; transition-duration: 500ms, 300ms; transition-timing-function: var(--ease-io), linear; }
.mark { display: inline-flex; align-items: center; min-width: 0; min-height: 44px; overflow: hidden; font-size: 15px; font-weight: 500; letter-spacing: 0.005em; white-space: nowrap; }
.masthead nav { display: flex; flex-shrink: 0; gap: 22px; }
.masthead nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ink-2); transition: color 300ms var(--ease); }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--ink); }
.nav-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 0.85em);
  height: 1px;
  background: var(--line);
  opacity: 0.55;
  box-shadow: 0 0 6px var(--glow);
  view-transition-name: nav-line;
}
@media (max-width: 559.98px) {
  .mark-last { display: none; }
  .masthead nav { gap: 16px; }
}
@media (max-width: 339.98px) {
  .masthead nav { gap: 12px; }
  .masthead nav a { font-size: 13px; }
}

/* ------------------------------------------------------------------ the theme switch
   A slider of raked sand whose knob is a stone (D055): night on the left, under the lamp; day on the
   right. The sand and the stone are rendered by the site's lit engine (tools/lit/knob.html,
   make-knob.py), the stone in 16 frames as it turns while it slides; a crescent and a small sun are
   drawn in the sand at its ends, each on a patch of plain sand so the rake lines do not cut through it.
   It sits in the masthead after Contact from 560 px. Below that the masthead has no room, so it sits at
   the foot of every page: a hairline at the margins, its name as a label in Plan on the left and the
   switch on the right margin, where it stands on a wider screen. Without JavaScript there is no switch.
   The change of theme: assets/js/theme.js. */
.masthead nav { margin-left: auto; }
.sand-switch {
  --p: 0;
  --f: 0;
  --nudge: 0px;
  --ss-sand: 35, 37, 38;
  --ss-mark: var(--ink-2);
  --ss-track: url(/assets/img/theme/track-dark.webp);
  --ss-rock: url(/assets/img/theme/rock-dark.webp);
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 72px;
  height: 44px;
  margin: 0 -6px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
:root[data-theme="light"] .sand-switch {
  --p: 1;
  --f: 15;
  --ss-sand: 237, 233, 227;
  --ss-track: url(/assets/img/theme/track-light.webp);
  --ss-rock: url(/assets/img/theme/rock-light.webp);
}
:root:not(.js) .sand-switch { display: none; }
.ss-track {
  position: relative;
  display: block;
  width: 60px;
  height: 32px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle 8.6px at 16px 16px, rgba(var(--ss-sand), 0.96), rgba(var(--ss-sand), 0.9) 62%, rgba(var(--ss-sand), 0)),
    radial-gradient(circle 8.6px at 44px 16px, rgba(var(--ss-sand), 0.96), rgba(var(--ss-sand), 0.9) 62%, rgba(var(--ss-sand), 0)),
    var(--ss-track) center / 100% 100% 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);
}
:root[data-theme="light"] .ss-track { 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); }
.ss-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.ss-marks .night, .ss-marks .day circle { fill: var(--ss-mark); transition: fill 400ms var(--ease); }
.ss-marks .day path { fill: none; stroke: var(--ss-mark); stroke-width: 1.3; stroke-linecap: round; transition: stroke 400ms var(--ease); }
.ss-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -30px;
  transform: translateX(calc(var(--p) * 28px + var(--nudge)));
  transition: transform 600ms var(--ease);
  pointer-events: none;
}
.ss-rock { position: absolute; inset: -2px; background: var(--ss-rock) calc(var(--f) / 15 * 100%) 0 / 1600% 100% no-repeat; }
/* Hover: the stone leans toward the other side, so it reads as something that slides. */
@media (hover: hover) {
  .sand-switch:hover { --nudge: 3px; --ss-mark: var(--ink); }
  :root[data-theme="light"] .sand-switch:hover { --nudge: -3px; }
}
.sand-switch.moving .ss-knob { transition: none; }
.sand-switch:focus-visible { outline: none; }
.sand-switch:focus-visible .ss-track { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Below 560 px: the page's foot, under a hairline, named in Plan with the switch on the right margin. */
.theme-foot { display: none; }
@media (max-width: 559.98px) {
  .masthead .sand-switch { display: none; }
  .js .theme-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 80px var(--margin) 0;
    padding: 12px 0 calc(32px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--hair);
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
  }
  .theme-foot .sand-switch { margin: 0 -6px 0 0; }
}

/* The change of theme: the new page is raked out from the stone (theme.js). A canvas over the page
   draws the rake's edge; every named part of the page goes with the page while it runs, so nothing
   outruns the rake, and the site's page transitions are otherwise untouched. */
#sand-fx { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; pointer-events: none; view-transition-name: sand-fx; }
html.theme-switching body *:not(#sand-fx) { view-transition-name: none !important; }
/* The rake is the change: no colour eases on its own while it runs, so the new page is captured, and its
   type read, in the new theme's colours, not half way from the old ones. */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
html.theme-switching::view-transition-old(root), html.theme-switching::view-transition-new(root) { animation: sand-hold var(--sand-dur, 1400ms) linear both; mix-blend-mode: normal; }
html.theme-switching::view-transition-new(root) { clip-path: circle(var(--sand-r, 0px) at var(--sand-x, 100%) var(--sand-y, 0px)); }
html.theme-switching::view-transition-group(sand-fx), html.theme-switching::view-transition-new(sand-fx) { animation: none; }
html.theme-switching::view-transition-old(sand-fx) { display: none; }
@keyframes sand-hold { from { opacity: 1; } to { opacity: 1; } }

/* ------------------------------------------------------------------ links
   A link draws a line of light under itself from the left on hover and retracts it to the right.
   Single-line links use ::after; prose keeps a quiet permanent underline for readability. */
.draw { position: relative; }
.draw::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 0.78em);
  height: 1px;
  background: var(--line);
  box-shadow: 0 0 6px var(--glow);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 700ms var(--ease);
  pointer-events: none;
}
.masthead nav a:not([aria-current])::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% + 0.85em); height: 1px; background: var(--line); opacity: 0.55; transform: scaleX(0); transform-origin: right center; transition: transform 700ms var(--ease); }
@media (hover: hover) {
  .draw:hover::after, .masthead nav a:not([aria-current]):hover::after { transform: scaleX(1); transform-origin: left center; }
}
.draw:focus-visible::after { transform: scaleX(1); }
/* A link that needs to look like a link at rest keeps a faint rule under the line of light. */
.ruled::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% + 0.78em); height: 1px; background: var(--hair-2); pointer-events: none; }

/* ------------------------------------------------------------------ page head
   Writing, Apps, About, Contact and Not found open the same way, on the hero's left edge. */
.page { padding: var(--page-top) var(--margin) 120px; max-width: 760px; }
@media (min-width: 900px) { .page { padding-bottom: 160px; } }
.title {
  font-family: var(--font-display);
  font-size: clamp(34px, 8.6vw, 46px);
  line-height: 1.04;
  font-weight: var(--title-weight);
  letter-spacing: -0.028em;
  text-wrap: balance;
}
@media (min-width: 900px) { .title { font-size: clamp(46px, 4.2vw, 64px); } }
.lede { margin-top: 22px; max-width: 30em; font-size: 17px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
@media (min-width: 900px) { .lede { margin-top: 26px; font-size: 19px; } }
.label {
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-ligatures: none;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ the Writing piece
   One piece (design/evolution/README.md, Writing 3): its thumbnail, a small lit garden at 1200 by
   630 and the same file it is shared with, sits on the page with no frame and fades out before
   every edge, as the hero and the drawings do. Below it is the caption every piece shares: a mono
   label, the title and one line. The Writing index lays pieces out in tiers (writing-index.css);
   Home's Selected work pairs one with an app's plan (home.css). */
:root {
  /* The scrim's alpha follows a smooth curve, so the picture dissolves into the page with no band.
     It is the page's own ground: no blue, no blur, no glass. */
  --scrim-page: linear-gradient(to bottom, rgba(var(--ground-rgb), 0) 0%, rgba(var(--ground-rgb), 0.013) 8%, rgba(var(--ground-rgb), 0.049) 15.5%, rgba(var(--ground-rgb), 0.104) 22.5%, rgba(var(--ground-rgb), 0.175) 29%, rgba(var(--ground-rgb), 0.259) 35%, rgba(var(--ground-rgb), 0.352) 41%, rgba(var(--ground-rgb), 0.45) 47%, rgba(var(--ground-rgb), 0.55) 53%, rgba(var(--ground-rgb), 0.648) 59%, rgba(var(--ground-rgb), 0.741) 65%, rgba(var(--ground-rgb), 0.825) 71%, rgba(var(--ground-rgb), 0.896) 77.5%, rgba(var(--ground-rgb), 0.951) 84.5%, rgba(var(--ground-rgb), 0.987) 92%, rgba(var(--ground-rgb), 1) 100%);
}
/* Every lit picture fades out before each of its edges, so nothing meets an edge and no rectangle
   shows, wherever the picture is cropped. */
.wi-pic, .pick-lit {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 11%, #000 89%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 11%, #000 89%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 84%, transparent 100%);
  mask-composite: intersect;
}
/* A thumbnail card (D062) shows whole: its own sand fades before its edges onto the page's ground, so the page
   neither fades nor crops it, nor lays a caption over it. */
.wi-pic.is-card, .pick-lit.is-card { -webkit-mask-image: none; mask-image: none; }
.wi-piece.over .wi-pic.is-card::after { display: none; }
.wi-piece.over:has(.is-card) .wi-cap { margin-top: 8px; }
.wi-piece { position: relative; display: flex; flex-direction: column; }
.wi-pic { position: relative; display: block; aspect-ratio: 1200 / 630; overflow: hidden; }
.wi-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1400ms var(--ease); }
a.wi-piece:hover .wi-pic img { transform: scale(1.025); }
.wi-cap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 4px; }
.wi-label { display: flex; flex-wrap: wrap; row-gap: 4px; font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.wi-label > * { white-space: nowrap; }
.wi-label > :not(:first-child)::before { content: "·"; margin: 0 0.6em; }
.wi-label .tag { margin-left: 0.8em; padding: 0 6px; border: 1px dashed var(--hair-2); border-radius: 3px; }
.wi-label .tag::before { content: none; }
.wi-piece .t { color: var(--ink); text-wrap: balance; transition: color 400ms var(--ease); }
.wi-piece .s { color: var(--ink-2); text-wrap: pretty; }
@media (hover: hover) { a.wi-piece:hover .t { color: var(--line); } }
/* The latest opens like Home's hero: its words start in the garden's shaded foot, over the page's
   own scrim, and run on below it. */
.wi-piece.over .wi-pic::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: var(--scrim-page); pointer-events: none; }
.wi-piece.over .wi-cap { position: relative; z-index: 1; margin-top: -36px; }
@media (min-width: 1100px) { .wi-piece.over .wi-cap { margin-top: -118px; padding: 0 16% 0 44px; } }
@media (prefers-reduced-motion: reduce) {
  .wi-pic img, .pick-lit img { transition: none; }
  a.wi-piece:hover .wi-pic img { transform: none; }
}

/* ------------------------------------------------------------------ the Writing list
   The foot of Home and the Writing index, value for value. On hover a pulse of light runs along
   the entry's rule, as the loop's pulse runs on Home, and an arrow comes forward. */
.entries { margin-top: 28px; border-top: 1px solid var(--hair); }
.page .entries { margin-top: 48px; }
.entries a { position: relative; display: grid; gap: 4px; padding: 18px 40px 20px 0; border-bottom: 1px solid var(--hair); transition: border-color 500ms var(--ease); }
.entries .meta { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); transition: color 400ms var(--ease); }
.entries .meta > * { white-space: nowrap; }
.entries .meta > :not(:first-child)::before { content: "·"; margin: 0 0.6em; }
.entries .t { font-size: 20px; line-height: 1.25; font-weight: 400; }
.entries .s { color: var(--ink-2); font-size: 15px; }
.entries a::before {
  content: "→";
  position: absolute;
  right: 4px;
  top: 50%;
  color: var(--ink);
  opacity: 0;
  transform: translate(-10px, -50%);
  transition: opacity 400ms var(--ease), transform 600ms var(--ease);
}
.pulse::after, .entries a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--line-rgb), 0), var(--line) 70%, rgba(var(--line-rgb), 0)) no-repeat;
  background-size: 36% 100%;
  background-position: -70% 0;
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) {
  .entries a:hover { border-bottom-color: rgba(var(--line-rgb), 0.5); box-shadow: 0 1px 0 0 color-mix(in srgb, var(--line) 8%, transparent), 0 8px 18px -12px color-mix(in srgb, var(--glow) 55%, transparent); }
  .entries a:hover .meta { color: var(--ink); }
  .entries a:hover::before { opacity: 1; transform: translate(0, -50%); }
  .pulse:hover::after, .entries a:hover::after { animation: pulse 1300ms var(--ease-io) forwards; }
}
@keyframes pulse {
  0% { opacity: 0; background-position: -70% 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; background-position: 170% 0; }
}

/* ------------------------------------------------------------------ onward links
   Contact on About, the back links on Not found. */
.onward { display: inline-flex; align-items: center; min-height: 44px; font-size: 20px; line-height: 1.25; }
.onward .arrow { margin-left: 10px; color: var(--ink-2); transition: transform 600ms var(--ease), color 300ms var(--ease); }
@media (hover: hover) { .onward:hover .arrow { transform: translateX(5px); color: var(--ink); } }
.onwards { margin-top: 26px; display: grid; justify-items: start; }

/* A primary action: a pill traced in light. Pills are kept for actions (Send on Contact, the close
   of an article's contents sheet); links and labels stay square. */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--hair-2);
  border-radius: 26px;
  font-size: 16px;
  color: var(--ink);
  background: rgba(var(--line-rgb), 0.03);
  transition: border-color 400ms var(--ease), background-color 400ms var(--ease);
}
.button .arrow { transition: transform 600ms var(--ease); }
@media (hover: hover) {
  .button:hover { border-color: var(--line); background: rgba(var(--line-rgb), 0.06); }
  .button:hover .arrow { transform: translateX(4px); }
}
.ext { display: inline-block; margin-left: 6px; font-size: 0.8em; color: var(--ink-2); transition: transform 600ms var(--ease), color 300ms var(--ease); }
@media (hover: hover) { a:hover > .ext, a:hover .ext { transform: translate(2px, -2px); color: var(--ink); } }

/* Not found: a line of light that breaks. A pulse runs along it three times and dies at the gap. */
.broken { display: flex; align-items: center; gap: 18px; max-width: 520px; margin-bottom: 40px; }
.b-l, .b-r { position: relative; flex: 1; height: 1px; background: var(--hair-2); }
.b-l { background: linear-gradient(90deg, var(--hair-2), var(--line)); box-shadow: 0 0 6px var(--glow); transform-origin: left; animation: b-draw 1100ms var(--ease) 200ms both; }
.b-r { opacity: 0.6; transform-origin: left; animation: b-draw 900ms var(--ease) 900ms both; }
.b-l::after {
  content: "";
  position: absolute;
  inset: -1px 0;
  background: linear-gradient(90deg, rgba(var(--line-rgb), 0), var(--ink) 80%, rgba(var(--line-rgb), 0)) no-repeat;
  background-size: 30% 100%;
  filter: drop-shadow(0 0 4px var(--glow));
  animation: b-pulse 3600ms var(--ease-in) 1600ms 3;
  opacity: 0;
}
.b-gap { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; color: var(--ink); }
@keyframes b-draw { from { transform: scaleX(0); } }
@keyframes b-pulse { 0% { opacity: 0; background-position: -45% 0; } 15% { opacity: 1; } 70% { opacity: 1; background-position: 100% 0; } 85%, 100% { opacity: 0; background-position: 100% 0; } }
.nf-path { margin-top: 18px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.nf-path code { color: var(--ink); }
.nf-newest { margin-top: 64px; }
.nf .nf-rows { margin-top: 36px; }
.nf .nf-rows a { padding: 14px 40px 16px 0; grid-template-columns: 7em 1fr; column-gap: 16px; align-items: baseline; }
.nf .nf-rows .t { font-size: 18px; }
@media (max-width: 559.98px) { .nf .nf-rows a { grid-template-columns: 1fr; } }
.nf-figure { display: block; margin: 36px 0 0; height: 220px; }
.nf-cap { display: block; margin-top: 12px; text-align: center; transition: color 300ms var(--ease); }
@media (hover: hover) { .nf-figure:hover .nf-cap { color: var(--ink); } }
.nf-guess { margin-top: 22px; font-size: 19px; }
a.inline { text-decoration: underline; text-decoration-color: var(--hair-2); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 300ms var(--ease), color 300ms var(--ease); }
@media (hover: hover) { a.inline:hover { text-decoration-color: var(--line); color: var(--ink); } }
@media (max-width: 1099.98px) { .nf { display: flex; flex-direction: column; } .nf .nf-figure { order: -1; height: 210px; margin: 0 0 24px; } .nf .ghost-label { display: none; } .nf .nf-cap { margin-top: 6px; } }
@media (min-width: 1100px) {
  .nf .nf-figure { grid-column: 2; grid-row: 1 / span 6; height: min(70vh, 640px); aspect-ratio: auto; margin: 0; position: sticky; top: calc(var(--header-h) + 32px); }
}
.nf-newest + .entries { margin-top: 16px; }
/* Not found in light. The line's glow goes with --glow; the pulse is the request running to the
   address the plan names, in its blue: three times the line's weight, with a sharp head and a fading
   tail, so it reads as a stroke of ink rather than a glow, and its head reaches the gap. The title, at
   the light weight, sets about 3% wider than the dark's; tracked 0.012em tighter it keeps the dark's
   width exactly, so it breaks into the same lines at every width and a change of theme does not move
   the page. */
:root[data-theme="light"] .b-l::after { background-image: linear-gradient(90deg, transparent, var(--accent) 97%, transparent); }
:root[data-theme="light"] .nf .title { letter-spacing: -0.04em; }

/* prototype only: facts still to confirm, as quiet text rather than a control */
.todo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline dotted var(--hair-2);
  text-underline-offset: 5px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ arrivals
   site.js marks what is in view with .is-in, in reading order, a beat apart (--d). Titles come
   into focus word by word. Without JavaScript nothing is hidden; site.js has two seconds to start
   before the page shows everything (the head script removes .js). */
.js [data-reveal], .js [data-reveal-each] > * { opacity: 0; transform: translate3d(0, 18px, 0); }
.js [data-reveal].is-in, .js [data-reveal-each] > .is-in {
  opacity: 1;
  transform: none;
  transition: opacity 1000ms var(--ease) var(--d, 0ms), transform 1300ms var(--ease) var(--d, 0ms);
}
.js [data-reveal="words"] { opacity: 1; transform: none; }
.js [data-reveal="words"] .w {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, 0.3em, 0);
}
.js [data-reveal="words"].is-in .w {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition: opacity 1100ms var(--ease), filter 1300ms var(--ease), transform 1400ms var(--ease);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 55ms);
}
/* On a touch or narrow screen the words come into focus by light and movement only: an animated blur is painted
   again on every frame, on the processor in Safari. */
@media (hover: none), (max-width: 899.98px) {
  .js [data-reveal="words"] .w, .js [data-reveal="words"].is-in .w { filter: none; }
  .js [data-reveal="words"].is-in .w { transition: opacity 1100ms var(--ease), transform 1400ms var(--ease); transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 55ms); }
}
/* Arriving through a page transition, a title shared with the page before is carried across
   by the transition itself, so it does not arrive again. */
.js.vt [data-reveal="carried"] { opacity: 1; transform: none; transition: none; }

/* Drawings spread out from their centre as light does, then the mask is dropped. The front is
   200 px soft and crosses a drawing's 300 to 400 px radius in the first second, so the spread reads
   as light arriving rather than a slow fade. */
@property --spread { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes light-in { from { --spread: 0px; } to { --spread: 1100px; } }
.light-in {
  -webkit-mask-image: radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), #000 calc(var(--spread) - 200px), transparent var(--spread));
  mask-image: radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), #000 calc(var(--spread) - 200px), transparent var(--spread));
  animation: light-in 2000ms cubic-bezier(0.33, 0, 0.2, 1) both;
}

/* Drawings (D037): every figure but the Home hero is an architect's drawing in the style of the
   garden's plan. These classes are the SVG twin of assets/js/lib/drawing.js: the same eight roles,
   weights and strengths, no glow and no glass, a fade into the ground at the edges and a pen. */
.dw { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dw * { vector-effect: non-scaling-stroke; }
.dw :is(path, line, polyline, polygon, circle, rect, ellipse) { stroke: var(--line); stroke-opacity: calc(var(--k, 0.36) * var(--f, 1) * var(--ink-gain, 1)); }
.dw .field { --k: 0.2; stroke-width: 0.6; }
.dw .hidden { --k: 0.16; stroke-width: 0.6; stroke-dasharray: 3 2.4; }
.dw .contour { --k: 0.36; stroke-width: 0.7; }
.dw .structure { --k: 0.45; stroke-width: 0.9; }
.dw .outline { --k: 0.55; stroke-width: 1.1; }
.dw .info { --k: 0.85; stroke-width: 1.1; stroke: var(--accent); }
.dw .info-field { --k: 0.3; stroke-width: 0.6; stroke: var(--accent); }
.dw .info-lead { --k: 0.95; stroke-width: 1.8; stroke: var(--accent); }
.dw text { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; fill: var(--ink-2); stroke: none; }
.dw-fade { -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%); mask-image: radial-gradient(closest-side, #000 70%, transparent 100%); }
/* The pen: with .pen, each stroke arrives in its drawing order (--o, 0 to 1) once .is-on is set. */
.js .dw.pen > * { opacity: 0; }
.js .dw.pen.is-on > * { opacity: 1; transition: opacity 600ms var(--ease) calc(var(--o, 0) * 1800ms); }

/* Covers: an article's idea as a drawing (tools/covers.py), in the drawing's roles: outline for the
   main shapes, contour and field below it, a heavier outline for what is kept, blue for data. With
   .draws, the structure draws itself in order when .is-on arrives, then the data runs through it. */
.cover { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cover * { vector-effect: non-scaling-stroke; }
.cover .ln { stroke: var(--line); stroke-opacity: calc(0.55 * var(--ink-gain, 1)); stroke-width: 1.1; }
.cover .ln2 { stroke: var(--line); stroke-opacity: calc(0.36 * var(--ink-gain, 1)); stroke-width: 0.7; }
.cover .ln3 { stroke: var(--line); stroke-opacity: calc(0.2 * var(--ink-gain, 1)); stroke-width: 0.6; }
.cover .cv-structure polygon:not([fill]) { fill: var(--ground); }
.cover .gl { fill: var(--ground); stroke-opacity: 0.8; stroke-width: 1.5; }
.cover .dt { stroke: var(--accent); stroke-opacity: calc(0.85 * var(--ink-gain, 1)); stroke-width: 1.1; }
.cover .dd { fill: var(--accent); stroke: none; }
.js .draws .cv-structure > *, .js .draws .dt { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0s 450ms; }
.js .draws .dd { opacity: 0; transition: opacity 0s 450ms; }
.js .draws.is-on .cv-structure > * { stroke-dashoffset: 0; transition: stroke-dashoffset 1500ms var(--ease) calc(var(--k, 0) * 9ms); }
.js .draws.is-on .dt { stroke-dashoffset: 0; transition: stroke-dashoffset 1400ms var(--ease-io) calc(700ms + var(--k, 0) * 120ms); }
.js .draws.is-on .dd { opacity: 1; transition: opacity 600ms var(--ease) calc(1500ms + var(--k, 0) * 80ms); }
/* Drawn: the dash is dropped, so a drawing scaled up never shows a stroke cut short. */
.js .draws.drawn .cv-structure > *, .js .draws.drawn .dt { stroke-dasharray: none; }
/* Carried in by a page transition: already drawn. */
.js.vt .art-cover .cv-structure > *, .js.vt .art-cover .dt { stroke-dashoffset: 0; transition: none; }
.js.vt .art-cover .dd { opacity: 1; transition: none; }

/* A list with a stage: each entry carries its cover; on wide screens the covers share one stage
   beside the list and draw as the pointer moves (writing/index.js). Home hides the inline covers. */
.entries .cover-slot { display: block; height: 200px; margin: 6px 0 18px; }
.cover-stage { display: none; }
@media (min-width: 1100px) { .writing .entries .cover-slot { display: none; } }
/* Unfinished pieces: listed apart, title and status only. */
.in-progress { margin-top: 36px; }
.drafts { margin-top: 10px; }
.drafts a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; padding: 10px 0; color: var(--ink-2); transition: color 300ms var(--ease); }
.drafts .t { font-size: 16px; color: var(--ink-2); }
.drafts .s { grid-column: 1; font-size: 14px; }
.drafts .tag { grid-column: 2; grid-row: 1; align-self: start; border: 0 !important; padding: 0 !important; }
.drafts .tag { flex-shrink: 0; 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; }
@media (hover: hover) { .drafts a:hover .t { color: var(--ink); } }
.page-next { margin-top: 40px; }
.cover-cap { display: none; }
@media (min-width: 1100px) {
  .staged {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
    column-gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
  .staged > :not(.cover-stage):not(.nf-figure) { grid-column: 1; }
  .staged .entries .cover-slot { display: none; }
  .cover-stage {
    display: block;
    grid-column: 2;
    grid-row: 1 / span 4;
    position: sticky;
    top: calc(var(--header-h) + 56px);
    aspect-ratio: 4 / 3;
    margin-top: 24px;
  }
  .cover-stage .cover { position: absolute; inset: 0; opacity: 0; transition: opacity 450ms var(--ease); }
  .cover-stage .cover.is-on { opacity: 1; }
  .cover-stage { cursor: pointer; }
  .cover-cap { display: grid; justify-items: center; text-align: center; gap: 6px; position: absolute; left: 15%; right: 15%; top: calc(100% + 18px); font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; transition: opacity 400ms var(--ease); }
  .cover-cap::before { content: "The idea"; font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
}

.cover .cv-pulse { display: none; }
.cover.is-live .cv-pulse { display: inline; }
.cover .pl { vector-effect: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 0.08 1; stroke-dashoffset: 0.08; animation: pl-run 2800ms var(--ease-io) calc(var(--k, 0) * 260ms) infinite; }
@keyframes pl-run { to { stroke-dashoffset: -1; } }

/* Reading progress: sand let fall in a line along the top edge, as far as the reading has come. It is the
   diagram's sand: a low ridge and its grains under the same lighting filter, lit from the upper left, so the ridge's
   near side is bright and its far side in shade (tools/sand-line.html, baked by tools/sand-line.py). Where it ends
   the sand has just landed, a small heap with a few grains ahead of it, and while the page scrolls grains fall onto
   it. The pictures are masks, coloured here from the page's line; each theme has its own, since the dark page shows
   sand by its light and the light page by its shade. The sand lies on a ledge of the page's ground, so the page's
   words pass under the ledge and never under the sand. site.js sets --p, is-on once there is sand to show and
   is-pouring while the page scrolls. */
.progress, .progress-ledge {
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 260ms var(--ease);
}
.progress.is-on, .progress-ledge.is-on { opacity: 1; }
/* the ledge: under the masthead, over the page */
.progress-ledge { z-index: 9; top: 0; height: calc(20px + env(safe-area-inset-top)); background: var(--ground); box-shadow: 0 2px 6px 1px var(--ground); }
.progress {
  --sand-line: url(/assets/img/theme/sand-line-dark.webp);
  --sand-head: url(/assets/img/theme/sand-head-dark.webp);
  --sand: 0.55;
  z-index: 11;
  height: 14px;
  overflow: clip;
  pointer-events: none;
}
:root[data-theme="light"] .progress {
  --sand-line: url(/assets/img/theme/sand-line-light.webp);
  --sand-head: url(/assets/img/theme/sand-head-light.webp);
  --sand: 0.6;
}
.progress::before, .progress::after, .progress i {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  background: rgb(var(--line-rgb));
  opacity: var(--sand);
}
.progress::before {
  left: 0;
  width: 100%;
  /* the line gives way to the heap over 12 px, 36 px before its end */
  -webkit-mask: var(--sand-line) 0 0 / 320px 14px repeat-x, linear-gradient(90deg, #000 calc(var(--p, 0) * 100% - 36px), transparent calc(var(--p, 0) * 100% - 24px));
  -webkit-mask-composite: source-in;
  mask: var(--sand-line) 0 0 / 320px 14px repeat-x, linear-gradient(90deg, #000 calc(var(--p, 0) * 100% - 36px), transparent calc(var(--p, 0) * 100% - 24px));
  mask-composite: intersect;
}
.progress::after {
  left: -36px;
  width: 100%;
  transform: translateX(calc(var(--p, 0) * 100%));
  -webkit-mask: var(--sand-head) 0 0 / 72px 14px no-repeat;
  mask: var(--sand-head) 0 0 / 72px 14px no-repeat;
}
.progress i {
  left: -6px;
  width: 100%;
  height: 5px;
  opacity: 0;
  transform: translateX(calc(var(--p, 0) * 100%));
  -webkit-mask: url(/assets/img/theme/sand-fall.webp) 0 0 / 4px 16px repeat-y;
  mask: url(/assets/img/theme/sand-fall.webp) 0 0 / 4px 16px repeat-y;
  transition: opacity 120ms linear;
}
@media (prefers-reduced-motion: no-preference) {
  .progress.is-pouring i { opacity: 1; animation: sand-fall 260ms linear infinite; }
}
@keyframes sand-fall { to { -webkit-mask-position: 0 16px; mask-position: 0 16px; } }

/* ------------------------------------------------------------------ page transitions
   The old page lets go quickly; the new one settles in. The masthead stays put, its line of light
   glides to the new page's link, and an article's title flies between the list and the page.
   Every page also sets the opt-in (and its reduced-motion opt-out) in an inline style at the top of
   its head: a style update made before this sheet applies turns the opt-in off, and Chrome then
   skips the transition into that page (Home, the essays, Apps, About and Contact did, 2026-11-18).
   tools/review/contract.py fails a page without it. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 700ms; animation-timing-function: var(--ease); }
::view-transition-old(root) { animation: 260ms var(--ease-in) both vt-out; }
::view-transition-new(root) { animation: 640ms var(--ease) 120ms both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
  .js [data-reveal], .js [data-reveal-each] > *, .js [data-reveal="words"] .w { opacity: 1; transform: none; filter: none; }
  .masthead.is-away { transform: none; opacity: 1; }
}

/* ------------------------------------------------------------------ profile links
   A profile (LinkedIn, X, GitHub) as a stone in raked rings, in the garden plan's hand: three rings
   raked by hand round the mark, each profile with its own wobble, and its name in mono below. On hover
   or focus the outer rings give a little, as gravel round a stone, the pen draws the inner ring in ink
   and the mark comes up to ink. No glow and no blue: a profile is not information. Rings written by
   tools/contact/profiles.mjs; marks: Simple Icons (CC0). */
.stones { display: flex; align-items: flex-start; gap: 18px; margin: 0; padding: 0; list-style: none; }
.stone-gap { width: 1px; align-self: stretch; margin: 10px 8px 30px; background: var(--hair); }
.stone-link { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--ink-2); transition: color 400ms var(--ease); }
.stone-link .rake { width: 64px; height: 64px; }
.stone-link .rake path { transform-box: view-box; transform-origin: 50% 50%; transition: transform 800ms var(--ease), stroke-opacity 500ms var(--ease); }
.stone-link .pen-ring { stroke: var(--ink); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms var(--ease); }
.stone-link > .brand { position: absolute; top: 22px; left: 50%; width: 20px; height: 20px; margin-left: -10px; fill: currentColor; }
.stone-name { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.stone-link:is(:hover, :focus-visible) { color: var(--ink); }
.stone-link:is(:hover, :focus-visible) .r3 { transform: scale(1.07); --f: 1.6; }
.stone-link:is(:hover, :focus-visible) .r2 { transform: scale(1.035); --f: 1.4; }
.stone-link:is(:hover, :focus-visible) .pen-ring { stroke-dashoffset: 0; }
/* The site's focus ring, drawn round the stone rather than the box, clear of its rake rings. */
.stone-link:focus-visible { outline: none; }
.stone-link:focus-visible .rake { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 50%; }
.stone-link:focus-visible .stone-name { text-decoration: underline; text-underline-offset: 4px; }
/* The mark with words, for a repository link: the underline drawn by the pen, the arrow lifting. */
.repo-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); }
.repo-link .brand { width: 17px; height: 17px; fill: currentColor; flex: none; transition: transform 600ms var(--ease); }
.repo-link .ext { display: inline-block; transition: transform 500ms var(--ease); }
@media (hover: hover) { .repo-link:hover .ext { transform: translate(2px, -2px); } .repo-link:hover .brand { transform: rotate(-8deg); } }
.repo-gap { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--ink-2); }
.repo-gap .brand { width: 15px; height: 15px; fill: currentColor; opacity: 0.45; flex: none; }
@media (prefers-reduced-motion: reduce) { .stone-link .rake path, .stone-link .pen-ring, .repo-link .brand, .repo-link .ext { transition: none; } }
