/* Portfolio v4 — revision 11, "plates" (revision 12: icon cards).
   Stacked light plates on a warm-gray page. R43 (the approved R40 + R41 taste mock): one family, Work Sans, self-hosted
   in assets/fonts; plates open with a plain heading; no shadows, grain or corner dots; square corners. The R40 and R41
   layers sit at the end of this file, after the original rules they adjust. */
@font-face { font-family: "Work Sans"; font-weight: 300 700; font-style: normal; font-display: swap; src: url("fonts/work-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 300 700; font-style: italic; font-display: swap; src: url("fonts/work-sans-italic-latin.woff2") format("woff2"); }
:root {
  --bg-outer: #e2e1dd;
  --bg-panel: #f3f2ef;
  --ink: #0a0a0a;
  --ink-soft: #55554f;
  --rule: rgba(10, 10, 10, .12);
  --accent: #3d5e4a;
  --accent-hover: #2f4a3a;
  --deep: #1f3128;
  --tint: #dfe5dd;
  --ui: #ffffff;
  --display: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --sans: "Work Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gap: 16px;
  --pad: 48px;
}
@media (max-width: 699px) { :root { --gap: 10px; --pad: 20px; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-soft) var(--bg-outer); }
body {
  margin: 0; background: var(--bg-outer); color: var(--ink); caret-color: var(--accent);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color 200ms var(--ease); }
a:hover { color: var(--accent-hover); }
::selection { background: var(--tint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .98; font-size: clamp(44px, 6vw, 76px); }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.times { font-family: var(--sans); font-weight: 300; font-size: .7em; }

/* ---------- the stack of plates ---------- */
.page { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 20px 20px 0; display: grid; gap: var(--gap); }
.page.narrow { max-width: 824px; }
main { display: grid; gap: var(--gap); }
@media (max-width: 699px) { .page { padding: 10px 10px 0; } }
.plate {
  position: relative; background: var(--bg-panel); border-radius: 8px; padding: 0 var(--pad) var(--pad);
  box-shadow: 0 1px 2px rgba(10, 10, 10, .05), 0 6px 18px -8px rgba(10, 10, 10, .12);
  /* four tiny corner dots */
  background-image: radial-gradient(circle, rgba(10, 10, 10, .2) 1.2px, transparent 1.8px), radial-gradient(circle, rgba(10, 10, 10, .2) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(10, 10, 10, .2) 1.2px, transparent 1.8px), radial-gradient(circle, rgba(10, 10, 10, .2) 1.2px, transparent 1.8px);
  background-size: 6px 6px; background-repeat: no-repeat;
  background-position: 7px 7px, calc(100% - 7px) 7px, 7px calc(100% - 7px), calc(100% - 7px) calc(100% - 7px);
}
.ph { display: flex; align-items: center; gap: 10px; margin: 0 calc(-1 * var(--pad)) var(--pad); padding: 14px var(--pad) 12px; border-bottom: 1px solid var(--rule); }
.ph h2 { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.ph .pm { margin-left: auto; font-size: 12px; color: var(--ink-soft); letter-spacing: .02em; }

/* ---------- nav plate ---------- */
.nav { display: flex; align-items: center; gap: 20px; padding: 10px 14px 10px 12px; }
.nav .home { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; margin-right: auto; }
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--bg-panel); font-family: var(--display); font-weight: 800; font-size: 15px; }
.nav nav { display: flex; gap: 4px; }
.nav nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.nav nav a:hover { background: var(--bg-outer); }
.nav nav a[aria-current] { background: var(--ink); color: var(--bg-panel); }

/* ---------- screen card: a real screenshot in a minimal window frame ---------- */
.shot { border-radius: 6px; overflow: hidden; background: var(--ui); border: 1px solid var(--rule); }
.shot .bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-bottom: 1px solid var(--rule); font-size: 12px; line-height: 1; color: var(--ink-soft); }
.shot .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); }
.shot .bar span { margin-left: 8px; }
.shot .bar .mock { margin-left: auto; color: var(--accent); font-weight: 600; }
.shot .frame { position: relative; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.shot .look { position: absolute; transform: translateY(-50%); background: var(--ui); color: var(--accent); font-size: 13px; font-weight: 600; line-height: 28px; padding: 0 12px; border-radius: 999px; outline: 1.5px solid var(--accent); white-space: nowrap; }
.fig { margin: 0; }
.fig figcaption, .fig-c { margin: 12px 0 0; font-size: 15px; color: var(--ink-soft); max-width: none; }
.fig-n { display: inline-block; margin-right: 10px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.go { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rule); color: var(--ink); font-size: 14px; transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease); }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 56px 56px 56px; overflow: hidden; }
.hero h1 mark { color: inherit; background: linear-gradient(transparent 58%, rgba(61, 94, 74, .38) 58%, rgba(61, 94, 74, .38) 92%, transparent 92%); padding: 0 .04em; }
.hero-t > p { margin: 0 0 4px; font-size: 18px; max-width: 30em; }
.hero-t h1 { margin-bottom: 22px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0 !important; font-size: 15px; font-weight: 500; }
.hero-v { position: relative; display: grid; place-items: center; min-height: 420px; }
/* the hero drawing (revision 27): a forest grows out of a book, right on the plate, no frame. See hero_story in
   build.py. Without .tell (no JS, reduced motion) the svg rests on the final frame: forest grown, words showing,
   last caption. hero.js adds .tell, swaps the words, sets --mx/--my for the desktop parallax and adds .paused
   off-screen. Only transform and opacity animate, except the short stroke draw-ons while the story plays. */
.fx { display: grid; justify-items: center; gap: 14px; width: 100%; }
.forest { width: min(100%, 500px); aspect-ratio: 260 / 184; }
.fx-c { display: grid; margin: 0; font-size: 15px; font-weight: 400; font-style: italic; letter-spacing: -.005em; color: var(--ink-soft); }
.fx-c span { grid-area: 1 / 1; justify-self: center; }
.fx.paused, .fx.paused * { animation-play-state: paused !important; }
.fx-story { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-story text { font-family: var(--sans); font-size: 9.5px; font-style: italic; font-weight: 500; fill: var(--accent); text-anchor: middle; dominant-baseline: middle; }
.fx-story .dw { stroke-dasharray: 1; stroke-dashoffset: 0; }  /* every .dw has pathLength="1" */
.fx-story :is(.x, .pg), .fx-cap:not(.last) { opacity: 0; }
/* story */
.fx.tell .fx-story .dw { animation: st-draw 1s cubic-bezier(.45, .05, .35, 1) calc(var(--t, 0s) + var(--d, 0) * 90ms) both; }
.fx.tell .fx-story .dw.f { animation: st-draw 1s cubic-bezier(.45, .05, .35, 1) calc(var(--t, 0s) + var(--d, 0) * 90ms) both, fx-fill .5s ease calc(var(--t, 0s) + var(--d, 0) * 90ms + .7s) both; }
.fx.tell .fx-story .sigh { animation-duration: 1.6s; }
.fx.tell :is(.fx-story .x, .fx-cap) { animation: fx-fade .5s ease var(--t) both, st-out .5s ease var(--u) forwards; }
.fx.tell :is(.fx-story .in, .fx-cap.last) { animation: fx-fade .6s ease var(--t) both; }
.fx.tell .fx-story .glow { animation: fx-glow 1.4s ease-out var(--t) both; }
.fx-story :is(.pop, .glow, .pg, .tw path, .lf-l, .lf text) { transform-box: fill-box; }
.fx-story :is(.glow, .lf-l) { transform-origin: center; }
.fx-story .pop { transform-origin: 50% 100%; }
.fx.tell .fx-story .pop { animation: st-pop .9s linear var(--t) both; }
.fx-story .pg { transform-box: view-box; transform-origin: 156px 0; }
.fx.tell .fx-story .pg { animation: st-flip .5s cubic-bezier(.5, 0, .3, 1) var(--t) both; }
/* the living forest: sway, mouse parallax, twinkling eyes, leaves that fall and turn into words */
.fx-story :is(.sw, .pl) { transform-box: view-box; transform-origin: var(--o); }
.fx.tell .fx-story .sw { animation: st-sway 5.2s ease-in-out calc(6.4s + var(--sd)) infinite; }
.fx-story .pl { transform: rotate(calc(var(--mx, 0) * var(--k) * 1deg)); transition: transform .9s var(--ease); }
.fx-story .pt { transform: translate(calc(var(--mx, 0) * var(--k) * 1px), calc(var(--my, 0) * var(--k) * .6px)); transition: transform .9s var(--ease); }
.fx-story .tw path { transform-origin: center; }
.fx.tell .fx-story .tw path { animation: st-tw 1.6s ease-in-out calc(6.2s + var(--z) * 400ms) infinite; }
.fx-story .lf text { transform-origin: center; }
.fx.tell .fx-story .lf-l { animation: lf-fall 6s linear var(--t) infinite both; }
.fx.tell .fx-story .lf text { animation: lf-word 6s linear var(--t) infinite both; }
@keyframes st-draw { 0% { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }  /* hidden until it starts, so round caps don't leave dots */
@keyframes st-out { to { opacity: 0; } }
@keyframes fx-fill { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-glow { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes st-pop { 0% { opacity: 0; transform: scale(0); animation-timing-function: cubic-bezier(.3, 0, .5, 1); } 1% { opacity: 1; }
  50% { transform: scale(1.14); animation-timing-function: ease-in-out; } 72% { transform: scale(.94); } 88% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes st-flip { 0% { opacity: 1; transform: none; } 90% { opacity: 1; } 100% { opacity: 0; transform: scaleX(-1); } }
@keyframes st-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(1.4deg); } 72% { transform: rotate(-1.1deg); } }
@keyframes st-tw { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55) rotate(20deg); opacity: .55; } }
@keyframes lf-fall {
  0% { opacity: 0; transform: none; animation-timing-function: ease-out; }
  6% { opacity: 1; }
  22% { transform: translate(calc(var(--dx) * .25px + 4px), calc(var(--dy) * .25px + 9px)) rotate(70deg); animation-timing-function: ease-in-out; }
  38% { transform: translate(calc(var(--dx) * .7px - 3px), calc(var(--dy) * .7px + 12px)) rotate(150deg); animation-timing-function: ease-out; }
  48% { opacity: 1; transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) rotate(210deg) scale(1); }
  56%, 100% { opacity: 0; transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) rotate(250deg) scale(.2); }
}
@keyframes lf-word {
  0%, 47% { opacity: 0; transform: translateY(3px) scale(.5); animation-timing-function: cubic-bezier(.3, 1.6, .6, 1); }
  56% { opacity: 1; transform: none; animation-timing-function: linear; }
  86% { opacity: 1; transform: translateY(-5px); animation-timing-function: ease-in; }
  100% { opacity: 0; transform: translateY(-9px); }
}

/* ---------- home: the project map (R32, from the R31 mock). Nodes are links; assets/map.js adds hover + draw ---------- */
.fit-in { margin: 0 0 22px; font-size: 17px; max-width: none; }
.fit { position: relative; width: 100%; }
.fit .wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* the two clusters: a quiet dashed outline, label sitting on the top edge */
.fit .cl { fill: none; stroke: rgba(10, 10, 10, .16); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.fit-k { position: absolute; margin: 0; transform: translate(14px, -50%); padding: 0 8px; background: var(--bg-panel); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
/* edges: thin ink lines, arrows show direction; the bridge between clusters is the accent */
.fit .w { fill: none; stroke: #55554f; stroke-width: 1.3; stroke-linecap: round; marker-end: url(#ah); stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; transition: opacity 200ms var(--ease), stroke 200ms var(--ease); }
.fit .w.br { stroke: var(--accent); stroke-width: 2; marker-start: url(#ah-a); marker-end: url(#ah-a); }
.fit .wl { font-family: var(--sans); font-size: 12px; font-weight: 500; fill: var(--ink-soft); dominant-baseline: middle; paint-order: stroke; stroke: var(--bg-panel); stroke-width: 6px; stroke-linejoin: round; transition: opacity 200ms var(--ease), fill 200ms var(--ease); }
.fit .wl.br { fill: var(--accent); font-weight: 600; font-size: 12.5px; }
.fit .w.hub { stroke-dasharray: 2 4; marker-end: none; stroke: rgba(10, 10, 10, .3); }
/* nodes: a small white card (icon, name + arrow, the one-line description); the whole card is the link */
/* centring uses the `translate` property, so `scale` (pop-in), the float (also `translate`) and the hover lift (`transform`) never fight */
.nd { position: absolute; z-index: 1; display: grid; justify-items: center; width: 196px; translate: -50% -50%; padding: 12px 14px 14px; border-radius: 8px; background: var(--ui); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; text-align: center; transition: opacity 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 260ms var(--ease); }
.nd::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 12px 26px -12px rgba(10, 10, 10, .3); opacity: 0; transition: opacity 260ms var(--ease); pointer-events: none; }
.nd .ic { width: 60px; height: 60px; margin-bottom: 6px; transition: transform 200ms var(--ease); }
.nd b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; transition: color 200ms var(--ease); }
.nd small { margin-top: 3px; font-size: 13px; color: var(--ink-soft); line-height: 1.35; text-wrap: balance; }
.na { display: inline-block; margin-left: 6px; font-weight: 500; color: var(--ink-soft); transition: transform 200ms var(--ease), color 200ms var(--ease); }
.nd:hover, .nd:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.nd:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nd:hover b, .nd:focus-visible b, .nd:hover .na, .nd:focus-visible .na { color: var(--accent); }
.nd:hover .na, .nd:focus-visible .na, .fm-n > a:hover .na, .fm-n > a:focus-visible .na { transform: translateX(3px); }
.nd:hover .ic, .nd:focus-visible .ic { transform: translateY(-2px); }
/* R33: the hovered card lifts a little; its shadow fades in (opacity only) */
.nd:hover, .nd:focus-visible { transform: translateY(-4px); }
.nd:hover::after, .nd:focus-visible::after { opacity: 1; }
/* the Obsidian vault: not a project, so a quiet pill instead of a card */
.vp { position: absolute; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; translate: -50% -50%; padding: 5px 14px 5px 8px; border-radius: 999px; background: var(--bg-panel); border: 1px dashed rgba(10, 10, 10, .3); white-space: nowrap; transition: opacity 200ms var(--ease), border-color 200ms var(--ease); }
.vp .vi { width: 26px; height: 26px; flex: none; }
.vp b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.vp small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.25; }
.fit.is-f .vp { opacity: .22; }
.fit.is-f .vp.on { border-color: var(--accent); }
/* hover / focus: the project's own edges come forward in the accent, everything else steps back */
.fit.is-f .w, .fit.is-f .wl, .fit.is-f .nd { opacity: .22; }
.fit.is-f .on { opacity: 1; }
.fit.is-f .w.on { stroke: var(--accent); marker-end: url(#ah-a); }
.fit.is-f .wl.on { fill: var(--accent); }
.fit.is-f .w.hub.on { marker-end: none; }
.fit-note { min-height: 1.55em; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-soft); max-width: none; }
.fit-note b { color: var(--ink); font-weight: 600; margin-right: 6px; }
/* R33 motion, only when map.js has added .js (never with reduced motion or without JS):
   1. .drawn: the cluster outlines fade in, the nodes pop in cluster by cluster (--p) on a spring, then each edge draws
      from its start toward its arrow (--i) and its label fades in;
   2. .settled (~3s): delays are dropped, nodes float 1-2px, the bridge halo breathes;
   3. .live: dots flow along the edges (built by map.js, Web Animations on transform + opacity). .paused when off screen. */
.fit { --spring: cubic-bezier(.34, 1.56, .64, 1); --e0: 1150ms; }
@supports (transition-timing-function: linear(0, 1)) {
  .fit { --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1); }
}
.js .fit:not(.drawn) .cl, .js .fit:not(.drawn) .fit-k { opacity: 0; }
.js .fit:not(.drawn) .nd, .js .fit:not(.drawn) .vp { opacity: 0; scale: .55; }
.js .fit:not(.drawn) .w { stroke-dashoffset: 1; marker-start: none; marker-end: none; opacity: 0; }  /* opacity: hides the round cap's dot */
.js .fit:not(.drawn) .w.hub { stroke-dashoffset: 0; opacity: 0; }
.js .fit:not(.drawn) .wl { opacity: 0; }
.js .fit.drawn:not(.settled) .cl, .js .fit.drawn:not(.settled) .fit-k { transition: opacity 500ms var(--ease); }
.js .fit.drawn:not(.settled) .nd, .js .fit.drawn:not(.settled) .vp { transition: opacity 350ms var(--ease) calc(150ms + var(--p) * 95ms), scale 750ms var(--spring) calc(150ms + var(--p) * 95ms), border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 260ms var(--ease); }
/* the arrowheads appear the moment their line arrives (a discrete switch at the end of the draw) */
.js .fit.drawn:not(.settled) .w { transition: stroke-dashoffset 900ms cubic-bezier(.45, .05, .35, 1) calc(var(--e0) + var(--i) * 110ms), marker-start 0s calc(var(--e0) + var(--i) * 110ms + 820ms) allow-discrete, marker-end 0s calc(var(--e0) + var(--i) * 110ms + 820ms) allow-discrete, opacity 0s calc(var(--e0) + var(--i) * 110ms), stroke 200ms var(--ease); }
.js .fit.drawn:not(.settled) .w.hub { transition: opacity 500ms var(--ease) calc(var(--e0) + var(--i) * 110ms), stroke 200ms var(--ease); }
.js .fit.drawn:not(.settled) .wl { transition: opacity 400ms var(--ease) calc(var(--e0) + 500ms + var(--i) * 110ms), fill 200ms var(--ease); }
/* hovering during the intro: no waiting on the stagger */
.js .fit.drawn.is-f .nd, .js .fit.drawn.is-f .vp, .js .fit.drawn.is-f .wl { transition-delay: 0s; }
.fit.drawn.settled .w:not(.hub) { stroke-dasharray: none; }
/* idle float: each node its own speed and phase */
@keyframes fit-float { to { translate: -50% calc(-50% - 1.8px); } }
.js .fit.settled .nd, .js .fit.settled .vp { animation: fit-float var(--fd) ease-in-out var(--fo) infinite alternate; }
/* the bridge: a soft accent halo that breathes; it steps back with the rest when another project is hovered */
.fit .pulse { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; }
.fit .bg-glow { transition: opacity 200ms var(--ease); }
@keyframes fit-pulse { 50% { opacity: .2; } }
.js .fit.settled .pulse { animation: fit-pulse 3.4s ease-in-out infinite; }
.fit.is-f .bg-glow { opacity: 0; }
/* flowing dots: one group per edge so hover can dim / colour them without touching the animated opacity */
.fit .flows { opacity: 0; transition: opacity 800ms var(--ease); }
.fit.live .flows { opacity: 1; }
.fit .fl { transition: opacity 200ms var(--ease); }
.fit .fl circle { fill: #55554f; transition: fill 200ms var(--ease); }
.fit .fl.br circle { fill: var(--accent); }
.fit .fl.hub circle { fill: rgba(10, 10, 10, .4); }
.fit.is-f .fl { opacity: .15; }
.fit.is-f .fl.on circle { fill: var(--accent); }
/* hover: the project's edge labels fade back in (rising a touch) as its lines light up */
@keyframes fit-label { from { opacity: 0; transform: translateY(4px); } }
.fit.is-f .wl.on { animation: fit-label 320ms var(--ease); }
.fit.is-f .bg-glow.on, .fit.is-f .fl.on { opacity: 1; }
.js .fit.settled.paused :is(.nd, .vp, .pulse) { animation-play-state: paused; }
/* phone: the same map read top to bottom (shown below 700px) */
.fm { display: none; }
.fm-c { border: 1px dashed rgba(10, 10, 10, .2); border-radius: 12px; padding: 0 10px 10px; }
.fm-k { margin: -8px 0 6px 4px; display: inline-block; padding: 0 8px; background: var(--bg-panel); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); line-height: 16px; }
.fm-c ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* each project is one card; the link is stretched over the whole card, so the connections under it are tappable too */
.fm-n { position: relative; padding: 12px 12px 12px; border-radius: 8px; background: var(--ui); border: 1px solid var(--rule); transition: border-color 200ms var(--ease); }
.fm-n:has(> a:hover), .fm-n:has(> a:focus-visible) { border-color: var(--accent); }
.fm-n > a { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.fm-n > a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.fm-n > a:focus-visible { outline: none; }
.fm-n > a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.fm-n .ic { flex: none; width: 48px; height: 48px; }
.fm-n b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.fm-n > a:hover b, .fm-n > a:hover .na { color: var(--accent); }
.fm-n small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; }
.fm-e { list-style: none; margin: 8px 0 0 60px; padding: 8px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 2px; }
.fm-e li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font-size: 12.5px; line-height: 1.45; }
.fm-e .to { font-weight: 600; }
.fm-e .lb { color: var(--ink-soft); }
.fm-e .lb::before { content: "· "; }
.fm-e li.br .to, .fm-e li.br .lb { color: var(--accent); }
/* the bridge between the two clusters: a short accent line with its label */
.fm-br { position: relative; margin: 0; padding: 14px 0; text-align: center; }
.fm-br::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); }
.fm-br span { position: relative; display: inline-grid; gap: 1px; padding: 6px 14px; border-radius: 999px; background: var(--bg-panel); outline: 1.5px solid var(--accent); font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.fm-br b { color: var(--accent); font-weight: 600; }
.next:hover .go, .next:focus-visible .go, .posts a:hover .go, .posts a:focus-visible .go { background: var(--accent); border-color: var(--accent); color: var(--bg-panel); transform: translateX(2px); }

/* ---------- home: writing list ---------- */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li + li { border-top: 1px solid var(--rule); }
.posts a { display: grid; grid-template-columns: 76px 1fr auto; gap: 20px; align-items: center; padding: 14px 0; color: var(--ink); text-decoration: none; }
.posts li:first-child a { padding-top: 0; }
.posts li:last-child a { padding-bottom: 0; }
.dt { display: grid; line-height: 1.1; }
.dt b { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.03em; }
.dt span { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.pt { display: grid; gap: 2px; }
.pt b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pt span { font-size: 15px; color: var(--ink-soft); }

/* ---------- dark contact plate + footer ---------- */
.plate.dark { background-color: var(--deep); color: var(--bg-panel); padding: 40px var(--pad); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 24px;
  background-image: radial-gradient(circle, rgba(243, 242, 239, .25) 1.2px, transparent 1.8px), radial-gradient(circle, rgba(243, 242, 239, .25) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(243, 242, 239, .25) 1.2px, transparent 1.8px), radial-gradient(circle, rgba(243, 242, 239, .25) 1.2px, transparent 1.8px); }
.dark h2 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; line-height: 1; grid-column: 1; }
.dark .mail { grid-column: 1; margin: 0; font-size: 18px; }
.dark .mail a { color: var(--bg-panel); }
.dark .ph-mail { opacity: .6; }
.round { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 10px; margin: 0; }
.round a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(243, 242, 239, .3); color: var(--bg-panel); transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.round a:hover { background: var(--bg-panel); color: var(--deep); }
.round svg { width: 18px; height: 18px; fill: currentColor; }
footer.site { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 14px 6px 24px; font-size: 13px; color: var(--ink-soft); }
footer.site a { color: var(--ink-soft); }

/* ---------- project pages ---------- */
.title { padding-top: 48px; padding-bottom: 36px; }
.title .lead { margin: 16px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.title .what { margin: 14px 0 0; font-size: 18px; max-width: none; }
.title .meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 18px 0 0; font-size: 13px; color: var(--ink-soft); }
.title .meta span { font-weight: 600; color: var(--ink); margin-right: 10px; padding-right: 10px; border-right: 1px solid var(--rule); }
.hero-links { margin: 14px 0 0; display: flex; gap: 18px; font-size: 15px; font-weight: 500; }
.dec { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.dec p { margin: 2px 0 0; font-size: 15px; color: var(--ink-soft); }
.next { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; align-items: center; padding: 24px var(--pad); color: var(--ink); text-decoration: none; }
.nx-k { grid-column: 1; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.nx-name { grid-column: 1; font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.03em; line-height: 1.1; }
.nx-d { grid-column: 1; font-size: 15px; color: var(--ink-soft); }
.next .go { grid-column: 2; grid-row: 1 / span 3; width: 44px; height: 44px; font-size: 18px; }
.intro-l { font-size: 15px; color: var(--ink-soft); margin: 0 0 16px; }

/* ---------- startup research ---------- */
.rules { margin: 0 0 24px; padding-left: 1.4em; font-size: 15px; }
.rules li { margin: 0 0 6px; padding-left: 4px; }
.rules li::marker { color: var(--accent); font-weight: 600; }
.rules b { font-weight: 600; }
.funnel { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 24px; margin: 0 0 24px; }
.funnel div { margin: 0; }
.funnel dt { font-family: var(--display); font-weight: 800; font-size: 36px; letter-spacing: -.03em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.funnel dd { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.funnel .to { position: relative; padding-left: 36px; }
.funnel .to::before { content: "→"; position: absolute; left: 2px; top: 4px; font-size: 22px; color: var(--accent); }
.said { margin: 24px 0 0; padding: 0 0 0 18px; border-left: 3px solid var(--accent); }
.said p { font-size: 20px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; margin: 0 0 6px; }
.said footer { font-size: 13px; color: var(--ink-soft); }

/* R19: the ten questions as a vertical-spine tree. Spine in the centre, nodes alternate left/right, no boxes. */
.tr { --arm: 38px; --dot: 10px; position: relative; margin-top: 8px; }
.tr-root { margin: 0 0 12px; text-align: center; }
.tr-root b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tr-root span { font-size: 12px; color: var(--ink-soft); letter-spacing: .02em; }
/* R22: raw material band above the root; each chip drops a stem to a shared rail, one stem feeds the root */
.tr-src { --g: 12px; position: relative; margin: 0 0 22px; }
.tr-src::after { content: ""; position: absolute; left: 50%; bottom: -22px; height: 22px; width: 1px; margin-left: -.5px; background: var(--ink-soft); }
.tr-src-k { margin: 0 0 8px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.tr-srcs { position: relative; list-style: none; margin: 0; padding: 0 0 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--g); }
.tr-srcs::after { content: ""; position: absolute; bottom: 0; height: 1px; left: calc((100% - 2 * var(--g)) / 6); right: calc((100% - 2 * var(--g)) / 6); background: var(--ink-soft); }
.tr-sc { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg-panel); }
.tr-sc::after { content: ""; position: absolute; left: 50%; bottom: -15px; height: 14px; width: 1px; margin-left: -.5px; background: var(--ink-soft); }
.tr-sc-key { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tr-sc .tr-ic { width: 28px; height: 28px; margin-top: 1px; }
.tr-sc p { margin: 0; min-width: 0; }
.tr-sc b { display: block; font-size: 14px; font-weight: 600; line-height: 19px; }
.tr-sc-key b { color: var(--accent); }
.tr-sc span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.tr-sc a { color: var(--accent); font-weight: 600; text-underline-offset: 2px; }
/* R36: one caption line under the band; its ::before keeps the centre line unbroken from the rail down to the root */
.tr-also { position: relative; margin: 0; padding-top: 8px; max-width: none; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.tr-also::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--ink-soft); }
.tr-also a { color: var(--accent); font-weight: 600; text-underline-offset: 2px; }
/* The writing framework: one magazine sheet (shared spine), same card/row language as before */
.tp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0 0 28px; padding: 26px; background: #e9e8e4; border: 1px solid rgba(10, 10, 10, .08); border-radius: 12px; }
.tp-sheet { display: flex; flex-direction: column; background: var(--ui); border-radius: 3px; padding: 20px 22px 14px;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, .06), 0 1px 2px rgba(10, 10, 10, .06), 0 14px 28px -18px rgba(10, 10, 10, .35); }
.tp-k { display: flex; align-items: baseline; gap: 8px; margin: 0 0 14px; padding: 0 0 8px; border-bottom: 1px solid var(--ink); font-size: 12.5px; line-height: 1.3; }
.tp-k span { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.tp-k span::after { content: "·"; margin-left: 8px; color: var(--ink-soft); }
.tp-k b { font-weight: 600; letter-spacing: -.005em; }
.tp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.tp-b { display: grid; grid-template-columns: 22px 1fr; gap: 0 8px; margin: 0 -8px; padding: 8px; border-radius: 4px; transition: background-color 200ms var(--ease); }
.tp-b:hover { background-color: #f5f6f3; }
.tp-n { font-size: 11px; font-weight: 600; line-height: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.tp-ic svg { display: block; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tp-b p { margin: 0; min-width: 0; font-size: 13px; line-height: 18px; }
.tp-b b { display: block; font-weight: 600; transition: color 200ms var(--ease); }
.tp-d { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.4; color: var(--ink-soft); transition: color 200ms var(--ease); }
.tp-b:hover b { color: var(--accent); }
.tp-b:hover .tp-d { color: var(--ink); }
/* R30: both sheets share page 1's list style; Headline is set like every other heading. Every block after the first sits under a hairline inside the text column, so it lines up with the header rule */
.tp-b + .tp-b { background-image: linear-gradient(var(--rule), var(--rule)); background-repeat: no-repeat; background-position: 8px 0; background-size: calc(100% - 16px) 1px; padding-top: 9px; }
.tp-f { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 6px; border-top: 1px solid var(--rule); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #9a9a94; font-variant-numeric: tabular-nums; }
.tp-h { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.see { margin: 24px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule); font-size: 14px; }
.see a, .back a { font-weight: 500; text-decoration: none; }
.see a:hover, .back a:hover { text-decoration: underline; text-underline-offset: 3px; }
.back { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 10px 4px; font-size: 14px; }
.funnel-n { margin: -10px 0 24px; font-size: 13px; color: var(--ink-soft); }
.funnel-n a { color: var(--accent); text-underline-offset: 2px; }
.tr-list { position: relative; list-style: none; margin: 0; padding: 22px 0 0; display: grid; gap: 22px; }
.tr-list::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 14px; width: 1px; margin-left: -.5px; background: var(--ink-soft); transform-origin: top; }
.tr-list::after { content: ""; position: absolute; left: 50%; top: 0; width: 9px; height: 9px; margin-left: -4.5px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--bg-panel); box-sizing: border-box; }
.tr-ph { text-align: center; position: relative; z-index: 1; margin: 4px 0 -4px; }
.tr-ph span { display: inline-block; background: var(--bg-panel); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 11px 3px 9px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.tr-ph b { color: var(--accent); margin-right: 8px; font-variant-numeric: tabular-nums; }
.tr-n { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.tr-follow { margin-top: -44px; }
.tr-c { display: flex; align-items: flex-start; gap: 12px; }
.tr-l .tr-c { grid-column: 1; flex-direction: row-reverse; text-align: right; padding-right: var(--arm); }
.tr-r .tr-c { grid-column: 2; padding-left: var(--arm); }
.tr-dot { position: absolute; z-index: 1; left: 50%; top: var(--dot); width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); transition: transform 200ms var(--ease), background-color 200ms var(--ease); }
.tr-arm { position: absolute; top: var(--dot); width: calc(var(--arm) - 6px); height: 1px; margin-top: -.5px; background: var(--ink-soft); overflow: hidden; }
.tr-arm::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transition: transform 260ms var(--ease); }
.tr-l .tr-arm { right: 50%; } .tr-l .tr-arm::after { transform-origin: right; }
.tr-r .tr-arm { left: 50%; }  .tr-r .tr-arm::after { transform-origin: left; }
.tr-ic { flex: none; width: 34px; height: 34px; margin-top: -7px; overflow: visible; transition: transform 200ms var(--ease); }
.tr-t { min-width: 0; }
.tr-h { margin: 0; font-size: 15px; font-weight: 600; line-height: 20px; }
.tr-num { margin-right: 6px; font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.tr-q { margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
.tr-m { margin: 1px 0 0; font-size: 13px; line-height: 1.4; color: var(--accent); }
.tr-end { position: relative; z-index: 1; text-align: center; padding-top: 4px; }
.tr-end a { display: inline-block; background: var(--bg-panel); padding: 2px 10px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; }
.tr-end a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* hover / focus: the node lights up, its connector fills with green, the others step back */
.tr-n:hover .tr-arm::after, .tr-n:focus-within .tr-arm::after, .tr-key .tr-arm::after { transform: scaleX(1); }
.tr-n:hover .tr-dot, .tr-n:focus-within .tr-dot { background: var(--accent); transform: scale(1.45); }
.tr-n:hover .tr-ic { transform: translateY(-2px); }
.tr-n { transition: opacity 220ms var(--ease); }
@media (hover: hover) { .tr-list:has(.tr-n:hover) .tr-n:not(:hover) { opacity: .5; } }
/* Competition: the one filled, haloed dot; opens the 8 moats as a sub-branch */
.tr-key .tr-dot { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--accent); box-shadow: 0 0 0 4px var(--bg-panel), 0 0 0 5px rgba(61, 94, 74, .35); }
.tr-key:hover .tr-dot, .tr-key:focus-within .tr-dot { transform: scale(1.15); }
.tr-x { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 0 0 1px; font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0; border-bottom: 1px solid rgba(61, 94, 74, .4); cursor: pointer; }
.tr-x b { color: var(--accent); font-weight: 600; }
.tr-x:hover { border-bottom-color: var(--accent); }
.tr-x:focus { outline: none; } .tr-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.tr-pm { position: relative; width: 15px; height: 15px; border: 1px solid var(--accent); border-radius: 50%; margin-left: 2px; }
.tr-pm::before, .tr-pm::after { content: ""; position: absolute; left: 3.5px; right: 3.5px; top: 6.5px; height: 1px; background: var(--accent); transition: transform 260ms var(--ease); }
.tr-pm::after { transform: rotate(90deg); }
.tr-key.open .tr-pm::after { transform: rotate(0deg); }
.tr-sub { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 380ms var(--ease); }
.tr-key:not(.open) .tr-sub { grid-template-rows: 0fr; }
.tr-sub-in { min-height: 0; overflow: hidden; }
.tr-key:not(.open) .tr-sub-in { visibility: hidden; transition: visibility 0s 380ms; }
/* R21: the branch line is drawn per item and stops at the last tick (a border on the list overshot past it). */
.tr-moats { position: relative; list-style: none; margin: 12px 0 0 5px; padding: 0 0 0 16px; display: grid; gap: 7px; }
.tr-moats li { position: relative; display: grid; grid-template-columns: 9px 1fr; gap: 0 9px; align-items: baseline; font-size: 13px; line-height: 1.35; }
.tr-moats li::before { content: ""; position: absolute; left: -16px; top: .68em; width: 11px; height: 1px; background: rgba(61, 94, 74, .45); }
.tr-moats li::after { content: ""; position: absolute; left: -16px; top: 0; bottom: -7px; width: 1px; background: rgba(61, 94, 74, .45); }
.tr-moats li:first-child::after { top: -4px; }
.tr-moats li:last-child::after { bottom: auto; height: calc(.68em + .5px); }
.tr-box { width: 9px; height: 9px; border: 1.25px solid var(--accent); border-radius: 2px; box-sizing: border-box; transform: translateY(.5px); }
.tr-moats b { font-weight: 600; }
.tr-moats i { font-style: normal; color: var(--ink-soft); }
.tr-key.open .tr-moats li { animation: tr-in 320ms var(--ease) both; }
.tr-key.open .tr-moats li:nth-child(n) { animation-delay: calc(var(--m, 0) * 35ms); }
@keyframes tr-in { from { opacity: 0; transform: translateX(-6px); } }
.tr-v { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-soft); } .tr-v a { color: inherit; }
/* draw-in (motion.js adds .pre, then .on when the tree scrolls into view; skipped with reduced motion) */
.tr.pre .tr-list::before { transform: scaleY(0); }
.tr.pre .tr-n, .tr.pre .tr-ph, .tr.pre .tr-end { opacity: 0; }
.tr.on .tr-list::before { transform: scaleY(1); transition: transform 1600ms cubic-bezier(.45, .05, .25, 1); }
.tr.on .tr-n, .tr.on .tr-ph, .tr.on .tr-end { opacity: 1; transition: opacity 500ms var(--ease) calc(var(--k, 0) * 130ms + 120ms); }
.tr.on .tr-end { transition-delay: 1400ms; }
.tr.done .tr-n { transition: opacity 220ms var(--ease); }
@media (prefers-reduced-motion: reduce) { .tr *::after { transition: none !important; } }

/* the annotated report page */
.doc { position: relative; display: grid; grid-template-columns: 1fr 164px; gap: 0 32px; }
.doc-page { background: var(--ui); border: 1px solid var(--rule); border-radius: 6px; padding: 22px 26px 20px; font-size: 15px; line-height: 1.55; }
.doc-page h4 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin: 0 0 10px; }
.doc-page p { margin: 0 0 12px; }
.doc-page p:last-child { margin: 0; }
.doc-page .doc-meta { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; }
.an { background: var(--tint); box-decoration-break: clone; -webkit-box-decoration-break: clone; border-radius: 2px; padding: 0 1px; }
.an-n { font-size: 11px; font-weight: 600; color: var(--accent); margin-left: 2px; }
.doc-notes { list-style: none; margin: 0; padding: 0; }
.doc-notes li { position: absolute; right: 0; width: 164px; background: var(--ui); color: var(--accent); font-size: 13px; font-weight: 600; line-height: 1.3; padding: 7px 12px 8px; border: 1px solid var(--rule); border-radius: 14px; }
.doc-notes .an-n { display: inline-block; margin: 0 6px 0 0; font-size: 13px; opacity: .6; }
.doc-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.doc-lines path { fill: none; stroke: var(--ink-soft); stroke-opacity: .5; stroke-width: 1; }
.doc-lines circle { fill: var(--accent); }

/* two-pager pages */
.pgs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pg { margin: 0; }
.pg-link { position: relative; display: block; border-radius: 6px; overflow: hidden; background: var(--ui); border: 1px solid var(--rule); }
.pg img { display: block; width: 100%; height: auto; }
.pg-open { position: absolute; right: 8px; bottom: 8px; background: var(--accent); color: var(--bg-panel); font-size: 12px; line-height: 28px; padding: 0 10px; border-radius: 999px; opacity: 0; transition: opacity 200ms var(--ease); }
.pg-link:hover .pg-open, .pg-link:focus-visible .pg-open { opacity: 1; }
.pg figcaption { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
/* AI Terms page (revision 12) */
.eps { list-style: none; margin: 0; padding: 0; }
.eps li { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: baseline; padding: 12px 0; }
.eps li + li { border-top: 1px solid var(--rule); }
.ep-n { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ep-t b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.ep-t span { font-size: 15px; color: var(--ink-soft); }
.ep-l { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.shot.still img { aspect-ratio: 16 / 9; }

/* ---------- tablets and phones ---------- */
@media (max-width: 959px) {
  .hero { grid-template-columns: 1fr; padding: 40px var(--pad); gap: 28px; }
  .hero-v { min-height: 0; padding: 24px 0; }
  .forest { width: min(100%, 460px); }
}
@media (max-width: 699px) {
  .hero { padding: 32px var(--pad) 28px; }
  .hero-t > p { font-size: 16px; }
  .forest { width: 100%; }
  .fx-story text { font-size: 11px; }
  .fx { gap: 10px; }
  .fit-in { font-size: 16px; margin-bottom: 18px; }
  .fit, .fit-note { display: none; }
  .fm { display: block; }
  .posts a { grid-template-columns: 58px 1fr auto; gap: 14px; }
  .dt b { font-size: 22px; }
  .plate.dark { grid-template-columns: 1fr; padding: 32px var(--pad); }
  .round { grid-column: 1; grid-row: auto; margin-top: 12px; }
  .title { padding-top: 32px; padding-bottom: 26px; }
  .nx-name { font-size: 26px; }
  .nav nav a { padding: 6px 10px; }
  .funnel { grid-template-columns: repeat(2, auto); }
  .funnel .to { padding-left: 0; }
  .funnel .to::before { display: none; }
  .tr { --arm: 30px; }
  .tr-root, .tr-ph, .tr-end { text-align: left; }
  .tr-root { padding-left: 2px; }
  .tr-src-k { text-align: left; }
  .tr-srcs { grid-template-columns: 1fr; gap: 8px; padding-bottom: 0; }
  .tr-srcs::after, .tr-sc::after, .tr-also::before, .tr-src::after { display: none; }
  .tr-list::before, .tr-list::after, .tr-dot { left: 8px; }
  .tr-n { grid-template-columns: 1fr; }
  .tr-follow { margin-top: 0; }
  .tr-l .tr-c, .tr-r .tr-c { grid-column: 1; flex-direction: row; text-align: left; padding: 0 0 0 calc(var(--arm) + 8px); }
  .tr-l .tr-arm, .tr-r .tr-arm { left: 8px; right: auto; }
  .tr-l .tr-arm::after { transform-origin: left; }
  .tr-ic { width: 30px; height: 30px; margin-top: -5px; }
  .doc { display: block; }
  .doc-notes { margin: 14px 0 0; display: grid; gap: 8px; }
  .doc-notes li { position: static; width: auto; }
  .doc-lines { display: none; }
  .pgs { grid-template-columns: 1fr; }
  .pg-open { opacity: 1; }
  .tp { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 10px; }
  .tp-sheet { padding: 18px 16px 12px; }
  .nav { gap: 8px; }
  .nav nav a { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}
.stills { display: grid; gap: 28px; }

/* ---------- R14: LexiAI plain highlights (one plate, one column) ---------- */
.lx { padding: 56px var(--pad) 40px; }
.lx-top p { margin: 16px 0 0; font-size: 19px; color: var(--ink-soft); max-width: none; }
.lx-h { margin-top: 56px; }
.lx-h h2 { font-size: 21px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.lx-h p { margin: 8px 0 0; font-size: 16px; color: var(--ink-soft); max-width: none; }
.lx-shot { margin: 20px 0 0; padding: 24px; background: #e9e8e4; border: 1px solid rgba(10, 10, 10, .08); border-radius: 12px; }
.lx-shot img { display: block; width: 100%; height: auto; margin: 0 auto; border-radius: 6px; }
.lx-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-soft); }
.lx-foot p { margin: 0; }
.try-live { font-weight: 600; text-decoration: none; }
.try-live:hover { text-decoration: underline; }
@media (max-width: 699px) {
  .lx { padding: 36px var(--pad) 28px; }
  .lx-h { margin-top: 40px; }
  .lx-shot { padding: 12px; border-radius: 10px; }
}

/* ---------- R38: AI Terms film pages — a swipeable row of key slides (assets/slides.js) ---------- */
.ss { position: relative; min-width: 0; max-width: 100%; }
.research main, #slides { min-width: 0; }
.ss-track { display: flex; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 8px; outline-offset: 4px; }
.ss-track::-webkit-scrollbar { display: none; }
.ss-s { flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.ss-img { display: block; width: 100%; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: #f1ebdf; cursor: zoom-in; }
.ss-img img { display: block; width: 100%; height: auto; }
.ss-s figcaption { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); max-width: none; }
.ss-s figcaption b { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ss-bar { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.ss-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.ss-btn:hover:not(:disabled), .ss-btn:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--bg-panel); }
.ss-btn:disabled { opacity: .35; cursor: default; }
.ss-n { min-width: 4.5em; text-align: center; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ss-n b { color: var(--ink); font-weight: 600; }
.ss-fs { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); cursor: pointer; }
.ss-fs:hover { text-decoration: underline; text-underline-offset: 3px; }
/* full screen: the whole slideshow fills the window (also the fallback where the Fullscreen API is missing, e.g. iPhone) */
.ss.is-full { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: center; padding: 16px; background: #14140f; }
.ss.is-full .ss-track { flex: 0 1 auto; }
.ss.is-full .ss-s { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ss.is-full .ss-img { width: auto; max-width: 100%; border-color: transparent; cursor: zoom-out; }
.ss.is-full .ss-img img { width: auto; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
.ss.is-full figcaption { width: 100%; color: #d9d6cc; text-align: center; }
.ss.is-full figcaption b { color: #9cc3a9; }
.ss.is-full .ss-bar { border-color: rgba(243, 242, 239, .15); }
.ss.is-full .ss-btn { color: var(--bg-panel); border-color: rgba(243, 242, 239, .3); }
.ss.is-full .ss-n, .ss.is-full .ss-n b { color: var(--bg-panel); }
.ss.is-full .ss-fs { color: #9cc3a9; }
@media (max-width: 699px) {
  .ss-s figcaption { font-size: 14px; }
  .ss-btn { width: 44px; height: 44px; }
}
html:has(.ss.is-full) { overflow: hidden; }

/* ======================================================================================
   R40 taste layer (approved in R43). Ported from _src/mock-taste/assets/taste.css.
   ====================================================================================== */
/* A. tracked capitals -> sentence case, nothing under 13px, soft 3-16px radius -> square */
.plate { border-radius: 0; }
.ph h2 { text-transform: none; letter-spacing: 0; }
.ph h2 { font-size: 13px; }
.ph .pm { font-size: 13px; }
.shot { border-radius: 0; }
.shot .bar { font-size: 13px; }
.fig-n { text-transform: none; letter-spacing: 0; }
.fig-n { font-size: 13px; }
.fit-k { text-transform: none; letter-spacing: 0; }
.fit-k { font-size: 13px; }
.nd { border-radius: 0; }
.vp small { font-size: 13px; }
.fm-c { border-radius: 0; }
.fm-k { text-transform: none; letter-spacing: 0; }
.fm-k { font-size: 13px; }
.fm-n { border-radius: 0; }
.fm-n > a::after { border-radius: 0; }
.fm-e li { font-size: 13px; }
.fm-br span { font-size: 13px; }
.dt span { text-transform: none; letter-spacing: 0; }
.dt span { font-size: 13px; }
.nx-k { text-transform: none; letter-spacing: 0; }
.nx-k { font-size: 13px; }
.tr-root span { font-size: 13px; }
.tr-src-k { text-transform: none; letter-spacing: 0; }
.tr-src-k { font-size: 13px; }
.tr-sc { border-radius: 0; }
.tr-sc span { font-size: 13px; }
.tr-also { font-size: 13px; }
.tp { border-radius: 0; }
.tp-sheet { border-radius: 0; }
.tp-k { font-size: 13px; }
.tp-k span { text-transform: none; letter-spacing: 0; }
.tp-k span { font-size: 13px; }
.tp-b { border-radius: 0; }
.tp-n { font-size: 13px; }
.tp-d { font-size: 13px; }
.tp-f { text-transform: none; letter-spacing: 0; }
.tp-f { font-size: 13px; }
.tp-h { text-transform: none; letter-spacing: 0; }
.tp-h { font-size: 13px; }
.tr-ph span { text-transform: none; letter-spacing: 0; }
.tr-ph span { font-size: 13px; }
.tr-num { font-size: 13px; }
.tr-v { font-size: 13px; }
.doc-page { border-radius: 0; }
.doc-notes li { border-radius: 0; }
.pg-link { border-radius: 0; }
.pg-open { font-size: 13px; }
.ep-n { text-transform: none; letter-spacing: 0; }
.ep-n { font-size: 13px; }
.lx-shot { border-radius: 0; }
.lx-shot img { border-radius: 0; }
.ss-track { border-radius: 0; }
.ss-img { border-radius: 0; }
.ss-s figcaption b { text-transform: none; letter-spacing: 0; }
.ss-s figcaption b { font-size: 13px; }

/* B. restyle */
/* ---- type: one family (Work Sans, set above), five working sizes: 14 small · 17 body · 21 lead · 32 heading · display ---- */
h1 { font-weight: 500; letter-spacing: -.045em; line-height: .98; font-size: clamp(48px, 6.6vw, 96px); }
h3 { font-weight: 500; }
:is(.dark h2, .nx-name, .funnel dt, .doc-page h4) { font-weight: 500; }

/* ---- surfaces: plates are a tone step, nothing else. No grain, no corner dots, no shadow, square corners ---- */
.plate, .plate.dark { box-shadow: none; background-image: none; border-radius: 0; }

/* ---- section heads: the green number tab + tiny capitals + hairline strip becomes a real heading ---- */
.ph { margin: 0 0 28px; padding: var(--pad) 0 0; border-bottom: 0; align-items: baseline; gap: 14px; }
.ph h2 { font-family: var(--display); font-size: 32px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; text-transform: none; }
.ph .pm { font-size: 14px; letter-spacing: 0; }

/* ---- home ---- */
.hero h1 mark { background: none; padding: 0; }
.hero-t > p { font-size: 19px; max-width: none; }
.links { font-size: 17px; }
.fit-in { font-size: 19px; }
/* the map: the two clusters become quiet filled fields instead of dashed outlines; cards are white on the field, no outline */
.fit .cl { fill: rgba(10, 10, 10, .035); stroke: none; }
.fit-k { transform: translate(18px, 16px); background: none; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.nd { border-color: transparent; border-radius: 0; }
.nd small { font-size: 14px; }
.vp { border: 0; background: var(--ui); }
.fit-note { border-top: 0; padding-top: 0; font-size: 14px; }
.fm-c { border: 0; border-radius: 0; background: rgba(10, 10, 10, .035); padding: 12px 10px 10px; }
.fm-k { margin: 0 0 8px 4px; background: none; padding: 0; font-size: 14px; color: var(--ink); }
.fm-n { border-color: transparent; border-radius: 0; }
.fm-n > a::after { border-radius: 0; }
.fm-e { border-top: 0; padding-top: 2px; }
.fm-e li { font-size: 13px; }
.fm-br span { outline: 0; background: var(--tint); }
.posts li + li { border-top: 0; }
.posts a { padding: 12px 0; }
.dt { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .3em; align-items: baseline; font-size: 14px; color: var(--ink-soft); }
.dt b { font: inherit; font-weight: 500; letter-spacing: 0; }
.dt span { font-size: inherit; font-weight: 500; }
.pt b { font-size: 21px; font-weight: 500; letter-spacing: -.015em; }
.pt span { font-size: 17px; }
.go { border-color: transparent; background: var(--bg-outer); }
.dark h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; }
.round a { border-color: transparent; background: rgba(243, 242, 239, .12); }
footer.site { font-size: 14px; }

/* ---- project pages ---- */
.title .lead { font-size: 21px; font-weight: 500; }
.title .what { font-size: 19px; }
.title .meta { font-size: 14px; gap: 4px 18px; }
.title .meta span { border-right: 0; padding-right: 0; margin-right: 0; }
.lx-top p { font-size: 21px; color: var(--ink); }
.lx-h { margin-top: 72px; }
.lx-h h2 { font-size: 32px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.lx-h p { margin-top: 12px; font-size: 17px; color: var(--ink); }
.lx-shot { border: 0; }
.lx-shot img, .lx-pic { border-radius: 0; }
.lx-foot { border-top: 0; padding-top: 0; font-size: 14px; }
.shot { border: 0; }
.shot .bar { border-bottom: 0; background: #ebeae6; }
.next { padding: 32px var(--pad); }
.nx-k { font-size: 14px; }
.nx-d { font-size: 17px; }

/* ---- research pages ---- */
.intro-l { font-size: 17px; color: var(--ink); }
.eps li + li { border-top: 0; }
.ep-t b { font-size: 21px; font-weight: 500; }
.ep-t span { font-size: 17px; }
.doc-page { border: 0; }
.doc-notes li { border-color: transparent; }
.pg-link { border: 0; border-radius: 0; }
.fig figcaption, .fig-c, .pg figcaption { font-size: 14px; }
.see { border-top: 0; padding-top: 0; font-size: 14px; }
.rules { font-size: 17px; }
.funnel dd { font-size: 14px; }
.said p { font-weight: 500; }
.ss-track, .ss-img { border-radius: 0; }
.ss-img { border: 0; }
.ss-s figcaption { font-size: 17px; color: var(--ink); }
.ss-s figcaption b { font-size: 14px; }
.ss-bar { border-top: 0; padding-top: 0; }
.ss-btn { border-color: transparent; background: var(--bg-outer); }

/* ---- startup research: the tree and the two-pager keep their drawing, lose the outlines ---- */
.tr-sc { border-color: transparent; background: var(--ui); border-radius: 0; }
.tr-sc-key { box-shadow: none; background: var(--tint); }
.tr-ph span { border: 0; background: var(--tint); font-size: 13px; }
.tr-root span { font-size: 14px; }
.tp { border: 0; border-radius: 0; }
.tp-sheet { box-shadow: none; border-radius: 0; }
.tp-f { border-top: 0; }
.lp { border: 0; border-radius: 0; }
.fw-end p { border: 0; border-radius: 0; background: var(--tint); }

@media (max-width: 699px) {
  .ph h2 { font-size: 26px; }
  .hero-t > p { font-size: 18px; }
  .pt b { font-size: 19px; }
  .pt span { font-size: 15px; }
  .lx-top p { font-size: 19px; }
  .lx-h h2 { font-size: 26px; }
  .lx-h { margin-top: 56px; }
}

/* ---- round 2 ---- */
.hero h1 { font-size: clamp(44px, 4.9vw, 70px); }
.fm-e li { font-size: 12.5px; letter-spacing: -.005em; }
.tp-f { color: var(--ink-soft); }
.ck-h { border-bottom: 0; padding-bottom: 0; }
.ck-l li + li { border-top: 0; }
.ck-card { border-radius: 0; }
.rv-row { border-top: 0; padding-top: 0; }
.rv-s b { font-weight: 500; }
.tr-q { font-size: 15px; }
.tr-m { font-size: 14px; }
@media (max-width: 699px) { .back { padding: 10px 10px; } }
/* one left edge: the nav wordmark and the footer line up with the text inside the plates */
.nav { padding: 12px var(--pad); }
footer.site { padding: 18px var(--pad) 28px; }
@media (max-width: 699px) {
  .fm-e { margin-left: 0; }
  .fm-e li { font-size: 13px; letter-spacing: 0; }
}
/* cluster labels sit just above their field (inside it they hid under the top-left card); square fields */
.fit-k { transform: translate(2px, calc(-100% - 2px)); }
.fit .cl { rx: 0; }
@media (max-width: 699px) {
  .nav { padding: 10px 12px 10px 14px; }
  .nav .home { white-space: nowrap; }
  .fit-in { font-size: 17px; }
}

/* ======================================================================================
   R41 layer (approved in R43): project and research pages at 1160px, margin notes, entrance motion.
   ====================================================================================== */
/* ================= 1. width: project and research pages match the homepage ================= */
.page.narrow { max-width: 1160px; }
/* intros, subtitles and captions run the full content width */
main :is(.lx-top p, .lx-h > p, .title .what, .title .lead, .intro-l, figcaption, .fig-c, .lx-foot p) { max-width: none; }

/* highlights at the wider width: the picture keeps its column, and its numbered callout moves beside it as a
   margin note, top-aligned with the picture. Two pictures in one highlight stack, each with its own note. */
@media (min-width: 1000px) {
  .lx-shot { display: grid; grid-template-columns: minmax(0, 1fr) 216px; column-gap: 36px; row-gap: 28px; align-items: start; padding: 32px; }
  .lx-shot > .lx-pic { grid-column: 1; margin: 0 auto; }
  /* a full-width crop (no inline width) fills its column; without this a lazy image could collapse to 0 wide (R43 fix) */
  .lx-shot > .lx-pic:not(.lx-card) { width: 100%; }
  .lx-shot > .lx-note { grid-column: 2; width: auto !important; margin: 0; padding-top: 2px;
    flex-direction: column; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; }
  .lx-shot > .lx-note + .lx-pic { margin-top: 0; }
  /* a highlight with no callout (rare) keeps the whole width */
  .lx-shot:not(:has(.lx-note)) { grid-template-columns: minmax(0, 1fr); }
}

/* ================= 2. entrance motion (only while <html> has .m41: JS on, motion allowed; assets/entrance.js adds .in).
   The list of what fades in is repeated in entrance.js: change both together. ================= */
:root { --out: cubic-bezier(.2, .7, .2, 1); }
/* before: faded, a few px low */
.m41 :is(.lx-top > *, .title > *, .lx-h > h2, .lx-h > p, .lx-pic, .lp, .lx-coda, .lx-foot, main > .plate > .ph, .intro-l, .posts li, .doc-page, .pg, .ss, .tp-sheet, .see, main > .next, .ep-list > li, .yt-embed) { transition: opacity 520ms var(--out) var(--d, 0ms), transform 520ms var(--out) var(--d, 0ms); }
.m41 :is(.lx-top > *, .title > *, .lx-h > h2, .lx-h > p, .lx-pic, .lp, .lx-coda, .lx-foot, main > .plate > .ph, .intro-l, .posts li, .doc-page, .pg, .ss, .tp-sheet, .see, main > .next, .ep-list > li, .yt-embed):not(.in) { opacity: 0; transform: translateY(6px); }
/* pictures rise a touch more and a touch slower */
.m41 :is(.lx-pic, .ss, .doc-page, .pg, .tp-sheet, .yt-embed) { transition-duration: 600ms; }
.m41 :is(.lx-pic, .ss, .doc-page, .pg, .tp-sheet, .yt-embed):not(.in) { transform: translateY(10px); }

/* the numbered callout arrives after its picture: the ring settles onto its target, then the note slides in */
.m41 .lx-pic .lx-ring { transition: opacity 420ms var(--out) calc(var(--d, 0ms) + 380ms), transform 420ms var(--out) calc(var(--d, 0ms) + 380ms); }
.m41 .lx-pic:not(.in) .lx-ring { opacity: 0; transform: scale(1.04); }
.m41 .lx-shot > .lx-note { transition: opacity 400ms var(--out), transform 400ms var(--out); }
.m41 .lx-shot > .lx-pic:not(.in) + .lx-note { opacity: 0; transform: translateX(-6px); }
.m41 .lx-shot > .lx-pic.in + .lx-note { transition-delay: calc(var(--d, 0ms) + 480ms); }
/* narrow screens: the note sits under the picture, so it rises instead of sliding */
@media (max-width: 999px) { .m41 .lx-shot > .lx-pic:not(.in) + .lx-note { transform: translateY(4px); } }

/* the slideshow: prev / next fade between slides (slides.js adds .ss-out for 180ms around the jump) */
.ss-track { transition: opacity 320ms var(--out); }
.ss-track.ss-out { opacity: 0; transition-duration: 180ms; transition-timing-function: ease-in; }

@media (prefers-reduced-motion: reduce) {
  .ss-track, .ss-track.ss-out { transition: none; opacity: 1; }
}

/* ---------- R46: hero eyes + colour (approved R45 mock A+B; markup in hero_story() in build.py) ---------- */
/* R46 hero eyes (the approved R42 option A). assets/eyes.js moves .look toward the cursor (or the last tap) and blinks .lid; the eased
   follow is this transition. Breathing is CSS: body + head of the final pose, 1 -> 1.02 and back over 5s, scaled from
   where she sits so nothing slides. Reduced motion: no breathing, no blinks (style.css stops all animation and
   transitions), the eye still turns to the cursor. */
.fx-story .look { transition: transform .14s cubic-bezier(.16, 1, .3, 1); }
.fx-story .lid { transform-box: fill-box; transform-origin: center; }
.fx-story .breathe { transform-box: view-box; transform-origin: 66px 150px; }
.fx.tell .fx-story .breathe { animation: a-breathe 5s ease-in-out 6.6s infinite; }
@keyframes a-breathe { 0%, 100% { transform: none; } 45% { transform: scale(1.02); } }

/* R46 hero colour (the approved R45 colour A+B): pollen first, then glow, then aurora, so the two ideas take turns instead of fighting.
   3.7s   16 coloured motes rise once out of the open book and fade out by ~7.6s (never loop)
   5.6s   once the tree has grown, a warm apricot glow settles under the canopy, then breathes slowly (8s)
   7.6s   with the pollen gone, the pastel aurora (mint left, lilac right, coral over the crown) fades in behind the
          tree and drifts on its own slow loops (19-29s); the falling leaves take tinted edges and their words a halo
   Blink motes are drawn by assets/pollen.js. Without .tell (no JS, reduced motion): aurora, glow and tints shown, still;
   no pollen. Paused off screen by hero.js. */
.fx-story { --au-t: 7.6s; }

/* pollen */
.fx-story .pn { opacity: 0; transform-box: fill-box; transform-origin: center; }
.fx.tell .fx-story .pn { animation: pn-rise var(--s) cubic-bezier(.2, .6, .35, 1) var(--t) both; }
@keyframes pn-rise {
  0% { opacity: 0; transform: none; }
  18% { opacity: .95; }
  70% { opacity: .65; }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(.7); }
}

/* warm glow under the canopy */
.fx-story .wglow { transform-box: view-box; transform-origin: 156px 106px; opacity: .85; }
.fx.tell .fx-story .wglow { animation: wg-in 2s cubic-bezier(.16, 1, .3, 1) 5.6s both, wg-breathe 8s ease-in-out 7.6s infinite; }
@keyframes wg-in { from { opacity: 0; transform: scale(.8); } to { opacity: .85; transform: none; } }
@keyframes wg-breathe { 0%, 100% { opacity: .85; } 50% { opacity: .66; } }

/* soft aurora */
.fx-story .au { transform-box: view-box; transform-origin: 156px 80px; }
.fx.tell .fx-story .aur { animation: au-in 2.6s cubic-bezier(.16, 1, .3, 1) var(--au-t) both; }
.fx.tell .fx-story .au { animation: var(--a) var(--s) ease-in-out var(--au-t) infinite alternate both; }
@keyframes au-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes au-1 { from { transform: none; } to { transform: translate(9px, -6px) scale(1.06); } }
@keyframes au-2 { from { transform: none; } to { transform: translate(-10px, 5px) scale(1.08); } }
@keyframes au-3 { from { transform: translate(-6px, 0); } to { transform: translate(8px, 4px) scale(.95); } }

/* leaf edges, by where each leaf falls: 1 + 4 mint (left), 2 coral (top), 3 + 5 lilac (right) */
.fx-story .lf { --edge: #7fbf9c; --halo: #c4e6d4; }
.fx-story .lf:nth-child(2) { --edge: #e29c84; --halo: #f6cdbd; }
.fx-story .lf:is(:nth-child(3), :nth-child(5)) { --edge: #a593d3; --halo: #ddd0f0; }
.fx-story .lf-l path { stroke: var(--edge); stroke-width: 1.2; paint-order: stroke; }
.fx-story .lf text { stroke: var(--halo); stroke-width: 2; stroke-opacity: .8; stroke-linejoin: round; paint-order: stroke; }
/* the tints arrive with the aurora, not before it */
.fx.tell .fx-story .lf-l path { animation: au-edge 2.6s ease var(--au-t) both; }
.fx.tell .fx-story .lf text { animation: lf-word 6s linear var(--t) infinite both, au-edge 2.6s ease var(--au-t) both; }
@keyframes au-edge { from { stroke-opacity: 0; } }

/* ---- R48: homepage intro, one sentence per line ----
   each sentence is its own <p>. A sentence that has to wrap splits into even halves (no one-word last line),
   and sentences sit a touch further apart than wrapped lines, so a wrap never reads as a new sentence. */
.hero-t > p:not(.links) { text-wrap: balance; line-height: 1.45; margin-bottom: 10px; }

/* ---- R49: the greeting breathes ----
   "Hi! I'm Janet" inherited the display h1's -.045em tracking, which pinched the letters together at this size.
   Neutral tracking plus a little extra word space; size and weight unchanged. Greeting only — other h1s keep theirs. */
.hero h1 { letter-spacing: 0; word-spacing: .06em; }

/* ---- R52 → R55 → R58: the Research list on the homepage (#research, replaces Writing) ----
   one plate: heading + count, a full-width intro line, then two groups (Startups, AI Term Explainer).
   Each group = head (name, count, a short grey blurb with an underlined link to the method page, a thin rule) → the
   finished pieces as R53 option A rows (date · title · arrow). R58: the R55 framework lists are gone from here. */
.rs-what { margin: -14px 0 0; font-size: 19px; max-width: none; }
.rs-g { margin-top: 40px; }
.rs-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-bottom: 10px; }
.rs-h h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 21px; letter-spacing: -.015em; line-height: 1.2; }
.rs-h h3 span { font-size: 14px; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.rs-h p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.rs-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rs-rows li { border-bottom: 1px solid var(--rule); }
.rs-rows a { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; min-height: 52px; padding: 6px 0; color: var(--ink); text-decoration: none; }
.rs-dt { font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rs-t { font-size: 19px; font-weight: 500; letter-spacing: -.012em; line-height: 1.3; transition: color 200ms var(--ease); }
.rs-rows .go { width: 28px; height: 28px; font-size: 13px; }
.rs-rows a:hover .rs-t, .rs-rows a:focus-visible .rs-t { color: var(--accent); }
.rs-rows a:hover .go, .rs-rows a:focus-visible .go { background: var(--accent); color: var(--bg-panel); transform: translateX(2px); }
@media (max-width: 699px) {
  .rs-what { margin-top: -10px; font-size: 18px; }
  .rs-g { margin-top: 32px; }
  .rs-h h3 { font-size: 19px; }
  .rs-h p { font-size: 14.5px; flex-basis: 100%; }
  .rs-rows a { grid-template-columns: 1fr auto; grid-template-areas: "dt go" "t go"; gap: 0 12px; padding: 9px 0; }
  .rs-dt { grid-area: dt; font-size: 12.5px; line-height: 1.3; }
  .rs-t { grid-area: t; font-size: 17.5px; }
  .rs-rows .go { grid-area: go; }
}


/* ---- R60: homepage section heads get an icon (R59 option A) and a highlighter wash under the blurb's opening phrase (R54 option C) ----
   Icons are static. The .ph row is baseline-aligned, so the svg's bottom edge sits on the heading baseline; the nudge
   centres the drawn glyph on the cap height, and the negative margin turns the row's 14px gap into ~11px of visible air.
   The wash is written in its finished state; only html.hl-arm (set by the homepage's head script, never under reduced
   motion) hides it until the section's heading scrolls in (.hl-on). Only background-size moves.
   R61: the wash covers the whole blurb; box-decoration-break: clone gives each wrapped line its own band, all drawn together. */
.ph .ti { flex: none; display: block; width: 24px; height: 24px; margin-right: -6px; transform: translateY(1.5px); color: #4f735c; }
.hl { background: linear-gradient(rgba(61, 94, 74, .2), rgba(61, 94, 74, .2)) no-repeat 0 90% / 100% .46em; padding: 0 .06em; margin: 0 -.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-arm .hl-sec .hl { background-size: 0% .46em; transition: background-size 900ms cubic-bezier(.16, 1, .3, 1) 180ms; }
.hl-arm .hl-sec.hl-on .hl { background-size: 100% .46em; }
@media (max-width: 699px) { .ph .ti { width: 20px; height: 20px; margin-right: -5px; transform: translateY(1.4px); } }

/* R63: a shorter hero stage on phones. The forest grows into the space under the links, so keep just enough of it:
   no stage padding, a small gap, and a slightly narrower drawing. Desktop and tablet are unchanged. */
@media (max-width: 600px) {
  .hero { gap: 10px; padding-bottom: 20px; }
  .hero-v { padding: 0; }
  .forest { width: 90%; }
}

/* ---------- R64: guided demos (assets/demo.js; markup: demo_html in _src/build.py) ---------- */
.dm { --dm-accent: #3d5e4a; margin-top: 64px; }
.dm h2 { font-size: 21px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.dm > p { margin: 8px 0 0; font-size: 16px; color: var(--ink-soft); max-width: none; }
.dm-stage { position: relative; aspect-ratio: 16 / 10; margin-top: 20px; background: #e9e8e4; border: 1px solid rgba(10, 10, 10, .08); border-radius: 12px; overflow: hidden; }
.dm-frame { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity 420ms var(--out), visibility 0s 420ms; }
.dm-frame.on { opacity: 1; visibility: visible; transition: opacity 420ms var(--out); }
.dm-stage.typing .dm-frame { opacity: 0; visibility: hidden; }
.dm-pic { position: relative; width: 92%; }
.dm-pic img { display: block; width: 100%; height: 100%; border-radius: 6px; box-shadow: 0 1px 3px rgba(10, 10, 10, .08); }
.dm-hit { position: absolute; padding: 0; margin: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; transition: border-color 280ms, box-shadow 280ms; }
.dm-hit.lit { border-color: var(--dm-accent); box-shadow: 0 0 0 4px rgba(61, 94, 74, .14); }
.dm-hit:focus-visible { outline: 2px solid var(--dm-accent); outline-offset: 2px; }
.dm-cursor { position: absolute; left: 0; top: 0; z-index: 3; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(20, 20, 18, .3); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(10, 10, 10, .2); pointer-events: none; opacity: 0;
  transition: transform 950ms cubic-bezier(.45, .05, .25, 1), opacity 300ms, scale 160ms; }
.dm-cursor.on { opacity: 1; }
.dm-cursor.down { scale: .8; }
.dm-cursor::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--dm-accent); opacity: 0; }
.dm-cursor.down::after { animation: dm-ripple 600ms var(--out); }
@keyframes dm-ripple { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
.dm-type { position: absolute; left: 50%; top: 50%; z-index: 2; width: min(86%, 600px); translate: -50% -50%; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  background: #fff; border: 1px solid rgba(10, 10, 10, .1); border-radius: 14px; box-shadow: 0 6px 20px rgba(10, 10, 10, .07); opacity: 0; visibility: hidden; transition: opacity 320ms var(--out), visibility 0s 320ms; }
.dm-stage.typing .dm-type { opacity: 1; visibility: visible; transition: opacity 320ms var(--out); }
.dm-typed { flex: 1; min-width: 0; min-height: 2.9em; font-size: 15px; line-height: 1.45; color: var(--ink); }
.dm-typed::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -.18em; background: currentColor; animation: dm-blink 1s steps(1) infinite; }
@keyframes dm-blink { 50% { opacity: 0; } }
.dm-send { flex: none; padding: 7px 14px; border-radius: 999px; background: #1e1c1a; color: #fff; font-size: 13.5px; font-weight: 600; transition: background 200ms; }
.dm-send.down { background: var(--dm-accent); }
/* every caption sits in one cell, so the box keeps the tallest one's height and nothing below moves */
.dm-caps { display: grid; margin-top: 14px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.dm-caps p { grid-area: 1 / 1; margin: 0; max-width: none; }
.dm-caps p[aria-hidden] { visibility: hidden; }
.dm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 14px; }
.dm-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dm-step, .dm-ctrl button { font: inherit; font-size: 13px; line-height: 1.3; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink-soft); cursor: pointer; }
.dm-step[aria-current] { border-color: var(--dm-accent); color: var(--dm-accent); background: rgba(61, 94, 74, .07); }
.dm-ctrl { display: flex; gap: 6px; }
.dm-ctrl[hidden] { display: none; }
.dm-ctrl button { color: var(--ink); font-weight: 550; }
.dm-ctrl [data-act=play] { min-width: 88px; }
.dm :is(.dm-step, .dm-ctrl button):hover { border-color: var(--ink-soft); }
.dm :is(.dm-step, .dm-ctrl button):focus-visible { outline: 2px solid var(--dm-accent); outline-offset: 2px; }
@media (max-width: 699px) {
  .dm { margin-top: 48px; }
  .dm-stage { aspect-ratio: 4 / 3; border-radius: 10px; }
  .dm-hit { border-radius: 6px; }
  .dm-type { width: 92%; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; }
  .dm-typed { font-size: 12.5px; }
  .dm-send { padding: 5px 10px; font-size: 12px; }
  .dm-caps { font-size: 14.5px; }
  .dm-step, .dm-ctrl button { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { .dm *, .dm *::after { transition: none !important; animation: none !important; } }

/* R64: a real podcast clip under its crop */
.lx-audio { margin: 12px auto 0; }
.lx-audio audio { display: block; width: 100%; height: 40px; }
.lx-audio p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); max-width: none; }
@media (min-width: 1000px) { .lx-shot > .lx-audio { grid-column: 1; width: 100% !important; margin: -14px 0 0; } }

/* ---------- R65: sound in the guided demo (assets/demo.js) ---------- */
/* "Sound on" is the one filled control, so it reads first; once on it turns into a quiet "Mute" like Pause/Replay */
.dm .dm-ctrl .dm-sound[aria-pressed=false] { background: var(--dm-accent); border-color: var(--dm-accent); color: #fff; }
.dm .dm-ctrl .dm-sound[aria-pressed=false]:hover { background: #2f4a3a; border-color: #2f4a3a; }
.dm-sound { min-width: 104px; }
/* over the stage, top right, so showing it never moves anything */
.dm-hint { position: absolute; top: 12px; right: 12px; z-index: 4; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; padding: 6px 12px; border-radius: 999px; border: 0;
  background: rgba(30, 28, 26, .86); color: #fff; box-shadow: 0 4px 14px rgba(10, 10, 10, .16); cursor: pointer; animation: dm-hint-in 360ms var(--out); }
.dm-hint[hidden] { display: none; }
.dm-hint:hover { background: #1e1c1a; }
.dm-hint:focus-visible { outline: 2px solid var(--dm-accent); outline-offset: 2px; }
@keyframes dm-hint-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 699px) {
  .dm-hint { top: 8px; right: 8px; font-size: 12px; padding: 5px 10px; }
  .dm-sound { min-width: 96px; }
}

/* ---------- R66: LexiSpeak's recorded run (video_demo_html in _src/build.py, assets/demo.js) ---------- */
/* the box is the video's own 16:10 at every width, so nothing moves when the poster or the video arrives */
.dm .dm-vstage, .dm .dm-vstage video { aspect-ratio: 16 / 10; }
.dm-vstage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #faf9f7; cursor: pointer; }
.dm-big { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 2; font: inherit; font-size: 16px; font-weight: 600; line-height: 1; padding: 14px 24px; border-radius: 999px; border: 0;
  background: rgba(30, 28, 26, .88); color: #fff; box-shadow: 0 6px 20px rgba(10, 10, 10, .2); cursor: pointer; }
.dm-big:hover { background: #1e1c1a; }
.dm-big:focus-visible { outline: 2px solid var(--dm-accent); outline-offset: 3px; }
.dm-big[hidden] { display: none; }
.dm-vcap { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); max-width: none; }
.dm-vcap span { font-variant-numeric: tabular-nums; color: var(--ink-faint, var(--ink-soft)); }
@media (max-width: 699px) { .dm .dm-vstage { aspect-ratio: 16 / 10; } .dm-big { font-size: 14px; padding: 11px 18px; } .dm-vcap { font-size: 13.5px; } }

/* ---------- Clay research page only: long title, smaller than the global 96px display size ---------- */
body.project.clay .title h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -.03em;
  line-height: 1.15;
}

/* ---------- LexiAI demo: in-sentence word pick (assets/demo.js) ---------- */
/* One card inside the LexiAI guided demo. Only words with a meaning are buttons. */
.dm-ctx { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 3.5% 4%; pointer-events: auto; }
.dm-ctx[hidden] { display: none; }
.dm-stage.typing .dm-ctx { visibility: hidden; pointer-events: none; }
.dm-ctx-card { width: min(100%, 720px); max-height: 100%; overflow: auto; background: var(--bg-panel, #f3f2ef); padding: 22px 26px 24px; color: var(--ink); }
.dm-ctx-label { margin: 0 0 10px; font-size: 14px; font-weight: 550; color: var(--dm-accent); letter-spacing: -.01em; }
.dm-ctx-s { margin: 0; font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; letter-spacing: -.02em; line-height: 1.4; color: var(--ink); }
.dm-ctx-w { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0 1px; margin: 0; border-radius: 5px; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; text-decoration-color: rgba(61, 94, 74, .55); }
.dm-ctx-w:hover { color: var(--dm-accent); }
.dm-ctx-w:focus-visible { outline: 2px solid var(--dm-accent); outline-offset: 2px; }
.dm-ctx-w[aria-current] { background: #f3e4a0; outline: 2px solid var(--dm-accent); text-decoration: none; }
.dm-ctx-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); max-width: none; }
.dm-ctx-k { margin: 18px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.dm-ctx-k i { font-style: italic; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.dm-ctx-def { margin: 0; font-size: clamp(16px, 2vw, 20px); font-weight: 550; letter-spacing: -.02em; line-height: 1.35; }
.dm-ctx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 16px; }
.dm-ctx-h { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.dm-ctx-pair > div:last-child .dm-ctx-h { color: #9a5420; }
.dm-ctx-pair p:not(.dm-ctx-h) { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
@media (max-width: 699px) {
  .dm-ctx { padding: 3%; }
  .dm-ctx-card { padding: 16px 16px 18px; }
  .dm-ctx-s { font-size: 16px; }
  .dm-ctx-def { font-size: 16px; }
  .dm-ctx-pair { grid-template-columns: 1fr; gap: 10px; }
  .dm-ctx-note { font-size: 12px; }
}

/* ---------- Granola magazine reader (research-granola.html) ---------- */
body.project.granola .title h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -.03em;
  line-height: 1.15;
}
.mag-embed {
  margin: 8px 0 4px;
  background: #3a3a3a;
  border-radius: 10px;
  overflow: hidden;
}
.mag-embed iframe {
  display: block;
  width: 100%;
  height: min(92vh, 1280px);
  min-height: 640px;
  border: 0;
  background: #3a3a3a;
}
@media (max-width: 699px) {
  .mag-embed iframe { height: min(88vh, 1100px); min-height: 560px; }
}

/* ---------- Project detail typography: restrained titles and Contact me ---------- */
/* Homepage hero name (.hero h1) is unchanged. Magazine issue typography lives inside each issue.html, not here. */
body.project .title h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  letter-spacing: -.03em;
  line-height: 1.15;
}
#contact.dark h2 {
  font-size: clamp(28px, 3.4vw, 36px);
  letter-spacing: -.03em;
  line-height: 1.15;
}

/* Homepage: a clear link from the short AI Term list to the full collection */
.rs-all { margin: 14px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.rs-all a { color: var(--ink); text-decoration: underline; text-underline-offset: .16em; }
.rs-all a:hover, .rs-all a:focus-visible { color: var(--accent); }

/* AI Term Explainer collection (projects/research-aiterm.html) */
.ep-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.ep-list > li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.ep-list .ep-top { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px 20px; align-items: baseline; }
.ep-list .ep-t { margin: 0; font-size: 21px; font-weight: 550; letter-spacing: -.015em; line-height: 1.25; }
.ep-list .ep-l { margin: 8px 0 0; font-size: 16px; line-height: 1.45; max-width: none; }
.ep-list .ep-watch { margin: 8px 0 0; font-size: 15px; font-weight: 500; }
.ep-list .ep-min { font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 699px) {
  .ep-list .ep-top { grid-template-columns: 1fr auto; }
  .ep-list .rs-dt { grid-column: 1; }
  .ep-list .ep-t { font-size: 19px; grid-column: 1; }
  .ep-list .ep-min { grid-column: 2; grid-row: 1 / span 2; }
}

/* Startup Research: public sources the skill is built on */
.sk-lib { margin-top: 8px; }
.sk-lib .tp-h { margin: 22px 0 0; }
.sk-refs { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.sk-refs > li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sk-refs p { margin: 0; font-size: 15px; line-height: 1.4; }
.sk-refs b { font-weight: 600; letter-spacing: -.01em; }
.sk-refs .sk-a { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.sk-refs .sk-d { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.sk-refs a { color: inherit; text-decoration: underline; text-underline-offset: .16em; }
.sk-refs a:hover, .sk-refs a:focus-visible { color: var(--accent); }
/* Collection pages: two watch links on one row */
.ep-watch a + a { margin-left: 14px; }

/* ---------- t241: Clay film embed + homepage identity line ---------- */
.yt-embed {
  margin: 12px 0 4px;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #3a3a3a;
}
.yt-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.hero-t h1 { margin-bottom: 8px; }
.hero-id {
  margin: 0 0 22px !important;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.4;
  color: var(--ink);
  max-width: 32em;
}
@media (max-width: 699px) {
  .hero-id { font-size: 16px; }
}

/* ---------- t242: restrained motion (research rows, anchors, arrows, view transitions) ---------- */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Homepage research rows: visible without JS; .rs-pre is applied only to off-screen rows. */
#research .rs-rows li {
  transition: opacity 800ms var(--ease-expo) var(--d, 0ms), transform 800ms var(--ease-expo) var(--d, 0ms);
}
#research .rs-rows li.rs-pre { opacity: 0; transform: translateY(16px); }

/* 2. AI Term collection: arriving at #ep-* — colour / left accent only, no travel. */
.ep-list > li {
  scroll-margin-top: 24px;
  transition: background-color 350ms ease, box-shadow 350ms ease;
}
.ep-list > li.ep-land {
  background-color: var(--tint);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* 3. Arrow micro-feedback: 4px, 360ms ease-out; press 140ms. Colour hover stays as it is. */
.rs-rows .go {
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 360ms var(--ease-out);
}
.rs-rows a:hover .go, .rs-rows a:focus-visible .go { transform: translateX(4px); }
.rs-rows a:active .go { transition-duration: 140ms; }

.link-go {
  display: inline-block;
  transition: transform 360ms var(--ease-out);
}
.hero-links a:hover .link-go,
.hero-links a:focus-visible .link-go,
a:hover .link-go,
a:focus-visible .link-go { transform: translateX(4px); }
.hero-links a:active .link-go,
a:active .link-go { transition-duration: 140ms; }

@media (prefers-reduced-motion: reduce) {
  #research .rs-rows li.rs-pre { opacity: 1; transform: none; }
  .rs-rows a:hover .go, .rs-rows a:focus-visible .go, .rs-rows a:active .go { transform: none; }
  .link-go { transform: none; }
}

/* 4. Cross-document view transitions: root cross-fade only, never a shared-element morph
   on magazine or film iframes. Works on same-origin http(s), not file://. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 480ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
.mag-embed, .mag-embed iframe, .yt-embed, .yt-embed iframe {
  view-transition-name: none;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ===== R68 delight pass: paper ground + grain, small motion ideas ===== */
:root { --bg-outer: #ECE9E1; --bg-panel: #F4F1EA; --ui: #FBFAF6; }
html { scrollbar-color: var(--ink-soft) var(--bg-outer); }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.33  0 0 0 0 0.3  0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* hero: name rises in */
.dl-rise > span { display: inline-block; animation: dl-up .9s var(--ease-expo, cubic-bezier(.16,1,.3,1)) both; }
.dl-rise > span:nth-child(2) { animation-delay: .08s; } .dl-rise > span:nth-child(3) { animation-delay: .16s; }
@keyframes dl-up { from { transform: translateY(35%); opacity: 0; } }
/* rotating phrase */
.dl-rot { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; }
.dl-rot-w { color: var(--accent); font-weight: 600; display: inline-block; }
.dl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* look-up words */
.dl-w { position: relative; cursor: help; background: linear-gradient(rgba(61,94,74,.22), rgba(61,94,74,.22)) no-repeat 0 92% / 100% 2px; transition: background-size .35s var(--ease); outline: none; }
.dl-w:hover, .dl-w:focus-visible { background-size: 100% 42%; }
.dl-def { position: absolute; left: -8px; bottom: calc(100% + 10px); width: 250px; z-index: 5; display: block; padding: 12px 14px; border-radius: 8px; background: var(--deep); color: #F4F1EA; font-size: 14px; line-height: 1.45; font-weight: 400; text-align: left;
  box-shadow: 0 14px 30px -12px rgba(10,10,10,.35); opacity: 0; transform: translateY(6px) scale(.98); transform-origin: 20px 100%; transition: opacity .22s var(--ease), transform .28s var(--ease); pointer-events: none; }
.dl-def b { display: block; font-size: 17px; font-weight: 600; }
.dl-def i { display: block; font-style: italic; opacity: .7; margin-bottom: 4px; }
.dl-w:hover .dl-def, .dl-w:focus-visible .dl-def { opacity: 1; transform: none; }
/* buttons */
.dl-cta { margin: 22px 0 0 !important; }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: #F4F1EA !important; font: 500 15px var(--sans); text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), background .2s; }
.dl-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.dl-btn:active { transform: scale(.96); }
.dl-ghost { background: transparent; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.dl-ghost:hover { background: var(--accent); color: #F4F1EA !important; }
.dl-loop-row { margin: 0 0 18px; }
/* drawn underline on hero links */
.links a { text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px; transition: background-size .3s var(--ease), color .2s; padding-bottom: 2px; }
.links a:hover, .links a:focus-visible { background-size: 100% 1.5px; }
/* travelling word on the map */
.dl-chip { position: absolute; z-index: 4; translate: -50% -50%; padding: 5px 14px; border-radius: 999px; background: var(--deep); color: #F4F1EA; font-weight: 600; font-size: 15px; pointer-events: none; transition: left .9s cubic-bezier(.6,0,.2,1), top .9s cubic-bezier(.6,0,.2,1), opacity .3s; box-shadow: 0 8px 20px -8px rgba(10,10,10,.4); }
/* films */
.dl-films { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.dl-films a { display: block; color: var(--ink); text-decoration: none; }
.dl-still { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #F2EDE2; }
.dl-still img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform .8s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
.dl-type { display: grid; place-items: center; background: var(--deep); color: #F4F1EA; text-align: center; }
.dl-type b { font-size: 22px; line-height: 1.1; font-weight: 600; letter-spacing: -.01em; transition: transform .8s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
.dl-ep { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px; background: rgba(10,10,10,.72); color: #F4F1EA; font-size: 12px; font-variant-numeric: tabular-nums; }
.dl-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; background: #F4F1EA; color: var(--deep); font-size: 14px; padding-left: 3px; transform: scale(0); transition: transform .35s cubic-bezier(.3,1.6,.5,1); box-shadow: 0 8px 20px -8px rgba(10,10,10,.4); }
.dl-films a:hover .dl-still img, .dl-films a:focus-visible .dl-still img, .dl-films a:hover .dl-type b { transform: scale(1.06); }
.dl-films a:hover .dl-play, .dl-films a:focus-visible .dl-play { transform: scale(1); }
.dl-ft { display: block; margin-top: 10px; font-weight: 600; font-size: 16px; transition: color .2s; }
.dl-films a:hover .dl-ft { color: var(--accent); }
.dl-fm { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.4; }
#research-ai-terms .rs-all { margin-top: 18px; }
@media (max-width: 899px) { .dl-films { grid-template-columns: 1fr 1fr; } }
/* staggered rise for section parts */
.dl-pre { opacity: 0; transform: translateY(18px); }
.dl-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .7s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
@media (prefers-reduced-motion: reduce) {
  .dl-rise > span { animation: none; }
  .dl-def, .dl-btn, .dl-still img, .dl-play, .dl-chip, .links a { transition: none; }
  .dl-pre { opacity: 1; transform: none; }
}
.dl-nw { white-space: nowrap; }
@media (max-width: 699px) { .dl-loop-row { display: none; } }
@media (max-width: 599px) { .dl-type b { font-size: 16px; margin-bottom: 18px; } }
/* R68 site-wide touches */
::selection { background: #F6D84A; color: #0a0a0a; }
.dl-progress { position: fixed; left: 0; top: 0; width: 100%; height: 3px; z-index: 101; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
/* hero words you can look up */
.fx .wd { pointer-events: auto; cursor: help; }
.fx .wd:hover, .fx .wd.dl-held { animation-play-state: paused !important; }
.hero { position: relative; }
.dl-pop { position: absolute; z-index: 6; width: 260px; padding: 12px 14px; border-radius: 8px; background: var(--deep); color: #F4F1EA; font-size: 14px; line-height: 1.45; box-shadow: 0 14px 30px -12px rgba(10,10,10,.35); pointer-events: none; opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .2s var(--ease), transform .26s var(--ease); }
.dl-pop.on { opacity: 1; transform: none; }
.dl-pop b { display: block; font-size: 17px; font-weight: 600; }
.dl-pop i { display: block; font-style: italic; opacity: .7; margin-bottom: 4px; }
/* film flip: extra frames stacked on top */
.dl-still img.dl-f { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.dl-still img.dl-f.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dl-progress { display: none; } }
/* ===== R68 inner pages ===== */
.lx-top { position: relative; }
.in-caret { display: inline-block; width: .06em; height: .9em; margin-left: .04em; background: var(--accent); vertical-align: -.05em; animation: in-blink .8s steps(1) infinite; }
@keyframes in-blink { 50% { opacity: 0; } }
.lx-top.in-ready > p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.in-def { display: block; max-width: 460px; margin-top: 18px; padding: 14px 18px; border-radius: 10px; background: var(--deep); color: #F4F1EA; font-size: 16px; line-height: 1.5;
  opacity: 0; transform: translateY(8px) scale(.98); transform-origin: 24px 0; transition: opacity .3s var(--ease), transform .45s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
.in-def.on { opacity: 1; transform: none; }
.in-def b { display: block; font-size: 20px; font-weight: 600; }
.in-def i { display: block; font-style: italic; opacity: .7; font-size: 14px; margin-bottom: 4px; }
.in-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.in-lines path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; opacity: .75; transition: stroke-dashoffset 1s cubic-bezier(.6,0,.2,1) calc(var(--k) * 260ms); }
.lx-shot .lx-ring { transition: transform .5s var(--ease-expo, cubic-bezier(.16,1,.3,1)), opacity .4s; }
.lx-shot:not(.in-drawn) .lx-ring { opacity: 0; transform: scale(1.06); }
.in-conn h2 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; padding-top: var(--pad); margin-bottom: 6px; }
.in-sub { color: var(--ink-soft); font-size: 15px; }
.in-conn ul { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 14px; }
.in-conn li { display: grid; grid-template-columns: minmax(120px, auto) 1fr minmax(120px, auto); align-items: center; gap: 14px; opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease) calc(var(--k) * 90ms), transform .6s var(--ease-expo, cubic-bezier(.16,1,.3,1)) calc(var(--k) * 90ms); }
.in-conn.in-on li { opacity: 1; transform: none; }
.in-n { justify-self: start; padding: 8px 16px; border-radius: 999px; background: var(--ui); color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.in-n + .in-wire + .in-n { justify-self: end; }
a.in-n:hover { background: var(--accent); color: #F4F1EA; transform: translateY(-2px); }
.in-n.here { background: var(--accent); color: #F4F1EA; }
.in-wire { position: relative; height: 26px; }
.in-wire::before { content: ""; position: absolute; left: 0; right: 8px; top: 50%; border-top: 1.5px dashed rgba(61,94,74,.45); }
.in-wire::after { content: ""; position: absolute; right: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border: solid var(--accent); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.in-wire.both::before { left: 8px; }
.in-what { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); white-space: nowrap; font-size: 13px; color: var(--ink-soft); background: var(--bg-panel); padding: 0 8px; }
.in-wire i { position: absolute; top: 50%; left: 0; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--accent); animation: in-run 2.4s linear infinite calc(var(--k, 0) * -.6s); }
@keyframes in-run { from { left: 0; } to { left: calc(100% - 10px); } }
@media (max-width: 599px) { .in-conn li { grid-template-columns: 1fr; gap: 6px; } .in-wire { height: 30px; } .in-n + .in-wire + .in-n { justify-self: start; } }
.next.has-peek { position: relative; overflow: hidden; }
.in-peek { position: absolute; right: 90px; bottom: 0; width: 240px; border-radius: 8px 8px 0 0; box-shadow: 0 -8px 24px -10px rgba(10,10,10,.25); transform: translateY(100%); transition: transform .55s var(--ease-expo, cubic-bezier(.16,1,.3,1)); pointer-events: none; }
.next.has-peek:hover .in-peek, .next.has-peek:focus-visible .in-peek { transform: translateY(55%); }
@media (max-width: 699px) { .in-peek { display: none; } }
.in-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--deep); }
.in-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
.in-cover .dl-play { width: 68px; height: 68px; margin: -34px 0 0 -34px; font-size: 20px; transform: scale(.85); }
.in-cover:hover img, .in-cover:focus-visible img { transform: scale(1.04); }
.in-cover:hover .dl-play, .in-cover:focus-visible .dl-play { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .in-def, .in-conn li, .in-peek, .in-cover img, .in-lines path, .lx-shot .lx-ring { transition: none; }
  .in-conn li, .lx-shot:not(.in-drawn) .lx-ring { opacity: 1; transform: none; }
  .in-wire i { display: none; }
}
.in-lines circle { fill: var(--accent); }
/* R68b: simpler Connected to — one row per neighbour */
.in-conn ul { margin: 18px 0 0; gap: 0; }
.in-conn li { grid-template-columns: 220px 1fr; gap: 20px; align-items: baseline; padding: 14px 0; }
.in-nm { font-size: 20px; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
a.in-nm span { display: inline-block; color: var(--accent); transition: transform .25s var(--ease); }
a.in-nm:hover { color: var(--accent); }
a.in-nm:hover span { transform: translateX(4px); }
.in-tx { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 599px) { .in-conn li { grid-template-columns: 1fr; gap: 2px; } }
/* R68c: Connected to as a small hub with real screens */
.in-conn h2 { margin-bottom: 28px; }
.cx { position: relative; padding-bottom: 8px; }
.cx-hub { position: relative; z-index: 1; width: max-content; margin: 0 auto; padding: 10px 22px; border-radius: 999px; background: var(--deep); color: #F4F1EA; font-weight: 600; font-size: 17px; }
.cx-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cx-lines path { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .55; transition: stroke-dashoffset 1s cubic-bezier(.6,0,.2,1) calc(var(--k) * 150ms); }
.cx-lines circle { fill: var(--accent); }
.cx-cards { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 20px; margin-top: 64px; }
.cx-card { display: block; padding: 10px 10px 16px; border-radius: 10px; background: var(--ui); color: var(--ink); text-decoration: none; opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease) calc(400ms + var(--k) * 120ms), transform .6s var(--ease-expo, cubic-bezier(.16,1,.3,1)) calc(400ms + var(--k) * 120ms), box-shadow .25s; }
.in-conn.in-on .cx-card { opacity: 1; transform: none; }
a.cx-card:hover { box-shadow: 0 14px 30px -18px rgba(10,10,10,.35); transform: translateY(-4px); transition-delay: 0s; }
.cx-pic { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: var(--bg-outer); margin-bottom: 12px; }
.cx-pic img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform .8s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
a.cx-card:hover .cx-pic img { transform: scale(1.05); }
.cx-none { display: grid; place-items: center; color: var(--ink-soft); font-style: italic; }
.cx-nm { display: block; padding: 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.cx-nm span { display: inline-block; color: var(--accent); transition: transform .25s var(--ease); }
a.cx-card:hover .cx-nm span { transform: translateX(4px); }
.cx-f { display: block; padding: 0 6px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.cx-f b { display: inline-block; width: 22px; color: var(--accent); font-weight: 600; }
@media (max-width: 699px) { .cx-cards { grid-template-columns: 1fr; margin-top: 20px; } .cx-lines { display: none; } .cx-hub { margin: 0; } }
@media (prefers-reduced-motion: reduce) { .cx-card { opacity: 1; transform: none; transition: none; } .cx-lines path { transition: none; } }
/* R68d: neighbour cards show the project's drawn icon, not a screenshot */
.cx-card { display: grid; grid-template-columns: 64px 1fr; column-gap: 14px; align-items: start; padding: 18px; }
.cx-ic { grid-row: span 3; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-outer); transition: transform .4s var(--ease-expo, cubic-bezier(.16,1,.3,1)); }
.cx-ic svg { width: 48px; height: 48px; }
a.cx-card:hover .cx-ic { transform: rotate(-6deg) scale(1.06); }
.cx-nm, .cx-f { padding: 0; }
.cx-nm { margin: 4px 0 4px; }

/* R69: LexiAI narrated walkthrough (16:9, with sound) and (the "Try it yourself" fold is no longer used) */
.dm.dm-narr .dm-vstage, .dm.dm-narr .dm-vstage video { aspect-ratio: 16 / 9; }
.dm.dm-narr .dm-vstage video { background: #F4F1EA; }
.dm-narr .dm-sound[aria-pressed="true"] { color: var(--dm-accent); }
@media (max-width: 699px) { .dm.dm-narr .dm-vstage { aspect-ratio: 16 / 9; } }
