/* =========================================================================
   Mark Ahn — "No one should miss their golden time"
   A white page. Colour follows the story as soft washes of light:
     paper (the moments) → mist (the hospice) → dawn (the dream)
     → paper + gold (the work) → mint (the impossible) → dawn (the epilogue)
   ========================================================================= */
:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --panel: rgba(255, 255, 255, 0.88);
  --ink: #16181d;
  --ink-2: #3b3f48;
  --muted: #646a76;
  --faint: #959ba6;
  --line: rgba(22, 24, 29, 0.09);
  --line-2: rgba(22, 24, 29, 0.16);
  --gold: #c07d14;        /* display accents */
  --gold-ink: #94600e;    /* small gold text (passes contrast on white) */
  --gold-2: #f2b84b;      /* fills */
  --gold-soft: rgba(242, 184, 75, 0.16);
  --slate: #56647e;
  --teal: #0f8a7f;
  --green: #16a05a;
  --ember: #e0662c;
  --shadow: 0 1px 2px rgba(22, 24, 29, 0.04), 0 14px 34px -20px rgba(22, 24, 29, 0.22);

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --radius: 18px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(242, 184, 75, .35); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- background: tone washes + the WebGL canvas ---------- */
.tones { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
.tone { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.tone.is-on { opacity: 1; }
.tone--gold {
  background:
    radial-gradient(1200px 760px at 72% 40%, rgba(242, 184, 75, .13), transparent 62%),
    radial-gradient(900px 600px at 6% 96%, rgba(80, 190, 180, .07), transparent 60%),
    #fbfaf7;
}
.tone--deep {
  background:
    radial-gradient(1000px 760px at 75% 45%, rgba(40, 170, 160, .13), transparent 62%),
    radial-gradient(800px 600px at 12% 85%, rgba(230, 110, 140, .07), transparent 60%),
    #f5f9f8;
}
.tone--dawn {
  background:
    radial-gradient(1300px 660px at 50% 112%, rgba(255, 158, 74, .3), transparent 62%),
    radial-gradient(900px 520px at 82% 0%, rgba(186, 158, 230, .14), transparent 60%),
    linear-gradient(180deg, #fbf8f4, #fff2e4);
}
.no-webgl .tones::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(380px 380px at 70% 40%, rgba(242, 184, 75, .28), rgba(242, 184, 75, .06) 55%, transparent 70%);
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer, .nav { position: relative; z-index: 1; }

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- type ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 380;
  font-size: clamp(46px, 7.6vw, 116px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}
.display em, .h2 em, .pull em, .beat__line em, .chapter-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 340;
}
.display--md { font-size: clamp(44px, 6.4vw, 96px); }
.h2 {
  font-family: var(--f-display);
  font-weight: 420;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.lede {
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 30em;
  margin: 26px 0 0;
}
.lede--muted { color: var(--muted); }
.eyebrow, .kicker {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
  display: flex; align-items: center; gap: 12px;
}
.kicker span { color: var(--gold-ink); display: inline-flex; align-items: center; gap: 12px; }
.kicker span::after { content: ""; width: 36px; height: 1px; background: var(--line-2); }
.kicker--plain { margin-bottom: 12px; color: var(--gold-ink); }
.prose p { margin: 0 0 1.1em; color: var(--ink-2); max-width: 36em; }
.prose--wide p { max-width: 40em; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); }

/* chapter labels + titles */
.chapter-label {
  font-family: var(--f-mono);
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  display: flex; align-items: center; gap: 14px;
}
.chapter-label b { color: var(--gold-ink); font-weight: 500; display: inline-flex; align-items: center; gap: 14px; }
.chapter-label b::after { content: ""; width: 40px; height: 1px; background: rgba(192, 125, 20, .45); }
.chapter-label--center { justify-content: center; }
.chapter-label--center b::after { display: none; }
.chapter-title {
  font-family: var(--f-display);
  font-weight: 380;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 30px;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
  max-width: 11em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600; font-size: 15px;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
  border: 1px solid transparent;
}
.btn--gold { background: var(--gold-2); color: #1b1408; box-shadow: 0 10px 26px -12px rgba(192, 125, 20, .7); }
.btn--gold:hover { background: #f6c76a; transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); background: rgba(255, 255, 255, .7); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-ink); transform: translateY(-2px); }
.round-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer; font-size: 17px;
  transition: border-color .2s, color .2s, transform .2s;
}
.round-btn:hover { border-color: var(--gold); color: var(--gold-ink); }
.textlink {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(192, 125, 20, .4);
}
.textlink:hover { text-decoration-color: var(--gold-ink); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(251, 250, 247, .82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--f-display); font-size: 20px; letter-spacing: -0.01em; white-space: nowrap; }
.nav__mark {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #ffe2a8, var(--gold-2) 45%, var(--gold));
  box-shadow: 0 0 14px rgba(242, 184, 75, .8);
  animation: beat 1.6s infinite;
}
.nav__chapter {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); margin-left: 6px;
  opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .4s;
}
.nav__chapter.is-on { opacity: 1; transform: none; }
.nav__chapter::before { content: "/"; margin-right: 12px; color: var(--line-2); }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  text-decoration: none; font-size: 14px; color: var(--muted);
  padding: 8px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(22, 24, 29, .06); }
.nav__links .nav__cta { color: var(--gold-ink); border: 1px solid rgba(192, 125, 20, .4); margin-left: 8px; }
.nav__links .nav__cta:hover { background: var(--gold-soft); }
.nav__toggle { display: none; }
.nav__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.nav__progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--slate), var(--gold-2), var(--gold)); }

@media (max-width: 1180px) { .nav__chapter { display: none; } }
@media (max-width: 900px) {
  .nav__toggle {
    display: inline-grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, .85); cursor: pointer;
  }
  .nav__toggle i { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .25s; }
  .nav__toggle[aria-expanded="true"] i:first-of-type { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: calc(var(--nav-h) - 4px); right: var(--gutter); left: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; border-radius: 16px;
    background: rgba(255, 255, 255, .98); border: 1px solid var(--line);
    box-shadow: 0 30px 60px -24px rgba(22, 24, 29, .35);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 12px 14px; font-size: 16px; }
  .nav__links .nav__cta { margin: 6px 0 0; text-align: center; }
}

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .beat .reveal { transform: translateY(18px); filter: blur(6px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease); }
.js .beat .reveal.is-in { filter: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .beat .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.25); }
  24% { transform: scale(1); }
  36% { transform: scale(1.14); }
  50% { transform: scale(1); }
}

/* ---------- sections ---------- */
.section { padding: clamp(96px, 16vh, 180px) 0; position: relative; }
.section-lede { color: var(--muted); max-width: 40em; font-size: 18px; margin: -6px 0 0; }

/* ---------- hero: the network of moments ---------- */
.hero { height: 100vh; height: 100svh; min-height: 600px; position: relative; }
.hero__sticky { position: relative; height: 100%; overflow: hidden; }
.hero__inner { height: 100%; display: flex; align-items: center; padding-top: var(--nav-h); }
.hero__copy {
  max-width: min(540px, 44vw);
  position: relative; z-index: 2;
  opacity: calc(1 - var(--hero-fade, 0));
  transform: translateY(calc(var(--hero-fade, 0) * -40px));
}
.hero__copy .display { font-size: clamp(44px, 5.5vw, 86px); }
.hero__copy .lede { font-size: clamp(17px, 1.35vw, 19px); }
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold-2);
  box-shadow: 0 0 0 0 rgba(242, 184, 75, .6);
  animation: ping 1.6s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(242, 184, 75, .6); }
  70% { box-shadow: 0 0 0 12px rgba(242, 184, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 184, 75, 0); }
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* the zoomed-in moment */
.moment-anchor { position: absolute; left: 56.5%; width: 23%; top: 20%; height: 45%; pointer-events: none; }
.moment {
  position: absolute; left: 0; top: 0; margin: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(22, 24, 29, .06), 0 24px 50px -22px rgba(22, 24, 29, .45);
  will-change: transform, width, height;
  z-index: 3;
  transition: opacity .45s ease;
  pointer-events: none;
}
.moment[hidden] { display: none; }
.moment img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; background: #efece6; }
.moment-caption {
  position: absolute; left: 49%; width: 38%; top: 68.5%;
  text-align: center; z-index: 3; pointer-events: none;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .5s var(--ease);
  opacity: calc(var(--cap-on, 0) * (1 - var(--hero-fade, 0)));
}
.moment-caption.is-in { --cap-on: 1; transform: none; }
.moment-caption p { margin: 0; text-shadow: 0 0 18px #fff, 0 0 6px #fff; }
.moment-caption__date { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.moment-caption__title { font-family: var(--f-display); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.25; margin-top: 6px !important; color: var(--ink); text-wrap: balance; }
.moment-caption__place { font-size: 14px; color: var(--muted); margin-top: 4px !important; }

/* timeline of the reel */
.history {
  position: absolute; left: 47%; right: max(var(--gutter), calc((100% - var(--maxw)) / 2 - 40px)); bottom: 6.5%;
  display: flex; align-items: flex-end; gap: 18px; z-index: 3;
  opacity: calc(1 - var(--hero-fade, 0));
}
.history__toggle {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .85);
  font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  cursor: pointer;
}
.history__toggle:hover { color: var(--ink); border-color: var(--gold); }
.history__toggle i { width: 9px; height: 10px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.history__toggle.is-paused i { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent currentColor; }
.history__ticks {
  flex: 1; display: flex; justify-content: space-between; list-style: none; margin: 0; padding: 0 2px; position: relative;
}
.history__ticks::before { content: ""; position: absolute; left: 0; right: 0; bottom: 15px; height: 1px; background: var(--line-2); }
.history__ticks li { position: relative; display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; }
.history__month {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.history__ticks li.is-first::before { content: ""; position: absolute; bottom: 10px; left: 50%; width: 1px; height: 22px; background: var(--line-2); }
.history__ticks li.is-first:not(:first-child) { margin-left: 14px; }
.history__month { left: 0; transform: translateX(10px); }
.history__ticks button {
  width: 100%; max-width: 30px; height: 30px; border: 0; padding: 0; border-radius: 50%;
  background: transparent; cursor: pointer; position: relative;
}
.history__ticks button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: #d3cbbd; transition: transform .35s var(--ease), background .35s, box-shadow .35s;
}
.history__ticks button:hover::after { background: var(--gold); transform: scale(1.3); }
.history__ticks button[aria-current="true"]::after { background: var(--gold-2); transform: scale(1.7); box-shadow: 0 0 0 4px rgba(242, 184, 75, .28); }

@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .hero__inner { align-items: flex-end; padding-bottom: max(24px, 3vh); padding-bottom: max(24px, 3svh); }
  .hero__copy { max-width: none; }
  .hero__copy .display { font-size: clamp(34px, 9.6vw, 48px); }
  .hero__copy .lede { font-size: 16px; margin-top: 14px; }
  .hero__cta { margin-top: 20px; }
  .eyebrow { margin-bottom: 14px; font-size: 12px; }
  .moment-anchor { left: 19%; width: 62%; top: calc(var(--nav-h) + 1.5vh); top: calc(var(--nav-h) + 1.5svh); height: 29vh; height: 29svh; }
  .moment-caption { left: 6%; width: 88%; top: calc(var(--nav-h) + 31vh); top: calc(var(--nav-h) + 31svh); }
  .moment-caption__title { font-size: 17px; }
  .moment-caption__place { display: none; }
  .history { left: var(--gutter); right: var(--gutter); bottom: auto; top: calc(var(--nav-h) + 31vh + 84px); top: calc(var(--nav-h) + 31svh + 84px); gap: 10px; }
  .history__month, .history__ticks li.is-first::before { display: none; }
  .history__ticks button { width: 14px; height: 22px; }
  .history__ticks button::after { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
  .history__ticks::before { bottom: 11px; }
  .history__toggle span { display: none; }
  .history__toggle { width: 30px; height: 26px; padding: 0; justify-content: center; }
}
@media (max-width: 900px) and (max-height: 760px) {
  .hero__copy .lede { display: none; }
}

/* ---------- story beats (one thought per screen) ---------- */
.beat {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 14vh 0;
  position: relative;
}
.beat--center { text-align: center; }
.beat--center .chapter-label { justify-content: center; }
.beat__line {
  font-family: var(--f-display);
  font-weight: 340;
  font-size: clamp(30px, 4.2vw, 62px);
  line-height: 1.14;
  letter-spacing: -0.018em;
  margin: 0 auto;
  max-width: 17em;
  color: var(--ink);
  text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
.beat__line--big { font-size: clamp(38px, 5.8vw, 88px); line-height: 1.04; letter-spacing: -0.025em; margin-top: 18px; }
.beat__sub {
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--muted);
  margin: 20px auto 0;
}
.beat__sub--left { margin: 0 0 18px; }
.beat--side .beat__copy { max-width: 640px; }
.beat--side .beat__line { margin: 0; }
.beat--side .beat__line + .beat__line { margin-top: 18px; }
.beat .prose { margin-top: 30px; }

/* meet Mark */
.meet__grid { display: grid; grid-template-columns: 300px minmax(0, 560px); gap: clamp(32px, 5vw, 64px); align-items: center; }
.portrait { margin: 0; width: 100%; position: relative; }
.portrait img { border-radius: var(--radius); width: 100%; }
.portrait::after {
  content: ""; position: absolute; inset: -1px; border-radius: calc(var(--radius) + 1px);
  border: 1px solid rgba(192, 125, 20, .3); pointer-events: none;
  box-shadow: 0 40px 80px -36px rgba(192, 125, 20, .55);
}
.facts {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.facts li { padding: 16px 16px 14px 0; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); }
.facts li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.facts__k { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.facts__v { font-family: var(--f-display); font-size: clamp(19px, 1.8vw, 24px); color: var(--ink); }
@media (max-width: 900px) {
  .meet__grid { grid-template-columns: 1fr; }
  .portrait { width: min(280px, 70%); }
}

/* ---------- projects ---------- */
.project__grid {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  min-height: min(84vh, 860px);
}
.project__copy { align-self: center; }
.answer {
  font-family: var(--f-display); font-style: italic; font-weight: 330;
  font-size: clamp(52px, 7.4vw, 112px); line-height: 1; letter-spacing: -0.03em;
  color: var(--gold); margin: 0 0 30px;
}
.paper {
  font-family: var(--f-display); font-style: italic;
  font-size: 18px; color: var(--muted);
  margin: -14px 0 24px; max-width: 32em;
}
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 13.5px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-2);
  background: rgba(255, 255, 255, .75);
}
.chip--gold { border-color: rgba(192, 125, 20, .45); color: var(--gold-ink); background: rgba(242, 184, 75, .14); }
.spec {
  justify-self: end; align-self: end;
  width: min(300px, 100%);
  padding: 20px 22px; border-radius: 14px;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.spec__title { margin: 0 0 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.spec dl { margin: 0; display: grid; gap: 10px; }
.spec dl div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; font-size: 14px; }
.spec dt { color: var(--faint); font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; padding-top: 2px; }
.spec dd { margin: 0; color: var(--ink-2); }
.spec__foot { margin: 14px 0 0; font-size: 12px; color: var(--faint); }
.details { padding-bottom: clamp(80px, 12vh, 140px); }
@media (max-width: 900px) {
  .project__grid { grid-template-columns: 1fr; min-height: 0; }
  .spec { justify-self: start; }
}

/* sensors + pipeline (mouse) */
.sensors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sensor {
  padding: 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sensor__k { margin: 0 0 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 10px; }
.sensor h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 450; font-size: 24px; }
.sensor p:last-child { margin: 0; color: var(--muted); font-size: 15.5px; }
.sensor b { color: var(--ink); font-weight: 600; }
.led { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.led--green { background: var(--green); box-shadow: 0 0 10px rgba(22, 160, 90, .6); }
.led--ember { background: var(--ember); box-shadow: 0 0 10px rgba(224, 102, 44, .6); }
.led--gold { background: var(--gold-2); box-shadow: 0 0 10px rgba(242, 184, 75, .8); }
.pipeline {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.pipeline li { padding: 20px 18px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.pipeline li + li { border-left: 1px solid var(--line); }
.pipeline li + li::before {
  content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px;
  border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  transform: translateY(-50%) rotate(45deg); background: var(--paper);
}
.pipeline span { font-family: var(--f-mono); font-size: 12px; color: var(--gold-ink); }
.pipeline b { font-size: 16px; font-weight: 600; }
.pipeline small { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.finding {
  margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center;
  padding: clamp(24px, 3vw, 40px); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(242, 184, 75, .16), rgba(255, 255, 255, .92) 55%);
  border: 1px solid rgba(192, 125, 20, .22);
  box-shadow: var(--shadow);
}
.finding h3 { margin: 0 0 14px; font-family: var(--f-display); font-weight: 420; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; }
.finding p { color: var(--ink-2); margin: 0 0 12px; }
.finding p.muted { color: var(--muted); font-size: 15px; margin: 0; }
.finding__chart { margin: 0; }
.finding__chart svg { width: 100%; height: auto; }
.finding__chart figcaption { margin-top: 8px; font-size: 12px; color: var(--faint); font-family: var(--f-mono); }
.ch-window { fill: rgba(242, 184, 75, .12); stroke: rgba(192, 125, 20, .4); stroke-dasharray: 4 4; }
.ch-hr, .ch-hrv, .ch-temp, .ch-noise { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ch-hr { stroke: var(--ink); }
.ch-hrv { stroke: var(--teal); }
.ch-temp { stroke: var(--ember); }
.ch-noise { stroke: rgba(22, 24, 29, .35); stroke-width: 1.6; }
.ch-base { stroke: var(--line-2); }
.ch-alert { fill: var(--gold-2); }
.ch-label { fill: var(--muted); font: 500 12px var(--f-mono); }
.ch-label--hrv { fill: var(--teal); }
.ch-label--temp { fill: var(--ember); }
.ch-label--alert { fill: var(--gold-ink); }
.ch-label--win { fill: var(--gold-ink); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
@media (max-width: 900px) {
  .sensors { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline li + li { border-left: 0; }
  .pipeline li { border-top: 1px solid var(--line); }
  .pipeline li:nth-child(-n+2) { border-top: 0; }
  .pipeline li:nth-child(even) { border-left: 1px solid var(--line); }
  .pipeline li + li::before { display: none; }
  .pipeline li:last-child { grid-column: 1 / -1; }
  .finding { grid-template-columns: 1fr; }
}

/* media blocks */
.media { margin: 0; }
.media img, .media video { width: 100%; border-radius: 14px; background: #efece6; }
.media figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.media__link { display: block; border-radius: 14px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.media__link img { transition: transform .6s var(--ease); }
.media__link:hover img { transform: scale(1.025); }
.media__video { position: relative; border-radius: 14px; overflow: hidden; background: #efece6; border: 1px solid var(--line); box-shadow: var(--shadow); }
.media__video video { border-radius: 0; aspect-ratio: 9 / 16; object-fit: cover; height: auto; }
.media__video--wide video { aspect-ratio: 16 / 9; object-fit: contain; background: #0d0e12; }
.media-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.media-row .media--portrait { max-width: 340px; }
@media (max-width: 900px) {
  .media-row { grid-template-columns: 1fr; }
  .media-row .media--portrait { max-width: 300px; }
}

/* Nexus flow + media */
.flow {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  counter-reset: step;
}
.flow li {
  padding: 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--muted); font-size: 15.5px; line-height: 1.5;
  counter-increment: step;
}
.flow li span {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--f-display); font-size: 26px; color: var(--ink); margin-bottom: 8px;
}
.flow li span::after { content: "0" counter(step); font-family: var(--f-mono); font-size: 12px; color: var(--gold-ink); }
.nexus-media { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.nexus-media__side { display: grid; gap: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr 1fr; }
  .nexus-media { grid-template-columns: 1fr; }
  .nexus-media > .media--portrait { max-width: 340px; }
}
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }

/* research */
.research .project__grid { align-items: center; }
.markers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; max-width: 600px; }
.markers article { padding: 20px; border-radius: 14px; background: rgba(255, 255, 255, .85); border: 1px solid rgba(15, 138, 127, .2); box-shadow: var(--shadow); }
.markers h3 { margin: 0 0 6px; font-family: var(--f-mono); font-weight: 500; font-size: 14px; letter-spacing: .06em; color: var(--teal); }
.markers p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.pull {
  margin: 40px 0 0;
  font-family: var(--f-display);
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  padding-left: 24px;
  border-left: 2px solid var(--gold-2);
  max-width: 28em;
  text-wrap: balance;
}
@media (max-width: 520px) { .markers { grid-template-columns: 1fr; } }

/* ---------- epilogue ---------- */
.vision { min-height: 110vh; min-height: 110svh; display: flex; align-items: center; }
.vision__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.vision .lede { margin-inline: auto; text-shadow: 0 0 24px #fff, 0 0 8px #fff; }
.vision .display { text-shadow: 0 0 40px #fff; }
.vision__last {
  margin: 40px auto 0; max-width: 18em;
  font-family: var(--f-display); font-style: italic; font-weight: 360;
  font-size: clamp(26px, 2.8vw, 40px); line-height: 1.2;
  color: var(--gold);
  text-shadow: 0 0 24px #fff;
  text-wrap: balance;
}

/* ---------- recognition ---------- */
.honors__feature { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honor {
  border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color .3s, transform .3s var(--ease);
}
.honor:hover { border-color: rgba(192, 125, 20, .35); }
.honor--photo { overflow: hidden; display: flex; flex-direction: column; }
.honor__img { display: block; overflow: hidden; }
.honor__img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .7s var(--ease); }
.honor__img img.honor__img--cert { object-position: 50% 40%; }
.honor__img:hover img { transform: scale(1.03); }
.honor__body { padding: 24px; }
.honor__meta { margin: 0 0 8px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.honor h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 450; font-size: 22px; line-height: 1.2; }
.honor p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.ledger { list-style: none; padding: 0; margin: 48px 0 0; border-top: 1px solid var(--line); }
.ledger li {
  display: grid; grid-template-columns: 120px minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: baseline;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
}
.ledger__when { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.ledger__what { font-family: var(--f-display); font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); }
.ledger__what b { color: var(--ink); font-weight: 500; }
.ledger__why { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .honors__feature { grid-template-columns: 1fr; }
  .ledger li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- London strip ---------- */
.strip {
  display: flex; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 40px max(var(--gutter), calc((100% - var(--maxw)) / 2)) 24px;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2));
  scrollbar-width: thin; scrollbar-color: rgba(192, 125, 20, .45) transparent;
  cursor: grab;
}
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging a { pointer-events: none; }
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: rgba(192, 125, 20, .4); border-radius: 6px; }
.strip__item { flex: 0 0 auto; margin: 0; scroll-snap-align: start; }
.strip__item a { display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); -webkit-user-drag: none; }
.strip__item img {
  height: clamp(260px, 42vh, 420px); width: auto; max-width: none;
  border-radius: 14px; object-fit: cover; background: #efece6;
  transition: transform .6s var(--ease);
  user-select: none; -webkit-user-drag: none;
}
.strip__item a:hover img { transform: scale(1.03); }
.strip__item figcaption { margin-top: 12px; max-width: 34ch; font-size: 14px; color: var(--muted); line-height: 1.45; }
.strip__item time { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 2px; }
.strip__nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

/* ---------- life ---------- */
.life__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.life-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.life-card__media { position: relative; display: block; overflow: hidden; background: #efece6; aspect-ratio: 4 / 5; }
.life-card--tall .life-card__media { aspect-ratio: 9 / 14; }
.life-card__media img, .life-card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
a.life-card__media:hover img { transform: scale(1.04); }
.life-card__body { padding: 18px 20px 22px; }
.life-card h3 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 450; font-size: 22px; }
.life-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.sound-btn {
  position: absolute; right: 12px; bottom: 12px;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .88); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sound-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-ink); }
@media (max-width: 1000px) { .life__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- contact ---------- */
.footer { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 0 40px; }
.footer__inner { text-align: center; display: flex; flex-direction: column; align-items: center; padding-top: 44vh; }
.footer__text { color: var(--ink-2); max-width: 30em; margin: 22px 0 30px; font-size: 18px; text-shadow: 0 0 20px #fff; }
.footer__meta { margin-top: clamp(64px, 10vh, 120px); color: var(--faint); font-size: 13px; font-family: var(--f-mono); letter-spacing: .04em; }

/* ---------- lightbox (dark, so photos stand out) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 24px;
  background: rgba(14, 15, 19, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade .25s ease;
  color: #f3efe6;
}
.lightbox[hidden] { display: none; }
.lightbox .round-btn { background: rgba(30, 32, 40, .8); border-color: rgba(243, 239, 230, .2); color: #f3efe6; }
.lightbox__figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; max-height: calc(100vh - 48px); }
.lightbox__figure img, .lightbox__figure video { max-width: 100%; max-height: calc(100vh - 120px); max-height: calc(100svh - 120px); width: auto; height: auto; border-radius: 12px; }
.lightbox__figure figcaption { margin-top: 14px; color: #d9d4c8; font-size: 15px; text-align: center; max-width: 60ch; }
.lightbox__close { position: absolute; top: 18px; right: 18px; }
.lightbox--video { grid-template-columns: 1fr; }
.lightbox--video .lightbox__figure { grid-column: 1; }
.lightbox--video video { background: #000; max-height: calc(100vh - 140px); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 700px) {
  .lightbox { grid-template-columns: 1fr; padding: 64px 12px 24px; }
  .lightbox__figure { grid-column: 1; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 18px; }
  .lightbox__prev { left: calc(50% - 56px); }
  .lightbox__next { left: calc(50% + 10px); }
  .lightbox__figure img { max-height: calc(100vh - 200px); max-height: calc(100svh - 200px); }
}

/* phones and portrait tablets: keep copy readable over the particles */
@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .chapter-label { flex-wrap: wrap; gap: 6px 14px; }
  .chapter-label b { white-space: nowrap; }
  .chapter-label b::after { width: 24px; }
  .project__copy, .beat__copy, .hero__copy, .beat--center .wrap, .meet__copy {
    text-shadow: 0 0 16px rgba(251, 250, 247, .95), 0 0 3px rgba(251, 250, 247, .9);
  }
}

/* =========================================================================
   How-it-works explainers: a pinned step list beside an anatomy figure.
   Figure finish after the "anatomy" method: solids in paper colour, thin
   lines, four side tones with a lighter top, one gold lit part.
   ========================================================================= */
.explainer { position: relative; height: calc(100vh + var(--steps, 4) * 72vh); height: calc(100svh + var(--steps, 4) * 72svh); }
.explainer__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--nav-h); overflow: hidden; }
.explainer__grid { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: center; }
.explainer__eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted);
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.explainer__eyebrow i { width: 10px; height: 10px; border: 1.5px solid var(--ink-2); border-radius: 50%; }
.explainer__title {
  font-family: var(--f-body); font-weight: 600; letter-spacing: -0.035em;
  font-size: clamp(30px, 3vw, 44px); line-height: 1.04; margin: 0 0 28px; color: var(--ink);
}
.explainer__title span { display: block; color: #a3a7ae; }
.explainer__bar { height: 2px; background: var(--line); }
.explainer__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.explainer__steps { list-style: none; margin: 0; padding: 0; }
.explainer__steps button {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: baseline;
  width: 100%; padding: 15px 0; border-bottom: 1px solid var(--line);
  color: #a9adb4; transition: color .3s ease;
}
.explainer__steps button:hover { color: var(--ink-2); }
.explainer__steps button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.explainer__steps button[aria-current="step"] { color: var(--ink); }
.explainer__steps .n { font-family: var(--f-mono); font-size: 12px; }
.explainer__steps .t { font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em; }
.explainer__steps .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.explainer__count { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 30px 0 10px; }
.explainer__count b { font-weight: 500; color: var(--ink); }
.explainer__panes { display: grid; }
.explainer__panes article { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s var(--ease); pointer-events: none; }
.explainer__panes article.is-on { opacity: 1; transform: none; pointer-events: auto; }
.explainer__panes h4 { font-family: var(--f-body); font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.03em; margin: 0 0 10px; color: var(--ink); }
.explainer__panes p { color: var(--ink-2); margin: 0; font-size: 15.5px; line-height: 1.65; max-width: 30em; }
.explainer__note { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; color: var(--faint); margin: 28px 0 0; }
.explainer__fig { position: relative; min-width: 0; }

/* the figure */
.iso {
  position: relative; outline: none; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  --iso-paper: #ffffff; --iso-top: #ffffff;
  --iso-s3: #f6f6f7; --iso-s2: #eeeff1; --iso-s1: #e5e6e9; --iso-s0: #d9dade;
  --iso-line: #3b3e46; --iso-crease: #b8bbc1; --iso-detail: #8d9199; --iso-groove: #cdd0d5;
}
.iso:focus-visible { outline: 1px solid var(--muted); outline-offset: 6px; border-radius: 12px; }
.iso.is-turning { cursor: grabbing; }
.iso-svg { display: block; width: 100%; height: auto; overflow: hidden; }
.iso-frame { overflow: hidden; border-radius: 14px; }
.iso-grid { fill: none; stroke: #cfd2d7; stroke-width: .8; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.iso-halo { pointer-events: none; }
.iso .s[data-tone="hi"] { --iso-s3: #fafafb; --iso-s2: #f3f3f5; --iso-s1: #eaebed; --iso-s0: #dfe0e3; }
.iso .s[data-tone="lo"] { --iso-top: #f4f4f5; --iso-s3: #ebebed; --iso-s2: #e2e3e5; --iso-s1: #d8d9dc; --iso-s0: #cdced2; }
.iso .s[data-tone="dark"] { --iso-paper: #2c2f35; --iso-top: #3b3f47; --iso-s3: #35383f; --iso-s2: #2f3238; --iso-s1: #292b31; --iso-s0: #232529; --iso-line: #16171b; --iso-crease: #5b606a; }
.iso .s[data-tone="glass"] { --iso-paper: #2a2d33; --iso-top: #31353c; --iso-s3: #2c2f35; --iso-s2: #282a30; --iso-s1: #24262b; --iso-s0: #202226; --iso-line: #16171b; --iso-crease: #4b5058; }
.iso .s[data-tone="lit"] { --iso-paper: #f6c453; --iso-top: #ffdb7d; --iso-s3: #f9ce61; --iso-s2: #f2bf49; --iso-s1: #e8ad36; --iso-s0: #d99c28; --iso-line: #6a4405; --iso-crease: #c18a1f; --iso-detail: #8a5c10; --iso-groove: #d7a23a; }
.iso .s path { transition: fill .5s ease, stroke .5s ease; }
.iso .s .f { fill: var(--iso-paper); }
.iso .s .t0 { fill: var(--iso-s0); stroke: var(--iso-s0); stroke-width: .35; }
.iso .s .t1 { fill: var(--iso-s1); stroke: var(--iso-s1); stroke-width: .35; }
.iso .s .t2 { fill: var(--iso-s2); stroke: var(--iso-s2); stroke-width: .35; }
.iso .s .t3 { fill: var(--iso-s3); stroke: var(--iso-s3); stroke-width: .35; }
.iso .s .tp { fill: var(--iso-top); stroke: var(--iso-top); stroke-width: .35; }
.iso .s .cr { fill: none; stroke: var(--iso-crease); stroke-width: .6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.iso .s .o { fill: none; stroke: var(--iso-line); stroke-width: .85; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.iso .dt-line { fill: none; stroke: var(--iso-detail); stroke-width: .6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.iso .dt-line.g { stroke: var(--iso-groove); }
.iso .dt-line.pin { stroke: #9a9fa7; stroke-width: .75; }
.iso .dt-fill { stroke: var(--iso-line); stroke-width: .6; vector-effect: non-scaling-stroke; }
.iso .dt-fill.glass { fill: #2b2e34; }
.iso .dt-fill.screen { fill: #24272d; }
.iso .dt-fill.mark { fill: #a2a7af; stroke: none; }
.iso .dt-dot { fill: var(--iso-detail); }
.iso .dt-dot.pin1 { fill: #9ca1a9; }
.iso .dt-screw .sh { fill: #eeeff1; stroke: #8d9199; stroke-width: .6; vector-effect: non-scaling-stroke; }
.iso .dt-screw .sl { fill: none; stroke: #5f646d; stroke-width: .9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.iso .dt-text text { font-family: var(--f-mono); fill: #a0a4ab; letter-spacing: .06em; }

/* little screens inside figures */
.iso .dt-ui text { font-family: var(--f-body); }
.iso .ui-hill { fill: #3b4049; }
.iso .ui-hill2 { fill: #31353d; }
.iso .ui-sun { fill: #f2b84b; opacity: .9; }
.iso .ui-live { fill: #e5484d; font-weight: 600; letter-spacing: .04em; }
.iso .ui-big { fill: #f4f2ec; font-weight: 600; letter-spacing: -.02em; }
.iso .ui-txt { fill: #e9e7e1; font-weight: 500; }
.iso .ui-dim { fill: #9aa0aa; }
.iso .ui-card { fill: #31353c; }
.iso .ui-panel { fill: #2d3036; }
.iso .ui-band { fill: rgba(242, 184, 75, .16); }
.iso .ui-trace { fill: none; stroke: #f2b84b; stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.iso .ui-bar { fill: #646b76; }
.iso .ui-bar--hi { fill: #f2b84b; }
.iso .ui-axis { stroke: #555b65; stroke-width: .6; vector-effect: non-scaling-stroke; }
.iso .ui-note { fill: #f2b84b; }
.iso .ui-note-t { fill: #1b1408; font-weight: 600; }

/* the callout: an accent card with a short lead that ends on a dot */
.iso-callout {
  position: absolute; left: 0; top: 0; z-index: 2; width: max-content; max-width: min(250px, 62%);
  padding: 13px 15px 14px; border-radius: 12px;
  background: #f8cd5e; color: #17181b; border: 1.5px solid #17181b; box-shadow: 4px 4px 0 #17181b;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.iso-callout.is-on { opacity: 1; }
.iso-callout p { margin: 0; }
.iso-callout__title { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; margin-bottom: 4px !important; }
.iso-callout__text { font-size: 13px; line-height: 1.45; color: #2a2b2f; }
.iso-callout__chip {
  display: inline-block; margin-top: 10px !important; padding: 5px 10px; border-radius: 999px;
  background: #17181b; color: #f8cd5e; font-family: var(--f-mono); font-size: 11px; letter-spacing: .03em;
}
.iso-lead { fill: none; stroke: #17181b; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.iso-lead-dot { fill: #17181b; }
.iso-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 4px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.iso-readout { color: var(--ink); text-align: right; }

@media (max-width: 900px) {
  .explainer { height: calc(100vh + var(--steps, 4) * 80vh); height: calc(100svh + var(--steps, 4) * 80svh); }
  .explainer__sticky { align-items: flex-start; padding-top: calc(var(--nav-h) + 6px); }
  .explainer__grid { grid-template-columns: 1fr; gap: 6px; }
  .explainer__fig { order: -1; }
  .explainer__eyebrow, .explainer__title, .explainer__bar, .explainer__note { display: none; }
  .explainer__steps { display: flex; gap: 6px; }
  .explainer__steps li { flex: 1; }
  .explainer__steps button { grid-template-columns: 1fr; padding: 8px 0 6px; border-bottom: 2px solid var(--line); text-align: center; }
  .explainer__steps button[aria-current="step"] { border-bottom-color: var(--ink); }
  .explainer__steps .t, .explainer__steps .k { display: none; }
  .explainer__count { margin: 14px 0 6px; }
  .explainer__panes h4 { font-size: 21px; }
  .explainer__panes p { font-size: 15px; }
  .iso-callout { display: none; }
  .iso-lead, .iso-lead-dot { display: none; }
  .iso-frame { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; }
  /* a little larger than the card and centred (the global svg max-width would otherwise cap it and leave it off-centre) */
  .iso-frame .iso-svg { width: 116%; max-width: none; margin: -4% -8% -2%; }
  .iso-foot { font-size: 10.5px; gap: 10px; }
  .iso-hint { white-space: nowrap; }
}

/* Keep the pinned panel inside short viewports: laptops with browser toolbars,
   short portrait phones and phones held sideways. The figure is capped by
   width (800:620 plus its footer) so the callout maths in iso.js still holds. */
@media (min-width: 901px) {
  .explainer__fig {
    width: 100%; justify-self: center;
    max-width: calc((100vh - var(--nav-h) - 56px) * 1.29);
    max-width: calc((100svh - var(--nav-h) - 56px) * 1.29);
  }
}
@media (min-width: 901px) and (max-height: 760px) {
  .explainer__eyebrow, .explainer__note { display: none; }
  .explainer__title { font-size: clamp(26px, 2.4vw, 34px); margin-bottom: 16px; }
  .explainer__steps button { padding: 10px 0; }
  .explainer__count { margin: 16px 0 8px; }
}
@media (max-width: 900px) and (max-height: 680px) and (orientation: portrait) {
  .iso-frame .iso-svg { width: 90%; margin: -4% auto -3%; }
  .explainer__count { margin: 10px 0 4px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .explainer__sticky { align-items: center; padding-top: var(--nav-h); }
  .explainer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
  .explainer__fig {
    order: 0; width: 100%; justify-self: center;
    max-width: calc((100vh - var(--nav-h) - 36px) * 1.29);
    max-width: calc((100svh - var(--nav-h) - 36px) * 1.29);
  }
  .explainer__eyebrow, .explainer__title, .explainer__bar, .explainer__note { display: none; }
  .explainer__steps { display: flex; gap: 6px; }
  .explainer__steps li { flex: 1; }
  .explainer__steps button { grid-template-columns: 1fr; padding: 6px 0 5px; border-bottom: 2px solid var(--line); text-align: center; }
  .explainer__steps button[aria-current="step"] { border-bottom-color: var(--ink); }
  .explainer__steps .t, .explainer__steps .k { display: none; }
  .explainer__count { margin: 10px 0 4px; }
  .explainer__panes h4 { font-size: 19px; margin-bottom: 6px; }
  .explainer__panes p { font-size: 14px; line-height: 1.55; }
  .iso-callout, .iso-lead, .iso-lead-dot { display: none; }
  .iso-frame { margin: 0; border-radius: 14px; }
  .iso-frame .iso-svg { width: 100%; margin: 0; }
  .iso-foot { font-size: 10.5px; gap: 10px; }
}

/* figure 2: mouse decals, LEDs and the dashboard */
.iso .s[data-tone="green"] { --iso-paper: #4fcf86; --iso-top: #8fe8b4; --iso-s3: #6fdc9c; --iso-s2: #56cf88; --iso-s1: #43bf76; --iso-s0: #35ad67; --iso-line: #1d5e38; --iso-crease: #2f8a55; }
.iso .s[data-tone="red"] { --iso-paper: #e5484d; --iso-top: #f47478; --iso-s3: #ee5b60; --iso-s2: #e44d52; --iso-s1: #d63f45; --iso-s0: #c4353a; --iso-line: #6e1417; --iso-crease: #a8282d; }
.iso .dt-fill.led { fill: #34c477; stroke: none; }
.iso .dt-fill.pd { fill: #4a4f58; stroke: none; }
.iso .dt-fill.wheel { fill: #c4c7cd; stroke: none; }
.iso .dt-fill.pad { fill: #efede9; stroke: #cdc9c1; transition: fill .5s ease, stroke .5s ease; }
.iso .dt-fill.key { fill: #f1f2f4; stroke: #c6c9cf; }
.iso .dt-fill.track { fill: #f5f6f7; stroke: #c6c9cf; }
.iso[data-stage="1"] .dt-fill.led { animation: iso-led .83s ease-in-out infinite; }
.iso[data-stage="2"] .dt-fill.pad { fill: #f8cd5e; stroke: #b98118; }
@keyframes iso-led { 0%, 100% { fill: #34c477; } 18% { fill: #9dffc8; } }
.iso .ui-trace--green { stroke: #4ade80; }
.iso .ui-trace--ember { stroke: #ff9a5c; }
.iso .ui-trace--teal { stroke: #5fe0cf; }
.iso .ui-alert { fill: #3a3e46; transition: fill .3s ease; }
.iso .ui-alert.is-on { fill: #f2b84b; }
.iso .ui-alert-t { fill: #c9ccd2; font-weight: 600; }
.iso .ui-alert-t.is-on { fill: #1b1408; }
@media (prefers-reduced-motion: reduce) { .iso[data-stage="1"] .dt-fill.led { animation: none; fill: #7af0ad; } }

/* figure 3: foods, the camera's view and the app */
.iso .s[data-tone="rice"] { --iso-top: #ffffff; --iso-s3: #fbfaf7; --iso-s2: #f4f2ec; --iso-s1: #ebe8e0; --iso-s0: #e0dcd2; --iso-line: #7d7869; }
.iso .s[data-tone="yolk"] { --iso-paper: #f5cf73; --iso-top: #fbdc8c; --iso-s3: #f7d27a; --iso-s2: #f0c463; --iso-s1: #e7b54f; --iso-s0: #d9a33d; --iso-line: #8a5f12; }
.iso .s[data-tone="kimchi"] { --iso-paper: #e3866e; --iso-top: #f0a089; --iso-s3: #e8907a; --iso-s2: #df826b; --iso-s1: #d3745e; --iso-s0: #c46652; --iso-line: #7a3424; --iso-crease: #b0604f; }
.iso .s[data-tone="greens"] { --iso-paper: #9cc58a; --iso-top: #b7d9a6; --iso-s3: #a8cf96; --iso-s2: #9bc489; --iso-s1: #8db87b; --iso-s0: #7fa96d; --iso-line: #3d5a31; }
.iso .dt-fill.soup { fill: #c98b55; stroke: #8f5a2c; }
.iso .dt-fill.soupHi { fill: #dba16c; stroke: none; }
.iso .iso-see { transition: opacity .4s ease; pointer-events: none; }
.iso .see-cone { fill: none; stroke: #c98a10; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.iso .see-box path { fill: rgba(248, 205, 94, .18); stroke: #c98a10; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.iso .see-box rect { fill: #17181b; }
.iso .see-box text { fill: #f8cd5e; font-family: var(--f-mono); font-size: 10px; letter-spacing: .02em; }
.iso .ui-mic { fill: #f2b84b; }
.iso .ui-mic-i { fill: #1b1408; }
.iso .ui-det { fill: rgba(242, 184, 75, .14); stroke: #f2b84b; stroke-width: .8; vector-effect: non-scaling-stroke; }
.iso .ui-det-t { fill: #f2b84b; font-weight: 600; }
.iso .ui-ok { fill: #2f9e62; }
.iso .ui-ok-t { fill: #ffffff; font-weight: 700; letter-spacing: .06em; }
.iso .ui-track { fill: #3a3e46; }
.iso .ui-stop { fill: #e5484d; }
.iso .ui-stop-t { fill: #ffffff; font-weight: 700; letter-spacing: .08em; }

/* figure 4: blood, plasma, wells and cfDNA */
.iso .s[data-tone="blood"] { --iso-paper: #b4343d; --iso-top: #c9474f; --iso-s3: #bf3e47; --iso-s2: #b2363f; --iso-s1: #a42f38; --iso-s0: #942a32; --iso-line: #5a1419; --iso-crease: #8d2a31; }
.iso .s[data-tone="plasma"] { --iso-paper: #f3df9e; --iso-top: #f8e9b6; --iso-s3: #f5e3a6; --iso-s2: #efd994; --iso-s1: #e7cd82; --iso-s0: #dcc070; --iso-line: #8b7431; --iso-crease: #c6ad5d; }
.iso .s[data-tone="glass"] { --iso-paper: #eef2f5; --iso-top: #f7f9fb; --iso-s3: #f1f4f7; --iso-s2: #e9edf1; --iso-s1: #e1e6eb; --iso-s0: #d7dde3; --iso-line: #7a8592; --iso-crease: #c2cad3; }
.iso .dt-line.well { stroke: #b3b7be; }
.iso .dt-fill.hit { fill: #f2b84b; stroke: none; opacity: 0; transition: opacity .6s ease; }
.iso[data-stage="2"] .dt-fill.hit, .iso[data-stage="3"] .dt-fill.hit { opacity: 1; }
.iso[data-stage="2"] .dt-fill.hit { fill: #8a4e06; }
.iso .iso-dna { transition: opacity .4s ease; pointer-events: none; }
.iso .dna-a { fill: none; stroke: #0f8a7f; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.iso .dna-b { fill: none; stroke: #c07d14; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.iso .dna-r { fill: none; stroke: #9aa0a8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.iso .ui-bar--teal { fill: #5fe0cf; }

.iso-over { pointer-events: none; }
