/* Modus Lab · moduslab.in
   One family (Archivo) used across its width axis: expanded for display,
   normal for reading, condensed for drawing annotations. */

/* Archivo variable (SIL Open Font License), self-hosted: weight 300–900, width 62–125 */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 300 900; font-stretch: 62% 125%;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 300 900; font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.972 0.005 72);
  --ink: oklch(0.2 0.012 72);
  --ink-2: oklch(0.42 0.014 72);
  --line: oklch(0.86 0.01 72);
  --line-strong: oklch(0.55 0.012 72);

  /* Studio colour: honey amber, used like a highlighter on a drawing */
  --amber: oklch(0.83 0.155 74);
  --amber-deep: oklch(0.52 0.12 62);
  --on-amber: oklch(0.2 0.03 60);

  /* Product worlds */
  --ms: oklch(0.5 0.095 182);
  --ms-soft: oklch(0.965 0.02 182);
  --ms-ink: oklch(0.32 0.06 185);
  --fm: oklch(0.48 0.18 263);
  --fm-soft: oklch(0.965 0.018 263);
  --fm-ink: oklch(0.32 0.12 263);
  --ss: oklch(0.54 0.17 42);
  --ss-soft: oklch(0.968 0.016 50);
  --ss-ink: oklch(0.36 0.11 40);

  --bezel: oklch(0.2 0.01 260);
  --shadow: 0 1px 2px oklch(0.2 0.02 72 / 0.08), 0 24px 48px -16px oklch(0.2 0.02 72 / 0.28);

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* expo-ish */
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --space-section: clamp(72px, 11vw, 144px);

  --z-sticky: 10;
  --z-skip: 20;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.15 0 0);
    --surface: oklch(0.195 0.006 72);
    --ink: oklch(0.95 0.006 72);
    --ink-2: oklch(0.77 0.012 72);
    --line: oklch(0.32 0.008 72);
    --line-strong: oklch(0.6 0.01 72);
    --amber: oklch(0.82 0.15 74);
    --amber-deep: oklch(0.84 0.14 76);
    --on-amber: oklch(0.2 0.03 60);
    --ms: oklch(0.76 0.11 182);
    --ms-soft: oklch(0.21 0.03 185);
    --ms-ink: oklch(0.86 0.07 182);
    --fm: oklch(0.74 0.13 263);
    --fm-soft: oklch(0.2 0.04 263);
    --fm-ink: oklch(0.86 0.07 263);
    --ss: oklch(0.74 0.14 46);
    --ss-soft: oklch(0.21 0.03 45);
    --ss-ink: oklch(0.86 0.07 50);
    --bezel: oklch(0.32 0.01 260);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.4), 0 24px 48px -16px oklch(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.15 0 0);
  --surface: oklch(0.195 0.006 72);
  --ink: oklch(0.95 0.006 72);
  --ink-2: oklch(0.77 0.012 72);
  --line: oklch(0.32 0.008 72);
  --line-strong: oklch(0.6 0.01 72);
  --amber: oklch(0.82 0.15 74);
  --amber-deep: oklch(0.84 0.14 76);
  --on-amber: oklch(0.2 0.03 60);
  --ms: oklch(0.76 0.11 182);
  --ms-soft: oklch(0.21 0.03 185);
  --ms-ink: oklch(0.86 0.07 182);
  --fm: oklch(0.74 0.13 263);
  --fm-soft: oklch(0.2 0.04 263);
  --fm-ink: oklch(0.86 0.07 263);
  --ss: oklch(0.74 0.14 46);
  --ss-soft: oklch(0.21 0.03 45);
  --ss-ink: oklch(0.86 0.07 50);
  --bezel: oklch(0.32 0.01 260);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.4), 0 24px 48px -16px oklch(0 0 0 / 0.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: var(--z-skip);
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px;
  text-decoration: none; font-weight: 600; transition: top .2s var(--ease-out);
}
.skip:focus { top: 12px; }

/* Annotation lettering: condensed caps, like ISO drawing text */
.hero__place, .status, .specs dt, .note, .dimlabel, .drawing__caption, .tb__k, .tb--meta,
.flow__n, .bar__k, .bar__v, .media-note, .stack__labels {
  font-variation-settings: "wdth" 68;
  letter-spacing: 0.04em;
}

/* ---------- Buttons & links ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--b);
  background: var(--b); color: var(--bg);
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .2s, color .2s, box-shadow .25s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--b) 70%, transparent); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn--small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn--product { --b: var(--p); color: var(--p-on, #fff); }

.textlink {
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 4px; color: var(--p-ink, var(--ink));
}
.textlink:hover { text-decoration-thickness: 2px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-sticky);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.masthead.is-scrolled { border-bottom-color: var(--line); }
.masthead__row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark { width: 26px; height: 32px; flex: none; }
.brand__box { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.brand__m { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand__stem { stroke: var(--ink); stroke-width: 2.4; }
.brand__datum { fill: var(--amber); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.brand__word { font-weight: 800; font-size: 1.125rem; font-variation-settings: "wdth" 118; letter-spacing: -0.01em; }

.nav { display: flex; gap: 28px; }
.nav a {
  display: inline-flex; align-items: center;
  text-decoration: none; font-weight: 550; font-size: .9375rem; color: var(--ink-2);
  padding: 8px 0; position: relative; transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.masthead__actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; transition: border-color .2s, background-color .2s;
}
.theme-toggle:hover { border-color: var(--line-strong); background: var(--surface); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--sun { display: none; }
:root[data-theme="dark"] .ico--sun { display: block; }
:root[data-theme="dark"] .ico--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico--sun { display: block; }
  :root:not([data-theme="light"]) .ico--moon { display: none; }
}

@media (max-width: 760px) {
  .nav { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(32px, 5vw, 72px) clamp(56px, 7vw, 104px); }
.hero > .wrap { position: relative; z-index: 1; }
.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--line) 70%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--line) 70%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(120% 70% at 70% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 70% at 70% 0%, #000 0%, transparent 70%);
  opacity: .7;
}
.hero__place { font-weight: 600; font-size: .875rem; text-transform: uppercase; color: var(--ink-2); margin-bottom: 20px; }
.hero__title {
  font-weight: 820;
  font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 112;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.06em; }
.hero__title .line > span { display: inline-block; }
.hl {
  color: inherit;
  background: linear-gradient(var(--amber), var(--amber)) no-repeat 0 88% / 100% 0.42em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: 0.04em;
}
/* On dark grounds light letters lose contrast over amber, so the highlight drops below the baseline. */
:root[data-theme="dark"] .hl { --hl-h: 0.16em; background-position: 0 100%; background-size: 100% 0.16em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl { --hl-h: 0.16em; background-position: 0 100%; background-size: 100% 0.16em; } }
.hero__lede {
  margin-top: clamp(24px, 3vw, 36px); max-width: 44em;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--ink-2);
}

/* CAD crosshair that follows a fine pointer across the hero */
.crosshair { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s; }
.hero.is-tracking .crosshair { opacity: 1; }
.crosshair__h, .crosshair__v { position: absolute; background: color-mix(in oklab, var(--ink) 22%, transparent); }
.crosshair__h { left: 0; right: 0; top: 0; height: 1px; transform: translateY(var(--cy, -10px)); }
.crosshair__v { top: 0; bottom: 0; left: 0; width: 1px; transform: translateX(var(--cx, -10px)); }
.crosshair__read {
  position: absolute; left: 0; top: 0; transform: translate(calc(var(--cx, 0px) + 12px), calc(var(--cy, 0px) + 12px));
  font-size: .6875rem; font-weight: 650; letter-spacing: .04em; font-variation-settings: "wdth" 70;
  font-variant-numeric: tabular-nums; color: var(--ink-2); background: var(--bg); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px;
  white-space: nowrap;
}
@media (hover: none), (pointer: coarse) { .crosshair { display: none; } }

/* Datum feature symbol: the studio's way of naming its two lines of work */
.datum { display: inline-flex; flex-direction: column; align-items: center; flex: none; color: var(--ink); }
.datum__box {
  position: relative; width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid currentColor; border-radius: 3px; font-weight: 800; font-size: 1.0625rem; line-height: 1;
}
.datum__box::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 2px; height: 6px; margin-left: -1px; background: currentColor; }
.datum__tri { width: 0; height: 0; margin-top: 6px; border-inline: 8px solid transparent; border-bottom: 10px solid var(--amber); }
.datum--sm .datum__box { width: 26px; height: 26px; font-size: .875rem; }
.datum--sm .datum__tri { border-inline-width: 6px; border-bottom-width: 8px; }
.navtag {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; vertical-align: -3px;
  border: 1.5px solid currentColor; border-radius: 3px; font-size: .6875rem; font-weight: 800; line-height: 1;
}

/* The split: two panels, one per line of work */
.split { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.vpanel {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 20px;
  min-height: 600px; padding: clamp(22px, 3vw, 36px); border-radius: 24px; overflow: hidden;
  text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .3s;
}
.vpanel:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px oklch(0.2 0.02 72 / .45); }
.vpanel:focus-visible { outline-offset: 4px; border-radius: 24px; }
.vpanel__head { display: flex; gap: 16px; align-items: flex-start; }
.vpanel__kind { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 70; color: var(--ink-2); }
.vpanel__title { margin-top: 6px; font-weight: 780; font-variation-settings: "wdth" 108; font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); line-height: 1.1; letter-spacing: -0.015em; }
.vpanel__products { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.vpanel__products li {
  display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 70%, transparent);
}
.vpanel__products b { font-weight: 700; font-size: .9688rem; }
.vpanel__products span { font-size: .8125rem; color: var(--ink-2); }
.vpanel__go { font-weight: 650; font-size: .9688rem; display: inline-flex; gap: 8px; align-items: center; }
.vpanel__go span { display: inline-block; transition: transform .5s var(--ease-out); }
.vpanel:hover .vpanel__go span { transform: translateY(4px); }
.vpanel__art { position: relative; min-height: 360px; }
.vpanel__art--b { display: grid; align-items: center; min-height: 300px; }

/* Panel A art: two phones and a hand-off toast */
.mini-phone, .mini-ring {
  position: absolute; width: min(40%, 168px); border-radius: 22px;
  box-shadow: 0 0 0 5px var(--bezel), 0 30px 50px -24px oklch(0.2 0.03 260 / .55);
  transition: transform .8s var(--ease-out);
}
.mini-phone--ms { left: 12%; top: 34px; rotate: -5deg; height: auto; }
.mini-ring { right: 12%; top: 64px; rotate: 4deg; aspect-ratio: 9 / 17; background: oklch(0.29 0.12 263); overflow: hidden; }
.vpanel:hover .mini-phone--ms { transform: translate(-8px, -6px) rotate(-2deg); }
.vpanel:hover .mini-ring { transform: translate(8px, -10px) rotate(2deg); }
.mini-ring__screen { height: 100%; display: flex; flex-direction: column; align-items: center; padding: 18px 12px 14px; color: oklch(0.97 0.01 263); text-align: center; }
.mini-ring__state { font-size: .5625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.mini-ring__time { font-size: 2.1rem; font-weight: 300; line-height: 1.1; font-variation-settings: "wdth" 90; }
.mini-ring__face {
  position: relative; width: 48px; height: 48px; margin-top: 12px; border-radius: 50%; display: grid; place-items: center;
  background: oklch(0.97 0.01 263); color: oklch(0.29 0.12 263); font-weight: 800; font-size: 1.25rem;
}
.mini-ring__face i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid oklch(0.8 0.08 263 / .7); }
.mini-ring__who { margin-top: 10px; font-size: .75rem; font-weight: 650; }
.mini-ring__take { margin-top: auto; width: 100%; padding: 8px 0; border-radius: 999px; background: oklch(0.97 0.01 263); color: oklch(0.29 0.12 263); font-weight: 700; font-size: .75rem; }
.toast {
  position: absolute; left: 50%; top: 0; translate: -50% 0; z-index: 2; white-space: nowrap;
  display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 16px 30px -18px oklch(0.2 0.02 72 / .5);
}
.toast__app { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 70; color: var(--ms-ink); }
.toast__msg { font-size: .875rem; font-weight: 600; }

/* Panel B art: an assembly drawn on the graphite board */
.asm { width: 100%; height: auto; overflow: visible; }
.asm .p { fill: color-mix(in oklab, var(--ink) 9%, var(--bg)); stroke: var(--ink); stroke-width: 1.4; transform-box: fill-box; }
.asm .axis { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 18 5 3 5; opacity: .7; }
.asm .d { fill: none; stroke: var(--ink-2); stroke-width: 1.1; }
.asm .d--gap { stroke: var(--amber); stroke-width: 2; }
.asm .e { fill: none; stroke: var(--line-strong); stroke-width: .8; opacity: .7; }
.asm__labels text { fill: var(--ink-2); font-family: var(--font); font-size: 11.5px; font-weight: 600; text-anchor: middle; font-variation-settings: "wdth" 70; letter-spacing: .02em; }
.asm__gap path { stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 3 3; }
.asm__gap rect { fill: var(--amber); }
.asm__gap text { fill: var(--on-amber); font-family: var(--font); font-size: 14px; font-weight: 800; text-anchor: middle; font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 80; }
.asm__gap.is-out rect { fill: oklch(0.68 0.17 35); }

/* Graphite world: engineering, in both themes */
.vpanel--b, .vertical--b {
  --bg: oklch(0.205 0.012 250);
  --surface: oklch(0.245 0.014 250);
  --ink: oklch(0.95 0.006 250);
  --ink-2: oklch(0.78 0.012 250);
  --line: oklch(0.36 0.014 250);
  --line-strong: oklch(0.58 0.014 250);
  --ss: oklch(0.74 0.14 46);
  --ss-ink: oklch(0.84 0.1 50);
  --bezel: oklch(0.34 0.01 250);
  color-scheme: dark;
  background-color: var(--bg); color: var(--ink);
}
.vpanel--b { border-color: oklch(0.32 0.014 250); }
.vpanel--b::before, .board {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, oklch(0.95 0.01 250 / .05) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.95 0.01 250 / .05) 1px, transparent 1px),
    linear-gradient(to right, oklch(0.95 0.01 250 / .08) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.95 0.01 250 / .08) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
}
.vpanel--b > * { position: relative; }
.vpanel--b .datum__tri { border-bottom-color: var(--amber); }
.vpanel--b .vpanel__products li { background: oklch(0.24 0.014 250 / .8); }
.vpanel--b:hover { box-shadow: 0 30px 60px -28px oklch(0.1 0.02 250 / .8); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .vpanel { min-height: 0; }
}
@media (max-width: 480px) {
  .vpanel__art--a { min-height: 300px; }
  .vpanel__art--b { min-height: 180px; }
  .mini-phone--ms { left: 4%; }
  .mini-ring { right: 4%; }
}

/* The drawing: a fixed-aspect canvas so SVG lines and HTML labels share one coordinate space (640 × 600) */
.drawing { margin: 0; container-type: inline-size; }
.drawing__canvas { position: relative; aspect-ratio: 640 / 600; }
.drawing__phone {
  position: absolute; left: 31.25%; top: 14.33%; width: 37.5%; height: auto;
  border-radius: 7% / 4%;
  box-shadow: 0 0 0 clamp(4px, 1.1cqi, 7px) var(--bezel), var(--shadow);
  background: var(--surface);
}
.drawing__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lead, .dim { fill: none; stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.ext { fill: none; stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arrow { fill: var(--ink); }
.dot { fill: var(--amber); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.balloon {
  position: absolute; left: var(--x); top: var(--y);
  width: clamp(24px, 4.4cqi, 30px); aspect-ratio: 1; translate: -50% -50%;
  display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--ink); background: var(--bg);
  font-weight: 700; font-size: clamp(.75rem, 2.2cqi, .875rem); line-height: 1;
}
.note {
  position: absolute; top: var(--y); translate: 0 -50%;
  width: 21.5%; font-size: clamp(.75rem, 2cqi, .875rem); line-height: 1.3; font-weight: 600;
  text-transform: uppercase; color: var(--ink);
}
.note b { display: none; }
.note--r { left: 78.5%; }
.note--l { right: 78.5%; text-align: right; }
.dimlabel {
  position: absolute; left: 50%; top: 95.5%; translate: -50% -50%; white-space: nowrap;
  font-size: clamp(.6875rem, 1.9cqi, .8125rem); font-weight: 600; text-transform: uppercase;
  background: var(--bg); padding: 0 8px; color: var(--ink);
}
.legend { display: none; }
.drawing__caption {
  margin-top: 18px; font-size: .8125rem; text-transform: uppercase; color: var(--ink-2);
  display: flex; gap: 10px; align-items: baseline; justify-content: center;
}
.drawing__caption span { font-weight: 700; color: var(--ink); white-space: nowrap; }

@container (max-width: 500px) {
  .note { display: none; }
  .legend {
    display: grid; gap: 10px; counter-reset: lg; list-style: none; padding: 0; margin: 20px 0 0;
  }
  .legend li {
    counter-increment: lg; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
    font-size: .9375rem; line-height: 1.4;
  }
  .legend li::before {
    content: counter(lg); width: 26px; height: 26px; display: grid; place-items: center;
    border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 700; font-size: .8125rem;
  }
}

/* ---------- Section headings ---------- */
.section-title {
  font-weight: 800; font-variation-settings: "wdth" 112;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.05; letter-spacing: -0.02em;
}
.section-lede { margin-top: 18px; max-width: 40em; color: var(--ink-2); font-size: 1.125rem; }

/* ---------- Products ---------- */
.products { padding-top: clamp(40px, 6vw, 88px); }
.products > .wrap:first-child { margin-bottom: clamp(40px, 6vw, 72px); }

.product { padding-block: clamp(56px, 8vw, 104px); background: var(--p-soft); color: var(--ink); }
.product--medistock { --p: var(--ms); --p-soft: var(--ms-soft); --p-ink: var(--ms-ink); }
.product--familymeds { --p: var(--fm); --p-soft: var(--fm-soft); --p-ink: var(--fm-ink); }
.product--stacksense { --p: var(--ss); --p-soft: var(--ss-soft); --p-ink: var(--ss-ink); }
:root[data-theme="dark"] .product { --p-on: oklch(0.16 0.02 72); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .product { --p-on: oklch(0.16 0.02 72); } }

.product__grid {
  display: grid; gap: clamp(40px, 6vw, 88px); align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}
.product__grid--flip { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.product__grid--flip .product__copy { order: 2; }
.product__head { display: flex; align-items: center; gap: 16px; }
.product__icon { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.product__name {
  font-weight: 800; font-variation-settings: "wdth" 110;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--p-ink);
}
.status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
  font-size: .8125rem; font-weight: 650; text-transform: uppercase; color: var(--ink-2);
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 3px color-mix(in oklab, var(--p) 22%, transparent); }
.status--dev .status__dot, .status--early .status__dot { background: transparent; border: 2px solid var(--p); box-shadow: none; }
.product__pitch { margin-top: 24px; font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem); line-height: 1.5; max-width: 32em; }

.specs { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid color-mix(in oklab, var(--p) 30%, var(--line)); }
.specs > div {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--p) 30%, var(--line));
}
.specs dt { font-size: .8125rem; font-weight: 700; text-transform: uppercase; color: var(--p-ink); padding-top: 3px; }
.specs dd { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 38em; }
.product__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; margin-top: 32px; }

.product__media { position: relative; }
.product__media--phones { min-height: 520px; }
.shot {
  position: absolute; width: min(56%, 280px); height: auto; border-radius: 7% / 4%;
  box-shadow: 0 0 0 6px var(--bezel), var(--shadow);
}
.shot--back { right: 4%; top: 0; }
.shot--front { left: 6%; top: 64px; }
.media-note { margin-top: 18px; text-align: center; font-size: .8125rem; text-transform: uppercase; color: var(--ink-2); }

@media (max-width: 900px) {
  .product__grid, .product__grid--flip { grid-template-columns: 1fr; }
  .product__grid--flip .product__copy { order: 0; }
  .product__media--phones { min-height: 0; aspect-ratio: 1 / 1.05; max-width: 480px; width: 100%; margin-inline: auto; }
}
@media (max-width: 480px) {
  .specs > div { grid-template-columns: 1fr; gap: 4px; }
  .specs dt { padding-top: 0; }
}

/* FamilyMeds alarm illustration */
.fm-ico-bg { fill: var(--fm); }
.ss-ico-bg { fill: var(--ss); }
.fm-ico-fg, .ss-ico-fg { fill: var(--p-on, #fff); }
.ringer { display: grid; place-items: center; }
.ringer__phone {
  position: relative; width: min(100%, 300px); aspect-ratio: 9 / 16.5;
  border-radius: 42px; padding: 30px 22px 22px;
  background: oklch(0.29 0.12 263);
  box-shadow: 0 0 0 7px var(--bezel), var(--shadow);
  color: oklch(0.97 0.01 263);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ringer__state {
  font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em;
  font-variation-settings: "wdth" 72; color: oklch(0.86 0.06 263);
}
.ringer__time { margin-top: 6px; font-size: 3.5rem; font-weight: 300; line-height: 1; font-variation-settings: "wdth" 90; letter-spacing: -0.02em; }
.ringer__avatar { position: relative; width: 104px; aspect-ratio: 1; margin-top: 40px; display: grid; place-items: center; }
.ringer__face {
  position: relative; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: oklch(0.97 0.01 263); color: oklch(0.29 0.12 263); font-weight: 800; font-size: 2.5rem;
}
.ringer__pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid oklch(0.8 0.08 263 / 0.6);
}
.ringer__who { margin-top: 16px; font-weight: 650; font-size: 1.0625rem; }
.ringer__pill {
  margin-top: auto; width: 100%; padding: 14px 16px; border-radius: 18px;
  background: oklch(0.36 0.12 263); border: 1px solid oklch(0.46 0.12 263);
}
.ringer__med { font-weight: 700; font-size: 1.125rem; }
.ringer__dose { margin-top: 2px; font-size: .9375rem; color: oklch(0.88 0.04 263); }
.ringer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 14px; }
.ringer__btn { display: grid; place-items: center; min-height: 50px; border-radius: 999px; font-weight: 700; font-size: 1rem; }
.ringer__btn--snooze { border: 1.5px solid oklch(0.65 0.08 263); }
.ringer__btn--take { background: oklch(0.97 0.01 263); color: oklch(0.29 0.12 263); }
.ringer__fine { margin-top: 12px; font-size: .75rem; color: oklch(0.86 0.04 263); }

/* StackSense figure */
.stack { margin: 0; padding: clamp(20px, 3vw, 32px); border-radius: 18px; background: var(--bg); border: 1px solid color-mix(in oklab, var(--ss) 25%, var(--line)); }
.stack__chain { width: 100%; height: auto; }
.stack__parts rect { fill: color-mix(in oklab, var(--ss) 10%, var(--bg)); stroke: var(--ink); stroke-width: 1.4; }
.stack__dims path { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.stack__labels text { font-family: var(--font); font-size: 13px; font-weight: 700; fill: var(--ink-2); text-anchor: middle; }
.stack__labels .stack__gap { fill: var(--ss-ink); }
.bars { display: grid; gap: 10px; margin-top: 18px; }
.bar { display: grid; grid-template-columns: 22px 1fr 44px; align-items: center; gap: 12px; }
.bar__k { font-weight: 700; font-size: .875rem; }
.bar__v { font-weight: 600; font-size: .875rem; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar__track { height: 12px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.bar__fill {
  display: block; height: 100%; width: calc(var(--v) * 1% / 0.51); border-radius: 3px;
  background: color-mix(in oklab, var(--ss) 45%, var(--surface)); transform-origin: left;
}
.bar.is-top .bar__fill { background: var(--ss); }
.bar.is-top .bar__v, .bar.is-top .bar__k { color: var(--ss-ink); }
.stack .drawing__caption { justify-content: flex-start; }

/* ---------- Clinic → home bridge (studio amber, drenched) ---------- */
.bridge { background: var(--amber); color: var(--on-amber); padding-block: clamp(64px, 9vw, 120px); }
.bridge__title {
  font-weight: 820; font-variation-settings: "wdth" 116;
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 16em;
}
.bridge__lede { margin-top: 20px; max-width: 38em; font-size: 1.125rem; }
.flow {
  list-style: none; padding: 0; margin: clamp(40px, 6vw, 64px) 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative;
}
.flow::after {
  /* a dot that carries the prescription from step to step */
  content: ""; position: absolute; top: 15px; height: 10px; left: 20px; right: calc((100% - 64px) / 3 - 20px);
  background: radial-gradient(circle, var(--on-amber) 4px, transparent 4.5px) no-repeat 0 50% / 10px 10px;
  pointer-events: none; opacity: 0;
}
.flow__step { position: relative; }
.flow__step:not(:last-child)::after {
  /* dimension line from this step's balloon to the next */
  content: ""; position: absolute; left: 40px; right: -32px; top: 20px; height: 1.5px;
  background: var(--on-amber); transform-origin: left;
}
.flow__n {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1.5px solid var(--on-amber); background: var(--amber);
  font-weight: 750; font-size: 1rem;
}
.flow__step h5 { margin-top: 20px; font-size: 1.25rem; font-weight: 750; line-height: 1.25; }
.flow__step p { margin-top: 8px; max-width: 24em; }
.bridge__note {
  margin-top: 40px; display: inline-block; padding: 8px 14px; border-radius: 14px;
  border: 1.5px solid color-mix(in oklab, var(--on-amber) 60%, transparent);
  font-weight: 600; font-size: .9375rem;
}
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow__step:not(:last-child)::after { left: 19px; right: auto; top: 40px; bottom: -28px; width: 1.5px; height: auto; transform-origin: top; }
  .flow__step { display: grid; grid-template-columns: 40px 1fr; column-gap: 18px; }
  .flow__step h5 { margin-top: 8px; }
  .flow__step p { grid-column: 2; }
}

/* ---------- Categories, badges and the product index ---------- */
.catcode {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; margin-right: 8px;
  border-radius: 5px; background: var(--ink); color: var(--bg);
  font-size: .75rem; font-weight: 800; letter-spacing: .02em; font-variation-settings: "wdth" 80; vertical-align: 1px;
}
.badge {
  --b: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px;
  font-style: normal; font-size: .6875rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em;
  font-variation-settings: "wdth" 72; line-height: 1.3; white-space: nowrap;
  color: var(--b); border: 1px solid color-mix(in oklab, var(--b) 45%, transparent);
  background: color-mix(in oklab, var(--b) 10%, transparent);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--b); flex: none; }
.badge--live { --b: oklch(0.55 0.13 150); }
.badge--beta { --b: var(--amber-deep); }
.badge--dev::before { background: transparent; border: 1.5px dashed var(--b); width: 8px; height: 8px; box-sizing: border-box; }
:root[data-theme="dark"] .badge--live { --b: oklch(0.78 0.13 150); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge--live { --b: oklch(0.78 0.13 150); } }
.vpanel--b .badge, .vertical--b .badge { --b: var(--ink-2); }
.vpanel--b .badge--beta, .vertical--b .badge--beta { --b: var(--amber); }

.status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product__no {
  display: block; margin-bottom: 4px; font-size: .8125rem; font-weight: 750; letter-spacing: .05em;
  font-variation-settings: "wdth" 72; color: var(--ink-2);
}

/* Category inside a hero panel */
.vpanel__cat { display: grid; gap: 10px; }
.catline { display: flex; align-items: center; font-size: .8125rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 72; }
.vpanel__products .badge { margin-top: 8px; align-self: flex-start; }
.vpanel--b .catcode { background: var(--amber); color: var(--on-amber); }

/* What we make: the parts list */
.index { padding-block: clamp(24px, 4vw, 56px) 0; }
.index__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 600; font-size: .9375rem;
  cursor: pointer; transition: background-color .25s, color .25s, border-color .25s;
}
.chip .navtag { margin-right: 2px; }
.chip__n { font-size: .75rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .chip__n { color: color-mix(in oklab, var(--bg) 70%, var(--ink)); }

.bom { margin-top: clamp(28px, 4vw, 44px); border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.bom__list { list-style: none; margin: 0; padding: 0; }
.bom__row {
  display: grid; grid-template-columns: 70px minmax(0, 2.4fr) minmax(0, 1.3fr) 90px 150px 28px; gap: 16px; align-items: center;
  padding: 16px 20px; text-decoration: none; color: var(--ink); position: relative;
}
.bom__row--head {
  padding-block: 10px; background: var(--surface); border-bottom: 1px solid var(--ink);
  font-size: .6875rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; font-variation-settings: "wdth" 70; color: var(--ink-2);
}
.bom__row--head span:last-child { grid-column: 5 / 7; }
.bom__item:not([hidden]) ~ .bom__item:not([hidden]) .bom__row { border-top: 1px solid var(--line); }
.bom__item .bom__row::before {
  /* the row's product colour sweeps in on hover */
  content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--c) 9%, transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease-out); pointer-events: none;
}
.bom__item .bom__row:hover::before, .bom__item .bom__row:focus-visible::before { transform: scaleX(1); }
.bom__row > * { position: relative; }
.bom__no { font-weight: 800; font-size: 1rem; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; }
.bom__prod { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bom__prod > span { display: grid; min-width: 0; }
.bom__prod b { font-weight: 750; font-size: 1.0625rem; }
.bom__prod span span { color: var(--ink-2); font-size: .9063rem; line-height: 1.4; }
.bom__icon { width: 40px; height: 40px; border-radius: 10px; flex: none; transition: transform .5s var(--ease-out); }
.bom__row:hover .bom__icon { transform: rotate(-6deg) scale(1.06); }
.bom__cat { display: flex; align-items: center; font-weight: 600; font-size: .9375rem; }
.bom__plat { font-size: .9375rem; color: var(--ink-2); }
.bom__go { font-weight: 700; color: var(--ink-2); transition: transform .4s var(--ease-out), color .3s; }
.bom__row:hover .bom__go { transform: translateX(4px); color: var(--c); }
.bom__item[hidden] { display: none; }
.bom__key { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); font-size: .8125rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 860px) {
  .bom__row--head { display: none; }
  .bom__row { grid-template-columns: 52px minmax(0, 1fr) 24px; grid-template-areas: "no prod go" ". meta meta"; row-gap: 10px; padding: 16px; }
  .bom__no { grid-area: no; align-self: start; padding-top: 10px; }
  .bom__prod { grid-area: prod; }
  .bom__go { grid-area: go; }
  .bom__cat { grid-row: 2; grid-column: 2 / 4; flex-wrap: wrap; gap: 8px; }
  .bom__plat { display: none; }
  .bom__status { grid-row: 3; grid-column: 2 / 4; }
}

/* Category header: a drawing zone label */
.cat {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 28px; align-items: center;
  margin-bottom: clamp(40px, 5vw, 64px); padding: 22px 26px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--bg); position: relative; overflow: hidden;
}
.cat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in oklab, var(--c) 14%, transparent), transparent 55%); pointer-events: none; }
.cat > * { position: relative; }
.cat__code {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 10px; border: 2px solid var(--ink);
  font-weight: 850; font-size: 1.75rem; font-variation-settings: "wdth" 90; letter-spacing: -0.02em;
}
.cat__name { font-weight: 800; font-variation-settings: "wdth" 108; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.1; }
.cat__desc { margin-top: 4px; color: var(--ink-2); }
.cat__items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cat__items a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 650; font-size: .9375rem;
  transition: border-color .25s, transform .4s var(--ease-out);
}
.cat__items a:hover { border-color: var(--c); transform: translateY(-2px); }
.cat__items a span { font-size: .75rem; font-weight: 750; color: var(--ink-2); font-variation-settings: "wdth" 76; }
.cat--b { background: oklch(0.17 0.012 250); }
.cat--b .cat__code { border-color: var(--amber); color: var(--amber); }
.eng__cat { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .cat { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 16px 18px; }
  .cat__code { width: 56px; height: 56px; font-size: 1.375rem; }
  .cat__items { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Phone menu */
.menu-toggle {
  display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 650; font-size: .9375rem; cursor: pointer;
}
.menu-toggle__bars { display: grid; gap: 4px; width: 16px; }
.menu-toggle__bars i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease-out); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child { transform: translateY(-3px) rotate(-45deg); }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .masthead .btn--small { display: none; }
  .nav.is-open {
    display: grid; position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 72px);
    gap: 2px; padding: 10px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line);
    box-shadow: 0 30px 60px -20px oklch(0.2 0.02 72 / .45); animation: menu-in .4s var(--ease-out) both;
  }
  .nav.is-open a { padding: 14px 12px; border-radius: 10px; font-size: 1.0625rem; color: var(--ink); }
  .nav.is-open a::after { display: none; }
  .nav.is-open a:hover { background: var(--surface); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* ---------- Verticals ---------- */
.vertical { position: relative; }
.vertical--a { padding-top: var(--space-section); }
.vhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-bottom: clamp(48px, 7vw, 96px); }
.vhead--b { grid-template-columns: 1fr; position: relative; z-index: 1; }
.vhead__tag { display: flex; align-items: center; gap: 12px; font-size: .9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 72; }
.vhead__title { margin-top: 20px; font-weight: 800; font-variation-settings: "wdth" 110; font-size: clamp(1.75rem, 1.2rem + 2.1vw, 3rem); line-height: 1.06; letter-spacing: -0.02em; max-width: 19em; }
.defs { margin: 32px 0 0; display: grid; }
.defs > div { display: grid; grid-template-columns: 128px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.defs dt { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-variation-settings: "wdth" 68; padding-top: 3px; }
.defs dd { margin: 0; color: var(--ink-2); }
.vhead--b .defs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; max-width: none; }
.vhead--b .defs > div { grid-template-columns: 1fr; gap: 6px; }
@media (max-width: 900px) {
  .vhead { grid-template-columns: 1fr; }
  .vhead--b .defs { grid-template-columns: 1fr; }
  .vhead--b .defs > div { grid-template-columns: 128px 1fr; gap: 16px; }
}
@media (max-width: 480px) { .defs > div, .vhead--b .defs > div { grid-template-columns: 1fr; gap: 4px; } }

.vertical--b { padding-block: var(--space-section); overflow: hidden; }
.vertical--b .board { -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.eng { position: relative; z-index: 1; --p: var(--ss); --p-ink: var(--ss-ink); --p-soft: transparent; }
.eng__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.eng__figs { display: grid; gap: 18px; }
.btn--amber { --b: var(--amber); color: var(--on-amber); }

.sim, .eng .stack {
  margin: 0; padding: clamp(16px, 2.4vw, 24px); border-radius: 18px;
  background: oklch(0.17 0.012 250); border: 1px solid var(--line);
}
.sim__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.sim__title { font-weight: 700; }
.sim__live { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 70; color: var(--ink-2); }
.sim__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.sim__canvas { display: block; width: 100%; height: auto; aspect-ratio: 640 / 300; }
.sim__stats { margin: 14px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.sim__stats dt { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 68; color: var(--ink-2); }
.sim__stats dd { margin: 2px 0 0; font-size: 1.1875rem; font-weight: 750; font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 90; }
.eng .bar__track { background: oklch(0.26 0.014 250); }
.eng .drawing__caption { justify-content: flex-start; }
@media (max-width: 900px) { .eng__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .sim__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; } }

.bench { margin-top: clamp(56px, 8vw, 96px); padding-top: 28px; border-top: 1px solid var(--line); }
.bench__title { font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 70; color: var(--amber); }
.bench__list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.bench__list li { display: grid; gap: 6px; padding-left: 18px; border-left: 1px dashed var(--line-strong); }
.bench__list b { font-weight: 720; font-size: 1.125rem; }
.bench__list span { color: var(--ink-2); font-size: .9688rem; }
.bench__note { margin-top: 20px; font-size: .8125rem; color: var(--ink-2); }
@media (max-width: 800px) { .bench__list { grid-template-columns: 1fr; } }

/* ---------- Principles: title block ---------- */
.principles { padding-block: var(--space-section); }
.titleblock {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--ink); border-radius: 4px; overflow: hidden;
  background: var(--ink); gap: 1px;
}
.tb { background: var(--bg); padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 10px; }
.tb__k { display: flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--ink-2); }
.tb__n {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--ink); color: var(--ink); font-size: .75rem; font-variant-numeric: tabular-nums;
}
.tb:hover .tb__n { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.tb__v { margin-top: 6px; font-weight: 780; font-variation-settings: "wdth" 108; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.15; letter-spacing: -0.01em; }
.tb__d { color: var(--ink-2); font-size: .9688rem; line-height: 1.55; max-width: 34em; }
.tb__d a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tb__d a:hover { text-decoration-color: var(--amber-deep); }
.tb--meta {
  grid-column: 1 / -1; min-height: 0; padding: 10px 22px; flex-direction: row; justify-content: space-between; gap: 16px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--ink-2); background: var(--surface);
}
@media (max-width: 900px) {
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .titleblock { grid-template-columns: 1fr; }
  .tb--meta { flex-wrap: wrap; }
}

/* ---------- About ---------- */
.about { padding-block: 0 var(--space-section); }
.about__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(48px, 6vw, 72px); position: relative;
}
.about__grid::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.about__title {
  font-weight: 800; font-variation-settings: "wdth" 112;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem); line-height: 1.06; letter-spacing: -0.02em;
}
.about__title span { box-shadow: inset 0 -0.32em 0 var(--amber); }
.about__body { display: grid; gap: 18px; font-size: 1.125rem; color: var(--ink-2); max-width: 34em; }
.about__body p:first-child { color: var(--ink); }
.about__reg { font-size: .9375rem; }
@media (max-width: 800px) { .about__grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--bg); padding-block: clamp(72px, 10vw, 136px); }
.contact__title { font-size: 1.125rem; font-weight: 650; color: color-mix(in oklab, var(--bg) 75%, var(--ink)); }
.contact__mail {
  display: inline-block; margin-top: 12px;
  font-weight: 820; font-variation-settings: "wdth" 116;
  font-size: clamp(1.75rem, 0.6rem + 5.6vw, 5rem); line-height: 1.05; letter-spacing: -0.03em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--amber), var(--amber)) no-repeat 0 92% / 0% 0.14em;
  transition: background-size .5s var(--ease-out);
}
.contact__mail:hover, .contact__mail:focus-visible { background-size: 100% 0.14em; }
.contact__mail:focus-visible { outline-color: var(--amber); }
.contact__cols { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 24px 56px; }
.contact__k { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 70; color: color-mix(in oklab, var(--bg) 70%, var(--ink)); }
.contact__links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) { .contact__cols { grid-template-columns: 1fr; } }
.contact__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid color-mix(in oklab, var(--bg) 35%, var(--ink)); text-decoration: none; font-weight: 600;
  transition: border-color .2s, background-color .2s, color .2s;
}
.contact__links a:hover { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.contact__links a:focus-visible { outline-color: var(--amber); }

/* ---------- Footer ---------- */
.footer { padding-block: 28px; font-size: .875rem; color: var(--ink-2); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.footer__links a:hover { color: var(--ink); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Page load: headline lines slide up out of their masks, the highlighter follows, then the two panels arrive. */
  .hero__place { animation: rise .8s var(--ease-out) both; }
  .hero__title .line > span { animation: line-up 1s var(--ease-out) both; }
  .hero__title .line:nth-child(2) > span { animation-delay: .1s; }
  .hl { animation: swipe 1s var(--ease-quart) .6s both; }
  .hl--b { animation-delay: .8s; }
  .hero__lede { animation: rise .9s var(--ease-out) .25s both; }
  .hero__grid-bg { animation: fade 1.6s ease-out both; }
  .vpanel--a { animation: panel-in 1.1s var(--ease-out) .35s both; }
  .vpanel--b { animation: panel-in 1.1s var(--ease-out) .48s both; }

  /* Panel A: phones float, the hand-off toast drops in on a loop */
  .mini-phone--ms { animation: float-a 7s ease-in-out 1.4s infinite; }
  .mini-ring { animation: float-b 6s ease-in-out 1.4s infinite; }
  .mini-ring__face i { animation: ring 2.2s var(--ease-out) infinite; opacity: 0; }
  .mini-ring__face i:nth-child(2) { animation-delay: 1.1s; }
  .toast { animation: toast 7s var(--ease-out) 1.6s infinite both; }

  /* Panel B: the assembly is drafted, then the parts vary within tolerance */
  .asm .d { stroke-dasharray: 1; animation: draw .8s var(--ease-quart) both; }
  .asm .d:nth-child(1) { animation-delay: .9s; } .asm .d:nth-child(2) { animation-delay: 1.02s; }
  .asm .d:nth-child(3) { animation-delay: 1.14s; } .asm .d:nth-child(4) { animation-delay: 1.26s; }
  .asm .d:nth-child(5) { animation-delay: 1.38s; }
  .asm .e, .asm__labels { animation: fade .8s ease-out 1.3s both; }
  .asm__gap { animation: pop .6s var(--ease-out) 1.6s both; transform-box: fill-box; transform-origin: 50% 100%; }
  .asm .p { animation: settle 1s var(--ease-out) both; }
  .asm .p2 { animation: settle 1s var(--ease-out) .1s both, breathe 2.6s ease-in-out 1.8s infinite alternate; transform-origin: left center; }
  .asm .p3 { animation: settle 1s var(--ease-out) .2s both, breathe 3.4s ease-in-out 2.2s infinite alternate-reverse; transform-origin: left center; }

  /* Fig. A1 drafts itself when it scrolls into view (armed by script; visible without it) */
  .drawing.armed:not(.in) .lead, .drawing.armed:not(.in) .dim { stroke-dashoffset: 1; }
  .drawing.armed:not(.in) .balloon, .drawing.armed:not(.in) .note, .drawing.armed:not(.in) .dot,
  .drawing.armed:not(.in) .dimlabel, .drawing.armed:not(.in) .ext, .drawing.armed:not(.in) .arrow { opacity: 0; }
  .drawing.armed:not(.in) .drawing__phone { opacity: 0; transform: translateY(28px) scale(.97); }
  .drawing .lead, .drawing .dim { stroke-dasharray: 1; }
  .drawing.in .drawing__phone { animation: settle 1.1s var(--ease-out) both; }
  .drawing.in .lead { animation: draw .7s var(--ease-quart) both; }
  .drawing.in .lead:nth-of-type(1) { animation-delay: .55s; }
  .drawing.in .lead:nth-of-type(2) { animation-delay: .7s; }
  .drawing.in .lead:nth-of-type(3) { animation-delay: .85s; }
  .drawing.in .dim { animation: draw .9s var(--ease-quart) 1s both; }
  .drawing.in .dot, .drawing.in .ext, .drawing.in .arrow { animation: fade .5s ease-out .9s both; }
  .drawing.in .balloon { animation: pop .5s var(--ease-out) both; }
  .drawing.in .balloon:nth-of-type(1) { animation-delay: .9s; }
  .drawing.in .balloon:nth-of-type(2) { animation-delay: 1.05s; }
  .drawing.in .balloon:nth-of-type(3) { animation-delay: 1.2s; }
  .drawing.in .note { animation: fade-in-x .6s var(--ease-out) 1.1s both; }
  .drawing.in .dimlabel { animation: fade .6s ease-out 1.3s both; }

  .ringer__pulse { animation: ring 2.4s var(--ease-out) infinite; opacity: 0; }
  .ringer__pulse:nth-child(2) { animation-delay: .8s; }
  .ringer__pulse:nth-child(3) { animation-delay: 1.6s; }
  .ringer__phone { animation: buzz 2.8s ease-in-out infinite; }
  .sim__dot { animation: blink 1.6s ease-in-out infinite; }
  .badge--beta::before, .badge--live::before { animation: beacon 2.2s ease-out infinite; }
  .badge--dev::before { animation: spin 6s linear infinite; }
  .flow::after { opacity: 1; animation: carry 4.5s cubic-bezier(.65, 0, .35, 1) infinite; }

  /* Scroll-linked, only where supported. Without support everything is simply visible. */
  @supports (animation-timeline: view()) {
    .shot--back { animation: tilt-back linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .shot--front { animation: tilt-front linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .ringer { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .flow__step::after { animation: flow-x linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
    .flow__step, .tb:not(.tb--meta), .specs > div, .defs > div, .bench__list li, .bom__item, .cat {
      animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
    }
    .vhead__title { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .bar__fill { animation: grow-x linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    .board { animation: board-pan linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}

@keyframes rise { from { opacity: .35; transform: translateY(14px); filter: blur(4px); } }
@keyframes line-up { from { transform: translateY(45%); opacity: .35; } }
@keyframes panel-in { from { opacity: .4; transform: translateY(32px) scale(.985); filter: blur(6px); } }
@keyframes swipe { from { background-size: 0% var(--hl-h, 0.42em); } }
@keyframes settle { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(8px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; scale: .5; } }
@keyframes fade-in-x { from { opacity: 0; transform: translateX(var(--dx, 8px)); } }
.note--l { --dx: -8px; }
@keyframes ring { 0% { scale: 1; opacity: .9; } 100% { scale: 1.9; opacity: 0; } }
@keyframes buzz {
  0%, 62%, 100% { rotate: 0deg; }
  66% { rotate: -1.4deg; } 70% { rotate: 1.4deg; } 74% { rotate: -1deg; } 78% { rotate: .6deg; } 82% { rotate: 0deg; }
}
@keyframes float-a { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes float-b { 0%, 100% { translate: 0 -4px; } 50% { translate: 0 8px; } }
@keyframes toast {
  0% { opacity: 0; transform: translateY(-14px) scale(.96); }
  8%, 62% { opacity: 1; transform: none; }
  72%, 100% { opacity: 0; transform: translateY(-8px) scale(.98); }
}
@keyframes breathe { from { transform: scaleX(.985); } to { transform: scaleX(1.015); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--b) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes carry {
  0% { background-position: 0% 50%; opacity: 0; }
  8% { opacity: 1; }
  45%, 55% { background-position: 50% 50%; }
  92% { opacity: 1; }
  100% { background-position: 100% 50%; opacity: 0; }
}
@keyframes tilt-back { from { transform: perspective(1000px) rotateY(-22deg) rotateX(6deg) translateY(60px); } to { transform: perspective(1000px) rotateY(6deg) translateY(-40px); } }
@keyframes tilt-front { from { transform: perspective(1000px) rotateY(18deg) rotateX(4deg) translateY(20px); } to { transform: perspective(1000px) rotateY(-4deg) translateY(20px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(60px) scale(.94); } }
@keyframes board-pan { from { background-position: 0 -60px; } to { background-position: 0 60px; } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes flow-x { from { transform: scaleX(0); } }
@keyframes flow-y { from { transform: scaleY(0); } }
@keyframes lift { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 760px) {
  .flow::after { display: none; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) { .flow__step::after { animation-name: flow-y; } }
}

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

/* ---------- Fig. B0: StackSense intro film ---------- */
.film { margin: clamp(32px, 4vw, 56px) 0 0; }
.film__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000;
  border: 1px solid var(--line); box-shadow: 0 30px 60px -30px oklch(0.05 0.02 250 / 0.9); }
.film__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Full screen: always show the whole frame (never crop the sides on taller or wider screens) */
.film__video:fullscreen { object-fit: contain; width: 100%; height: 100%; }
.film__video:-webkit-full-screen { object-fit: contain; width: 100%; height: 100%; }
.film__play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; border: 0; cursor: pointer;
  padding: clamp(18px, 3vw, 34px); background: linear-gradient(to top, oklch(0.1 0.01 250 / 0.6), transparent 45%); color: var(--ink); font: inherit; text-align: left; }
.film__play-icon { flex: none; width: clamp(56px, 6vw, 76px); height: clamp(56px, 6vw, 76px); border-radius: 999px; background: var(--amber); display: grid; place-items: center;
  box-shadow: 0 0 0 0 oklch(0.83 0.155 74 / 0.6); transition: transform .45s var(--ease-out); }
.film__play-icon::after { content: ""; margin-left: 6px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--on-amber); }
.film__play-row { display: flex; align-items: center; gap: 16px; }
.film__play-text { font-weight: 700; font-size: 1rem; letter-spacing: 0.05em; text-transform: uppercase; font-variation-settings: "wdth" 72;
  color: oklch(0.97 0.005 250); text-shadow: 0 1px 8px oklch(0 0 0 / 0.6); }
.film__play:hover .film__play-icon, .film__play:focus-visible .film__play-icon { transform: scale(1.08); }
.film__play[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .film__play-icon { animation: film-ping 2.4s var(--ease-out) infinite; }
  @keyframes film-ping { 0% { box-shadow: 0 0 0 0 oklch(0.83 0.155 74 / 0.55); } 70%, 100% { box-shadow: 0 0 0 22px oklch(0.83 0.155 74 / 0); } }
}
.film .drawing__caption { justify-content: flex-start; }

/* ---------- Intro: the studio mark draws itself, then flies into the header ----------
   Follows Youtube/Logo/app_tool_1.mp4 (light) and app_tool_2.mp4 (dark), compressed to about four seconds.
   Only shown when the script in <head> sets html[data-intro]: once per visit, with motion allowed. */
.intro { display: none; }
html[data-intro] .intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: var(--gutter); overflow: hidden;
  --hl-y: .1em; --hl-h: .4em;
  animation: intro-failsafe .3s ease 7s forwards;   /* never strand anyone behind it */
}
:root[data-theme="dark"] .intro { --hl-y: -.1em; --hl-h: .14em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .intro { --hl-y: -.1em; --hl-h: .14em; } }

.intro__paper { position: absolute; inset: 0; background: var(--bg); }
.intro__paper::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--line) 75%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--line) 75%, transparent) 1px, transparent 1px);
  background-size: 40px 40px; background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  opacity: .8; animation: fade .6s ease-out both;
}
.intro__reg { position: absolute; width: 22px; height: 22px; fill: none; stroke: var(--line-strong); stroke-width: 1.2; animation: fade .6s ease-out .1s both; }
.intro__reg--tl { top: clamp(20px, 5vw, 56px); left: clamp(20px, 5vw, 56px); }
.intro__reg--tr { top: clamp(20px, 5vw, 56px); right: clamp(20px, 5vw, 56px); }
.intro__reg--bl { bottom: clamp(20px, 5vw, 56px); left: clamp(20px, 5vw, 56px); }
.intro__reg--br { bottom: clamp(20px, 5vw, 56px); right: clamp(20px, 5vw, 56px); }

/* Sized so the lockup lands exactly on the header's mark and wordmark (26 × 32 px, 18 px type, 10 px gap). */
.intro__lockup {
  position: relative; font-size: min(11.5vw, 16vh, 140px);
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .49em; align-items: center;
  animation: intro-open .65s var(--ease-out) 2.3s backwards;
}
.intro__mark { width: 1.26em; height: auto; overflow: visible; animation: intro-settle .65s var(--ease-out) 2.3s backwards; }
.intro__box, .intro__m, .intro__stem, .intro__tri { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.intro__box { stroke-width: 2.4; animation: draw .7s cubic-bezier(.45, 0, .3, 1) .15s backwards; }
.intro__m { stroke-width: 2.6; animation: draw .6s linear .9s backwards; }
.intro__stem { stroke-width: 2.4; stroke-linecap: butt; animation: draw .15s linear 1.5s backwards; }
.intro__tri { fill: var(--amber); fill-opacity: 1; stroke-width: 1.6; animation: draw .28s linear 1.63s backwards, intro-fill .2s ease-out 1.9s backwards; }
.intro__spark { fill: none; stroke: var(--amber); stroke-width: .7; stroke-linecap: round; opacity: 0; transform-box: fill-box; transform-origin: center; animation: intro-spark .45s var(--ease-out) 1.9s; }
.intro__pen {
  fill: var(--amber); stroke: var(--ink); stroke-width: .5; opacity: 0;
  offset-path: path("M9 20V8.5l7 7.5 7-7.5V20"); offset-rotate: 0deg;
  filter: drop-shadow(0 0 1.2px var(--amber));
  animation: intro-pen .6s linear .9s;
}
.intro__dims { animation: intro-dims 2.4s linear both; }
.intro__ext { fill: none; stroke: var(--line-strong); stroke-width: .25; }
.intro__dim { fill: none; stroke: var(--line-strong); stroke-width: .25; stroke-dasharray: 1; animation: draw .45s var(--ease-quart) .45s backwards; }
.intro__arrow { fill: var(--line-strong); }
.intro__num, .intro__datum { fill: var(--ink-2); font-family: var(--font); font-weight: 600; font-variation-settings: "wdth" 68; }
.intro__num { font-size: 2.2px; }
.intro__datum { font-size: 1.5px; letter-spacing: .08em; }

.intro__text { position: relative; transform: translateY(-.16em); }
.intro__word {
  font-weight: 800; font-size: .886em; line-height: 1; white-space: nowrap;
  font-variation-settings: "wdth" 118; letter-spacing: -0.01em; color: var(--ink);
}
.intro__word span { display: inline-block; }
.intro__word [style] { animation: intro-letter .5s var(--ease-out) calc(2.36s + var(--i) * 45ms) backwards; }
.intro__lab { position: relative; isolation: isolate; }
.intro__lab::before {
  content: ""; position: absolute; z-index: -1; left: -.04em; right: -.04em; bottom: var(--hl-y); height: var(--hl-h);
  background: var(--amber); transform-origin: left; animation: intro-swipe .4s var(--ease-quart) 2.95s backwards;
}
.intro__tag {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: max(10px, .14em);
  font-size: max(9.5px, .15em); font-weight: 600; line-height: 1.5; letter-spacing: .32em;
  text-transform: uppercase; font-variation-settings: "wdth" 68; color: var(--ink-2); text-wrap: balance;
  animation: intro-tag .5s var(--ease-out) 3.1s backwards;
}

/* Leaving: the paper fades, the lockup flies onto the header logo (see the <head> script). */
html[data-intro] .masthead .brand { opacity: 0; }
html[data-intro="on"] .hero, html[data-intro="on"] .hero * { animation-play-state: paused !important; }
html[data-intro="fly"] .intro, html[data-intro="skip"] .intro { pointer-events: none; }
html[data-intro="fly"] .intro__paper { opacity: 0; transition: opacity .55s ease .05s; }
html[data-intro="fly"] .intro__reg, html[data-intro="fly"] .intro__tag, html[data-intro="fly"] .intro__lab::before { opacity: 0; transition: opacity .2s ease; }
html[data-intro="fly"] .intro__lockup { transform: var(--fly); transition: transform .72s cubic-bezier(.65, 0, .25, 1); }
html[data-intro="fly"] .intro__text { transform: none; transition: transform .72s cubic-bezier(.65, 0, .25, 1); }
html[data-intro="skip"] .intro { opacity: 0; transition: opacity .3s ease; }

@keyframes intro-open { from { grid-template-columns: auto minmax(0, 0fr); column-gap: 0; } }
@keyframes intro-settle { from { transform: scale(var(--intro-zoom, 1.55)); } }
@media (max-width: 600px) { .intro { --intro-zoom: 1.9; } }
@keyframes intro-fill { from { fill-opacity: 0; } }
@keyframes intro-spark { 0% { opacity: 0; transform: scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes intro-pen { 0% { opacity: 1; offset-distance: 0%; } 92% { opacity: 1; } 100% { opacity: 0; offset-distance: 100%; } }
@keyframes intro-dims { 0%, 15% { opacity: 0; } 25%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes intro-letter { from { opacity: 0; transform: translateY(.35em); } }
@keyframes intro-swipe { from { transform: scaleX(0); } }
@keyframes intro-tag { from { opacity: 0; transform: translateY(.6em); letter-spacing: .4em; } }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }

/* ===================== C · EXPLAINED =====================
   Videos from the Modus Lab YouTube channel, each with a written page.
   Reuses the datum, badge, catcode and title-block patterns. */

/* Homepage section */
.vertical--c { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.vhead--c { grid-template-columns: 1fr; margin-bottom: clamp(32px, 4vw, 56px); }
.vhead--c .defs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.vhead--c .defs > div { grid-template-columns: 1fr; gap: 6px; }
@media (max-width: 760px) { .vhead--c .defs { grid-template-columns: 1fr; } }

/* Video entry card (homepage + index) */
.xlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.xcard {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center;
  padding: clamp(14px, 1.6vw, 20px); border: 1px solid var(--line); border-radius: 20px; background: var(--bg);
  text-decoration: none; transition: border-color .25s, transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.xcard:hover { border-color: var(--amber-deep); transform: translateY(-3px); box-shadow: var(--shadow); }
.xcard > span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.xcard__thumb { display: block; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bezel); }
.xcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.xcard__dur {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px;
  background: oklch(0.15 0 0 / .85); color: #fff; font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.xcard__no { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .8125rem; font-weight: 750; letter-spacing: .05em; font-variation-settings: "wdth" 72; color: var(--ink-2); text-transform: uppercase; }
.xcard__title { display: block; margin-top: 10px; font-weight: 800; font-variation-settings: "wdth" 110; font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); line-height: 1.1; letter-spacing: -0.02em; }
.xcard__desc { display: block; margin-top: 10px; color: var(--ink-2); }
.xcard__go { margin-top: 16px; display: inline-flex; gap: 8px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.xcard:hover .xcard__go { text-decoration-color: var(--amber-deep); text-decoration-thickness: 2px; }
@media (max-width: 760px) { .xcard { grid-template-columns: 1fr; } }

.xmore { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Video page */
.xpage { padding-block: clamp(28px, 4vw, 56px) var(--space-section); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: .8125rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 72; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.xpage__head { grid-area: head; max-width: 52rem; }
.xpage__title { margin-top: 14px; font-weight: 820; font-variation-settings: "wdth" 112; font-size: clamp(2rem, 1.3rem + 3vw, 3.75rem); line-height: 1.02; letter-spacing: -0.03em; }
.xpage__lede { margin-top: 18px; font-size: 1.1875rem; color: var(--ink-2); max-width: 44em; }
/* Desktop: title, video and write-up on the left; key facts run down the right from the title line.
   Phone: title, video, key facts, then the write-up. */
.xpage__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); column-gap: clamp(32px, 5vw, 72px);
  grid-template-areas: "head facts" "video facts" "main facts"; grid-template-rows: auto auto 1fr;
  align-items: start; margin-top: 20px;
}
.xpage__video { grid-area: video; margin: clamp(28px, 4vw, 44px) 0 0; min-width: 0; }
.xpage__facts { grid-area: facts; }
.xpage__main { grid-area: main; min-width: 0; }
@media (max-width: 900px) {
  .xpage__body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "video" "facts" "main"; grid-template-rows: none; }
  .xpage__facts { margin-top: 40px; }
}
.xsection { margin-top: clamp(48px, 6vw, 80px); }
.xsection__title { font-weight: 800; font-variation-settings: "wdth" 110; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.1; letter-spacing: -0.02em; }
.prose { margin-top: 16px; color: var(--ink-2); max-width: 42em; }
.prose p + p { margin-top: 14px; }
.prose b { color: var(--ink); }

/* Click-to-load YouTube player: no request to YouTube until someone presses play */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: oklch(0.12 0 0); box-shadow: var(--shadow); }
.player > a, .player > button { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), filter .3s; }
.player > a:hover img, .player > button:hover img { transform: scale(1.02); filter: brightness(.9); }
.player__btn {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px 14px 16px; border-radius: 999px;
  background: var(--amber); color: var(--on-amber); font-weight: 750; font-size: 1rem; box-shadow: 0 10px 30px oklch(0 0 0 / .35);
  transition: transform .3s var(--ease-out);
}
.player > a:hover .player__btn, .player > button:hover .player__btn { transform: scale(1.05); }
.player__btn::before { content: ""; width: 0; height: 0; border-block: 9px solid transparent; border-left: 15px solid currentColor; margin-left: 4px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__note { margin-top: 12px; font-size: .8125rem; color: var(--ink-2); }

/* Key facts: a narrow title block */
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.facts .tb { padding: 16px 18px; gap: 4px; }
.facts .tb__v { margin-top: 2px; font-size: 1.25rem; }
.facts .tb__d { font-size: .875rem; }
.facts__caption { margin-top: 12px; }

/* Chapters */
.chapters { list-style: none; margin: 20px 0 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.chapters a {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: baseline;
  padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .2s, padding .3s var(--ease-out);
}
.chapters a:hover { background: var(--surface); padding-inline: 12px; }
.chapters__t { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--amber-deep); }
.chapters__name { font-weight: 650; }
.chapters__go { font-size: .8125rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 72; }

/* Sources, credits, transcript */
.sources { margin: 16px 0 0; padding-left: 1.2em; color: var(--ink-2); display: grid; gap: 8px; }
.sources a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sources a:hover { text-decoration-color: var(--amber-deep); }
.transcript { margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.transcript summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::after { content: "+"; font-weight: 800; font-size: 1.25rem; line-height: 1; }
.transcript[open] summary::after { content: "−"; }
.transcript__body { padding: 0 20px 20px; color: var(--ink-2); max-width: 46em; }
.transcript__body p + p { margin-top: 12px; }
.transcript__body h3 { margin-top: 22px; font-size: .8125rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" 72; color: var(--ink); }

.channel-cta {
  margin-top: clamp(48px, 6vw, 80px); display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between;
  padding: clamp(22px, 3vw, 32px); border-radius: 20px; background: var(--ink); color: var(--bg);
}
.channel-cta__title { font-weight: 800; font-variation-settings: "wdth" 110; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.1; }
.channel-cta__title mark { background: var(--amber); color: var(--on-amber); padding: 0 .12em; }
.channel-cta p { margin-top: 6px; color: color-mix(in oklab, var(--bg) 75%, var(--ink)); }
.channel-cta .btn { --b: var(--amber); color: var(--on-amber); }

/* Index page */
.xindex { padding-block: clamp(32px, 5vw, 72px) var(--space-section); }
.xindex .vhead { margin-bottom: clamp(32px, 4vw, 56px); }

/* Pre-release state: set by a tiny <head> script until the video's release
   time (data in each page), then removed automatically. Default = live. */
.pre-only { display: none; }
.pre-release .live-only { display: none; }
.pre-release .badge.pre-only { display: inline-flex; }
.pre-release span.pre-only { display: inline; }
.pre-release .chapters a { pointer-events: none; }
.pre-release .chapters__go { visibility: hidden; }
.pre-release .player__btn { display: none; }
.player__soon {
  position: absolute; inset: 0; z-index: 1; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center; color: #fff;
  background: linear-gradient(180deg, oklch(0.12 0 0 / .55), oklch(0.12 0 0 / .82));
}
.pre-release .player__soon { display: flex; }
.player__soon-k { font-size: .8125rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; font-variation-settings: "wdth" 72; color: var(--amber); }
.player__soon-t { font-weight: 820; font-variation-settings: "wdth" 112; font-size: clamp(1.75rem, 1.2rem + 3vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; }
.player__soon .btn { --b: var(--amber); color: var(--on-amber); margin-top: 8px; }
.player__soon-d { font-size: .875rem; color: oklch(0.9 0 0); }

/* Hero tile C · Explained: a full-width strip under A and B */
.vpanel--c {
  grid-column: 1 / -1; min-height: 0; grid-template-rows: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: clamp(20px, 3vw, 48px);
  background: color-mix(in oklab, var(--amber) 13%, var(--bg));
  border-color: color-mix(in oklab, var(--amber) 50%, var(--line));
}
.vpanel__body { display: grid; gap: 20px; align-content: start; }
.vpanel--c .vpanel__products li { background: color-mix(in oklab, var(--bg) 80%, transparent); }
.vpanel__art--c {
  min-height: 0; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  rotate: 1.5deg; transition: rotate .6s var(--ease-out), transform .6s var(--ease-out);
}
.vpanel__art--c img { width: 100%; height: 100%; object-fit: cover; }
.vpanel--c:hover .vpanel__art--c { rotate: 0deg; transform: scale(1.02); }
.vpanel__play {
  position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--amber); color: var(--on-amber);
  font-size: .8125rem; font-weight: 750; font-variant-numeric: tabular-nums; box-shadow: 0 6px 18px oklch(0 0 0 / .3);
}
.vpanel__play::before { content: ""; border-block: 6px solid transparent; border-left: 10px solid currentColor; }
.vpanel__play::after { content: "7:56"; }
@media (max-width: 900px) { .vpanel--c { grid-template-columns: 1fr; } }
