/* ============================================================
   Goltermann.design — design system + styles
   Fonts first, then the token layer, base, components, sections.
   ============================================================ */

/* ---- Typeface: Gilroy (self-hosted) -----------------------
   The files live in assets/fonts/. font-display:swap keeps text visible
   while the woff2 loads rather than blocking the first paint, and the
   metric-adjusted fallback below means the swap happens without reflowing
   the page.

   Three files cover five weights. There are faces for Regular, SemiBold and
   Bold, while the design also calls for 500 and 800, so each face claims a
   RANGE rather than a single value:

     400-500  Regular    body, and the 500 used on case-study ledes
     600      SemiBold   UI labels, buttons, names
     700-900  Bold       kickers, links, and the 800 display numerals

   Declaring the ranges is what stops the browser synthesising 500 and 800
   by smearing a neighbouring weight — faux-bold Gilroy looks notably
   muddier than the real thing at the large sizes this site uses it.
   If Gilroy Medium and ExtraBold are ever added, give them their own faces
   and narrow these ranges back to 400, 700. */
@font-face{
  font-family:"Gilroy";
  src:url("assets/fonts/gilroy-regular.woff2") format("woff2");
  font-weight:400 500;font-style:normal;font-display:swap;
}
@font-face{
  font-family:"Gilroy";
  src:url("assets/fonts/gilroy-semibold.woff2") format("woff2");
  font-weight:600;font-style:normal;font-display:swap;
}
@font-face{
  font-family:"Gilroy";
  src:url("assets/fonts/gilroy-bold.woff2") format("woff2");
  font-weight:700 900;font-style:normal;font-display:swap;
}

/* Metric-adjusted fallback. Gilroy is slightly narrower and has a larger
   x-height than the default system UI faces, so unadjusted fallback text
   sets wider and reflows when the real font arrives. These overrides pull
   the local face onto Gilroy's metrics; the result is a near-invisible
   swap instead of a visible jump. Tuned against Gilroy's own metrics
   (cap height 0.70em, x-height 0.52em, advance ~0.94 of system-ui). */
@font-face{
  font-family:"Gilroy Fallback";
  src:local("Helvetica Neue"),local("Segoe UI"),local("Arial");
  size-adjust:96%;
  ascent-override:92%;
  descent-override:24%;
  line-gap-override:0%;
}

/* Inter carries the body copy. One variable file covering 400-700, latin
   subset, served from here rather than linked from Google: a <link> to
   fonts.googleapis.com hands every visitor's IP and user agent to Google on
   every page view, and privacy.html tells them this site collects nothing.
   The latin subset covers everything the copy uses. The one gap is the arrow
   glyph in the link affordances (U+2192), which the subset omits and Gilroy
   never had either, so it falls back exactly as it already did. */
@font-face{
  font-family:"Inter";
  src:url("assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight:400 700;font-style:normal;font-display:swap;
}

/* Metric-adjusted fallback for Inter, the same trick as the Gilroy one above
   and for the same reason: without it the fallback sets at its own width and
   the page reflows the moment the real font lands.

   These four numbers are measured, not copied. At a 1000px em, the site's own
   body copy sets 107.39 wide in Inter and 101.56 in Helvetica Neue, so the
   fallback needs scaling up by 5.8%. The ascent and descent overrides are
   Inter's own (0.969 / 0.241) divided by that scale, because the overrides
   apply to the already-adjusted em. Inter's line gap measured exactly zero,
   so the override is 0 rather than a guess.

   One compromise, inherited from the Gilroy face: a single set of numbers has
   to serve all three local faces. They are tuned to Helvetica Neue, first in
   the chain and what macOS resolves. Arial lands within 1.5% of Inter under
   the same adjustment. Segoe UI could not be measured here — there is no copy
   on this machine to measure — so Windows is the weakest fit of the three.
   Remeasure there if the swap ever looks jumpy. */
@font-face{
  font-family:"Inter Fallback";
  src:local("Helvetica Neue"),local("Segoe UI"),local("Arial");
  size-adjust:105.8%;
  ascent-override:91.6%;
  descent-override:22.8%;
  line-gap-override:0%;
}

/* ---- Colour tokens ----------------------------------------
   One declaration set for both themes. Each colour is written once as
   light-dark(light, dark); data-theme only switches color-scheme, which is
   what light-dark() resolves against.

   The site is dark by default and light only on request, so color-scheme is
   `dark` here rather than `light dark`: with one scheme declared there is
   nothing for the operating system to pick between, and an unset data-theme
   resolves dark on a light machine too. Light arrives solely through
   [data-theme="light"], which is the only thing that can set it.

   Dark is a deep plum-tinted neutral rather than flat slate, so the pink
   accent reads as native to the palette; light is a cool blue-white with the
   same stepped elevation (page < alt band < raised card). The accent itself
   is held constant across both, only its hover state deepens on light. */
:root{
  color-scheme:dark;

  /* Surfaces.
     The dark page colour is set against --color-surface, not chosen on its
     own: the banded sections alternate between the two, and in CIE L* the old
     dark pair differed by 1.85, so the banding all but vanished in dark mode.
     #0c0a11 brings it back in line with light. Darkening the page rather than
     lightening the band keeps the cards, which sit at L* 10.7, clear of the
     band they sit on.

     Light trades the two apart. At #f8fbff the page stood 3.98 from the band
     but only 1.50 from a white raised card, so the banding read and the cards
     barely did. #f4f8fe is 2.92 and 2.56: about a third off the banding, and
     a card edge that was not really there before. */
  --color-bg:light-dark(#f4f8fe,#0c0a11);
  --color-surface:light-dark(#e9f0f9,#17151f);
  --color-surface-raised:light-dark(#ffffff,#1e1b28);
  --color-surface-hover:light-dark(#eef4fb,#252132);

  /* Lines */
  --color-border:light-dark(rgba(16,22,34,.1),rgba(255,255,255,.09));
  --color-border-strong:light-dark(rgba(16,22,34,.24),rgba(255,255,255,.22));
  --color-border-accent:light-dark(rgba(255,0,107,.35),rgba(0,255,210,.4));
  --col-bar-bg:light-dark(rgba(16,22,34,.22),rgba(255,255,255,.28));
  --track-bg:light-dark(#ffffff,rgba(255,255,255,.22));

  /* Text */
  --color-text:light-dark(#141a24,#f5f3f8);
  --color-text-muted:light-dark(#4b5361,#b9b4c6);
  --color-text-subtle:light-dark(#76808f,#8b8699);

  /* Brand. Two accents, one per theme: pink on the light surfaces it was
     drawn for, mint on the dark ones. Mint is a light colour -- luminance
     .76 against the pink's .22 -- so what sits on it inverts too, hence
     --color-on-accent. Everything that paints the accent reads these three
     and nothing else, the logo and the inlined diagrams included. The three
     favicons cannot: they are files, so the pink is written into them.

     The hover is the accent at 40% lightness against its 50%, the same step
     down the old pair took, and at the same hue -- a hover that held the old
     crimson would swing about ten degrees off the accent it belongs to. It
     measures 5.67:1 on white and 4.63:1 on the facts band. */
  --color-accent:light-dark(#ff006b,#00ffd2);
  --color-accent-hover:light-dark(#cc0056,#00e0b8);
  --color-on-accent:light-dark(#ffffff,#0c0a11);

  /* The only red on the site, for the one message that has to read as a
     refusal: a wrong password on a case-study gate. The accent cannot do that
     job in both themes -- it is pink in light, where it would pass, and mint
     in dark, where a rejection would look like a confirmation. */
  --color-danger:light-dark(#c0123c,#ff8099);

  /* Glass (nav) */
  --glass-bg-top:light-dark(rgb(255 255 255 / 4%),rgba(18,16,24,.04));
  --glass-bg:light-dark(rgba(255,255,255,.45),rgba(26,23,36,.5));
  --glass-border:light-dark(rgba(16,22,34,.08),rgba(255,255,255,.1));
  --glass-shadow:light-dark(rgba(40,60,90,.12),rgba(0,0,0,.28));
  /* The same glass, carrying body text rather than a row of nav links.
     The nav sits in a band at the top of the viewport; a floating panel
     sits over whatever the page happens to be showing, including photos.
     At the nav's tint, paragraph text and the hairline numbers in the list
     lost contrast over the hero images, so this one is mixed heavier. */
  --glass-bg-strong:light-dark(rgba(255,255,255,.82),rgba(26,23,36,.86));

  /* Hover tint for ghost/secondary surfaces */
  --tint-hover:light-dark(rgba(16,22,34,.05),rgba(255,255,255,.08));

  /* Ink over the hero photo and other media */
  /* The field the case hero artwork sits on. The artwork is transparent now —
     phones and a pink line, no baked-in background — so the page supplies the
     ground and it can differ per theme. */
  --cs-hero-bg:light-dark(#e9f0f9,#222131);
  /* The same artwork on a home page card needs a different ground, because it
     sits inside a white card on a --color-surface section rather than on the
     page. Reusing --cs-hero-bg made the thumbnail exactly --color-surface in
     light mode — the section showing through a panel that was meant to read
     as its own. The dark value is shared because there it already contrasted. */
  --case-media-bg:light-dark(#d9e4f2,#222131);
  /* The facts strip between the hero and the body. It needs to differ from
     both its neighbours, and on --color-surface it was byte-identical to the
     light hero above it. A step deeper than the hero gives it the same kind of
     separation dark already had. The dark value is --color-surface's, which
     already worked there. */
  --facts-band-bg:light-dark(#dfe9f6,#17151f);
  /* The Back pill. Neutral rather than accent, so it does not compete with the
     headline below it, and bordered in light theme because a white pill measures
     1.15:1 against the light hero field — legible through its text, but with no
     edge of its own until the border gives it one. The dark value is
     --facts-band-bg's, so the pill and the band below the hero share a surface. */
  --pill-bg:light-dark(#ccd7e8,#17151f);
  --pill-ink:light-dark(#141a24,#ffffff);
  --on-media:light-dark(#241640,#f5f3f8);
  --on-media-muted:light-dark(rgba(40,26,74,.74),rgba(245,243,248,.78));
  --on-media-subtle:light-dark(rgba(40,26,74,.56),rgba(245,243,248,.6));

  --shadow-card:light-dark(rgba(40,60,90,.14),rgba(0,0,0,.6));
  --shadow-media:light-dark(rgba(40,60,90,.18),rgba(0,0,0,.5));
}

/* data-theme is the whole switch. Because every colour above is a
   light-dark() pair, moving color-scheme moves all of them. */
:root[data-theme="dark"]{color-scheme:dark}
:root[data-theme="light"]{color-scheme:light}

/* ---- Values light-dark() cannot express -------------------
   Gradients, raw channel triples (consumed inside rgba()), plain numbers and
   the `none` keyword are not <color> values, so these few stay per-theme and
   are the only declarations still written twice.

   Dark hero: a minimal wash, just enough on the left for text to hold over
   the photo's deep-indigo area, with a fade tail and a vignette that track
   the page background so the hero dissolves into it.

   Light hero: both washes run with the text instead — left to right on a wide
   screen, bottom to top once the words move under the picture — and the
   vignette closes the frame in a violet of its own rather than tracking the
   page. scrim-b carries the fade tail as a second layer, listed first so it
   paints over its own wash: the wash is what the hero is keyed with, and the
   tail is only the last fifth, where the hero has to become the page. Underneath,
   the wash would tint that last row 40% lavender against a near-white page,
   and over a vignette that now ends in violet, darker still. The narrow scrim-b is the wide one at half strength: at full it lands
   on the same band as --hero-scrim-mobile, which already carries 90% there,
   and the two together flatten the photograph out of the picture.
   Contrast-lift shadows are applied only where card-to-background contrast
   is weakest, which is the opposite band in each theme. */
:root,:root[data-theme="dark"]{
  --hero-rgb:18,16,24;
  --hero-scrim:linear-gradient(90deg,rgba(18,16,24,.62) 0%,rgba(18,16,24,.34) 24%,rgba(18,16,24,.08) 42%,rgba(18,16,24,0) 58%);
  --hero-scrim-mobile:linear-gradient(0deg,rgba(18,16,24,.82) 0%,rgba(18,16,24,.45) 40%,rgba(18,16,24,.1) 100%);
  --hero-scrim-b:linear-gradient(0deg,var(--color-bg) 0%,rgba(var(--hero-rgb),0) 32%);
  --hero-vignette:radial-gradient(120% 90% at 78% 42%,transparent 40%,rgba(var(--hero-rgb),.45) 100%);
  --hero-photo-brightness:1;
  --essay-hover:rgba(var(--accent-rgb),.05);
  --shadow-on-page:none;
  --shadow-on-band:0 0 80px -10px rgb(0 0 0 / 25%);
  --cs-scrim:linear-gradient(0deg,rgba(34,33,49,1) 0%,rgba(34,33,49,.97) 26%,rgba(34,33,49,.8) 40%,rgba(34,33,49,.4) 50%,rgba(34,33,49,0) 60%);
  --nav-media-scrim:linear-gradient(180deg,rgba(34,33,49,.92) 0%,rgba(34,33,49,.55) 42%,rgba(34,33,49,0) 100%);
}
:root[data-theme="light"]{
  --hero-scrim:linear-gradient(90deg,rgb(223 203 255 / 32%) 0%,rgb(230 214 255 / 90%) 26%,rgb(248 243 255 / 60%) 46%,rgb(182 134 255 / 0%) 62%);
  --hero-scrim-mobile:linear-gradient(0deg,rgb(223 203 255 / 32%) 0%,rgb(230 214 255 / 90%) 42%,rgb(248 243 255 / 60%) 72%,rgb(182 134 255 / 0%) 100%);
  --hero-scrim-b:linear-gradient(0deg,var(--color-bg) 0%,rgb(207 171 231 / 5%) 20%),linear-gradient(90deg,rgb(213 126 255 / 40%) 0%,rgb(229 221 255 / 80%) 26%,rgb(229 221 255 / 70%) 46%,rgb(204 195 238 / 0%) 62%);
  --hero-scrim-b-mobile:linear-gradient(0deg,var(--color-bg) 0%,rgb(207 171 231 / 5%) 20%),linear-gradient(0deg,rgb(213 126 255 / 20%) 0%,rgb(229 221 255 / 40%) 42%,rgb(229 221 255 / 35%) 72%,rgb(204 195 238 / 0%) 100%);
  --hero-vignette:radial-gradient(120% 90% at 78% 52%,transparent 60%,rgb(75 39 135) 100%);
  --hero-vignette-mobile:radial-gradient(130% 80% at 50% 34%,transparent 56%,rgb(75 39 135) 100%);
  --hero-photo-brightness:1.18;
  --spotlight-halo:.05;
  --accent-rgb:255,0,107;
  --line-light:1;
  --line-dark:0;
  --essay-hover:var(--color-surface-hover);
  --shadow-on-page:0 0 80px -10px rgb(0 50 115 / 5%);
  --shadow-on-band:none;
  --cs-scrim:linear-gradient(0deg,rgba(233,240,249,1) 0%,rgba(233,240,249,.97) 26%,rgba(233,240,249,.8) 40%,rgba(233,240,249,.4) 50%,rgba(233,240,249,0) 60%);
  --nav-media-scrim:linear-gradient(180deg,rgba(233,240,249,.92) 0%,rgba(233,240,249,.55) 42%,rgba(233,240,249,0) 100%);
}

:root{
  /* Radius. Flat on purpose: 6px is the cap for every card, image and
     diagram on the site, so the three content steps all hold the same value.
     The names stay, so a future scale has somewhere to go. --radius-pill and
     the hand-written 50%s are not part of the cap: a pill and a dot are round
     by definition, not softened corners. */
  --radius-sm:6px;
  /* Content boxes: 32px of padding is right on a wide screen and eats a fifth
     of the column on a phone. Fluid, so it scales instead of stepping. */
  --pad-box:clamp(20px,5vw,32px);
  /* Page gutter. A fixed 32px is 4% of a desktop screen and 20% of a 320px
     phone, which was most of why body copy there ran 27 characters a line. */
  --gutter:clamp(20px,5vw,32px);
  /* Diagrams sit between the two existing widths: wider than the 820px reading
     column, which squeezes them, but not the 1120px of a full-bleed figure,
     which leaves most of a chart as empty surface. */
  --measure-device:min(900px,calc(100vw - var(--space-7)));
  --radius-md:6px;
  --radius-lg:6px;
  --radius-pill:999px;

  /* Spacing scale (4pt base) */
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:24px;
  --space-6:32px;
  --space-7:48px;
  --space-8:64px;
  --space-9:96px;
  --space-10:120px;

  /* Type */
  /* Two faces with two jobs. Gilroy sets headings, titles and CTAs; Inter
     sets everything that gets read. See the block under body{} for the split. */
  --font-display:"Gilroy","Gilroy Fallback",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --font-body:"Inter","Inter Fallback",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  /* Fluid from 360px to 1280px, fixed outside that range. Every clamp here is
     the same formula — min at 360, max at 1280 — so the steps keep their
     relationship to each other at every width instead of crossing over.

     They used to cross. --text-hero was a clamp with a 38px floor and
     --text-3xl a fixed 40px, so below about 715px the section headings were
     LARGER than the hero headline they sat under, on every phone ever made.
     The floor is 38px again, which is safe only because --text-3xl is now a
     clamp bottoming at 28px: check that pair before touching either.

     The three smallest steps stay fixed: they set UI — labels, captions,
     metadata — not reading matter, and shrinking them below 12px helps nobody.
     They step 12 / 14 / 16; at 15px, --text-sm was within seven per cent of
     body text and read as an inconsistency rather than a step.

     --text-base and --text-md are one step, fixed and fluid: identical up to
     784px, where md starts growing towards 18px. Nothing sits between them. */
  --text-xs:12px;
  --text-sm:14px;
  --text-base:16px;
  /* --text-md is the reading size, so it reaches full size at 784px rather
     than 1280 like the display steps. That 784 was derived from a 720px
     reading column, which is where the column stopped growing, so the type
     stopped with it: on the common 1280 curve it was still 16.9px at 768 and
     ran the measure out to 73 characters, and this brought that back to 69.
     The case column is now 820px, which it reaches at a viewport of about
     884, so the ramp ends before the column does. Rather than re-derive a
     token the homepage and the essays also use, the case prose carries its
     own max-width; see the measure note above .cs-section > p. */
  --text-md:clamp(16px,0.47vw + 14.3px,18px);
  --text-xl:clamp(19px,0.33vw + 17.8px,22px);
  --text-2xl:clamp(24px,0.65vw + 21.7px,30px);
  --text-3xl:clamp(28px,1.3vw + 23.3px,40px);
  --text-stat:clamp(32px,1.74vw + 25.7px,48px);
  --text-hero:clamp(38px,3.04vw + 27.09px,66px);
  /* The page title on a case study or essay, and the contact headline. Same
     size at both ends and the same job — the largest heading on their surface
     — so one token rather than two copies of the same numbers. */
  --text-title:clamp(32px,2.17vw + 24.22px,52px);

  /* Kicker / overline (shared uppercase meta style) */
  --kicker-size:var(--text-xs);
  --kicker-tracking:.1em;
  --kicker-weight:700;

  /* Layout + motion */
  --maxw:1160px;
  --ease:cubic-bezier(.2,.6,.2,1);
  --dur:.25s;        /* interactive hover/focus */
  --dur-ambient:.3s; /* non-hover ambient transitions (e.g. nav on scroll) */
  --theme-dur:.4s;   /* light<->dark colour crossfade, shared by all theme-reactive elements */
  --hover-shift:4px; /* consistent internal nudge for arrows */
  --hover-lift:-4px; /* consistent card lift */
  --accent-rgb:0,255,210; /* the accent as rgb, for translucent glows; the light blocks above set the pink */
  /* Which of the two case-hero line layers is lit. The artwork ships once per
     accent, and the pair crossfades with the theme. */
  --line-light:0;
  --line-dark:1;
}

/* Shared accent-color utility (was redefined per-context) */
.accent{color:var(--color-accent)}

/* ---- Spotlight hover (cursor-tracking pink glow) ----------
   A brand-pink radial gradient follows the cursor across the card:
   a soft inner halo (::before) plus a sharp rim-glow on the border
   (::after, masked to the border ring). Both fade in via .is-hovering,
   set by JS on pointer enter/leave; --xPos/--yPos track the cursor.
   Content stays crisp because the glows sit behind it. */
.spotlight{position:relative;isolation:isolate}
.spotlight::before,.spotlight::after{
  content:"";position:absolute;inset:0;border-radius:inherit;
  opacity:0;transition:opacity var(--dur) ease-in-out;pointer-events:none;
}
/* inner halo: very broad, very soft wash over the surface, under content.
   Large radius + early transparent falloff is what makes it read big+subtle.
   --spotlight-halo controls only the halo strength (lighter in light mode);
   the rim-glow below keeps its own fixed alpha, so the border isn't dimmed.
   --spotlight-edge then takes the wash down as the cursor moves off the
   card's border and into the middle of it. The rim does that already, and
   not by choice: it lights a 1px ring, so once the cursor is further from
   that ring than the gradient reaches, there is nothing left to light. The
   wash had no such limit and stayed at full strength anywhere on the card.
   JS sets the value against the rim's own reach; 1, the undimmed wash, is
   what anything that never sets it still gets. */
.spotlight::before{
  z-index:2;
  background:radial-gradient(50rem circle at var(--xPos,50%) var(--yPos,50%),
    rgba(var(--accent-rgb),calc(var(--spotlight-halo,.08) * var(--spotlight-edge,1))), transparent 35%);
}
/* rim-glow: large, soft; masked so only the border ring lights up */
.spotlight::after{
  z-index:3;padding:1px;
  background:radial-gradient(35rem circle at var(--xPos,50%) var(--yPos,50%),
    rgba(var(--accent-rgb),1), transparent 40%);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
}
/* Lift card content above the halo. The stack inside a spotlight card is:
   media 1, halo 2, content 2 (painted after the ::before, so above it), rim 3.
   Media sits below the halo on purpose -- on the cards whose artwork bleeds
   to the edge it would otherwise cover both the wash and the border glow
   wherever the cursor is over the picture. */
.spotlight>*{position:relative;z-index:2}
.case__media{z-index:1}
.spotlight.is-hovering::before,.spotlight.is-hovering::after{opacity:1}
@media(prefers-reduced-motion:reduce){
  .spotlight::before,.spotlight::after{transition:none}
}

/* ---- Reset / base ----------------------------------------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
/* scroll-padding-top keeps in-page anchors clear of the 72px fixed nav.
   Without it every "#work"-style jump parked the section heading underneath
   the nav bar. Set on the scroll container so it covers every anchor at
   once, including browser-restored hash targets on load. */
html{scroll-behavior:smooth;scroll-padding-top:calc(72px + var(--space-5,24px))}
body{
  background:var(--color-bg);
  color:var(--color-text);
  font-family:var(--font-body);
  font-size:var(--text-base);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  transition:background var(--theme-dur) var(--ease),color var(--theme-dur) var(--ease);
}

/* Gilroy is the display face only: headings and titles, the wordmark, the calls
   to action, and the two places where type is doing a display job rather than
   being read — the impact numerals and the pull quote. Everything else is Inter,
   nav links and kickers included. Gilroy was drawn for headlines rather than
   paragraphs; Inter was drawn for exactly this, in one variable file.
   .btn is not in this list because it sets font:inherit further down, which
   would undo anything set here — it takes the display face in its own rule. */
h1,h2,h3,h4,h5,h6,
.logo,
.case__link,
.scale__item dt,
.cs-pull{font-family:var(--font-display)}

/* Smooth, uniform light<->dark crossfade for every theme-reactive element.
   Scoped to colour-ish properties and a shared duration so nothing snaps while
   others animate. Elements with their own (faster) hover transitions still win
   on interaction because those are more specific declarations below.
   Suppressed during scroll-reveal and for reduced-motion users. */
.cs-section,.cs-metric,.cs-chart,.cs-reframe__side,.cs-thread,.cs-intent,.cs-intent__layer,
.cs-hero__facts-band,.cs-next,.impact__card,.case,.essay,.talk,.footer,
.cs-bar__track,.cs-col__bar,.cs-timeline::before,.cs-tl::before{
  transition:background-color var(--theme-dur) var(--ease),border-color var(--theme-dur) var(--ease),color var(--theme-dur) var(--ease),box-shadow var(--theme-dur) var(--ease)}
@media (prefers-reduced-motion: reduce){
  body,.cs-section,.cs-metric,.cs-chart,.cs-reframe__side,.cs-thread,.cs-intent,.cs-intent__layer,
  .cs-hero__facts-band,.cs-next,.impact__card,.case,.essay,.talk,.footer{transition:none}
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
:focus-visible{outline:2px solid var(--color-accent);outline-offset:3px;border-radius:var(--radius-sm)}
/* Sections and <main> are given tabindex -1 and focused by script so the
   keyboard carries on from wherever the page jumped. They are not controls,
   and a ring around a full-bleed section reads as an accent border ruled
   across the page, so they take no ring. */
[tabindex="-1"]:focus,[tabindex="-1"]:focus-visible{outline:none}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* ---- Utilities -------------------------------------------- */
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}
.skip-link{
  position:absolute;left:var(--space-4);top:-60px;z-index:100;
  background:var(--color-accent);color:var(--color-on-accent);
  padding:var(--space-3) var(--space-4);border-radius:var(--radius-sm);
  font-weight:600;transition:top var(--dur) var(--ease);
}
.skip-link:focus{top:var(--space-4)}

/* Kicker: one shared uppercase-meta recipe used by eyebrow, caption, role, date */
.eyebrow,.case__role{
  font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);
  text-transform:uppercase;font-weight:var(--kicker-weight);
}
.eyebrow{color:var(--color-accent)}

/* ---- Button component ------------------------------------- */
.btn{
  display:inline-flex;align-items:center;gap:var(--space-2);
  padding:14px 24px;border-radius:var(--radius-pill);
  font:inherit;font-family:var(--font-display);font-size:var(--text-sm);font-weight:600;
  border:1px solid transparent;cursor:pointer;
  transition:background var(--dur) var(--ease),border-color var(--dur) var(--ease),color var(--dur) var(--ease);
}
.btn--primary{background:var(--color-accent);color:var(--color-on-accent)}
.btn--primary:hover{background:var(--color-accent-hover)}
/* secondary: fully opaque border matching the text color; subtle fill on hover */
.btn--secondary{background:transparent;border-color:var(--color-text);color:var(--color-text)}
.btn--secondary:hover{background:var(--tint-hover);border-color:var(--color-text)}
.btn__arrow{transition:transform var(--dur) var(--ease)}
.btn:hover .btn__arrow{transform:translateX(var(--hover-shift))}

/* ---- Section scaffolding ---------------------------------- */
.section{padding:var(--space-10) 0}
.section--alt{background:var(--color-surface)}
.section-head{max-width:720px;margin:0 auto var(--space-8);text-align:center}
.section-head .eyebrow{display:block;margin-bottom:var(--space-3)}
.section-head h2{font-size:var(--text-3xl);line-height:1.1;letter-spacing:-.02em}
.section-head p{font-size:var(--text-md);color:var(--color-text-muted);margin-top:var(--space-4)}

/* ---- Navigation (Liquid Glass) ---------------------------- */
/* Before scroll: nearly transparent, minimal blur, no border.
   On scroll: frosted "liquid glass" (strong blur + saturation),
   faint tint, hairline border, and a soft shadow for lift. */
.nav{
  position:fixed;inset:0 0 auto 0;z-index:50;
  background:var(--glass-bg-top);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  border-bottom:1px solid transparent;
  box-shadow:0 0 0 rgba(0,0,0,0);
}
.nav.is-scrolled{
  background:var(--glass-bg);
  backdrop-filter:blur(14px) saturate(160%);
  -webkit-backdrop-filter:blur(14px) saturate(160%);
  border-bottom-color:var(--glass-border);
  box-shadow:0 8px 30px var(--glass-shadow);
}
.nav__inner{
  display:flex;align-items:center;justify-content:space-between;
  height:72px;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter);
}
/* Nav text: light while at top (over the hero photo), theme-colored once
   scrolled (over the page / glass). --nav-ink flips on .is-scrolled. */
.nav{--nav-ink:var(--on-media);--nav-ink-dim:var(--on-media-muted)}
.nav.is-scrolled{--nav-ink:var(--color-text);--nav-ink-dim:var(--color-text-muted)}
.logo{display:flex;align-items:center;gap:var(--space-3);font-weight:800;letter-spacing:-.01em;color:var(--nav-ink);transition:color var(--dur-ambient) var(--ease)}
/* Logo glyph in the constant accent pink: always visible over the hero
   photo and over the nav glass, in both themes and both scroll states. */
/* Masked, not drawn: the file is loaded for its shape and the colour comes
   from the token, so the mark follows the theme toggle like everything else.
   An <img> carries its own fill and would have stayed pink. */
.logo__mark{width:34px;height:34px;display:block;background:var(--color-accent);
  -webkit-mask:url('assets/logo-mark.svg') center/contain no-repeat;
  mask:url('assets/logo-mark.svg') center/contain no-repeat}
.nav__links{display:flex;gap:var(--space-7);align-items:center}
/* :not(.btn) so the nav CTA keeps the full .btn component styling.

   Full-strength ink at rest, not a dimmed state waiting to be lit: the links
   are the nav's content, and dimming them to make room for a hover reads as
   five disabled controls. That leaves colour with nothing to say on hover, so
   the hover is a rule that wipes in from the left instead — the same idea as
   the hero link's growing underline, and it keeps the label legible where an
   accent would have to hold up over the photograph.

   The colour transition is the ambient one because colour now only changes
   when .is-scrolled flips --nav-ink, which is the glass moving, not a hover. */
.nav__links a:not(.btn){position:relative;color:var(--nav-ink);font-size:var(--text-sm);font-weight:600;
  transition:color var(--dur-ambient) var(--ease)}
.nav__links a:not(.btn)::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;
  border-radius:2px;background:var(--color-accent);
  transform:scaleX(0);transform-origin:left center;
  transition:transform var(--dur) var(--ease)}
.nav__links a:not(.btn):hover::after{transform:scaleX(1)}


/* Actions cluster: theme toggle plus (on narrow screens) the menu button.
   Kept outside .nav__links so both stay reachable while the link panel is
   collapsed — the toggle is useful on a phone too, and burying the only
   way to switch themes inside the menu would be worse than not having it. */
.nav__actions{display:flex;align-items:center;gap:var(--space-4)}

/* ---- Menu button (narrow screens only) --------------------
   Three bars that morph into a cross when open. Drawn with a span plus its
   two pseudo-elements so the markup stays a single element. Hidden from
   assistive tech as decoration: the button itself carries the label and
   aria-expanded, which is what actually gets announced. */
.nav__toggle{
  display:none;position:relative;width:40px;height:40px;flex:none;padding:0;
  border:0;border-radius:var(--radius-sm);background:none;cursor:pointer;
  color:var(--nav-ink);-webkit-tap-highlight-color:transparent;
}
.nav__burger,.nav__burger::before,.nav__burger::after{
  position:absolute;left:50%;width:20px;height:2px;border-radius:2px;
  background:currentColor;
  transition:transform var(--dur) var(--ease),opacity var(--dur) var(--ease),background var(--dur) var(--ease);
}
.nav__burger{top:50%;margin-left:-10px;transform:translateY(-50%)}
.nav__burger::before,.nav__burger::after{content:"";left:0;margin-left:0}
.nav__burger::before{transform:translateY(-6px)}
.nav__burger::after{transform:translateY(6px)}
/* Open: the middle bar disappears and the outer two cross through centre. */
.nav.is-open .nav__burger{background:transparent}
.nav.is-open .nav__burger::before{transform:translateY(0) rotate(45deg)}
.nav.is-open .nav__burger::after{transform:translateY(0) rotate(-45deg)}

/* ---- Theme toggle (day sky / night sky) -------------------
   A pill that is a little sky. Light: a warm sun sits left over a blue day
   sky with clouds drifting in. Dark: a pale moon sits right over a night
   sky with stars settling in. Switching choreographs the sky, not just a
   slide: stars and clouds travel in/out while the knob morphs sun<->moon.
   State is driven by a boolean --lit (1 = light, 0 = dark) resolved below. */
.tt{
  --lit:0;                 /* default: dark */
  --ease-spring:cubic-bezier(.5,1.6,.4,1); /* gentle overshoot on the knob */
  --tt-dur:.5s;
  position:relative;width:62px;height:30px;flex:none;padding:0;cursor:pointer;
  border:none;border-radius:var(--radius-pill);overflow:hidden;background:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);
  -webkit-tap-highlight-color:transparent;
}
:root[data-theme="light"] .tt{--lit:1}

/* Sky: two flat fills, crossfaded by --lit */
.tt__sky{position:absolute;inset:0;border-radius:inherit}
.tt__sky::before,.tt__sky::after{content:"";position:absolute;inset:0;border-radius:inherit;transition:opacity var(--tt-dur) var(--ease)}
.tt__sky::before{background:#766aae40;opacity:calc(1 - var(--lit))} /* night */
.tt__sky::after{background:#00aff84d;opacity:var(--lit)}            /* day */

/* Stars: present at night, drift up+out as day arrives */
.tt__stars{position:absolute;inset:0;z-index:1;opacity:calc(1 - var(--lit));
  transform:translateY(calc((1 - var(--lit)) * 0px + var(--lit) * -6px));
  transition:opacity var(--tt-dur) var(--ease),transform var(--tt-dur) var(--ease)}
.tt__stars i{position:absolute;width:2px;height:2px;border-radius:50%;background:#fff;box-shadow:0 0 2px rgba(255,255,255,.9)}
.tt__stars i:nth-child(2){width:1.5px;height:1.5px}
.tt__stars i:nth-child(3){width:2.5px;height:2.5px}

/* Clouds: drift in from the right as day arrives, slide away at night.
   Pure white with a soft drop shadow so they read against the day sky. */
.tt__clouds{position:absolute;inset:0;z-index:1;opacity:var(--lit);transition:opacity var(--tt-dur) var(--ease)}
.tt__cloud{position:absolute;background:#fff;border-radius:999px;
  filter:drop-shadow(0 1px 1px rgba(60,110,170,.35));
  transition:transform var(--tt-dur) var(--ease)}
.tt__cloud--1{width:17px;height:6px;right:6px;top:17px;
  transform:translateX(calc((1 - var(--lit)) * 30px))}
.tt__cloud--1::before{content:"";position:absolute;width:9px;height:9px;background:inherit;border-radius:50%;left:4px;top:-4px}
.tt__cloud--2{width:12px;height:5px;right:21px;top:7px;
  transform:translateX(calc((1 - var(--lit)) * 36px))}
.tt__cloud--2::before{content:"";position:absolute;width:7px;height:7px;background:inherit;border-radius:50%;left:3px;top:-3px}

/* Knob. Sun sits LEFT in light, moon sits RIGHT in dark (via --lit).
   Base = moon (default theme is dark); sun is applied for light states. */
.tt__knob{
  position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;
  transform:translateX(calc((1 - var(--lit)) * 32px));
  background:radial-gradient(circle at 36% 34%, #fdfcf7 0%, #e7e3d6 60%, #cfc9b8 100%); /* moon */
  box-shadow:0 0 7px rgba(220,225,255,.5), inset 0 0 0 1px rgba(255,255,255,.35);
  transition:transform var(--tt-dur) var(--ease-spring),background var(--tt-dur) var(--ease),box-shadow var(--tt-dur) var(--ease);
}
:root[data-theme="light"] .tt__knob{
  background:radial-gradient(circle at 34% 32%, #fff6d6 0%, #ffd873 42%, #ffb02e 100%); /* sun */
  box-shadow:0 0 8px rgba(255,196,74,.75), inset 0 0 0 1px rgba(255,255,255,.3);
}
.tt__crater{position:absolute;border-radius:50%;background:rgba(160,154,135,.55);
  opacity:calc(1 - var(--lit));transition:opacity var(--tt-dur) var(--ease)}
.tt__crater--1{width:6px;height:6px;top:6px;left:12px}
.tt__crater--2{width:4px;height:4px;top:13px;left:6px}

@media(prefers-reduced-motion:reduce){
  .tt *,.tt__knob{transition-duration:.01ms!important}
}

/* ---- Hero ------------------------------------------------- */
/* Extra bottom padding reserves space for the overlapping impact card. */
/* The top padding is optical centring, not arbitrary. The hero centres its
   content in its own box, which starts at the top of the page — but the fixed
   nav covers the top of that box and the impact card reaches up over the hero's
   bottom padding, so the space the content really sits in is bounded by neither
   of those edges.

   Balancing the two gaps gives P = padding-bottom - D + nav, where D is how far
   the card's top sits above the hero's bottom edge. padding-bottom is kept equal
   to the card's pull-up, which makes D equal to it as well, so the first two
   terms cancel and P is simply the nav's height. The viewport height cancels
   too, which is why this is a constant and not a clamp. 73px, not 72: the nav
   is 72 plus a 1px bottom border, and the border occupies space.

   Measured at 1440x900 this gives 137px above the headline and 137px below it.
   Change the pull-up and padding-bottom together and this stays correct; change
   the nav's height or box and it does not. */
.hero{position:relative;min-height:100vh;display:flex;align-items:center;overflow:hidden;
  padding-top:73px;padding-bottom:120px}
/* hero.webp, not hero.png: visually identical at this size but 26 KB against
   1.63 MB, and this is the page's LCP element. index.html preloads the same
   file so the browser can start it without waiting to parse this stylesheet. */
.hero__img{position:absolute;inset:0;z-index:0;background:url('assets/hero.webp') center right/cover no-repeat;filter:brightness(var(--hero-photo-brightness,1));transition:filter .4s var(--ease)}
.hero__scrim{position:absolute;inset:0;z-index:1;background:var(--hero-scrim)}
/* bottom fade: hero dissolves into the page background (theme-aware) */
.hero__scrim-b{position:absolute;inset:0;z-index:1;background:var(--hero-scrim-b)}
/* Below the fade tail, not above it: the tail is what joins the hero to the
   page, and a vignette painted over it put its own edge on top of that join. */
.hero__vignette{position:absolute;inset:0;z-index:1;background:var(--hero-vignette)}
.hero__inner{position:relative;z-index:2;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter);width:100%;color:var(--on-media)}
.hero .eyebrow{display:block;margin-bottom:var(--space-5)}
.hero h1{font-size:var(--text-hero);line-height:1.06;letter-spacing:-.03em;max-width:17ch;margin-bottom:var(--space-5);color:var(--on-media)}
.hero__lede{font-size:var(--text-xl);color:var(--on-media);max-width:54ch;margin-bottom:var(--space-7)}
.hero__link{
  /* 600, not the 700 the other links use: Inter is variable here, so this is
     a true semibold, two steps above the 400 it sits in. */
  font-weight:600;text-decoration:none;
  /* The rule is an inset shadow rather than text-decoration, so it runs
     unbroken through the p's descender where skip-ink opened a gap, and so
     it can grow on hover. It mixes --on-media rather than currentColor:
     currentColor would be a moving endpoint mid-transition, and the shadow
     then interpolated towards the mix's transparent side -- the line faded
     to nothing on release and snapped back. clone keeps a rule on each
     fragment if the name ever wraps. */
  box-shadow:inset 0 -1px 0 0 color-mix(in srgb,var(--on-media) 45%,transparent);
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
  transition:color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
/* Hover grows the rule into a fill instead of recolouring the text: an inset
   shadow paints above the background and below the glyphs, so the words hold
   still and the accent rises behind them. 25px covers the 27px inline box. */
/* The fill brings its own ink: --color-on-accent is white on the light
   theme's pink and near-black on dark's mint, so the word is read against the
   fill rather than against the hero it used to borrow its colour from. White
   on #ff006b measures 3.8:1, where the near-black it replaces measured 4.3 --
   a deliberate choice, and the darker #cc0056 is what would buy it back. */
.hero__link:hover{color:var(--color-on-accent);
  box-shadow:inset 0 -25px 0 0 var(--color-accent)}
/* Forced colours drops shadows altogether, so the underline comes back there. */
@media (forced-colors:active){.hero__link{text-decoration:underline}}
.hero__ctas{display:flex;gap:var(--space-4);flex-wrap:wrap}

/* ---- Impact / the arc ------------------------------------- */
/* Overlap: the section is transparent and pulled up over the hero, so
   the hero photo shows through around the card. Only the card is painted,
   which makes the overlap read clearly and puts the card above the fold. */
.impact{position:relative;z-index:3;background:transparent;margin-top:-120px;padding-bottom:var(--space-8)}
.impact__card{
  position:relative;
  background:var(--color-surface-raised);
  border-radius:var(--radius-lg);padding:var(--space-8);
  /* The same shadow the other surfaces on the page carry: a wide, faint lift
     in light mode and none at all in dark, where the raised fill is what
     separates the card from what is behind it. */
  box-shadow:var(--shadow-on-page);
}
/* Fills the viewport behind everything below the card with the page color,
   so only the hero region shows the photo, not the sections further down. */
.impact__head{margin-bottom:var(--space-7);max-width:720px}
.impact__head .eyebrow{display:block;margin-bottom:var(--space-4)}
/* This is the Impact section's heading (an h2, so the section has a real
   accessible name and the document outline is unbroken) but it should read
   as a lead sentence, not a title — hence the explicit 400 overriding the
   browser's bold default for h2. */
.narrative__lead{
  font-size:clamp(20px,1.09vw + 16.1px,30px);line-height:1.3;letter-spacing:-.01em;
  font-weight:400;color:var(--color-text);margin:0;text-wrap:balance;
}

/* Scale block: a few big numbers that establish magnitude at a glance.

   The columns are sized to their contents and the space left over is split
   evenly between them, rather than five equal columns each starting its own
   content at the left. Equal columns make the gaps look unequal, because what
   a reader measures is the space between one caption and the next, and the
   captions run from 76px to 139px: that read 59, 96, 66 and 123 across this
   row, and left 41px of slack after the last figure. Sized and spaced this
   way, every gap is the same and the row ends where the card does.

   auto rather than max-content, so that where there is not enough room the
   tracks can still shrink and the captions wrap instead of overflowing. */
.scale{display:grid;grid-template-columns:repeat(5,auto);justify-content:space-between;
  gap:var(--space-7) var(--space-5);margin:var(--space-7) 0 0}
.scale__item dt{font-size:var(--text-stat);line-height:1;letter-spacing:-.03em;font-weight:800;color:var(--color-text)}
.scale__item dd{margin-top:var(--space-2);font-size:var(--text-sm);color:var(--color-text-subtle)}
/* Five across, then three, then two. Each step is where a caption would stop
   fitting on one line beside the figure above it, and three before two beats
   two with one strand on its own row. */
@media(max-width:860px){.scale{grid-template-columns:repeat(3,auto);gap:var(--space-6) var(--space-5)}}
@media(max-width:560px){.scale{grid-template-columns:repeat(2,auto)}}

/* ---- Beliefs ---------------------------------------------- */
/* Same subgrid alignment as .arc: the numeral, the claim and the paragraph
   each share a row across all three cards, so they line up by structure
   rather than by reserved line counts that assume today's exact copy. */
.belief-grid{display:grid;grid-template-columns:repeat(3,1fr);
  grid-template-rows:auto auto auto;gap:var(--space-5)}
.belief{
  background:var(--color-surface-raised);box-shadow:var(--shadow-on-page);
  border-radius:var(--radius-md);padding:var(--space-6) var(--space-6);
  display:grid;grid-template-rows:subgrid;grid-row:span 3;gap:var(--space-5);
}
.belief__num{font-size:var(--text-sm);font-weight:800;color:var(--color-accent);letter-spacing:.1em}
/* Capped measure: these cards go full width below 860, where their text would
   otherwise run to 80 characters a line on a tablet. Three-up or one-up is
   right for a set of three; two-up would leave one stranded. */
.belief p,.rec__quote{max-width:62ch}
.belief h3{
  font-size:var(--text-xl);line-height:1.22;letter-spacing:-.01em;
  text-wrap:balance;align-self:start;
}
.belief p{
  color:var(--color-text-muted);font-size:var(--text-sm);line-height:1.55;
}

/* ---- Work ------------------------------------------------- */
.case{
  display:grid;grid-template-columns:40% 1fr;gap:0;align-items:stretch;
  background:var(--color-surface-raised);box-shadow:var(--shadow-on-band);
  border-radius:var(--radius-lg);margin-bottom:var(--space-5);overflow:hidden;
}
/* Media is the left column on every card. The body stays first in the DOM,
   so the reading order is still headline-then-picture; order:-1 moves the
   picture in front of it visually. */
.case__media{order:-1}
.case__body{padding:var(--space-7);align-self:center}
.case__role{color:var(--color-text-subtle);margin-bottom:var(--space-4)}
/* The padlock on a card whose case study is gated. It inherits the role
   line's colour rather than taking the accent: it is a fact about the link,
   not a call to press it. Hidden once the gate has been unlocked, from the
   attribute index.html's head script sets, so a reader who already has the
   password is not told three more times that they need one. */
.case__lock{display:inline-flex;vertical-align:-2px;margin-left:6px}
html[data-unlocked] .case__lock{display:none}
.case__body h3{font-size:var(--text-2xl);line-height:1.1;letter-spacing:-.02em;margin-bottom:var(--space-4)}
.case__body p{color:var(--color-text-muted);margin-bottom:var(--space-4)}
.case__link{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--color-accent);font-weight:700;font-size:var(--text-sm);margin-top:var(--space-2)}
.case__link .btn__arrow{display:inline-block}
.case__link:hover .btn__arrow{transform:translateX(var(--hover-shift))}
/* Media bleeds to the card edges (no padding), filling its column full-height */
.case__media{position:relative;overflow:hidden;background:var(--case-media-bg)}
.case__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;filter:none}

/* ---- Writing (editorial essay list) ----------------------- */
.essay-list{list-style:none;max-width:860px;margin:0 auto;border-top:1px solid var(--color-border)}
.essay{border-bottom:1px solid var(--color-border)}
.essay__link{
  display:grid;grid-template-columns:1fr auto;align-items:baseline;column-gap:var(--space-5);
  padding:var(--space-5);
  transition:background var(--dur) var(--ease);
}
/* no radius: the hover shade spans edge-to-edge so it aligns with the dividers */
.essay__link:hover{background:var(--essay-hover)}
.essay__meta{
  grid-column:1;order:0;font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);
  text-transform:uppercase;font-weight:var(--kicker-weight);color:var(--color-text-subtle);
  margin-bottom:var(--space-2);
}
.essay__title{grid-column:1;font-size:var(--text-xl);line-height:1.25;letter-spacing:-.01em;color:var(--color-text)}
.essay__arrow{grid-column:2;grid-row:1 / span 2;align-self:center;color:var(--color-accent);transition:transform var(--dur) var(--ease)}
.essay__link:hover .essay__arrow{transform:translateX(var(--hover-shift))}

/* ---- Speaking --------------------------------------------- */
/* The same divider-ruled list as Writing above -- no card surface, no shadow,
   nothing but rules and a hover shade -- except that every row keeps its
   thumbnail. These were three full-width cards, which gave a section of three
   outbound links the same visual weight as the three case studies. */
.talk-list{list-style:none;max-width:860px;margin:0 auto;border-top:1px solid var(--color-border)}
.talk{border-bottom:1px solid var(--color-border)}
.talk__link{
  --thumb:200px;
  display:grid;grid-template-columns:var(--thumb) 1fr auto;
  /* Four rows, the first and last empty. The thumbnail is taller than the
     title and description beside it, and that slack has to land somewhere:
     shared between the two text rows it half-opened the gap between them, so
     the gap moved with the description's length -- widest under a one-line
     description, tightest under three. The fr tracks take it instead, equally
     above and below, which keeps the pair centred on the thumbnail and leaves
     the gap to the padding below the title.

     min-height states the thumbnail's own height, which is what the rows used
     to be stretched to. Without it the free space is indefinite, the fr tracks
     collapse to nothing and the slack goes back to the text rows. It is
     derived from --thumb and the 3:2 ratio, so the two stay in step. */
  grid-template-rows:1fr auto auto 1fr;
  min-height:calc(var(--thumb) / 3 * 2 + var(--space-5) * 2);
  column-gap:var(--space-5);row-gap:0;
  align-items:center;padding:var(--space-5);
  transition:background var(--dur) var(--ease);
}
/* no radius, like .essay__link: the shade spans edge-to-edge so it aligns
   with the dividers above and below it */
.talk__link:hover{background:var(--essay-hover)}
/* The thumbnail spans both text rows, so it sets the row's minimum height.
   An aspect-ratio rather than a height, so the 3:2 sources crop the same way
   at every width instead of to whatever the text next to them happens to be. */
.talk__media{grid-column:1;grid-row:1 / -1;
  position:relative;overflow:hidden;aspect-ratio:3 / 2;
  border-radius:var(--radius-sm);background:var(--case-media-bg)}
.talk__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.talk__body{grid-column:2;grid-row:2;min-width:0}
.talk__desc{grid-column:2;grid-row:3;min-width:0;max-width:62ch;
  padding-top:var(--space-3);
  color:var(--color-text-muted);font-size:var(--text-sm);line-height:1.55}
.talk__arrow{grid-column:3;grid-row:1 / -1;
  color:var(--color-accent);transition:transform var(--dur) var(--ease)}
.talk__link:hover .talk__arrow{transform:translateX(var(--hover-shift))}

/* Hovering anywhere on a work card or a talk row eases its artwork in. Same 1.04
   over .6s as the next-case card at the foot of a case study, so the site
   has one zoom rather than two; the media box's overflow does the clipping.
   Reduced motion gets no zoom at all -- without a transition the scale would
   land as a jump rather than a movement. */
.case__media img,.talk__media img{will-change:transform;transition:transform .6s var(--ease)}
.case:hover .case__media img,.talk:hover .talk__media img{transform:scale(1.04)}
/* The line layer sits out the zoom, so the devices grow against a fixed line
   rather than the whole picture swelling. Stated at the hover rule's own
   weight, since a plain .cs-layer--line would lose to it, and both states
   carry the same declaration so there is nothing for the transition to
   animate. */
.case__media img.cs-layer--line,
.case:hover .case__media img.cs-layer--line{transform:none}
/* --line-scale draws one card's line smaller without touching its devices.
   It shortens the layer's box rather than scaling the layer: cover is binding
   on height here, so a box at 80% height renders the whole drawing -- stroke
   included -- at 80% of its old size, centred exactly where a scale(.8) would
   have put it, while the box keeps the frame's full width. That width is what
   a transform cannot buy. Cover answers a wider box with a wider slice of the
   source, and the sweep runs the full width of its artwork, so the line still
   reaches both edges of the card instead of stopping short of them. */
.case__media img.cs-layer--line{
  top:calc((100% - 100% * var(--line-scale,1)) / 2);bottom:auto;
  height:calc(100% * var(--line-scale,1))}
/* Trip Planning Hub. Its line is one long sweep across an empty field where
   the other two cards hold short arcs around the devices, and its card is the
   tallest of the three, so it is drawn largest as well: 3.4 rendered px of
   stroke against Search's 2.8 and AI Trip Planner's 2.2. A fifth down takes
   it to 2.7, level with Search. */
.case__media--tph{--line-scale:.8}
@media(prefers-reduced-motion:reduce){
  .case:hover .case__media img,.talk:hover .talk__media img{transform:none}
}
.talk__meta{display:block;color:var(--color-text-subtle);margin-bottom:var(--space-2);
  font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;font-weight:var(--kicker-weight)}
.talk__title{display:block;font-size:var(--text-xl);line-height:1.25;letter-spacing:-.01em;color:var(--color-text)}

/* ---- Recommendations -------------------------------------- */
/* Three quotes set straight on the page: no surface, no shadow, no padding,
   and no spotlight, whose rim-glow has no border left to light. With the
   surfaces gone the gap is the only thing holding the columns apart, so it
   goes up from 24px to 48px. */
.rec-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-7)}
/* Still a column, because margin-top:auto on the attribution below holds the
   three names to one line across the grid however long the quotes run. */
.rec{margin:0;display:flex;flex-direction:column}
.rec__quote{
  margin:0 0 var(--space-5);color:var(--color-text-muted);font-size:var(--text-sm);line-height:1.5;
  position:relative;padding-top:var(--space-6);
}
/* The quotes run long, so each is broken into paragraphs; the name below
   keeps its own larger gap from the last of them. */
.rec__quote p{margin:0 0 var(--space-4)}
.rec__quote p:last-child{margin-bottom:0}
.rec__quote::before{
  content:"\201C";position:absolute;top:-6px;left:-2px;
  font-size:56px;line-height:1;color:var(--color-accent);font-family:Georgia,serif;
}
.rec__by{margin-top:auto;display:flex;align-items:center;gap:var(--space-3)}
.rec__who{display:flex;flex-direction:column;gap:2px;min-width:0}
/* 44px drawn from a 200px source, so it stays sharp on a 2x screen. */
.rec__avatar{flex:none;width:44px;height:44px;border-radius:50%;object-fit:cover;
  background:var(--case-media-bg)}
.rec__name{font-weight:700;color:var(--color-text)}
.rec__role{font-size:var(--text-sm);color:var(--color-text-subtle)}

/* ---- Contact ---------------------------------------------- */
.contact{text-align:center}
.contact .eyebrow{display:block;margin-bottom:var(--space-3)}
.contact h2{font-size:var(--text-title);line-height:1.08;letter-spacing:-.02em;max-width:18ch;margin:0 auto var(--space-5)}
.contact p{font-size:var(--text-md);color:var(--color-text-muted);max-width:52ch;margin:0 auto var(--space-7)}
.contact__links{display:flex;gap:var(--space-4);justify-content:center;flex-wrap:wrap}

/* ---- Footer ----------------------------------------------- */
.footer{border-top:1px solid var(--color-border);padding:var(--space-7) 0;color:var(--color-text-subtle);font-size:var(--text-sm)}
.footer__inner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:var(--space-4)}
.footer__legal a{color:var(--color-text-subtle);transition:color var(--dur) var(--ease)}
.footer__legal a:hover{color:var(--color-accent)}

/* ---- Motion ----------------------------------------------- */
/* Scroll-into-view reveal. --d is a per-element stagger delay (JS, for
   grouped items). Always a move-down entry (starts above, settles down),
   independent of scroll direction. */
/* Everything below is scoped to .js, a class the inline head script adds.
   .reveal's resting state is opacity:0 and only JavaScript adds .is-in, so
   without this gate a blocked or failed script leaves the page blank — the
   reveal covers nearly all the content. Under .js the animation runs as
   designed; without it the content is simply there. */
.js .reveal{opacity:0;transform:translateY(var(--from,-18px));transition:opacity .7s var(--ease),transform .7s var(--ease);transition-delay:var(--d,0ms)}
.js .reveal.is-in{opacity:1;transform:none}

/* The impact card travels a little further as it enters, for emphasis. */
.js .impact__card.reveal{--from:-32px}
.js .impact__card.reveal.is-in{transform:none}

/* Hero loads with a staggered cascade (above the fold, so time-based not scroll-based). */
.js .hero .reveal{opacity:0;transform:translateY(-20px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
.hero.is-loaded .reveal{opacity:1;transform:none}
.hero.is-loaded h1{transition-delay:80ms}
.hero.is-loaded .hero__lede{transition-delay:220ms}
.hero.is-loaded .hero__ctas{transition-delay:420ms}

/* Nav drops in on load, and transitions the glass smoothly on scroll.
   Also gated on .js: the off-screen start position is only safe when a
   script is there to add .is-ready, otherwise the nav never arrives. */
.nav{transition:transform .6s var(--ease),background var(--dur-ambient) var(--ease),backdrop-filter var(--dur-ambient) var(--ease),-webkit-backdrop-filter var(--dur-ambient) var(--ease),border-color var(--dur-ambient) var(--ease),box-shadow var(--dur-ambient) var(--ease)}
.js .nav{transform:translateY(-100%)}
.js .nav.is-ready{transform:none}
/* Case studies skip the drop. Their hero artwork settles in on load, and two
   entrances arriving on the same beat read as one thing going wrong rather
   than as two. The hero's own layer is the tell, so :has keeps this to those
   pages without a marker class on chrome that twelve pages carry by hand. */
.js .nav:has(~ main .cs-hero__bg){transform:none}

/* Reduced motion: show the end state immediately. Selectors mirror the .js
   gating above so they stay specific enough to win. */
@media(prefers-reduced-motion:reduce){
  .js .reveal,.js .hero .reveal,.js .impact__card.reveal{opacity:1;transform:none;transition:none}
  .js .nav{transform:none}
}

/* The nav collapses earlier than the rest of the layout, and deliberately
   so. Five links, a CTA button and the theme toggle need about 960px before
   the brand stops colliding with the first link — a collision that was
   there long before this breakpoint existed. Everything else on the page is
   still perfectly happy in its desktop arrangement at that width, so this
   gets its own breakpoint rather than dragging the whole responsive block
   up with it. Adding a sixth link costs roughly another 50px, so move this
   up with it. main.js watches (min-width: 980px) to force the panel shut on
   resize; change both together. */
@media(max-width:979px){
  /* Nav collapses into a menu button plus a drop-down panel. Previously the
     whole link list (including the "Get in touch" CTA and the theme toggle)
     was simply display:none below this width, which left a phone with a
     logo and no way to reach any section or the contact button. */
  .nav__toggle{display:block}
  .nav__links{
    position:absolute;top:100%;left:0;right:0;
    flex-direction:column;align-items:stretch;gap:0;
    padding:var(--space-3) var(--space-5) var(--space-5);
    /* Solid, not glass. The nav already carries its own backdrop-filter,
       which makes it a backdrop root — a nested backdrop-filter on this
       panel samples the nav's output rather than the page behind it, so the
       hero photo showed straight through the menu and the links became
       unreadable. An opaque surface is also simply the right call for a
       menu: legibility beats the effect. */
    background:var(--color-surface-raised);
    border-bottom:1px solid var(--color-border);
    box-shadow:0 12px 30px var(--glass-shadow);
    /* Collapsed state. visibility (not display) so the panel can animate and
       so its links leave the tab order while hidden. */
    visibility:hidden;opacity:0;transform:translateY(-8px);
    transition:opacity var(--dur) var(--ease),transform var(--dur) var(--ease),visibility 0s linear var(--dur);
  }
  .nav.is-open .nav__links{
    visibility:visible;opacity:1;transform:none;
    transition:opacity var(--dur) var(--ease),transform var(--dur) var(--ease),visibility 0s;
  }
  /* While open, the bar itself takes the panel's surface so the two read as
     one sheet. Without this the bar stays transparent over the hero photo
     while the panel below it is opaque, which looks like a rendering fault.
     The ink flips to page colours for the same reason it does on scroll:
     the logo and icons are now sitting on a surface, not on the photo. */
  .nav.is-open{
    background:var(--color-surface-raised);
    border-bottom-color:transparent;
    --nav-ink:var(--color-text);--nav-ink-dim:var(--color-text-muted);
  }
  .nav.is-open ~ main .cs-hero__media::before{opacity:0}
  /* Panel links read against the glass, not the hero photo, so they take the
     page ink rather than --nav-ink (which is light while at the top). */
  .nav__links a:not(.btn){
    color:var(--color-text);font-size:var(--text-md);
    padding:var(--space-4) 0;border-bottom:1px solid var(--color-border);
  }
  /* The panel stacks the links over a hairline each, which is where the bar's
     underline would land. It has the room for a colour shift instead. */
  .nav__links a:not(.btn)::after{content:none}
  .nav__links a:not(.btn):hover{color:var(--color-accent)}
  .nav__links .btn{justify-content:center;margin-top:var(--space-5)}

}

/* ---- Responsive ------------------------------------------- */
@media(max-width:860px){
  .section{padding:var(--space-9) 0}

  /* No optical offset here. Below 860 the hero is 94vh with 150px of bottom
     padding and the impact card reaches up 120px rather than 232, and those
     constants very nearly balance on their own — measured 78px above the
     headline against 68px below. The desktop +40px would push it to 98/48 and
     make the problem it fixes upstairs. */
  /* padding-top was 0 here, which centred the content between the viewport's
     top edge and the impact card rather than between the nav and the card, so
     on a phone it sat under the bar. It needs the nav's height plus a step:
     the card is pulled up twice at this width, by .impact and again by
     .impact__card, so 120px more of the bottom padding is spent on the
     overlap than on desktop. 105px puts the gaps within 3px of each other at
     375x812, 375x667 and 768x1024. */
  .hero{min-height:94vh;padding-top:calc(73px + var(--space-6));padding-bottom:150px}
  /* The washes turn from left-to-right to bottom-to-top here, because the
     words move under the picture instead of sitting beside it, and the
     vignette's focus moves with the subject that --hero-img just re-anchored
     to the top. Each falls back to its desktop value, which is how the dark
     theme keeps one vignette at every width without restating it. */
  .hero__scrim{background:var(--hero-scrim-mobile)}
  .hero__scrim-b{background:var(--hero-scrim-b-mobile,var(--hero-scrim-b))}
  .hero__vignette{background:var(--hero-vignette-mobile,var(--hero-vignette))}
  .hero__img{background-position:center top}
  .impact__card{margin-top:-120px;padding:var(--space-6)}
  .belief-grid{grid-template-columns:1fr}
  .case{grid-template-columns:1fr;gap:0}
  .case__body{padding:var(--space-6)}
  /* order:-1 is already on .case__media, so stacked cards lead with the
     picture the same way the two-column ones do. */
  .case__media{min-height:220px}
  /* --line-scale is off in this layout. The stacked frame is wide and short,
     so cover binds on width instead of height: the line is already drawn at
     about the size the two-column card has to shrink it to, and a shorter box
     would buy no thinning at all -- it would only crop the ends of the sweep
     away before they reached the card's edges. */
  .case__media img.cs-layer--line{top:0;height:100%}
  /* The thumbnail keeps its place beside the title and the description drops
     to a full-width row beneath both, because a third text column at this
     width would leave the title about twelve characters to a line. The arrow
     goes with it, for the same reason. */
  .talk__link{--thumb:104px;grid-template-columns:var(--thumb) 1fr;
    min-height:calc(var(--thumb) / 3 * 2 + var(--space-4) * 2);
    column-gap:var(--space-4);padding:var(--space-4) var(--space-3);align-items:start}
  .talk__body{grid-column:2 / -1}
  .talk__desc{grid-column:1 / -1}
  .talk__arrow{display:none}
  .rec-grid{grid-template-columns:1fr}
}

/* ============================================================
   Case study pages (cs-*.html)
   ============================================================ */
.cs-hero{
  position:relative;padding:calc(72px + var(--space-10)) 0 var(--space-9);
  background:var(--color-surface);border-bottom:1px solid var(--color-border);
}
.cs-hero__inner{max-width:820px;margin:0 auto;padding:0 var(--gutter)}
.cs-back{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--color-text-subtle);
  font-size:var(--text-sm);font-weight:600;margin-bottom:var(--space-6);transition:color var(--dur) var(--ease)}
.cs-back:hover{color:var(--color-accent)}
.cs-back .btn__arrow{transform:scaleX(-1)}
.cs-hero__meta{font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;
  font-weight:var(--kicker-weight);color:var(--color-accent);margin-bottom:var(--space-4)}
.cs-hero h1{font-size:var(--text-title);line-height:1.08;letter-spacing:-.02em;margin-bottom:var(--space-5)}
.cs-hero__lede{font-size:var(--text-xl);line-height:1.45;color:var(--color-text);max-width:54ch;font-weight:500;letter-spacing:-.01em}
.cs-hero__lede--sub{font-size:var(--text-md);line-height:1.55;color:var(--color-text-muted);max-width:60ch;margin-top:var(--space-4);font-weight:400;letter-spacing:0}
.cs-hero__facts{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:var(--space-7);
  border-top:1px solid var(--color-border)}
.cs-fact{padding:var(--space-5) var(--space-5) 0 0}
.cs-fact+.cs-fact{padding-left:var(--space-5);border-left:1px solid var(--color-border)}
.cs-fact dt{font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;
  font-weight:var(--kicker-weight);color:var(--color-text-subtle);margin-bottom:var(--space-2)}
.cs-fact dd{font-size:var(--text-md);color:var(--color-text);font-weight:600;line-height:1.35}

/* Immersive hero: the artwork is transparent and sits on --cs-hero-bg, which the
   own background, so the image can be `contain`-fit (shown smaller, more visible)
   and its left/right edges blend invisibly into the section. The headline overlays
   the lower portion with a bottom scrim for contrast. The facts sit in a separate
   themed band BELOW the hero, not over the image. */
.cs-hero--media{padding:0;border-bottom:0;background:var(--cs-hero-bg);overflow:hidden}
.cs-hero__media{position:relative;min-height:clamp(640px,88vh,880px);
  display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;
  padding-top:calc(72px + var(--space-5))}
.cs-hero__bg{position:absolute;inset:0;z-index:0;overflow:hidden;--hero-head:24px}
/* The hero frames are 2000x733, and the frame is not the subject. The phones
   sit in the middle 38.3% of it — x 611 to 1377, the union across all three —
   bled to the top and bottom edges, while the outer thirds carry nothing but
   the decorative line. Sizing the frame to the hero therefore renders the
   artwork at well under half the width it can have.

   width:261% is 100/38.3: the width at which the artwork column, rather than
   the frame, spans the hero exactly. contain then resolves against whichever
   axis binds first, and that is what makes one rule hold at both ends. On a
   wide hero the height binds, so the artwork fills the full height and only
   the decorative tails are clipped left and right. On a narrow or a tall one
   the width binds instead, so the artwork scales down to sit exactly within
   the hero's width. Neither branch can cut into the column.

   --hero-head is how far the artwork overhangs the hero's top edge, and it
   is what bounds the drift: the devices sink by up to data-parallax pixels as
   the hero scrolls past, so anything above that overhang walks the artwork's
   own top edge down into view. The overhang costs scale -- the box is taller
   than the hero, and contain answers by drawing the artwork that much larger,
   cropping the difference off the top and bottom.

   On two of the three cases that cost is unnecessary. The Trip Planning Hub
   and AI Trip Planner devices leave 186 and 116 rows of clear alpha above the
   tallest phone, so their top edge is nothing to see and the drift can run
   past it. They keep the old 24px, which is why raising the drift left their
   hero composition exactly as it was. Below, the phones run into the bottom
   scrim, which is opaque over the lowest 26% and already covers them.

   The narrow layout re-states this below 861px. */
.cs-hero__bg img{width:261%;max-width:none;left:-80.5%;
  height:calc(100% + var(--hero-head) + 24px);top:calc(var(--hero-head) * -1);
  position:absolute;object-fit:contain;object-position:center;display:block;
  will-change:transform;transform:translate3d(0,var(--shift,0px),0)}
/* The devices and the two line layers share that box exactly, so they stay in
   register; only one line layer is lit at a time and the pair crossfades on
   the theme's own timing. One set of classes drives all three places the
   artwork appears -- the case hero, the homepage cards and the next-case
   teasers -- so the stack is described once.

   Markup order puts the lines first so the devices paint over them. z-index
   states it as well, because the narrow layout drops the devices back into
   flow while the lines stay absolute, and a positioned element would
   otherwise win on order alone. */
.cs-layer--line{transition:opacity var(--theme-dur) var(--ease);z-index:0}
.cs-layer--light{opacity:var(--line-light)}
.cs-layer--dark{opacity:var(--line-dark)}
.cs-layer--devices{z-index:1}
/* Search is the exception the overhang exists for: its phone grid is bled off
   the top and bottom of the frame on purpose, so its top edge is a row of cut
   phones and the drift would walk that cut into the hero. It buys the drift's
   worth of overhang instead, at about a tenth more scale -- a tighter crop on
   a grid that is already full-bleed, rather than a visible seam.

   Pinned to the top of its box rather than centred, because contain centres
   whatever slack the binding axis leaves, and on a narrow, tall viewport the
   width binds and would hand back a third of the overhang. Pinned, the
   overhang is exactly --hero-head on every viewport. What the pin costs is at
   the bottom, where the grid then stops short of the hero's last rows -- deep
   inside the opaque part of the scrim. */
.cs-hero__bg--bleed{--hero-head:124px}
.cs-hero__bg--bleed img{object-position:center top}
/* Entry: the devices settle out of an enlarged state as the page opens, so the
   hero arrives rather than simply being there. The enlarged state is the base,
   not a keyframe the element reaches a frame late, so there is no moment at
   final size before the settle starts. The line layers sit it out, the same as
   they sit out the drift and the card hover.

   A keyframe rather than a transition, because the parallax rewrites this very
   transform on every scroll frame: a transition left declared on the element
   would keep smearing those writes into a 1.1s lag long after the entry was
   over. The keyframes carry --shift through so a scroll during the entry still
   drifts, and the fill holds the end state, where var() still resolves live.

   Gated on .is-loaded, which main.js adds once the artwork has decoded. It is
   preloaded, so that is usually the first frame; on a slow line the settle
   waits rather than playing out over an empty box. */
@keyframes cs-hero-settle{
  from{transform:translate3d(0,var(--shift,0px),0) scale(1.14)}
  to{transform:translate3d(0,var(--shift,0px),0) scale(1)}
}
.js .cs-hero__bg .cs-layer--devices{transform:translate3d(0,var(--shift,0px),0) scale(1.14)}
.js .cs-hero__bg.is-loaded .cs-layer--devices{animation:cs-hero-settle 1.1s var(--ease) both}
@media(prefers-reduced-motion:reduce){
  .js .cs-hero__bg .cs-layer--devices{transform:translate3d(0,var(--shift,0px),0)}
  .js .cs-hero__bg.is-loaded .cs-layer--devices{animation:none}
}
/* Top scrim, for the artwork that reaches up under the fixed nav — a phone's
   white screen can sit directly behind a nav link. Tinted to the hero's own
   field per theme, so it reads as the hero continuing rather than as a bar.

   It belongs to the hero rather than to the nav, which is where it used to
   live. A fixed, z-indexed nav opens a stacking context, so z-index:-1 on a
   nav child only puts it behind the nav's own content and it still painted
   over the hero — including over the back pill, which it washed from about
   0.30 alpha at its top edge to 0.04 at its bottom. Here it sits above
   the picture and below the hero's own UI, which is the order it always meant
   to be in. The nav still paints over it, so the links keep their cover.

   The fade on scroll is driven from the nav's class because that is where the
   scroll state lives; .nav precedes main as a sibling on every page that has
   this hero. */
.cs-hero__media::before{content:"";position:absolute;inset:0 0 auto 0;height:140px;z-index:1;pointer-events:none;
  background:var(--nav-media-scrim);
  opacity:1;transition:opacity var(--dur-ambient) var(--ease)}
.nav.is-scrolled ~ main .cs-hero__media::before{opacity:0}
/* Bottom scrim only, in the section's own colour, confined to the lower band so more
   of the image stays visible above the text. The bottom stop is fully opaque:
   anything less leaves a trace of the artwork on the hero's last row, which
   then meets the facts band as an uneven edge. Raising it changes nothing above
   26%, where the first segment ends — well below the headline. */
.cs-hero__media::after{content:"";position:absolute;left:0;right:0;bottom:0;top:0;z-index:1;pointer-events:none;
  background:var(--cs-scrim)}
.cs-hero--media .cs-hero__inner{position:relative;z-index:2;width:100%;
  padding-top:var(--space-6);padding-bottom:var(--space-6)}
/* Back link near the top of the hero, just under the nav, as a pill. It sits in
   normal flow rather than pinned: the headline block below is bottom-aligned, and
   on a narrow screen a three-line headline grows upwards until it runs straight
   through a pinned pill. In flow the hero just gets taller instead. The space
   above it is padding on .cs-hero__media rather than on the section, so the
   image — positioned against the padding box — still bleeds to the top of the
   page behind the nav. */
.cs-hero__top{position:relative;z-index:3}
.cs-hero__top .cs-hero__inner{padding-top:0;padding-bottom:0}
/* The pill carries a fill of its own because the bottom scrim never reaches
   this row — it sits above the height where that gradient has faded out — so
   without a ground the link would land on whatever the picture puts there,
   which on two of the three case studies is a white phone screen.
   Translucency is worse than nothing: at 60% over white the backdrop lands on
   mid-grey, and the point of the fill is a ground that does not depend on what
   the artwork happens to put behind it. */
.cs-hero--media .cs-hero__top .cs-back{margin-bottom:0;
  color:var(--pill-ink);background:var(--pill-bg);
  padding:4px 12px 4px 8px;border-radius:99px;
  transition:background var(--dur) var(--ease),gap var(--dur) var(--ease),color var(--dur) var(--ease)}
.cs-hero--media .cs-hero__top .cs-back:hover{color:var(--color-on-accent);background:var(--color-accent-hover);gap:var(--space-3)}
.cs-hero--media .cs-hero__top .cs-back .btn__arrow{transition:transform var(--dur) var(--ease)}
.cs-hero--media .cs-hero__top .cs-back:hover .btn__arrow{transform:scaleX(-1) translateX(var(--hover-shift))}
.cs-hero--media h1{color:var(--on-media)}
.cs-hero--media .cs-hero__lede{color:var(--on-media)}
.cs-hero--media .cs-hero__lede--sub{color:var(--on-media-muted)}
/* Facts band: a themed section below the hero (light in light mode, dark in dark),
   reusing the chart surface colour so it reads as its own band, not part of the hero. */
.cs-hero__facts-band{background:var(--facts-band-bg)}
.cs-hero__facts-band .cs-hero__inner{padding-top:0;padding-bottom:0}
/* The case meta leads the band: which product, whose, and when, above the four
   facts that qualify it. It is the brand accent on the band's own ground,
   which in light is 3.1:1 against #dfe9f6 — short of the 4.5:1 this 12px bold text
   would need, and a deliberate choice of brand colour over the darker #cc0056,
   which clears it at 4.6. Darkening the ink or the ground is what buys it back.

   The band has no padding of its own; its height is the facts' padding. The
   meta takes a full step above itself and the facts keep half of theirs, so
   the band grows by the line and not by the gap as well. */
.cs-hero__facts-band .cs-hero__meta{margin:0;padding-top:var(--space-6)}
.cs-hero--media .cs-hero__facts{margin-top:0;border-top:0}
.cs-hero--media .cs-fact{padding:var(--space-4) var(--space-5) var(--space-6) 0}
.cs-hero--media .cs-fact+.cs-fact{border-left:0;padding-left:0}
.cs-hero--media .cs-fact dt{font-size:var(--text-xs);color:var(--color-text-subtle)}
.cs-hero--media .cs-fact dd{font-size:var(--text-base);font-weight:500;color:var(--color-text)}

.cs-body{max-width:820px;margin:0 auto;padding:var(--space-9) var(--gutter)}
.cs-section{margin-bottom:var(--space-8)}
.cs-section:last-child{margin-bottom:0}
.cs-section > .eyebrow{display:block;margin-bottom:var(--space-3)}
.cs-section h2{font-size:var(--text-2xl);line-height:1.15;letter-spacing:-.01em;margin-bottom:var(--space-4)}
.cs-section p{color:var(--color-text-muted);font-size:var(--text-md);line-height:1.65;margin-bottom:var(--space-4)}
.cs-section p:last-child{margin-bottom:0}
/* The reading measure, held separately from the column. .cs-body is 820px so
   a case paragraph starts and ends on the same lines as the hero headline
   above it, but 756px of text at 18px runs a line to about 87 characters.
   Capping the prose instead of the column keeps the left edge on the hero and
   brings a line back to about 74, without moving .cs-wide, whose centring is
   measured from .cs-body's content box.

   Only unclassed paragraphs. Every classed one is either set in another size
   or lives inside a device, and 56ch means a different number of pixels at
   each: on .cs-source and .cs-metrics__note, at --text-xs, it would come out
   at 424px and wrap a caption to a third of the figure it sits under.

   The list cap goes on the item, not the ul: --text-md is set on the li, so
   ch on the ul would resolve against the inherited 16px and come out 70px
   short. The bullet's padding is added back so the text beside it runs the
   same width as a paragraph. */
.cs-section > p:not([class]){max-width:56ch}
.cs-section > ul.cs-list > li{max-width:calc(56ch + var(--space-5))}
.cs-section strong{color:var(--color-text);font-weight:600}
/* Both selectors: .cs-section p is (0,1,1) and would otherwise win over a
   bare class, which is how this quote spent its life at reading size. Same
   fix as .cs-metrics__note below. */
.cs-section p.cs-pull,p.cs-pull{
  margin:var(--space-7) 0;padding:var(--space-5) 0 var(--space-5) var(--space-6);
  border-left:3px solid var(--color-accent);
  font-size:var(--text-xl);line-height:1.35;letter-spacing:-.01em;color:var(--color-text);text-wrap:balance;
}
.cs-figure{margin:var(--space-7) 0}
/* Video sits in a figure like an image does, but needs height:auto spelled out:
   the base img{} rule below does not apply to it, so a <video> with width and
   height attributes keeps its intrinsic height while the width shrinks, and
   letterboxes itself on a phone. It is also deliberately left out of the
   .cs-wide img rule further down, which crops to a fixed ratio — a video has
   its own, and cropping it would cut the frame. */
.cs-figure img,.cs-figure video{width:100%;border-radius:var(--radius-md);display:block}
.cs-figure video{height:auto}
.cs-figure figcaption{margin-top:var(--space-3);font-size:var(--text-sm);color:var(--color-text-subtle);text-align:center}
/* Framed variant: screenshots that carry their own background sit on a surface card with a hairline */
.cs-figure--framed img{border:1px solid var(--color-border);background:var(--color-surface)}
/* Shift-down variant: image nudged ~30px down inside a fixed-height clipped frame,
   so there is padding above and the bottom edge is cropped. */
.cs-figure--shiftdown .cs-figure__clip{display:block;overflow:hidden;border:1px solid var(--color-border);
  border-radius:var(--radius-md);background:#1f1e2c;line-height:0;padding-top:30px}
.cs-figure--shiftdown .cs-figure__clip img{border:0;border-radius:0;display:block;width:100%;
  margin-bottom:-30px}

/* Fade-in on load: JS marks content images with .img-fade; they reveal once decoded,
   so late-arriving lazy images ease in rather than pop. Hero/next backgrounds excluded. */
.img-fade{opacity:0;transition:opacity .5s var(--ease)}
.img-fade.is-loaded{opacity:1}
/* The line layers carry their own opacity, which is how only one of the pair
   is ever lit. A flat opacity:1 on load would light both, so restate the
   theme's value at a weight that outlives it. */
.cs-layer--light.img-fade.is-loaded{opacity:var(--line-light)}
.cs-layer--dark.img-fade.is-loaded{opacity:var(--line-dark)}
@media (prefers-reduced-motion: reduce){.img-fade{transition:none}}

/* ---- Breakout utilities: escape the 820px reading column --------------------
   --wide: ~1120px, centered on the viewport, for substantial artifacts.
   --bleed: full viewport width, edge to edge, for immersive visuals.
   Both re-pad their caption so text stays readable. */
.cs-wide{width:min(1120px,calc(100vw - var(--space-7)));
  margin-left:50%;transform:translateX(-50%);max-width:none}
.cs-bleed{width:100vw;margin-left:50%;transform:translateX(-50%);max-width:none;margin-top:var(--space-8);margin-bottom:var(--space-8)}
/* Framed-bleed: a full-width band in the image's own background colour, with the
   actual image sitting at a contained width inside it. The band reads as edge-to-edge
   while the image stays contained. The window matches the cs-wide height, and the
   image inside is slightly oversized and drifts on scroll for parallax; its top/bottom
   edge never shows because the band bg (#1f1e2c) matches the image. Caption sits below. */
.cs-bleed--parallax{margin-top:var(--space-8);margin-bottom:var(--space-8)}
.cs-framewide{background:#1f1e2c;padding:0;overflow:hidden}
.cs-framewide .cs-parallax{max-width:1120px;margin:0 auto;padding:0 var(--space-6);
  height:min(534px,calc((100vw - var(--space-7)) * 0.476));position:relative;overflow:hidden}
.cs-framewide .cs-parallax img{position:absolute;left:var(--space-6);right:var(--space-6);top:-22%;
  width:calc(100% - var(--space-6) * 2);height:144%;object-fit:cover;object-position:center;display:block;
  will-change:transform;transform:translate3d(0,0,0)}
.cs-bleed--parallax > figcaption{width:min(1120px,calc(100vw - var(--space-7)));margin:var(--space-3) auto 0;
  padding:0 var(--space-6);text-align:center}
.cs-bleed img,.cs-wide img,.cs-wide video{width:100%;display:block}
/* Wide figures share a consistent height: taller images crop to the shorter ratio */
.cs-wide img{aspect-ratio:2048/976;object-fit:cover;object-position:center}
/* Search, AI and TP cases: framed artwork sits on its own #1f1e2c field and is shown whole, not cropped.
   Scoped to --framed so true photos (e.g. lifestyle shots) still fill via the default cover. */
.case-search .cs-wide.cs-figure--framed img,.case-aitp .cs-wide.cs-figure--framed img,.case-tp .cs-wide.cs-figure--framed img{object-fit:contain;background:#1f1e2c}
/* Flush-bottom: the contained image sits against the frame's bottom edge (no lower letterbox) */
.cs-figure--flush img{object-position:bottom!important}

/* Inline diagrams. Not .cs-figure--framed: that rule targets img, and on case
   pages a wide framed img also takes a fixed #1f1e2c plate meant for the dark
   product shots. A diagram paints its own ground from the theme tokens, so it
   takes the border and the radius and nothing else.

   Two drawings, one diagram. An SVG cannot reflow, and the wide drawing scaled
   to a phone puts its labels near 6px, so below 720px a second drawing of the
   same crossing takes over at a readable size. */
.cs-dia{display:block;width:100%;height:auto;
  border:1px solid var(--color-border);border-radius:var(--radius-md)}
.cs-dia--narrow{display:none}
@media (max-width:720px){
  .cs-dia--wide{display:none}
  .cs-dia--narrow{display:block}
}
/* Phone figure: a tall screenshot with transparent corners, padded at the top and
   cropped at the bottom so it reads as extending beyond the frame. No box behind it. */
/* Wide caption spans the image width; bleed caption pulls back to the reading column */
.cs-wide figcaption{text-align:center}
.cs-bleed figcaption{width:min(1120px,calc(100vw - var(--space-7)));margin-left:auto;margin-right:auto;padding:0 var(--space-6);text-align:center}
.cs-bleed.cs-figure--framed img{border-left:0;border-right:0;border-radius:0}

/* Design-move panel: the screenshot fills the panel, and the craft note sits
   on top of the image's empty (blue) half as white text. Breakout width. */
.cs-move{position:relative;width:min(1120px,calc(100vw - var(--space-7)));margin-left:50%;transform:translateX(-50%);
  margin-top:var(--space-6);margin-bottom:var(--space-6);
  border-radius:var(--radius-lg);overflow:hidden;background:#0a2a63;isolation:isolate}
.cs-move__media{margin:0;display:block}
.cs-move__media img{width:100%;display:block}
.cs-move__text{position:absolute;top:0;bottom:0;display:flex;flex-direction:column;justify-content:center;
  width:44%;padding:var(--space-7);z-index:1}
/* Text side follows the image's empty half: right for odd (phone left), left for even (phone right) */
.cs-move__text{right:0}
.cs-move--left .cs-move__text{left:0;right:auto}
.cs-move .cs-move__k{display:block;font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;font-weight:var(--kicker-weight);color:var(--color-accent);margin-bottom:var(--space-3)}
.cs-move .cs-move__body{color:#fff;font-size:var(--text-md);line-height:1.55;margin:0;font-weight:500}
.cs-list{margin:0 0 var(--space-4);padding:0;list-style:none}
.cs-list li{position:relative;padding-left:var(--space-5);margin-bottom:var(--space-3);color:var(--color-text-muted);font-size:var(--text-md);line-height:1.6}
.cs-list li::before{content:"";position:absolute;left:0;top:11px;width:6px;height:6px;border-radius:50%;background:var(--color-accent)}
.cs-list li strong{color:var(--color-text)}
/* Next-case: a full-bleed immersive band with the destination's hero image behind,
   a scrim for contrast, and large type. Reads as a doorway into the next story. */
.cs-next{display:block;position:relative;overflow:hidden;background:#222131;isolation:isolate}
.cs-next__bg{position:absolute;inset:0;z-index:0;overflow:hidden}
.cs-next__bg img{width:100%;height:150%;top:-25%;position:absolute;left:0;object-fit:cover;object-position:center;display:block;
  transform:translate3d(0,var(--shift,0px),0);
  will-change:transform;transition:transform .6s var(--ease);filter:saturate(.92)}
.cs-next:hover .cs-next__bg img{transform:translate3d(0,var(--shift,0px),0) scale(1.04)}
/* Same here: the teaser's line holds still under both the zoom and the drift.
   --shift is never set on a line layer, so the base rule already resolves to
   the identity transform and only the hover needs restating. */
.cs-next:hover .cs-next__bg img.cs-layer--line{transform:none}
.cs-next::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(10,15,30,.9) 0%,rgba(10,15,30,.74) 46%,rgba(10,15,30,.5) 100%)}
.cs-next__inner{position:relative;z-index:2;max-width:var(--maxw);margin:0 auto;
  padding:var(--space-10) var(--gutter);display:flex;justify-content:space-between;align-items:center;gap:var(--space-6);flex-wrap:wrap;
  min-height:clamp(240px,32vh,340px)}
.cs-next__label{font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;font-weight:var(--kicker-weight);color:var(--color-accent);margin-bottom:var(--space-3)}
.cs-next__title{font-size:clamp(26px,1.74vw + 19.7px,42px);font-weight:800;line-height:1.1;letter-spacing:-.02em;color:#fff;max-width:18ch;text-wrap:balance}
.cs-next__lede{margin-top:var(--space-4);font-size:var(--text-md);line-height:1.5;color:rgba(255,255,255,.82);max-width:46ch}
.cs-next .btn--secondary{flex:none;border-color:rgba(255,255,255,.5);color:#fff;background:transparent}
.cs-next:hover .btn--secondary{border-color:#fff;background:rgba(255,255,255,.1)}
.cs-next:hover .btn--secondary .btn__arrow{transform:translateX(var(--hover-shift))}
/* Challenge -> Move -> Result spine: the core device for judgment-driven work */
.cmr{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-5);margin:var(--space-6) 0}
.cmr__col{padding-top:var(--space-4);border-top:2px solid var(--color-border)}
.cmr__col--result{border-top-color:var(--color-accent)}
.cmr__k{display:block;font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;font-weight:var(--kicker-weight);color:var(--color-text-subtle);margin-bottom:var(--space-3)}
.cmr__col--result .cmr__k{color:var(--color-accent)}
.cmr__col p{color:var(--color-text-muted);font-size:var(--text-base);line-height:1.55;margin:0}

/* Named-metric result row: metrics by name, figures withheld */
.cs-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-5);margin:var(--space-6) 0 var(--space-4)}
.cs-metric{padding:var(--space-5);background:var(--color-surface);border-radius:var(--radius-md)}
/* Name reserves two lines so the figure and caveat align across all three cards */
.cs-metric .cs-metric__name{font-size:var(--text-sm);font-weight:600;color:var(--color-text-muted);line-height:1.35;margin-bottom:var(--space-3);min-height:calc(var(--text-sm) * 1.35 * 3)}
.cs-metric .cs-metric__fig{font-size:var(--text-xl);color:var(--color-accent);font-weight:700;line-height:1.15;letter-spacing:-.01em}
.cs-metric__fig .cs-metric__caveat{display:block;margin-top:var(--space-2);font-size:var(--text-xs);font-weight:500;letter-spacing:0;color:var(--color-text-subtle)}
.cs-section p.cs-metrics__note,p.cs-metrics__note{font-size:var(--text-xs);line-height:1.5;color:var(--color-text-subtle);margin:0 0 var(--space-4)}

/* Two-tier quotes: author pull-quote vs attributed testimonial */
.cs-quote{margin:var(--space-7) 0;padding:0 0 0 var(--space-6);border-left:3px solid var(--color-accent)}
.cs-quote__text{font-size:var(--text-xl);line-height:1.4;letter-spacing:-.01em;color:var(--color-text);margin:0;text-wrap:balance}
.cs-quote__by{display:block;margin-top:var(--space-4);font-size:var(--text-sm);font-weight:600;color:var(--color-text-subtle)}

/* Old-way / new-way reframe diagram */
.cs-reframe{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:var(--space-5);margin:var(--space-6) 0}
.cs-reframe__side{padding:var(--space-5);border-radius:var(--radius-md);background:var(--color-surface)}
.cs-reframe__side--to{background:rgba(var(--accent-rgb),.08)}
.cs-reframe__label{display:block;font-size:var(--kicker-size);letter-spacing:var(--kicker-tracking);text-transform:uppercase;font-weight:var(--kicker-weight);color:var(--color-text-subtle);margin-bottom:var(--space-2)}
.cs-reframe__side--to .cs-reframe__label{color:var(--color-accent)}
.cs-reframe__side p{margin:0;color:var(--color-text);font-size:var(--text-md);line-height:1.4}
.cs-reframe__arrow{color:var(--color-accent);font-size:var(--text-2xl);line-height:1}

/* Principle "common thread" close */
.cs-thread{margin:var(--space-6) 0;padding:var(--pad-box);background:var(--color-surface);border-radius:var(--radius-md)}
.cs-thread__list{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-5);margin:var(--space-4) 0 0;padding:0;list-style:none}
.cs-thread__list li{color:var(--color-text);font-size:var(--text-md);line-height:1.45;font-weight:600}
.cs-thread__list li span{display:block;color:var(--color-text-muted);font-size:var(--text-sm);font-weight:400;margin-top:var(--space-2)}

/* Chart: horizontal bar chart for external/public figures */
.cs-chart{margin:var(--space-6) 0 var(--space-4);padding:var(--pad-box);background:var(--color-surface);border-radius:var(--radius-md)}
/* Evidence block: a chart and a quotation that share one source. Grouping them
   is the whole point. Loose on the page, the source line read as a footnote to
   whichever of the two you happened to look at last; in one box with one
   figcaption, it plainly covers both. The chart gives up its own background and
   padding inside here, or it would be a box drawn on a box. The quotation drops
   to the body size for the same reason it is indented rather than pulled out:
   in here it is supporting evidence, not a statement of its own. */
.cs-evidence{margin:var(--space-6) 0 var(--space-4);padding:var(--pad-box);
  background:var(--color-surface);border-radius:var(--radius-md)}
.cs-evidence .cs-chart{margin:0;padding:0;background:none;border-radius:0}
.cs-evidence .cs-quote{margin:var(--space-6) 0 0;padding-left:var(--space-5)}
.cs-evidence .cs-quote__text{font-size:var(--text-md);line-height:1.5}
.cs-chart .cs-chart__title{font-size:clamp(16px,0.6vw + 13.8px,18px);font-weight:600;color:var(--color-text);margin:0 0 var(--space-6)}
.cs-bar{display:grid;grid-template-columns:1fr;gap:var(--space-2);margin-bottom:var(--space-5)}
.cs-bar:last-of-type{margin-bottom:0}
.cs-bar__top{display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-4)}
.cs-bar__label{font-size:var(--text-sm);color:var(--color-text);font-weight:600}
.cs-bar__val{font-size:clamp(18px,0.6vw + 15.8px,20px);font-weight:800;letter-spacing:-.02em;color:var(--color-text);flex:none}
.cs-bar__track{height:10px;border-radius:999px;background:var(--track-bg);overflow:hidden}
.cs-bar__fill{height:100%;border-radius:999px;background:var(--color-accent)}
.cs-bar--muted .cs-bar__fill{background:var(--color-text-subtle)}
/* Intent decode: a plain-language query unpacked into inferred signals.
   Infographic reads top-down: typed phrase -> "the model infers" -> cue => inference rows. */
.cs-intent{margin:var(--space-6) 0 var(--space-4);padding:var(--pad-box);
  background:var(--color-surface);border-radius:var(--radius-md)}
.cs-intent__head{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-2)}
.cs-intent__badge{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.08em;font-weight:700;
  color:var(--color-text-subtle)}
.cs-section p.cs-intent__q,p.cs-intent__q{display:flex;align-items:center;gap:var(--space-3);margin:0;padding:var(--space-4) var(--space-5);
  background:var(--color-bg);border:1px solid var(--color-border);border-radius:var(--radius-pill);
  font-size:var(--text-xl);font-weight:600;color:var(--color-text);letter-spacing:-.01em;line-height:1.2}
.cs-intent__cursor{flex:none;color:var(--color-text-subtle)}
.cs-intent__arrow{display:flex;align-items:center;gap:var(--space-3);margin:var(--space-4) 0;
  color:var(--color-text-subtle);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.cs-intent__arrow::before,.cs-intent__arrow::after{content:"";height:1px;flex:1;background:var(--color-border)}
.cs-intent__layers{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);margin:0;padding:0;list-style:none}
.cs-intent__layer{display:flex;flex-direction:column;gap:var(--space-1);
  padding:var(--space-4);background:var(--color-bg);border-radius:var(--radius-sm);border-left:3px solid var(--color-accent)}
.cs-intent__k{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--color-accent)}
.cs-intent__v{font-size:var(--text-md);font-weight:700;color:var(--color-text);line-height:1.3}
.cs-intent__cue{font-size:var(--text-xs);color:var(--color-text-subtle);font-style:italic;margin-top:auto;padding-top:var(--space-2)}

/* Timeline: a vision-to-execution arc, ordered milestones */
.cs-timeline{width:min(1120px,calc(100vw - var(--space-7)));margin-left:50%;transform:translateX(-50%);
  margin-top:var(--space-7);margin-bottom:var(--space-6);padding:0;list-style:none;
  display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:var(--space-6);position:relative}
.cs-timeline::before{content:"";position:absolute;left:0;right:0;top:6px;height:2px;
  background:var(--color-border);z-index:0}
.cs-tl{position:relative;z-index:1;padding-top:var(--space-6)}
.cs-tl::before{content:"";position:absolute;top:0;left:0;width:14px;height:14px;border-radius:999px;
  background:var(--color-bg);border:2px solid var(--color-text-subtle);box-sizing:border-box}
.cs-tl--on::before{background:var(--color-accent);border-color:var(--color-accent)}
.cs-tl__year{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--color-text-subtle);display:block;margin-bottom:var(--space-3)}
.cs-tl--on .cs-tl__year{color:var(--color-accent)}
.cs-tl__title{display:block;font-size:var(--text-md);font-weight:700;letter-spacing:-.01em;color:var(--color-text);line-height:1.25;margin-bottom:var(--space-2)}
.cs-tl__body{font-size:var(--text-sm);line-height:1.5;color:var(--color-text-muted)}

/* Vertical column chart: change-over-time, single series */
.cs-cols{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;align-items:end;gap:var(--space-5);
  height:220px;margin:0 0 var(--space-5);padding-top:var(--space-6);padding-bottom:var(--space-4);
  border-bottom:1px solid var(--color-border)}
.cs-col{display:grid;grid-template-rows:1fr auto;align-items:end;height:100%;gap:var(--space-3);text-align:center}
.cs-col__bar{align-self:end;width:100%;max-width:72px;justify-self:center;border-radius:6px 6px 0 0;
  background:var(--col-bar-bg);position:relative;min-height:4px}
.cs-col--on .cs-col__bar{background:var(--color-accent)}
.cs-col__val{position:absolute;top:-32px;left:0;right:0;font-size:var(--text-md);font-weight:800;
  letter-spacing:-.02em;color:var(--color-text)}
.cs-col--on .cs-col__val{color:var(--color-accent)}
.cs-col__lab{font-size:var(--text-sm);color:var(--color-text-muted);font-weight:600;line-height:1.3}
/* Source lines sit under the thing they cite. The selector is element-agnostic
   because one of them is a <figcaption> rather than a <p>. They used to have no
   bottom margin at all, so the body copy that followed ran straight into them. */
.cs-section .cs-source,.cs-chart .cs-source,.cs-evidence .cs-source,.cs-source{
  font-size:var(--text-xs);line-height:1.5;color:var(--color-text-subtle);
  margin:var(--space-4) 0 var(--space-6)}
/* Inside a box it is the last thing there, so it needs no room below. */
.cs-chart .cs-source:last-child,.cs-evidence .cs-source:last-child{margin-bottom:0}
.cs-source a{color:var(--color-text-subtle);text-decoration:underline;text-underline-offset:2px}
.cs-source a:hover{color:var(--color-accent)}

/* Chronology infographic: one trip drawn twice, side by side. Grouped by
   destination on the left, by day on the right -- two of the structures the
   timeline was tested in. Both hang off a spine at the left of their own
   column: a node per heading, and what is booked stacked beneath it. The pair
   is the point, so the two share every rule they can and part company only
   where the structure does. */
.cs-chrono{margin:var(--space-6) 0 var(--space-4);padding:var(--pad-box);background:var(--color-surface);border-radius:var(--radius-md)}
.cs-chrono__pair{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-7)}
.cs-chrono__panel{min-width:0}
/* Gilroy rather than the body face: these name the two drawings, they are not
   a heading over the section.

   Both selectors, as with .cs-pull above: .cs-section p is (0,1,1) and would
   otherwise win the size, the colour and the margin back. */
.cs-section p.cs-chrono__panel-title,p.cs-chrono__panel-title{
  margin:0 0 var(--space-5);text-align:center;line-height:1.4;
  font-family:var(--font-display);font-size:12px;letter-spacing:var(--kicker-tracking);
  text-transform:uppercase;font-weight:var(--kicker-weight);color:var(--color-text-subtle)}
/* --spine is the only horizontal measurement in a column. The line sits there,
   the plot's padding clears it, and every node steps back out across that same
   padding to land on it: change it in one place and the three stay together.
   --node is the heading's height, --card every other chip's; the spine is
   measured from the first of those, which is why the two are separate.

   Sized to its own widest row and then centred, rather than given a width to
   sit at the left of: everything in here is start-aligned, so a fixed box
   would park a 200px drawing against the left edge of a 500px column. */
/* --spine is the only horizontal measurement in a column. The line sits there,
   the plot's padding clears it, and every node steps back out across that same
   padding to land on it: change it in one place and the three stay together.
   --node is the heading's height, and the spine is measured from half of it.

   Sized to its own widest row and then centred, rather than given a width to
   sit at the left of: everything in here is start-aligned, so a fixed box
   would park a 200px drawing against the left edge of a 500px column. */
.cs-chrono__plot{--spine:3px;--rail-pad:var(--space-6);--node:32px;--leg-gap:var(--space-5);
  position:relative;display:flex;flex-direction:column;gap:var(--leg-gap);
  padding-left:calc(var(--spine) + var(--rail-pad));
  width:fit-content;max-width:100%;margin-left:auto;margin-right:auto}
/* The spine starts on the first node rather than at the top edge, which is what
   --node buys: the heading is held to exactly that height, so half of it is the
   node's centre and the line meets it without a measured offset. */
.cs-chrono__plot::before{content:"";position:absolute;
  top:calc(var(--node) / 2);bottom:var(--space-2);
  left:var(--spine);width:2px;background:var(--color-border)}
/* A leg is one heading and what belongs to it: a destination and its days on
   the left, a day and its bookings on the right. Its own gap is tighter than
   the plot's, so a heading reads as the head of what follows rather than as
   another item in the column. */
.cs-chrono__leg{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-3)}
/* Both headings sit on a node and stand to the same height. Only the
   destination is boxed: it is the container in its column, where the day-first
   column puts the box around each booking instead and leaves the day bare.
   That swap is most of what the two columns are comparing. */
.cs-chrono__dest,.cs-chrono__dayhead{position:relative;
  display:inline-flex;align-items:center;min-height:var(--node);
  font-size:var(--text-sm);font-weight:700;color:var(--color-text)}
.cs-chrono__dest{background:rgba(90,130,255,.12);border-radius:6px;padding:6px var(--space-3)}
/* The node reaches back across the plot's padding to the spine. Its ring is
   the figure's ground, which is what lifts it off the line it sits on. */
.cs-chrono__dest::after,.cs-chrono__dayhead::after{content:"";position:absolute;top:50%;margin-top:-5px;
  left:calc(var(--rail-pad) * -1 - 4px);
  width:10px;height:10px;border-radius:50%;background:var(--color-accent);
  box-shadow:0 0 0 3px var(--color-surface)}
/* The day, and beside it where you are that day -- both places on the day you
   move between them. Naming it on every day is what the structure buys: a day
   knows its own location here, where the other column has to be read upwards
   from the destination heading it sits under. */
.cs-chrono__dayhead{gap:var(--space-3)}
.cs-chrono__daytitle{white-space:nowrap;
  font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.cs-chrono__place{white-space:nowrap;
  font-size:13px;font-weight:400;color:var(--color-text-muted)}
.cs-chrono__days{align-self:stretch;min-width:0}
/* The day's label sits over its bookings, not beside them. */
.cs-chrono__row{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2)}
.cs-chrono__row + .cs-chrono__row{margin-top:var(--space-4)}
.cs-chrono__day{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.06em;font-weight:400;color:var(--color-text-subtle)}
/* Bookings stack one to a line, so a day with two of them reads as two things
   in order rather than as a pair. */
.cs-chrono__items{align-self:stretch;display:flex;flex-direction:column;align-items:stretch;gap:var(--space-1)}
.cs-chrono__item{display:flex;align-items:center;min-height:var(--node);
  font-size:var(--text-sm);font-weight:400;color:var(--color-text);padding:6px var(--space-3);
  border-radius:6px;background:var(--color-bg);border:1px solid var(--color-border)}
/* Transport is one colour whether it flies or runs on rails; a stay is the
   other. */
.cs-chrono__item--transport{background:rgba(255,138,76,.16);border-color:rgba(255,138,76,.35)}
.cs-chrono__item--stay{background:rgba(90,170,120,.16);border-color:rgba(90,170,120,.35)}
/* Not a booking but the lack of one, so it is dashed and in the accent. In the
   destination-first column the bands carry no border of their own, and the
   tint and the colour are left to say it. */
.cs-chrono__item--gap{background:rgba(var(--accent-rgb),.1);border-color:var(--color-border-accent);
  border-style:dashed;color:var(--color-accent)}
/* The day-first column sets its bookings close under the day they belong to.
   It can afford to: the day is bare there, so a tighter gap reads as the cards
   hanging off it, where the destination-first column needs the air to keep its
   chip from touching the box below. */
.cs-chrono__plot--days .cs-chrono__leg{gap:var(--space-1)}
/* ---- The destination-first column --------------------------
   A day's bookings are one box with the entries banded inside it, against the
   day-first column where each booking is a box of its own. Nested things in a
   nested structure; separate things in a flat one. */
.cs-chrono__plot--dest .cs-chrono__items{gap:0;
  border:1px solid var(--color-border);border-radius:6px;overflow:hidden}
.cs-chrono__plot--dest .cs-chrono__item{border:0;border-radius:0}
.cs-chrono__plot--dest .cs-chrono__item + .cs-chrono__item{border-top:1px solid var(--color-border)}
.cs-chrono figcaption{margin-top:var(--space-5);font-size:var(--text-xs);color:var(--color-text-subtle);text-align:center}

/* Horizon rail: a high-level, three-phase forward arc. No figures, no internals. */
.cs-horizons{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-4);margin:var(--space-6) 0 var(--space-4);padding:0;list-style:none;counter-reset:hz}
.cs-horizon{position:relative;padding:var(--space-6) var(--space-5);border-radius:var(--radius-md);background:var(--color-surface);border-top:3px solid var(--color-border)}
.cs-horizon--on{border-top-color:var(--color-accent)}
.cs-horizon__k{display:block;font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:var(--color-text-subtle);margin-bottom:var(--space-3)}
.cs-horizon__title{display:block;font-size:var(--text-xl);font-weight:800;letter-spacing:-.01em;color:var(--color-text);line-height:1.2;margin-bottom:var(--space-2)}
.cs-horizon__sub{display:block;font-size:var(--text-sm);font-weight:700;color:var(--color-accent);margin-bottom:var(--space-3)}
.cs-horizon__body{font-size:var(--text-sm);line-height:1.5;color:var(--color-text-muted);margin:0}

/* Inline reference link to an essay */
.cs-section a{color:var(--color-accent);text-decoration:underline;text-underline-offset:2px}
.cs-section a:hover{color:var(--color-accent-hover)}

/* ---- Visual devices take the wide measure --------------------------------
   Charts, timelines, metric rows and the horizon boxes are diagrams, not
   prose, and the 820px reading column is the wrong container for them: three
   boxes side by side in it are around 240px each, which is a column of text
   pretending to be a card. They break out to the same width .cs-wide figures use, so a
   diagram and a full-width image line up with each other down the page.

   Two things this selector is doing deliberately. It sits after each device's
   own rule, because those set `margin` with a shorthand that would otherwise
   reset the margin-left below. And it matches direct children of a section
   only: the chart inside .cs-evidence would otherwise break out a second time,
   from a box that has already broken out, and land off the side of the page. */
.cs-section > .cs-horizons,.cs-section > .cs-chart,.cs-section > .cs-evidence,
.cs-section > .cs-chrono,.cs-section > .cs-thread,.cs-section > .cs-intent,
.cs-section > .cs-metrics,.cs-section > .cmr,.cs-section > .cs-reframe{
  width:var(--measure-device);
  margin-left:50%;transform:translateX(-50%);max-width:none}
/* The box is wide for the diagram's sake, not the prose's. Any running text
   inside one keeps a readable measure; ch units do the work, so the 12px
   source line and the 18px quotation each get their own sensible width. */
/* The source line is deliberately not in this list. It is fine print at 12px,
   and capping it to a reading measure only made it taller for no gain. */
.cs-chart .cs-chart__title,.cs-evidence .cs-quote__text,
.cs-metrics__note{max-width:68ch}
/* The caption is held wider than the 68ch the other running text gets. ch
   scales with the font, so the same count buys very different widths: 68ch of
   this 12px caption is about 515px, which is narrower than the caption needs
   and forced a second line inside a box with 836px to spare. Measured in
   characters a caption also reads differently from prose — it is one centred
   line under the thing it describes, not a paragraph to be read down. */
.cs-chrono figcaption{max-width:min(92ch,100%);margin-left:auto;margin-right:auto}

@media(max-width:860px){
  /* Media heroes are excluded: they clear the nav with padding on
     .cs-hero__media, and adding it here as well would count the nav twice and
     leave a dead band above the image. */
  .cs-hero:not(.cs-hero--media){padding-top:calc(72px + var(--space-7))}
  /* On a phone the case hero stacks instead of overlaying. The image behind
     the title works on a wide screen because the artwork is mostly empty field
     there; at phone width it is contained down to a small centred object that
     lands directly under the headline, and the two fight. Back link, then the
     picture, then the words.

     Nothing moves in the markup — flex order is enough, and all 12 pages share
     this chrome by hand, so not touching it matters. Taking the image out of
     absolute positioning is only safe because main.js already leaves the
     parallax off below 861px; if that ever changes, this breaks. */
  .cs-hero__media{min-height:0;justify-content:flex-start}
  .cs-hero__top{order:1}
  .cs-hero__bg{order:2;position:static;overflow:hidden;margin-top:var(--space-6)}
  /* The same 261% as the desktop rule, for the same reason: at 100% the
     artwork column would be 38% of a phone screen. Static flow here, so the
     frame is centred on a negative margin and the parent clips the tails. */
  .cs-hero__bg img{position:static;width:261%;max-width:none;height:auto;top:auto;left:auto;
    margin-left:-80.5%;transform:none}
  /* Stacked, the devices layer stays in flow and sets the height while the
     line layers sit over it at the same width -- three images in flow would
     otherwise run down the page. Parallax is off below this width, which
     leaves the transform free for centring. */
  .cs-hero__bg{position:relative}
  .cs-hero__bg img.cs-layer--line{position:absolute;top:50%;left:50%;width:261%;height:auto;
    margin:0;transform:translate(-50%,-50%)}
  /* Relative keeps it in flow, so it still sets the height, while giving the
     z-index above something to apply to. */
  .cs-hero__bg img.cs-layer--devices{position:relative}
  .cs-hero--media .cs-hero__inner{order:3;padding-top:var(--space-6)}
  /* That rule reaches both inners — the headline block and the one holding
     the bar — and it is later than the rule that zeroes the bar's, so the
     bar picked up a top pad it does not want here. Clear it again. */
  .cs-hero__top .cs-hero__inner{padding-top:0}
  /* The scrim exists to lift the words off the artwork. With the two stacked
     rather than overlaid, there is nothing left to lift them off. */
  .cs-hero__media::after{display:none}
  .cs-hero__facts{grid-template-columns:1fr 1fr}
  .cs-fact{padding:var(--space-5) var(--space-5) 0 0}
  .cs-fact:nth-child(even){padding-left:var(--space-5);border-left:1px solid var(--color-border)}
  .cs-fact:nth-child(odd){border-left:0;padding-left:0}
  /* Three-up or one-up, never two-and-one. A set of three reads as a set; a
     row of two with the third stranded underneath reads as a mistake. They
     hold three columns down to this breakpoint — which they can, now that
     they have the wide measure rather than the reading column — and stack
     completely below it. */
  .cmr,.cs-metrics,.cs-thread__list,.cs-horizons,.cs-intent__layers{grid-template-columns:1fr}
  /* The two columns stay side by side at every width down to a phone: a
     comparison you have to scroll between is not one. They pay for it in rail
     and gap here, and in type at the width below. */
  .cs-chrono__pair{gap:var(--space-5)}
  .cs-chrono__plot{--rail-pad:var(--space-4);--leg-gap:var(--space-4)}
  /* Same move as the gap note: with no column to the left, a destination comes
     back into the timeline as a line of its own over the day it names. The day
     chips give up their shared width here, where the row needs every pixel. */
  .cs-cols{gap:var(--space-3);height:180px}
  .cs-col__bar{max-width:56px}

  /* On narrow screens, wide figures collapse to the reading column; bleed stays edge-to-edge */
  .cs-wide,
  .cs-section > .cs-horizons,.cs-section > .cs-chart,.cs-section > .cs-evidence,
  .cs-section > .cs-chrono,.cs-section > .cs-thread,.cs-section > .cs-intent,
  .cs-section > .cs-metrics,.cs-section > .cmr,
  .cs-section > .cs-reframe{width:100%;margin-left:0;transform:none}
  .cs-move{width:100%;margin-left:0;transform:none;margin-top:var(--space-6);margin-bottom:var(--space-6)}
  .cs-move__text,.cs-move--left .cs-move__text{position:static;width:auto;padding:var(--space-5)}
  .cs-timeline{width:100%;margin-left:0;transform:none;grid-auto-flow:row;grid-auto-columns:auto;gap:0}
  .cs-timeline::before{left:6px;right:auto;top:0;bottom:0;width:2px;height:auto}
  .cs-tl{padding-top:0;padding-left:var(--space-5);padding-bottom:var(--space-5)}
  .cs-tl:last-child{padding-bottom:0}
  .cs-tl::before{top:4px}
  .cs-reframe{grid-template-columns:1fr}
  .cs-reframe__arrow{transform:rotate(90deg);justify-self:center}
}

/* Phone widths, where the figure has 310px to spend at 390 and 280 at 360.
   Everything in it gives up a little so that both columns still fit across.
   The budget is set by the widest label in either of them -- a day that names
   two cities -- and that one is allowed to wrap under its day rather than push
   its column out. Only Day 2 is ever long enough to. */
@media(max-width:520px){
  .cs-chrono__pair{gap:10px}
  /* The rail and the cards go on shrinking with the screen rather than at one
     more breakpoint, so a 320px phone keeps "Hotel check-out" on one line. */
  .cs-chrono__plot{--rail-pad:clamp(7px,2.6vw,10px);--node:28px}
  .cs-chrono__dest,.cs-chrono__item{font-size:clamp(12px,3.4vw,13px);padding:4px clamp(6px,2.1vw,8px)}
  .cs-chrono__dayhead{gap:6px;flex-wrap:wrap}
  .cs-chrono__daytitle,.cs-chrono__day{font-size:11px}
  .cs-chrono__place{font-size:12px}
}

/* ---------- Case-study table of contents ----------
   Built by main.js from the ids on .cs-section, so the markup lives in one
   place rather than being hand-maintained in three case files. Fixed rather
   than docked beside the column: .cs-body is 820px centred but .cs-wide
   figures break out to 1120px, so a side rail would collide with them at
   common desktop widths. */
/* The closed panel keeps its size in layout, so this box is around 340x515
   whether or not anything is drawn in it. Left clickable it would swallow
   every click in that corner of the viewport, links in the text included, so
   the box takes no pointer events at all and the two things that are really
   there -- the button, and the panel once it is open -- take their own. */
.cs-toc{position:fixed;right:var(--space-5);bottom:var(--space-5);z-index:40;
  display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-2);
  max-width:calc(100vw - var(--space-5) * 2);pointer-events:none;
  transition:opacity var(--dur-fast,.18s) var(--ease),
             transform var(--dur-fast,.18s) var(--ease),
             visibility var(--dur-fast,.18s) var(--ease)}
/* The control sits in the same corner as the footer's legal links, so it
   covers them once the page is scrolled to the end. Stand it down while the
   footer is in view: the sections are behind the reader by then, and the
   links need the corner more than the control does. */
.cs-toc[data-end="true"]{opacity:0;visibility:hidden;pointer-events:none;
  transform:translateY(var(--space-3))}
.cs-toc__btn{display:inline-flex;align-items:center;gap:var(--space-2);
  pointer-events:auto;font:inherit;font-size:var(--text-sm);font-weight:600;color:var(--color-text);
  background:var(--color-surface-raised);border:1px solid var(--color-border-strong);
  border-radius:99px;padding:10px var(--space-4);cursor:pointer;
  box-shadow:0 6px 24px -8px var(--shadow-card);
  transition:border-color var(--dur-fast,.18s) var(--ease),background var(--dur-fast,.18s) var(--ease)}
.cs-toc__btn:hover{background:var(--color-surface-hover);border-color:var(--color-border-accent)}
.cs-toc__count{font-variant-numeric:tabular-nums;color:var(--color-text-subtle);font-weight:500}
/* The bars rotate into an X when open, so the control reads as a toggle. */
.cs-toc__icon{position:relative;width:14px;height:10px;flex:none}
.cs-toc__icon i{position:absolute;left:0;right:0;height:2px;border-radius:2px;
  background:currentColor;transition:transform var(--dur-fast,.18s) var(--ease),opacity var(--dur-fast,.18s) var(--ease)}
.cs-toc__icon i:nth-child(1){top:0}
.cs-toc__icon i:nth-child(2){top:4px}
.cs-toc__icon i:nth-child(3){top:8px}
.cs-toc[data-open="true"] .cs-toc__icon i:nth-child(1){transform:translateY(4px) rotate(45deg)}
.cs-toc[data-open="true"] .cs-toc__icon i:nth-child(2){opacity:0}
.cs-toc[data-open="true"] .cs-toc__icon i:nth-child(3){transform:translateY(-4px) rotate(-45deg)}

.cs-toc__panel{order:-1;width:min(340px,calc(100vw - var(--space-5) * 2));
  max-height:min(60vh,520px);overflow-y:auto;overscroll-behavior:contain;
  background:var(--color-surface-raised);border:1px solid var(--color-border);
  border-radius:var(--radius-lg);padding:var(--space-3);
  box-shadow:0 18px 48px -12px var(--shadow-card);pointer-events:auto;
  opacity:0;transform:translateY(6px);visibility:hidden;
  transition:opacity var(--dur-fast,.18s) var(--ease),transform var(--dur-fast,.18s) var(--ease),visibility var(--dur-fast,.18s)}
/* visibility, not pointer-events: the closed panel has to leave the tab order
   as well as stop taking clicks, and it still transitions. */
.cs-toc[data-open="true"] .cs-toc__panel{opacity:1;transform:none;visibility:visible}
.cs-toc__list{list-style:none;margin:0;padding:0;counter-reset:toc}
.cs-toc__link{counter-increment:toc;display:flex;gap:var(--space-3);
  padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);
  color:var(--color-text-muted);font-size:var(--text-sm);line-height:1.35;
  text-decoration:none;transition:background var(--dur-fast,.18s) var(--ease),color var(--dur-fast,.18s) var(--ease)}
.cs-toc__link::before{content:counter(toc);flex:none;width:1.25em;
  color:var(--color-text-subtle);font-variant-numeric:tabular-nums}
.cs-toc__link:hover{background:var(--color-surface-hover);color:var(--color-text)}
.cs-toc__link[aria-current]{color:var(--color-accent);font-weight:600}
.cs-toc__link[aria-current]::before{color:var(--color-accent)}

/* Liquid glass, the same recipe as the scrolled nav (14px blur, 160%
   saturation) over a heavier tint. Set on the button and the panel
   individually rather than on .cs-toc: they are siblings with a gap
   between them, and frosting the shared parent would frost the gap too.
   Both hang off <body>, so neither is nested inside the nav's own
   backdrop root — the trap the mobile nav panel fell into above.
   Guarded, because without backdrop-filter a translucent tint is just
   unreadable text over the page; the opaque rules above stand in. */
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .cs-toc__btn,.cs-toc__panel{
    background:var(--glass-bg-strong);
    backdrop-filter:blur(14px) saturate(160%);
    -webkit-backdrop-filter:blur(14px) saturate(160%);
    border-color:var(--glass-border);
  }
  .cs-toc__btn{box-shadow:0 6px 24px -8px var(--glass-shadow)}
  .cs-toc__panel{box-shadow:0 18px 48px -12px var(--glass-shadow)}
  /* The opaque hover fills would sit on the glass as solid blocks. These
     are tints layered over it, so the blur stays visible underneath. */
  .cs-toc__btn:hover{background-image:linear-gradient(var(--tint-hover),var(--tint-hover));border-color:var(--color-border-accent)}
  .cs-toc__link:hover{background:var(--tint-hover)}
}
/* Some people turn transparency off at the OS level, usually because
   layered translucency is hard to read. Give them the opaque panel. */
@media (prefers-reduced-transparency:reduce){
  .cs-toc__btn,.cs-toc__panel{
    background:var(--color-surface-raised);
    backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  .cs-toc__btn{border-color:var(--color-border-strong)}
  .cs-toc__panel{border-color:var(--color-border)}
}

@media (max-width:620px){
  .cs-toc{right:var(--space-4);bottom:var(--space-4)}
  .cs-toc__label{display:none}
}
@media (prefers-reduced-motion:reduce){
  .cs-toc,.cs-toc__panel,.cs-toc__btn,.cs-toc__icon i{transition:none}
}
@media print{.cs-toc{display:none}}

/* ---------- Case-study gate ----------
   The three case pages carry data-gated on <html> in the markup, and the
   inline head script lifts it when the unlock token is already in
   localStorage. Closed in the markup rather than closed by script, so a visit
   with JavaScript off stays closed instead of opening; the cost is that such a
   visit has no way in, which is the right way round for a gate.

   What this is and is not: the case study is still in the response, and view
   source reaches it. This asks a reader to wait for the password. It does not
   stop one who would rather not. Real protection would have to happen before
   the HTML is served. */
html[data-gated],html[data-gated] body{overflow:hidden}
html[data-gated] .cs-toc{display:none}

/* The fade is fixed to the viewport, not applied to the content, so it does
   not matter where the hero ends or how long the case is: the top of the
   screen stays crisp and the page dissolves into its own background on the way
   down. It sits under the nav's z-index so the header stays sharp and
   clickable, and takes no pointer events so the header stays reachable. */
.cs-gate__scrim{position:fixed;inset:0;z-index:45;pointer-events:none;
  background:linear-gradient(to bottom,
    transparent 0,transparent 25%,var(--color-bg) 85%,var(--color-bg) 100%)}

/* The panel is centred in the viewport and opaque, so it carries itself over
   whatever the fade has left behind it. The layer around it passes clicks
   through; only the panel takes them. */
.cs-gate{position:fixed;inset:0;z-index:60;
  display:grid;place-items:center;padding:var(--gutter);pointer-events:none}
.cs-gate__card{pointer-events:auto;width:min(420px,100%);
  background:var(--color-surface-raised);border:1px solid var(--color-border);
  border-radius:var(--radius-lg);padding:var(--space-7);
  box-shadow:0 24px 60px var(--shadow-card)}
.cs-gate__icon{display:inline-flex;color:var(--color-accent);margin-bottom:var(--space-4)}
.cs-gate__title{font-size:var(--text-xl);line-height:1.25;letter-spacing:-.01em;
  color:var(--color-text);margin:0 0 var(--space-5)}
.cs-gate__label{display:block;font-size:var(--text-xs);font-weight:600;
  letter-spacing:.04em;text-transform:uppercase;
  color:var(--color-text-subtle);margin-bottom:var(--space-2)}
.cs-gate__row{display:flex;gap:var(--space-3)}
.cs-gate__input{flex:1 1 auto;min-width:0;
  padding:13px 18px;border-radius:var(--radius-pill);
  border:1px solid var(--color-border-strong);background:var(--color-bg);
  color:var(--color-text);font:inherit;font-size:var(--text-sm);
  transition:border-color var(--dur) var(--ease)}
.cs-gate__input:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}
.cs-gate__input[aria-invalid="true"]{border-color:var(--color-danger)}
.cs-gate__btn{flex:0 0 auto}
/* role="alert" announces it; hidden until there is something to announce, and
   it keeps its line so the panel does not jump when it appears. */
.cs-gate__error{min-height:1.5em;margin:var(--space-3) 0 0;
  font-size:var(--text-sm);line-height:1.5;color:var(--color-danger)}
.cs-gate__ask{font-size:var(--text-sm);line-height:1.5;
  color:var(--color-text-subtle);margin:var(--space-5) 0 0}
.cs-gate__ask a{color:var(--color-accent);text-decoration:underline;text-underline-offset:2px}

@media (max-width:480px){
  .cs-gate__card{padding:var(--space-6)}
  .cs-gate__row{flex-direction:column}
  .cs-gate__btn{justify-content:center}
}
@media (prefers-reduced-motion:reduce){.cs-gate__input{transition:none}}
