/* wspr — one stylesheet for every page.

   Each page's <html> carries a class (page-home, page-about, page-science)
   and that page's rules are scoped under it, so shared names such as .hero
   or .bar can mean different things on different pages. Fonts, registered
   properties and animations are shared and sit at the top. Browsers fetch this
   file once and reuse it on every page. */

@font-face {
  font-family: "Quaria Display";
  src: url("assets/QuariaDisplayTest-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Quaria Display";
  src: url("assets/QuariaDisplayTest-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/DMSans-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}

@property --wash-base {
  syntax: "<color>"; inherits: false; initial-value: #F5F0E5;
}

@property --wash-c {
  syntax: "<color>"; inherits: false; initial-value: transparent;
}

@property --wash-x {
  syntax: "<length-percentage>"; inherits: false; initial-value: 50%;
}

@property --wash-y {
  syntax: "<length-percentage>"; inherits: false; initial-value: 50%;
}

@property --wash-w {
  syntax: "<length-percentage>"; inherits: false; initial-value: 0%;
}

@property --wash-h {
  syntax: "<length-percentage>"; inherits: false; initial-value: 0%;
}

@property --wash-core {
  syntax: "<percentage>"; inherits: false; initial-value: 50%;
}

@property --wash-blur {
  syntax: "<number>"; inherits: false; initial-value: 3;
}

@property --wash-rx {
  syntax: "<length-percentage>"; inherits: false; initial-value: 50%;
}

@property --wash-ry {
  syntax: "<length-percentage>"; inherits: false; initial-value: 50%;
}

@property --wash-rot {
  syntax: "<angle>"; inherits: false; initial-value: 0deg;
}

@keyframes drift {
  0% { translate: 0 0;          scale: .4;  rotate: -6deg; opacity: 0; }
  12% { opacity: .95; }
  55% { opacity: .7; }
  100% { translate: 1.9em -1.6em; scale: 1.15; rotate: -14deg; opacity: 0; }
}

@keyframes sway {
  from { translate: -.14em .05em; }
  to { translate: .14em -.05em; }
}

@keyframes blue-rise {
  from { translate: -50% 61%; opacity: 0; }
  /* starts lower, so the dark fills the top */
  to { translate: -50% 50%; opacity: 1; }
}

@keyframes rise {
  from { translate: -50% 85%; opacity: 0; }
  to { translate: -50% 50%; opacity: 1; }
}

@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wash-rise {
  from { translate: 0 10%; opacity: 0; }
  to { translate: 0 0;   opacity: 1; }
}

@keyframes undulate {
  to { border-radius: var(--r2, var(--r1, 50%)); rotate: calc(var(--wash-rot) + var(--sway, 0deg)); }
}

@keyframes wash-drift {
  from { translate: 0 0; scale: 1; }
  to { translate: var(--dx) var(--dy); scale: var(--ds); }
}

@keyframes post-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   Home (index.html) — every rule is scoped under .page-home on <html>
   ══════════════════════════════════════════════════════════════════════ */

:root.page-home {
  /* Palette — night to sunrise */
  --night:    #130B24;
  --dusk:     #253063;
  --blue:     #4880DA;
  --lavender: #BBA6F7;
  --pink:     #F6BEE5;
  --cream:    #F7F0E6;
  --sun:      #FECF68;
  --ink:      #120A24;   /* all dark text: headline, body copy, button, fine print */
  --ink-soft: var(--ink);
  --white:    #FFFFFF;
  --serif: "Quaria Display", "Times New Roman", serif;
  --sans:  "DM Sans", system-ui, -apple-system, sans-serif;
  /* Type scale — shared with about.html.
  Text (DM Sans): one body size and one small size.
  Titles (Quaria): steps of about 1.33x (24 · 32 · 42 · 56 · 76);
  this page only uses the top step, for the headline. */
  --t-small: 15px;    /* menu, fine print */
  --t-body:  18px;    /* subheading, whisper, form */
  /* headline: also capped by height so short laptop screens keep the logo in view */
  --t-title-1: clamp(40px, min(5.28vw, 6vh), 76px);
  --dawn: cubic-bezier(.22, .61, .21, 1);
  /* Text sizes & positions — tune with the jig (?tune → Text tab) */
  /* Vertical layout. Content flows top to bottom, so nothing can be cut off:
  space above the logo, minimum gap between headline block and form,
  and space below the form (where the sun sits). On tall screens the
  headline lands near 1/3 and the form near 2/3 of the height. */
  --pad-top:      clamp(40px, 8vh, 140px);
  --stack-gap:    clamp(72px, 9vh, 160px);
  --pad-bottom:   max(80px, 40vh - 300px);
  --intro-w:      845px;
  /* logo and headline also shrink on short, wide screens (e.g. laptops) */
  --logo-w:       clamp(150px, min(14.6vw, 20vh), 280px);
  --logo-gap:     clamp(28px, 3.4vw, 48px);
  --h1-size:      var(--t-title-1);
  --h1-leading:   .95;
  --h1-tracking:  -0.022em;
  --sentence-gap: .5em;
  --lede-size:    var(--t-body);
  --lede-gap:     clamp(24px, 2.3vw, 40px);
  --whisper-size: var(--t-body);
  --whisper-gap:  clamp(18px, 1.4vw, 24px);
  --form-w:       600px;
  --field-h:      60px;
  --field-text:   var(--t-body);
  --fine-size:    var(--t-small);
}
.page-home *, .page-home *::before, .page-home *::after {
  box-sizing: border-box;
}
html.page-home, .page-home body {
  margin: 0;
}
.page-home body {
  background: var(--night);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* ───────── Hero ───────── */
.page-home .hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-gap);
  min-height: 100svh;
  padding: var(--pad-top) 16px var(--pad-bottom);
  overflow: clip;
  text-align: center;
}
/* Layered sky.
       Night is the base; every lighter layer is an ellipse rising from the
       bottom centre. The darker the colour, the wider it is stretched —
       so the horizon flattens as it gets darker. */
.page-home .sky, .page-home .sky span {
  position: absolute;
  inset: 0;
}
/* the sky clips its own layers, so focusing the form can never scroll it */
.page-home .sky {
  z-index: -2; background: var(--night); overflow: hidden;
}
.page-home .sky span {
  /* an ellipse of --w × --h, anchored at the bottom centre */
  top: auto;
  bottom: calc(var(--drop, 0%) * -1);   /* --drop pushes a layer down, as % of page height */
  left: 50%;
  width: var(--w);
  height: calc(var(--h) * 2);
  translate: -50% 50%;
  border-radius: 50%;
  /* --a is the layer's strength: 100% = full colour, lower lets the layer below show through */
  --tint: color-mix(in srgb, var(--c) var(--a, 100%), transparent);
  background: radial-gradient(closest-side, var(--tint) var(--core, 55%), transparent);
  filter: blur(var(--blur, 40px));
}
/* Values tuned with the jig (open the page with ?tune) */
.page-home .sky .dusk {
  --c: var(--dusk);     --drop: 14.5%; --w: 397%; --h: 116.5%; --core: 71%; --blur: 85px;
}
.page-home .sky .blue {
  --c: var(--blue);     --drop: 5%;    --w: 380%; --h: 103%;   --core: 84%; --blur: 40px;
}
.page-home .sky .lavender {
  --c: var(--lavender); --drop: -2%;   --w: 165%; --h: 50%;    --core: 56%; --blur: 0px;
}
.page-home .sky .pink {
  --c: var(--pink);     --drop: 1%;    --w: 130%; --h: 33%;    --core: 57%; --blur: 47px;
}
.page-home .sky .cream {
  --c: var(--cream);    --drop: 5.5%;  --w: 148%; --h: 22%;  --core: 42%; --blur: 40px;
}
.page-home .sky .sun {
  --c: var(--sun);      --drop: 3%;    --w: 62%;  --h: 12%;  --core: 30%; --blur: 30px;
}
/* The light layers rise toward the form as the pointer nears it.
       --lift (px) is set by the script at the bottom of the page. */
.page-home .sky .lavender, .page-home .sky .pink, .page-home .sky .cream, .page-home .sky .sun {
  transform: translateY(calc(var(--lift, 0) * -1px)) scale(var(--grow-x, 1), var(--grow-y, 1));
  will-change: transform;
}
/* Subtle noise over the whole page — sky, text and form alike.
       It sits on top of everything but ignores the pointer (clicks, taps,
       typing and text selection pass straight through) and is hidden from
       screen readers. It also hides gradient banding. */
.page-home .grain {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  opacity: .29;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.2 0 0 0 -.8 2.2 0 0 0 -.8 2.2 0 0 0 -.8 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
/* ───────── Menu (top right) ───────── */
.page-home .site-nav {
  position: absolute;
  top: clamp(14px, 2.2vw, 28px);
  right: clamp(16px, 3vw, 40px);
  z-index: 6;
}
.page-home .menu {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; list-style: none;
}
.page-home .menu a {
  color: var(--cream);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: .35em;
  text-decoration-thickness: 1.5px;
}
.page-home .menu a:hover, .page-home .menu a[aria-current="page"] {
  text-decoration-line: underline;
}
.page-home .menu .pill {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none !important;
  transition: background-color .2s ease;
}
.page-home .menu .pill:hover {
  background: var(--white);
}
.page-home .menu a:focus-visible {
  outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 4px;
}
@media (max-width: 420px) {
  .page-home .menu {
    gap: 14px;
  }
  .page-home .menu .pill {
    padding: 8px 14px;
  }
}
/* ───────── Phone menu: hamburger + drop-down panel ─────────
       Only once the script has run (.js), so the links never go missing. */
.page-home .menu-toggle {
  display: none;
}
@media (max-width: 640px) {
  .page-home.js .menu-toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
    background: var(--cream); color: var(--ink); cursor: pointer;
  }
  .page-home .menu-toggle span {
    display: block; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor;
    transition: translate .3s ease, rotate .3s ease;
  }
  .page-home .menu-toggle[aria-expanded="true"] span:first-child {
    translate: 0 3.75px; rotate: 45deg;
  }
  .page-home .menu-toggle[aria-expanded="true"] span:last-child {
    translate: 0 -3.75px; rotate: -45deg;
  }
  .page-home .menu-toggle:focus-visible {
    outline-offset: 3px;
  }
  .page-home.js .menu {
    position: absolute; top: calc(100% + 10px); right: -8px;
    width: calc(100vw - 16px);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px 18px 20px; border-radius: 24px; text-align: left;
    background: var(--cream);
    box-shadow: 0 24px 60px -28px rgba(18, 10, 36, .55);
    opacity: 0; visibility: hidden; translate: 0 -8px;
    transition: opacity .25s ease, translate .25s ease, visibility 0s linear .25s;
  }
  .page-home.js [data-nav][data-open] .menu {
    opacity: 1; visibility: visible; translate: 0 0;
    transition: opacity .25s ease, translate .25s ease;
  }
  .page-home.js .menu a {
    display: block; padding: 14px 16px; font-size: var(--t-body); color: var(--ink);
  }
  .page-home.js .menu .pill {
    margin-top: 10px; padding: 14px 16px; text-align: center; background: var(--ink); color: var(--cream);
  }
  .page-home.js .menu .pill:hover {
    background: #2a2050;
  }
}
/* ───────── Copy ───────── */
/* flex + center keeps a line that's wider than the box centred, not pushed right */
.page-home .intro {
  width: min(100%, var(--intro-w)); display: flex; flex-direction: column; align-items: center;
}
.page-home .signup {
  width: min(100%, var(--form-w)); margin-top: auto;
}
/* pushed toward the lower third */
.page-home .mark {
  position: relative;
  width: var(--logo-w);
  margin: 0 auto var(--logo-gap);
}
.page-home .logo {
  display: block; width: 100%; height: auto;
}
/* Sleepy z's drifting up from the figure's head.
       Sizes are in em, and the em is tied to the logo width,
       so the whole effect scales with the logo. */
.page-home .zzz {
  position: absolute;
  inset: 0;
  font-size: calc(var(--logo-w) * .1);
  pointer-events: none;
}
.page-home .z {
  position: absolute;
  left: 9%;             /* just above the head */
  top: -4%;
  opacity: 0;
}
.page-home .z span {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1;
  color: var(--cream);
}
/* The headline is a chiasmus: two sentences, each two lines.
       A slightly larger gap between the sentences lets the turn land. */
.page-home h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--h1-size);
  line-height: var(--h1-leading);
  letter-spacing: var(--h1-tracking);
  color: var(--ink);
  font-kerning: normal;
  font-feature-settings: "kern", "liga";
}
.page-home h1 .sentence {
  display: block;
}
.page-home h1 .sentence + .sentence {
  margin-top: var(--sentence-gap);
}
.page-home h1 .line {
  display: block; white-space: nowrap;
}
/* each line stays one line on desktop */
.page-home .lede {
  margin: var(--lede-gap) auto 0;
  max-width: 21em;
  font-size: var(--lede-size);
  line-height: 1.35;
  text-wrap: balance;
}
.page-home .whisper {
  margin: 0 0 var(--whisper-gap);
  font-size: var(--whisper-size);
  line-height: 1.35;
}
.page-home .whisper em {
  display: block; font-style: italic;
}
/* ───────── Form ───────── */
.page-home .field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 9px 9px 28px;
  background: var(--night);
  border: 1.5px solid var(--white);
  border-radius: 999px;
  box-shadow: 0 18px 50px -24px rgba(19, 11, 36, .7);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.page-home .field:focus-within {
  box-shadow: 0 0 0 5px rgba(247, 240, 230, .28), 0 18px 50px -24px rgba(19, 11, 36, .7);
}
.page-home .field[data-state="error"] {
  border-color: var(--pink);
}
.page-home .field input {
  flex: 1;
  min-width: 0;
  height: var(--field-h);
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: var(--field-text);
  outline: none;
  caret-color: var(--sun);
}
.page-home .field input::placeholder {
  color: rgba(255, 255, 255, .55);
}
.page-home .field button {
  flex: none;
  height: var(--field-h);
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--field-text);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.page-home .field button:hover {
  background: var(--cream);
}
.page-home .field button:active {
  transform: scale(.98);
}
.page-home .field button:focus-visible {
  outline: 2px solid var(--sun); outline-offset: 3px;
}
.page-home .field button:disabled {
  cursor: default; background: var(--sun); transform: none;
}
.page-home .fineprint {
  margin: 20px 0 0;
  font-size: var(--fine-size);
  line-height: 1.4;
  color: var(--ink);
  min-height: 1.4em;
}
.page-home .visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
/* ───────── One moment: dawn on load ─────────
       1. night and dusk alone
       2. the blue fades in and rises a little   (0.3s  → 2.9s)
       3. the light layers rise from below        (1.0s  → ~4.6s)
       4. logo + first headline sentence          (2.0s)
       5. second sentence + subheading            (2.8s)
       6. "Whisper it…" and the form              (3.6s)
       7. the first z drifts up                   (3.2s)  */
@media (prefers-reduced-motion: no-preference) {
  .page-home .sky .blue {
    animation: blue-rise 2.6s cubic-bezier(.45, 0, .2, 1) .3s both;
  }
  /* gentle start, soft landing */
  .page-home .sky .lavender, .page-home .sky .pink, .page-home .sky .cream, .page-home .sky .sun {
    animation: rise 2.8s var(--dawn) both;
  }
  .page-home .sky .lavender {
    animation-delay: 1s;
  }
  .page-home .sky .pink {
    animation-delay: 1.15s;
  }
  .page-home .sky .cream {
    animation-delay: 1.3s;
  }
  .page-home .sky .sun {
    animation-delay: 1.45s; animation-duration: 3.2s;
  }
  .page-home .mark, .page-home h1 .sentence, .page-home .lede, .page-home .signup {
    animation: appear 1.4s ease both;
  }
  .page-home .site-nav {
    animation: appear 1.4s ease 2s both;
  }
  .page-home .mark, .page-home h1 .sentence:first-child {
    animation-delay: 2s;
  }
  .page-home h1 .sentence:last-child, .page-home .lede {
    animation-delay: 2.8s;
  }
  .page-home .signup {
    animation-delay: 3.6s;
  }
  /* each z drifts up and to the right, growing and fading;
         its letter sways side to side, which makes the path wavy */
  .page-home .z {
    animation: drift 6s linear infinite backwards;
  }
  .page-home .z span {
    animation: sway 1.5s ease-in-out infinite alternate;
  }
  .page-home .z:nth-child(1) {
    animation-delay: 3.2s;
  }
  .page-home .z:nth-child(2) {
    animation-delay: 5.2s;
  }
  .page-home .z:nth-child(3) {
    animation-delay: 7.2s;
  }
  .page-home .z:nth-child(2) span {
    animation-delay: -.5s;
  }
  .page-home .z:nth-child(3) span {
    animation-delay: -1s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-home .zzz {
    display: none;
  }
}
/* ───────── Small screens: stack in normal flow ───────── */
@media (max-width: 640px) {
  .page-home .hero {
    justify-content: center;
    gap: 72px;
    padding: 64px 16px 128px;
  }
  .page-home .intro, .page-home .signup {
    width: 100%;
  }
  .page-home .signup {
    margin-top: 0;
  }
  .page-home .mark {
    width: 150px; margin-bottom: 32px;
  }
  .page-home .zzz {
    font-size: 15px;
  }
  .page-home h1 {
    line-height: 1;
  }
  .page-home h1 .sentence, .page-home .whisper {
    text-wrap: balance;
  }
  .page-home h1 .line {
    display: inline; white-space: normal;
  }
  .page-home h1 .line + .line::before {
    content: " ";
  }
  .page-home .field {
    padding-left: 20px;
  }
  .page-home .field input, .page-home .field button {
    height: 52px;
  }
  .page-home .field button {
    padding: 0 20px;
  }
}
/* Phones: the joined pill gets too cramped, so email and button
       become two full-width pills — same look, each easy to tap. */
@media (max-width: 640px) {
  .page-home .field {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .page-home .field:focus-within {
    box-shadow: none;
  }
  .page-home .field input {
    flex: none;
    height: 56px;
    padding: 0 24px;
    background: var(--night);
    border: 1.5px solid var(--white);
    border-radius: 999px;
    box-shadow: 0 18px 50px -24px rgba(19, 11, 36, .7);
    transition: box-shadow .25s ease, border-color .25s ease;
  }
  .page-home .field input:focus {
    box-shadow: 0 0 0 5px rgba(247, 240, 230, .28), 0 18px 50px -24px rgba(19, 11, 36, .7);
  }
  .page-home .field[data-state="error"] input {
    border-color: var(--pink);
  }
  .page-home .field button {
    height: 56px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   About (about.html) — every rule is scoped under .page-about on <html>
   ══════════════════════════════════════════════════════════════════════ */

:root.page-about {
  /* palette — shared with the landing page */
  --night:    #130B24;
  --ink:      #120A24;
  --paper:    #F5F0E5;     /* page background */
  --card:     #FFFFFF;
  --blue:     #4880DA;     /* link underlines */
  --sea:      #4C78C4;     /* "What we built" band */
  --lavender: #BBA6F7;
  --pink:     #F6BEE5;
  --cream:    #F7F0E6;
  --ember:    #EE6A33;     /* the orange arc in the gradient bands */
  --deep:     #16112A;     /* "Where we're going" and footer */
  --serif: "Quaria Display", "Times New Roman", serif;
  --sans:  "DM Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 6vw, 100px);
  --wrap:   1152px;   /* 72rem, a standard container width (Tailwind max-w-6xl) */
  /* type scale
  Text (DM Sans): one body size, one small size, and a caps label.
  Titles (Quaria): five steps, each about 1.33x the one below
  at full width (24 · 32 · 42 · 56 · 76), closing up on phones. */
  --t-label: 12px;    /* uppercase eyebrows, headshot placeholder */
  --t-small: 15px;    /* menu, stat captions, footer */
  --t-body:  18px;    /* all running text */
  --t-title-5: clamp(21px, 1.67vw, 24px);   /* sub-lines, stat words */
  --t-title-4: clamp(26px, 2.22vw, 32px);   /* h3: founder names */
  --t-title-3: clamp(30px, 2.92vw, 42px);   /* stat numbers */
  --t-title-2: clamp(34px, 3.89vw, 56px);   /* h2: section titles */
  --t-title-1: clamp(40px, 5.28vw, 76px);   /* h1: page title */
}
.page-about *, .page-about *::before, .page-about *::after {
  box-sizing: border-box;
}
html.page-about, .page-about body {
  margin: 0;
}
.page-about body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.page-about img, .page-about svg {
  display: block; max-width: 100%;
}
.page-about p {
  margin: 0 0 1em;
}
.page-about p:last-child {
  margin-bottom: 0;
}
.page-about .wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
}
/* ───────── Type ───────── */
.page-about .eyebrow {
  margin: 0 0 14px;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.page-about h1, .page-about h2, .page-about h3 {
  font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.015em;
}
/* No one-word last lines: headlines balance their lines, paragraphs
       only adjust their last few lines. Older browsers wrap as normal. */
.page-about h1, .page-about h2, .page-about h3, .page-about .sub, .page-about .stat .number {
  text-wrap: balance;
}
.page-about p, .page-about li {
  text-wrap: pretty;
}
.page-about h1 {
  font-size: var(--t-title-1); line-height: 1.02;
}
.page-about h2 {
  font-size: var(--t-title-2); line-height: 1.05; margin-bottom: 20px;
}
.page-about h3 {
  font-size: var(--t-title-4); line-height: 1.1; font-weight: 500;
}
.page-about .sub {
  font-family: var(--serif); font-size: var(--t-title-5); line-height: 1.25; margin-bottom: 28px;
}
.page-about .copy {
  max-width: 36em;
}
/* Link underlines. Each link draws two lines at its baseline:
       a resting line (--u) and, on top, a gradient (--g1 → --g2) that
       glides in from the right on hover or keyboard focus.
       Colours change with the background the link sits on. */
.page-about .ref, .page-about .linkedin {
  --u:  var(--blue);      /* cream sections: blue, */
  --g1: var(--blue);      /* sweeping to a blue → night gradient */
  --g2: var(--night);
  color: inherit;
  text-decoration: none;
  background-image:
  linear-gradient(90deg, var(--g1), var(--g2)),
  linear-gradient(var(--u), var(--u));
  background-size: 0% 2px, 100% 1.5px;
  background-position: 100% 100%, 0 100%;   /* gradient anchored right, so it grows leftward */
  background-repeat: no-repeat;
  padding-bottom: .16em;
  transition: background-size .9s cubic-bezier(.45, 0, .25, 1);   /* slow, soft start and finish */
}
.page-about .ref:hover, .page-about .linkedin:hover, .page-about .ref:focus-visible, .page-about .linkedin:focus-visible {
  background-size: 100% 2px, 100% 1.5px;
}
.page-about .on-sea .ref {
  --u: var(--lavender); --g1: var(--lavender); --g2: var(--pink);
}
/* blue section */
.page-about .on-deep .ref {
  --u: var(--blue);     --g1: var(--blue);     --g2: var(--lavender);
}
/* dark section */
@media (prefers-reduced-motion: reduce) {
  .page-about .ref, .page-about .linkedin {
    transition: none;
  }
}
.page-about a:focus-visible, .page-about button:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px;
}
/* ───────── Header + menu ───────── */
.page-about .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page-about .site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
  padding-inline: clamp(16px, 3vw, 40px);
}
.page-about .wordmark {
  color: var(--ink);
}
.page-about .wordmark svg {
  width: clamp(64px, 6vw, 84px); height: auto;
}
.page-about .menu {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; list-style: none;
}
.page-about .menu a {
  color: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: .35em;
  text-decoration-thickness: 1.5px;
}
.page-about .menu a:hover, .page-about .menu a[aria-current="page"] {
  text-decoration-line: underline;
}
.page-about .menu .pill {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none !important;
  transition: background-color .2s ease;
}
.page-about .menu .pill:hover {
  background: #2a2050;
}
/* ───────── Phone menu: hamburger + drop-down panel ─────────
       Only once the script has run (.js), so the links never go missing. */
.page-about .menu-toggle {
  display: none;
}
@media (max-width: 640px) {
  .page-about.js [data-nav] {
    position: relative;
  }
  .page-about.js .menu-toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
    background: var(--ink); color: var(--cream); cursor: pointer;
  }
  .page-about .menu-toggle span {
    display: block; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor;
    transition: translate .3s ease, rotate .3s ease;
  }
  .page-about .menu-toggle[aria-expanded="true"] span:first-child {
    translate: 0 3.75px; rotate: 45deg;
  }
  .page-about .menu-toggle[aria-expanded="true"] span:last-child {
    translate: 0 -3.75px; rotate: -45deg;
  }
  .page-about .menu-toggle:focus-visible {
    outline-offset: 3px;
  }
  .page-about.js .menu {
    position: absolute; top: calc(100% + 10px); right: -8px;
    width: calc(100vw - 16px);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px 18px 20px; border-radius: 24px;
    background: var(--card);
    box-shadow: 0 24px 60px -28px rgba(18, 10, 36, .55);
    opacity: 0; visibility: hidden; translate: 0 -8px;
    transition: opacity .25s ease, translate .25s ease, visibility 0s linear .25s;
  }
  .page-about.js [data-nav][data-open] .menu {
    opacity: 1; visibility: visible; translate: 0 0;
    transition: opacity .25s ease, translate .25s ease;
  }
  .page-about.js .menu a {
    display: block; padding: 14px 16px; font-size: var(--t-body); color: var(--ink);
  }
  .page-about.js .menu .pill {
    margin-top: 10px; padding: 14px 16px; text-align: center; background: var(--ink); color: var(--cream);
  }
  .page-about.js .menu .pill:hover {
    background: #2a2050;
  }
}
/* ───────── Gradient bands (hero + talk to us) ───────── */
.page-about .band {
  position: relative; isolation: isolate; overflow: hidden;
}
/* Film grain over the whole page — header, bands, text and footer —
       same texture and strength as the landing page. It ignores the pointer
       (clicks, typing and selection pass through) and screen readers skip it. */
.page-about body {
  position: relative;
}
.page-about body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;          /* above the sticky header */
  pointer-events: none;
  user-select: none;
  opacity: .29;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.2 0 0 0 -.8 2.2 0 0 0 -.8 2.2 0 0 0 -.8 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
/* Layered light, built like the landing-page sky: a base colour plus
       stacked ellipses (outermost first). Each layer has a centre (--x, --y),
       a size (--w × --h, as % of the band), a colour (--c), how much of it is
       solid before it fades (--core) and a blur. */
.page-about .band .glow {
  position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--base);
}
.page-about .glow span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) var(--core, 55%), transparent);
  filter: blur(var(--blur, 30px));
}
/* Hero: an evening arc — orange on the outside, pink, then lavender and blue */
.page-about .hero {
  padding-block: clamp(72px, 9vw, 120px);
}
.page-about .hero .glow {
  --base: var(--paper);
}
/* same as the header, so there's no seam */
.page-about .hero .ember {
  --c: var(--ember); --x: 63%; --y: 128%; --w: 142%; --h: 252%; --core: 84%; --blur: 32px;
}
.page-about .hero .blush {
  --c: #F6DCE9;      --x: 65%; --y: 130%; --w: 116%; --h: 206%; --core: 76%; --blur: 30px;
}
.page-about .hero .pink {
  --c: #E3A2D7;      --x: 67%; --y: 132%; --w: 96%;  --h: 172%; --core: 62%; --blur: 30px;
}
.page-about .hero .lavender {
  --c: #A28CDB;      --x: 70%; --y: 134%; --w: 76%;  --h: 138%; --core: 54%; --blur: 30px;
}
.page-about .hero .blue {
  --c: #6F7ED0;      --x: 73%; --y: 136%; --w: 56%;  --h: 104%; --core: 50%; --blur: 30px;
}
.page-about .hero h1 {
  max-width: 13.5em;
}
/* Talk to us: blue on the left, warming to pink and an orange arc on the right */
.page-about .talk {
  padding-block: clamp(80px, 9vw, 130px); text-align: center;
}
.page-about .talk .glow {
  --base: #FFF6F0;
}
.page-about .talk .ember {
  --c: var(--ember); --x: 34%; --y: 50%; --w: 124%; --h: 290%; --core: 86%; --blur: 26px;
}
.page-about .talk .blush {
  --c: #FCEFF3;      --x: 32%; --y: 50%; --w: 112%; --h: 280%; --core: 80%; --blur: 26px;
}
.page-about .talk .pink {
  --c: #EBAAD9;      --x: 26%; --y: 50%; --w: 100%; --h: 270%; --core: 56%; --blur: 30px;
}
.page-about .talk .lavender {
  --c: #9C8FDB;      --x: 14%; --y: 50%; --w: 100%; --h: 250%; --core: 50%; --blur: 30px;
}
.page-about .talk .blue {
  --c: #3E6BCB;      --x: -2%; --y: 50%; --w: 94%;  --h: 240%; --core: 55%; --blur: 30px;
}
/* A slight rise when a band comes into view (once). Outer layers lead,
       inner layers follow. Only applies when the script is running and the
       visitor hasn't asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .page-about.js .glow span {
    transition: translate 2.2s cubic-bezier(.22, .61, .21, 1), opacity 1.4s ease;
    transition-delay: calc(var(--i) * 130ms);
  }
  .page-about.js .band:not(.in-view) .glow span {
    translate: 0 12%; opacity: 0;
  }
}
.page-about .glow span:nth-child(1) {
  --i: 0;
}
.page-about .glow span:nth-child(2) {
  --i: 1;
}
.page-about .glow span:nth-child(3) {
  --i: 2;
}
.page-about .glow span:nth-child(4) {
  --i: 3;
}
.page-about .glow span:nth-child(5) {
  --i: 4;
}
.page-about .talk h2 {
  max-width: 12em; margin-inline: auto; margin-bottom: 14px;
}
.page-about .talk .sub {
  margin-bottom: 30px;
}
.page-about .button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, transform .15s ease;
}
.page-about .button:hover {
  background: #2a2050;
}
.page-about .button:active {
  transform: scale(.98);
}
/* ───────── Sections ───────── */
.page-about section {
  scroll-margin-top: 80px;
}
.page-about .section {
  padding-block: clamp(64px, 8vw, 120px);
}
/* Founders */
.page-about .people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
}
.page-about .person {
  --pad: clamp(32px, 4vw, 56px);
  background: var(--card);
  border-radius: 20px;
  padding: var(--pad) var(--pad) calc(var(--pad) * 1.15);   /* a little extra room at the bottom */
}
.page-about .headshot {
  position: relative;
  display: block;
  width: 120px;
  aspect-ratio: 1;
  margin-bottom: 18px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);   /* shows for a moment while the photo loads */
}
.page-about .headshot img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
/* A soft blue and lavender glow inside the bottom-right edge of the circle */
.page-about .headshot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
  inset -7.5px -8.5px 15px -3px color-mix(in srgb, var(--blue) 85%, transparent),
  inset -15px -17px 28px -8.5px color-mix(in srgb, var(--lavender) 90%, transparent);
  mix-blend-mode: screen;
}
.page-about .person h3 {
  margin-bottom: 6px;
}
.page-about .person .eyebrow {
  margin-bottom: 14px;
}
.page-about .person .linkedin {
  font-weight: 600;
}
.page-about .person p:last-of-type {
  margin-bottom: 0;
}
.page-about .person .linkedin-row {
  margin-top: 22px;
}
/* Text + figure rows */
.page-about .split {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.page-about .figure-card {
  position: relative;
  aspect-ratio: 308 / 350;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--sea) 0%, #4F7BC6 55%, #B7A2D6 100%);
}
.page-about .figure-card img {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 86%;
  width: auto;
}
.page-about .on-sea {
  background: var(--sea);
}
.page-about .built {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}
.page-about .built .pia {
  width: min(100%, 210px); justify-self: center;
}
/* Stats */
.page-about .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin-top: clamp(32px, 4vw, 48px);
}
.page-about .stat {
  min-height: clamp(260px, 24vw, 340px);
  padding: clamp(26px, 2.6vw, 36px);
  background: var(--card);
  border-radius: 16px;
  font-size: var(--t-small);
  line-height: 1.5;
}
.page-about .stat .eyebrow {
  margin-bottom: 10px;
}
.page-about .stat .number {
  font-family: var(--serif); font-size: var(--t-title-3); line-height: 1.05; margin: 0 0 10px; letter-spacing: -0.02em;
}
.page-about .stat .number--words {
  font-size: var(--t-title-4);
}
/* "We're proving it properly": blue light rising from the bottom edge,
       darkening into the "Where we're going" section below. Layers are
       centred on the bottom edge (outermost first); --reach is how far up
       the colour climbs: the section's bottom padding plus half a card. */
.page-about .proving {
  --card-h: clamp(260px, 24vw, 340px);
  --reach: calc(clamp(64px, 8vw, 120px) + var(--card-h) * .5);
}
.page-about .proving .glow {
  --base: transparent;
}
.page-about.js .band.proving .glow span {
  translate: none; opacity: 1; transition: none;
}
/* static: no rise-in */
.page-about .proving .glow span {
  top: auto; bottom: 0; height: calc(var(--reach) * var(--k)); transform: translate(-50%, 50%);
}
.page-about .proving .mist {
  --c: #C9D2F2;     --x: 50%; --w: 170%; --k: 3.1;  --core: 18%; --blur: 56px;
}
.page-about .proving .sea {
  --c: var(--sea);  --x: 50%; --w: 150%; --k: 2.4;  --core: 34%; --blur: 44px;
}
.page-about .proving .cobalt {
  --c: #2F4597;     --x: 50%; --w: 135%; --k: 1.65; --core: 44%; --blur: 36px;
}
.page-about .proving .night {
  --c: #1F1A4A;     --x: 50%; --w: 150%; --k: 1.0;  --core: 52%; --blur: 28px;
}
.page-about .proving .deep {
  --c: var(--deep); --x: 50%; --w: 190%; --k: .42;  --core: 82%; --blur: 14px;
}
.page-about .on-deep {
  background: var(--deep); color: var(--cream);
}
.page-about .on-deep .eyebrow {
  color: #B9B4CF;
}
/* Footer */
.page-about .site-footer {
  background: var(--deep); color: var(--cream);
}
.page-about .site-footer .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(16px, 3vw, 40px);
  font-size: var(--t-small);
}
.page-about .site-footer .wordmark {
  color: var(--cream);
}
.page-about .site-footer .wordmark svg {
  width: 64px;
}
/* ───────── Small screens ───────── */
@media (max-width: 760px) {
  .page-about .split, .page-about .built {
    grid-template-columns: 1fr;
  }
  .page-about .figure-card {
    max-width: 340px; width: 100%; margin-inline: auto;
  }
  /* phones: only the top half of Pia (head on the pillow), fading into the blue */
  .page-about .built .pia {
    width: 180px;
    aspect-ratio: 190 / 240;          /* about half the drawing's height */
    height: auto;
    object-fit: cover;
    object-position: top;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  }
  .page-about .built {
    gap: 16px;
  }
  .page-about .hero h1 {
    max-width: none;
  }
}
/* Stats in two rows (2 + 1), then one column: the colour still
       climbs to half a card on desktop and up to the top card on phones. */
@media (max-width: 782px) {
  .page-about .proving {
    --reach: calc(clamp(64px, 8vw, 120px) + var(--card-h) * 1.5 + 14px);
  }
  .page-about .proving .glow span {
    width: calc(var(--w) * 1.4);
  }
}
@media (max-width: 516px) {
  .page-about .proving {
    --reach: calc(clamp(64px, 8vw, 120px) + var(--card-h) * 2.5 + 28px);
  }
  .page-about .proving .glow span {
    width: calc(var(--w) * 2);
  }
}
/* Phones: header and footer share the content's side gutter,
       and the open menu panel still reaches 8px from each screen edge. */
@media (max-width: 640px) {
  .page-about .site-header .bar, .page-about .site-footer .bar {
    padding-inline: var(--gutter);
  }
  .page-about.js .menu {
    right: calc(8px - var(--gutter));
  }
}
@media (max-width: 420px) {
  .page-about .site-header .bar {
    height: 64px;
  }
  .page-about .menu {
    gap: 14px;
  }
  .page-about .menu .pill {
    padding: 8px 14px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Science posts and the wash preview page (science/*.html) — every rule is scoped under .page-science on <html>
   ══════════════════════════════════════════════════════════════════════ */

/* Wspr science posts: shared styles */
:root.page-science {
  /* palette — shared with the landing and about pages */
  --night:    #130B24;
  --ink:      #120A24;
  --paper:    #F5F0E5;     /* page background */
  --card:     #FFFFFF;
  --blue:     #4880DA;     /* link underlines */
  --lavender: #BBA6F7;
  --pink:     #F6BEE5;
  --cream:    #F7F0E6;
  --deep:     #16112A;     /* footer */
  --serif: "Quaria Display", "Times New Roman", serif;
  --sans:  "DM Sans", system-ui, -apple-system, sans-serif;
  --gutter:  clamp(20px, 6vw, 100px);
  --wrap:    1152px;
  --measure: 680px;          /* article column */
  --dawn: cubic-bezier(.22, .61, .21, 1);
  /* type scale — same as about.html
  Text (DM Sans): one body size, one small size, and a caps label.
  Titles (Quaria): steps of about 1.33x (24 · 32 · 42 · 56 · 76). */
  --t-label: 12px;
  --t-small: 15px;
  --t-body:  18px;
  --t-title-5: clamp(21px, 1.67vw, 24px);   /* standfirst, "Sources" */
  --t-title-4: clamp(26px, 2.22vw, 32px);   /* article section titles */
  --t-title-3: clamp(30px, 2.92vw, 42px);
  --t-title-2: clamp(34px, 3.89vw, 56px);   /* article title */
  --t-title-1: clamp(40px, 5.28vw, 76px);
}
.page-science *, .page-science *::before, .page-science *::after {
  box-sizing: border-box;
}
html.page-science, .page-science body {
  margin: 0;
}
.page-science body {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.page-science img, .page-science svg {
  display: block; max-width: 100%;
}
.page-science p {
  margin: 0 0 1em;
}
.page-science p:last-child {
  margin-bottom: 0;
}
.page-science .wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
}
.page-science .column {
  width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto;
}
.page-science .visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Film grain over the whole page, same as the other pages.
   It ignores the pointer and screen readers skip it. */
.page-science body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  user-select: none;
  opacity: .29;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.2 0 0 0 -.8 2.2 0 0 0 -.8 2.2 0 0 0 -.8 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
/* ───────── Type ───────── */
.page-science .eyebrow {
  margin: 0 0 14px;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.page-science h1, .page-science h2, .page-science h3 {
  font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.015em;
}
/* No one-word last lines: headlines balance their lines, paragraphs
   only adjust their last few lines. Older browsers wrap as normal. */
.page-science h1, .page-science h2, .page-science h3, .page-science .standfirst, .page-science .more .ref {
  text-wrap: balance;
}
.page-science p, .page-science li {
  text-wrap: pretty;
}
/* Link underlines, as on the about page: a resting line (--u) and a
   gradient (--g1 → --g2) that glides in from the right on hover/focus. */
.page-science .ref {
  --u:  var(--blue);
  --g1: var(--blue);
  --g2: var(--night);
  color: inherit;
  text-decoration: none;
  background-image:
  linear-gradient(90deg, var(--g1), var(--g2)),
  linear-gradient(var(--u), var(--u));
  background-size: 0% 2px, 100% 1.5px;
  background-position: 100% 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: .16em;
  transition: background-size .9s cubic-bezier(.45, 0, .25, 1);
}
.page-science .ref:hover, .page-science .ref:focus-visible {
  background-size: 100% 2px, 100% 1.5px;
}
.page-science .ref.cite {
  --u: var(--lavender); --g1: var(--lavender); --g2: var(--blue); font-size: var(--t-small); font-weight: 600;
}
.page-science .ref.source {
  --u: var(--ink);      --g1: var(--blue);     --g2: var(--lavender); font-weight: 600;
}
.page-science a:focus-visible, .page-science button:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px;
}
/* ───────── Colour washes ─────────
   Every wash is the same structure: a base colour plus six blurred
   ellipses (outermost first). Each wash only changes the numbers:
   colour (--wash-c), centre (--wash-x, --wash-y), size (--wash-w × --wash-h, % of the box),
   how much is solid before it fades (--wash-core) and blur (--wash-blur, in % of
   the box width, so a thumbnail looks like a small copy of the hero).
   The properties are registered so switching washes morphs smoothly.
   Wave presets also bend each shape: a blob outline (--r1, morphing to
   --r2 as it moves), a tilt (--wash-rot) and a sway, so the layers read as
   swells rather than circles. */
.page-science .wash {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  background: var(--wash-base);
  transition: --wash-base 1.6s ease;
}
.page-science .wash .layers {
  position: absolute; inset: 0;
}
.page-science .wash .layers > * {
  position: absolute;
  left: calc(var(--wash-x) - var(--wash-w) / 2);   /* centred on (--wash-x, --wash-y) */
  top: calc(var(--wash-y) - var(--wash-h) / 2);
  width: var(--wash-w);
  height: var(--wash-h);
  border-radius: var(--r1, 50%);
  rotate: var(--wash-rot);
  background: radial-gradient(ellipse var(--wash-rx) var(--wash-ry) at 50% 50%, var(--wash-c) var(--wash-core), transparent);
  filter: blur(calc(var(--wash-blur) * 1cqw));
  transition: --wash-c 1.6s ease, --wash-x 1.8s var(--dawn), --wash-y 1.8s var(--dawn),
  --wash-w 1.8s var(--dawn), --wash-h 1.8s var(--dawn), --wash-core 1.6s ease, --wash-blur 1.6s ease,
  --wash-rx 1.6s ease, --wash-ry 1.6s ease, --wash-rot 1.8s var(--dawn), border-radius 1.8s var(--dawn);
}
/* 0 · Positional therapy — a sunrise arc from the bottom right */
.page-science [data-wash="therapy"] {
  --wash-base: #F5F0E5;
}
.page-science [data-wash="therapy"] .layers > :nth-child(1) {
  --wash-c: #FAD06A; --wash-x: 70%;  --wash-y: 130%; --wash-w: 150%; --wash-h: 165%; --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="therapy"] .layers > :nth-child(2) {
  --wash-c: #F3B9DD; --wash-x: 76%;  --wash-y: 133%; --wash-w: 115%; --wash-h: 130%; --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="therapy"] .layers > :nth-child(3) {
  --wash-c: #BBA6EE; --wash-x: 84%;  --wash-y: 136%; --wash-w: 84%;  --wash-h: 100%; --wash-core: 52%; --wash-blur: 3;
}
.page-science [data-wash="therapy"] .layers > :nth-child(4) {
  --wash-c: #8E9BE0; --wash-x: 95%;  --wash-y: 140%; --wash-w: 54%;  --wash-h: 74%;  --wash-core: 45%; --wash-blur: 3;
}
/* 1 · Breathing — night, with dawn breaking at the right edge */
.page-science [data-wash="breathe"] {
  --wash-base: #130B24;
}
.page-science [data-wash="breathe"] .layers > :nth-child(1) {
  --wash-c: #1E2A5E; --wash-x: 80%;  --wash-y: 50%;  --wash-w: 150%; --wash-h: 230%; --wash-core: 40%; --wash-blur: 6;
}
.page-science [data-wash="breathe"] .layers > :nth-child(2) {
  --wash-c: #3361B3; --wash-x: 100%; --wash-y: 45%;  --wash-w: 130%; --wash-h: 220%; --wash-core: 42%; --wash-blur: 5;
}
.page-science [data-wash="breathe"] .layers > :nth-child(3) {
  --wash-c: #5B88D0; --wash-x: 105%; --wash-y: 40%;  --wash-w: 85%;  --wash-h: 170%; --wash-core: 45%; --wash-blur: 4;
}
.page-science [data-wash="breathe"] .layers > :nth-child(4) {
  --wash-c: #F1BBDD; --wash-x: 108%; --wash-y: 32%;  --wash-w: 46%;  --wash-h: 130%; --wash-core: 48%; --wash-blur: 4;
}
.page-science [data-wash="breathe"] .layers > :nth-child(5) {
  --wash-c: #F7E9E4; --wash-x: 106%; --wash-y: 22%;  --wash-w: 22%;  --wash-h: 80%;  --wash-core: 40%; --wash-blur: 3;
}
.page-science [data-wash="breathe"] .layers > :nth-child(6) {
  --wash-c: #F08A55; --wash-x: 101%; --wash-y: 108%; --wash-w: 18%;  --wash-h: 34%;  --wash-core: 30%; --wash-blur: 3;
}
/* 2 · How Wspr knows — a blue eye opening at the right edge */
.page-science [data-wash="knows"] {
  --wash-base: #FAF8F5;
}
.page-science [data-wash="knows"] .layers > :nth-child(1) {
  --wash-c: #F6EAD3; --wash-x: 100%; --wash-y: 50%;  --wash-w: 150%; --wash-h: 115%; --wash-core: 50%; --wash-blur: 4;
}
.page-science [data-wash="knows"] .layers > :nth-child(2) {
  --wash-c: #F1B6D8; --wash-x: 104%; --wash-y: 50%;  --wash-w: 112%; --wash-h: 84%;  --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="knows"] .layers > :nth-child(3) {
  --wash-c: #B6A6DA; --wash-x: 107%; --wash-y: 50%;  --wash-w: 72%;  --wash-h: 58%;  --wash-core: 50%; --wash-blur: 3;
}
.page-science [data-wash="knows"] .layers > :nth-child(4) {
  --wash-c: #3F6DC0; --wash-x: 108%; --wash-y: 50%;  --wash-w: 52%;  --wash-h: 50%;  --wash-core: 45%; --wash-blur: 3;
}
.page-science [data-wash="knows"] .layers > :nth-child(5) {
  --wash-c: #1F3E8A; --wash-x: 108%; --wash-y: 50%;  --wash-w: 24%;  --wash-h: 26%;  --wash-core: 40%; --wash-blur: 2;
}
/* 3 · On the device — a yellow ring around a small blue core */
.page-science [data-wash="device"] {
  --wash-base: #F5F0E5;
}
.page-science [data-wash="device"] .layers > :nth-child(1) {
  --wash-c: #F6EDDC; --wash-x: 100%; --wash-y: 50%;  --wash-w: 120%; --wash-h: 130%; --wash-core: 50%; --wash-blur: 4;
}
.page-science [data-wash="device"] .layers > :nth-child(2) {
  --wash-c: #F8CB5E; --wash-x: 100%; --wash-y: 50%;  --wash-w: 90%;  --wash-h: 102%; --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="device"] .layers > :nth-child(3) {
  --wash-c: #F2B5D5; --wash-x: 102%; --wash-y: 50%;  --wash-w: 60%;  --wash-h: 72%;  --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="device"] .layers > :nth-child(4) {
  --wash-c: #B4A4D8; --wash-x: 104%; --wash-y: 50%;  --wash-w: 40%;  --wash-h: 46%;  --wash-core: 50%; --wash-blur: 3;
}
.page-science [data-wash="device"] .layers > :nth-child(5) {
  --wash-c: #5F86C9; --wash-x: 104%; --wash-y: 50%;  --wash-w: 28%;  --wash-h: 34%;  --wash-core: 40%; --wash-blur: 2;
}
/* 4 · Measuring and worry — a diagonal sweep from the top right */
.page-science [data-wash="worry"] {
  --wash-base: #F3DDB0;
}
.page-science [data-wash="worry"] .layers > :nth-child(1) {
  --wash-c: #F6E6DF; --wash-x: 92%;  --wash-y: -10%; --wash-w: 240%; --wash-h: 250%; --wash-core: 45%; --wash-blur: 6;
}
.page-science [data-wash="worry"] .layers > :nth-child(2) {
  --wash-c: #EDB2D6; --wash-x: 100%; --wash-y: -20%; --wash-w: 190%; --wash-h: 215%; --wash-core: 55%; --wash-blur: 5;
}
.page-science [data-wash="worry"] .layers > :nth-child(3) {
  --wash-c: #AB98CF; --wash-x: 106%; --wash-y: -28%; --wash-w: 140%; --wash-h: 165%; --wash-core: 50%; --wash-blur: 5;
}
.page-science [data-wash="worry"] .layers > :nth-child(4) {
  --wash-c: #3F6AB8; --wash-x: 110%; --wash-y: -36%; --wash-w: 80%;  --wash-h: 105%; --wash-core: 40%; --wash-blur: 5;
}
/* 5 · The person beside you — two warm bodies, side by side */
.page-science [data-wash="beside"] {
  --wash-base: #F5F0E5;
}
.page-science [data-wash="beside"] .layers > :nth-child(1) {
  --wash-c: #F4DDE5; --wash-x: 85%;  --wash-y: 10%;  --wash-w: 75%;  --wash-h: 95%;  --wash-core: 40%; --wash-blur: 6;
}
.page-science [data-wash="beside"] .layers > :nth-child(2) {
  --wash-c: #C9A6D8; --wash-x: 102%; --wash-y: 18%;  --wash-w: 42%;  --wash-h: 62%;  --wash-core: 40%; --wash-blur: 5;
}
.page-science [data-wash="beside"] .layers > :nth-child(3) {
  --wash-c: #F5BC97; --wash-x: 68%;  --wash-y: 88%;  --wash-w: 92%;  --wash-h: 72%;  --wash-core: 30%; --wash-blur: 6;
}
.page-science [data-wash="beside"] .layers > :nth-child(4) {
  --wash-c: #F07E4E; --wash-x: 86%;  --wash-y: 86%;  --wash-w: 60%;  --wash-h: 52%;  --wash-core: 40%; --wash-blur: 5;
}
.page-science [data-wash="beside"] .layers > :nth-child(5) {
  --wash-c: #B7A5DD; --wash-x: 100%; --wash-y: -4%;  --wash-w: 16%;  --wash-h: 30%;  --wash-core: 40%; --wash-blur: 3;
}
/* 6 · Night after night — tall bands, one night after another */
.page-science [data-wash="nightly"] {
  --wash-base: #F5F0E5;
}
.page-science [data-wash="nightly"] .layers > :nth-child(1) {
  --wash-c: #9DAAD6; --wash-x: 112%; --wash-y: 50%;  --wash-w: 150%; --wash-h: 270%; --wash-core: 50%; --wash-blur: 3;
}
.page-science [data-wash="nightly"] .layers > :nth-child(2) {
  --wash-c: #E6A9D2; --wash-x: 116%; --wash-y: 50%;  --wash-w: 110%; --wash-h: 250%; --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="nightly"] .layers > :nth-child(3) {
  --wash-c: #F8B07A; --wash-x: 119%; --wash-y: 50%;  --wash-w: 80%;  --wash-h: 230%; --wash-core: 55%; --wash-blur: 3;
}
.page-science [data-wash="nightly"] .layers > :nth-child(4) {
  --wash-c: #2D4282; --wash-x: 116%; --wash-y: 50%;  --wash-w: 60%;  --wash-h: 210%; --wash-core: 50%; --wash-blur: 3;
}
.page-science [data-wash="nightly"] .layers > :nth-child(5) {
  --wash-c: #1C2550; --wash-x: 118%; --wash-y: 50%;  --wash-w: 36%;  --wash-h: 170%; --wash-core: 45%; --wash-blur: 3;
}
/* 7 · Pregnancy — a soft pink and lavender bloom */
.page-science [data-wash="pregnancy"] {
  --wash-base: #F5F0E5;
}
.page-science [data-wash="pregnancy"] .layers > :nth-child(1) {
  --wash-c: #F5E8DF; --wash-x: 90%;  --wash-y: 60%;  --wash-w: 115%; --wash-h: 115%; --wash-core: 50%; --wash-blur: 4;
}
.page-science [data-wash="pregnancy"] .layers > :nth-child(2) {
  --wash-c: #EFB5D6; --wash-x: 95%;  --wash-y: 60%;  --wash-w: 82%;  --wash-h: 92%;  --wash-core: 55%; --wash-blur: 4;
}
.page-science [data-wash="pregnancy"] .layers > :nth-child(3) {
  --wash-c: #A99AD0; --wash-x: 100%; --wash-y: 60%;  --wash-w: 52%;  --wash-h: 62%;  --wash-core: 55%; --wash-blur: 4;
}
.page-science [data-wash="pregnancy"] .layers > :nth-child(4) {
  --wash-c: #B9C8DE; --wash-x: 100%; --wash-y: -6%;  --wash-w: 26%;  --wash-h: 42%;  --wash-core: 40%; --wash-blur: 3;
}
/* 8 · Madrid study — from warm pink into a deep blue night */
.page-science [data-wash="madrid"] {
  --wash-base: #F2E3E7;
}
.page-science [data-wash="madrid"] .layers > :nth-child(1) {
  --wash-c: #ECB2D3; --wash-x: 110%; --wash-y: 40%;  --wash-w: 170%; --wash-h: 270%; --wash-core: 45%; --wash-blur: 4;
}
.page-science [data-wash="madrid"] .layers > :nth-child(2) {
  --wash-c: #8E8FCC; --wash-x: 112%; --wash-y: 40%;  --wash-w: 122%; --wash-h: 235%; --wash-core: 45%; --wash-blur: 4;
}
.page-science [data-wash="madrid"] .layers > :nth-child(3) {
  --wash-c: #2F65AE; --wash-x: 115%; --wash-y: 40%;  --wash-w: 92%;  --wash-h: 215%; --wash-core: 50%; --wash-blur: 4;
}
.page-science [data-wash="madrid"] .layers > :nth-child(4) {
  --wash-c: #1D3A5F; --wash-x: 120%; --wash-y: 40%;  --wash-w: 60%;  --wash-h: 195%; --wash-core: 55%; --wash-blur: 4;
}
.page-science [data-wash="madrid"] .layers > :nth-child(5) {
  --wash-c: #E9905E; --wash-x: -4%;  --wash-y: 108%; --wash-w: 22%;  --wash-h: 38%;  --wash-core: 30%; --wash-blur: 3;
}
/* ── Wave presets ──
   Same six-layer stack, but each layer is a solid blob (--wash-rx/--wash-ry 75%,
   --wash-core 100% fill the whole box) whose outline comes from an uneven
   border-radius, tilted so the bands run like swells. */
.page-science :is([data-wash="tide"], [data-wash="swell"], [data-wash="lagoon"], [data-wash="aurora"], [data-wash="embers"]) .layers > * {
  --wash-rx: 75%; --wash-ry: 75%; --wash-core: 100%;
}
/* 9 · Tide — dusk swells rolling in along the bottom */
.page-science [data-wash="tide"] {
  --wash-base: #F5F0E5;
}
.page-science [data-wash="tide"] .layers > :nth-child(1) {
  --wash-c: #F6E1D6; --wash-x: 62%;  --wash-y: 72%;  --wash-w: 175%; --wash-h: 64%; --wash-rot: -7deg;  --wash-blur: 3;   --r1: 46% 54% 38% 62% / 62% 44% 56% 38%; --r2: 54% 46% 58% 42% / 44% 60% 40% 56%;
}
.page-science [data-wash="tide"] .layers > :nth-child(2) {
  --wash-c: #F1B6D8; --wash-x: 66%;  --wash-y: 86%;  --wash-w: 165%; --wash-h: 50%; --wash-rot: -5deg;  --wash-blur: 2;   --r1: 60% 40% 55% 45% / 45% 62% 38% 55%; --r2: 42% 58% 45% 55% / 60% 42% 58% 40%;
}
.page-science [data-wash="tide"] .layers > :nth-child(3) {
  --wash-c: #B1A2E2; --wash-x: 71%;  --wash-y: 98%;  --wash-w: 155%; --wash-h: 42%; --wash-rot: -9deg;  --wash-blur: 1.6; --r1: 40% 60% 46% 54% / 56% 40% 60% 44%; --r2: 58% 42% 52% 48% / 42% 58% 42% 58%;
}
.page-science [data-wash="tide"] .layers > :nth-child(4) {
  --wash-c: #5C84D6; --wash-x: 77%;  --wash-y: 109%; --wash-w: 140%; --wash-h: 38%; --wash-rot: -5deg;  --wash-blur: 1.4; --r1: 55% 45% 60% 40% / 40% 55% 45% 60%; --r2: 45% 55% 40% 60% / 58% 42% 60% 40%;
}
.page-science [data-wash="tide"] .layers > :nth-child(5) {
  --wash-c: #2B3F86; --wash-x: 85%;  --wash-y: 119%; --wash-w: 120%; --wash-h: 30%; --wash-rot: -7deg;  --wash-blur: 1.2; --r1: 48% 52% 42% 58% / 60% 40% 60% 40%; --r2: 56% 44% 54% 46% / 40% 60% 40% 60%;
}
/* 10 · Swell — a warm ember wave breaking in the bottom right */
.page-science [data-wash="swell"] {
  --wash-base: #F7EFE6;
}
.page-science [data-wash="swell"] .layers > :nth-child(1) {
  --wash-c: #F8DDD3; --wash-x: 76%;  --wash-y: 62%;  --wash-w: 120%; --wash-h: 88%; --wash-rot: 12deg;  --wash-blur: 5;   --r1: 52% 48% 40% 60% / 58% 42% 58% 42%; --r2: 44% 56% 56% 44% / 42% 58% 44% 56%;
}
.page-science [data-wash="swell"] .layers > :nth-child(2) {
  --wash-c: #F8B996; --wash-x: 83%;  --wash-y: 80%;  --wash-w: 110%; --wash-h: 66%; --wash-rot: 17deg;  --wash-blur: 3.5; --r1: 62% 38% 52% 48% / 46% 60% 40% 54%; --r2: 46% 54% 40% 60% / 58% 42% 60% 40%;
}
.page-science [data-wash="swell"] .layers > :nth-child(3) {
  --wash-c: #EF7A45; --wash-x: 92%;  --wash-y: 97%;  --wash-w: 92%;  --wash-h: 52%; --wash-rot: 13deg;  --wash-blur: 3;   --r1: 40% 60% 58% 42% / 60% 44% 56% 40%; --r2: 56% 44% 44% 56% / 44% 58% 42% 58%;
}
.page-science [data-wash="swell"] .layers > :nth-child(4) {
  --wash-c: #EBA4CF; --wash-x: 68%;  --wash-y: 112%; --wash-w: 125%; --wash-h: 38%; --wash-rot: 4deg;   --wash-blur: 3;   --r1: 58% 42% 46% 54% / 42% 56% 44% 58%; --r2: 44% 56% 56% 44% / 58% 44% 56% 42%;
}
.page-science [data-wash="swell"] .layers > :nth-child(5) {
  --wash-c: #FBD27A; --wash-x: 102%; --wash-y: 42%;  --wash-w: 40%;  --wash-h: 48%; --wash-rot: -20deg; --wash-blur: 3;   --r1: 60% 40% 50% 50% / 50% 60% 40% 50%; --r2: 44% 56% 60% 40% / 56% 44% 56% 44%;
}
/* 11 · Lagoon — blue and sun bands sliding down from the top right */
.page-science [data-wash="lagoon"] {
  --wash-base: #F3F0EA;
}
.page-science [data-wash="lagoon"] .layers > :nth-child(1) {
  --wash-c: #CBC0F0; --wash-x: 84%;  --wash-y: 14%;  --wash-w: 95%; --wash-h: 44%; --wash-rot: -14deg; --wash-blur: 4;   --r1: 50% 50% 38% 62% / 60% 44% 56% 40%; --r2: 58% 42% 56% 44% / 42% 58% 42% 58%;
}
.page-science [data-wash="lagoon"] .layers > :nth-child(2) {
  --wash-c: #6E95DE; --wash-x: 82%;  --wash-y: 54%;  --wash-w: 102%; --wash-h: 36%; --wash-rot: -10deg; --wash-blur: 3;   --r1: 62% 38% 48% 52% / 44% 60% 40% 56%; --r2: 44% 56% 58% 42% / 58% 42% 58% 42%;
}
.page-science [data-wash="lagoon"] .layers > :nth-child(3) {
  --wash-c: #FAD27A; --wash-x: 70%;  --wash-y: 84%;  --wash-w: 125%; --wash-h: 32%; --wash-rot: -6deg;  --wash-blur: 3;   --r1: 42% 58% 54% 46% / 58% 42% 60% 40%; --r2: 56% 44% 42% 58% / 42% 58% 44% 56%;
}
.page-science [data-wash="lagoon"] .layers > :nth-child(4) {
  --wash-c: #F2B9DA; --wash-x: 90%;  --wash-y: 102%; --wash-w: 100%; --wash-h: 30%; --wash-rot: -12deg; --wash-blur: 3;   --r1: 56% 44% 60% 40% / 40% 56% 44% 60%; --r2: 44% 56% 44% 56% / 58% 44% 58% 42%;
}
.page-science [data-wash="lagoon"] .layers > :nth-child(5) {
  --wash-c: #3F69B5; --wash-x: 104%; --wash-y: 40%;  --wash-w: 40%;  --wash-h: 38%; --wash-rot: -10deg; --wash-blur: 2.6; --r1: 48% 52% 40% 60% / 56% 44% 60% 40%; --r2: 58% 42% 56% 44% / 42% 58% 42% 58%;
}
/* 12 · Aurora — ribbons of light across a night sky */
.page-science [data-wash="aurora"] {
  --wash-base: #130B24;
}
.page-science [data-wash="aurora"] .layers > :nth-child(1) {
  --wash-c: #24306A; --wash-x: 60%;  --wash-y: 62%;  --wash-w: 170%; --wash-h: 86%; --wash-rot: -12deg; --wash-blur: 6;   --r1: 50% 50% 40% 60% / 60% 40% 60% 40%; --r2: 56% 44% 56% 44% / 44% 56% 44% 56%;
}
.page-science [data-wash="aurora"] .layers > :nth-child(2) {
  --wash-c: #3C67C2; --wash-x: 72%;  --wash-y: 70%;  --wash-w: 140%; --wash-h: 42%; --wash-rot: -14deg; --wash-blur: 3.5; --r1: 60% 40% 52% 48% / 44% 60% 40% 56%; --r2: 44% 56% 42% 58% / 58% 42% 58% 42%;
}
.page-science [data-wash="aurora"] .layers > :nth-child(3) {
  --wash-c: #9C8BE8; --wash-x: 78%;  --wash-y: 52%;  --wash-w: 112%; --wash-h: 24%; --wash-rot: -18deg; --wash-blur: 2.6; --r1: 42% 58% 56% 44% / 60% 40% 58% 42%; --r2: 58% 42% 44% 56% / 42% 60% 40% 58%;
}
.page-science [data-wash="aurora"] .layers > :nth-child(4) {
  --wash-c: #EBA9DA; --wash-x: 86%;  --wash-y: 40%;  --wash-w: 82%;  --wash-h: 15%; --wash-rot: -20deg; --wash-blur: 2.2; --r1: 56% 44% 60% 40% / 40% 60% 40% 60%; --r2: 44% 56% 42% 58% / 60% 40% 60% 40%;
}
.page-science [data-wash="aurora"] .layers > :nth-child(5) {
  --wash-c: #F7C77A; --wash-x: 96%;  --wash-y: 30%;  --wash-w: 42%;  --wash-h: 9%;  --wash-rot: -22deg; --wash-blur: 2;   --r1: 50% 50% 50% 50% / 60% 40% 60% 40%; --r2: 50% 50% 50% 50% / 40% 60% 40% 60%;
}
/* 13 · Embers — a night sky with warm swells smouldering along the bottom */
.page-science [data-wash="embers"] {
  --wash-base: #16112A;
}
.page-science [data-wash="embers"] .layers > :nth-child(1) {
  --wash-c: #2A1F55; --wash-x: 55%;  --wash-y: 88%;  --wash-w: 175%; --wash-h: 72%; --wash-rot: 6deg;  --wash-blur: 5;   --r1: 48% 52% 40% 60% / 60% 42% 58% 40%; --r2: 56% 44% 56% 44% / 42% 58% 42% 58%;
}
.page-science [data-wash="embers"] .layers > :nth-child(2) {
  --wash-c: #5B3F8F; --wash-x: 64%;  --wash-y: 97%; --wash-w: 152%; --wash-h: 52%; --wash-rot: 4deg;  --wash-blur: 3;   --r1: 60% 40% 52% 48% / 44% 60% 40% 56%; --r2: 44% 56% 42% 58% / 58% 42% 58% 42%;
}
.page-science [data-wash="embers"] .layers > :nth-child(3) {
  --wash-c: #C77BB8; --wash-x: 72%;  --wash-y: 104%; --wash-w: 130%; --wash-h: 40%; --wash-rot: 7deg;  --wash-blur: 2.4; --r1: 42% 58% 56% 44% / 60% 40% 58% 42%; --r2: 58% 42% 44% 56% / 42% 60% 40% 58%;
}
.page-science [data-wash="embers"] .layers > :nth-child(4) {
  --wash-c: #EE6A33; --wash-x: 80%;  --wash-y: 110%; --wash-w: 110%; --wash-h: 32%; --wash-rot: 5deg;  --wash-blur: 2.2; --r1: 56% 44% 60% 40% / 40% 60% 40% 60%; --r2: 44% 56% 42% 58% / 60% 40% 60% 40%;
}
.page-science [data-wash="embers"] .layers > :nth-child(5) {
  --wash-c: #FECF68; --wash-x: 88%;  --wash-y: 114%; --wash-w: 70%;  --wash-h: 20%; --wash-rot: 6deg;  --wash-blur: 2;   --r1: 50% 50% 46% 54% / 60% 40% 60% 40%; --r2: 52% 48% 54% 46% / 40% 60% 40% 60%;
}
/* ───────── Hero ───────── */
.page-science .hero {
  --hero-ink: var(--ink);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(464px, 41.4vw, 646px);
  padding-bottom: clamp(72px, 9vw, 140px);
  color: var(--hero-ink);
  transition: color 1.2s ease;
}
.page-science .hero .wash {
  z-index: -1;
}
/* the night wash needs light text */
.page-science .hero:has(> .wash:is([data-wash="breathe"], [data-wash="aurora"], [data-wash="embers"])) {
  --hero-ink: var(--cream);
}
/* washes that go dark at the top right keep the "Back to About" link light */
@media (min-width: 641px) {
  /* on phones the shapes sit lower, so the corner stays light */
  .page-science .hero:has(> .wash:is([data-wash="madrid"], [data-wash="nightly"])) .back {
    color: var(--cream);
  }
}
.page-science .back {
  transition: color 1.2s ease;
}
.page-science .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
  padding-inline: clamp(16px, 3vw, 40px);
}
.page-science .wordmark {
  color: inherit;
}
.page-science .wordmark svg {
  width: clamp(64px, 6vw, 84px); height: auto;
}
.page-science .back {
  color: inherit;
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .3em;
}
.page-science .hero-copy {
  padding-top: clamp(48px, 7vw, 110px);
}
/* The label stays on the page edge; the title, standfirst and switcher
   share the article's column so they line up with the body text. */
.page-science .hero-copy > :not(.eyebrow) {
  width: min(100%, var(--measure)); margin-inline: auto;
}
.page-science .hero-copy > .eyebrow {
  display: block;
  width: max-content;
  /* below 1100px it sits above the title, on the column's left edge */
  margin-left: max(0px, (100% - var(--measure)) / 2);
  margin-bottom: clamp(20px, 2.4vw, 32px);
  padding: 7px 14px 6px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);          /* stays dark on the night washes too */
}
/* Wide screens: the pill sits in the left margin, its top level with
   the top of the title's capitals; the title block keeps the article column. */
@media (min-width: 1100px) {
  .page-science .hero-copy {
    display: grid;
    grid-template-columns: 1fr min(100%, var(--measure)) 1fr;
    align-items: start;
  }
  .page-science .hero-copy > * {
    grid-column: 2;
  }
  .page-science .hero-copy > :not(.eyebrow) {
    width: auto; margin-inline: 0;
  }
  .page-science .hero-copy > .eyebrow {
    grid-column: 1;
    grid-row: 1;
    margin: calc(var(--t-title-2) * .14) 0 0;   /* line up with the cap height, not the line box */
  }
}
.page-science .hero h1 {
  font-size: var(--t-title-2); line-height: 1.05; margin-bottom: clamp(20px, 2vw, 28px);
}
.page-science .standfirst {
  font-family: var(--serif); font-size: var(--t-title-5); line-height: 1.3;
}
/* Wash switcher */
.page-science .switcher {
  margin-top: clamp(28px, 3vw, 40px);
}
.page-science .switcher .eyebrow {
  margin-bottom: 10px;
}
.page-science .swatches {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none;
}
.page-science .swatch {
  position: relative;
  width: 48px;
  aspect-ratio: 48 / 28;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color .3s ease, transform .2s ease;
}
.page-science .swatch .wash {
  border-radius: inherit;
}
.page-science .swatch:hover {
  transform: translateY(-2px);
}
.page-science .swatch[aria-pressed="true"] {
  outline-color: currentColor;
}
.page-science .swatch:focus-visible {
  outline-color: var(--blue);
}
.page-science .wash-name {
  margin: 12px 0 0; font-size: var(--t-small); min-height: 1.6em;
}
/* ───────── Article ───────── */
.page-science .article {
  padding-block: clamp(64px, 8vw, 120px);
}
.page-science .article h2 {
  font-size: var(--t-title-4); line-height: 1.1; margin: 0 0 18px;
}
.page-science .article * + h2 {
  margin-top: clamp(48px, 5vw, 72px);
}
.page-science .article h3 {
  font-size: var(--t-title-5); line-height: 1.2; margin: clamp(48px, 5vw, 64px) 0 16px;
}
.page-science .sources {
  margin: 0; padding-left: 1.3em; font-size: var(--t-small); line-height: 1.55;
}
.page-science .sources li {
  padding-left: .2em; margin-bottom: 12px; scroll-margin-top: 30vh;
}
.page-science .sources li:target {
  background: color-mix(in srgb, var(--lavender) 22%, transparent); border-radius: 6px; transition: background-color 1.5s ease;
}
@media (prefers-reduced-motion: no-preference) {
  html.page-science {
    scroll-behavior: smooth;
  }
}
.page-science .sources li:last-child {
  margin-bottom: 0;
}
/* ───────── More from the blog ───────── */
.page-science .more {
  background: var(--card); padding-block: clamp(56px, 7vw, 100px);
}
.page-science .more ul {
  margin: 0; padding: 0; list-style: none;
}
.page-science .more ul {
  margin-top: 8px;
}
.page-science .more li {
  display: flex; align-items: center; gap: 18px; margin-bottom: 22px;
}
.page-science .more li:last-child {
  margin-bottom: 0;
}
.page-science .more .thumb {
  position: relative; flex: none; width: 76px; aspect-ratio: 76 / 34; border-radius: 999px; overflow: hidden;
}
.page-science .more .thumb .wash {
  border-radius: inherit;
}
/* dark resting line; on hover a dark → blue gradient glides in from the right */
.page-science .more .ref {
  --u: var(--ink); --g1: var(--ink); --g2: var(--blue); font-weight: 500;
}
.page-science .more li {
  position: relative;
}
.page-science .more .ref::after {
  content: ""; position: absolute; inset: -6px 0;
}
/* the pill and title are one click target */
/* The link itself is a flex item (a block), so its underline would sit under the
   whole box. The title span stays inline, so the line follows each line of text. */
.page-science .more .ref {
  background: none; padding: 0;
}
.page-science .more .ref > span {
  background-image: linear-gradient(90deg, var(--g1), var(--g2)), linear-gradient(var(--u), var(--u));
  background-size: 0% 2px, 100% 1.5px;
  background-position: 100% 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: .16em;
  transition: background-size .9s cubic-bezier(.45, 0, .25, 1);
}
.page-science .more li:hover .ref > span, .page-science .more .ref:focus-visible > span {
  background-size: 100% 2px, 100% 1.5px;
}
/* ───────── Footer ───────── */
.page-science .site-footer {
  background: var(--deep); color: var(--cream);
}
.page-science .site-footer .bar {
  height: auto; padding-block: 28px; font-size: var(--t-small);
}
.page-science .site-footer a {
  color: inherit; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .3em;
}
.page-science .site-footer p {
  margin: 0;
}
/* ───────── Motion ─────────
   The hero wash rises in on load, then each shape drifts slowly on
   its own loop, so the light never quite sits still. Thumbnails stay put. */
@media (prefers-reduced-motion: no-preference) {
  .page-science.js .hero .layers {
    animation: wash-rise 2.6s var(--dawn) .2s both;
  }
  .page-science .hero .wash .layers > * {
    animation: wash-drift var(--dur) ease-in-out var(--delay) infinite alternate,
    undulate calc(var(--dur) * .6) ease-in-out var(--delay) infinite alternate;
  }
  .page-science .hero .wash .layers > :nth-child(1) {
    --dur: 26s; --delay: -4s;  --dx: -3%; --dy: 2%;  --ds: 1.04;
  }
  .page-science .hero .wash .layers > :nth-child(2) {
    --dur: 22s; --delay: -9s;  --dx: 4%;  --dy: -3%; --ds: 1.06;
  }
  .page-science .hero .wash .layers > :nth-child(3) {
    --dur: 19s; --delay: -2s;  --dx: -4%; --dy: -4%; --ds: .96;
  }
  .page-science .hero .wash .layers > :nth-child(4) {
    --dur: 17s; --delay: -7s;  --dx: 5%;  --dy: 3%;  --ds: 1.08;
  }
  .page-science .hero .wash .layers > :nth-child(5) {
    --dur: 15s; --delay: -11s; --dx: -6%; --dy: 4%;  --ds: 1.1;
  }
  .page-science .hero .wash .layers > :nth-child(6) {
    --dur: 21s; --delay: -5s;  --dx: 4%;  --dy: -5%; --ds: .94;
  }
  .page-science.js .hero-copy > * {
    animation: post-appear 1.2s ease both;
  }
  .page-science.js .hero-copy > :nth-child(1) {
    animation-delay: .9s;
  }
  .page-science.js .hero-copy > :nth-child(2) {
    animation-delay: 1.1s;
  }
  .page-science.js .hero-copy > :nth-child(3) {
    animation-delay: 1.4s;
  }
  .page-science.js .hero-copy > :nth-child(4) {
    animation-delay: 1.8s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-science .wash, .page-science .wash .layers > *, .page-science .hero {
    transition: none;
  }
  .page-science .ref, .page-science .more .ref > span {
    transition: none;
  }
}
/* wave presets: the outline morphs from --r1 to --r2 and the band sways a
   few degrees; on the round presets both values match, so nothing changes */
.page-science :is([data-wash="tide"], [data-wash="swell"], [data-wash="lagoon"], [data-wash="aurora"], [data-wash="embers"]) .layers > :nth-child(odd) {
  --sway: 3deg;
}
.page-science :is([data-wash="tide"], [data-wash="swell"], [data-wash="lagoon"], [data-wash="aurora"], [data-wash="embers"]) .layers > :nth-child(even) {
  --sway: -3deg;
}
/* ───────── Small screens ───────── */
@media (max-width: 640px) {
  .page-science .hero {
    min-height: 0; padding-bottom: 36vw;
  }
  /* leave room under the text for the wash */
  .page-science .article {
    padding-top: 40px;
  }
  .page-science .hero .wash .layers {
    top: 30%;
  }
  /* keep the shapes in the lower part */
  .page-science .swatches {
    gap: 8px;
  }
  .page-science .swatch {
    width: 44px;
  }
  .page-science .bar {
    padding-inline: var(--gutter);
  }
  /* header and footer share the content's edge */
  .page-science .site-footer .bar {
    flex-direction: column; align-items: flex-start; gap: 8px;
  }
}
/* The wash switcher is a preview tool: it only appears with ?tune in the address */
.page-science .switcher[hidden] {
  display: none;
}
/* Wash preview page: a grid of every wash under the usual hero */
.page-science .gallery {
  padding-block: clamp(56px, 7vw, 100px);
}
.page-science .gallery .wrap > .eyebrow {
  margin-bottom: 18px;
}
.page-science .tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none;
}
.page-science .tile {
  display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.page-science .tile-wash {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s ease, transform .2s ease;
}
.page-science .tile:hover .tile-wash {
  transform: translateY(-2px);
}
.page-science .tile[aria-pressed="true"] .tile-wash {
  outline-color: var(--ink);
}
.page-science .tile:focus-visible {
  outline: none;
}
.page-science .tile:focus-visible .tile-wash {
  outline-color: var(--blue);
}
.page-science .tile-name {
  display: block; margin-top: 12px; font-weight: 500;
}
.page-science .tile-kind {
  display: block; font-size: var(--t-small); opacity: .7;
}
.page-science .tile-kind code {
  font-family: inherit;
}
