/* site/css/map.css — "The Map"
 * Liri's work drawn as a transit network. Light only, candy colours, and it moves.
 * Type: Archivo (signage grotesk; its width axis sets station names semi-condensed, like signage)
 *       + Newsreader (a calm reading serif for case studies and long text).
 * Colour: five candy lines. Each line has three tones with fixed jobs:
 *   fill  = the line itself, bullets, active filters      (ink text on it passes AA)
 *   edge  = the casing of the line, numbers, small accents (passes AA as text on paper)
 *   tint  = big generous areas: zones, panels, headers
 * The line's pattern (plain, dots, centre rule, dashes, double) is the second cue next to hue.
 */

:root {
  color-scheme: light;

  --paper: #fffaf2;
  --paper-2: #f6efe3;
  --white: #ffffff;
  --ink: #1d1b2b;          /* 16.9:1 on paper */
  --ink-2: #464358;        /* 9.3:1 */
  --ink-3: #625f72;        /* 6.0:1 */
  --rule: #e4dccd;

  /*        fill            edge (deep)        tint (areas)  */
  --n: #74b3ff;   --n-d: #1d4e9e;   --n-t: #ddeeff;   /* N  · NICE enterprise      · sky        */
  --ai: #ff85c2;  --ai-d: #a3195e;  --ai-t: #ffe1f0;  /* AI · AI-native tooling    · bubblegum  */
  --c: #5fd9a0;   --c-d: #0b6e45;   --c-t: #d8f7e7;   /* C  · Cloud & DevOps       · mint       */
  --am: #ffa45c;  --am-d: #a4470a;  --am-t: #ffe7d3;  /* AM · Audio, ML & crypto   · tangerine  */
  --p: #ffd84d;   --p-d: #7a5c00;   --p-t: #fff4c4;   /* P  · Public impact        · lemon      */

  --accent: var(--ink); --accent-d: var(--ink); --accent-t: var(--paper-2);

  --f-sign: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-read: "Newsreader", Georgia, "Times New Roman", serif;

  --t-xs: 0.75rem; --t-s: 0.875rem; --t-m: 1rem; --t-l: 1.25rem; --t-xl: 1.5625rem; --t-2xl: 2.4414rem; --t-3xl: 3.8147rem;
  --gutter: 40px;
  --max: 1360px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-sign); font-size: 17px; line-height: 1.45; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

[data-line="N"]  { --b: var(--n);  --bd: var(--n-d);  --bt: var(--n-t); }
[data-line="AI"] { --b: var(--ai); --bd: var(--ai-d); --bt: var(--ai-t); }
[data-line="C"]  { --b: var(--c);  --bd: var(--c-d);  --bt: var(--c-t); }
[data-line="AM"] { --b: var(--am); --bd: var(--am-d); --bt: var(--am-t); }
[data-line="P"]  { --b: var(--p);  --bd: var(--p-d);  --bt: var(--p-t); }

/* ------------------------------------------------------------ page transition: the five line colours pass like a train */
.wipe { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: none; }
.motion .wipe { display: grid; grid-template-rows: repeat(5, 1fr); }
.wipe i { display: block; transform: translateX(-101%); }
.wipe i:nth-child(1) { background: var(--n); }
.wipe i:nth-child(2) { background: var(--ai); }
.wipe i:nth-child(3) { background: var(--c); }
.wipe i:nth-child(4) { background: var(--am); }
.wipe i:nth-child(5) { background: var(--p); }
.motion .wipe.arrive i { transform: translateX(0); animation: wipe-out 0.35s var(--ease) forwards; }
.motion .wipe.leave i { animation: wipe-in 0.2s var(--ease) forwards; }
.wipe i:nth-child(2) { animation-delay: 0.025s !important; }
.wipe i:nth-child(3) { animation-delay: 0.05s !important; }
.wipe i:nth-child(4) { animation-delay: 0.075s !important; }
.wipe i:nth-child(5) { animation-delay: 0.1s !important; }
@keyframes wipe-out { from { transform: translateX(0); } to { transform: translateX(101%); } }
@keyframes wipe-in { from { transform: translateX(-101%); } to { transform: translateX(0); } }

/* scroll reveal */
.motion [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.6s var(--ease), transform 0.75s var(--ease); transition-delay: var(--rd, 0s); }
.motion [data-reveal].in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ header */
.site-head { border-bottom: 2px solid var(--ink); background: var(--paper); position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -0.01em; }
.wordmark .ticks { display: inline-flex; gap: 3px; }
.wordmark .ticks i { width: 7px; height: 20px; border-radius: 4px; border: 2px solid; display: block; transition: transform 0.4s var(--spring); }
.wordmark:hover .ticks i { transform: translateY(-5px); }
.wordmark:hover .ticks i:nth-child(2) { transition-delay: .04s; } .wordmark:hover .ticks i:nth-child(3) { transition-delay: .08s; }
.wordmark:hover .ticks i:nth-child(4) { transition-delay: .12s; } .wordmark:hover .ticks i:nth-child(5) { transition-delay: .16s; }
.site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.site-nav a { position: relative; display: block; text-decoration: none; padding: 8px 14px; font-size: 15px; font-weight: 650; border-radius: 999px; color: var(--ink-2); border: 2px solid transparent; transition: background 0.2s, color 0.2s, transform 0.3s var(--spring); }
.site-nav a:hover { color: var(--ink); background: var(--bt); transform: translateY(-2px); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--b); border-color: var(--ink); }

/* ------------------------------------------------------------ bullets */
.bullet {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 750 12px/1 var(--f-sign); font-variation-settings: "wdth" 88;
  color: var(--ink); background: var(--b); border: 2px solid var(--ink); flex: none;
  transition: transform 0.35s var(--spring);
}
.bullet:hover { transform: rotate(-14deg) scale(1.2); }
.bullet.sm { width: 21px; height: 21px; font-size: 10px; border-width: 1.5px; }
.bullet.lg { width: 44px; height: 44px; font-size: 16px; border-width: 2.5px; }
.bullets { display: inline-flex; gap: 4px; align-items: center; }

.ph { background: repeating-linear-gradient(135deg, var(--p) 0 6px, var(--p-t) 6px 12px); color: var(--ink); padding: 0 4px; border-radius: 3px; font-style: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ------------------------------------------------------------ portrait (path set once in js/site.js) */
.portrait { margin: 0; position: relative; }
.portrait .frame { position: relative; aspect-ratio: 4 / 5; width: 100%; background: var(--p); border: 2.5px solid var(--ink); border-radius: 6px; overflow: hidden; transition: transform 0.25s var(--ease); box-shadow: 9px 9px 0 var(--ai); }
.portrait .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
/* empty state until the photo exists: a station roundel with the initials, no label box */
.portrait .roundel { position: absolute; inset: 0; display: grid; place-items: center; }
.portrait .roundel svg { width: 78%; height: auto; }
.portrait .pin { position: absolute; top: -15px; left: -14px; z-index: 2; background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 12px 6px 8px; font: 750 12px/1 var(--f-sign); letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; transform: rotate(-5deg); }
.portrait .pin i { width: 12px; height: 12px; border-radius: 50%; background: var(--ai); border: 2px solid var(--ink); }
.motion .portrait .pin i { animation: ping 1.6s var(--ease) infinite; }
@keyframes ping { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.45); } }

/* ------------------------------------------------------------ HOME */
.home { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; padding-top: 26px; padding-bottom: 40px; align-items: start; }
.home-intro .kicker { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; margin: 0 0 8px; }
.home-intro h1 { font-size: 64px; line-height: 0.9; margin: 0 0 16px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.03em; }
.home-intro h1 .hl { background: linear-gradient(var(--p), var(--p)) 0 86% / 100% 0.3em no-repeat; }
.home-intro p.lede { font-family: var(--f-read); font-size: 17.5px; line-height: 1.4; margin: 0 0 30px; max-width: 34ch; }
.home-intro .portrait { width: 196px; margin: 0 0 26px 14px; }
.routes { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.routes a { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 8px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 750; font-size: 15.5px; overflow: hidden; background: var(--white); isolation: isolate; transition: transform 0.3s var(--spring); }
.routes a::before { content: ""; position: absolute; inset: 0; background: var(--b); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease); z-index: -1; }
.routes a:hover { transform: translateX(4px); }
.routes a:hover::before, .routes a:focus-visible::before { transform: scaleX(1); }
.routes a .arr { margin-left: auto; transition: transform 0.35s var(--spring); }
.routes a:hover .arr { transform: translateX(6px); }

.map-col { min-width: 0; }
.map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 4px; }
.map-head h2 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 750; margin: 0; }
.map-head p { margin: 0; font-size: 14px; color: var(--ink-2); }
.map-head p b { color: var(--ink); }
.map-wrap { position: relative; container-type: inline-size; }
svg.netmap { width: 100%; height: auto; display: block; overflow: visible; }
svg.netmap text { font-family: var(--f-sign); fill: var(--ink); }
svg.netmap .st-name { font-size: 16.5px; font-weight: 750; font-variation-settings: "wdth" 86; }
svg.netmap .st-desc { font-size: 14px; font-weight: 450; fill: var(--ink-2); font-variation-settings: "wdth" 90; }
svg.netmap .st-minor { font-size: 13.5px; font-weight: 650; fill: var(--ink-2); font-variation-settings: "wdth" 88; }
svg.netmap .zone-label { font-size: 13px; letter-spacing: 0.12em; font-weight: 750; fill: var(--ink-2); }
svg.netmap .station, svg.netmap .minor { cursor: pointer; outline: none; }
svg.netmap .station.planned { cursor: default; }
svg.netmap .station .mkg { transform-box: fill-box; transform-origin: center; }
svg.netmap .station:focus-visible .mk, svg.netmap .station:hover .mk { stroke-width: 3.5; }
svg.netmap .station:not(.planned):hover .st-name { text-decoration: underline; text-underline-offset: 3px; }
svg.netmap .hit { fill: transparent; }
/* keyboard focus: an ink ring on a lemon ground around the whole station */
svg.netmap .ring { fill: none; stroke: transparent; stroke-width: 3; pointer-events: none; }
svg.netmap .station:focus-visible .ring, svg.netmap .minor:focus-visible .ring { stroke: var(--ink); }
svg.netmap .station:focus-visible .hit, svg.netmap .minor:focus-visible .hit { fill: var(--p-t); }
svg.netmap .tip { opacity: 0; transition: opacity 0.2s; pointer-events: none; }
svg.netmap .tip-t { font-size: 12.5px; font-weight: 750; letter-spacing: 0.02em; }
svg.netmap .planned:hover .tip { opacity: 1; }
svg.netmap .line, svg.netmap .station, svg.netmap .minor, svg.netmap .train { transition: opacity 0.25s; }
svg.netmap.hl .line:not(.on), svg.netmap.hl .station:not(.on), svg.netmap.hl .minor:not(.on), svg.netmap.hl .train:not(.on) { opacity: 0.12; }
svg.netmap .line { cursor: pointer; }
svg.netmap .lrow { cursor: default; }
svg.netmap .lrow:hover text { text-decoration: underline; }
svg.netmap .grid-dots { will-change: transform; }
.motion svg.netmap .mkg.ping-once { animation: ping 0.9s var(--ease) 2; }

/* the info card pops up just above the station you point at (below it near the top edge), with a
 * pointer aimed at the station; it glides from station to station and never leaves the map */
.map-info { position: absolute; left: 0; top: 0; width: 40%; z-index: 3; display: grid; grid-template-columns: 8.4cqw 1fr; gap: 1cqw; background: var(--white); border: 2px solid var(--ink); border-radius: 1.2cqw; padding: 0.9cqw; box-shadow: 0.6cqw 0.6cqw 0 var(--info, var(--n)); pointer-events: none; transition: box-shadow 0.3s var(--ease); }
.motion .map-info.placed { transition: left 0.45s var(--spring), top 0.45s var(--spring), box-shadow 0.3s var(--ease); }
.map-info > * { min-width: 0; }
.map-info .th { pointer-events: auto; }
.map-info::after { content: ""; position: absolute; left: var(--caret, 50%); bottom: -9px; width: 14px; height: 14px; margin-left: -7px; background: var(--white); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.map-info.below::after { bottom: auto; top: -9px; transform: rotate(225deg); }
.map-info .th { display: block; padding: 0; aspect-ratio: 4 / 3; border-radius: 0.7cqw; border: 1.5px solid var(--ink); overflow: hidden; background: var(--info-t, var(--n-t)); cursor: zoom-in; }
.map-info .th img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.map-info h3 { margin: 0 0 0.3cqw; font-size: 1.75cqw; line-height: 1.15; font-variation-settings: "wdth" 86; display: flex; align-items: center; gap: 0.6cqw; flex-wrap: wrap; }
.map-info h3 .bullet.sm { width: 1.9cqw; height: 1.9cqw; font-size: 0.9cqw; }
.map-info p { margin: 0 0 0.3cqw; color: var(--ink-2); line-height: 1.32; font-size: 1.3cqw; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-info .meta { font-size: 1.25cqw; color: var(--ink-2); font-weight: 750; }
.motion .map-info.swap { animation: nudge 0.4s var(--spring); }
@keyframes nudge { from { transform: translateY(8px) scale(0.97); opacity: 0.4; } to { transform: none; opacity: 1; } }
.map-info.below.swap { animation-name: nudge-down; }
@keyframes nudge-down { from { transform: translateY(-8px) scale(0.97); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------ strip diagram (mobile map + work overview) */
.strip { list-style: none; margin: 0; padding: 0; position: relative; }
.strip > li { position: relative; display: grid; grid-template-columns: var(--tw) 1fr; min-height: 66px; }
.strip .tracks { position: relative; }
.strip .seg { position: absolute; width: 12px; border-left: 2px solid var(--bd); border-right: 2px solid var(--bd); background: var(--b); transform-origin: top; }
.strip .seg[data-line="AI"] { background: radial-gradient(circle, var(--ai-d) 1.2px, transparent 1.7px) 50% 0 / 8px 7px repeat-y, var(--ai); }
.strip .seg[data-line="C"]  { background: linear-gradient(var(--c-d), var(--c-d)) 50% 0 / 1.5px 100% no-repeat, var(--c); }
.strip .seg[data-line="AM"] { background: repeating-linear-gradient(to bottom, #fff 0 5px, transparent 5px 10px) 50% 0 / 2px 100% no-repeat, var(--am); }
.strip .seg[data-line="P"]  { background: linear-gradient(var(--paper), var(--paper)) 50% 0 / 2.5px 100% no-repeat, var(--p); }
.strip .seg.planned { background: repeating-linear-gradient(to bottom, var(--ink-3) 0 6px, transparent 6px 11px) 50% 0 / 2px 100% no-repeat; border: 0; }
.strip .dot { position: absolute; height: 16px; border-radius: 8px; background: var(--white); border: 2.5px solid var(--ink); top: 15px; z-index: 2; transition: background 0.3s, transform 0.45s var(--spring); }
.strip .dot.clear { background: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, #fff 1.5px 4px); }
.strip .dot.planned { border-style: dashed; }
.strip li.passed .dot:not(.clear) { background: var(--p); }
.strip .runner { position: absolute; left: 0; top: 0; z-index: 3; width: 20px; height: 34px; border-radius: 9px; background: var(--white); border: 2.5px solid var(--ink); pointer-events: none; will-change: transform; display: none; }
.strip .runner::before, .strip .runner::after { content: ""; position: absolute; left: 3px; right: 3px; height: 7px; border-radius: 2px; background: var(--ai); }
.strip .runner::before { top: 4px; } .strip .runner::after { bottom: 4px; background: var(--n); }
.motion .strip .runner { display: block; }
.strip .body { padding: 10px 0 20px 14px; }
.strip .body a, .strip .body .nm { font-weight: 750; font-size: 18px; text-decoration: none; font-variation-settings: "wdth" 86; }
.strip .body a { background: linear-gradient(var(--p), var(--p)) 0 100% / 100% 0.32em no-repeat; transition: background-size 0.3s var(--ease); }
.strip .body a:hover { background-size: 100% 100%; }
.strip .body .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.strip .body .desc { color: var(--ink-2); font-size: 14px; margin-top: 1px; }
.strip .body .card { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: start; }
.strip .body .card.noimg { grid-template-columns: minmax(0, 1fr); }
.strip .body .one { font-family: var(--f-read); font-size: 17px; line-height: 1.45; margin: 6px 0 6px; max-width: 58ch; }
.strip .body .meta { font-size: 12.5px; color: var(--ink-3); }
.strip .body .meta a { font-size: 12.5px; }
.strip .thumb { margin-top: 8px; aspect-ratio: 4 / 3; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; transform: rotate(var(--tilt, 1.5deg)); transition: transform 0.4s var(--spring); background: var(--white); }
.strip .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.strip li:hover .thumb { transform: rotate(0) scale(1.06); }
.strip .zone-row { min-height: 54px; }
.strip .zone-row .body { padding-top: 15px; }
.strip .zone-row .body b { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--paper); padding: 0 8px 0 0; position: relative; z-index: 1; }
.strip .zone-row::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--ink-3); opacity: 0.4; }
.strip li:target .body { background: var(--p-t); border-radius: 10px; }
.motion .strip.armed .seg { transform: scaleY(0); transition: transform 0.6s var(--ease); }
.motion .strip.armed li.in .seg { transform: none; }
.motion .strip.armed .dot { transform: scale(0); }
.motion .strip.armed li.in .dot { transform: scale(1); transition-delay: 0.25s; }
.motion .strip.armed .body { opacity: 0; transform: translateX(18px); transition: opacity 0.5s var(--ease) 0.15s, transform 0.6s var(--ease) 0.15s; }
.motion .strip.armed li.in .body { opacity: 1; transform: none; }

.mobile-map { display: none; }

/* ------------------------------------------------------------ page heads */
.page-head { padding: 54px 0 40px; position: relative; }
.page-head .kicker { font-family: var(--f-sign); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); font-weight: 750; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.page-head h1 { font-size: 80px; line-height: 0.92; margin: 0 0 18px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.03em; max-width: 14ch; }
.page-head h1 .hl { background: linear-gradient(var(--hl, var(--p)), var(--hl, var(--p))) 0 86% / 100% 0.3em no-repeat; }
.page-head p { font-family: var(--f-read); font-size: 21px; line-height: 1.45; max-width: 56ch; margin: 0; color: var(--ink-2); }
.page-head .deco { position: absolute; right: 0; top: 30px; width: 420px; height: 210px; pointer-events: none; }
.headband { background: var(--bt); border-bottom: 2px solid var(--ink); margin-bottom: 40px; overflow: hidden; }

/* ------------------------------------------------------------ WORK overview */
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-bottom: 80px; align-items: start; }
.zone { border: 2.5px solid var(--ink); border-radius: 22px; padding: 24px 26px 6px; background: var(--white); position: relative; overflow: hidden; box-shadow: 8px 8px 0 var(--zs, var(--n)); }
.zone-top { margin: -24px -26px 28px; padding: 24px 26px 20px; background: var(--zt); border-bottom: 2.5px solid var(--ink); }
.zone > * { position: relative; }
.zone h2 { font-size: 38px; margin: 0 0 6px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.02em; }
.zone .lead { color: var(--ink); margin: 0; font-size: 15px; max-width: 52ch; }
.zone .ztag { display: inline-block; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 750; margin-bottom: 10px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 11px; }

/* ------------------------------------------------------------ PROJECTS */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.filters button { font: 700 14.5px/1 var(--f-sign); display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px 6px 6px; border: 2px solid var(--ink); background: var(--white); border-radius: 999px; cursor: pointer; color: var(--ink); transition: transform 0.3s var(--spring), background 0.2s, box-shadow 0.2s; }
.filters button.all { padding: 9px 16px; }
.filters button:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 4px 0 var(--ink); }
.filters button:active { transform: translateY(1px); box-shadow: none; }
.filters button[aria-pressed="true"] { background: var(--b, var(--p)); box-shadow: 3px 3px 0 var(--ink); }
.timetable { width: 100%; border-collapse: collapse; }
.timetable th { text-align: left; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); font-weight: 750; padding: 8px 12px 8px 0; border-bottom: 2.5px solid var(--ink); }
.timetable td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.timetable tbody tr { transition: background 0.2s; }
.timetable tbody tr:hover { background: var(--white); }
.timetable td.l { width: 104px; padding-left: 6px; }
.timetable td.n { width: 240px; font-weight: 750; font-variation-settings: "wdth" 86; font-size: 17px; }
.timetable td.n small { display: block; font-weight: 450; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.timetable td.n a { background: linear-gradient(var(--p), var(--p)) 0 100% / 100% 0.32em no-repeat; text-decoration: none; }
.timetable td.o { font-family: var(--f-read); font-size: 17px; line-height: 1.4; max-width: 62ch; }
.timetable td.p { width: 150px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timetable td.s { width: 110px; }
.status { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 750; color: var(--ink-2); }
.timetable tr[hidden] { display: none; }
.motion .timetable tr.enter { animation: rowin 0.5s var(--ease) both; animation-delay: var(--rd, 0s); }
@keyframes rowin { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.more-line { font-family: var(--f-read); font-style: italic; font-size: 22px; color: var(--ink-2); margin: 30px 0 90px; display: flex; align-items: center; gap: 16px; }
.more-line::before { content: ""; width: 72px; height: 12px; flex: none; background: repeating-linear-gradient(90deg, var(--ink-3) 0 8px, transparent 8px 14px) 50% 50% / 100% 3px no-repeat; }

/* ------------------------------------------------------------ ABOUT */
.about { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-bottom: 64px; }
.about-rail { position: sticky; top: 24px; align-self: start; --accent: var(--c); --accent-d: var(--c-d); }
.about-sec { padding: 0 0 64px; scroll-margin-top: 24px; }
.about-sec > h2 { font-size: 40px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.02em; margin: 0 0 20px; display: flex; align-items: center; gap: 12px; }
.now { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 48px; align-items: start; }
.prose { font-family: var(--f-read); font-size: 19.5px; line-height: 1.6; max-width: 64ch; }
.prose p { margin: 0 0 1em; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.principle { border: 2.5px solid var(--ink); border-radius: 18px; padding: 18px 18px 18px; background: var(--bt); transition: transform 0.4s var(--spring), box-shadow 0.3s; }
.principle:nth-child(odd) { transform: rotate(-0.6deg); } .principle:nth-child(even) { transform: rotate(0.5deg); }
.principle:hover { transform: translateY(-6px) rotate(-1.4deg); box-shadow: 6px 7px 0 var(--ink); }
.principle h3 { font-size: 19px; margin: 12px 0 6px; font-variation-settings: "wdth" 86; line-height: 1.15; }
.principle p { margin: 0; font-family: var(--f-read); font-size: 16.5px; line-height: 1.45; }
.teach ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.teach li { display: flex; gap: 14px; align-items: flex-start; font-family: var(--f-read); font-size: 18.5px; line-height: 1.45; }
.teach li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; background: var(--c); border: 2.5px solid var(--ink); }
.toolbox { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; font-size: 14.5px; }
.toolbox h3 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 8px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; font-size: 13.5px; font-weight: 600; background: var(--white); transition: background 0.2s, transform 0.3s var(--spring); }
.chips span:hover { background: var(--bt); transform: translateY(-3px) rotate(-3deg); }
.contact-card { border: 2.5px solid var(--ink); border-radius: 22px; padding: 30px; background: var(--c-t); box-shadow: 9px 9px 0 var(--c); max-width: 820px; position: relative; overflow: hidden; }
.contact-card h2 { margin: 0 0 6px; font-size: 40px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.02em; }
.contact-card p { margin: 0; font-family: var(--f-read); font-size: 19.5px; color: var(--ink-2); max-width: 46ch; }
.contact-card .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: 750 15.5px/1 var(--f-sign); padding: 13px 18px; border: 2.5px solid var(--ink); color: var(--ink); text-decoration: none; background: var(--white); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink); transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--n); }

/* rail (about) and toc (case): a line with stops that fills as you scroll */
.rail .tl { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); font-weight: 750; margin: 0 0 12px; }
.rail ol { list-style: none; margin: 0; padding: 0; position: relative; }
.rail ol::before, .rail ol::after { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 12px; border-radius: 6px; }
.rail ol::before { background: var(--paper-2); border: 2px solid var(--rule); }
.rail ol::after { background: var(--accent); border: 2px solid var(--accent-d); transform-origin: top; transform: scaleY(1); }
.motion .rail ol::after { transform: scaleY(var(--prog, 0)); }
.rail li { position: relative; padding: 6px 0 6px 34px; z-index: 1; }
.rail li::before { content: ""; position: absolute; left: 3px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--ink); transition: transform 0.35s var(--spring), background 0.25s; }
.rail li.on::before { background: var(--p); transform: scale(1.35); }
.rail a { text-decoration: none; font-size: 14.5px; font-weight: 650; color: var(--ink-2); }
.rail a:hover, .rail li.on a { color: var(--ink); font-weight: 750; }

/* ------------------------------------------------------------ footer: the terminus */
.site-foot { border-top: 2.5px solid var(--ink); padding: 28px 0 42px; font-size: 14px; color: var(--ink-2); position: relative; overflow: hidden; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-foot a { font-weight: 750; color: var(--ink); }
.site-foot .end { display: flex; align-items: center; gap: 12px; }
.site-foot .buffer { width: 12px; height: 26px; border: 2.5px solid var(--ink); border-radius: 3px; background: var(--am); flex: none; }
.site-foot .loco { position: absolute; top: -10px; left: 0; width: 64px; height: 18px; border-radius: 9px; background: var(--white); border: 2.5px solid var(--ink); display: none; }
.site-foot .loco::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3.5px; height: 6px; border-radius: 2px; background: linear-gradient(90deg, var(--n) 0 20%, var(--ai) 20% 40%, var(--c) 40% 60%, var(--am) 60% 80%, var(--p) 80%); }
.motion .site-foot .loco { display: block; transform: translateX(-90px); }
.motion .site-foot.in .loco { animation: arrive 2.4s var(--ease) forwards; }
@keyframes arrive { to { transform: translateX(calc(100vw - 150px)); } }

/* ------------------------------------------------------------ CASE STUDY */
.case { --accent: var(--ai); --accent-d: var(--ai-d); --accent-t: var(--ai-t); }
.case-band { background: var(--accent-t); border-bottom: 2.5px solid var(--ink); position: relative; overflow: hidden; }
.case-band .deco { position: absolute; right: -40px; top: 0; height: 100%; width: 560px; pointer-events: none; }
.case-head { padding: 30px var(--gutter) 36px; position: relative; max-width: var(--max); margin: 0 auto; }
.case-head .crumbs { font-size: 13.5px; color: var(--ink-2); margin: 0 0 30px; }
.case-head .crumbs a { color: var(--ink); font-weight: 700; }
.case-head .sign { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.case-head h1 { font-size: 124px; line-height: 0.86; margin: 0; font-weight: 850; font-variation-settings: "wdth" 82; letter-spacing: -0.04em; }
.case-head .title { font-family: var(--f-read); font-size: 28px; line-height: 1.28; margin: 18px 0 32px; max-width: 34ch; }
.facts { display: grid; grid-template-columns: 170px 1.4fr 1fr 1fr; gap: 0 28px; margin: 0; max-width: 1060px; }
.facts div { border-top: 2.5px solid var(--ink); padding-top: 8px; }
.facts dt { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); font-weight: 750; margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.45; }
.progress-line { position: sticky; top: 0; z-index: 4; height: 20px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.progress-line .rail-line { position: absolute; left: 0; right: 0; top: 5px; height: 10px; background: var(--accent); border-top: 2px solid var(--accent-d); border-bottom: 2px solid var(--accent-d); transform-origin: left; transform: scaleX(1); }
.motion .progress-line .rail-line { transform: scaleX(var(--prog, 0)); }
.progress-line .tram { position: absolute; top: 1px; left: 0; width: 40px; height: 18px; border-radius: 9px; background: var(--white); border: 2.5px solid var(--ink); display: none; will-change: transform; }
.progress-line .tram::after { content: ""; position: absolute; left: 5px; right: 5px; top: 3.5px; height: 6px; border-radius: 2px; background: var(--accent); }
.motion .progress-line .tram { display: block; }

.case-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-top: 48px; }
.case-toc { position: sticky; top: 44px; align-self: start; }
.case-main section { padding: 0 0 64px; scroll-margin-top: 34px; }
.case-main h2 { font-size: 34px; margin: 0 0 18px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.015em; display: flex; align-items: center; gap: 12px; }
.case-main h2 .no { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 13.5px; font-weight: 800; background: var(--accent); border: 2.5px solid var(--ink); flex: none; }
.case-main .prose { font-size: 19.5px; }
.case-main .prose ul { list-style: none; padding: 0; }
.case-main .prose ul li { position: relative; padding-left: 26px; margin-bottom: 0.55em; }
.case-main .prose ul li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--ink); }
.case-main .prose ol.hard { list-style: none; padding: 0; counter-reset: h; display: grid; gap: 14px; }
.case-main .prose ol.hard li { counter-increment: h; display: grid; grid-template-columns: 56px 1fr; padding: 16px 18px 16px 14px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 16px; transition: transform 0.35s var(--spring), box-shadow 0.3s; }
.case-main .prose ol.hard li:hover { transform: translateX(8px) rotate(-0.4deg); box-shadow: -8px 0 0 var(--accent); }
.case-main .prose ol.hard li::before { content: counter(h, decimal-leading-zero); font: 850 24px/1.1 var(--f-sign); color: var(--accent-d); }
.note-call { position: relative; font-family: var(--f-read); font-style: italic; font-size: 23px; line-height: 1.42; max-width: 50ch; margin: 0 0 56px; padding: 22px 26px; background: var(--p-t); border: 2.5px solid var(--ink); border-radius: 18px; transform: rotate(-0.8deg); box-shadow: 7px 7px 0 var(--p); }

.result { width: 100%; max-width: 900px; border-collapse: collapse; }
.result td { border-bottom: 1px solid var(--rule); padding: 15px 16px 15px 0; vertical-align: baseline; }
.result td.v { font: 850 40px/1.05 var(--f-sign); font-variation-settings: "wdth" 82; white-space: nowrap; width: 1%; padding-right: 30px; font-variant-numeric: tabular-nums; }
.result td.v .hl { background: linear-gradient(var(--accent), var(--accent)) 0 88% / 100% 0.34em no-repeat; }
.result td.lbl { font-family: var(--f-read); font-size: 19px; color: var(--ink-2); }
.stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; max-width: 900px; }
.stack h3 { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }

.gallery { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; margin-top: 4px; }
.gallery .tall { grid-row: span 2; }
.shot { margin: 0; }
.shot .pic { border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; transition: transform 0.45s var(--spring), box-shadow 0.3s; transform: rotate(var(--tilt, 0deg)); }
.shot:hover .pic { transform: rotate(0) translateY(-4px); box-shadow: 0 8px 0 var(--ink); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; }
.shot.tall img { aspect-ratio: 10 / 11; }
.shot figcaption { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; max-width: 70ch; }

.diagram { border: 2.5px solid var(--ink); border-radius: 22px; padding: 20px 22px 14px; background: var(--white); box-shadow: 9px 9px 0 var(--accent); }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.diagram svg text { font-family: var(--f-sign); fill: var(--ink); }
.diagram .dn { font-size: 14.5px; font-weight: 750; font-variation-settings: "wdth" 86; }
.diagram .ds { font-size: 12px; fill: var(--ink-3); font-variation-settings: "wdth" 92; }
.diagram .svc { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.diagram .dst { cursor: pointer; }
.diagram .dst .mkg { transition: transform 0.35s var(--spring); transform-box: fill-box; transform-origin: center; }
.diagram .dst:hover .mkg, .diagram .dst.on .mkg { transform: scale(1.35); }
.diagram .dst:focus { outline: none; }
.diagram .dst:focus-visible .dn, .diagram .dst.on .dn { text-decoration: underline; text-underline-offset: 3px; }
.diagram .readout { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; border-top: 2px solid var(--ink); margin-top: 12px; padding-top: 12px; min-height: 66px; }
.diagram .readout p { margin: 0; font-family: var(--f-read); font-size: 18px; line-height: 1.45; max-width: 70ch; }
.diagram .readout b { font-family: var(--f-sign); }
.diagram .key { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); justify-content: flex-end; }
.diagram .key span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

.next-stop { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 0 72px; }
.next-stop a { text-decoration: none; border: 2.5px solid var(--ink); border-radius: 18px; padding: 20px 22px; background: var(--white); transition: transform 0.35s var(--spring), box-shadow 0.3s; }
.next-stop a:hover { transform: translateY(-5px) rotate(-0.5deg); box-shadow: 0 7px 0 var(--ink); }
.next-stop a.nx { background: var(--c-t); text-align: right; }
.next-stop small { display: block; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); font-weight: 750; margin-bottom: 4px; }
.next-stop b { font-size: 28px; font-weight: 850; font-variation-settings: "wdth" 84; }

.train { pointer-events: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .home { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .desktop-map { display: none; }
  .mobile-map { display: block; }
  .site-head .wrap { height: auto; padding-top: 12px; padding-bottom: 10px; flex-wrap: wrap; gap: 8px; }
  .home { padding-top: 20px; grid-template-columns: minmax(0, 1fr) 128px; gap: 0 16px; }
  .home-intro, .home-intro > div { display: contents; }
  .home-intro .kicker { grid-column: 1 / -1; margin-bottom: 14px; }
  .home-intro h1 { font-size: 56px; grid-column: 1; grid-row: 2; align-self: center; margin: 0; }
  .home-intro .portrait { width: 118px; grid-column: 2; grid-row: 2; margin: 8px 0 20px 6px; }
  .home-intro .portrait .frame { box-shadow: 5px 5px 0 var(--ai); }
  .home-intro .portrait .pin { font-size: 9.5px; padding: 4px 8px 4px 6px; top: -12px; left: -16px; }
  .home-intro p.lede { grid-column: 1 / -1; max-width: none; margin-bottom: 20px; }
  .routes { grid-column: 1 / -1; margin-bottom: 26px; }
  .map-col { grid-column: 1 / -1; }
  .site-nav a { padding: 6px 11px; font-size: 14px; }
  .strip .body .card { grid-template-columns: 1fr; }
  .strip .thumb { max-width: 260px; }
  .zones { grid-template-columns: 1fr; gap: 26px; }
  .zone-top { margin: -22px -14px 24px; padding: 22px 14px 18px; }
  .zone { padding: 22px 14px 4px; box-shadow: 6px 6px 0 var(--zs, var(--n)); }
  .page-head { padding-top: 32px; }
  .page-head h1 { font-size: 50px; }
  .page-head p { font-size: 18px; }
  .page-head .deco { display: none; }
  .timetable thead { display: none; }
  .timetable tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .timetable td { border: 0; padding: 0; width: auto !important; }
  .timetable td.l { grid-row: 1 / span 4; }
  .about { grid-template-columns: 1fr; gap: 0; }
  .about-rail { display: none; }
  .now { grid-template-columns: 1fr; gap: 24px; }
  .now .portrait { max-width: 180px; order: -1; margin-left: 14px; }
  .principles { grid-template-columns: 1fr; }
  .toolbox { grid-template-columns: 1fr; }
  .case-head { padding: 22px 16px 28px; }
  .case-head h1 { font-size: 72px; }
  .case-head .title { font-size: 21px; }
  .case-band .deco { width: 300px; right: -120px; opacity: 0.7; }
  .facts { grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .case-body { grid-template-columns: 1fr; gap: 0; padding-top: 30px; }
  .case-toc { display: none; }
  .case-main h2 { font-size: 28px; }
  .case-main .prose { font-size: 18px; }
  .note-call { font-size: 19.5px; padding: 16px 18px; }
  .result td.v { font-size: 25px; padding-right: 14px; white-space: normal; }
  .stack { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .tall { grid-row: auto; }
  .diagram { padding: 14px 10px 12px; box-shadow: 6px 6px 0 var(--accent); }
  .diagram .readout { grid-template-columns: 1fr; }
  .diagram .key { justify-content: flex-start; }
  .next-stop { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .draw { stroke-dashoffset: 0 !important; }
}

/* ============================================================ added: contact in the header, the viewer, the about line */
.site-head { position: sticky; top: 0; }
.site-head .cta { display: flex; gap: 8px; }
.btn.sm { padding: 8px 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
.btn.sm:hover { box-shadow: 5px 5px 0 var(--ink); }

/* the viewer: a station strip that switches projects in place */
.navline { background: var(--paper); border-bottom: 2px solid var(--ink); padding: 10px 0 4px; }
.nl-top { display: flex; justify-content: space-between; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 750; color: var(--ink-2); margin-bottom: 2px; }
.nl-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; align-items: start; }
.nl-arrow { margin-top: 26px; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); font: 800 18px/1 var(--f-sign); cursor: pointer; color: var(--ink); transition: transform 0.3s var(--spring), background 0.2s; }
.nl-arrow:hover { transform: scale(1.12); background: var(--p); }
.nl-scroll { overflow-x: auto; scrollbar-width: none; }
.nl-scroll::-webkit-scrollbar { display: none; }
.nl-track { position: relative; min-width: 100%; padding-top: 30px; }
.nl-stops { list-style: none; margin: 0; padding: 0; display: flex; }
.nl-stops li { flex: 1 1 0; min-width: 0; position: relative; }
.nl-stops li::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 12px; background: var(--b); border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); }
.nl-stops li:first-child::before { left: 50%; border-left: 0; }
.nl-stops li:last-child::before { right: 50%; }
.nl-stops li.zstart::after { content: attr(data-zone); position: absolute; left: 6px; top: -30px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 750; color: var(--ink-2); white-space: nowrap; }
.nl-stops li.zstart:not(:first-child) { border-left: 2px dashed var(--ink-3); }
.nl-stops a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 10px; text-decoration: none; color: var(--ink-2); }
.nl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); position: relative; z-index: 1; transition: transform 0.4s var(--spring), background 0.25s; }
.nl-dot.clear { background: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, #fff 1.5px 4px); }
.nl-dot.planned { border-style: dashed; }
.nl-name { font-size: 12.5px; font-weight: 650; line-height: 1.2; text-align: center; font-variation-settings: "wdth" 86; max-width: 11ch; }
.nl-stops a:hover .nl-dot { transform: scale(1.3); }
.nl-stops a:hover .nl-name { color: var(--ink); }
.nl-stops a[aria-current] .nl-dot { background: var(--p); transform: scale(1.35); }
.nl-stops a[aria-current] .nl-name { color: var(--ink); font-weight: 800; }
.nl-train { position: absolute; left: 0; top: 14px; z-index: 2; width: 44px; height: 20px; border-radius: 10px; background: var(--white); border: 2.5px solid var(--ink); transition: transform 0.7s var(--spring); pointer-events: none; }
.nl-train::after { content: ""; position: absolute; left: 6px; right: 6px; top: 4px; height: 7px; border-radius: 2px; background: var(--b); transition: background 0.4s; }
.nl-train::before { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -1.5px; width: 3px; height: 7px; background: var(--ink); }

.stage-band { background: var(--bt); border-bottom: 2.5px solid var(--ink); transition: background 0.5s var(--ease); overflow: hidden; }
.pitch { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 52px; align-items: center; padding: 34px 0 22px; min-height: 560px; transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); touch-action: pan-y; }
.pitch.out-l { opacity: 0; transform: translateX(-60px); }
.pitch.out-r { opacity: 0; transform: translateX(60px); }
.pitch.in-l { opacity: 0; transform: translateX(-60px); transition: none; }
.pitch.in-r { opacity: 0; transform: translateX(60px); transition: none; }
.pt-kick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.pt-head { font-size: 46px; line-height: 1.02; margin: 0 0 22px; font-weight: 850; font-variation-settings: "wdth" 84; letter-spacing: -0.025em; max-width: 20ch; }
.pt-lines { margin: 0 0 22px; display: grid; gap: 8px; }
.pt-lines div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.pt-lines dt { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 0; text-align: center; }
.pt-lines div:last-child dt { background: var(--b); }
.pt-lines dd { margin: 0; font-family: var(--f-read); font-size: 18.5px; line-height: 1.4; }
.pt-part { display: block; scroll-margin-top: 90px; }
.pt-part + .pt-part { margin-top: 8px; }
.pt-part b { display: inline-block; font: 800 10.5px/1 var(--f-sign); letter-spacing: 0.1em; text-transform: uppercase; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 9px; margin-right: 8px; vertical-align: 2px; }
.pt-part.hit b { background: var(--b); }
.pt-lines.plain p { margin: 0 0 4px; font-family: var(--f-read); font-size: 20px; line-height: 1.4; }
.pt-lines.plain p.pt-lead { margin: 0 0 12px; font-size: 23.5px; line-height: 1.35; font-weight: 600; font-style: italic; }
.pt-facts { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pt-facts li { background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; transition: transform 0.35s var(--spring); }
.pt-facts li:nth-child(odd) { transform: rotate(-0.8deg); } .pt-facts li:nth-child(even) { transform: rotate(0.7deg); }
.pt-facts li:hover { transform: translateY(-4px) rotate(0); }
.pt-facts b { display: block; font-size: 23px; line-height: 1.05; font-weight: 850; font-variation-settings: "wdth" 82; letter-spacing: -0.01em; }
.pt-facts span { display: block; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); margin-top: 4px; }
.pt-tags span { font-size: 12.5px; padding: 2px 9px; }
.pt-pic { margin: 0; }
.pt-pic .pic { border: 2.5px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--white); box-shadow: 12px 12px 0 var(--b); transform: rotate(1.2deg); transition: transform 0.5s var(--spring), box-shadow 0.4s; }
.pt-pic:hover .pic { transform: rotate(0) scale(1.02); box-shadow: 16px 16px 0 var(--b); }
.pt-pic img { width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; object-position: 50% 0; }
.pt-pic .sign { aspect-ratio: 16 / 10.5; display: grid; place-items: center; background: var(--white); }
.pt-pic .sign svg { width: 70%; }
.pt-pic figcaption { font-size: 13px; color: var(--ink-2); margin-top: 16px; }
.pt-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 0 26px; }
.pt-nav button { text-align: left; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--white); padding: 12px 18px; cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.35s var(--spring), box-shadow 0.3s; }
.pt-nav button:hover { transform: translateY(-4px); box-shadow: 0 6px 0 var(--ink); }
.pt-nav .pt-next { text-align: right; background: var(--p); }
.pt-nav small { display: block; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 750; color: var(--ink-2); }
.pt-nav .lbl { font-size: 22px; font-weight: 850; font-variation-settings: "wdth" 84; }

.how { padding-top: 32px; padding-bottom: 56px; }
.how[hidden] { display: none; }
.how summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 2.5px solid var(--ink); border-radius: 999px; padding: 10px 20px 10px 10px; background: var(--white); font-weight: 800; font-size: 18px; box-shadow: 4px 4px 0 var(--ink); transition: transform 0.3s var(--spring), box-shadow 0.3s; }
.how summary::-webkit-details-marker { display: none; }
.how summary small { font-weight: 450; font-size: 14px; color: var(--ink-2); }
.how summary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.how details[open] summary { margin-bottom: 18px; background: var(--c-t); }
.how-lede { font-family: var(--f-read); font-size: 18.5px; line-height: 1.5; max-width: 70ch; margin: 0 0 20px; }

/* about: how I build, as a line with six stops */
.howline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; position: relative; }
.howline > li { position: relative; padding: 46px 14px 0 0; }
.howline > li::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 14px; background: var(--b); border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); }
.howline > li:first-child::before { border-left: 2.5px solid var(--ink); border-radius: 8px 0 0 8px; }
.howline > li:last-child::before { border-right: 2.5px solid var(--ink); border-radius: 0 8px 8px 0; }
.howline .stop { position: absolute; left: -13px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); z-index: 1; transition: transform 0.4s var(--spring); }
.howline > li:first-child .stop { left: 0; }
.howline > li:hover .stop { transform: scale(1.3); background: var(--p); }
.howline b { font-size: 19px; font-weight: 850; font-variation-settings: "wdth" 86; display: block; margin-bottom: 6px; }
.howline p { margin: 0 0 8px; font-family: var(--f-read); font-size: 15.5px; line-height: 1.42; }
.howline ul { margin: 0; padding: 0; list-style: none; }
.howline ul li { font-size: 13px; color: var(--ink-2); line-height: 1.35; margin-bottom: 4px; padding-left: 12px; position: relative; }
.howline ul li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 6px; height: 6px; border-radius: 50%; background: var(--bd); }

@media (max-width: 900px) {
  .nl-stops li { min-width: 96px; }
  .site-head .cta { order: 2; }
  .site-head .cta .btn.sm { padding: 6px 11px; font-size: 13px; }
  .site-nav { order: 3; width: 100%; }
  .navline { padding-top: 8px; }
  .nl-hint { display: none; }
  .nl-row { grid-template-columns: minmax(0, 1fr); }
  .nl-arrow { display: none; }
  .nl-stops li { min-width: 96px; }
  .pitch { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 16px; min-height: 0; }
  .pt-head { font-size: 33px; }
  .pt-lines div { grid-template-columns: 1fr; gap: 4px; }
  .pt-lines dt { justify-self: start; padding: 3px 10px; }
  .pt-lines dd { font-size: 17.5px; }
  .pt-facts { grid-template-columns: 1fr 1fr; }
  .pt-facts b { font-size: 21px; }
  .pt-pic .pic { box-shadow: 8px 8px 0 var(--b); }
  .pt-nav .lbl { font-size: 17px; }
  .how summary { font-size: 16px; }
  .howline { grid-template-columns: 1fr; }
  .howline > li { padding: 0 0 22px 52px; }
  .howline > li::before { left: 6px; right: auto; top: 0; bottom: 0; width: 14px; height: auto; border: 2.5px solid var(--ink); border-top: 0; border-bottom: 0; border-radius: 0; }
  .howline > li:first-child::before { border-radius: 8px 8px 0 0; border-top: 2.5px solid var(--ink); top: 6px; }
  .howline > li:last-child::before { border-radius: 0 0 8px 8px; border-bottom: 2.5px solid var(--ink); }
  .howline .stop { left: 0; top: 2px; }
}

/* ============================================================ UX pass, Oct 2026: viewer, timetable, lightbox */
html { scroll-padding-top: 110px; }
.hide-s { display: inline; }
.strip .body .soon, .timetable .soon { font: 750 10.5px/1 var(--f-sign); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border: 1.5px dashed var(--ink-3); border-radius: 999px; padding: 3px 8px; }
.strip .thumb { display: block; padding: 0; cursor: zoom-in; width: 100%; font: inherit; }

/* timetable */
.timetable tr:target td { background: var(--p-t); }
.timetable tr.planned td.n { color: var(--ink-2); }
.timetable .pl-dot { display: inline-block; width: 30px; height: 14px; border-radius: 7px; border: 2px dashed var(--ink-3); margin-top: 4px; }

/* viewer additions */
.pt-head:focus { outline: none; }
.pt-head:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.how-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font: 750 14px/1 var(--f-sign); padding: 6px 14px 6px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); cursor: pointer; transition: transform 0.3s var(--spring), box-shadow 0.2s; }
.how-chip:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.pt-pic .pic { display: block; width: 100%; padding: 0; font: inherit; color: inherit; cursor: zoom-in; position: relative; }
.pt-pic .zoom { position: absolute; right: 12px; bottom: 12px; font: 750 12px/1 var(--f-sign); background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 10px; opacity: 0; transition: opacity 0.2s; }
.pt-pic .pic:hover .zoom, .pt-pic .pic:focus-visible .zoom { opacity: 1; }
.pt-gallery { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pt-gallery button { display: block; width: 92px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--white); cursor: zoom-in; box-shadow: 3px 3px 0 var(--b); transition: transform 0.3s var(--spring); }
.pt-gallery button:hover { transform: translateY(-3px) rotate(-1.5deg); }
.pt-gallery img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.how-alt h3 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; }
.how-alt .decisions { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; max-width: 900px; counter-reset: d; }
.how-alt .decisions li { counter-increment: d; display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 12px 16px 12px 12px; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; font-family: var(--f-read); font-size: 17.5px; line-height: 1.45; }
.how-alt .decisions li::before { content: counter(d, decimal-leading-zero); font: 850 20px/1.2 var(--f-sign); color: var(--c-d); }
.how-alt .stack h4 { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.terminus { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; padding: 0 0 26px; font-family: var(--f-read); font-size: 17px; }
.terminus .buffer { width: 12px; height: 26px; border: 2.5px solid var(--ink); border-radius: 3px; background: var(--am); flex: none; }

/* ------------------------------------------------------------ LIGHTBOX: warm paper, ink-cased frame */
.lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.lb[hidden] { display: none; }
.lb-back { position: absolute; inset: 0; background: rgba(255, 250, 242, 0.975); }
.lb-box { position: relative; width: min(1180px, 100%); max-height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.lb-top { display: flex; align-items: center; gap: 14px; }
.lb-where { margin: 0; font: 800 12.5px/1 var(--f-sign); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.lb-mini { flex: 1; display: flex; align-items: center; justify-content: space-between; position: relative; height: 18px; max-width: 360px; }
.lb-mini::before { content: ""; position: absolute; left: 4px; right: 4px; top: 5px; height: 8px; background: var(--b); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.lb-mini i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); }
.lb-mini i.no { width: 8px; height: 8px; border-width: 1.5px; background: var(--paper); }
.lb-mini i.cur { width: 18px; height: 18px; background: var(--p); border-width: 3px; }
.lb-x { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); font: 800 18px/1 var(--f-sign); color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.25s var(--spring); }
.lb-x:hover { transform: rotate(90deg); background: var(--p); }
.lb-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 16px; align-items: center; min-height: 0; touch-action: pan-y; }
.lb-arrow { width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); font: 800 20px/1 var(--f-sign); color: var(--ink); cursor: pointer; transition: transform 0.3s var(--spring), background 0.2s; }
.lb-arrow:hover:not([disabled]) { transform: scale(1.1); background: var(--p); }
.lb-arrow[disabled] { opacity: 0.35; cursor: default; }
.lb-fig { margin: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; justify-items: center; transition: opacity 0.18s var(--ease), transform 0.3s var(--ease); }
.lb-frame { border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--white); box-shadow: 12px 12px 0 var(--b); max-width: 100%; min-height: 0; display: flex; }
.lb-frame img { max-width: 100%; max-height: calc(100vh - 250px); width: auto; height: auto; object-fit: contain; }
.lb-fig figcaption { display: flex; align-items: center; gap: 12px; max-width: 80ch; }
.lb-txt b { display: block; font: 850 22px/1.1 var(--f-sign); font-variation-settings: "wdth" 84; }
.lb-txt .lb-c { display: block; font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.lb-fig.out-l { opacity: 0; transform: translateX(-40px); }
.lb-fig.out-r { opacity: 0; transform: translateX(40px); }
.lb-fig.in-l { opacity: 0; transform: translateX(-40px); transition: none; }
.lb-fig.in-r { opacity: 0; transform: translateX(40px); transition: none; }
.lb-foot { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.lb-dots { display: flex; gap: 8px; }
.lb-dots:empty { display: none; }
.lb-dots button { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); padding: 0; cursor: pointer; }
.lb-dots button[aria-pressed="true"] { background: var(--b); transform: scale(1.25); }
.lb-open { font-size: 14.5px; padding: 11px 16px; }
.motion .lb.show .lb-back { animation: fadein 0.25s var(--ease); }
.motion .lb.show .lb-box { animation: lbin 0.35s var(--ease); }
@keyframes lbin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.lb-on { overflow: hidden; }

@media (max-width: 900px) {
  .hide-s { display: none; }
  .nl-row { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 6px; }
  .nl-arrow { display: block; width: 32px; height: 32px; margin-top: 30px; font-size: 15px; border-width: 2px; }
  .nl-hint { display: inline; font-size: 11px; }
  .nl-top { flex-wrap: wrap; gap: 6px; }
  .terminus { font-size: 15.5px; }
  .lb { padding: 12px; }
  .lb-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lb-fig { grid-column: 1 / -1; order: -1; }
  .lb-arrow { width: 44px; height: 44px; }
  .lb-arrow[data-d="-1"] { justify-self: start; }
  .lb-arrow[data-d="1"] { justify-self: end; }
  .lb-frame { box-shadow: 7px 7px 0 var(--b); }
  .lb-frame img { max-height: calc(100vh - 300px); }
  .lb-fig figcaption { align-items: flex-start; }
  .lb-txt b { font-size: 19px; }
  .lb-mini { display: none; }
}

/* the "Classified" tag beside a confidential project's name */
.cls-tag { display: inline-block; font: 800 10px/1 var(--f-sign); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 7px; margin-left: 6px; box-shadow: 2px 2px 0 var(--p); vertical-align: middle; }
.timetable td.n .cls-tag { margin: 4px 0 0; }
.nl-tag { display: block; margin-top: 3px; font: 800 9px/1 var(--f-sign); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
svg.netmap .st-tag-t { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }

/* ============================================================ the Buhta family, timetable cross-links */
.pt-family { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 0; font-size: 13.5px; }
.pt-family .pf-l { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; color: var(--ink-2); margin-right: 2px; }
.pt-family a { font-weight: 700; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; background: var(--white); box-shadow: 2px 2px 0 var(--b); transition: transform 0.3s var(--spring); }
.pt-family a:hover { transform: translateY(-2px); }
.timetable .kin { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-family: var(--f-sign); font-size: 13px; font-weight: 700; }
.timetable .kin a { text-decoration: none; background: linear-gradient(var(--am-t), var(--am-t)) 0 100% / 100% 0.45em no-repeat; }
.timetable .kin a::after { content: " →"; }
.timetable .kin a:hover { background-size: 100% 100%; }

/* ============================================================ VIDEOS: the episode line */
.vid-page { padding-bottom: 90px; }
.filters button small { font: 750 11.5px/1 var(--f-sign); color: var(--ink-2); margin-left: 2px; }
.filters button.tag { padding: 7px 14px 7px 8px; }
.filters .sw { width: 16px; height: 16px; border-radius: 50%; background: var(--b); border: 2px solid var(--ink); flex: none; }
.eps { --gap: 28px; list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 44px var(--gap); }
.ep { position: relative; padding-top: 40px; }
.ep[hidden] { display: none; }
/* the series runs on one line: each card is a stop on it */
.ep::before { content: ""; position: absolute; left: calc(-1 * var(--gap)); right: 0; top: 9px; height: 12px; background: var(--am); border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); background-image: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 11px); background-size: 100% 2px; background-position: 0 50%; background-repeat: no-repeat; }
.ep:first-child::before { left: 50%; border-left: 0; }
.ep-stop { position: absolute; left: 50%; top: 2px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); z-index: 1; transition: transform 0.4s var(--spring), background 0.25s; }
.ep:hover .ep-stop, .ep:focus-within .ep-stop { transform: scale(1.3); background: var(--p); }
.ep-card { display: grid; grid-template-rows: auto 1fr; height: 100%; text-decoration: none; color: var(--ink); background: var(--white); border: 2.5px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 8px 8px 0 var(--b); transition: transform 0.4s var(--spring), box-shadow 0.3s var(--ease); }
.ep-card:hover { transform: translateY(-5px) rotate(-0.4deg); box-shadow: 10px 12px 0 var(--b); }
.ep-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.ep-pic { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bt); border-bottom: 2.5px solid var(--ink); overflow: hidden; }
.ep-pic img, .ep-pic svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-play { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; font: 800 13px/1 var(--f-sign); letter-spacing: 0.06em; text-transform: uppercase; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px 7px 9px; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.35s var(--spring), background 0.2s; }
.ep-play i { width: 0; height: 0; border-left: 10px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.ep-card:hover .ep-play, .ep-card:focus-visible .ep-play { transform: scale(1.08); background: var(--p); }
.ep-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.ep-meta { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); font-weight: 650; }
.ep-meta b { color: var(--ink); font-weight: 850; }
.ep-he { font: 800 22px/1.25 var(--f-sign); font-variation-settings: "wdth" 90; }
.ep-en { font-family: var(--f-read); font-style: italic; font-size: 17px; color: var(--ink-2); }
.ep-desc { font-family: var(--f-read); font-size: 16px; line-height: 1.45; }
.ep-tags { margin-top: auto; padding-top: 6px; }
.ep-tags span { font-size: 12.5px; padding: 2px 9px; background: var(--bt); }
.motion .ep.enter { animation: rowin 0.45s var(--ease) both; animation-delay: var(--ed, 0s); }

/* video lightbox: the image lightbox's paper backdrop and ink-cased frame, holding the LinkedIn player */
.vframe { position: relative; width: min(520px, 100%); height: min(860px, calc(100vh - 240px)); min-height: 320px; background: var(--white); }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.v-wait { position: absolute; inset: 0; margin: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font: 700 14px/1.3 var(--f-sign); color: var(--ink-2); text-align: center; padding: 20px; }
.vframe.loading .v-wait { display: flex; }
.v-spin { width: 40px; height: 16px; border-radius: 8px; border: 2.5px solid var(--ink); background: var(--white); position: relative; overflow: hidden; }
.v-spin::after { content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; width: 12px; border-radius: 3px; background: var(--b); }
.motion .v-spin::after { animation: vrun 1s var(--ease) infinite alternate; }
@keyframes vrun { from { transform: translateX(0); } to { transform: translateX(18px); } }
.v-fail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; background: var(--bt); }
.v-fail[hidden] { display: none; }
.v-fail p { margin: 0; font-family: var(--f-read); font-size: 18px; line-height: 1.4; }
.v-fail b { display: block; font: 850 22px/1.15 var(--f-sign); font-variation-settings: "wdth" 86; margin-bottom: 4px; }
.vlb .lb-txt b { font-variation-settings: "wdth" 90; }
.vlb .lb-b .bullet.sm { width: 34px; height: 34px; font-size: 13px; border-width: 2px; }
.vlb .lb-foot .btn.sm { background: var(--white); }

@media (max-width: 900px) {
  .eps { gap: 0; grid-template-columns: minmax(0, 1fr); }
  /* on a phone the line runs down the left edge */
  .ep { padding: 0 0 30px 42px; }
  .ep::before { left: 8px; right: auto; top: 0; bottom: 0; width: 12px; height: auto; border: 2.5px solid var(--ink); border-top: 0; border-bottom: 0; background-image: repeating-linear-gradient(180deg, #fff 0 6px, transparent 6px 11px); background-size: 2px 100%; background-position: 50% 0; }
  .ep:first-child::before { left: 8px; top: 14px; border-top: 2.5px solid var(--ink); border-radius: 6px 6px 0 0; }
  .ep:last-child::before { bottom: 30px; border-bottom: 2.5px solid var(--ink); border-radius: 0 0 6px 6px; }
  .ep-stop { left: 1px; top: 14px; margin-left: 0; }
  .ep-card { box-shadow: 6px 6px 0 var(--b); }
  .ep-he { font-size: 20px; }
  .vframe { height: calc(100vh - 270px); }
}

/* five nav stops on a phone: one row, no wrapping inside a name */
@media (max-width: 480px) {
  .site-nav ul { gap: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: -2px 0; }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 8px; font-size: 13.5px; white-space: nowrap; }
}

/* ------------------------------------------------------------ HOME fills the screen on desktop
 * The page grows with the viewport: the map's width follows the available height
 * (map aspect 1000:650), the intro column and its type scale with it, and the
 * content sits centred between the header and the footer. */
@media (min-width: 1101px) {
  body[data-page="home"] {
    --intro: clamp(300px, 21vw, 420px);
    --home-gap: clamp(36px, 3vw, 64px);
    --max: min(100vw, calc(var(--intro) + var(--home-gap) + 2 * var(--gutter) + (100vh - 290px) * 1.54));
    --max: min(100vw, calc(var(--intro) + var(--home-gap) + 2 * var(--gutter) + (100svh - 290px) * 1.54));
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column;
  }
  body[data-page="home"] > main.home {
    flex: 1 0 auto; width: 100%;
    grid-template-columns: var(--intro) minmax(0, 1fr);
    gap: var(--home-gap);
    align-items: center; align-content: center;
  }
  body[data-page="home"] > header, body[data-page="home"] > footer { flex: none; }
  .home-intro h1 { font-size: clamp(64px, 4.6vw, 96px); }
  .home-intro p.lede { font-size: clamp(16.5px, min(1.15vw, 1.95vh), 21px); line-height: 1.36; }
  .home-intro .portrait { width: clamp(196px, 13vw, 270px); }
  .routes a { font-size: clamp(15.5px, 1vw, 18px); }
  .home-intro p.lede { margin-bottom: clamp(18px, 2.2vh, 30px); }
  .home-intro .portrait { margin-bottom: clamp(16px, 2vh, 26px); }
  body[data-page="home"] > .site-foot { padding: clamp(12px, 1.6vh, 28px) 0 clamp(14px, 2vh, 42px); }
}
/* short desktop screens (e.g. 1440x900): a little less air, so the intro still fits without a scroll */
@media (min-width: 1101px) and (max-height: 940px) {
  body[data-page="home"] > main.home { padding-top: 14px; padding-bottom: 18px; }
  .home-intro .portrait { width: 184px; }
}

/* ------------------------------------------------------------ portrait zoom: click the photo, it grows */
[data-portrait][data-zoom] { cursor: zoom-in; }
[data-portrait][data-zoom]:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; border-radius: 8px; }
.pz-open, .pz-open body { overflow: hidden; }
.pz { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 4vh 4vw; }
.pz-bg { position: absolute; inset: 0; background: color-mix(in srgb, var(--paper) 92%, transparent); opacity: 0; transition: opacity 0.35s var(--ease); }
.pz.in .pz-bg { opacity: 1; }
.pz-fig { position: relative; margin: 0; width: min(88vw, calc(84vh * 2 / 3)); cursor: zoom-out; transition: transform 0.5s var(--spring); }
.pz-fig img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: 12px 12px 0 var(--ai); background: var(--p); }
.pz-fig figcaption { margin-top: 18px; font: 750 15px/1.3 var(--f-sign); text-align: center; opacity: 0; transform: translateY(6px); transition: opacity 0.3s var(--ease) 0.25s, transform 0.3s var(--ease) 0.25s; }
.pz.in .pz-fig figcaption { opacity: 1; transform: none; }
.pz-close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); font: 800 18px/1 var(--f-sign); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); opacity: 0; transition: opacity 0.3s var(--ease) 0.2s; }
.pz.in .pz-close { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pz-fig, .pz-bg, .pz-close, .pz-fig figcaption { transition: none; } }

/* ============================================================ AI production studio: the pipeline on one AI line
 * Reuses the .diagram look of AI Hub's figure; everything below is scoped to .studio-d so that figure is untouched. */
.how-studio[hidden] { display: none; }
.how-studio .diagram { margin-bottom: 30px; }
.studio-d .hit { fill: transparent; }
/* keyboard focus: an ink ring on a lemon ground around the whole station, as on the home map */
.studio-d .ring { fill: none; stroke: transparent; stroke-width: 3; pointer-events: none; }
.studio-d .dst:focus-visible .ring { stroke: var(--ink); }
.studio-d .dst:focus-visible .hit { fill: var(--p-t); }
/* the line draws itself, then its stations pop in as it reaches them (motion only) */
.motion .studio-d svg.armed .draw { stroke-dasharray: 1 2; stroke-dashoffset: 1.1; }
.motion .studio-d svg.armed.play .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s var(--ease) var(--d, 0s); }
.motion .studio-d svg.armed .mkp { transform: scale(0); transform-box: fill-box; transform-origin: center; }
.motion .studio-d svg.armed.play .mkp { transform: none; transition: transform 0.45s var(--spring) var(--sd, 0s); }
.motion .studio-d svg.armed .dst text { opacity: 0; }
.motion .studio-d svg.armed.play .dst text { opacity: 1; transition: opacity 0.4s var(--ease) var(--sd, 0s); }
@media (max-width: 900px) {
  /* the vertical line is taller than a phone screen, so its readout stays in view at the bottom */
  .studio-d .narrow-d .readout { position: sticky; bottom: 0; z-index: 1; background: var(--white); padding-bottom: 6px; }
}

/* ------------------------------------------------------------ image lightbox (.ilb): two separate controls
 * The project pills at the sides change the PROJECT ("Previous project · Name", in that project's line colour);
 * the photo control under the image ("‹ ● ○ ○ ›  Photo 1 of 3") changes the PHOTO. On a case page (.lb-images)
 * only the photo control shows, with larger chevrons on the image's sides. The video lightbox (.vlb) is untouched. */
.ilb .lb-box { width: min(1380px, 100%); grid-template-columns: minmax(0, 210px) minmax(0, 1fr) minmax(0, 210px); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top top top" "prev fig next" ". foot ."; column-gap: 22px; row-gap: 14px; }
.ilb.lb-images .lb-box { width: min(1240px, 100%); grid-template-columns: 0 minmax(0, 1fr) 0; column-gap: 0; }
.ilb .lb-top { grid-area: top; }
.ilb .lb-fig { grid-area: fig; grid-template-rows: auto auto; align-content: center; }
.ilb .lb-foot { grid-area: foot; flex-direction: column; gap: 14px; }
.ilb [hidden] { display: none !important; }

.lb-pj { align-self: center; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 8px 16px 8px 8px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 4px 4px 0 var(--b); transition: transform 0.35s var(--spring), box-shadow 0.3s; }
.lb-pj[data-d="-1"] { grid-area: prev; justify-self: start; }
.lb-pj[data-d="1"] { grid-area: next; justify-self: end; padding: 8px 8px 8px 16px; text-align: right; }
.lb-pj:hover, .lb-pj:focus-visible { transform: scale(1.06); box-shadow: 6px 6px 0 var(--b); }
.lb-pj-a { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--b); display: grid; place-items: center; font: 800 19px/1 var(--f-sign); }
.lb-pj-t { min-width: 0; }
.lb-pj-t small { display: block; font: 800 10.5px/1.2 var(--f-sign); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }
.lb-pj-t b { display: block; font: 850 16px/1.15 var(--f-sign); font-variation-settings: "wdth" 86; overflow: hidden; text-overflow: ellipsis; }

.ilb .lb-stage { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 0; max-width: 100%; touch-action: pan-y; }
.ilb .lb-frame { transition: opacity 0.16s var(--ease), transform 0.28s var(--ease); }
.ilb .lb-frame img { max-height: calc(100vh - 330px); }
.ilb.lb-images .lb-frame img { max-height: calc(100vh - 230px); }
.ilb .lb-frame.out-l, .ilb .lb-frame.in-l { opacity: 0; transform: translateX(-28px); }
.ilb .lb-frame.out-r, .ilb .lb-frame.in-r { opacity: 0; transform: translateX(28px); }
.ilb .lb-frame.in-l, .ilb .lb-frame.in-r { transition: none; }

.lb-ph { flex: none; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; transition: transform 0.3s var(--spring), background 0.2s; }
.lb-ph:hover, .lb-ph:focus-visible { transform: scale(1.12); background: var(--p); }
.lb-small { width: 30px; height: 30px; font: 800 19px/1 var(--f-sign); }
.lb-side { width: 54px; height: 54px; border-width: 2.5px; font: 800 30px/1 var(--f-sign); box-shadow: 3px 3px 0 var(--ink); }
.lb-photos { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); }
.lb-pics { font: 750 12.5px/1 var(--f-sign); letter-spacing: 0.03em; color: var(--ink-2); white-space: nowrap; }
.ilb.lb-images .lb-photos .lb-small { display: none; }
.ilb.lb-images .lb-photos { padding: 6px 14px; }
.ilb.lb-images .lb-mini { display: none; }

@media (max-width: 900px) {
  /* phones: the photo control under the image, the two project pills at the bottom of the screen */
  .ilb .lb-box { height: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "top top" "fig fig" "foot foot" "prev next"; column-gap: 10px; row-gap: 12px; }
  .ilb.lb-images .lb-box { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top" "fig" "foot"; }
  .lb-pj { align-self: end; gap: 8px; padding: 6px 12px 6px 6px; box-shadow: 3px 3px 0 var(--b); }
  .lb-pj[data-d="-1"], .lb-pj[data-d="1"] { justify-self: stretch; }
  .lb-pj[data-d="1"] { padding: 6px 6px 6px 12px; justify-content: flex-end; }
  .lb-pj-a { width: 32px; height: 32px; font-size: 16px; border-width: 2px; }
  .lb-pj-t small { font-size: 9.5px; }
  .lb-pj-t b { font-size: 14px; white-space: nowrap; }
  .ilb .lb-frame img { max-height: calc(100vh - 390px); }
  .ilb.lb-images .lb-frame img { max-height: calc(100vh - 250px); }
  .ilb .lb-stage { gap: 8px; }
  .lb-side { width: 40px; height: 40px; font-size: 24px; }
  .ilb .lb-foot { gap: 10px; }
}

/* VIDEOS: a grid of three per row on desktop; each row is its own stretch of line, scroll for more */
@media (min-width: 901px) {
  .eps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ep:nth-child(3n+1)::before { left: 50%; }
  .ep:nth-child(3n)::before, .ep:last-child::before { right: 50%; }
}
