/* Mia LaPlace · "Look closer" */
:root {
  --paper: #FBFAF7;
  --paper-2: #F2F0EA;
  --ink: #0E1113;
  --ink-2: #3A3F44;
  --mute: #7C8187;
  --faint: #C9CBCC;
  --line: rgba(14, 17, 19, .09);
  --teal: #1F9E90;
  --teal-deep: #137268;
  --teal-dim: rgba(31, 158, 144, .12);
  --violet: #6B3FA0;
  --night: #07090A;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(5rem, 11vw, 10rem);
  --wrap: min(1180px, 100% - 2 * clamp(1rem, 4vw, 2.5rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.container { width: var(--wrap); margin-inline: auto; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 99px; transition: top .2s; }
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.6rem; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: .98rem; text-decoration: none; letter-spacing: -.01em;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(14,17,19,.45); }
.btn:active { transform: scale(.97); }
.btn-sm { padding: .55rem 1.05rem; font-size: .85rem; }
.btn-accent { background: var(--teal); color: #fff; }
.btn-accent:hover { background: #22B0A0; box-shadow: 0 14px 40px -12px rgba(31,158,144,.7); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn-ghost-light:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.link-btn {
  margin-top: 1.1rem; background: none; border: 0; padding: 0;
  color: var(--teal-deep); font-weight: 600; font-size: 1rem;
  border-bottom: 1.5px solid currentColor;
  transition: color .2s, gap .2s;
}
.link-btn span { display: inline-block; transition: transform .25s var(--ease); }
.link-btn:hover span { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: 60px; padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: background-color .35s, box-shadow .35s, color .35s;
}
.nav.scrolled {
  background: rgba(251, 250, 247, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.on-dark { color: #fff; }
.nav.on-dark .btn-sm { background: #fff; color: var(--ink); }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--paper) 0 30%, var(--teal) 32%); box-shadow: 0 0 0 1px var(--teal-dim); }
.nav-links { display: none; gap: 2rem; font-size: .9rem; }
.nav-links a { text-decoration: none; opacity: .72; transition: opacity .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--teal); }
@media (min-width: 760px) { .nav-links { display: flex; } }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-deep); margin-bottom: 1.1rem;
}

/* ---------- Hero ---------- */
.hero { height: 280vh; position: relative; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.hero-copy {
  position: absolute; top: clamp(5.5rem, 14vh, 9rem); left: 0; right: 0;
  text-align: center; padding-inline: 1rem;
  will-change: transform, opacity;
}
.hero-title { font-size: clamp(4rem, min(15vw, 20vh), 12.5rem); line-height: .86; letter-spacing: -.055em; font-weight: 600; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-title .serif-i { letter-spacing: -.035em; color: var(--teal-deep); }
.hero-sub { margin-top: 1.4rem; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--ink-2); line-height: 1.5; }

.lens-wrap {
  position: absolute; left: 50%; top: 82%;
  width: clamp(110px, min(36vw, 19vh), 240px); aspect-ratio: 1;
  translate: -50% -50%;
  will-change: transform;
}
.lens {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  transform: scale(var(--s, 1)); will-change: transform;
  box-shadow: 0 30px 80px -20px rgba(19, 114, 104, .55), 0 0 0 1px rgba(14,17,19,.08);
  background: #0b2b27;
}
.lens img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zi, 1.08)) rotate(var(--rot, 0deg)); }
.lens-shade { position: absolute; inset: 0; background: radial-gradient(circle, rgba(7,9,10,.2) 0%, rgba(7,9,10,.55) 70%); opacity: var(--shade, 0); }
.lens-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 1px solid rgba(14,17,19,.14);
  opacity: var(--ring, 1);
}
.lens-ring::before, .lens-ring::after {
  content: ""; position: absolute; width: 9px; height: 1px; background: rgba(14,17,19,.35); top: 50%;
}
.lens-ring::before { left: -16px; } .lens-ring::after { right: -16px; }

.hero-overlay {
  position: absolute; inset: auto 0 auto 0; top: 50%; translate: 0 -50%;
  text-align: center; color: #fff; padding-inline: 1.25rem;
  font-size: clamp(2.2rem, 6.4vw, 5.6rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.02;
  opacity: 0; pointer-events: none;
  text-shadow: 0 2px 40px rgba(0,0,0,.35);
}
.hero-overlay br { display: none; }
@media (min-width: 700px) { .hero-overlay br { display: inline; } }
@media (max-width: 600px) { .lens-wrap { top: 70%; } }
.hero-overlay small { display: block; margin-top: 1.5rem; font-size: .9rem; font-weight: 400; letter-spacing: .01em; opacity: .75; text-shadow: none; }

.scroll-cue {
  position: absolute; bottom: 1.6rem; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--mute); letter-spacing: .04em;
}
.scroll-cue span { width: 18px; height: 28px; border-radius: 10px; border: 1.5px solid var(--faint); position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--teal); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(9px); opacity: 0 } 100% { opacity: 0 } }

.reveal-load { opacity: 0; transform: translateY(0.5em); animation: rise 1.1s var(--ease-out) forwards; animation-delay: calc(.15s + var(--i) * .12s); }
.hero-title .reveal-load { transform: translateY(105%); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Scroll reveal ---------- */
[data-animate] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-animate="slide-left"] { transform: translateX(-48px); }
[data-animate="slide-right"] { transform: translateX(48px); }
[data-animate].in { opacity: 1; transform: none; }

/* ---------- Proof ---------- */
.proof { padding: clamp(4rem, 8vw, 6.5rem) 0; border-bottom: 1px solid var(--line); }
.proof-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
@media (min-width: 900px) { .proof-grid { grid-template-columns: repeat(4, 1fr); } }
.stat .num { display: block; font-size: clamp(3rem, 6.5vw, 5.2rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(odd) .num { color: var(--ink); }
.stat:nth-child(even) .num { color: var(--teal-deep); }
.stat span { display: block; margin-top: .75rem; font-size: .92rem; color: var(--mute); line-height: 1.45; }

/* ---------- Quote ---------- */
.quote { padding: var(--pad) 0; }
.quote-text {
  font-family: var(--serif); font-size: clamp(2.3rem, 5.8vw, 5rem); line-height: 1.06; letter-spacing: -.02em;
  max-width: 17ch;
}
.quote-text .w { color: var(--faint); transition: color .35s var(--ease); }
.quote-text .w.on { color: var(--ink); }
.quote-text .w.hl.on { color: var(--teal-deep); font-style: italic; }
.quote-by { margin-top: 2rem; color: var(--mute); font-size: .95rem; }
.quote-by::before { content: ""; display: inline-block; width: 2rem; height: 1px; background: var(--teal); vertical-align: middle; margin-right: .8rem; }

/* ---------- Section heads ---------- */
.sec-head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.sec-head h2 { font-size: clamp(2.5rem, 6vw, 4.9rem); }
.sec-head .serif-i { color: var(--teal-deep); }
.lede { margin-top: 1.4rem; font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--ink-2); line-height: 1.55; max-width: 38rem; }
.sec-head.light h2 { color: #fff; }
.sec-head.light .serif-i { color: #6FD8CB; }
.sec-head.light .lede { color: rgba(255,255,255,.66); }
.sec-head.light .eyebrow { color: #6FD8CB; }

/* ---------- Research story ---------- */
.research { padding: var(--pad) 0; background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.story { display: grid; gap: 2.5rem; }
@media (min-width: 960px) {
  .story { grid-template-columns: 1.08fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .story-media { position: sticky; top: 14vh; }
}
.poster-card { margin: 0; }
.poster-btn {
  display: block; width: 100%; padding: 0; border: 0; background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(14,17,19,.05), 0 30px 60px -30px rgba(14,17,19,.35), 0 12px 24px -16px rgba(19,114,104,.3);
  transform: perspective(1200px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) scale(var(--ps, 1));
  transition: transform .5s var(--ease-out);
  cursor: zoom-in;
}
.poster-btn img { width: 100%; }
.poster-card figcaption { margin-top: .9rem; font-size: .85rem; color: var(--mute); text-align: center; }
.story-progress { margin-top: 1.4rem; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; display: none; }
.story-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--teal), var(--violet)); transform-origin: left; transform: scaleX(var(--p, 0)); }
@media (min-width: 960px) { .story-progress { display: block; } }

.story-steps { display: grid; gap: 1.2rem; }
.step {
  padding: 2rem; border-radius: 22px; background: #fff; border: 1px solid var(--line);
  transition: opacity .5s var(--ease), transform .5s var(--ease), box-shadow .5s;
}
@media (min-width: 960px) {
  .story-steps { gap: 0; padding-block: 12vh 30vh; }
  .step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; background: transparent; border: 0; padding: 0 0 0 2rem; border-left: 2px solid var(--line); opacity: .28; }
  .step.active { opacity: 1; border-left-color: var(--teal); }
}
.step-n { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
.step h3 { margin: .9rem 0 1rem; font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.step p { color: var(--ink-2); font-size: 1.08rem; max-width: 32rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.tags li { font-size: .82rem; font-weight: 600; padding: .4rem .85rem; border-radius: 99px; background: var(--teal-dim); color: var(--teal-deep); }

/* ---------- Bench ---------- */
.bench { padding: var(--pad) 0; }
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 700px) { .tech-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1040px) { .tech-grid { grid-template-columns: repeat(4, 1fr); } }
.tech-grid li { perspective: 1000px; }
.tech {
  position: relative; width: 100%; aspect-ratio: 1 / .82; border: 0; padding: 0; background: none;
  transform-style: preserve-3d; transition: transform .7s var(--ease-out);
  text-align: left;
  opacity: 0; translate: 0 30px;
}
.tech.in { opacity: 1; translate: 0 0; transition: transform .7s var(--ease-out), opacity .7s var(--ease), translate .7s var(--ease); transition-delay: 0s, var(--d, 0s), var(--d, 0s); }
.tech[aria-pressed="true"] { transform: rotateY(180deg); }
.tech-front, .tech-back {
  position: absolute; inset: 0; border-radius: 20px; padding: 1.25rem;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.tech-front {
  background: #fff; border: 1px solid var(--line);
  font-size: clamp(1.05rem, 2vw, 1.45rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.12;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
  overflow: hidden;
}
.tech-front::after {
  content: ""; position: absolute; right: -30%; top: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--teal-dim), transparent 70%);
  transition: transform .6s var(--ease-out);
}
.tech:hover .tech-front { border-color: rgba(31,158,144,.4); box-shadow: 0 20px 40px -24px rgba(19,114,104,.45); }
.tech:hover .tech-front::after { transform: scale(1.6); }
.tech-front i { font-style: normal; font-size: .78rem; font-weight: 600; color: var(--mute); letter-spacing: .08em; }
.tech-back {
  transform: rotateY(180deg); background: var(--ink); color: rgba(255,255,255,.9);
  font-size: clamp(.9rem, 1.5vw, 1.02rem); line-height: 1.45; justify-content: flex-end;
}
.tech-grid li:nth-child(3n+2) .tech-back { background: var(--teal-deep); }
.tech-grid li:nth-child(4n) .tech-back { background: var(--violet); }
.bench-note { margin-top: 2.5rem; color: var(--mute); max-width: 44rem; }

/* ---------- Under the lens (dark) ---------- */
.lens-sec { padding: var(--pad) 0; background: var(--night); color: #fff; position: relative; overflow: hidden; }
.lens-sec::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 80%;
  background: radial-gradient(ellipse at 30% 30%, rgba(31,158,144,.18), transparent 60%), radial-gradient(ellipse at 80% 60%, rgba(107,63,160,.18), transparent 55%);
  pointer-events: none;
}
.slides-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem) 1rem; position: relative; }
@media (min-width: 960px) { .slides-row { grid-template-columns: repeat(4, 1fr); } }
.slide { margin: 0; }
.slide:nth-child(even) { margin-top: clamp(0rem, 6vw, 5rem); }
.loupe-host {
  position: relative; border-radius: 50%; overflow: hidden; aspect-ratio: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 30px 70px -20px rgba(0,0,0,.9);
  transform: rotate(var(--spin, 0deg));
  cursor: crosshair;
}
.loupe-host img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.slide:hover .loupe-host img { transform: scale(1.04); }
.slide figcaption { margin-top: 1.2rem; text-align: center; }
.slide figcaption b { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.slide figcaption span { display: block; font-size: .88rem; color: rgba(255,255,255,.55); margin-top: .2rem; }

.loupe {
  position: fixed; z-index: 60; left: 0; top: 0; width: 190px; height: 190px; border-radius: 50%;
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(var(--lr, 0deg));
  transition: opacity .2s, transform .25s var(--ease-out);
  background-repeat: no-repeat; background-color: #000;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(0,0,0,.4), 0 20px 50px rgba(0,0,0,.6);
}
.loupe.show { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(var(--lr, 0deg)); }

/* ---------- Paper ---------- */
.paper { padding: var(--pad) 0; overflow: hidden; }
.paper-grid { display: grid; gap: 3.5rem; align-items: center; }
@media (min-width: 900px) { .paper-grid { grid-template-columns: .9fr 1.1fr; gap: 6rem; } }
.paper-doc { display: grid; place-items: center; padding: 2rem 0; }
.doc-page {
  width: min(360px, 82%); aspect-ratio: 8.5 / 11; background: #fff; border-radius: 10px; padding: 2rem 1.8rem;
  display: flex; flex-direction: column; gap: .7rem;
  box-shadow: 0 50px 80px -40px rgba(14,17,19,.45), 0 0 0 1px var(--line), 18px 18px 0 -1px var(--paper-2), 18px 18px 0 0 var(--line), 36px 36px 0 -1px var(--paper-2), 36px 36px 0 0 var(--line);
  transform: rotate(-4deg);
  transition: transform .8s var(--ease-out);
}
.paper-doc:hover .doc-page { transform: rotate(-1deg) translateY(-6px); }
.doc-tag { align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); background: rgba(107,63,160,.1); padding: .3rem .6rem; border-radius: 5px; margin-bottom: .4rem; }
.doc-line { height: 8px; border-radius: 4px; background: var(--paper-2); width: 100%; }
.doc-line.w90 { width: 90%; height: 14px; background: var(--ink); opacity: .85; }
.doc-line.w70 { width: 70%; height: 14px; background: var(--ink); opacity: .85; }
.doc-line.w80 { width: 80%; } .doc-line.w60 { width: 60%; }
.doc-gap { height: .5rem; }
.doc-chart { display: flex; align-items: flex-end; gap: 8%; height: 26%; padding: .6rem; border-radius: 6px; background: var(--paper); margin: .3rem 0; }
.doc-chart i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--teal), var(--teal-deep)); transform-origin: bottom; transform: scaleY(0); transition: transform 1.2s var(--ease-out); }
.doc-chart i:nth-child(even) { background: linear-gradient(180deg, #8A62BF, var(--violet)); }
.paper-doc.in .doc-chart i { transform: scaleY(1); }
.paper-doc.in .doc-chart i:nth-child(2) { transition-delay: .1s } .paper-doc.in .doc-chart i:nth-child(3) { transition-delay: .2s }
.paper-doc.in .doc-chart i:nth-child(4) { transition-delay: .3s } .paper-doc.in .doc-chart i:nth-child(5) { transition-delay: .4s }
.paper-copy h2 { font-size: clamp(2.3rem, 5vw, 4rem); }
.paper-copy h2 .serif-i { color: var(--violet); }
.paper-copy .paper-title { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink); line-height: 1.35; }
.paper-copy > p { margin-top: 1.4rem; font-size: 1.12rem; color: var(--ink-2); max-width: 34rem; }
.checks { margin: 1.8rem 0 2.2rem; display: grid; gap: .7rem; }
.checks li { display: flex; gap: .8rem; align-items: baseline; }
.checks li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); translate: 0 -1px; box-shadow: 0 0 0 4px rgba(107,63,160,.12); }

/* ---------- Education ---------- */
.edu { padding: var(--pad) 0; background: var(--paper-2); }
.timeline { position: relative; padding-left: clamp(1.5rem, 4vw, 3rem); }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 0; top: .6rem; bottom: .6rem; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--line); }
.timeline::after { background: linear-gradient(180deg, var(--teal), var(--violet)); transform-origin: top; transform: scaleY(var(--tl, 0)); }
.tl-item { position: relative; display: grid; gap: .6rem 3rem; padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.tl-item:last-child { padding-bottom: 0; }
@media (min-width: 800px) { .tl-item { grid-template-columns: 8rem 1fr; } }
.tl-item::before {
  content: ""; position: absolute; left: calc(-1 * clamp(1.5rem, 4vw, 3rem) - 6px); top: .55rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--teal); z-index: 1;
}
.tl-when { font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: 1; color: var(--teal-deep); }
.tl-body h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.tl-sub { margin-top: .5rem; color: var(--ink-2); }
.tl-sub b { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chips li { font-size: .85rem; padding: .42rem .9rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); }
.chips li:hover { border-color: var(--teal); transform: translateY(-2px); }

/* ---------- About / bento ---------- */
.about { padding: var(--pad) 0; }
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(180px, auto); }
  .b-canopy { grid-column: 1 / 3; grid-row: 1 / 4; }
  .b-video { grid-column: 3 / 7; grid-row: 1 / 3; }
  .b-succ { grid-column: 3 / 5; grid-row: 3 / 5; }
  .b-traits { grid-column: 5 / 7; grid-row: 3 / 4; }
  .b-vol { grid-column: 5 / 7; grid-row: 4 / 5; }
  .b-canopy + * { min-height: 0; }
}
.b-tile { margin: 0; border-radius: 24px; overflow: hidden; position: relative; background: #fff; border: 1px solid var(--line); }
.b-canopy, .b-succ { min-height: 320px; background: var(--ink); border: 0; }
@media (min-width: 720px) { .b-canopy { grid-row: 1 / 5; } }
.b-canopy img, .b-succ img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; transform: translateY(var(--py, 0px)); will-change: transform; }
.b-tile figcaption { position: absolute; left: 1rem; bottom: 1rem; font-size: .8rem; font-weight: 600; color: #fff; background: rgba(14,17,19,.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: .4rem .8rem; border-radius: 99px; }
.b-video { background: var(--night); border: 0; display: flex; flex-direction: column; }
.video-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b-cap { padding: 1rem 1.3rem 1.2rem; color: rgba(255,255,255,.7); font-size: .95rem; }
.b-cap b { color: #fff; }
.b-traits, .b-vol { padding: 1.6rem; display: flex; flex-direction: column; justify-content: flex-end; }
.b-traits .eyebrow, .b-vol .eyebrow { margin-bottom: .8rem; }
.traits { display: flex; flex-wrap: wrap; gap: .45rem; }
.traits li { font-size: .9rem; font-weight: 600; padding: .38rem .8rem; border-radius: 99px; background: var(--teal-dim); color: var(--teal-deep); }
.traits li:nth-child(even) { background: rgba(107,63,160,.1); color: var(--violet); }
.b-vol { background: var(--ink); color: #fff; border: 0; }
.b-vol .eyebrow { color: #6FD8CB; }
.b-vol h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.b-vol p { color: rgba(255,255,255,.65); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact { position: relative; background: var(--night); color: #fff; overflow: hidden; padding-top: clamp(7rem, 16vw, 13rem); }
.contact-glow {
  position: absolute; left: 50%; top: 42%; width: 120vmin; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,158,144,.35), rgba(107,63,160,.12) 45%, transparent 70%);
  filter: blur(10px);
  transform: scale(var(--g, .6)); opacity: var(--go, .4);
}
.contact-inner { position: relative; text-align: center; }
.contact .eyebrow { color: #6FD8CB; }
.contact h2 { font-size: clamp(4rem, 14vw, 11rem); letter-spacing: -.06em; line-height: .9; }
.contact h2 .serif-i { color: #6FD8CB; }
.contact-lede { margin: 1.8rem auto 0; max-width: 34rem; font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: rgba(255,255,255,.7); }
.contact-actions { margin-top: 2.6rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.copied { min-height: 1.5rem; margin-top: 1rem; font-size: .9rem; color: #6FD8CB; }
.foot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: clamp(5rem, 10vw, 8rem) 0 2rem; font-size: .82rem; color: rgba(255,255,255,.4); }

/* ---------- Modal ---------- */
.modal {
  width: min(1100px, 94vw); height: min(86vh, 900px); padding: 0; border: 0; border-radius: 20px;
  background: #fff; color: var(--ink); overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
}
.modal[open] { display: flex; flex-direction: column; animation: pop .45s var(--ease-out); }
.modal::backdrop { background: rgba(7,9,10,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.modal-bar { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem .8rem 1.4rem; border-bottom: 1px solid var(--line); }
.modal-title { font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-open { font-size: .88rem; color: var(--teal-deep); text-decoration: none; font-weight: 600; white-space: nowrap; }
.modal-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--paper-2); font-size: 1.4rem; line-height: 1; transition: background-color .2s, transform .2s; }
.modal-x:hover { background: var(--faint); transform: rotate(90deg); }
.modal-body { flex: 1; position: relative; background: var(--paper-2); overflow: auto; }
.modal-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.modal-body img { width: 100%; height: auto; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-animate], .tech { opacity: 1; transform: none; translate: none; }
  .hero { height: auto; }
  .hero-stage { position: relative; min-height: 100svh; }
  .lens-wrap { top: 76%; }
  .quote-text .w { color: var(--ink); }
}
@media (max-height: 760px) { .scroll-cue { display: none; } }

/* ---------- Lab notebook (coursework explorer) ---------- */
.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; }
table.sr-only { table-layout: fixed; border-spacing: 0; } /* tables grow to fit content, ignoring width: 1px */
table.sr-only caption { white-space: normal; } /* a nowrap caption sets the table's minimum width */
.notebook { padding: var(--pad) 0; background: var(--paper); }
.nb-tabs {
  display: flex; gap: .35rem; padding: .35rem; margin-bottom: 2rem;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  position: sticky; top: 68px; z-index: 5;
  box-shadow: 0 10px 30px -18px rgba(14,17,19,.25);
}
.nb-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .nb-tabs { display: inline-flex; max-width: 100%; } }
/* laptop widths: drop the course codes so all six tabs fit without scrolling (each panel's header still names the code) */
@media (min-width: 900px) and (max-width: 1239px) {
  .nb-tab { padding-inline: .85rem; }
  .nb-tab small { display: none; }
}
.nb-tab {
  flex: none; border: 0; background: transparent; padding: .6rem 1.1rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s, box-shadow .3s;
}
.nb-tab small { font-weight: 500; color: var(--mute); margin-left: .35rem; }
.nb-tab:hover { color: var(--ink); }
.nb-tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(14,17,19,.08), 0 6px 16px -8px rgba(14,17,19,.25); }
.nb-tab[aria-selected="true"] small { color: var(--teal-deep); }
.nb-panel:focus-visible { outline-offset: 8px; }
.nb-panel.enter .nb-card { animation: nbIn .7s var(--ease-out) both; }
.nb-panel.enter .nb-card:nth-child(2) { animation-delay: .06s } .nb-panel.enter .nb-card:nth-child(3) { animation-delay: .12s } .nb-panel.enter .nb-card:nth-child(4) { animation-delay: .18s }
@keyframes nbIn { from { opacity: 0; transform: translateY(22px); } }
.nb-meta { font-size: .92rem; color: var(--mute); margin-bottom: 1.6rem; max-width: 60rem; }
.nb-meta b { color: var(--ink); font-weight: 600; }
.nb-grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .nb-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; } .nb-wide { grid-column: 1 / -1; } }
.nb-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  display: grid; transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.nb-card:hover { box-shadow: 0 30px 60px -36px rgba(19,114,104,.45); transform: translateY(-3px); }
@media (min-width: 900px) {
  .nb-wide { grid-template-columns: 1.05fr 1fr; } .nb-wide .nb-viz { border-bottom: 0; border-right: 1px solid var(--line); }
  /* one wide card + three regular leaves the last alone in its row: give it the wide layout too */
  .nb-grid > .nb-card:not(.nb-wide):last-child:nth-child(even) { grid-column: 1 / -1; grid-template-columns: 1.05fr 1fr; }
  .nb-grid > .nb-card:not(.nb-wide):last-child:nth-child(even) .nb-viz { border-bottom: 0; border-right: 1px solid var(--line); }
  /* two charts share this viz column, so give it more of the card or their labels shrink below 9px */
  .nb-wide-duo { grid-template-columns: 1.6fr 1fr; }
}
/* below ~1180px that column is too narrow for two charts side by side: stack them */
@media (min-width: 900px) and (max-width: 1179px) {
  .nb-wide-duo .duo { grid-template-columns: 1fr; justify-items: center; }
  .nb-wide-duo .duo .chart { width: 100%; max-width: 300px; }
}
.nb-viz { background: var(--paper); padding: 1.4rem; border-bottom: 1px solid var(--line); display: grid; place-items: center; min-height: 220px; position: relative; }
.nb-copy { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; align-items: flex-start; }
.nb-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
.nb-copy h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: .6rem 0 .7rem; }
.nb-copy > p { color: var(--ink-2); font-size: 1rem; }
.nb-stat { margin-top: 1rem; display: flex; flex-direction: column; gap: .15rem; }
.nb-stat span { font-size: .78rem; color: var(--mute); }
.nb-stat b { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.nb-more { margin-top: 1.4rem; color: var(--mute); font-size: .95rem; max-width: 62rem; }
.nb-copy .tags { margin-top: 1rem; }
.nb-copy .link-btn { margin-top: auto; padding-top: 1.1rem; }

/* viz: hero stat */
.nb-viz-stat { background: linear-gradient(160deg, var(--paper) 0%, #EAF4F2 100%); }
.hero-stat { font-size: clamp(2.8rem, 6vw, 4rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; text-align: center; color: var(--ink); }
.hero-stat span { display: block; font-size: .95rem; letter-spacing: 0; font-weight: 600; color: var(--teal-deep); margin-bottom: .5rem; }
.hero-stat small { display: block; font-size: .85rem; letter-spacing: 0; font-weight: 500; color: var(--mute); margin-top: .6rem; }

/* viz: shared chart chrome */
.chart, .bars { margin: 0; width: 100%; }
.nb-viz > .chart, .nb-viz-stack > .chart { max-width: 440px; margin-inline: auto; }
.chart figcaption, .bars figcaption { font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: .6rem; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-svg .grid line { stroke: rgba(14,17,19,.08); stroke-width: 1; }
.chart-svg .axis text { font: 500 9px var(--sans); fill: var(--mute); font-variant-numeric: tabular-nums; }
.chart-svg .axis-title { font: 600 9px var(--sans); fill: var(--mute); }
.chart-svg .fit, .chart-svg .draw { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); transition-delay: var(--dd, 0s); }
.chart-svg .err { stroke: var(--ink-2); stroke-width: 1; opacity: 0; transition: opacity .5s; }
.chart-svg .pt { fill: var(--teal-deep); stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .5s var(--ease-out), stroke-width .2s, stroke .2s; pointer-events: none; }
.chart-svg .pt.soft { fill: var(--mute); }
.chart-svg .hit { fill: transparent; cursor: default; }
.chart-svg .hit:focus { outline: none; }
.chart-svg .hit.kbd + .pt, .chart-svg .hit:hover + .pt { stroke: rgba(31,158,144,.3); stroke-width: 7; }
.chart-svg .note { font: 600 9.5px var(--sans); fill: var(--ink); }
.chart-svg .note-sub { font: 500 8.5px var(--sans); fill: var(--mute); }
.chart-svg .row-label { font: 600 9.5px var(--sans); fill: var(--ink); }
.chart-svg .row-sub { font: 500 8.5px var(--sans); fill: var(--mute); }
.chart-svg .track { stroke: rgba(14,17,19,.1); stroke-width: 1; }
.chart.in .fit, .chart.in .draw { stroke-dashoffset: 0; }
.chart.in .pt { transform: scale(1); }
.chart.in .err { opacity: .55; }

/* viz: bars */
.bars { --lw: 4.6rem; --vw: 3.4rem; }
.bar-row { display: grid; grid-template-columns: var(--lw) 1fr var(--vw); align-items: center; gap: .7rem; padding: .45rem .3rem; border-radius: 8px; outline: none; transition: background-color .2s; }
.bar-row:hover, .bar-row:focus-visible { background: rgba(31,158,144,.07); }
.bar-label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.bar-track { height: 22px; display: block; position: relative; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 1%); border-radius: 0 4px 4px 0; background: var(--faint); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease-out); }
.bar-fill.is-hi { background: var(--teal); }
.bars.in .bar-fill { transform: scaleX(1); }
.bars.in .bar-row:nth-of-type(2) .bar-fill { transition-delay: .12s; }
.bar-val { font-size: .9rem; font-weight: 600; color: var(--ink); }
.bar-axis { display: flex; justify-content: space-between; margin: .3rem calc(var(--vw) + 1rem) 0 calc(var(--lw) + 1rem); padding-top: .35rem; border-top: 1px solid rgba(14,17,19,.1); font-size: .72rem; color: var(--mute); font-variant-numeric: tabular-nums; }

/* viz: 96-well plate */
.plate { width: 100%; max-width: 420px; height: auto; }
.plate text { font: 600 8px var(--sans); fill: var(--mute); }
.plate .well { fill: #fff; stroke: rgba(14,17,19,.14); stroke-width: 1; transition: fill .6s var(--ease), stroke .6s; transition-delay: var(--wd, 0s); }
.plate.in .well.ctrl { fill: var(--faint); stroke: transparent; }
.plate.in .well.std { fill: rgb(31 158 144 / var(--a)); stroke: transparent; }
.plate.in .well.pt { fill: var(--violet); stroke: transparent; }
.viz-key { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; margin-top: .9rem; font-size: .76rem; color: var(--ink-2); }
.viz-key li { display: flex; align-items: center; gap: .4rem; }
.viz-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-ctrl { background: var(--faint); } .k-std { background: linear-gradient(90deg, var(--teal), rgba(31,158,144,.2)); } .k-pt { background: var(--violet); }

/* viz: gel */
.gel { width: 100%; max-width: 280px; height: auto; }
.gel-bg { fill: #0E1A19; }
.gel-lane-t { font: 600 9px var(--sans); fill: rgba(255,255,255,.6); text-anchor: middle; }
.gel-kd { font: 600 8px var(--sans); fill: rgba(255,255,255,.45); text-anchor: end; }
.gel-well { fill: rgba(255,255,255,.18); }
.gel-band.ladder { fill: rgba(111,216,203,.85); }
.gel-band.ladder.faint { fill: rgba(111,216,203,.35); }
.gel-band.sample { fill: #BFF3EC; filter: drop-shadow(0 0 5px rgba(111,216,203,.9)); transition: transform 1.6s var(--ease-out), height 1.6s var(--ease-out); }
.gel-band.smear { fill: rgba(191,243,236,.22); transition: transform 1.6s var(--ease-out); }
.gel.in .gel-band.sample, .gel.in .gel-band.smear { transform: translateY(26px); }

/* viz: titer rows */
.titer { width: 100%; max-width: 380px; display: grid; gap: .9rem; }
.titer-row { display: grid; grid-template-columns: 4.6rem 1fr; align-items: center; gap: .6rem; }
.titer-lab { font-size: .82rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.titer-lab small { font-weight: 500; color: var(--mute); }
.titer-wells { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.titer-wells i { aspect-ratio: 1; border-radius: 50%; background: #fff; border: 1px solid rgba(14,17,19,.14); position: relative; transition: background-color .5s var(--ease); transition-delay: var(--wd, 0s); }
.titer-wells i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 28%; height: 28%; translate: -50% -50%; border-radius: 50%; background: #B8433F; opacity: 0; transition: opacity .5s; transition-delay: var(--wd, 0s); }
.titer.in .titer-wells i.mat { background: radial-gradient(circle, rgba(184,67,63,.55) 0 55%, rgba(184,67,63,.25) 56%); border-color: transparent; }
.titer.in .titer-wells i.dot::after { opacity: .9; }
.titer-key { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .74rem; color: var(--ink-2); }
.titer-key span { display: flex; align-items: center; gap: .35rem; }
.titer-key i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(14,17,19,.14); display: inline-block; position: relative; }
.k-mat { background: radial-gradient(circle, rgba(184,67,63,.55) 0 55%, rgba(184,67,63,.25) 56%); border-color: transparent !important; }
.k-dot { background: #fff; } .k-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #B8433F; }

/* viz: diagnostic path */
.path { width: 100%; display: grid; gap: 1.1rem; }
.path-lane { display: flex; flex-wrap: wrap; align-items: stretch; gap: .45rem; }
.path-step, .path-end {
  position: relative; padding: .55rem .75rem; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  font-size: .78rem; line-height: 1.25; opacity: .25; transform: translateY(6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .5s; transition-delay: var(--sd, 0s);
}
.path-step b { display: block; font-weight: 600; color: var(--ink); }
.path-step span { color: var(--mute); }
.path-end { background: var(--ink); color: #fff; border-color: var(--ink); font-size: .9rem; display: flex; align-items: center; }
.path-end i { font-family: var(--serif); font-size: 1.1rem; }
.path.in .path-step, .path.in .path-end { opacity: 1; transform: none; }
.path.in .path-step { border-color: rgba(31,158,144,.35); }

/* tooltip */
.tip {
  position: fixed; z-index: 70; pointer-events: none; left: 0; top: 0;
  background: var(--ink); color: #fff; padding: .45rem .7rem; border-radius: 8px; font-size: .8rem; line-height: 1.3;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); opacity: 0; transform: translate(-50%, calc(-100% - 12px)); transition: opacity .15s;
  max-width: 240px;
}
.tip.show { opacity: 1; }
.tip b { font-weight: 700; }

/* note modal */
.modal-body.is-note { background: #fff; }
.note { max-width: 44rem; margin: 0 auto; padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem; }
.note h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.2rem; }
.note h4 { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); margin: 1.6rem 0 .5rem; }
.note p, .note li { color: var(--ink-2); font-size: 1.02rem; }
.note ul { display: grid; gap: .5rem; }
.note li { padding-left: 1.2rem; position: relative; }
.note li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.note blockquote { margin: 1.6rem 0 0; padding: 1rem 1.2rem; border-left: 3px solid var(--teal); background: var(--paper); border-radius: 0 12px 12px 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--ink); }
.note .note-foot { margin-top: 1.4rem; font-size: .85rem; color: var(--mute); }
.cmp { margin-top: 1.2rem; display: grid; gap: .45rem; }
.cmp-row { display: grid; grid-template-columns: 9.5rem 1fr 6.5rem; gap: .6rem; align-items: center; font-size: .85rem; }
.cmp-row span { color: var(--ink-2); }
.cmp-row i { height: 14px; width: var(--w); border-radius: 0 4px 4px 0; background: var(--faint); }
.cmp-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp-row.is-hi i { background: var(--teal); }
.cmp-row.is-me i { background: var(--ink); }
.cmp-unit { font-size: .75rem; color: var(--mute); }
@media (max-width: 560px) { .cmp-row { grid-template-columns: 6.5rem 1fr 5.2rem; font-size: .78rem; } }

@media (prefers-reduced-motion: reduce) {
  .chart .fit, .chart .draw { stroke-dashoffset: 0 !important; transition: none !important; } .chart .pt { transform: none !important; }
  .bar-fill { transform: none !important; } .path-step, .path-end { opacity: 1 !important; transform: none !important; }
}

/* notebook: more chart chrome */
.chart:focus-visible { outline-offset: 6px; border-radius: 12px; }
.chart-svg .grid .base { stroke: rgba(14,17,19,.28); }
.chart-svg .err, .chart-svg .fit, .chart-svg .draw, .chart-svg .lbl, .chart-svg text { pointer-events: none; }
.chart-svg .lbl { font: 600 9.5px var(--sans); fill: var(--ink); }
.chart-svg .lbl-m { font: 500 8.5px var(--sans); fill: var(--mute); }
.chart-svg .lbl, .chart-svg .lbl-m, .chart-svg .fade { opacity: 0; transition: opacity .6s var(--ease); transition-delay: var(--dd, .6s); }
.chart.in .lbl, .chart.in .lbl-m, .chart.in .fade { opacity: 1; }
.chart-svg .ref { fill: none; stroke: rgba(14,17,19,.35); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-svg .stem { stroke: rgba(14,17,19,.22); stroke-width: 1.5; }
.chart-svg .tail { fill: rgba(31,158,144,.22); }
.chart-svg .curve { stroke: var(--ink-2); }
.chart-svg .mark { stroke: var(--teal-deep); stroke-width: 2; }
.chart-svg .rail { stroke: rgba(14,17,19,.12); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-svg .trail { stroke: var(--teal); stroke-width: 2; stroke-linejoin: round; }
.chart-svg .node { fill: #fff; stroke: var(--teal-deep); stroke-width: 2; }
.chart-svg .pill { fill: var(--ink); }
.chart-svg .pill-t { font: 600 10px var(--sans); fill: #fff; }
.chart-svg .branch { stroke: var(--ink-2); stroke-width: 2; }
.chart-svg .split { fill: var(--teal-deep); }
.chart-svg .sm { font: 600 9px var(--sans); fill: var(--ink); }
.chart-svg .mx { font: 600 9px var(--sans); fill: var(--teal-deep); }
.chart.in .pt { transition-delay: var(--pd, 0s), 0s, 0s; }

.viz-note { margin-top: .7rem; font-size: .74rem; color: var(--mute); text-align: center; }
.duo { width: 100%; display: grid; gap: 1.2rem; }
.duo .chart { width: 100%; max-width: 380px; margin-inline: auto; }
@media (min-width: 700px) { .duo { grid-template-columns: 1fr 1fr; } }
.nb-viz-stack { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }

/* acoustic trap strip */
.trap { margin: 0; }
.trap-svg { width: 100%; height: auto; display: block; border-radius: 12px; background: #EAF4F2; }
.trap figcaption { font-size: .74rem; color: var(--mute); margin-top: .45rem; }
.trap-svg .node-line { stroke: rgba(19,114,104,.25); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; transition: opacity .8s .9s; }
.trap-svg .bead { fill: var(--teal-deep); transition: transform 1.8s var(--ease-out); transition-delay: var(--bd, 0s); }
.trap.in .node-line { opacity: 1; }
.trap.in .bead { transform: none !important; }

/* error matrix */
.matrix { width: 100%; max-width: 400px; display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px; font-size: .78rem; line-height: 1.3; }
.mx-col, .mx-row { font-weight: 600; color: var(--ink-2); font-size: .72rem; }
.mx-col { text-align: center; padding-bottom: 2px; }
.mx-row { display: flex; align-items: center; padding-right: 4px; max-width: 5.2rem; }
.mx-cell { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .75rem; color: var(--ink-2); min-height: 5.2rem; display: flex; flex-direction: column; gap: .2rem; opacity: 0; transform: scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease-out), box-shadow .5s; }
.mx-cell b { color: var(--ink); font-size: .8rem; }
.mx-cell em { font-style: normal; font-weight: 700; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-deep); margin-top: auto; }
.mx-ok { align-items: center; justify-content: center; color: var(--mute); background: transparent; border-style: dashed; }
.mx-her { border-color: var(--teal); background: #F1FAF8; }
.matrix.in .mx-cell { opacity: 1; transform: none; }
.matrix.in .mx-cell:nth-of-type(2) { transition-delay: .1s; } .matrix.in .mx-cell:nth-of-type(3) { transition-delay: .2s; } .matrix.in .mx-cell:nth-of-type(4) { transition-delay: .3s; }
.matrix.in .mx-her { box-shadow: 0 0 0 4px var(--teal-dim); transition-delay: .5s; }

/* spectrum */
.spectrum { width: 100%; max-width: 340px; }
.spec-bar { position: relative; height: 12px; border-radius: 99px; margin-top: 1.4rem;
  background: linear-gradient(90deg, #6A2BC4 0%, #3C4FE0 12%, #1C9BE0 24%, #1FB27A 36%, #9ACD32 48%, #F2D231 56%, #F59A23 66%, #E5402B 78%, #A11A1A 90%, #5C0D0D 100%); }
.spec-bar i { position: absolute; left: var(--at); top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.spec-axis { position: relative; height: 1.2rem; margin-top: .4rem; font-size: .72rem; color: var(--mute); font-variant-numeric: tabular-nums; }
.spec-axis span { position: absolute; left: var(--at); transform: translateX(-50%); white-space: nowrap; }
.spec-axis span:first-child { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .trap .bead, .mx-cell, .chart-svg .lbl, .chart-svg .lbl-m, .chart-svg .fade { transition: none !important; }
}

/* Phones: charts render at about 1:1 with their 320-unit viewBox, so lift the smallest chart text to 10px or more */
@media (max-width: 560px) {
  .chart-svg .axis text, .chart-svg .axis-title { font-size: 10px; }
  .chart-svg .lbl, .chart-svg .note, .chart-svg .row-label { font-size: 10.5px; }
  .chart-svg .lbl-m, .chart-svg .note-sub, .chart-svg .row-sub { font-size: 9.5px; }
  .chart-svg .sm { font-size: 10px; }
  .nb-viz { padding: 1.2rem .75rem; } /* every px of width here is chart text size */
}
.nw { white-space: nowrap; }
