/* ═══════════════════════════════════════════════════
   site.css · v6 (2026-11-16)
   Source: https://design.seantippen.com/

   The look of seantippen.com, as parts any page can use:
   the two-channel glitch type, the site header and footer,
   tiles, labeled rules, link lists, and the parts a long
   page with pictures needs (screenshots, clips, project
   cards, before and after, code, diagrams, pager).

   Link after tokens.css (and after components.css when the
   page also uses the dashboard kit):
     <link rel="stylesheet" href="https://design.seantippen.com/tokens.css">
     <link rel="stylesheet" href="https://design.seantippen.com/site.css">
     <script src="https://design.seantippen.com/site.js" defer></script>

   Every class here is new in v6 and none shares a name with
   components.css, so pages that link only the older files
   are unaffected.
   ═══════════════════════════════════════════════════ */

:root {
  /* Page width. Every page uses one container, --site-max. Inside it,
     widths are fractions of the container (full, two thirds, half, a
     third, a quarter), never a fixed rem cap on a header, an intro, a
     caption, or a paragraph. */
  --site-max: 1400px;
  --site-gutter: clamp(1rem, 0.4rem + 2.4vw, 2.5rem);
  /* The one two-column split: two thirds and one third. The page head,
     the long page and its rail, and .duo all use it, so their edges line
     up down the page. A rem, ch, or px value on text appears only as a
     minimum inside min() or minmax(), never as a max-width or a basis. */
  --cols: minmax(0, 2fr) minmax(0, 1fr);

  /* The two channels. Every mark is drawn in one of them; the
     glitch splits a mark into both. */
  --ch-a: var(--color-accent);
  --ch-b: var(--color-secondary);
  --gx-split: 0.045em;
}

/* ─── Base, for pages built on site.css ─── */
html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { margin: 0; min-height: 100dvh; background: var(--color-bg); }
.site-page { display: flex; flex-direction: column; min-height: 100dvh; overflow-x: clip; }
.site-page img, .site-page video, .site-page svg { max-width: 100%; }
.site-page :where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd, pre) { margin: 0; }
.site-page :where(a) { color: var(--color-accent); text-decoration: none; transition: color var(--duration-fast); }
.site-page :where(a:hover) { color: var(--color-accent-hover); }
.site-page :where(p) { text-wrap: pretty; }
.site-page :where(code, kbd, samp) { font-family: var(--font-mono); font-size: 0.9em; }
.site-page :not(pre) > code { white-space: nowrap; }
.site-page :where(h1, h2, h3, h4) { line-height: var(--leading-tight); text-wrap: balance; letter-spacing: var(--tracking-tight); }
.site-page :focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ─── Containers ─── */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--site-max);
  margin-inline: auto;
  padding: var(--space-lg) var(--site-gutter) var(--space-xl);
  box-sizing: border-box;
}
.site-band { padding-block: var(--space-lg); }
.site-band + .site-band { padding-top: 0; }
/* Layout helpers: .duo is two thirds and one third; .halves is
   two equal columns. Both fall to one column under 960px. */
.duo { display: grid; grid-template-columns: var(--cols); gap: var(--space-lg); align-items: start; }
.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); align-items: start; }
@media (max-width: 960px) { .duo, .halves { grid-template-columns: minmax(0, 1fr); } }

/* ═══ 1. Glitch type ═══════════════════════════════
   .gx         text that splits into its two channels on hover
               (inside a link) or when site.js runs it. Needs
               data-gx with the same text.
   .gx-hold    the channels stay visible at rest (page titles).
   [data-decode]  a mono label that resolves out of noise once,
               when it scrolls into view.
   [data-gx-idle] slips out of register every 7 to 16 seconds. */
.gx { position: relative; display: inline-block; isolation: isolate; }
.gx::before, .gx::after {
  content: attr(data-gx);
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  white-space: inherit;
}
.gx::before { color: var(--ch-a); transform: translate(calc(var(--gx-split) * -1), 0); }
.gx::after  { color: var(--ch-b); transform: translate(var(--gx-split), 0); }
.gx-hold::before { opacity: 1; transform: translate(-0.03em, 0); }
.gx-hold::after  { opacity: 1; transform: translate(0.03em, 0); }

@media (hover: hover) {
  a:hover > .gx::before, a.gx:hover::before,
  a:hover > .gx::after,  a.gx:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .gx.gx-run         { animation: gx-body 320ms steps(1, end); }
  .gx.gx-run::before { opacity: 1; animation: gx-a 320ms steps(1, end); }
  .gx.gx-run::after  { opacity: 1; animation: gx-b 320ms steps(1, end); }
  @media (hover: hover) {
    a:hover > .gx, a.gx:hover                 { animation: gx-body 320ms steps(1, end); }
    a:hover > .gx::before, a.gx:hover::before { animation: gx-a 320ms steps(1, end); }
    a:hover > .gx::after,  a.gx:hover::after  { animation: gx-b 320ms steps(1, end); }
  }
}
@keyframes gx-body {
  0%   { clip-path: inset(0 0 58% 0); transform: translate(0.06em, 0); }
  14%  { clip-path: inset(42% 0 0 0); transform: translate(-0.05em, 0); }
  28%  { clip-path: inset(18% 0 44% 0); transform: translate(0.03em, 0); }
  42%, 100% { clip-path: inset(0); transform: none; }
}
@keyframes gx-a {
  0%   { transform: translate(-0.16em, 0); clip-path: inset(0 0 40% 0); }
  18%  { transform: translate(0.12em, -0.03em); clip-path: inset(55% 0 0 0); }
  36%  { transform: translate(-0.2em, 0.02em); clip-path: inset(22% 0 30% 0); }
  54%  { transform: translate(-0.08em, 0); clip-path: inset(0); }
  76%  { transform: translate(-0.11em, 0); clip-path: inset(0); }
  100% { clip-path: inset(0); }
}
@keyframes gx-b {
  0%   { transform: translate(0.18em, 0); clip-path: inset(48% 0 0 0); }
  18%  { transform: translate(-0.1em, 0.03em); clip-path: inset(0 0 60% 0); }
  36%  { transform: translate(0.22em, -0.02em); clip-path: inset(30% 0 22% 0); }
  54%  { transform: translate(0.07em, 0); clip-path: inset(0); }
  76%  { transform: translate(0.12em, 0); clip-path: inset(0); }
  100% { clip-path: inset(0); }
}

/* Page-to-page: the old page tears off in slices and the new one
   locks on. Same-origin links only; Chrome and Edge 126+. The
   theme toggle keeps its circle wipe (a typed transition). */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  html:not(:active-view-transition-type(theme-wipe))::view-transition-old(root) { animation: vt-tear-out 170ms steps(1, end) both; }
  html:not(:active-view-transition-type(theme-wipe))::view-transition-new(root) { animation: vt-lock-on 300ms steps(1, end) both; }
}
@keyframes vt-tear-out {
  0%   { opacity: 1; transform: none; clip-path: inset(0); }
  35%  { opacity: 1; transform: translateX(-1.2vw); clip-path: inset(0 0 46% 0); }
  70%  { opacity: 1; transform: translateX(1.6vw); clip-path: inset(58% 0 12% 0); }
  100% { opacity: 0; }
}
@keyframes vt-lock-on {
  0%   { opacity: 0; }
  24%  { opacity: 1; transform: translateX(2vw); clip-path: inset(12% 0 55% 0); }
  44%  { opacity: 1; transform: translateX(-1.4vw); clip-path: inset(48% 0 6% 0); }
  62%  { opacity: 1; transform: translateX(0.6vw); clip-path: inset(0 0 30% 0); }
  80%  { opacity: 1; transform: translateX(-0.2vw); clip-path: inset(0); }
  100% { opacity: 1; transform: none; clip-path: inset(0); }
}

/* ═══ 2. Display type ══════════════════════════════
   .gx-title   a page title: Big Shoulders, uppercase, white face
               with the two channels at its edges. One line; size
               it with --title-size if the words are long.
   .glitch-hero  the home-page hero. glitch-hero.js draws the h1
               in WebGL as extruded two-channel type; without
               WebGL the h1 shows as a .gx-title. */
.gx-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--title-size, var(--text-4xl));
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--color-text);
  text-wrap: nowrap;
  max-width: 100%;
}
.gx-title.gx-hold::before { transform: translate(-0.025em, 0); }
.gx-title.gx-hold::after  { transform: translate(0.025em, 0); }

.glitch-hero {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-md);
  /* The canvas blends onto this ground (screen in dark, multiply in
     light), so the hero needs its own flat background. */
  background: var(--hero-bg, var(--color-bg));
}
.glitch-hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
}
:root.light .glitch-hero canvas,
html[data-theme="light"] .glitch-hero canvas { mix-blend-mode: multiply; }
.glitch-hero.is-live canvas { opacity: 1; }
.glitch-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  color: transparent;
  margin: 0.12em 0 0.16em;
  min-height: 0.86em;
  user-select: none;
  white-space: nowrap;
}
.glitch-hero.no-gl h1 {
  color: var(--color-text);
  text-shadow: -0.035em 0 0 var(--ch-a), 0.035em 0 0 var(--ch-b);
}
@media (prefers-reduced-motion: reduce) {
  .glitch-hero h1 { color: var(--color-text); text-shadow: -0.035em 0 0 var(--ch-a), 0.035em 0 0 var(--ch-b); }
  .glitch-hero canvas { display: none; }
}

/* A page opener, one band. The title is the first child and runs across
   the top. Under it, the intro (.page-head-text) fills the left two
   thirds and the side (.page-head-side, usually facts) fills the right
   third, both starting on the same line. With .page-head-actions instead
   of a side, the intro takes the row and the buttons sit at its end.
   Under 960px everything is one column. Copy the markup from a starter;
   a page never sets widths on these parts. */
.page-head {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: start;
  gap: var(--space-sm) var(--space-xl);
  padding-bottom: var(--space-lg);
  container-type: inline-size;
}
.page-head > .gx-title { grid-column: 1 / -1; }
.page-head:has(> .page-head-actions) { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.page-head-text { display: grid; gap: var(--space-sm); min-width: 0; }
.page-head .gx-title { font-size: min(var(--title-size, var(--text-4xl)), 13cqi); }
.lede {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}
.lede strong { color: var(--color-text); font-weight: 600; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.page-head-side { min-width: 0; }
/* Facts in the side: one per row in the side third, more per row when
   the side drops below the intro on a narrow screen. */
.page-head-side.facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); column-gap: var(--space-md); border-block: 0; }
.page-head-side.facts > div,
.page-head-side.facts > div + div { padding: 0.55rem 0; border: 0; border-top: 1px solid var(--color-border); }
@media (max-width: 960px) {
  .page-head, .page-head:has(> .page-head-actions) { grid-template-columns: minmax(0, 1fr); }
}
.page-head + .site-band { padding-top: 0; }

/* ═══ 3. Site header ═══════════════════════════════
   Sticky bar with a two-channel hairline on top: the logo, an
   optional glance (date, weather, status) after a divider, the
   nav, and icon buttons. Under 720px the nav moves into a menu
   that the .site-menu-btn opens (site.js). */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--color-surface) 60%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.site-head::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--ch-a);
  box-shadow: 0 2px 0 0 var(--ch-b);
  pointer-events: none;
}
.site-head-inner {
  max-width: var(--site-max);
  margin-inline: auto;
  padding: 0.75rem var(--site-gutter);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-sizing: border-box;
}
.site-logo {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--color-text);
}
.site-page a.site-logo, .site-page a.site-logo:hover { color: var(--color-text); }
.site-logo .ch-a { color: var(--ch-a); }
/* The st mark: Sean's logo, beside the name at the start of every page
   header. Its own teal, never recolored. */
.site-brand { display: inline-flex; align-items: center; gap: 0.55rem; flex: none; }
.site-page a.site-brand, .site-page a.site-brand:hover { color: var(--color-text); text-decoration: none; }
.site-mark { display: block; width: auto; height: 1.6rem; }
.site-glance {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}
.site-nav { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.65em;
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0.65em;
  right: 0.65em;
  bottom: 9px;
  height: 1px;
  background: var(--ch-a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out);
}
.site-page .site-nav a:hover { color: var(--color-text); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-page .site-nav a[aria-current="page"] { color: var(--ch-a); }
.site-actions { display: flex; align-items: center; gap: var(--space-2); }
.site-head .site-nav + .site-actions { margin-left: var(--space-2); }

/* Square icon button (theme toggle, search, menu). Pair with
   theme.js: data-theme-toggle on the button, both icons inside. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.6rem;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font: 600 var(--text-label) / 1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.site-page a.icon-btn { color: var(--color-text-muted); }
.icon-btn:hover, .site-page a.icon-btn:hover { color: var(--color-text); border-color: var(--color-border-emphasis); }
.icon-btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn .icon-moon { display: none; }
:root.light .icon-btn .icon-sun, html[data-theme="light"] .icon-btn .icon-sun { display: none; }
:root.light .icon-btn .icon-moon, html[data-theme="light"] .icon-btn .icon-moon { display: block; }
.site-menu-btn { display: none; border-color: transparent; }
.site-menu-btn svg { width: 22px; height: 22px; }
/* .wide-only shows in the bar at desktop width; .menu-only shows only
   inside the phone menu (a sign-in link, for example). */
.site-nav .menu-only { display: none; }

@media (max-width: 720px) {
  .site-head-inner { gap: var(--space-sm); }
  .site-glance { padding-left: var(--space-sm); }
  .site-head .wide-only { display: none; }
  .site-head .site-nav .menu-only { display: inline-flex; }
  .icon-btn { white-space: nowrap; }
  .site-menu-btn { display: inline-flex; margin-left: auto; }
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2);
    background: var(--color-bg);
    margin: 0;
  }
  .site-head.menu-open .site-nav { display: flex; }
  .site-head.menu-open { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-head.menu-open .site-menu-btn { position: relative; z-index: 201; }
  .site-nav a { font-size: var(--text-base); }
  .site-head .site-nav + .site-actions { margin-left: 0; }
}
@media (max-width: 560px) { .site-glance { display: none; } }

/* ═══ 4. Labeled rule ══════════════════════════════
   A section heading set as a mono label with a hairline running
   to the right edge. Count or action can sit at the far end. */
.rule-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-text-secondary);
  line-height: 1.2;
}
.rule-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
  order: 1;
}
.rule-head { min-width: 0; flex-wrap: wrap; row-gap: 0.3rem; }
.rule-head::after { min-width: 1rem; }
.rule-head .rule-end { min-width: 0; order: 2; margin-left: auto; font-weight: 500; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: none; }

/* A larger section heading for long pages: Inter, with the rule. */
.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--color-border); align-self: center; }
@media (max-width: 640px) { .section-head { font-size: var(--text-lg); } }

/* ═══ 5. Tiles ═════════════════════════════════════
   A launcher tile: icon over a name. Odd tiles draw in channel A,
   even tiles in channel B; hover lifts the tile off a hard copy in
   the OTHER channel and the icon throws a ghost in it.
   .tile-grid       auto-fill grid. .tile-grid.cols-4 / .cols-8
                    fix the count at desktop width.
   .tile.tile-lg    the large version (main row).
   .tile.ch-b       force channel B (default is by position). */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: var(--space-sm);
}
.tile-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-grid.cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.tile {
  --tone: var(--ch-a);
  --tone-hi: var(--ch-b);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 0.5rem 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  text-align: center;
  transition:
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    background var(--duration-normal) var(--ease-out);
}
.site-page a.tile { color: var(--color-text-secondary); }
.tile-grid > .tile:nth-child(even), .tile.ch-b { --tone: var(--ch-b); --tone-hi: var(--ch-a); }
.tile-grid > .tile.ch-a { --tone: var(--ch-a); --tone-hi: var(--ch-b); }
.tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--tone-hi);
  opacity: 0;
  transition: opacity var(--duration-normal);
}
.tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--tone);
}
.tile-icon svg { width: 22px; height: 22px; }
.tile-name {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.tile-grid.cols-8 > .tile { padding: 1rem 0.4rem 0.9rem; }
.tile-lg { gap: 0.8rem; padding: 2rem 0.75rem 1.6rem; }
.tile-lg .tile-icon { width: 56px; height: 56px; }
.tile-lg .tile-icon svg { width: 34px; height: 34px; }
.tile-lg .tile-name { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); }
@media (hover: hover) {
  .tile:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 0 var(--tone-hi);
    border-color: var(--tone-hi);
    background: var(--color-surface-hover);
  }
  .site-page a.tile:hover { color: var(--color-text); }
  .tile:hover::before { opacity: 1; }
  .tile:hover .tile-icon { filter: drop-shadow(3px 0 0 var(--tone-hi)); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile:hover .tile-icon { animation: tile-split 260ms steps(1, end); }
}
@keyframes tile-split {
  0%   { transform: translate(-3px, 0); filter: drop-shadow(7px 0 0 var(--tone-hi)); clip-path: inset(0 0 55% 0); }
  22%  { transform: translate(3px, -1px); filter: drop-shadow(-6px 0 0 var(--tone-hi)); clip-path: inset(40% 0 0 0); }
  44%  { transform: translate(-1px, 1px); filter: drop-shadow(5px 0 0 var(--tone-hi)); clip-path: inset(0); }
  70%  { transform: translate(1px, 0); filter: drop-shadow(-2px 0 0 var(--tone-hi)); }
  100% { transform: none; filter: drop-shadow(3px 0 0 var(--tone-hi)); }
}
@media (max-width: 960px) {
  .tile-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid.cols-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-grid.cols-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-lg { padding: 1.3rem 0.5rem 1.1rem; }
}

/* ═══ 6. Link list ═════════════════════════════════
   Rows of name and address. A small square in the row's channel
   leads each name; hover draws a bar in the other channel.
   .link-list.cols-2 runs the rows in two columns. */
.link-list { list-style: none; padding: 0; margin: 0; container-type: inline-size; }
.link-list.cols-2 { columns: 2; column-gap: var(--space-md); }
.link-list li { break-inside: avoid; }
.link-row {
  --tone: var(--ch-a);
  --tone-hi: var(--ch-b);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.1rem 0.75rem;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  box-shadow: inset 0 0 0 0 var(--tone-hi);
  transition: box-shadow var(--duration-normal) var(--ease-out), background var(--duration-normal) var(--ease-out), color var(--duration-fast);
}
.site-page a.link-row { color: var(--color-text-secondary); }
.link-list li:nth-child(even) .link-row { --tone: var(--ch-b); --tone-hi: var(--ch-a); }
.link-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.link-name::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--tone); transition: background var(--duration-fast); }
.link-meta {
  min-width: 0;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: right;
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .link-row:hover, .site-page a.link-row:hover { color: var(--color-text); background: var(--color-surface-hover); box-shadow: inset 3px 0 0 0 var(--tone-hi); }
  .link-row:hover .link-name::before { background: var(--tone-hi); }
}
@media (max-width: 640px) { .link-list.cols-2 { columns: 1; } }
/* Where a column is too narrow for a name and its address on one line,
   every row in the list stacks them, so no row is out of step. */
@container (max-width: 30rem) {
  .link-row { flex-direction: column; align-items: flex-start; }
  .link-meta { margin-left: calc(7px + 0.6rem); text-align: left; }
}
@container (min-width: 30rem) and (max-width: 60rem) {
  .link-list.cols-2 .link-row { flex-direction: column; align-items: flex-start; }
  .link-list.cols-2 .link-meta { margin-left: calc(7px + 0.6rem); text-align: left; }
}

/* ═══ 7. Footer ════════════════════════════════════
   One row at desktop width: the logo and a contact line on the
   left, footer links in the middle, back-to-top on the right. */
.site-foot { border-top: 1px solid var(--color-border); }
.site-foot-inner {
  max-width: var(--site-max);
  margin-inline: auto;
  padding: var(--space-md) var(--site-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  box-sizing: border-box;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.site-foot-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-md); }
.site-foot-brand .site-logo { font-size: var(--text-sm); }
.site-foot-links { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.site-foot-links a {
  padding: 0.35em 0.5em;
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}
.site-page .site-foot-links a { color: var(--color-text-muted); }
.site-page .site-foot-links a:hover { color: var(--color-text); }

/* ═══ 8. Facts row ═════════════════════════════════
   Short label and value pairs in one row: role, status, period,
   systems. Wraps on a phone. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  border-block: 1px solid var(--color-border);
}
.facts > div { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; min-width: 0; }
.facts > div + div { padding-left: var(--space-md); border-left: 1px solid var(--color-border); }
.facts dt {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-text-muted);
}
.facts dd { margin: 0.2rem 0 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
@media (max-width: 640px) {
  .facts > div + div { border-left: 0; padding-left: 0; }
  .facts > div { border-bottom: 1px solid var(--color-border); }
  .facts > div:last-child { border-bottom: 0; }
}

/* Status mark: a project that is not in use says so, with a date. */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.status-tag::before { content: ''; width: 7px; height: 7px; background: var(--color-text-muted); }
.status-tag.is-live::before { background: var(--color-success); }
.status-tag.is-testing::before { background: var(--ch-a); }
.status-tag.is-finished::before { background: var(--ch-b); }

/* ═══ 9. Pictures ══════════════════════════════════
   .shot        a screenshot in a frame, with a caption under it.
                Wrap the image in <a data-zoom href="full.png"> to
                open it full size (site.js). Every caption starts
                with a .shot-tag saying what the picture is.
   .clip        an MP4 with native controls (pause and scrub),
                muted, framed like a shot.
   .pair        two shots side by side (before and after). */
.shot, .clip { display: grid; gap: var(--space-xs); min-width: 0; }
.shot-frame {
  position: relative;
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px;
  line-height: 0;
}
.shot-frame img, .shot-frame video, .shot-frame svg { width: 100%; height: auto; display: block; }
a.shot-frame { cursor: zoom-in; transition: border-color var(--duration-fast), box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out); }
@media (hover: hover) {
  a.shot-frame:hover { border-color: var(--ch-b); box-shadow: 4px 4px 0 0 var(--ch-b); transform: translate(-2px, -2px); }
}
.shot figcaption, .clip figcaption, .pair-caption {
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  color: var(--color-text-secondary);
}
.shot-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ch-a);
  margin-right: 0.5em;
  white-space: nowrap;
}
.shot-tag.is-demo { color: var(--ch-b); }
@media (hover: none) { .shot:has(a[data-zoom]) figcaption::after { content: ' Tap the picture to see it full size.'; } }
.clip video { background: var(--color-bg); }
.pair-wrap { container-type: inline-size; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); align-items: start; }
/* The two pictures sit side by side only where each half still gets
   40rem; in a long page's two-thirds column they stack, so each keeps
   a readable size. Each opens full size. */
@container (min-width: 82rem) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pair .shot figcaption { min-height: 0; }
.pair-label { font-weight: 700; color: var(--color-text); margin-right: 0.35em; }

/* The full-size viewer site.js opens for [data-zoom] links. */
.zoom {
  width: min(96vw, 2000px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--color-border-emphasis);
  background: var(--color-bg);
  color: var(--color-text);
}
.zoom::backdrop { background: color-mix(in oklch, var(--color-bg) 88%, transparent); }
.zoom img { display: block; width: 100%; height: auto; }
.zoom-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-md); border-bottom: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-text-secondary); position: sticky; top: 0; background: var(--color-bg); }

/* ═══ 10. Project cards ════════════════════════════
   .pcard        image on top, then name, statement, highlights,
                 and a foot row with the key figure and status.
   .pcard-lg     spans the grid: picture across the top, text below.
   .pcard-grid   two or three across; a .pcard-lg spans all. */
.pcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(26rem, 100%), 1fr));
  gap: var(--space-md);
}
.pcard {
  --tone-hi: var(--ch-b);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out), border-color var(--duration-normal) var(--ease-out);
}
@supports (grid-template-rows: subgrid) {
  .pcard-grid > .pcard:not(.pcard-lg) { grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
}
.pcard-grid > .pcard:nth-child(even) { --tone-hi: var(--ch-a); }
.site-page a.pcard { color: var(--color-text-secondary); }
@media (hover: hover) {
  a.pcard:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 0 var(--tone-hi); border-color: var(--tone-hi); }
  a.pcard:hover .pcard-name { color: var(--color-text); }
}
.pcard-media { position: relative; display: block; border-bottom: 1px solid var(--color-border); background: var(--color-bg); line-height: 0; overflow: hidden; }
.pcard-media img, .pcard-media svg { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; display: block; }
.pcard-body { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-md); min-width: 0; container-type: inline-size; }
.pcard-name { font-size: clamp(var(--text-base), 4.2cqi, var(--text-lg)); font-weight: 700; letter-spacing: -0.015em; line-height: var(--leading-tight); color: var(--color-text); }
.pcard-statement { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--color-text-secondary); }
.pcard-highlights { list-style: none; padding: 0; display: grid; gap: 0.35rem; font-size: var(--text-xs); color: var(--color-text-secondary); }
.pcard-highlights li { display: flex; gap: 0.6rem; }
.pcard-highlights li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 0.55em; background: var(--ch-a); }
.pcard-highlights li:nth-child(even)::before { background: var(--ch-b); }
.pcard-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}
/* The cue on a card that opens a full page. */
.pcard-more { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ch-a); white-space: nowrap; }
.pcard-more::after { content: ' \2192'; }
/* A card whose picture is a process strip (.flow): the strip sits on the
   card's own surface, centered in its box, with no caption tag; the
   numbered steps say what it is. */
.pcard-media.is-flow { display: grid; align-content: center; line-height: var(--leading-tight); padding: var(--space-lg) var(--space-md); background: transparent; }
.pcard > :first-child:has(> .is-flow) { display: grid; }

/* The card image's caption sits on its lower left corner as a tag. */
.pcard > :first-child { min-width: 0; }
.pcard-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.35rem 0.7rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-size: var(--text-xs);
  line-height: 1.2;
  color: var(--color-text-muted);
}
.pcard-caption .shot-tag { margin-right: 0; }
.pcard-media:has(> img) { padding-bottom: 2.4rem; }

/* .pcard-text wraps everything after the name. On a regular card it
   takes no part in layout. */
.pcard-text { display: contents; }

/* The wide card spans the grid and uses the page's two-thirds split,
   the same way the page head does.
   With a screenshot: the picture runs across the top (cropped to a wide
   band from its top left, so the table or page header stays legible),
   then the name across, then the statement in the left two thirds and
   the highlights and foot in the right third.
   With a process strip: the name and statement fill the left two
   thirds and the strip runs down the right third. */
.pcard-lg { grid-column: 1 / -1; grid-template-rows: none; }
.pcard-lg .pcard-media img { aspect-ratio: 21 / 8; }
.pcard-lg .pcard-body { display: grid; grid-template-columns: var(--cols); gap: var(--space-md) var(--space-xl); align-items: start; padding: var(--space-lg); }
.pcard-lg .pcard-name { grid-column: 1 / -1; font-size: var(--text-xl); }
.pcard-lg .pcard-statement { grid-column: 1; font-size: var(--text-base); }
.pcard-lg :where(.pcard-highlights, .pcard-foot) { grid-column: 2; }
.pcard-lg .pcard-foot { margin-top: 0; }
.pcard-lg .pcard-highlights { font-size: var(--text-sm); }
.pcard-lg:not(:has(.pcard-highlights, .pcard-foot)) .pcard-statement { grid-column: 1 / -1; }
.pcard-lg:has(.is-flow) { grid-template-columns: var(--cols); }
.pcard-lg:has(.is-flow) > :first-child { order: 2; display: flex; flex-direction: column; border-left: 1px solid var(--color-border); }
.pcard-lg:has(.is-flow) .pcard-media.is-flow { flex: 1; border-bottom: 0; padding: var(--space-lg); }
.pcard-lg:has(.is-flow) .pcard-body { grid-template-columns: minmax(0, 1fr); }
.pcard-lg:has(.is-flow) :where(.pcard-name, .pcard-statement, .pcard-highlights, .pcard-foot) { grid-column: 1; }
@media (max-width: 960px) {
  .pcard-lg .pcard-body, .pcard-lg:has(.is-flow) { grid-template-columns: minmax(0, 1fr); }
  .pcard-lg .pcard-body { padding: var(--space-md); }
  .pcard-lg :where(.pcard-name, .pcard-statement, .pcard-highlights, .pcard-foot) { grid-column: 1; }
  .pcard-lg:has(.is-flow) > :first-child { order: 0; border-left: 0; border-bottom: 1px solid var(--color-border); }
  .pcard-lg:has(.is-flow) .pcard-media.is-flow { padding: var(--space-lg) var(--space-md); }
}

/* Short list of minor items: name, then one clause. Two columns. */
.article-section > .minor-list { max-width: none; padding-left: 0; }
.minor-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(30rem, 100%), 1fr));
  column-gap: var(--space-lg);
  border-top: 1px solid var(--color-border);
}
.minor-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  min-width: 0;
}
.minor-list b { flex: none; font-weight: 600; color: var(--color-text); white-space: nowrap; }
.minor-list b::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 0.6rem; vertical-align: middle; background: var(--ch-a); }
.minor-list li:nth-child(even) b::after { background: var(--ch-b); }
.minor-wrap, .duo > *, .halves > * { container-type: inline-size; }
@container (max-width: 34rem) { .minor-list li { flex-direction: column; gap: 0.15rem; } .minor-list b::after { display: none; } }
@media (max-width: 640px) { .minor-list li { flex-direction: column; gap: 0.15rem; } .minor-list b::after { display: none; } }

/* ═══ 11. Jump bar ═════════════════════════════════
   In-page links to a page's sections. Sticks under the site header;
   on a phone the links sit in two columns and the bar does not stick. */
.jump-bar {
  position: sticky;
  top: var(--jump-top, 69px);
  z-index: 50;
  display: flex;
  gap: 0 1.4em;
  flex-wrap: wrap;
  border-block: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: var(--space-lg);
}
.jump-bar a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  white-space: nowrap;
}
.site-page .jump-bar a { color: var(--color-text-muted); }
.jump-bar + .site-band { padding-top: 0; }
@media (max-width: 1400px) { .jump-bar { gap: 0 1em; } .jump-bar a { letter-spacing: 0.04em; } }
@media (max-width: 720px) { .jump-bar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .jump-bar a { font-size: var(--text-xs); letter-spacing: 0.02em; } .jump-bar a:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.site-page .jump-bar a:hover, .site-page .jump-bar a[aria-current="true"] { color: var(--ch-a); }

/* ═══ 12. Long page ════════════════════════════════
   .article       a written page. Text, pictures, code, and
                  diagrams all fill its column.
   .split-rule    the line between a page's two halves, with an
                  anchor, so a reader can jump to the second half. */
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
.article-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); scroll-margin-top: 120px; }
.article-section > :where(.section-head, .rule-head) { margin-bottom: 0; }
.article-section h3:not([class]) { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); margin-top: var(--space-sm); }
.article-section :where(p, li) { color: var(--color-text-secondary); line-height: var(--leading-relaxed); }
.article-section :where(strong) { color: var(--color-text); font-weight: 600; }
.article-section ul:not([class]) { padding-left: 1.1rem; display: grid; gap: 0.4rem; list-style: square; }
.article-section ul:not([class]) li::marker { color: var(--ch-a); }
/* .article-layout: the article in the left two thirds, a sticky rail
   (contents list) in the right third, on the same split as the page
   head so the edges line up. The rail drops away under 960px. */
.article-layout { display: grid; grid-template-columns: var(--cols); gap: var(--space-xl); align-items: start; }
.article-rail { position: sticky; top: 100px; display: grid; gap: var(--space-md); }
.toc { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--color-border); }
.toc a { display: block; padding: 0.4rem 0 0.4rem var(--space-md); margin-left: -1px; border-left: 2px solid transparent; font-size: var(--text-xs); }
.site-page .toc a { color: var(--color-text-muted); }
.site-page .toc a:hover { color: var(--color-text); }
.site-page .toc a[aria-current="true"] { color: var(--ch-a); border-left-color: var(--ch-a); }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .article-rail { display: none; } }
.article-two { display: grid; grid-template-columns: var(--cols); gap: var(--space-lg); align-items: start; }
.article-two > .aside { position: sticky; top: 120px; }
@media (max-width: 960px) { .article-two { grid-template-columns: minmax(0, 1fr); } .article-two > .aside { position: static; } }

.split-rule {
  scroll-margin-top: 120px;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-strong);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ═══ 13. Code excerpt ═════════════════════════════
   <figure class="code"><pre><code>…</code></pre><figcaption>
   The caption says what the excerpt checks or enforces. Spans
   .c-com (comment), .c-key (keyword), .c-str (string) tint it. */
.code { display: grid; gap: var(--space-xs); min-width: 0; }
.code pre {
  margin: 0;
  padding: var(--space-md);
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--ch-a);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.65;
  color: var(--color-text);
  tab-size: 4;
  /* Show == and <= as typed, not as joined glyphs. */
  font-variant-ligatures: none;
}
.code code { font-family: inherit; background: none; padding: 0; }
.code .c-com { color: var(--color-text-muted); }
.code .c-key { color: var(--ch-a); }
.code .c-str { color: var(--ch-b); }
.code figcaption { font-size: var(--text-xs); color: var(--color-text-secondary); }
/* Code keeps its lines and indentation at every width: a long line
   scrolls inside the box. Write excerpts with short lines so they fit
   the column they sit in; on a phone the caption says to swipe. */
@media (max-width: 720px) { .code:has(figcaption) figcaption::after { content: ' Swipe the code sideways to see long lines.'; } }

/* ═══ 14. Diagram ══════════════════════════════════
   One SVG style for data flows and processes. Draw in an inline
   <svg> inside <figure class="diagram"> with these classes:
   .d-node (box), .d-node.is-a / .is-b (a box in a channel),
   .d-text, .d-sub, .d-edge (line), .d-edge.is-a / .is-b,
   and marker-end="url(#d-arrow)" from the <defs> in the starter. */
.diagram { display: grid; gap: var(--space-xs); min-width: 0; }
.diagram svg { width: 100%; height: auto; display: block; background: var(--color-surface); border: 1px solid var(--color-border); }
.d-node { fill: var(--color-bg); stroke: var(--color-border-strong); stroke-width: 1; }
.d-node.is-a { stroke: var(--ch-a); stroke-width: 1.5; }
.d-node.is-b { stroke: var(--ch-b); stroke-width: 1.5; }
.d-text { fill: var(--color-text); font-family: var(--font-sans); font-size: 17px; font-weight: 600; }
.d-sub { fill: var(--color-text-secondary); font-family: var(--font-mono); font-size: 15px; }
.d-edge { stroke: var(--color-text-muted); stroke-width: 1.5; fill: none; }
.d-edge.is-a { stroke: var(--ch-a); }
.d-edge.is-b { stroke: var(--ch-b); }
.d-arrow { fill: var(--color-text-muted); }
.diagram figcaption { font-size: var(--text-xs); color: var(--color-text-secondary); }
/* On a phone a wide diagram keeps a readable size and scrolls sideways. */
.diagram-scroll { overflow-x: auto; }
.diagram-tall { display: none; }
@media (max-width: 720px) {
  .diagram-scroll svg { min-width: 680px; }
  .diagram:has(.diagram-scroll):not(:has(.diagram-tall)) figcaption::after { content: ' Swipe the diagram sideways to see all of it.'; }
  .diagram:has(.diagram-tall) .diagram-scroll { display: none; }
  .diagram .diagram-tall { display: block; }
}

/* Process strip: <ol class="flow"><li>Step</li>...</ol>. Numbered steps
   joined by a line, the numbers alternating channel A and channel B.
   site.js lays each strip left to right (.is-across) when its box is
   26rem or wider and every label fits its column on one line, and top
   to bottom, each label beside its number, otherwise; it checks again
   when the box changes width. Without site.js the strip runs top to bottom. Either way every
   step keeps its place in the line, so nothing is left hanging at the
   end of a row. Use it for a process of three to five named steps where
   a full diagram would be too much. Mark the step that is the system
   itself with .is-a. */
.flow { --flow-node: 2rem; --flow-gap: 0.9rem; --flow-col-gap: 1.75rem; list-style: none; margin: 0; padding: 0; min-width: 0; counter-reset: flow; display: grid; row-gap: var(--flow-gap); }
.flow li {
  --tone: var(--ch-a);
  counter-increment: flow;
  position: relative;
  display: grid;
  grid-template-columns: var(--flow-node) minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-text);
  text-wrap: balance;
}
.flow li:nth-child(even) { --tone: var(--ch-b); }
.flow li::before {
  content: counter(flow);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--flow-node);
  height: var(--flow-node);
  box-sizing: border-box;
  border: 1px solid var(--tone);
  background: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--tone);
}
.flow li.is-a::before { background: var(--tone); color: var(--color-bg); }
/* The line runs from each number on to the next one. */
.flow li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(var(--flow-node) / 2 - 0.5px);
  top: 50%;
  width: 1px;
  height: calc(100% + var(--flow-gap));
  background: var(--color-border-strong);
}
.flow.is-across { grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); row-gap: 0; column-gap: var(--flow-col-gap); }
.flow.is-across li { grid-template-columns: none; grid-template-rows: var(--flow-node) auto; align-items: start; justify-items: start; row-gap: 0.6rem; white-space: nowrap; }
/* Across, the line runs from the number over the gap to the next number. */
.flow.is-across li:not(:last-child)::after { left: calc(var(--flow-node) / 2); right: calc(-1 * var(--flow-col-gap)); top: calc(var(--flow-node) / 2 - 0.5px); width: auto; height: 1px; }
/* In a card the strip is the picture, a step under the card's own text. */
:where(.pcard-media.is-flow) .flow li { font-size: var(--text-xs); }

/* ═══ 15. Pager ════════════════════════════════════
   Previous and next project, with home between. At the first or
   last item leave that side out; do not show it disabled. */
.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: var(--space-sm);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}
.pager a { display: grid; gap: 0.2rem; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-border); background: var(--color-surface); transition: border-color var(--duration-fast), box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out); }
.pager-next { grid-column: 3; text-align: right; }
.pager-home { grid-column: 2; align-content: center; }
.pager-dir { font-family: var(--font-mono); font-size: var(--text-label); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-text-muted); }
.pager-name { font-weight: 700; color: var(--color-text); }
@media (hover: hover) {
  .pager a:hover { border-color: var(--ch-b); box-shadow: 4px 4px 0 0 var(--ch-b); transform: translate(-2px, -2px); }
}
@media (max-width: 640px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { grid-column: 1; }
  .pager-home { grid-column: 1; text-align: center; }
}

/* ─── Dashboard kit on site pages ───
   Table heads in one face (the mono of the labels), columns marked
   .hide-narrow drop out on a phone, and a stat row with an odd count
   lets the last stat take the full width on a phone. */
.site-page .data-table thead th { font-family: var(--font-mono); }
@media (max-width: 640px) {
  .site-page .hide-narrow { display: none; }
  .site-page .data-table :where(th, td) { padding-inline: 0.5rem; }
  .site-page .data-table thead th { letter-spacing: 0.04em; }
  .site-page .data-table { min-width: 0; }
  .site-page .stat-band > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ─── Buttons in the site style ─── */
.site-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.1rem;
  box-sizing: border-box;
  border: 1px solid var(--ch-a);
  background: transparent;
  color: var(--ch-a);
  font: 600 var(--text-label) / 1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out), color var(--duration-fast);
}
.site-page a.site-btn { color: var(--ch-a); }
.site-btn.is-solid { background: var(--ch-a); color: var(--color-bg); }
.site-page a.site-btn.is-solid { color: var(--color-bg); }
@media (hover: hover) {
  .site-btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 0 var(--ch-b); }
}

/* ─── Scroll reveal (opt in with .rise) ─── */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 22%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
