/* Quvor — round 2: "Night × Section".
   One system, two themes. Dark (default) is Night: near-black surfaces lit from above by the Q's
   depth gradient, machined top edges, fine grain. Light is Section: a cool white drawing sheet
   with a faint grid and white cards. Both share the drawing language: rails bounding the page,
   registration crosshairs where section dividers meet the rails, section markers, dimension lines,
   and a title block for a footer. */

/* Fonts, self-hosted and trimmed to the characters the site uses (scripts/fonts.py builds fonts/ on every build).
   "Quvor Text" and "Quvor Mono" are IBM Plex Sans and Plex Mono, renamed as their licence asks for modified copies. */
@font-face { font-family: "Jost"; src: url(fonts/jost.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Quvor Text"; src: url(fonts/quvor-text.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Quvor Text"; src: url(fonts/quvor-text-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Quvor Mono"; src: url(fonts/quvor-mono-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Quvor Mono"; src: url(fonts/quvor-mono-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root, :root[data-theme="dark"] {
  --ground: #0B0C10;
  --s1: #0F1015;                 /* surface, bottom */
  --s2: #15161C;                 /* surface, top (lit) */
  --solid: #111217;              /* opaque surface for masks */
  --well: #0C0D11;               /* inset UI windows */
  --chip: #17181E;
  --head: #E4E5E9;
  --body: #D8D9DD;
  --muted: #9EA0A7;
  --faint: #6E717B;              /* decorative only, never text */
  --edge: rgba(255,255,255,.075);
  --edge-2: rgba(255,255,255,.14);
  --edge-top: rgba(255,255,255,.13);
  --rail: rgba(255,255,255,.08);
  --cross: rgba(228,229,233,.55);
  --construct: rgba(158,160,167,.42);
  --grid: rgba(255,255,255,.018);
  --fade-mid: 40%; --fade-peak: 62%;
  --grain: .05;
  --q1: #FFFFFF; --q2: #7E8191;                   /* logo mark */
  --fq1: #5E6272; --fq2: #25272E; --fedge: .75; --fedge2: .35;  /* big hero Q: dark, softly lit; a fine rim runs all round so the bottom never melts into the ground */
  --logo-ink: #F4F4F6;
  --btn-bg: #E4E5E9; --btn-fg: #0B0C10; --btn-hi: #FFFFFF;
  --shadow: inset 0 1px 0 var(--edge-top), 0 0 0 1px var(--edge), 0 24px 48px -28px rgba(0,0,0,.85);
  --shadow-sm: inset 0 1px 0 var(--edge-top), 0 0 0 1px var(--edge), 0 2px 6px -2px rgba(0,0,0,.6);
  --header-bg: rgba(17,18,23,.72);
  --glow: rgba(126,129,145,.2);
  --sel-bg: #E4E5E9; --sel-fg: #0B0C10;
  --err: #FF8A80;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground: #F6F7F9;
  --s1: #FFFFFF;
  --s2: #FFFFFF;
  --solid: #FFFFFF;
  --well: #F8F9FA;
  --chip: #FFFFFF;
  --head: #0B0C10;
  --body: #2E3037;
  --muted: #666870;
  --faint: #A3A6AE;
  --edge: rgba(11,12,16,.085);
  --edge-2: rgba(11,12,16,.16);
  --edge-top: rgba(255,255,255,0);
  --rail: rgba(11,12,16,.1);
  --cross: rgba(11,12,16,.6);
  --construct: rgba(102,104,112,.5);
  --grid: rgba(11,12,16,.035);
  --fade-mid: 40%; --fade-peak: 62%;
  --grain: 0;
  --q1: #5A5E6E; --q2: #07080B;
  --fq1: #5A5E6E; --fq2: #07080B; --fedge: 0; --fedge2: 0;
  --logo-ink: #0B0C10;
  --btn-bg: #0B0C10; --btn-fg: #FFFFFF; --btn-hi: rgba(255,255,255,.18);
  --shadow: 0 0 0 1px rgba(11,12,16,.07), 0 1px 2px rgba(11,12,16,.04), 0 8px 24px -12px rgba(11,12,16,.12);
  --shadow-sm: 0 0 0 1px rgba(11,12,16,.08), 0 1px 2px rgba(11,12,16,.05);
  --header-bg: rgba(255,255,255,.82);
  --glow: rgba(90,94,110,0);
  --sel-bg: #0B0C10; --sel-fg: #FFFFFF;
  --err: #B3261E;
  color-scheme: light;
}
:root {
  --display: "Jost", ui-sans-serif, system-ui, sans-serif;
  --text: "Quvor Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Quvor Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --cell: 20px;
  --max: 1241px;                 /* 62 grid cells + 1px: both rails land exactly on grid lines */
  --pad: clamp(24px, 4.5vw, 64px);
  --ease: cubic-bezier(.2,.7,.2,1);
  --r: 14px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
body {
  margin: 0; color: var(--body); font: 17px/1.7 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip;
  background-color: var(--ground);
  transition: background-color .3s ease, color .3s ease;
}
/* Pages hide the body until this stylesheet applies (inline style in the page head), so a slow connection
   never paints the page unstyled. Two selectors so it wins whatever order the head ends up in. */
html body { visibility: visible; }
::selection { background: var(--sel-bg); color: var(--sel-fg); }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--head); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--head); margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0 0 1em; } p:last-child { margin-bottom: 0; }
strong { color: var(--head); font-weight: 500; }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.5; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { display: block; }

/* Grain (dark only) */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* Hairline progress (page scroll / reading) */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, transparent, var(--head)); opacity: .8; }

/* ---------- The sheet: rails, dividers, crosshairs ---------- */
/* One continuous line grid runs across the whole page (it lives on body). Inside the sheet a soft wash of
   the ground colour lightens it towards the centre, where the text sits: full strength at the rails,
   gently fainter in the middle, never a visible edge. */
.page { position: relative; max-width: var(--max); margin: 0 auto; border-inline: 1px solid var(--rail); min-height: 100vh; isolation: isolate; }
/* The grid is anchored to the sheet: its lines start on the left rail and repeat every --cell, so the rails
   (and the sheet's top edge) sit exactly on grid lines. It extends 100 cells into each margin; html clips the overflow. */
.page::after { content: ""; position: absolute; z-index: -2; pointer-events: none; top: 0; bottom: 0;
  left: calc(var(--cell) * -100 - 1px); right: calc(var(--cell) * -100 - 1px);  /* -1px: start on the rail itself, not inside it */
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell); }
.page::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--ground) var(--fade-mid), transparent) 22%,
    color-mix(in srgb, var(--ground) var(--fade-peak), transparent) 50%,
    color-mix(in srgb, var(--ground) var(--fade-mid), transparent) 78%,
    transparent 100%); }
.in { padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px)); }
.divider { position: relative; height: 1px; }
/* Full-bleed via shadows: ink overflow, so it never widens the page */
.divider::before { content: ""; position: absolute; top: 0; height: 1px; left: 0; right: 0; background: var(--rail);
  box-shadow: -50vw 0 0 var(--rail), -100vw 0 0 var(--rail), 50vw 0 0 var(--rail), 100vw 0 0 var(--rail); }
.x { position: absolute; width: 11px; height: 11px; pointer-events: none; z-index: 2; }
.x::before, .x::after { content: ""; position: absolute; background: var(--cross); }
.x::before { left: 5px; top: 0; width: 1px; height: 11px; }
.x::after { top: 5px; left: 0; height: 1px; width: 11px; }
.divider .x { top: -5px; }
.divider .x.l { left: -6px; } .divider .x.r { right: -6px; }
.divider .tag { position: absolute; top: -9px; right: 28px; padding: 0 8px; background: var(--ground); font-size: 13px; z-index: 1; }

/* ---------- Header: inset, floating, tightens on scroll ---------- */
.site-header { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 60; margin: 12px 12px 0; }
.bar { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 10px 0 22px; border-radius: 14px;
  background: var(--header-bg); backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow-sm); transition: height .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease); }
.site-header.is-scrolled .bar { height: 52px; box-shadow: var(--shadow); }
.logo { display: block; margin-right: auto; line-height: 0; text-decoration: none; }
.logo .logo-svg { height: 21px; width: auto; }
.q1 { stop-color: var(--q1); } .q2 { stop-color: var(--q2); }
.wm { fill: var(--logo-ink); }
.nav { display: flex; align-items: center; gap: 2px; margin-right: 8px; }
.nav a { text-decoration: none; font-size: 14.5px; color: var(--muted); padding: 8px 12px; border-radius: 8px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--head); background: var(--edge); }
.nav a[aria-current="page"] { color: var(--head); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s; }
.icon-btn:hover { color: var(--head); background: var(--edge); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .sun { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: block; }
:root[data-theme="light"] .icon-btn .moon { display: none; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu .sheet { position: absolute; right: 0; top: calc(100% + 12px); min-width: 220px; padding: 6px; border-radius: 12px; background: var(--solid); box-shadow: var(--shadow); display: grid; }
.menu .sheet a { text-decoration: none; color: var(--head); padding: 12px 14px; border-radius: 8px; font-size: 16px; }
.menu .sheet a:hover { background: var(--edge); }
@media (max-width: 880px) {
  .nav, .bar > .btn { display: none; }
  .menu { display: block; }
  .bar { padding-left: 18px; }
}

/* ---------- Buttons, pills, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 16px; border-radius: 10px; font: 500 14.5px/1 var(--text); text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
  color: var(--head); background: linear-gradient(180deg, var(--s2), var(--s1)); box-shadow: var(--shadow-sm); transition: box-shadow .2s, background-color .2s, transform .2s; }
.btn:hover { box-shadow: inset 0 1px 0 var(--edge-top), 0 0 0 1px var(--edge-2), 0 4px 10px -4px rgba(0,0,0,.35); }
.chev { display: inline-block; }
.btn .chev { width: 10px; height: 10px; transition: transform .25s var(--ease); opacity: .7; }
.btn:hover .chev { transform: translateX(2px); opacity: 1; }
.btn.primary { color: var(--btn-fg); background: var(--btn-bg); box-shadow: inset 0 1px 0 var(--btn-hi), 0 0 0 1px var(--btn-bg), 0 4px 12px -4px rgba(0,0,0,.4); }
.btn.primary:hover { box-shadow: inset 0 1px 0 var(--btn-hi), 0 0 0 1px var(--btn-bg), 0 8px 18px -6px rgba(0,0,0,.45); }
.btn.sm { height: 34px; font-size: 14.5px; padding: 0 12px 0 14px; border-radius: 9px; }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 6px; border-radius: 999px; font: 500 13px/1 var(--text); color: var(--head);
  background: var(--chip); box-shadow: var(--shadow-sm); }
.pill .bub { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--head); display: grid; place-items: center; font: 500 9.5px/1 var(--mono); position: relative; color: var(--head); }
/* The marker letter sits optically centred in its circle (no split line; it read as off-centre at this size). */
.pill .bub b { font-weight: 500; display: block; line-height: 1; transform: translateY(.5px); }
.pill .ref { font: 400 13px/1 var(--mono); color: var(--muted); letter-spacing: .04em; padding-left: 8px; border-left: 1px solid var(--edge-2); }
.pill.draft { box-shadow: none; border: 1px dashed var(--construct); background: transparent; padding-left: 12px; color: var(--muted); }

.chip { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; font: 500 13px/1 var(--mono); color: var(--head); background: var(--chip); box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums; }

.status { display: inline-flex; align-items: center; gap: 9px; height: 30px; padding: 0 12px; border-radius: 999px; font: 400 13px/1 var(--mono); letter-spacing: .03em; color: var(--body); background: var(--chip); box-shadow: var(--shadow-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--head); flex: none; }
.dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--head); opacity: 0; animation: ping 2.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 70%, 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Surfaces ---------- */
.panel { position: relative; background: linear-gradient(180deg, var(--s2), var(--s1) 60%); border-radius: var(--r); box-shadow: var(--shadow); isolation: isolate; }
.panel.lit::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.05), transparent 60%); }
/* Light: the pointer light becomes a soft graphite shade plus a lifted edge, so the hover reads on white too. */
:root[data-theme="light"] .panel.lit::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(90,94,110,.07), transparent 65%); }
:root[data-theme="light"] .panel.lit { transition: box-shadow .35s var(--ease); }
:root[data-theme="light"] .panel.lit:hover { box-shadow: 0 0 0 1px rgba(11,12,16,.14), 0 1px 2px rgba(11,12,16,.05), 0 16px 32px -16px rgba(11,12,16,.18); }
.panel.lit:hover::before { opacity: 1; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.sec-head { display: grid; gap: 22px; justify-items: start; margin-bottom: clamp(40px, 5vw, 64px); max-width: 860px; }
.h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -.025em; }
.statement { font: 400 clamp(24px, 2.5vw, 32px)/1.3 var(--display); letter-spacing: -.012em; color: var(--head); max-width: 36ch; margin: 0; text-wrap: balance; }
.intro { font-size: 19px; max-width: 60ch; }
.grad { background: linear-gradient(180deg, var(--q1) 10%, var(--q2) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .grad { background: none; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding-top: 28px; padding-bottom: clamp(56px, 7vw, 96px); }
.hero-card { overflow: hidden; }
.hero-card .glow { position: absolute; z-index: -1; right: -18%; top: -22%; width: 900px; max-width: 120%; aspect-ratio: 1; pointer-events: none; background: radial-gradient(closest-side, var(--glow), transparent 72%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(32px, 5.5vw, 76px) clamp(24px, 5vw, 72px) clamp(32px, 4.5vw, 64px); }
.hero-grid > div { min-width: 0; }
.measure { position: relative; display: inline-block; padding-top: 40px; margin-top: 36px; max-width: 100%; }
.dim { position: absolute; left: 0; right: 0; top: 0; height: 22px; }
.dim .ln { position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: var(--construct); transform-origin: left; animation: draw 1.1s var(--ease) .25s both; }
.dim .ext { position: absolute; top: 0; width: 1px; height: 22px; background: var(--construct); }
.dim .ext.l { left: 0; } .dim .ext.r { right: 0; }
.dim .obl { position: absolute; top: 6px; width: 1px; height: 11px; background: var(--head); transform: rotate(45deg); }
.dim .obl.l { left: 0; } .dim .obl.r { right: 0; }
.dim .val { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); background: var(--solid); padding: 0 10px; white-space: nowrap; }
:root:not([data-theme="light"]) .dim .val { background: #131419; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero h1 { font-size: clamp(42px, 5.3vw, 76px); line-height: .98; letter-spacing: -.035em; }
.hero h1 span { display: block; }
.lead { font-size: clamp(18px, 1.7vw, 20px); line-height: 1.62; max-width: 44ch; margin: 30px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.fig { margin: 0; position: relative; cursor: crosshair; }
.fig svg { width: 100%; max-width: 440px; height: auto; margin-left: auto; overflow: visible; }
.fig .cl { stroke: var(--construct); stroke-width: .9; fill: none; }
.fig .cut { stroke: var(--head); stroke-width: 1.1; fill: none; stroke-dasharray: 18 5 2 5; }
.fig .ink { fill: var(--head); } .fig .inks { stroke: var(--head); }
.fig .an { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; fill: var(--muted); }
.fig .letter { font-family: var(--display); font-size: 20px; font-weight: 500; fill: var(--head); }
.fig .mask { fill: var(--solid); }
:root:not([data-theme="light"]) .fig .mask { fill: #111217; }
.fig .fq1 { stop-color: var(--fq1); } .fig .fq2 { stop-color: var(--fq2); }
.fig .fe1 { stop-color: #FFFFFF; stop-opacity: var(--fedge); } .fig .fe2 { stop-color: #7E8191; stop-opacity: var(--fedge2, 0); }
.fig figcaption { margin-top: 12px; text-align: right; letter-spacing: .02em; }
.fig .cutclip { width: 500px; }
.fig .lead path { stroke-dasharray: 220; }
/* Resting state: the outline is invisible and the build clip fully open, so with reduced motion the
   figure is the finished drawing, still. */
.fig .survey { opacity: 0; fill: none; stroke: var(--construct); stroke-width: .1; stroke-linejoin: round; }
.fig .s-disc { stroke-dasharray: 90; }
.fig .s-tail { stroke-dasharray: 21; }
.fig .buildclip { width: 700px; }

/* Fig. 1 draws itself once, when the page opens, then rests as the finished drawing. The motion says
   what the caption says, diagnose before building: the sheet is surveyed (centre lines, guide circle),
   the section cut is taken across empty paper with its A arrows, the subject appears as an outline,
   the diameter and the CUT 5 · GAP 1.5 note are placed, and only then is the solid mark built in along
   the cut by a travelling clip. Nothing is built before it is measured.
   Every element runs on the same --cycle so the parts can never drift out of step: the stops are
   percentages of it. The drawing is complete at 66% (3s) and every part holds its last frame. It never
   loops and never replays on click; site.js only pauses it while the figure is off screen.
   Two names to know: the outline is .survey, not .ghost, because .ghost is the site's ghost button; and
   the build clip is referenced from the markup, because url(#id) in this stylesheet would resolve
   against styles.css, and an unresolvable clip-path stops the element being drawn at all. */
@media (prefers-reduced-motion: no-preference) {
  .fig { --cycle: 4.5s; --pen: cubic-bezier(.65,.05,.3,1); --seat: cubic-bezier(.34,1.26,.64,1); }
  .fig .axis, .fig .ring, .fig .dim { transform-box: view-box; }
  .fig .axis, .fig .ring { transform-origin: 190px 190px; }
  .fig .dim { transform-origin: 190px 378px; }
  .fig .axis.v { animation: plotv var(--cycle) var(--pen) both; }
  .fig .axis.h { animation: ploth var(--cycle) var(--pen) both; }
  .fig .ring { animation: ring var(--cycle) var(--ease) both; }
  .fig .ends.e1 { animation: endA var(--cycle) var(--ease) both; }
  .fig .cutclip { animation: cutdraw var(--cycle) var(--pen) both; }
  .fig .ends.e2 { animation: endB var(--cycle) var(--ease) both; }
  .fig .survey { animation: survey var(--cycle) linear both; }
  .fig .s-disc { animation: sdisc var(--cycle) var(--pen) both; }
  .fig .s-tail { animation: stail var(--cycle) var(--pen) both; }
  .fig .dim { animation: plotdim var(--cycle) var(--seat) both; }
  .fig .dimx { animation: noteA var(--cycle) var(--ease) both; }
  .fig .lead path { animation: leadraw var(--cycle) var(--pen) both; }
  .fig .leadx { animation: noteB var(--cycle) var(--ease) both; }
  /* steadier than --pen: the mark is laid down at an even pace, not whipped across */
  .fig .buildclip { animation: build var(--cycle) cubic-bezier(.4,.1,.3,1) both; }
  /* survey the sheet */
  @keyframes plotv { 0%, .5% { transform: scaleY(0); } 6.5%, 100% { transform: none; } }
  @keyframes ploth { 0%, 1.2% { transform: scaleX(0); } 7.2%, 100% { transform: none; } }
  @keyframes ring { 0%, 2.5% { opacity: 0; transform: rotate(-8deg) scale(.985); } 9.5%, 100% { opacity: 1; transform: none; } }
  /* take the section, on empty paper */
  @keyframes endA { 0%, 7.5% { opacity: 0; } 10.5%, 100% { opacity: 1; } }
  @keyframes cutdraw { 0%, 8.5% { width: 0; } 19.5%, 100% { width: 500px; } }
  @keyframes endB { 0%, 17% { opacity: 0; } 20%, 100% { opacity: 1; } }
  /* the subject, as an outline */
  @keyframes survey { 0%, 20.5% { opacity: 0; } 23%, 60% { opacity: 1; } 66%, 100% { opacity: 0; } }
  @keyframes sdisc { 0%, 20.5% { stroke-dashoffset: 90; } 30.5%, 100% { stroke-dashoffset: 0; } }
  @keyframes stail { 0%, 28.5% { stroke-dashoffset: 21; } 32.5%, 100% { stroke-dashoffset: 0; } }
  /* measured before anything is built */
  @keyframes plotdim { 0%, 32% { transform: scaleX(0); } 38%, 100% { transform: none; } }
  @keyframes noteA { 0%, 37% { opacity: 0; } 40%, 100% { opacity: 1; } }
  @keyframes leadraw { 0%, 39% { stroke-dashoffset: 220; } 44%, 100% { stroke-dashoffset: 0; } }
  @keyframes noteB { 0%, 43% { opacity: 0; } 46%, 100% { opacity: 1; } }
  /* then built, along the cut. The mark spans clip widths 58 to 401 along the cut (computed from the Q's paths), so the
     wipe travels only that far: every moment of it fills something. The outline stays until the fill is complete. */
  @keyframes build { 0%, 46.5% { width: 56px; } 62%, 100% { width: 404px; } }
}
.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--edge); }
.parts > div { padding: 22px clamp(20px, 3vw, 40px) 26px; min-width: 0; }
.parts > div + div { border-left: 1px solid var(--edge); }
.parts .k { display: block; margin-bottom: 14px; }
.parts b { display: block; font: 500 clamp(30px, 3.2vw, 40px)/1 var(--display); color: var(--head); letter-spacing: -.02em; margin-bottom: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.parts > div > span:last-child { display: block; font-size: 16px; line-height: 1.45; color: var(--muted); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .fig svg { margin: 0 auto; max-width: 340px; }
  .fig figcaption { text-align: center; }
}
@media (max-width: 640px) {
  .parts { grid-template-columns: 1fr; }
  .parts > div + div { border-left: 0; border-top: 1px solid var(--edge); }
  .parts > div { padding: 18px 22px; }
}

/* ---------- Who ---------- */
.who { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.quote { margin: 0; }
.quote p { font: 400 clamp(28px, 3.2vw, 42px)/1.2 var(--display); letter-spacing: -.015em; color: var(--head); margin-bottom: 26px; text-indent: -.42em; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--muted); }
.quote figcaption::before { content: ""; width: 28px; height: 1px; background: var(--construct); flex: none; }
.who-body p { font-size: 18px; }
@media (max-width: 880px) { .who { grid-template-columns: 1fr; } }

/* ---------- Testimonials: a row with faded edges ---------- */
.row-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.row-ctl { display: flex; gap: 8px; }
.row-ctl .btn { width: 38px; padding: 0; justify-content: center; }
.strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 18px;
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
/* Fade the left edge only after the row has been scrolled, so the first card's edge stays crisp at rest. */
.strip.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 90%, transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: 0 0 min(440px, 84%); margin: 0; scroll-snap-align: start; padding: 30px; display: grid; gap: 26px; align-content: space-between; min-height: 250px; }
.strip blockquote { margin: 0; font: 400 21px/1.45 var(--display); letter-spacing: -.005em; color: var(--head); }
.strip figcaption { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--muted); flex-wrap: wrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 500 12px/1 var(--display); color: var(--head); background: var(--chip); box-shadow: var(--shadow-sm); }
.strip figure.ph blockquote { color: var(--muted); }
.strip figure.ph { background: transparent; box-shadow: none; border: 1px dashed var(--edge-2); }
/* At most three reviews (decided 2026-10-21): on wide screens they sit side by side, no arrows; phones keep the swipe row */
@media (min-width: 900px) {
  .strip.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .strip.three figure { min-width: 0; }
  [data-strip]:has(.strip.three) .row-ctl { display: none; }
}

/* ---------- Approach ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.step { padding: 24px 24px 30px; display: grid; align-content: start; gap: 0; }
.step .top { display: flex; align-items: center; gap: 10px; margin-bottom: 44px; }
.step h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 12px; }
.step p { font-size: 16px; line-height: 1.65; }
@media (max-width: 1080px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } .step .top { margin-bottom: 24px; } }

/* ---------- Work: detail sheets ---------- */
.cases { display: grid; gap: 22px; }
.case .corner { position: absolute; opacity: 0; transition: opacity .3s, transform .45s var(--ease); }
.case .corner.tl { left: -6px; top: -6px; transform: translate(-5px,-5px); }
.case .corner.tr { right: -6px; top: -6px; transform: translate(5px,-5px); }
.case .corner.bl { left: -6px; bottom: -6px; transform: translate(-5px,5px); }
.case .corner.br { right: -6px; bottom: -6px; transform: translate(5px,5px); }
.case:hover .corner { opacity: 1; transform: none; }
.case-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 14px 18px 14px 24px; border-bottom: 1px solid var(--edge); }
.case-head .ref { display: flex; gap: 18px; flex-wrap: wrap; }
.case-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.case-body > div { padding: clamp(24px, 3vw, 40px); min-width: 0; }
.case-body > div + div { border-left: 1px solid var(--edge); }
.case h3 { font-size: clamp(28px, 2.8vw, 36px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 10px; }
.case .type { font-size: 16px; line-height: 1.5; color: var(--muted); margin-bottom: 28px; }
.outcomes { list-style: none; margin: 24px 0 26px; padding: 0; display: grid; }
.outcomes li { padding: 14px 0 14px 30px; position: relative; border-top: 1px solid var(--edge); font-size: 16px; line-height: 1.6; }
.outcomes li::before { content: ""; position: absolute; left: 2px; top: 26px; width: 14px; height: 1px; background: var(--muted); }
.comps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 18px; border-top: 1px dashed var(--edge-2); }
.comps .mono { margin-right: 6px; }
.comps span.c { font-size: 13px; padding: 5px 10px; border-radius: 7px; color: var(--body); background: var(--chip); box-shadow: var(--shadow-sm); }
@media (max-width: 900px) {
  .case-body { grid-template-columns: 1fr; }
  .case-body > div + div { border-left: 0; border-top: 1px solid var(--edge); }
}

/* UI fragments: small windows drawn from real numbers */
.ui { border-radius: 11px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); overflow: hidden; font-size: 14.5px; }
.ui-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--edge); }
.ui-bar .dots { display: flex; gap: 5px; }
.ui-bar .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--edge-2); }
.ui-body { padding: 14px; display: grid; gap: 12px; }
.ui .row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.ui .row + .row { padding-top: 10px; border-top: 1px solid var(--edge); }
.ui .k { font: 400 13px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ui .v { color: var(--head); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.35; }
.ui .old { color: var(--muted); position: relative; }
.ui .old::after { content: ""; position: absolute; left: -1px; right: -1px; top: 54%; height: 1px; background: var(--muted); transform-origin: left; }
.ui .arrow { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.ui .tok { padding: 3px 8px; border-radius: 6px; background: var(--chip); box-shadow: var(--shadow-sm); font-size: 14.5px; }
.metric { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.metric b { font: 500 30px/1 var(--display); color: var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: var(--edge); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; width: 88%; background: linear-gradient(90deg, var(--faint), var(--head)); border-radius: 99px; transform-origin: left; }
.meter-key { display: flex; justify-content: space-between; gap: 10px; font: 400 13px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stages { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.stages li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--body); font-size: 13px; }
.stages li::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--head); transform: rotate(45deg); flex: none; margin-left: 2px; }
.stages li:last-child::before { background: var(--head); }
.flags { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: 3px; }
.flags i { aspect-ratio: 1; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--edge-2); }
.flags i { position: relative; }
.flags i.on { box-shadow: none; }
.flags i.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--head); }
.tenants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tenant { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--edge-2); padding: 8px; display: grid; gap: 5px; }
.tenant .t { font: 400 13px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.tenant span:not(.t) { font-size: 13px; padding: 3px 6px; border-radius: 5px; background: var(--chip); box-shadow: var(--shadow-sm); color: var(--head); }
.shared { border-radius: 8px; border: 1px dashed var(--edge-2); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.shared .t { font: 400 13px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.ui .note { font: 400 13px/1.4 var(--mono); letter-spacing: .03em; color: var(--muted); }

/* ---------- AI: accordion ---------- */
.ai-ask { margin-top: 32px; max-width: 46ch; font: 400 clamp(21px, 2.2vw, 26px)/1.4 var(--display); color: var(--head); padding-top: 24px; border-top: 1px dashed var(--construct); }
.acc { margin-top: 56px; }
.acc details { border-top: 1px solid var(--edge); interpolate-size: allow-keywords; }
.acc details:last-child { border-bottom: 1px solid var(--edge); }
.acc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 170px minmax(0, 1fr) 28px; gap: 20px; align-items: center; padding: 26px 0; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .k { display: flex; gap: 10px; align-items: center; }
.acc summary h3 { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.25; letter-spacing: -.01em; transition: transform .3s var(--ease); }
.acc summary:hover h3 { transform: translateX(3px); }
.plus { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--chip); box-shadow: var(--shadow-sm); position: relative; }
.plus::before, .plus::after { content: ""; position: absolute; width: 10px; height: 1.25px; background: var(--head); transition: transform .3s var(--ease); }
.plus::after { transform: rotate(90deg); }
.acc details[open] .plus::after { transform: rotate(0deg); }
.acc .body { padding: 0 48px 30px 190px; max-width: calc(64ch + 190px); }
.acc details::details-content { block-size: 0; overflow: hidden; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
.acc details[open]::details-content { block-size: auto; }
@media (max-width: 760px) {
  .acc summary { grid-template-columns: minmax(0, 1fr) 28px; gap: 10px 14px; }
  .acc summary .k { grid-column: 1 / -1; }
  .acc .body { padding: 0 0 26px; }
}

/* ---------- Engagement ---------- */
.terms { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
.term { padding: 28px 28px 32px; border-top: 1px solid var(--edge); border-left: 1px solid var(--edge); margin: -1px 0 0 -1px; min-width: 0; }
.term dt { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 500 20px/1.2 var(--display); color: var(--head); }
.term dd { margin: 0; font-size: 16px; line-height: 1.65; }
.term .big { display: block; font: 500 clamp(28px, 2.6vw, 34px)/1.1 var(--display); color: var(--head); letter-spacing: -.02em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .terms { grid-template-columns: 1fr; } .term { padding: 24px 22px 26px; } }

/* ---------- Fit ---------- */
.fit-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.fit p:not(.statement) { font-size: 18px; }
.excluded { overflow: hidden; }
.excluded .hd { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--edge); }
.excluded ul { list-style: none; margin: 0; padding: 0; }
.excluded li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 12px; gap: 10px; align-items: center; padding: 13px 20px; color: var(--muted); }
.excluded li + li { border-top: 1px solid var(--edge); }
.excluded li s { text-decoration: none; position: relative; justify-self: start; }
.excluded li s::after { content: ""; position: absolute; left: -2px; right: -2px; top: 55%; height: 1px; background: var(--construct); transform-origin: left; }
.excluded li::after { content: ""; width: 10px; height: 10px; opacity: .7;
  background: linear-gradient(45deg, transparent 45%, var(--muted) 45%, var(--muted) 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--muted) 45%, var(--muted) 55%, transparent 55%); }
@media (max-width: 880px) { .fit-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-card { padding: clamp(32px, 6vw, 88px); overflow: hidden; }
.contact-card .glow { position: absolute; z-index: -1; left: 50%; top: -70%; width: 1000px; max-width: 160%; aspect-ratio: 1.3; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side, var(--glow), transparent 70%); }
.contact-card .h2 { font-size: clamp(42px, 5.6vw, 76px); letter-spacing: -.035em; line-height: 1; margin: 26px 0 26px; }
.contact-card p { font-size: 19px; max-width: 54ch; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 44px; }
.email { font: 500 clamp(26px, 3.8vw, 44px)/1.1 var(--display); letter-spacing: -.02em; color: var(--head); text-decoration: none; user-select: all; word-break: break-word;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 6px; transition: background-size .5s var(--ease); }
.email:hover { background-size: 100% 1px; }
.contact-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--edge); }

/* ---------- Footer: title block ---------- */
.site-footer { padding-block: 28px 100px; }
.titleblock { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)); border-radius: 12px; overflow: hidden; }
.titleblock > div { padding: 14px 18px; display: grid; gap: 6px; align-content: start; border-left: 1px solid var(--edge); border-top: 1px solid var(--edge); margin: -1px 0 0 -1px; min-width: 0; }
.titleblock .brand { grid-row: span 2; align-content: space-between; gap: 26px; padding: 18px 20px; }
.titleblock .brand .logo-svg { height: 22px; width: auto; }
.titleblock .brand-home { display: inline-flex; justify-self: start; border-radius: 6px; }
.titleblock .brand-home:focus-visible { outline: 2px solid var(--head); outline-offset: 4px; }
.titleblock .v { font-size: 16px; color: var(--head); line-height: 1.45; font-variant-numeric: tabular-nums; }
.titleblock .v a { text-decoration: none; background: linear-gradient(var(--construct), var(--construct)) 0 100% / 100% 1px no-repeat; }
.titleblock .v a:hover { background-image: linear-gradient(var(--head), var(--head)); }
.titleblock .clock { display: flex; align-items: center; gap: 9px; }
@media (max-width: 900px) {
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock .brand { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Blog ---------- */
.blog-hero { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 56px; align-items: end; }
.blog-hero h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1; letter-spacing: -.035em; margin: 22px 0 22px; }
.blog-hero p { font-size: 19px; max-width: 46ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.filter { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; cursor: pointer; font: 500 14.5px/1 var(--text); color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--edge-2); display: inline-flex; gap: 8px; align-items: center; transition: color .2s, background-color .2s, box-shadow .2s; }
.filter:hover { color: var(--head); }
.filter[aria-pressed="true"] { color: var(--head); background: var(--chip); box-shadow: var(--shadow-sm); }
.filter .n { font: 400 13px/1 var(--mono); color: var(--muted); }
.rss { margin-left: 6px; }
@media (max-width: 880px) { .blog-hero { grid-template-columns: 1fr; } .filters { justify-content: flex-start; } }

.featured { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); text-decoration: none; color: inherit; margin-bottom: 28px; overflow: hidden; }
.featured .art { border-right: 1px solid var(--edge); padding: clamp(20px, 3vw, 36px); display: grid; place-items: center; min-height: 320px; background: var(--well); }
.featured .art svg { width: 100%; max-width: 480px; height: auto; }
.featured .txt { padding: clamp(24px, 3.4vw, 48px); display: grid; align-content: space-between; gap: 32px; }
.featured h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.025em; margin: 18px 0 16px; transition: transform .35s var(--ease); }
.featured:hover h2 { transform: translateX(3px); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.meta .read { display: inline-flex; align-items: center; gap: 6px; color: var(--head); }
.meta .read .chev { width: 10px; height: 10px; }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; } .featured .art { border-right: 0; border-bottom: 1px solid var(--edge); min-height: 220px; } }

.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.post-row { border-bottom: 1px solid var(--edge); }
.post-row a { display: grid; grid-template-columns: 120px minmax(0, 1fr) 200px 24px; gap: 28px; align-items: center; padding: 26px 0; text-decoration: none; color: inherit; position: relative; }
.post-row .thumb { width: 120px; aspect-ratio: 4 / 3; border-radius: 9px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); display: grid; place-items: center; }
.post-row .thumb svg { width: 74%; height: auto; }
.post-row h3 { font-size: clamp(20px, 2vw, 25px); line-height: 1.2; letter-spacing: -.012em; margin: 0 0 8px; transition: transform .35s var(--ease); }
.post-row p { font-size: 16px; color: var(--muted); margin: 0; max-width: 62ch; line-height: 1.6; }
.post-row .side { display: grid; gap: 8px; justify-items: start; }
.post-row .go { width: 24px; height: 24px; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.post-row a:hover h3 { transform: translateX(3px); }
.post-row a:hover .go { transform: translateX(3px); color: var(--head); }
.tagchip { font: 400 13px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 5px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--edge-2); }
.empty { padding: 40px 0; color: var(--muted); }
@media (max-width: 860px) {
  .post-row a { grid-template-columns: 88px minmax(0, 1fr); gap: 16px 18px; align-items: start; }
  .post-row .thumb { width: 88px; }
  .post-row .side { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; }
  .post-row .go { display: none; }
}
.blog-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 40px 0; }

/* ---------- Article ---------- */
.art-head { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(36px, 4vw, 56px); max-width: 980px; }
.crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: var(--muted); font-size: 14.5px; }
.crumbs a:hover { color: var(--head); }
.crumbs .slash { color: var(--faint); }
.art-head h1 { font-size: clamp(40px, 5.4vw, 74px); line-height: 1.02; letter-spacing: -.035em; margin: 22px 0 26px; max-width: 18ch; }
.art-head .dek { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.6; max-width: 52ch; color: var(--body); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.byline .who-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); box-shadow: var(--shadow-sm); }
.byline .who-av svg { width: 20px; height: 20px; }
.byline .nm { color: var(--head); font-weight: 500; font-size: 16px; display: block; line-height: 1.3; }

.article { display: grid; grid-template-columns: 210px minmax(0, 680px) minmax(0, 1fr); gap: 0 clamp(32px, 4vw, 56px); padding-block: clamp(48px, 6vw, 80px) clamp(64px, 8vw, 112px); }
.toc { position: sticky; top: 104px; align-self: start; }
.toc .mono { display: block; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; border-left: 1px solid var(--edge); }
.toc ol a { display: block; text-decoration: none; color: var(--muted); font-size: 14.5px; line-height: 1.4; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; transition: color .2s, border-color .2s; }
.toc ol a:hover { color: var(--head); }
.toc ol a.on { color: var(--head); border-left-color: var(--head); }
.toc .tools { margin-top: 26px; display: grid; gap: 8px; justify-items: start; }

.prose { min-width: 0; font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose .lede { font-size: 21px; line-height: 1.6; color: var(--head); }
.prose h2 { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin-top: 2.2em; position: relative; scroll-margin-top: 100px; }
.prose h2 .no { display: block; margin-bottom: 12px; }
.prose h3 { font-size: 22px; line-height: 1.3; letter-spacing: -.01em; margin-top: 1.8em; }
.prose a { text-decoration: none; background: linear-gradient(var(--construct), var(--construct)) 0 100% / 100% 1px no-repeat; color: var(--head); }
.prose a:hover { background-image: linear-gradient(var(--head), var(--head)); }
.prose .fn { font: 500 13px/1 var(--mono); vertical-align: super; padding: 0 2px; background: none; color: var(--muted); }
.has-sn { position: relative; }
.sn { position: absolute; left: calc(100% + clamp(32px, 4vw, 56px)); top: 4px; width: min(220px, calc((100vw - 1240px) / 2 + 200px)); font-size: 14.5px; line-height: 1.55; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--edge); }
.sn .mono { display: block; margin-bottom: 6px; }
@media (max-width: 1180px) {
  .article { grid-template-columns: 190px minmax(0, 1fr); }
  .sn { position: static; display: block; width: auto; margin-top: 14px; padding: 12px 14px; border-top: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--edge); }
}
@media (max-width: 860px) {
  .article { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-bottom: 40px; padding: 18px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--edge); }
}
.pull { margin: 2.2em 0 !important; padding: 34px 0 6px; position: relative; border-top: 1px solid var(--edge); }
.pull .x { top: -5px; left: -6px; }
.pull .x.r { left: auto; right: -6px; }
.pull p { font: 400 clamp(26px, 2.8vw, 34px)/1.22 var(--display); letter-spacing: -.015em; color: var(--head); text-indent: -.4em; }
.pull cite { display: block; margin-top: 16px; font-style: normal; }

.code { border-radius: 12px; overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); margin-top: 1.6em !important; }
.code-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--edge); flex-wrap: wrap; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 14.5px/1.7 var(--mono); color: var(--body); tab-size: 2; }
.code .c { color: var(--muted); font-style: italic; }
.code .k { color: var(--head); font-weight: 500; }
.code .s { color: var(--muted); }

.figure { margin: 2em 0 !important; }
.figure .frame { border-radius: 12px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); padding: clamp(14px, 2.4vw, 28px); overflow-x: auto; }
.figure svg { width: 100%; min-width: 560px; height: auto; }
.figure figcaption { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dg .box { fill: var(--solid); stroke: var(--edge-2); }
.dg .box.end { stroke: var(--head); }
.dg .t { font-family: var(--text); font-size: 13px; fill: var(--head); }
.dg .an { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; fill: var(--muted); }
.dg .ln { stroke: var(--construct); fill: none; }
.dg .ink { fill: var(--head); } .dg .inks { stroke: var(--head); fill: none; }
.dg .mk { fill: var(--well); }

.footnotes { margin-top: 3em !important; padding-top: 22px; border-top: 1px solid var(--edge); font-size: 14.5px; color: var(--muted); }
.footnotes ol { margin: 10px 0 0; padding-left: 20px; }
.author { margin-top: 3em !important; padding: 22px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; }
.author .who-av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); box-shadow: var(--shadow-sm); }
.author .who-av svg { width: 24px; height: 24px; }
.author p { font-size: 16px; margin: 0; color: var(--muted); }
.author b { color: var(--head); font-weight: 500; display: block; }
.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 2em !important; }
.pn a { padding: 20px 22px; text-decoration: none; display: grid; gap: 8px; }
.pn a.next { text-align: right; justify-items: end; }
.pn b { font: 500 18px/1.3 var(--display); color: var(--head); }
@media (max-width: 620px) { .pn { grid-template-columns: 1fr; } .pn a.next { text-align: left; justify-items: start; } }

/* ---------- Phones: rails retire, gutters take over ---------- */
@media (max-width: 720px) {
  :root { --pad: 18px; }
  .page { border-inline: 0; }
  .x { display: none; }
  .site-header { margin: 10px max(10px, env(safe-area-inset-left, 0px)) 0 max(10px, env(safe-area-inset-right, 0px)); }
  .hero-grid { padding: 30px 22px 30px; }
  .case-head { padding: 12px 16px; }
  .divider .tag { display: none; }
}

/* ---------- Interactions ----------
   One idea per section, all from the drawing language. Rule: the resting state is the finished
   drawing. Nothing is hidden without JS; site.js adds .js-motion (only when motion is allowed) and
   .is-in when a part enters view, and that replays the drawing from its first stroke. */
.divider::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--cross); opacity: 0; transform-origin: left; pointer-events: none; }
.quote figcaption::before { transform-origin: left; }
.step::after { content: ""; position: absolute; left: 24px; right: 24px; top: 11px; height: 7px; pointer-events: none;
  border-inline: 1px solid var(--construct); background: linear-gradient(var(--construct), var(--construct)) center / 100% 1px no-repeat;
  transform: scaleX(0); opacity: 0; transition: transform .5s var(--ease), opacity .3s; }
.step:hover::after, .step:focus-within::after { transform: none; opacity: 1; }
.acc summary { position: relative; }
.acc summary::after { content: ""; position: absolute; left: 190px; right: 0; bottom: 0; height: 1px; background: var(--construct); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.acc details[open] summary::after { transform: none; }
@media (max-width: 760px) { .acc summary::after { left: 0; } }
.term .big { position: relative; width: fit-content; max-width: 100%; padding-bottom: 12px; }
.term .big::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; border-inline: 1px solid var(--construct);
  background: linear-gradient(var(--construct), var(--construct)) center / 100% 1px no-repeat; transform-origin: left; }
.nav { position: relative; }
.nav .spy { position: absolute; left: 0; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--head); opacity: 0; pointer-events: none;
  transition: transform .5s var(--ease), opacity .3s; }
.nav .spy.on { opacity: 1; }
.nav a.is-current { color: var(--head); }
/* The current page's menu item carries a small dot, like the section dot the homepage used to show */
.nav a { position: relative; }
.nav a[aria-current="page"]::after, .nav a.is-current::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--head); }
.copied-tick { width: 11px; height: 11px; margin-right: -2px; }

@media (prefers-reduced-motion: no-preference) {
  /* Dividers: a pen pass runs rail to rail, and the registration marks turn from × to + */
  .js-motion .divider.is-in::after { animation: pen 1.1s var(--ease) .05s both; }
  .js-motion .divider.is-in .x { animation: register .7s var(--ease) .15s both; }
  /* Who we are: the attribution rule extends */
  .js-motion .quote.is-in figcaption::before { animation: draw .7s var(--ease) .2s both; }
  /* Work: each drawing comes alive once */
  .js-motion .case.is-in .old::after { animation: draw .55s var(--ease) .35s both; }
  .js-motion .case.is-in .meter i { animation: draw 1.2s var(--ease) .3s both; }
  .js-motion .case.is-in .flags i.on::after { animation: tick .25s var(--ease) both; animation-delay: calc(.45s + var(--i, 0) * 45ms); }
  .js-motion .case.is-in .tenant { animation: settle .6s var(--ease) both; animation-delay: calc(.25s + var(--i, 0) * 120ms); }
  /* Engagement: the minimum is dimensioned */
  .js-motion .big.is-in::after { animation: draw .7s var(--ease) .25s both; }
  /* Not a fit: each line is struck out in turn */
  .js-motion .excluded.is-in li s::after { animation: draw .45s var(--ease) both; animation-delay: calc(.2s + var(--i, 0) * 90ms); }
  @keyframes pen { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
  @keyframes register { from { transform: rotate(45deg); } to { transform: none; } }
  @keyframes tick { from { opacity: 0; } to { opacity: 1; } }
  @keyframes settle { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s var(--ease) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
  @keyframes rise { from { transform: translateY(12px); opacity: .4; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Homepage, restructured (Oct 2026) ----------
   Work cases carry three sub-projects each (problem, what we did, outcome); How we work ends on a signed
   founder note; AI is a three-part strip; Fit and terms close on a three-cell terms sheet. */
.case .why { font-size: 17px; line-height: 1.6; color: var(--body); margin: -12px 0 26px; max-width: 46ch; }
.ph-inline { font: 400 .78em/1 var(--mono); letter-spacing: .03em; color: var(--muted); border: 1px dashed var(--construct); border-radius: 5px; padding: 2px 5px; white-space: nowrap; }

.subs { list-style: none; margin: 0; padding: 0; display: grid; }
.subs li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; padding: 22px 0; border-top: 1px solid var(--edge); }
.subs li:first-child { border-top: 0; padding-top: 0; }
.subs .chip { grid-row: 1 / span 3; align-self: start; justify-self: start; margin-top: 2px; }
.subs h4 { grid-column: 2; font: 500 clamp(19px, 1.8vw, 22px)/1.25 var(--display); letter-spacing: -.01em; color: var(--head); margin: 0 0 8px; }
.subs p { grid-column: 2; font-size: 16px; line-height: 1.65; margin: 0; }
.subs .out { margin-top: 12px; color: var(--head); }
.subs .out .mono { display: inline-block; vertical-align: 2px; margin-right: 10px; padding: 3px 7px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--edge-2); font-size: 13px; line-height: 1.2; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--edge-2); }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--edge-2); background: transparent; }
@media (max-width: 520px) { .subs li { grid-template-columns: minmax(0, 1fr); } .subs .chip { grid-row: auto; margin-bottom: 12px; } .subs h4, .subs p { grid-column: 1; } }

.case-quote { margin: 26px 0 0; padding-top: 22px; border-top: 1px dashed var(--edge-2); }
.case-quote blockquote { margin: 0 0 12px; font: 400 clamp(20px, 1.9vw, 24px)/1.35 var(--display); letter-spacing: -.01em; color: var(--head); text-indent: -.4em; }
.case-quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--muted); }
.case-quote figcaption::before { content: ""; width: 24px; height: 1px; background: var(--construct); flex: none; transform-origin: left; }

/* UI fragment: horizontal bars from real figures */
.bars { display: grid; gap: 8px; }
.bars > .k { margin-bottom: 2px; }
.bar-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 14.5px; color: var(--body); }
.bar-row .track { height: 8px; border-radius: 99px; background: var(--edge); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--faint), var(--head)); transform-origin: left; }
.bar-row .num { font: 400 13px/1 var(--mono); color: var(--head); text-align: right; font-variant-numeric: tabular-nums; }
.tenants + .bars { padding-top: 12px; border-top: 1px solid var(--edge); }
.metric + .bars { padding-top: 4px; }
.bars + .stages { padding-top: 10px; border-top: 1px solid var(--edge); }

/* UI fragment: monthly cost table */
.ledger { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ledger th, .ledger td { padding: 8px 0; text-align: left; border-top: 1px solid var(--edge); vertical-align: top; }
.ledger thead th { border-top: 0; padding-top: 0; font: 400 13px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ledger td { text-align: right; padding-left: 10px; white-space: nowrap; color: var(--head); }
.ledger thead th:not(:first-child) { text-align: right; }
.ledger tbody th { font-weight: 400; color: var(--body); padding-right: 8px; }
.ledger tr.real td:first-of-type { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--construct); }
.ledger .tbc { color: var(--muted); font: 400 13px/1.4 var(--mono); }
.ledger tfoot th { color: var(--head); font-weight: 500; border-top: 1px solid var(--edge-2); }
.ledger tfoot td { border-top: 1px solid var(--edge-2); }
@media (max-width: 420px) { .ledger .tbc { white-space: normal; } }

/* How we work: the founder note */
.founder { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); overflow: visible; }
.founder > .corner { position: absolute; opacity: .9; }
.founder > .corner.tl { left: -6px; top: -6px; } .founder > .corner.br { right: -6px; bottom: -6px; }
.founder .photo { position: relative; margin: clamp(20px, 3vw, 36px); aspect-ratio: 4 / 5; max-width: 320px; border: 1px dashed var(--construct); border-radius: 10px; display: grid; place-items: center; background: var(--well); }
.founder .photo .x { position: absolute; }
.founder .photo .c1 { left: -6px; top: -6px; } .founder .photo .c2 { right: -6px; top: -6px; } .founder .photo .c3 { left: -6px; bottom: -6px; } .founder .photo .c4 { right: -6px; bottom: -6px; }
.founder .note { padding: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 56px) clamp(24px, 4vw, 48px) clamp(8px, 2vw, 24px); display: grid; align-content: center; gap: 0; min-width: 0; }
.founder .note-k { margin-bottom: 18px; }
.founder .note p { font: 400 clamp(21px, 2.1vw, 27px)/1.4 var(--display); letter-spacing: -.01em; color: var(--head); max-width: 34ch; margin: 0; }
.founder .note p + p { margin-top: .8em; color: var(--body); }
.founder .sign { margin-top: 30px; display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid var(--edge); max-width: 34ch; }
.founder .sig { font: 500 22px/1.2 var(--display); color: var(--head); letter-spacing: -.01em; }
@media (max-width: 760px) {
  .founder { grid-template-columns: 1fr; }
  .founder .photo { max-width: 220px; margin-bottom: 0; }
  .founder .note { padding: 26px 22px 28px; }
}

/* AI: three-part strip */
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ai-grid article { padding: 24px 24px 28px; display: grid; align-content: start; }
.ai-grid h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; margin: 30px 0 12px; }
.ai-grid p { font-size: 16px; line-height: 1.65; }
.ai-grid a { color: var(--head); text-underline-offset: 3px; text-decoration-color: var(--construct); }
@media (max-width: 960px) { .ai-grid { grid-template-columns: 1fr; } .ai-grid h3 { margin-top: 18px; } }

/* Fit and terms */
#fit .terms { margin-top: 22px; }

/* Contact: what to send, what happens next */
.send { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 48px; margin-top: 34px; max-width: 880px; }
.send .mono { display: block; margin-bottom: 12px; }
.send ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.send li { font-size: 14.5px; padding: 6px 11px; border-radius: 8px; color: var(--head); background: var(--chip); box-shadow: var(--shadow-sm); }
.contact-card .send p { font-size: 17px; line-height: 1.65; }
@media (max-width: 760px) { .send { grid-template-columns: 1fr; } }

/* From the blog */
.latest { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.latest a { display: flex; flex-direction: column; align-items: flex-start; height: 100%; padding: 24px 24px 26px; text-decoration: none; color: inherit; }
.latest .tagchip { flex: none; }
.latest h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; margin: 26px 0 10px; transition: transform .35s var(--ease); }
.latest p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0 0 22px; }
.latest .go { margin-top: auto; color: var(--head); }
.latest a:hover h3 { transform: translateX(3px); }
.all-posts { margin-top: 26px; }
@media (max-width: 960px) { .latest { grid-template-columns: 1fr; } }

/* New drawings come alive with the rest */
@media (prefers-reduced-motion: no-preference) {
  .js-motion .case.is-in .bar-row .track i { animation: draw 1s var(--ease) .35s both; }
  .js-motion .case.is-in .bar-row + .bar-row .track i { animation-delay: .55s; }
  .js-motion .case.is-in .case-quote figcaption::before { animation: draw .7s var(--ease) .3s both; }
}

/* Older browsers without overflow: clip (e.g. iOS Safari < 16): hide the grid layer's off-page extension. */
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
/* Exploration nav pill: desktop only, so it never covers content on phones. */
/* A case page that isn't written yet: shown as a quiet, non-interactive label. */
.btn.is-soon { cursor: default; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--edge); }
.btn.is-soon:hover { box-shadow: inset 0 0 0 1px var(--edge); }

/* ---------- Case pages (work-*.html) ----------
   A case is one drawing sheet: a header card with key facts in a title-block row, a short business section,
   a system map, detail blocks (problem, what we did, outcome) that reuse the homepage's .case sheets, a quote,
   and a way back. Everything below is additive; shared pieces (.case, .ui, .bars, .ledger) come from above. */
.case-hero { padding-top: 28px; padding-bottom: clamp(56px, 7vw, 96px); }
.case-sheet { overflow: hidden; }
.case-sheet .glow { position: absolute; z-index: -1; right: -20%; top: -40%; width: 900px; max-width: 120%; aspect-ratio: 1; pointer-events: none; background: radial-gradient(closest-side, var(--glow), transparent 72%); }
.case-intro { padding: clamp(28px, 4.5vw, 64px) clamp(24px, 5vw, 72px) clamp(28px, 4vw, 52px); }
.case-intro .crumbs { margin-bottom: 22px; }
.case-intro .crumbs .mono { color: var(--muted); }
.case-intro h1 { font-size: clamp(40px, 5.3vw, 76px); line-height: 1; letter-spacing: -.035em; }
.case-intro .lead { max-width: 46ch; margin-top: 24px; }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--edge); }
.facts > div { padding: 20px clamp(18px, 2.4vw, 32px) 24px; min-width: 0; border-left: 1px solid var(--edge); }
.facts > div:first-child { border-left: 0; }
.facts .k { display: block; margin-bottom: 12px; }
.facts b { display: block; font: 500 clamp(22px, 2.2vw, 30px)/1.1 var(--display); color: var(--head); letter-spacing: -.015em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.facts b sup { font: 400 11px/1 var(--mono); vertical-align: super; margin-left: 2px; }
.facts b sup a { color: var(--muted); text-decoration: none; }
.facts b sup a:hover { color: var(--head); }
.facts > div > span:last-child { display: block; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.fn { margin: 0; padding: 14px clamp(18px, 2.4vw, 32px) 16px; border-top: 1px dashed var(--edge-2); font-size: 14.5px; line-height: 1.55; color: var(--muted); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.fn a { color: var(--muted); text-decoration: none; }
.fn a:hover { color: var(--head); }
@media (max-width: 1080px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .facts > div:nth-child(4) { border-left: 0; } .facts > div:nth-child(n+4) { border-top: 1px solid var(--edge); } }
@media (max-width: 620px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts > div { border-left: 0; border-top: 1px solid var(--edge); } .facts > div:nth-child(even) { border-left: 1px solid var(--edge); } .facts > div:first-child { border-top: 0; } .facts > div:nth-child(2) { border-top: 0; } .facts > div:last-child { grid-column: 1 / -1; border-left: 0; } }

/* A heading column beside a reading column */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.split .sec-head { margin-bottom: 0; }
.split-body { min-width: 0; max-width: 62ch; }
.split-body > p { font-size: 17px; }
.keys { margin: 30px 0 0; display: grid; }
.keys > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--edge); }
.keys dt { padding-top: 3px; }
.keys dd { margin: 0; color: var(--head); font-size: 16px; line-height: 1.5; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* System map: two rows of parts joined to one hub by drawn buses */
.sysmap { margin: 0; padding: clamp(20px, 3vw, 36px); }
.sm-label { display: block; margin: 0 7px 14px; }
.sm-row + .sm-label { margin: 14px 7px 0; }
.sm-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sm-cell { padding: 0 7px; min-width: 0; display: grid; }
.node { position: relative; padding: 16px 16px 18px; border-radius: 10px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge-2); min-width: 0; }
.node .mono { display: block; font-size: 13px; margin-bottom: 12px; }
.node h3 { font-size: 18px; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 6px; }
.node p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.sm-hub { padding: 0 7px; display: flex; justify-content: center; }
.node.hub { width: min(100%, 520px); text-align: center; background: var(--chip); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--edge-2); }
.node.hub h3 { font-size: 22px; }
.sm-bus { position: relative; height: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sm-bus::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 50%; height: 1px; background: var(--construct); }
.sm-bus i { position: relative; }
.sm-bus i::before { content: ""; position: absolute; left: 50%; width: 1px; background: var(--construct); }
.sm-bus.up i::before { top: 0; height: 50%; }
.sm-bus.down i::before { bottom: 0; height: 50%; }
.sm-bus b { position: absolute; left: 50%; width: 1px; background: var(--construct); }
.sm-bus.up b { top: 50%; bottom: 0; }
.sm-bus.down b { top: 0; bottom: 50%; }
.sm-bus b::after { content: ""; position: absolute; left: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--head); }
.sm-bus.up b::after { top: -3px; }
.sm-bus.down b::after { bottom: -3px; }
.sysmap figcaption { margin: 22px 7px 0; padding-top: 14px; border-top: 1px dashed var(--edge-2); }
@media (max-width: 860px) {
  .sm-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .sm-bus { height: 28px; grid-template-columns: 1fr; }
  .sm-bus::before, .sm-bus i { display: none; }
}

/* Detail blocks: problem, what we did, outcome */
.case-body > div > .chip { margin-bottom: 18px; }
.pdo { margin: 18px 0 0; display: grid; }
.pdo > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--edge); }
.pdo dt { padding-top: 4px; }
.pdo dd { margin: 0; font-size: 16px; line-height: 1.65; }
.pdo .out dd { color: var(--head); }
.pdo .out dt { color: var(--head); }
@media (max-width: 520px) { .pdo > div, .keys > div { grid-template-columns: 1fr; gap: 6px; } }
.ui .bars, .ui .ledger { margin-top: 2px; }
.ui .bars { padding-top: 10px; border-top: 1px solid var(--edge); }
.ui .ledger { margin-top: 4px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.flow li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--head); line-height: 1.45; }
.langs { display: inline-flex; gap: 4px; margin-right: 4px; }
.langs i { width: 10px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--construct); background: var(--chip); }

/* Quote, what's next, and the way back */
.case-quote.big { margin: 0; padding-top: 0; border-top: 0; }
.case-quote.big blockquote { font-size: clamp(26px, 3vw, 38px); line-height: 1.25; }
.next-up { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--edge); display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.next-up .mono { padding-top: 3px; }
.next-up p { margin: 0; color: var(--head); }
.case-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding-block: clamp(40px, 5vw, 64px); }
.case-nav .back-chev { order: -1; }
.btn:hover .back-chev { transform: translateX(-2px); }
.next-case { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.next-case > span:nth-child(2) { font: 500 20px/1.2 var(--display); color: var(--body); }
/* On a case page the text leads and the drawing supports it */
.case.detail .case-body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.case.detail .case-body > div:last-child { display: grid; align-content: start; }
@media (max-width: 900px) { .case.detail .case-body { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .next-up { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- What we do (slim list after the hero; each item links to its proof) ---------- */
.svc { padding-bottom: clamp(48px, 6vw, 80px); display: grid; gap: 20px; }
.svc-h { margin: 0; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--edge-2); }
.svc-list li { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 20px 20px 4px 0; position: relative; }
.svc-list li + li { padding-left: 20px; border-left: 1px solid var(--edge); }
.svc-list h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
.svc-list p { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0; }
.svc-proof { justify-self: start; margin-top: 6px; text-decoration: none; color: var(--muted); font-size: 13px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: color .2s, background-size .35s var(--ease); }
.svc-proof .nm { display: block; }
.svc-proof:hover, .svc-proof:focus-visible { color: var(--head); background-size: 100% 1px; }
@media (max-width: 1080px) { .svc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .svc-list li, .svc-list li + li { padding: 18px 16px 18px 0; border-left: 0; border-bottom: 1px solid var(--edge); } .svc-list li:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--edge); } }
@media (prefers-reduced-motion: reduce) { .svc-proof { transition: none; } }

/* ---------- Selected work: index cards, 2 × 2 (option A, chosen 2026-10-14) ---------- */
.wx-metric { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 12px; padding: 14px 0 12px; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.wx-metric b { font: 500 clamp(40px, 4vw, 56px)/1 var(--display); letter-spacing: -.03em; color: var(--head); font-variant-numeric: tabular-nums; }
.wx-metric .u { font: 400 13px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--head); }
.wx-metric .l { grid-column: 1 / -1; font-size: 14.5px; line-height: 1.45; color: var(--muted); margin-top: 6px; }
.wa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.wa-card { display: flex; flex-direction: column; }
.wa-body { padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 18px; flex: 1; min-width: 0; }
.wa-card h3 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.08; letter-spacing: -.02em; margin: 0; }
.wa-line { font-size: 16px; line-height: 1.55; color: var(--muted); margin: -8px 0 0; max-width: 44ch; }
.wa-card .ui { font-size: 14.5px; }
.wa-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.wa-subs li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--edge); color: var(--head); font-size: 16px; }
.wa-subs li:last-child { border-bottom: 1px solid var(--edge); }
.wa-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
@media (max-width: 900px) { .wa-grid { grid-template-columns: minmax(0, 1fr); } }
/* Next-case link at the foot of case pages */
a.next-case { text-decoration: none; color: inherit; }
a.next-case:hover span:last-child, a.next-case:focus-visible span:last-child { color: var(--head); }
/* Keep the sheet on whole pixels. The sheet is an odd width (1241px), so plain auto-centring puts it on a
   half pixel in even-width windows, and every grid line then blurs across two pixels. Round the left margin down. */
@supports (margin-left: round(down, 1.5px, 1px)) {
  .page { margin-left: max(0px, round(down, calc((100% - var(--max)) / 2), 1px)); margin-right: auto; }
}

/* Homepage blog cards: the same drawn thumbnails, tag and date as the blog page. */
.latest a { padding: 14px 14px 22px; }
.latest .thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); margin-bottom: 18px; }
.latest .thumb svg { width: 62%; height: auto; }
.latest .meta { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.latest h3 { margin: 16px 0 8px; padding: 0 10px; }
.latest p { padding: 0 10px; margin-bottom: 18px; }
.latest .go { width: 22px; height: 22px; margin: auto 10px 0; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.latest a:hover .go { transform: translateX(3px); color: var(--head); }
@media (max-width: 900px) { .latest { grid-template-columns: minmax(0, 1fr); } }

/* "More" links at the end of homepage sections that have their own page */
.sec-more { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(28px, 4vw, 44px) 0 0; }

/* ---------- Contact: enquiry form (preview; no backend yet) ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 36px; align-items: start; }
.contact-aside { display: grid; grid-auto-flow: column; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: auto auto; gap: 10px clamp(28px, 5vw, 64px); align-content: start;
  padding-bottom: 32px; border-bottom: 1px solid var(--edge); }
.contact-aside .mono { display: block; margin-top: 10px; }
.contact-aside p { font-size: 17px; line-height: 1.65; margin: 0; max-width: 46ch; }
.contact-aside .mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 0; }
.email.sm { font-size: clamp(22px, 2.2vw, 28px); }
.enquiry { padding: clamp(20px, 3vw, 32px); margin-top: 32px; display: grid; gap: 20px; background: var(--solid); }
.enq-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.enq-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font: 500 14.5px/1.3 var(--text); color: var(--head); }
.field .opt { font: 400 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 10px; border: 0;
  font: 400 16px/1.5 var(--text); color: var(--head); background: var(--well);
  box-shadow: inset 0 0 0 1px var(--edge-2); transition: box-shadow .2s, background-color .2s; }
.field textarea { resize: vertical; min-height: 128px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:hover, .field select:hover, .field textarea:hover { box-shadow: inset 0 0 0 1px var(--construct); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--head); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--err); }
.field .hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.field .err { margin: 0; font-size: 13px; line-height: 1.5; color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enq-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-top: 18px; border-top: 1px solid var(--edge); }
.enq-foot .fine { margin: 0; font-size: 13px; color: var(--muted); max-width: 40ch; }
.enq-foot .fine a { color: var(--body); text-underline-offset: 3px; }
.enq-foot .send-err { flex-basis: 100%; order: -1; margin: 0; font-size: 14px; line-height: 1.5; color: var(--err); }
.enq-foot .send-err a { color: inherit; text-underline-offset: 3px; }
.enq-foot .ts:empty { display: none; }
.enq-foot .ts { flex-basis: 100%; order: -2; }
.enquiry .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.enq-done { display: grid; gap: 10px; justify-items: start; padding: 8px 0 4px; }
.enq-done h3 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -.02em; margin: 0; }
.enq-done p { font-size: 17px; line-height: 1.65; margin: 0 0 6px; max-width: 52ch; }
.enq-done:focus { outline: none; }

/* ---------- Contact layout: the form below the content (option A, chosen 2026-10-20) ----------
   Two columns beside the content was the alternative and was rejected: the form is about twice the
   height of the aside, which left a tall gap down the right of the card. */
/* Three columns strand Stage on a row of its own, so it moves down beside Timeline and Budget:
   name / email / company, then the problem, then stage / timeline / budget. */
.enq-fields > :nth-child(-n+3) { order: 1; }
.enq-fields > :nth-child(5) { order: 2; }
.enq-fields > :nth-child(4) { order: 3; }
.enq-fields > :nth-child(n+6) { order: 4; }
@media (max-width: 960px) {
  .contact-aside { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .enq-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .enq-fields { grid-template-columns: minmax(0, 1fr); } .enq-foot .btn { width: 100%; justify-content: center; } }
.enquiry [hidden] { display: none !important; }   /* display rules above must not override [hidden] */
.field { align-content: start; }                   /* don't stretch a field's input when its neighbour has a hint */

/* Timeline: a rail of dated steps (About, the TribeCrafter origin). Each item draws its own length of rail,
   so together they read as one line with a node per year; the year sits above the rail, so nothing masks the line. */
.tline { position: relative; margin: 0; padding: clamp(24px, 3vw, 40px); }
.tl-rail { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; }
/* Each item draws its own length of rail, so together they read as one line with a node per year.
   The year sits above the rail, not on top of it, so nothing has to mask the line. */
.tl-item { position: relative; display: flex; flex-direction: column; min-width: 0; }
.tl-item > :not(.tick) { padding-right: 24px; }
.tl-item .yr { display: block; font: 500 clamp(28px, 2.8vw, 36px)/1 var(--display); letter-spacing: -.02em; color: var(--head); font-variant-numeric: tabular-nums; }
.tl-item .tick { display: block; position: relative; height: 1px; background: var(--construct); margin: 16px 0 22px; }
.tl-item .tick::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: var(--ground); box-shadow: inset 0 0 0 1px var(--head); }
.tl-item:first-child .tick { margin-left: 0; }
.tl-item h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 8px; }
.tl-item p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0 0 20px; max-width: 30ch; }
.tl-item .btn { margin-top: auto; align-self: start; }   /* every link lands on the same baseline */
.tl-cap { margin: 26px 0 0; }
@media (max-width: 860px) {
  .tl-rail { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-left: 26px; }
  .tl-rail::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--construct); }
  .tl-item > :not(.tick) { padding-right: 0; }
  .tl-item .yr { margin-bottom: 10px; }
  .tl-item .tick { position: absolute; left: -26px; top: 10px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--ground); box-shadow: inset 0 0 0 1px var(--head); margin: 0; }
  .tl-item .tick::before { display: none; }
  .tl-item p { margin-bottom: 14px; }
  .tl-item .btn { margin-top: 0; }
}

/* Outcome first (case details and the Work index): the result and its figure lead; the problem and what we did open on request */
.case.detail.lite .case-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.case.detail.lite .case-body > div:last-child { align-content: start; }
.case.detail.lite .case-body .ui { position: sticky; top: 96px; }  /* stays in view while "How we did it" is open */
.case .gist { font-size: 17px; line-height: 1.55; color: var(--body); margin: 18px 0 0; max-width: 40ch; }
.case.lite .wx-metric, .wk .wx-metric { margin-top: 20px; }
.how { margin-top: 22px; interpolate-size: allow-keywords; }
.how summary { list-style: none; width: max-content; }
.how summary::-webkit-details-marker { display: none; }
.how summary .plus { width: 14px; height: 14px; background: none; box-shadow: none; margin-right: -2px; }
.how[open] summary .plus::after { transform: rotate(0deg); }
.how .pdo { margin-top: 18px; }
.how::details-content { block-size: 0; overflow: hidden; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
.how[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { .how::details-content { transition: none; } }
@media (max-width: 900px) { .case.detail.lite .case-body { grid-template-columns: minmax(0, 1fr); } }

/* Work index: one row per case, the figure beside the result */
.wk-list { display: grid; gap: 22px; }
.wk h2 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 14px; }
.wk .wa-line { margin: 0; }
.wk .wa-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.wk .case-body > div:last-child { display: grid; align-content: center; }
.wk .ui { font-size: 15px; }
.wk-close { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }

/* Homepage work rows (lighter homepage draft): one row per case, its name, a line and its figure */
.wk-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wk-rows a { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto 24px; gap: 28px; align-items: center; padding: 24px 28px; text-decoration: none; color: inherit; }
.wk-rows .ref { display: grid; gap: 6px; align-self: start; padding-top: 6px; }
.wk-rows h3 { font-size: clamp(24px, 2.3vw, 30px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 6px; transition: transform .35s var(--ease); }
.wk-rows p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.wk-num { display: grid; justify-items: end; gap: 4px; }
.wk-num b { font: 500 clamp(32px, 3.2vw, 44px)/1 var(--display); letter-spacing: -.03em; color: var(--head); font-variant-numeric: tabular-nums; }
.wk-rows .go { width: 22px; height: 22px; color: var(--muted); transition: transform .35s var(--ease), color .2s; }
.wk-rows a:hover h3, .wk-rows a:focus-visible h3 { transform: translateX(3px); }
.wk-rows a:hover .go, .wk-rows a:focus-visible .go { color: var(--head); transform: translateX(3px); }
@media (max-width: 760px) {
  .wk-rows a { grid-template-columns: minmax(0, 1fr) 22px; gap: 14px 16px; padding: 20px; }
  .wk-rows .ref { grid-column: 1 / -1; display: flex; gap: 14px; padding-top: 0; }
  .wk-num { grid-column: 1; justify-items: start; grid-row: 3; }
  .wk-rows .go { grid-column: 2; grid-row: 2; }
}
.keys.lg > div { padding: 20px 0; align-items: baseline; }
.keys.lg dd { font: 400 clamp(20px, 1.9vw, 24px)/1.3 var(--display); letter-spacing: -.01em; }
.keys.lg dd a { color: inherit; text-decoration: none; background: linear-gradient(var(--construct), var(--construct)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size .3s var(--ease); }
.keys.lg dd a:hover, .keys.lg dd a:focus-visible { background-image: linear-gradient(var(--head), var(--head)); }

/* Footer: how fast this page appeared and what it weighs, measured in the visitor's browser (site.js); hidden until measured */
.titleblock .perf { display: grid; gap: 6px; }
.titleblock .perf[hidden] { display: none; }
.titleblock .perf .v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; color: var(--muted); }
.titleblock .perf b { font-weight: 500; color: var(--head); }
.titleblock .perf i { font-style: normal; color: var(--construct); padding: 0 2px; }

/* <i> draws marks (corners, bars, separators), never italic text, which uses <em>. Upright, so no page downloads the italic font for them. */
i { font-style: normal; }
