/* ==========================================================================
   Combination Technologies, Version 2: the design system.
   One file for every page: tokens, reset, type, layout, components.
   Page-only styles go in /assets/css/page-NAME.css. See DESIGN-SYSTEM.md.
   Sections: 1 fonts · 2 tokens · 3 reset and base · 4 type · 5 layout · 6 components · 7 motion · 8 forced colours · 9 print
   ========================================================================== */

/* 1. Fonts (self-hosted, latin, variable) ------------------------------------------------ */
@font-face { font-family: Manrope; src: url(/assets/fonts/manrope-latin-wght-normal.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/assets/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Manrope Fallback'; src: local('Arial'); size-adjust: 103%; ascent-override: 102%; descent-override: 29%; line-gap-override: 0%; }

/* 2. Tokens ------------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* colour: the palette (never use a hex outside this block) */
  --paper: #F2F1ED;
  --sheet: #FFFFFF;
  --bench: #E6E5E1;
  --ink: #0B0B0C;
  --ink-hover: #2B2B2C;
  --muted: #5D5D5A;
  --line: #D6D5D0;
  --line-strong: #767570;
  --dark: #09090A;
  --dark-2: #161617;
  --line-dark: #2C2C2E;
  --on-dark: #F4F4F1;
  --muted-on-dark: #A6A6A2;
  --accent: #FF5A1F;      /* marks only on light; never text on light */
  --accent-ink: #B93A0E;  /* the few accent words that must sit on light */
  --hatch: repeating-linear-gradient(45deg, var(--line-strong) 0 1px, transparent 1px 8px);
  --grid-paper: linear-gradient(rgba(11, 11, 12, .05) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(11, 11, 12, .05) 1px, transparent 1px) 0 0 / 24px 24px;

  /* colour: roles. Components use these, so [data-surface="dark"] can flip them. */
  --bg: var(--paper);
  --raise: var(--sheet);
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --rule: var(--line);
  --rule-strong: var(--line-strong);
  --mark: var(--accent);
  --mark-text: var(--accent-ink);

  /* type */
  --font-sans: Manrope, 'Manrope Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --fs-display: clamp(2.75rem, 1.73rem + 4.19vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.44rem + 2.29vw, 3.5rem);
  --fs-h3: clamp(1.75rem, 1.15rem + 2.48vw, 3.375rem);
  --fs-h4: clamp(1.1875rem, 1.07rem + 0.48vw, 1.5rem);
  --fs-lead: clamp(1.1875rem, 1.07rem + 0.48vw, 1.5rem);
  --fs-body: clamp(1.0625rem, 1.04rem + 0.1vw, 1.125rem);
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;
  --fs-caption: 0.8125rem;
  --fs-data: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);

  /* space: only these steps */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 9rem;
  --section-y: clamp(4rem, 2.5rem + 6.1vw, 8rem);

  /* layout */
  --margin: 16px;
  --gap: 16px;
  --cols: 4;
  --content: 1312px;
  --header-h: 56px;

  /* shape */
  --r-0: 0; --r-1: 2px; --r-2: 4px;
  --w-hair: 1px; --w-mark: 2px; --w-bar: 4px;

  /* motion */
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-settle: cubic-bezier(.35, 0, 0, 1);

  /* the scroll story reads these (see /assets/story/story.css) */
  --story-paper: var(--paper);
  --story-sheet: var(--sheet);
  --story-ink: var(--ink);
  --story-dark: var(--dark);
  --story-bench: var(--bench);
  --story-line: #ECECE9;
  --story-accent: var(--accent);
  --story-muted: var(--muted);
  --story-muted-dark: var(--muted-on-dark);
  --story-on-dark: var(--on-dark);
  --story-font-sans: var(--font-sans);
  --story-font-mono: var(--font-mono);
  --story-len: 8;
}
@media (min-width: 768px) { :root { --margin: 32px; --gap: 20px; --cols: 8; } }
@media (min-width: 900px) { :root { --header-h: 64px; } }
@media (min-width: 1100px) { :root { --margin: clamp(48px, 4.5vw, 72px); --gap: 24px; --cols: 12; } }

[data-surface='dark'] {
  --bg: var(--dark);
  --raise: var(--dark-2);
  --fg: var(--on-dark);
  --fg-muted: var(--muted-on-dark);
  --rule: var(--line-dark);
  --rule-strong: #8A8A86;
  --mark-text: var(--accent);
  background: var(--bg);
  color: var(--fg);
}
[data-surface='bench'] { --bg: var(--bench); }

/* 3. Reset and base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s-4)); hanging-punctuation: first; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 450; line-height: 1.6; font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, picture, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
b, strong { font-weight: 700; }
::selection { background: rgba(255, 90, 31, .22); }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
html:not(.js) .menu-btn--js, html.js .menu-btn--nojs, html:not(.js) [data-motion] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* focus: a 2px outline, plus four accent corner handles drawn by site.js (.focus-frame) */
:focus-visible { outline: 2px solid var(--fg, var(--ink)); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
.focus-frame { position: fixed; z-index: 1000; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity var(--dur-1) linear; }
.focus-frame.is-on { opacity: 1; }
.focus-frame i { position: absolute; width: 6px; height: 6px; background: var(--accent); }
.focus-frame i:nth-child(1) { left: -3px; top: -3px; } .focus-frame i:nth-child(2) { right: -3px; top: -3px; }
.focus-frame i:nth-child(3) { left: -3px; bottom: -3px; } .focus-frame i:nth-child(4) { right: -3px; bottom: -3px; }

/* 4. Type -------------------------------------------------------------------------------- */
.t-display, .t-h2, .t-h3, .t-h4 { font-weight: 600; text-wrap: balance; }
.t-display { font-size: var(--fs-display); line-height: 1; letter-spacing: -.035em; }
.t-h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -.025em; }
.t-h3 { font-size: var(--fs-h3); line-height: 1.06; letter-spacing: -.028em; }
.t-h4 { font-size: var(--fs-h4); line-height: 1.25; letter-spacing: -.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.45; font-weight: 500; max-width: 52ch; text-wrap: pretty; }
.prose { max-width: 68ch; }
.prose p + p { margin-top: var(--s-4); }
.small { font-size: var(--fs-small); line-height: 1.5; }
.muted { color: var(--fg-muted); }
.mono { font-family: var(--font-mono); }
.data { font-family: var(--font-mono); font-size: var(--fs-data); line-height: 1.45; font-weight: 450; }
.caps { font-family: var(--font-mono); font-size: var(--fs-label); line-height: 1.3; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* links in running text: ink, underlined, never coloured */
.link, .prose a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness var(--dur-1) linear; }
.link:hover, .prose a:hover { text-decoration-thickness: 2px; }

/* 5. Layout ------------------------------------------------------------------------------ */
.container { width: min(100% - 2 * var(--margin), var(--content)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gap); }
.section { padding-block: var(--section-y); background: var(--bg); color: var(--fg); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section + .section:not([data-surface]) { padding-top: calc(var(--section-y) * .5); }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* 6. Components -------------------------------------------------------------------------- */

/* 6.1 Skip link */
.skip { position: absolute; z-index: 200; left: var(--s-4); top: var(--s-2); transform: translateY(-160%); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; padding: 12px 18px; border-radius: var(--r-2); text-decoration: none; }
.skip:focus-visible { transform: none; }

/* 6.2 Label on a rule: accent dash, mono label, hairline to the edge */
.label { display: flex; align-items: center; gap: 0; font-family: var(--font-mono); font-size: var(--fs-label); line-height: 1.3; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); }
.label::before { content: ''; flex: none; width: 18px; height: var(--w-mark); background: var(--mark); margin-right: 10px; }
.label::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--rule); margin-left: 12px; min-width: var(--s-5); }
.label--bare::after { display: none; }

/* 6.3 Section header */
.section-head { display: grid; gap: 0; margin-bottom: var(--s-7); }
.section-head .label { margin-bottom: var(--s-5); }
.section-head .t-h2 { max-width: 20ch; }
.section-head .lead { margin-top: var(--s-4); }
.section-head__more { margin-top: var(--s-5); }
@media (min-width: 1100px) {
  .section-head--more { grid-template-columns: 1fr auto; column-gap: var(--s-6); }
  .section-head--more .label, .section-head--more .lead { grid-column: 1 / -1; }
  .section-head--more .t-h2 { grid-column: 1; }
  .section-head--more .section-head__more { grid-column: 2; grid-row: 2; align-self: end; margin: 0 0 .35em; }
}

/* 6.4 Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 20px; border-radius: var(--r-2); border: 1.5px solid transparent; font: 600 16px/1.2 var(--font-sans); letter-spacing: -.005em; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-1) linear, color var(--dur-1) linear, border-color var(--dur-1) linear; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
[data-surface='dark'] .btn--primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.btn--secondary { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn--secondary:hover { background: var(--raise); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn--block { width: 100%; }
@media (max-width: 767px) { .btn--block { min-height: 52px; } }
.btn-text { display: inline-flex; align-items: center; gap: .35em; min-height: 44px; font-weight: 600; color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-thickness var(--dur-1) linear; }
.btn-text:hover { text-decoration-thickness: 2px; }
.btn-note { margin-top: var(--s-2); font-size: var(--fs-small); color: var(--fg-muted); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-start; }

/* 6.5 Header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); transition: background-color var(--dur-2) linear, color var(--dur-2) linear, border-color var(--dur-2) linear; }
.site-header[data-surface='dark'] { background: var(--dark); color: var(--on-dark); border-bottom-color: var(--line-dark); }
.site-header__in { height: 100%; display: flex; align-items: center; gap: var(--s-4); }
.logo { display: inline-flex; align-items: center; flex: none; margin-right: auto; padding: 11px 0; }
.logo img { height: 22px; width: auto; }
.logo__dark { display: none !important; }
[data-surface='dark'] .logo__light { display: none !important; }
[data-surface='dark'] .logo__dark { display: block !important; }
@media (min-width: 900px) { .logo img { height: 26px; } }
.nav { display: none; }
.nav ul { display: flex; gap: 28px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; color: inherit; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: var(--w-mark); background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out); }
.nav a:hover::after { transform: scaleX(.999); opacity: .35; }
.nav a[aria-current='page']::after { transform: none; opacity: 1; }
.site-header .btn--primary { min-height: 40px; padding: 0 14px; font-size: 15px; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-right: -6px; padding: 0 6px; background: none; border: 0; font: 600 15px/1 var(--font-sans); color: inherit; }
@media (min-width: 900px) {
  .nav { display: block; margin-right: var(--s-3); }
  .site-header .btn--primary { padding: 0 18px; }
  .menu-btn { display: none; }
}

/* 6.6 Phone menu: a full-screen sheet (native <dialog>: traps focus, Esc closes) */
.menu { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); opacity: 0; transition: opacity var(--dur-2) linear, overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete; }
.menu[open] { opacity: 1; }
@starting-style { .menu[open] { opacity: 0; } }
.menu::backdrop { background: transparent; }
.menu__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.menu__nav { margin-top: var(--s-5); }
.menu__nav a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid var(--line); font-size: 28px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.menu__nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.menu__nav a span { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em; color: var(--muted); }
.menu__foot { margin-top: var(--s-6); display: grid; gap: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-caption); }
.menu__foot a { display: inline-flex; min-height: 44px; align-items: center; }
.menu .btn--block { margin-top: var(--s-6); }
html:has(.menu[open]) { overflow: hidden; }

/* 6.7 Figure with caption: every image is a figure */
.fig { position: relative; }
.fig__frame { position: relative; aspect-ratio: 4 / 3; background: var(--sheet); border: 1px solid var(--line); overflow: hidden; }
.fig__frame img, .fig__frame picture { width: 100%; height: 100%; }
.fig__frame img { object-fit: cover; object-position: var(--focus, 50% 50%); }
.fig--contain .fig__frame img { object-fit: contain; padding: 6%; }
.fig--portrait .fig__frame { aspect-ratio: 4 / 5; background: var(--bench); }
.fig__cap { margin-top: var(--s-3); max-width: 72ch; font-family: var(--font-mono); font-size: var(--fs-caption); line-height: 1.5; letter-spacing: .01em; color: var(--fg); }
.fig__cap .fig__no { font-weight: 600; }
.fig__cap .muted { color: var(--fg-muted); }
.fig__zoom { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.fig__zoom:focus-visible { outline-offset: -4px; }
/* datum corner marks: four 10 x 10 L-marks, 6px outside each corner */
.fig--datum .fig__frame { overflow: visible; }
.fig--datum .fig__frame > picture, .fig--datum .fig__frame > img { overflow: hidden; }
.fig--datum .fig__frame::before { content: ''; position: absolute; inset: -7px; pointer-events: none;
  --c: var(--line-strong);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 10px 1px, linear-gradient(var(--c), var(--c)) 0 0 / 1px 10px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 10px 1px, linear-gradient(var(--c), var(--c)) 100% 0 / 1px 10px,
    linear-gradient(var(--c), var(--c)) 0 100% / 10px 1px, linear-gradient(var(--c), var(--c)) 0 100% / 1px 10px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 10px 1px, linear-gradient(var(--c), var(--c)) 100% 100% / 1px 10px;
  background-repeat: no-repeat; }
/* withheld figure */
.fig--withheld .fig__frame { display: grid; place-items: center; background: var(--hatch), var(--bench); }
.fig__withheld { padding: 4px 8px; background: var(--bench); border: 1px solid var(--line-strong); color: var(--ink); }

/* 6.8 Kind tag and discipline tags */
.kind, .tag { display: inline-flex; align-items: center; height: 20px; padding: 0 5px; border: 1px solid var(--rule-strong); border-radius: var(--r-1); font: 500 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg); vertical-align: 1px; white-space: nowrap; }
.tag { height: 22px; padding: 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* 6.9 Started at -> reached */
.route-wrap { container-type: inline-size; }
.route { display: grid; grid-template-columns: 1fr; gap: 0; font-family: var(--font-mono); font-size: var(--fs-data); line-height: 1.45; }
.route > div { position: relative; }
.route dt { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 2px; }
.route dd { color: var(--fg); }
.route > div:first-child { padding: 0 0 var(--s-5) 0; }
.route > div:first-child::after { content: ''; position: absolute; left: 4px; bottom: 6px; width: 1px; height: 12px; background: var(--rule-strong); }
.route > div:first-child::before { content: ''; position: absolute; left: 1px; bottom: 4px; width: 7px; height: 7px; border-right: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); transform: rotate(45deg); }
@container (min-width: 520px) {
  .route { grid-template-columns: 1fr 56px 1fr; }
  .route > div:first-child { padding: 0; grid-column: 1; }
  .route > div:last-child { grid-column: 3; }
  .route > div:first-child::after { left: calc(100% + 8px); bottom: auto; top: 50%; width: 40px; height: 1px; }
  .route > div:first-child::before { left: calc(100% + 42px); bottom: auto; top: calc(50% - 3px); transform: rotate(-45deg); }
}

/* 6.10 Stage strip: five segments; filled up to the stage reached */
.strip { display: inline-flex; align-items: center; gap: var(--s-3); font: 500 12px/1.3 var(--font-mono); color: var(--fg); }
.strip__bar { display: inline-flex; gap: 3px; }
.strip__bar i { width: 24px; height: 4px; background: var(--rule); }
.strip[data-stage='research'] i:nth-child(-n+1),
.strip[data-stage='poc'] i:nth-child(-n+2),
.strip[data-stage='prototype'] i:nth-child(-n+3),
.strip[data-stage='field'] i:nth-child(-n+4),
.strip[data-stage='lowvolume'] i:nth-child(-n+5) { background: var(--fg); }

/* 6.11 Project card (Home, Making): the whole card is one link */
.cards { display: grid; gap: var(--s-7) var(--gap); grid-template-columns: 1fr; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { position: relative; display: grid; align-content: start; gap: 0; }
.card .fig__frame { transition: border-color var(--dur-1) linear; }
.card:hover .fig__frame { border-color: var(--line-strong); }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); }
.card__title { margin-top: var(--s-2); }
.card__title a { text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.card__title a:focus-visible { outline: none; }
.card:has(.card__title a:focus-visible) { outline: 2px solid var(--fg); outline-offset: 6px; }
.card:hover .card__title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card .route-wrap { margin-top: var(--s-4); }
.card .tags { margin-top: var(--s-4); }
.card__open { margin-top: var(--s-3); font-weight: 600; font-size: var(--fs-small); }

/* 6.12 Project row (Work list) and the reserved row */
.rows { border-top: 1px solid var(--rule); }
.prow { position: relative; display: grid; gap: var(--s-3) var(--s-4); grid-template-columns: 96px 1fr; padding: 20px 0; border-bottom: 1px solid var(--rule); transition: background-color var(--dur-1) linear; }
.prow:hover, .prow:focus-within { background: var(--sheet); }
.prow__no { font: 500 var(--fs-label)/1.3 var(--font-mono); letter-spacing: .08em; color: var(--fg-muted); }
.prow__thumb { grid-row: span 2; width: 96px; aspect-ratio: 4 / 3; background: var(--sheet); border: 1px solid var(--line); overflow: hidden; }
.prow__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.prow__title a { text-decoration: none; }
.prow__title a::after { content: ''; position: absolute; inset: 0; }
.prow:hover .prow__title a { text-decoration: underline; text-underline-offset: 4px; }
.prow__sum { margin-top: var(--s-1); font-size: var(--fs-small); color: var(--fg-muted); }
.prow__route, .prow__meta { grid-column: 1 / -1; }
.prow__meta { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
@media (min-width: 1100px) {
  .prow { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
  .prow__no { grid-column: 1; }
  .prow__thumb { grid-column: 2 / span 2; grid-row: auto; width: 120px; }
  .prow__body { grid-column: 4 / span 4; }
  .prow__route { grid-column: 8 / span 3; }
  .prow__meta { grid-column: 11 / span 2; flex-direction: column; align-items: flex-start; }
}
/* phone and tablet: thumbnail left of number and title, route and meta full width below */
@media (max-width: 1099px) {
  .prow { grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--s-4); row-gap: var(--s-3); }
  .prow__thumb { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .prow__no { grid-column: 2; grid-row: 1; }
  .prow__body { grid-column: 2; grid-row: 2; }
  .prow__route, .prow__meta { grid-column: 1 / -1; }
}
.prow--reserved { background: none !important; }
.prow--reserved .prow__thumb { background: var(--hatch), var(--bench); }

/* 6.13 Seen-in card (story captions) */
.seen { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.4; }
.seen__label { display: block; margin-bottom: var(--s-3); font: 500 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.seen__body { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-3) var(--s-4); align-items: start; }
.seen__thumb { width: 96px; aspect-ratio: 4 / 3; background: var(--sheet); border: 1px solid var(--rule); overflow: hidden; }
.seen__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.seen__thumb--contain img { object-fit: contain; padding: 4px; background: #FFFFFF; }
.seen__name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.seen__fact { margin-top: var(--s-1); font: 400 13px/1.45 var(--font-mono); color: var(--fg-muted); }
.seen__credit { display: block; margin-top: var(--s-1); font: 400 11px/1.4 var(--font-mono); color: var(--fg-muted); }
.seen__open { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s-1); font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.seen__open:hover, .seen__start:hover, .seen__short a:hover { text-decoration-thickness: 2px; }
.seen__start { display: inline-flex; align-items: center; min-height: 44px; font: 500 13px/1.3 var(--font-mono); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.seen__short { display: none; font-size: 15px; }
.seen__short a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* 6.14 Stage ruler ("Where we stop") */
.ruler { position: relative; padding: var(--s-6) var(--s-5) var(--s-5); background: var(--grid-paper), var(--sheet); border: 1px solid var(--line); }
.ruler__track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 4px minmax(0, 1.1fr); grid-template-rows: 120px auto auto 1fr; }
.ruler__stage { position: relative; display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; }
.ruler__ticks { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 4px; padding: 0 0 10px 12px; }
.ruler__tick { position: relative; display: block; width: 8px; height: 8px; background: var(--ink); }
.ruler__tick span { position: absolute; z-index: 3; left: 16px; top: 50%; transform: translateY(-50%); padding: 4px 8px; background: var(--ink); color: var(--paper); font: 500 12px/1.3 var(--font-mono); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-1) linear; }
.ruler__tick:hover span, .ruler__tick:focus-visible span { opacity: 1; }
/* the last stage sits near the right edge: its tooltips open to the left so they never widen the page */
.ruler__stage:nth-child(5) .ruler__tick span { left: auto; right: 16px; }
/* the ticks rise once when the drawing comes into view (site.js adds .draw-ready, then .is-drawn) */
.draw-ready .ruler__tick { transform: scaleY(0); transform-origin: bottom; transition: transform var(--dur-3) var(--ease-settle); }
.draw-ready.is-drawn .ruler__tick { transform: none; }
.draw-ready.is-drawn .ruler__tick:nth-child(2) { transition-delay: 40ms; }
.draw-ready.is-drawn .ruler__tick:nth-child(3) { transition-delay: 80ms; }
.draw-ready.is-drawn .ruler__tick:nth-child(n+4) { transition-delay: 120ms; }
.ruler__line { position: relative; height: 1px; background: var(--ink); }
.ruler__line::before { content: ''; position: absolute; left: 0; top: -6px; width: 1px; height: 13px; background: var(--ink); }
.ruler__name { padding: 12px 12px 0 12px; font: 500 var(--fs-label)/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.ruler__list { padding: var(--s-2) 12px 0 12px; font-size: 14px; line-height: 1.35; }
.ruler__list li + li { margin-top: 6px; }
.ruler__list a { display: inline-block; text-decoration: none; padding: 2px 0; }
.ruler__list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ruler__list a .num { color: var(--muted); font-size: 12px; margin-right: 6px; }
.ruler__list .is-none { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.ruler__handoff { position: relative; grid-row: 1 / -1; background: var(--ink); width: var(--w-bar); }
.ruler__handoff b { position: absolute; right: 14px; top: 0; font: 600 var(--fs-label)/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); white-space: nowrap; background: var(--sheet); padding: 0 4px; }
.ruler__beyond { grid-row: 1 / -1; display: flex; align-items: flex-end; padding: 0 12px 12px 16px; background: var(--hatch), var(--bench); font: 500 var(--fs-label)/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.ruler__beyond span { background: var(--bench); padding: 2px 4px; }
.ruler__foot { margin-top: var(--s-4); }
/* phone and tablet: the ruler turns vertical, the list beside it */
@media (max-width: 899px) {
  .ruler { padding: var(--s-5) var(--s-4); }
  .ruler__track { grid-template-columns: 1fr; grid-template-rows: none; }
  .ruler__stage { grid-row: auto; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; padding-bottom: var(--s-5); }
  .ruler__handoff, .ruler__beyond { grid-row: auto; }
  .ruler__ticks { display: none; }
  .ruler__line { grid-row: 1 / span 2; grid-column: 1; width: 1px; height: auto; margin-left: 4px; }
  .ruler__line::before { left: -4px; top: 3px; width: 9px; height: 9px; border-radius: 0; }
  .ruler__stage.has-some .ruler__line::before { background: var(--ink); }
  .ruler__stage:not(.has-some) .ruler__line::before { background: var(--sheet); border: 1px solid var(--ink); }
  .ruler__name { grid-column: 2; padding: 0; }
  .ruler__list { grid-column: 2; padding: var(--s-2) 0 0; }
  .ruler__handoff { width: auto; height: var(--w-bar); margin: 0 0 0; }
  .ruler__handoff b { position: absolute; left: 0; right: auto; top: 12px; }
  .ruler__handoff { margin-bottom: 32px; }
  .ruler__beyond { margin: var(--s-5) 0 0; min-height: 72px; padding: 12px; }
  .ruler__foot { margin-top: var(--s-4); }
}

/* 6.15 Service rows (compact on Home, full on Services) */
.services { border-top: 1px solid var(--rule); }
.srow { display: grid; gap: var(--s-2) var(--gap); padding: var(--s-5) 0; border-bottom: 1px solid var(--rule); grid-template-columns: 40px 1fr; }
.srow__no { font: 500 var(--fs-label)/2 var(--font-mono); letter-spacing: .08em; color: var(--fg-muted); }
.srow__name a { text-decoration: none; }
.srow__name a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.srow__text, .srow__proof { grid-column: 2; }
.srow__proof { font-family: var(--font-mono); font-size: var(--fs-caption); line-height: 1.5; color: var(--fg-muted); }
.srow__proof b { font-weight: 500; color: var(--fg); }
.srow__proof a { color: var(--fg); text-underline-offset: 3px; }
@media (min-width: 1100px) {
  .srow { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: baseline; padding: 28px 0; }
  .srow__no { grid-column: 1; }
  .srow__name { grid-column: 2 / span 3; }
  .srow__text { grid-column: 5 / span 5; }
  .srow__proof { grid-column: 10 / span 3; }
}

/* 6.16 Key figures list */
.keys { display: grid; grid-template-columns: 1fr; column-gap: var(--gap); border-top: 1px solid var(--rule); }
.keys > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.keys dt { font: 500 var(--fs-label)/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.keys dd { font-family: var(--font-mono); font-size: var(--fs-data); line-height: 1.45; }
@media (min-width: 768px) { .keys--2 { grid-template-columns: 1fr 1fr; } }

/* 6.17 Filter chips (Work) */
.chips { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.chip { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; margin-block: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: transparent; font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); transition: background-color var(--dur-2) linear, color var(--dur-2) linear; }
.chip:hover { background: var(--sheet); }
@media (pointer: coarse) { .chip { height: 44px; margin-block: 0; } }
/* a link at the end of a figure caption: a 44 px tall touch target without changing the line height */
@media (pointer: coarse) { .fig__cap .link { display: inline-block; padding-block: 13px; margin-block: -13px; } }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* 6.18 Accordion (native details) */
.acc { border-top: 1px solid var(--rule); }
.acc details { border-bottom: 1px solid var(--rule); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 56px; padding: var(--s-3) 0; font-weight: 600; font-size: 19px; line-height: 1.3; list-style: none; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; flex: none; font: 500 20px/1 var(--font-mono); }
.acc details[open] summary::after { content: '\2212'; }
.acc details > div { padding: 0 0 var(--s-5); max-width: 68ch; }

/* 6.19 Robot system diagram: three lanes, scope words verbatim, no arrows */
.lanes { background: var(--grid-paper), var(--sheet); border: 1px solid var(--line); }
.lane { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.lane:first-child { border-top: 0; }
.lane__name { padding: var(--s-4) var(--s-4) 0; font: 600 var(--fs-label)/1.3 var(--font-mono); letter-spacing: .08em; }
.lane__blocks { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) var(--s-4) var(--s-4); }
.block { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border: 1px solid var(--ink); background: var(--sheet); font-size: 14px; line-height: 1.3; font-weight: 500; }
.block--core { border-width: 2px; }
@media (min-width: 768px) {
  .lane { grid-template-columns: 132px 1fr; }
  .lane__name { padding: var(--s-5) 0 0 var(--s-4); border-right: 1px solid var(--line); }
  .lane__blocks { padding: var(--s-4); }
}

/* 6.20 Call-to-action band */
.cta { padding-block: var(--section-y) var(--s-8); }
.cta .t-h2 { max-width: 18ch; margin-top: var(--s-5); }
.cta .actions { margin-top: var(--s-6); }
.cta__note { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--fg-muted); }
.cta__sign { margin-top: var(--s-7); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }

/* 6.21 Footer: set like a drawing's title block */
.site-footer { padding: 0 0 var(--s-6); background: var(--dark); }
.site-footer .foot { padding-top: var(--s-8); border-top: 1px solid var(--rule); }
.foot { display: grid; gap: var(--s-6) var(--gap); grid-template-columns: 1fr 1fr; }
.foot__brand { grid-column: 1 / -1; }
.foot__brand img { height: 24px; width: auto; }
.foot__sign { margin-top: var(--s-5); font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; max-width: 18ch; }
.foot h2 { margin-bottom: var(--s-3); font: 500 var(--fs-label)/1.3 var(--font-mono); letter-spacing: .08em; color: var(--fg-muted); }
.foot ul a, .foot__contact a, .foot__partner a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 16px; }
.foot ul a:hover, .foot__contact a:hover, .foot__partner a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__contact p, .foot__partner p { font-size: 15px; line-height: 1.5; margin: 6px 0; }
.foot__partner .foot__plain { display: flex; align-items: center; min-height: 44px; font-size: 16px; margin: 0; }
.foot__contact a { overflow-wrap: anywhere; }
.foot__contact { grid-column: 1 / -1; }
@media (max-width: 767px) { .foot__contact { order: 3; } .foot__partner { order: 2; } }
@media (min-width: 768px) { .foot { grid-template-columns: repeat(8, minmax(0, 1fr)); } .foot__brand { grid-column: span 8; } .foot__pages { grid-column: span 2; } .foot__contact { grid-column: span 4; } .foot__partner { grid-column: span 2; } }
@media (min-width: 1100px) { .foot { grid-template-columns: repeat(12, minmax(0, 1fr)); } .foot__brand { grid-column: span 3; } .foot__pages { grid-column: span 2; } .foot__contact { grid-column: span 4; } .foot__partner { grid-column: span 3; } }
.titleblock { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--s-8); border: 1px solid var(--line-dark); font: 500 12px/1.4 var(--font-mono); letter-spacing: .06em; color: var(--muted-on-dark); }
.titleblock > * { padding: 10px 12px; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.titleblock > *:nth-child(2n) { border-right: 0; }
.titleblock > *:nth-last-child(-n+2) { border-bottom: 0; }
.titleblock b { display: block; font-weight: 500; font-size: 10px; letter-spacing: .1em; opacity: .75; margin-bottom: 2px; }
@media (min-width: 900px) {
  .titleblock { grid-template-columns: 2fr 1.2fr 1.2fr .8fr; }
  .titleblock > * { border-bottom: 0; border-right: 1px solid var(--line-dark); }
  .titleblock > *:nth-child(2n) { border-right: 1px solid var(--line-dark); }
  .titleblock > *:last-child { border-right: 0; }
}
.foot__base { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: center; justify-content: space-between; margin-top: var(--s-5); font-size: 14px; color: var(--muted-on-dark); }
.foot__base p { max-width: 64ch; }
.motion-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--r-2); background: transparent; color: var(--fg); font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.motion-btn::before { content: ''; width: 8px; height: 8px; border: 1px solid currentColor; }
.motion-btn[aria-pressed='true']::before { background: var(--accent); border-color: var(--accent); }
.motion-btn:hover { background: var(--raise); }

/* 6.22 Figure viewer (native dialog) */
.viewer { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--dark); color: var(--on-dark); opacity: 0; transition: opacity var(--dur-3) linear, overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete; }
.viewer[open] { opacity: 1; display: grid; grid-template-rows: 1fr auto; }
@starting-style { .viewer[open] { opacity: 0; } }
.viewer::backdrop { background: var(--dark); }
.viewer__stage { position: relative; overflow: hidden; display: grid; place-items: center; padding: var(--s-5); touch-action: pinch-zoom; }
.viewer__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform-origin: center; transition: transform var(--dur-2) var(--ease-out); cursor: grab; user-select: none; -webkit-user-drag: none; }
.viewer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--margin) var(--s-4); border-top: 1px solid var(--line-dark); }
.viewer__cap { font: 400 var(--fs-caption)/1.5 var(--font-mono); max-width: 72ch; }
.viewer__btns { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.viewer__btns .btn { min-height: 44px; padding: 0 14px; font-size: 15px; }

/* 7. Motion: reduced motion and the site's own Motion switch ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) *, html:not(.motion-on) *::before, html:not(.motion-on) *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
html.motion-off *, html.motion-off *::before, html.motion-off *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
/* cross-page view transitions: a 200ms cross-fade, the header stays put */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-2); }
.site-header { view-transition-name: site-header; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* 8. Forced colours ------------------------------------------------------------------------ */
@media (forced-colors: active) {
  .label::before, .ruler__handoff, .strip__bar i, .focus-frame i { background: Highlight; forced-color-adjust: none; }
  .fig__frame, .prow__thumb, .seen__thumb, .chip, .kind, .tag, .block, .ruler, .lanes { border-color: CanvasText; }
  .btn { border: 2px solid ButtonText; }
}

/* 9. Print: black on white, a clean vendor brief ---------------------------------------- */
@media print {
  :root { --paper: #fff; --bench: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .menu, .skip, .story, .story-bar, .chips, .viewer, .motion-btn, .focus-frame, video, .cta .actions, .foot ul { display: none !important; }
  [data-surface='dark'] { --bg: #fff; --fg: #000; --fg-muted: #444; --rule: #bbb; background: #fff !important; color: #000 !important; }
  .site-footer { background: #fff; padding: 12pt 0; }
  .logo__dark { display: none !important; } .logo__light { display: block !important; }
  .section { padding-block: 18pt; }
  .prow, .card, .srow, figure { break-inside: avoid; }
  a[href^='/']:not(.btn):not(.card__title a)::after { content: ' (' attr(href) ')'; font-family: var(--font-mono); font-size: 8pt; }
}
