/* =========================================================
   Fonts: self-hosted (latin + latin-ext). Archivo is variable
   (wdth 62-125, wght 100-900).
   ========================================================= */
/* Archivo italic 100 900 (latin-ext) */
@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Archivo italic 100 900 (latin) */
@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Archivo normal 100 900 (latin-ext) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Archivo normal 100 900 (latin) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Bangers normal 400 (latin-ext) */
@font-face {
  font-family: "Bangers";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bangers-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Bangers normal 400 (latin) */
@font-face {
  font-family: "Bangers";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bangers-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Geist Mono normal 400 (latin-ext) */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/geist-mono-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Geist Mono normal 400 (latin) */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/geist-mono-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Geist Mono normal 500 (latin-ext) */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/geist-mono-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Geist Mono normal 500 (latin) */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/geist-mono-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Poppins normal 400 (latin-ext) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Poppins normal 400 (latin) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Poppins normal 500 (latin-ext) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Poppins normal 500 (latin) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Poppins normal 600 (latin-ext) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Poppins normal 600 (latin) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Poppins normal 700 (latin-ext) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Poppins normal 700 (latin) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* =========================================================
   Palette: Klein blue / ink / paper. Change --blue to rebrand.
   ========================================================= */
:root {
  --blue: #1f2cff;
  --orange: #ee6722;      /* mezi brand orange */
  --orange-hi: #f5832f;
  --mit-red: #a31f34;
  --orange-lo: #ea5c20;
  --mezi-ink: #14110f;
  --blue-hi: #4250ff;
  --pop: #ffd43b;         /* comic yellow */
  --comic: "Bangers", "Archivo", system-ui, sans-serif;
  --ink: #0c0c0d;
  --paper: #e9e8e3;
  --paper-dim: #c9c8c2;
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(16px, 3.2vw, 44px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);  /* a little overshoot = a little life */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
/* while the fonts load: just the hero's blue, then everything fades in at once */
html.is-loading { background: var(--blue); }
html.is-loading body { opacity: 0; }
body { transition: opacity .35s var(--ease); }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.45 var(--display);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--blue); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* placeholder text — delete this class as you fill things in */
.tbd {
  text-decoration: underline dashed 1px;
  text-underline-offset: .18em;
  opacity: .45;
}

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- Nav bar: compact, top centre; formed by shards (main.js) ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 120; pointer-events: none; }
.bar__pill {
  position: fixed; top: 16px; left: 50%; translate: -50% 0;
  height: 58px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 8px 0 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px -18px rgba(20, 17, 13, .3), 0 2px 6px -2px rgba(20, 17, 13, .06);
  color: #2d2823;
  opacity: 0; visibility: hidden;
}
.bar.is-docked .bar__pill { opacity: 1; visibility: visible; pointer-events: auto; }

/* the hero letters orbiting a little sun on their way into the bar (positioned by main.js) */
.bar__shards { position: fixed; inset: 0; z-index: 121; pointer-events: none; display: none; }
.bar__shards.is-on { display: block; }
.bar__shards > * { position: absolute; left: 0; top: 0; will-change: transform; }
.orbit-path { border: 1px solid rgba(31, 44, 255, .22); border-radius: 50%; }
/* while the flying letters are landing on (or leaving) the hero name, lift my
   photo above their overlay so it never ducks behind them */
.me-over .hero__name { z-index: auto; }
.me-over .me { z-index: 122; }
/* the "sun": my photo, glowing; it lands exactly on the nav photo */
.orbit-sun {
  z-index: 2; border-radius: 50%; overflow: hidden;
  background: var(--blue);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(31, 44, 255, .25), 0 0 40px 8px rgba(66, 80, 255, .3);
}
.orbit-sun img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
/* a letter in flight: the hero glyph (a) cross-fades into the nav glyph (b) as it lands */
.fly { line-height: 1; white-space: pre; opacity: 0; }
.fly > span { position: absolute; left: 0; top: 0; translate: -50% -50%; }
.fly__a { font-family: var(--display); line-height: .8; text-transform: uppercase; color: var(--paper); }
.fly__b { font: 600 1em/1.2 "Poppins", system-ui, sans-serif; opacity: 0; }

/* the moment it forms: a shockwave ring rolls off the new bar */
@keyframes bar-ignite {
  0%   { opacity: 0; box-shadow: 0 16px 36px -18px rgba(20, 17, 13, .3), 0 2px 6px -2px rgba(20, 17, 13, .06), 0 0 0 0 rgba(66, 80, 255, .55); }
  25%  { opacity: 1; }
  100% { opacity: 1; box-shadow: 0 16px 36px -18px rgba(20, 17, 13, .3), 0 2px 6px -2px rgba(20, 17, 13, .06), 0 0 0 26px rgba(66, 80, 255, 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .bar.is-docked .bar__pill { animation: bar-ignite .8s var(--ease); }
}

/* "you are here": a separate box split off the left of the bar, same height.
   Desktop and tablet only; phones hide it (PHONES block). */
.where {
  position: absolute; right: calc(100% + 8px); top: 0;
  height: 100%; padding: 0 18px 0 14px;
  display: flex; align-items: center; overflow: hidden;
  border-radius: 14px; background: #fff;
  box-shadow: 0 16px 36px -18px rgba(20, 17, 13, .3), 0 2px 6px -2px rgba(20, 17, 13, .06);
  font: 600 22px/1.2 "Poppins", system-ui, sans-serif; letter-spacing: -.02em;
  white-space: nowrap;
  color: #2d2823;
  opacity: 0; transform: translateX(10px);
}
.where.is-on { opacity: 1; transform: none; transition: opacity .3s .7s, transform .5s var(--ease) .7s; }
.where__ico { display: grid; place-items: center; width: 24px; height: 24px; color: var(--blue); }
.where__ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.where__in { display: flex; align-items: center; gap: 10px; will-change: transform, filter; }
.where__ico, .where__txt { display: inline-grid; }
@media (max-width: 768px) {
  /* no room beside the bar on tablets: tuck it underneath */
  .where { right: auto; left: 50%; top: calc(100% + 8px); height: 44px; translate: -50% 0; padding: 0 14px 0 12px; font-size: 18px; transform: translateY(-6px); }
  .where__in { gap: 8px; }
  .where__ico, .where__ico svg { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .where, .where.is-on { transition: none; }
}

.logo { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.logo:focus-visible { outline-offset: 5px; border-radius: 999px; }
.logo__photo {
  flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: var(--blue);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(31, 44, 255, .25);
}
.logo__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.logo__word {
  font: 600 22px/1.2 "Poppins", system-ui, sans-serif; letter-spacing: -.02em;
  white-space: nowrap;
}

/* --- what lands in the pill, one after another --- */
.logo__photo, .logo__word, .burger { opacity: 0; transition: opacity .15s, transform .2s, clip-path .2s; }
.logo__photo { transition: none; } /* the orbiting photo lands right on it (main.js), so it just appears */
.logo__word { transition: none; } /* its letters fly in from the hero (main.js), so it just appears */
.burger { transform: translateX(8px); }
.bar.is-docked .logo__photo { opacity: 1; }
.bar.is-docked .logo__word { opacity: 1; }
.bar.is-docked .burger { opacity: 1; transform: none; transition: opacity .2s .7s, transform .5s var(--ease) .7s; }
/* small hovers once it's in */
/* nav photo: same pop-out as the hero photo; only the head grows (see .pop--nav) */

@media (max-width: 768px) {
  .bar__pill { padding: 0 8px 0 8px; gap: 10px; }
  .logo { gap: 10px; }
  .bar__pill .burger { margin-left: -10px; } /* name → icon = 10, same as photo → name */
  .logo__photo { width: 38px; height: 38px; }
  .logo__word { font-size: 18px; }
  .bar__mezi { width: 30px; height: 30px; }
  .bar__mezi svg { width: 22px; height: 22px; }
}
@media (max-width: 360px) { .logo__word { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .logo__photo, .logo__word, .bar__mezi, .burger { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* mezi's orange bubble-hover discs (placed by main.js) */
.bubble-layer {
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; overflow: hidden; pointer-events: none;
}
.bubble-layer--over { z-index: auto; }
.bubble-disc {
  position: absolute; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .16) 0 64%, rgba(255, 255, 255, 0) 100%);
  will-change: transform, opacity;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease-out;
}
.bubble-disc.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .bubble-disc { transition-duration: .01s; } }

/* ---------- Menu: a speech bubble that drops from the Menu button ---------- */
.menu {
  --tail-x: 40px;      /* set by JS so the tail points at the Menu button */
  --dur: .32s;
  --bw: 1.5px;
  --bg: var(--paper);
  position: fixed; z-index: 110;
  top: 110px; right: 24px;
  width: min(390px, calc(100vw - 48px));
  max-height: min(640px, calc(100dvh - 134px));
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--bg); color: var(--ink);
  border: var(--bw) solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 40, .55), 0 2px 0 rgba(12, 12, 13, .06);
  transform-origin: calc(100% - var(--tail-x)) -24px;
  opacity: 0; transform: scale(.6) rotate(4deg); filter: blur(4px);
  visibility: hidden;
  transition: opacity .2s ease, transform .35s var(--ease), filter .25s ease, visibility 0s .35s;
}
.menu-open .menu {
  opacity: 1; transform: none; filter: none; visibility: visible;
  transition: opacity .2s ease, transform .6s var(--spring), filter .25s ease, visibility 0s;
}
@media (hover: hover) and (pointer: fine) { .menu, .menu * { cursor: auto; } .menu a, .menu a *, .menu button, .menu button *, .menu .tree__toggle { cursor: pointer; } .menu input { cursor: text; } }

/* speech tail (browsing) ↔ thought puffs (searching) */
.menu__tail {
  position: absolute; top: -27px; right: calc(var(--tail-x) - 9px);
  width: 36px; height: 30px; overflow: visible;
  fill: var(--bg); stroke: var(--ink); stroke-width: var(--bw); stroke-linejoin: round;
  transition: opacity .15s, transform .3s var(--ease);
  transform-origin: 70% 100%;
}
.menu__puff {
  position: absolute; border-radius: 50%;
  background: var(--bg); border: var(--bw) solid var(--ink);
  opacity: 0; transform: scale(0);
  transition: opacity .15s, transform .45s var(--spring), scale .12s ease-out;
}
.menu__puff--big { width: 18px; height: 16px; top: -24px; right: calc(var(--tail-x) - 12px); }
.menu__puff--small { width: 9px; height: 8px; top: -37px; right: calc(var(--tail-x) - 4px); transition-delay: .06s; }
.menu.is-thinking .menu__tail { opacity: 0; transform: scale(.3); }
.menu.is-thinking .menu__puff { opacity: 1; transform: none; animation: puff-float 2.4s ease-in-out infinite; }
.menu.is-thinking .menu__puff--small { animation-delay: -1.2s; }
.menu.is-talking .menu__puff { scale: 1.3; }
@keyframes puff-float { 50% { translate: 2px -3px; } }

/* search */
.menu__search { position: relative; display: block; margin: 14px 14px 4px; }
.menu__search svg {
  position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 16px; fill: var(--ink); pointer-events: none;
  transition: fill .2s, transform .45s var(--ease);
}
.menu__search input {
  width: 100%; appearance: none;
  padding: 12px 14px 12px 40px;
  border: 1px solid rgba(12, 12, 13, .18); border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  font: 500 15px var(--display); color: var(--ink);
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.menu__search input::-webkit-search-cancel-button { display: none; }
.menu__search input::placeholder { color: var(--blue); opacity: 1; }
.menu__search input::selection { background: var(--blue); color: var(--paper); }
/* hover: the field firms up and the magnifier leans in */
.menu__search:hover input { border-color: var(--ink); background: #fff; }
.menu__search:hover svg { animation: mag-wiggle .6s var(--ease); transform: rotate(-12deg) scale(1.1); }
@keyframes mag-wiggle { 25% { transform: rotate(-22deg) scale(1.15); } 55% { transform: rotate(8deg) scale(1.1); } }
.menu__search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31, 44, 255, .14); }
.menu__search:focus-within svg { fill: var(--blue); transform: rotate(-12deg) scale(1.1); }

.menu__nav { position: relative; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(31, 44, 255, .4) transparent; padding: 6px 0 10px; }

/* tree */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree[hidden] { display: none; }
.tree [role="treeitem"] {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 14px 0 22px;
  text-decoration: none;
  font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  font-variation-settings: "wdth" 80;
  color: var(--ink);
  outline: none;
  transition: color .2s, background-color .2s;
}
.tree [aria-level="2"] { font-size: 17px; font-weight: 600; letter-spacing: -.01em; min-height: 38px; font-variation-settings: "wdth" 95; }
.tree__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: .15em; }
.tree__ext { font-size: .65em; color: var(--blue); opacity: 0; translate: -8px 0; transition: opacity .25s, translate .45s var(--ease); }
.tree [aria-level="2"] .tree__ext { opacity: 1; translate: 0; font-size: .9em; }
/* hover: just turns blue (no stretch, italics or shift) */
.tree [role="treeitem"]:hover,
.tree [role="treeitem"]:focus-visible { color: var(--blue); }
.tree [role="treeitem"]:hover .tree__ext,
.tree [role="treeitem"]:focus-visible .tree__ext { opacity: 1; translate: 0; }
.tree [role="treeitem"]:focus-visible { background: rgba(31, 44, 255, .07); }
/* the section you're reading gets a blue dot */
.tree [role="treeitem"][aria-current="location"] .tree__text::after {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px;
  border-radius: 50%; background: var(--blue); vertical-align: .35em;
  animation: here-pulse 2s ease-out infinite;
}
@keyframes here-pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 44, 255, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(31, 44, 255, 0); } }

/* + that turns into × */
.tree__toggle {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; margin-left: auto;
  border-radius: 50%;
  border: 1px solid var(--ink); color: var(--ink);
  font-style: normal;
  transition: background-color .25s, color .25s, border-color .25s, transform .45s var(--spring);
}
.tree__toggle:hover, [aria-expanded="true"] > .tree__toggle { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.tree__toggle:hover { transform: scale(1.15); }
.tree__toggle svg { width: 13px; stroke: currentColor; stroke-width: 2; fill: none; transition: rotate .35s var(--ease); }
[aria-expanded="true"] > .tree__toggle svg { rotate: 135deg; }

/* collapsible group: grid-rows trick + blur/slide on the contents */
.tree__wrap {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.tree__wrap[inert] { grid-template-rows: 0fr; }
.tree__wrap > ul {
  min-height: 0; overflow: hidden;
  position: relative; margin-left: 26px; padding-bottom: 6px;
  transition: opacity var(--dur) ease, translate var(--dur) var(--ease), filter var(--dur) ease;
}
.tree__wrap > ul::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--blue);
}
.tree__wrap[inert] > ul { opacity: .3; translate: 0 -10px; filter: blur(8px); }
.tree__wrap > ul [role="treeitem"] { padding-left: 16px; }

@media (prefers-reduced-motion: reduce) {
  .menu, .menu-open .menu, .tree__wrap, .tree__wrap > ul, .menu__tail, .menu__puff { transition: none; filter: none; }
  .res { animation: none; }
  .menu__puff, .menu__search svg, .tree [role="treeitem"] .tree__text::after { animation: none !important; transition-duration: .01s !important; }
}
@media (max-width: 520px) {
  .menu { top: 96px; right: 16px; width: min(390px, calc(100vw - 32px)); max-height: calc(100dvh - 112px); }
}

/* ---------- Labels ---------- */
.label { display: flex; gap: 14px; margin-bottom: clamp(28px, 5vw, 64px); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto auto;
  padding: 0 var(--pad) 18px;
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
}

/* photo circle with spinning orange ring */
.hero__name { position: relative; z-index: 2; }
.me {
  display: grid; place-items: center;
  --px: clamp(130px, 13.5vw, 220px);
  width: clamp(175px, 18vw, 295px); aspect-ratio: 1;
  /* sits top right, overlapping the top of WILLIAM */
  position: absolute; right: 0; top: 0;
  translate: 0 -55%;
  /* on hover it grows down and out to the left (anchored top-right, so it
     never goes off the top of the page; the popped-out head gets room too) */
  transform-origin: 100% 22%;
  transition: scale .6s var(--ease);
  text-decoration: none;
  border-radius: 50%;
  /* blue disc behind the ring so its words stay readable over the name */
  background: var(--blue);
  /* second, feathered layer hides the anti-aliased edge where the white
     name letters bled through as specks (worse once scaled up on hover) */
  box-shadow: 0 0 0 6px var(--blue), 0 0 3px 8px var(--blue);
}
.me__ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  animation: spin 22s linear infinite; /* hover speed-up is eased in main.js */
  transition: transform .8s var(--ease);
}
.me__ring text { font: 500 13px var(--mono); letter-spacing: .16em; fill: var(--paper); }
.me__ring .me__brand {
  fill: var(--orange-hi); cursor: pointer; transition: fill .2s; text-decoration: underline 0 transparent;
  /* the brand's own face, as in the nav wordmark */
  font-family: "Poppins", system-ui, sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .02em;
}
/* MIT logo laid into the ring's text (main.js places it), in MIT's own
   colours: red bars, grey lower bar on the i */
.me__mit { fill: var(--mit-red); visibility: hidden; }
.me__mit.is-set { visibility: visible; }
.me__mit .i { fill: #8a8b8c; }
.me__ring .me__brand:hover { fill: var(--paper); text-decoration: underline 1.5px currentColor; }
/* Pop-out avatar (technique by Temani Afif): the photo sits in a circle,
   and on hover it scales up while the top half is unmasked, so your head
   "pops out" of the frame. Needs a transparent-background PNG. */
.pop {
  --b: 4px;                 /* ring thickness */
  --c: var(--paper);        /* ring color */
  --cb: var(--blue-hi);     /* circle color */
  --f: 1;                   /* current scale */
  --_g: 50% / calc(100% / var(--f)) 100% no-repeat content-box;
  --_o: calc((1 / var(--f) - 1) * var(--px) / 2 - var(--b));
  box-sizing: content-box;
  width: var(--px);
  aspect-ratio: 1;
  padding-top: calc(var(--px) / 5);
  object-fit: cover;
  object-position: 50% 0;
  border-radius: 0 0 999px 999px;
  background: radial-gradient(circle closest-side, var(--cb) calc(99% - var(--b)), var(--c) calc(100% - var(--b)) 99%, #0000) var(--_g);
  -webkit-mask:
    linear-gradient(#000 0 0) no-repeat 50% calc(-1 * var(--_o)) / calc(100% / var(--f) - 2 * var(--b)) 50%,
    radial-gradient(circle closest-side, #000 99%, #0000) var(--_g);
          mask:
    linear-gradient(#000 0 0) no-repeat 50% calc(-1 * var(--_o)) / calc(100% / var(--f) - 2 * var(--b)) 50%,
    radial-gradient(circle closest-side, #000 99%, #0000) var(--_g);
  transform: scale(var(--f));
  translate: 0 calc(var(--px) * -0.1);
  transition: .5s var(--ease);
  position: relative; z-index: 1;
}
.me:hover, .me:focus-visible { scale: 1.9; }
.me:hover .pop, .me:focus-visible .pop { --f: 1.4; }

/* fallback until the photo exists */
.me__initials {
  display: none;
  place-items: center;
  width: var(--px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, var(--paper) 55%, #c9c8c2);
  box-shadow: 0 0 0 4px var(--paper), 0 18px 40px -12px rgba(0,0,0,.5);
  font-weight: 900; font-size: calc(var(--px) * .28); letter-spacing: -.04em; color: var(--blue);
  font-variation-settings: "wdth" 120;
  transition: transform .6s var(--ease);
}
.no-photo .me__initials { display: grid; }
.no-photo:hover .me__initials { transform: scale(1.08) rotate(-6deg); }

@keyframes blink { 50% { opacity: .25; } }


.name {
  margin: 0 calc(var(--pad) * -0.15);
  display: flex; flex-direction: column;
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.025em;
  text-transform: uppercase;
  user-select: none;
  min-width: 0;
  contain: layout style;
}
.name__line { display: block; white-space: nowrap; }
.name__line + .name__line { margin-top: .02em; }
.ch { display: inline-block; font-variation-settings: "wdth" var(--w, 100), "wght" var(--g, 800); transform: translateY(var(--y, 0)); }
.hero__foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 18px; margin-top: 14px;
  border-top: 1px solid rgba(233, 232, 227, .35);
}

/* tablet */
/* phone */
/* short landscape phones */

/* ---------- The card ---------- */
.card {
  --rx: 0deg; --ry: 0deg; --flip: 0deg;
  width: clamp(270px, 28vw, 400px);
  aspect-ratio: 1.586;
  perspective: 1200px;
  outline: none;
}
.card__inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateZ(-7deg) rotateX(var(--rx)) rotateY(calc(var(--ry) + var(--flip)));
  transition: transform .9s var(--ease);
  animation: float 6s ease-in-out infinite;
}
.card.is-tracking .card__inner { transition: transform .15s linear; }
@keyframes float { 50% { translate: 0 -10px; } }
.card__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 7%;
  border-radius: 16px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.card__front { background: linear-gradient(140deg, var(--orange-hi) 0%, var(--orange) 55%, var(--orange-lo) 100%); color: #fff; }
.card__back { background: var(--paper); color: var(--ink); transform: rotateY(180deg); }
.card__glare {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.22), transparent 45%);
  mix-blend-mode: overlay;
}
.card__back .card__glare { background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.7), transparent 50%); }
.card__row { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.card__row--end { align-items: flex-end; }
.card__logo { font-weight: 900; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.04em; font-variation-settings: "wdth" 120; }
.card__nfc { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.card__chip {
  width: 16%; aspect-ratio: 1.3; border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 32%, rgba(0,0,0,.25) 33% 35%, transparent 36% 64%, rgba(0,0,0,.25) 65% 67%, transparent 68%),
    linear-gradient(0deg, transparent 45%, rgba(0,0,0,.25) 46% 54%, transparent 55%),
    linear-gradient(135deg, #e9d79a, #b8964a 55%, #f1e2a8);
}
.card__name { font-weight: 700; font-size: clamp(16px, 1.5vw, 21px); letter-spacing: -.01em; }
.card__role, .card__no { opacity: .85; font-size: 10px; }
.card__back-big {
  font-weight: 900; font-size: clamp(40px, 4.4vw, 64px); line-height: .85; letter-spacing: -.04em;
  font-variation-settings: "wdth" 115;
  color: var(--blue);
}
.card__back .mono { font-size: 10px; }

/* =========================================================
   ABOUT — the story, one centered line at a time
   ========================================================= */
.about.frame { padding: 110px var(--pad) clamp(60px, 10vh, 100px); }
.ab-story { width: 100%; text-align: center; }
.ab-line {
  margin: 0 auto clamp(28px, 6vh, 64px); max-width: 16ch; text-wrap: balance;
  font-family: var(--display); font-size: clamp(34px, 5.4vw, 84px); line-height: 1.02; font-weight: 700;
  font-variation-settings: "wdth" 80; letter-spacing: -.035em;
}
.ab-line--lead { max-width: 13ch; font-size: clamp(46px, 8vw, 132px); line-height: .95; }
/* words ink in as they scroll past the reading line (main.js) */
.ab-story.is-live .w { opacity: .12; transition: opacity .45s var(--ease); }
.ab-story.is-live .w.on { opacity: 1; }

/* marker highlight: sweeps in once its words are read */
.about mark {
  color: var(--ink); background: linear-gradient(var(--pop), var(--pop)) no-repeat 0 88% / 0% 40%;
  padding: 0 .06em; margin: 0 -.03em; border-radius: .08em;
  transition: background-size .7s var(--ease) .1s;
}
.about mark.on { background-size: 100% 40%; }

/* "scammed": a red rubber stamp comes down on it. It drops in big and
   blurred-by-distance, slams at an angle, the line jolts, ink specks fly, and
   the ink is patchy where the rubber didn't take. Hover to stamp it again (main.js). */
.ab-scam { position: relative; display: inline-block; }
/* the stamp is the word: the text keeps its space in the sentence (and stays
   readable for screen readers) but is never drawn, so the gap is empty until
   the stamp comes down into it */
.ab-story.is-live .ab-scam > .w, .ab-scam.on > .w { color: transparent; }
.ab-scam__stamp {
  position: absolute; left: 50%; top: 52%; translate: -50% -50%; z-index: 1;
  padding: .06em .2em .04em; white-space: nowrap; pointer-events: none;
  font: 900 .56em/1 var(--display); font-variation-settings: "wdth" 100; letter-spacing: .05em; text-transform: uppercase;
  color: #d62f25; border: .08em solid currentColor; border-radius: .12em;
  box-shadow: inset 0 0 0 .05em var(--paper), inset 0 0 0 .1em currentColor; /* the double rule of a real stamp */
  mix-blend-mode: multiply;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 -1.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 4.4em auto;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 -1.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 4.4em auto;
  opacity: 0; rotate: var(--r, -9deg);
}
/* ink specks thrown out on impact */
.ab-scam__stamp::after {
  content: ""; position: absolute; inset: -.5em -.4em; pointer-events: none; opacity: 0;
  background:
    radial-gradient(circle at 4% 30%, currentColor .05em, transparent .06em),
    radial-gradient(circle at 9% 78%, currentColor .03em, transparent .04em),
    radial-gradient(circle at 96% 20%, currentColor .04em, transparent .05em),
    radial-gradient(circle at 92% 86%, currentColor .06em, transparent .07em),
    radial-gradient(circle at 60% 2%, currentColor .025em, transparent .035em),
    radial-gradient(circle at 30% 98%, currentColor .035em, transparent .045em),
    radial-gradient(circle at 99% 52%, currentColor .02em, transparent .03em);
}
.ab-scam.on .ab-scam__stamp { animation: scam-stamp .62s linear .1s both; }
.ab-scam.on .ab-scam__stamp::after { animation: scam-ink .5s ease-out .43s both; }
.ab-scam.on { animation: scam-jolt .4s ease-out .42s both; }
@keyframes scam-stamp {
  0% { opacity: 0; scale: 2.6; filter: blur(.04em) drop-shadow(0 .5em .25em rgba(0, 0, 0, .25)); animation-timing-function: cubic-bezier(.6, 0, 1, .7); }
  15% { opacity: .7; }
  52% { opacity: 1; scale: .93; filter: blur(0) drop-shadow(0 0 0 transparent); animation-timing-function: ease-out; }
  70% { scale: 1.03; }
  85%, 100% { scale: 1; opacity: .95; filter: none; }
}
@keyframes scam-ink { from { opacity: 0; scale: .6; } 30% { opacity: .9; } to { opacity: .75; scale: 1; } }
@keyframes scam-jolt {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  20% { translate: .02em .035em; rotate: -.6deg; }
  45% { translate: -.015em -.01em; rotate: .4deg; }
  70% { translate: .006em .006em; rotate: -.15deg; }
}
/* re-stamp on hover: the class is pulled and re-added to restart it */
.ab-scam.again .ab-scam__stamp { animation: scam-stamp .55s linear both; }
.ab-scam.again .ab-scam__stamp::after { animation: scam-ink .5s ease-out .3s both; }
.ab-scam.again { animation: scam-jolt .4s ease-out .29s both; }

/* "mezi": in its own brand type, jumps to the mezi section */
.ab-mezi {
  font-family: "Poppins", system-ui, sans-serif; font-variation-settings: normal; letter-spacing: -.03em;
  color: inherit; text-decoration: none; display: inline-block;
  transition: color .4s var(--ease), rotate .3s var(--spring), scale .3s var(--spring);
}
.ab-mezi.on { color: var(--orange); }
.ab-story .nowrap { white-space: nowrap; }
.ab-mezi:hover { rotate: -4deg; scale: 1.06; }

.ab-line:last-child { margin-bottom: 0; }

/* "bodybuilding": a barbell sits on the word and gets loaded with Olympic
   bumper plates as you scroll past (main.js adds them one pair at a time).
   The word gets heavier and wider with every plate. */
.ab-lift { position: relative; display: table; margin: 0 auto; padding-top: .15em; z-index: 0; }
.ab-lift__word {
  display: inline-block; font-variation-settings: "wdth" var(--wdth, 80); font-weight: var(--wght, 700);
  transition: font-variation-settings .45s var(--spring), font-weight .45s var(--ease);
}
.ab-lift__rig { position: absolute; z-index: -1; left: -.64em; right: -.64em; bottom: .5em; height: .9em; pointer-events: none; }
.ab-lift__bar {
  position: absolute; left: 0; right: 0; top: 50%; height: .06em; translate: 0 -50%; border-radius: .03em;
  background: linear-gradient(#f1f3f6, #8d939b); box-shadow: 0 0 0 max(1px, .008em) #2a2a2c;
  opacity: 0; transition: opacity .4s var(--ease);
}
.ab-lift.on .ab-lift__bar { opacity: 1; }
.ab-lift .pl {
  position: absolute; top: 50%; border-radius: .02em; opacity: 0; translate: var(--dx) -50%;
  box-shadow: inset 0 0 0 max(1px, .01em) rgba(0, 0, 0, .3), 0 .02em .04em rgba(0, 0, 0, .2);
  transition: opacity .25s var(--ease), translate .5s var(--spring);
}
.ab-lift .pl.is-on { opacity: 1; translate: 0 -50%; }
.pl.l { --dx: -.6em; } .pl.r { --dx: .6em; }
.pl--r { height: .9em; width: .13em; background: linear-gradient(90deg, #a51d15, #ff5a4a 45%, #a51d15); }
.pl--b { height: .9em; width: .11em; background: linear-gradient(90deg, #122a9a, #5a74ff 45%, #122a9a); }
.pl--y { height: .9em; width: .09em; background: linear-gradient(90deg, #b88a00, #ffd43b 45%, #b88a00); }
.pl--g { height: .9em; width: .075em; background: linear-gradient(90deg, #1b6b34, #3fbf65 45%, #1b6b34); }
.pl--w { height: .62em; width: .055em; background: linear-gradient(90deg, #c9ccd1, #fff 45%, #c9ccd1); }
.pl--c { height: .22em; width: .05em; background: linear-gradient(#f4f6f9, #8d939b); }
/* stacked from the word outward */
.pl--r.l { left: .49em; } .pl--b.l { left: .375em; } .pl--y.l { left: .28em; } .pl--g.l { left: .2em; } .pl--w.l { left: .14em; } .pl--c.l { left: .085em; }
.pl--r.r { right: .49em; } .pl--b.r { right: .375em; } .pl--y.r { right: .28em; } .pl--g.r { right: .2em; } .pl--w.r { right: .14em; } .pl--c.r { right: .085em; }

/* the mezi z: the logo's back-and-forth arrows, and they nudge on hover */
/* Sized so the Z body is exactly Poppins x-height (.548em) and sits on the baseline. */
.ab-z { display: inline-block; width: .636em; height: .711em; margin: 0 -.01em; vertical-align: -.082em; }
.ab-z svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ab-z path { transition: translate .35s var(--spring); }
.ab-mezi:hover .ab-z__a { translate: -18px 0; }
.ab-mezi:hover .ab-z__b { translate: 18px 0; }

/* the age as a periodic table tile (20 = calcium; main.js moves it on every birthday) */
.ab-el {
  position: relative; z-index: 1; display: inline-grid; grid-template-rows: auto 1fr auto auto; justify-items: center;
  width: .98em; height: 1.04em; padding: .06em .05em .07em; margin: 0 .04em; vertical-align: text-bottom;
  background: #fff; border: .035em solid var(--ink); border-radius: .06em; box-shadow: .06em .06em 0 var(--ink);
  font-variation-settings: "wdth" 100; letter-spacing: 0; line-height: 1; text-align: center;
  rotate: -4deg; transition: rotate .6s var(--spring), background-color .4s var(--ease);
}
/* the atomic number (the age) is the highlighted bit */
.ab-el__n {
  justify-self: start; padding: .08em .16em .04em; border-radius: .12em; font: 700 .24em/1 var(--mono);
  background: linear-gradient(var(--pop), var(--pop)) no-repeat 0 0 / 0% 100%;
  transition: background-size .6s var(--ease) .35s;
}
.ab-el__s { align-self: center; font-size: .42em; font-weight: 800; letter-spacing: -.02em; }
.ab-el__name { font-size: .11em; font-weight: 600; letter-spacing: .02em; }
.ab-el__m { margin-top: .04em; font: 400 .095em/1 var(--mono); opacity: .7; }
.ab-el.on { rotate: 0deg; }
.ab-el.on .ab-el__n { background-size: 100% 100%; }
.ab-el:hover { rotate: 3deg; }

/* "physics": a little solar system orbits the word. Each planet's x and y
   swing on two eased animations a quarter-turn apart, which traces an
   ellipse; a third animation flips its z-index so it passes behind the
   letters on the far side and in front on the near side. */
.ab-phys { position: relative; z-index: 0; display: inline-block; }
.orb { position: absolute; left: -18%; right: -18%; top: 4%; bottom: 0; pointer-events: none; }
.orb__ring {
  position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  border: max(2px, .022em) solid rgba(31, 44, 255, .5);
  background:
    radial-gradient(circle at 6% 22%, var(--blue) .018em, transparent .03em),
    radial-gradient(circle at 94% 18%, #f2b705 .024em, transparent .04em),
    radial-gradient(circle at 88% 92%, var(--blue) .016em, transparent .028em),
    radial-gradient(circle at 14% 96%, var(--orange) .02em, transparent .032em),
    radial-gradient(circle at 50% -6%, #f2b705 .014em, transparent .026em);
  opacity: 0; scale: .6; transition: opacity .6s var(--ease), scale .9s var(--spring);
}
.orb__ring--in { inset: 24% 14%; border-style: dashed; background: none; }
.orb__p { position: absolute; inset: 0; animation: orb-x var(--t) ease-in-out infinite alternate, orb-z calc(var(--t) * 2) linear infinite; }
.orb__p--in { inset: 24% 14%; }
.orb__q { position: absolute; inset: 0; animation: orb-y var(--t) ease-in-out calc(var(--t) / -2) infinite alternate; }
.orb__planet {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%;
  opacity: 0; scale: 0; transition: opacity .4s var(--ease) .3s, scale .7s var(--spring) .3s;
}
.ab-top { position: relative; z-index: 1; }
/* the letters of "physics" fall and bounce on their own (main.js) */
.ph-l { display: inline-block; transform-origin: 50% 85%; will-change: translate, rotate; }
.ab-phys.on { cursor: grab; }
/* a landing sends a ripple out along the baseline, like a stone in water */
.ph-ripple {
  position: absolute; z-index: -1; bottom: .1em; width: .5em; height: .12em; translate: -50% 50%;
  border: max(1.5px, .014em) solid rgba(31, 44, 255, .55); border-radius: 50%; pointer-events: none;
  animation: ph-ripple .7s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes ph-ripple { from { scale: .2; opacity: 1; } to { scale: 2.4; opacity: 0; } } /* "study" stays above the orbit */
/* Saturn: banded ochre globe lit from the upper left, rings tilted across it.
   The ring's back half sits behind the globe (::before), the front half over it (::after). */
.orb__planet--ringed {
  width: .2em; height: .2em;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 250, 230, .55), transparent 45%),
    radial-gradient(circle at 70% 75%, transparent 40%, rgba(40, 24, 8, .75) 78%),
    repeating-linear-gradient(-18deg, #e9cf98 0 9%, #d6b277 9% 15%, #c99a5c 15% 19%, #e4c48a 19% 27%, #b8864c 27% 30%);
  box-shadow: 0 0 .05em rgba(0, 0, 0, .25);
}
.orb__planet--ringed::after, .orb__rb {
  content: ""; position: absolute; left: -62%; right: -62%; top: 33%; height: 34%; border-radius: 50%; rotate: -18deg;
  background: radial-gradient(closest-side, transparent 58%, rgba(214, 190, 140, .9) 60%, rgba(176, 148, 98, .85) 70%, transparent 72%, rgba(226, 206, 160, .9) 75%, rgba(150, 124, 82, .7) 96%, transparent 100%);
}
.orb__planet--ringed::after { clip-path: inset(50% 0 0 0); }
/* the ring's back half: a sibling drawn before the globe, same size as the ::after ring */
.orb__planet.orb__rb { left: 50%; right: auto; top: 50%; width: .448em; height: .068em; translate: -50% -50%; }
/* Earth: ocean, a couple of continents, cloud wisps, night side */
.orb__planet--moon {
  width: .12em; height: .12em;
  background:
    radial-gradient(circle at 68% 72%, transparent 35%, rgba(2, 8, 30, .85) 80%),
    radial-gradient(ellipse 30% 12% at 40% 30%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(ellipse 22% 30% at 34% 52%, #4c8a3c 60%, transparent 64%),
    radial-gradient(ellipse 18% 22% at 62% 36%, #6f9a48 60%, transparent 64%),
    radial-gradient(circle at 35% 30%, #5fa8ea, #1d5fae 60%, #0b2e66);
  box-shadow: 0 0 .05em rgba(95, 168, 234, .7);
}
.ab-phys.on .orb__ring { opacity: 1; scale: 1; }
.ab-phys.on .orb__ring--in { opacity: .7; }
.ab-phys.on .orb__planet { opacity: 1; scale: 1; }
@keyframes orb-x { from { translate: -50% 0; } to { translate: 50% 0; } }
@keyframes orb-y { from { translate: 0 -50%; } to { translate: 0 50%; } }
@keyframes orb-z { 0%, 49.9% { z-index: 1; } 50%, 100% { z-index: -1; } }
@media (prefers-reduced-motion: reduce) { .orb__p, .orb__q { animation: none; } .orb__p { translate: 40% 0; } .orb__q { translate: 0 -30%; } }

/* "William": brand blue */
.ab-name { transition: color .4s var(--ease); }
.ab-name.on { color: var(--blue); }

/* "New York": the Manhattan skyline rises up behind it, windows lit. The
   words sit in front with a paper-coloured halo so they read over the towers. */
.ab-line--lead { position: relative; isolation: isolate; } /* the skyline paints under every word of the line */
.ab-ny { position: relative; display: inline-block; }
.ab-line--lead > .w, .ab-name .w, .ab-ny .w { paint-order: stroke fill; -webkit-text-stroke: .07em var(--paper); }
.ab-ny::before {
  content: ""; position: absolute; z-index: -1; left: -.3em; right: -.3em; bottom: .12em; height: 1.3em;
  background: var(--sky, url(/assets/about-skyline.svg)) 50% 100% / cover no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  transform-origin: 50% 100%; scale: 1 0;
  transition: scale .9s cubic-bezier(.34, 1.4, .64, 1) .2s;
}
.ab-ny.on::before { scale: 1 1; }

/* "CAD": modelled the way a SolidWorks part gets made. The viewport opens, a
   pencil cursor sketches the letters in blue (under-defined), a smart dimension
   goes on, the sketch turns black (fully defined), then it extrudes into a
   shaded steel part. The top padding is room in the viewport for the dimension;
   the looser line height on this paragraph keeps the CAD and PCB boxes apart. */
#facts { line-height: 1.2; }
.ab-cad { position: relative; display: inline-block; z-index: 0; padding: .1em .04em 0; line-height: 1; }
.ab-cad::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -.05em .02em;
  background: linear-gradient(180deg, #fbfcfe 0%, #dfe6f0 55%, #b9c6d8 100%);
  border: 1px solid rgba(12, 12, 13, .18); border-radius: .03em;
  box-shadow: 0 .03em .08em rgba(12, 12, 13, .12);
  opacity: 0; transition: opacity .5s var(--ease);
}
/* The dimension, drawn the way SolidWorks draws a smart dimension: extension
   lines off the part with a small gap and a little overshoot, a dimension line
   with slim filled arrowheads, and the value in Century Gothic breaking the line. */
.ab-cad__dim {
  position: absolute; left: .06em; right: .06em; top: .02em; height: .2em;
  border-inline: max(1px, .01em) solid #1b1f2a; color: #1b1f2a; pointer-events: none;
  opacity: 0; transition: opacity .3s var(--ease) 1.05s;
}
.ab-cad__dl { position: absolute; left: 0; right: 0; top: .05em; display: flex; align-items: center; }
.ab-cad__dl > i { position: relative; flex: 1; height: max(1px, .01em); background: currentColor; }
.ab-cad__dl > i::before {
  content: ""; position: absolute; left: 0; top: 50%; width: .075em; height: .034em; translate: 0 -50%;
  background: currentColor; clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.ab-cad__dl > i:last-child { scale: -1 1; }
.ab-cad__dl > b::before {
  content: attr(data-v); display: block; padding: 0 .35em;
  font: 400 max(10px, .11em)/1 "Century Gothic", "URW Gothic", "Poppins", sans-serif;
  font-variation-settings: normal; letter-spacing: .02em;
}
.ab-cad__triad { position: absolute; left: -.02em; bottom: .03em; width: .2em; height: .2em; opacity: 0; transition: opacity .4s var(--ease) .2s; }
.ab-cad__pen { position: absolute; z-index: 2; width: .2em; height: .2em; translate: 0 -100%; opacity: 0; pointer-events: none; }
.ab-cad__pen svg { display: block; width: 100%; height: 100%; }
.ab-cad.on .ab-cad__pen { animation: ab-pen .9s linear .15s both; }
@keyframes ab-pen {
  0% { left: 6%; top: 0.85em; opacity: 1; }
  12% { left: 15%; top: 0.40em; }
  25% { left: 28%; top: 0.95em; }
  37% { left: 40%; top: 0.40em; }
  50% { left: 52%; top: 0.90em; }
  62% { left: 64%; top: 0.45em; }
  75% { left: 77%; top: 0.95em; }
  90% { left: 90%; top: 0.50em; opacity: 1; }
  100% { left: 93%; top: 0.60em; opacity: 0; }
}
.ab-cad__triad svg { display: block; width: 100%; height: 100%; }
.ab-cad.on::before, .ab-cad.on .ab-cad__dim, .ab-cad.on .ab-cad__triad { opacity: 1; }
.ab-cad.on .w { animation: ab-sw 3s cubic-bezier(.2, .8, .2, 1) .15s both; }
@keyframes ab-sw {
  0% { clip-path: inset(-.3em 100% -.3em -.3em); animation-timing-function: linear; color: transparent; -webkit-text-stroke: .012em #1f5bd6; text-shadow: 0 0 0 #8d98a7, 0 0 0 #8792a1, 0 0 0 #808b9a, 0 0 0 #7a8594, 0 0 0 #737e8d, 0 0 0 #6d7887, 0 0 0 #3a414c; }
  30% { clip-path: inset(-.3em); }
  32% { color: transparent; -webkit-text-stroke: .012em #1f5bd6; text-shadow: 0 0 0 #8d98a7, 0 0 0 #8792a1, 0 0 0 #808b9a, 0 0 0 #7a8594, 0 0 0 #737e8d, 0 0 0 #6d7887, 0 0 0 #3a414c; }
  45% { color: transparent; -webkit-text-stroke: .012em #111; text-shadow: 0 0 0 #8d98a7, 0 0 0 #8792a1, 0 0 0 #808b9a, 0 0 0 #7a8594, 0 0 0 #737e8d, 0 0 0 #6d7887, 0 0 0 #3a414c; }
  100% {
    color: #c3ccd8; -webkit-text-stroke: .008em #2b3340;
    text-shadow: .008em .008em 0 #8d98a7, .016em .016em 0 #8792a1, .024em .024em 0 #808b9a, .032em .032em 0 #7a8594,
      .04em .04em 0 #737e8d, .048em .048em 0 #6d7887, .052em .056em 0 #3a414c;
  }
}

/* "circuit boards": the board gets fabbed behind it. The bare FR4 panel is
   routed out, the copper traces etch in, the green solder mask washes over
   them, and the words print last in white silkscreen. */
.ab-pcb {
  position: relative; z-index: 0; padding: 0 .12em; margin: 0 -.04em;
  transition: color .4s var(--ease) 1.85s;
}
.ab-pcb::before, .ab-pcb::after, .ab-pcb__cu {
  content: ""; position: absolute; z-index: -1; inset: .1em -.02em -.04em; border-radius: .03em;
}
.ab-pcb::before { /* bare FR4, routed out of the panel */
  background: linear-gradient(160deg, #e4d29e, #c8ab68);
  box-shadow: 0 0 0 .045em #b8995a, inset 0 -.03em 0 rgba(0, 0, 0, .2);
  clip-path: inset(0 100% 0 0 round .07em);
  transition: clip-path .6s var(--ease) .05s;
}
.ab-pcb__cu { /* bare copper (traces, pads, vias), etched in left to right */
  background: url(/assets/about-pcb-cu.svg) 50% 50% / cover no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .8s linear .6s;
}
.ab-pcb::after { /* the finished board: green solder mask over the copper, ENIG pads, silkscreen */
  background: url(/assets/about-pcb.svg) 50% 50% / cover no-repeat;
  box-shadow: inset 0 0 0 .012em rgba(0, 0, 0, .35), 0 .03em .08em rgba(0, 0, 0, .25);
  clip-path: inset(0 0 100% 0 round .03em);
  transition: clip-path .45s var(--ease) 1.4s;
}
.ab-pcb.on { color: #f4f1e6; }
.ab-pcb.on::before { clip-path: inset(-.1em -.1em -.1em -.1em round .07em); }
.ab-pcb.on .ab-pcb__cu { clip-path: inset(0); }
.ab-pcb.on::after { clip-path: inset(0 round .03em); }
.ab-pcb.on { text-shadow: 0 .015em .02em rgba(0, 0, 0, .35); }

/* "MIT": once it's read, the letters give way to the MIT bar logo, the bars
   dropping in left to right. The text stays underneath for screen readers.
   The logo sits inline so it lands on the baseline; the letters overlay it. */
.ab-mit { position: relative; display: inline-block; margin: 0 .04em 0 .12em; }
.ab-mit__t { position: absolute; left: 50%; top: 0; translate: -50% 0; white-space: nowrap; }
.ab-mit__logo { display: inline-block; height: .66em; width: auto; aspect-ratio: 321 / 166; overflow: visible; }
.ab-mit__bars rect { fill: var(--mit-red); transform-box: fill-box; transform-origin: 50% 0; scale: 1 0; }
.ab-mit__bars .g { fill: #8a8b8c; transform-origin: 50% 100%; }
.ab-mit__bars .x { transform-origin: 0 50%; scale: 0 1; }
.ab-mit__glint { translate: 0 0; }

/* 1. a red laser sweeps across, erasing the letters as it goes */
.ab-mit::after {
  content: ""; position: absolute; top: -.06em; bottom: -.02em; left: 0; width: max(2px, .018em); border-radius: 1px;
  background: #ff2d3f; box-shadow: 0 0 .05em #ff2d3f, 0 0 .16em rgba(255, 45, 63, .7), 0 0 .4em rgba(255, 45, 63, .35);
  opacity: 0; pointer-events: none;
}
.ab-mit.on::after { animation: mit-laser .7s cubic-bezier(.45, 0, .55, 1) .1s both; }
@keyframes mit-laser { 0% { left: -4%; opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { left: 104%; opacity: 0; } }
.ab-mit.on .ab-mit__t { animation: mit-erase .7s cubic-bezier(.45, 0, .55, 1) .1s both; }
@keyframes mit-erase { from { clip-path: inset(-.3em -.3em -.3em -.1em); } 99% { opacity: 1; } to { clip-path: inset(-.3em -.3em -.3em 100%); opacity: 0; } }

/* 2. behind it the bars punch down and ring like an equalizer before settling */
.ab-mit.on .ab-mit__bars rect { scale: 1 1; animation: mit-eq .9s linear calc(.14s + var(--i) * .085s) both; }
.ab-mit.on .ab-mit__bars .g { animation-name: mit-eq-g; }
.ab-mit.on .ab-mit__bars .x { animation: mit-bar .55s cubic-bezier(.3, 1.6, .5, 1) .58s both; }
.ab-mit__bars rect:nth-child(1) { --i: 0; } .ab-mit__bars rect:nth-child(2) { --i: 1; } .ab-mit__bars rect:nth-child(3) { --i: 2; }
.ab-mit__bars rect:nth-child(5) { --i: 3; } .ab-mit__bars rect:nth-child(7) { --i: 5; }
@keyframes mit-eq {
  0% { scale: 1 0; animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  30% { scale: 1 1.28; animation-timing-function: ease-in-out; }
  50% { scale: 1 .7; animation-timing-function: ease-in-out; }
  68% { scale: 1 1.12; animation-timing-function: ease-in-out; }
  84% { scale: 1 .95; }
  100% { scale: 1 1; }
}
@keyframes mit-eq-g { 0% { scale: 1 0; } 35% { scale: 1 1.2; } 58% { scale: 1 .82; } 78% { scale: 1 1.05; } 100% { scale: 1 1; } }
@keyframes mit-bar { from { scale: 0 1; } to { scale: 1 1; } }

/* 3. the dot of the i falls in last and bounces on the stem */
.ab-mit__bars .d { scale: 1 1; opacity: 0; }
.ab-mit.on .ab-mit__bars .d { opacity: 1; animation: mit-dot .8s linear .75s both; }
@keyframes mit-dot {
  0% { translate: 0 -260px; opacity: 0; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  8% { opacity: 1; }
  50% { translate: 0 0; animation-timing-function: cubic-bezier(0, .55, .45, 1); }
  68% { translate: 0 -60px; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  82% { translate: 0 0; animation-timing-function: cubic-bezier(0, .55, .45, 1); }
  91% { translate: 0 -14px; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  100% { translate: 0 0; opacity: 1; }
}

/* 4. a glint runs across the finished logo */
.ab-mit.on .ab-mit__glint { animation: mit-glint .8s cubic-bezier(.4, 0, .2, 1) 1.6s both; }
@keyframes mit-glint { from { translate: 0 0; } to { translate: 440px 0; } }

/* hover: the bars play a quick equalizer wave and the dot hops */
.ab-mit.eq .ab-mit__bars rect:not(.d):not(.x) { animation: mit-wave .7s ease-in-out calc(var(--i) * .06s) both; }
.ab-mit.eq .ab-mit__bars .d { animation: mit-hop .5s cubic-bezier(.3, 0, .7, 1) .3s both; }
.ab-mit.eq .ab-mit__glint { animation: mit-glint .7s cubic-bezier(.4, 0, .2, 1) .15s both; }
@keyframes mit-wave { 0%, 100% { scale: 1 1; } 35% { scale: 1 .55; } 70% { scale: 1 1.14; } }
@keyframes mit-hop { 0%, 100% { translate: 0 0; } 45% { translate: 0 -70px; } }
@media (prefers-reduced-motion: reduce) {
  .about mark, .ab-mezi, .ab-pcb, .ab-pcb::before, .ab-pcb::after, .ab-pcb__cu, .ab-ny::before { transition: none; }
  .ab-cad.on .w { animation-duration: 1ms; }
  .ab-mit.on *, .ab-mit.on::after { animation: none !important; }
  .ab-scam, .ab-scam *, .ab-scam__stamp::after { animation: none !important; }
  .ab-scam.on .ab-scam__stamp { opacity: .95; }
  .ab-mit.on .ab-mit__t { opacity: 0; }
  .ab-cad.on .ab-cad__pen { animation: none; }
}

/* =========================================================
   PRESS
   ========================================================= */
.press { padding-bottom: clamp(80px, 12vw, 160px); }
.marquee {
  overflow: hidden;
  padding: clamp(14px, 2vw, 24px) 0;
  background: var(--blue); color: var(--paper);
  border-block: 1px solid var(--ink);
}
.marquee__track { display: flex; width: max-content; animation: marquee 22s linear infinite; }
.marquee span {
  font-size: clamp(56px, 9vw, 140px); font-weight: 900; line-height: .9;
  font-variation-settings: "wdth" 62;
  text-transform: uppercase; letter-spacing: -.01em;
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.press__inner { padding: clamp(64px, 9vw, 110px) var(--pad) 0; }
.press { background: var(--ink); color: var(--paper); }
.press__note { margin: 28px 0 0; }
.press__note a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Press cards: glitter spotlight + reveal on hover ---------- */
.pcards {
  --glitter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --light: 300px;
  --smooth: cubic-bezier(.22, 1, .36, 1);
  --dur: .55s;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pcard {
  --mx: 50%; --my: 50%;      /* pointer position, set in main.js */
  --rx: .5; --ry: .75;
  --head: 6.4rem;            /* outlet + title strip at rest (measured in main.js) */
  --panel: 44%;              /* height of the open text panel (measured in main.js) */
  contain: paint;
  position: relative; isolation: isolate;
  display: block;
  height: clamp(440px, 36vw, 540px);
  border-radius: 22px;
  background: #1c1c1e;
  color: #fff;
  text-decoration: none;
  overflow: clip;
  container-type: inline-size;
}

/* rainbow glow that follows the pointer (shows as a border + bloom) */
.pcard::before,
.pcard::after {
  content: ""; position: absolute; pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .4s ease;
}
.pcard::before {
  inset: 0; z-index: 1;
  background-image:
    conic-gradient(from 0deg at var(--mx) var(--my),
      #ffbd8c 0%, #fd8585 11%, #fd8585 15%, #f882ff 27%, #f882ff 31%, #8785fe 42%, #8785fe 46%,
      #9afcff 55%, #9afcff 59%, #99fd9c 70%, #99fd9c 74%, #fffd84 87%, #fffd84 91%, #ffbd8c 100%),
    radial-gradient(calc(var(--light) * 1.5) circle at var(--mx) var(--my), rgba(255,255,255,.7), rgba(0,0,0,.5) 50%),
    radial-gradient(calc(var(--light) * 1.5) circle at var(--mx) var(--my), transparent, rgb(33,22,44) 60%, var(--ink) 120%);
  background-blend-mode: hue, color-dodge;
}
/* noisy dark face with a soft spotlight */
.pcard::after {
  inset: 1px; z-index: 2;
  border-radius: 21px;
  background-color: #2c2c2c;
  background-image:
    radial-gradient(var(--light) circle at calc(var(--rx) * 100%) calc(var(--ry) * 100%), rgba(0,0,0,.55), #000),
    radial-gradient(var(--light) circle at calc(var(--rx) * 100%) calc(var(--ry) * 100%), #333c, #151515 var(--light)),
    var(--glitter),
    var(--glitter);
  background-position: center, center, center, calc(3px * var(--rx)) calc(3px * var(--ry));
  background-size: 300px 300px;
  background-blend-mode: normal, color-burn, color-dodge;
}
.pcards:hover > .pcard::before { opacity: 1; }
.pcards:hover > .pcard::after { opacity: .925; transition-delay: 0s; }

/* cover: fills the card at rest; on hover the bottom is clipped away
   (clip-path + transforms only, so nothing re-lays out mid-animation) */
.pcard--podcast { --c1: var(--orange-hi); --c2: var(--orange-lo); --btn: #fff;        --icon: var(--blue); --on-cover: #fff;        --p1: #f0702a; --p2: #d24c14; --on-panel: #fff; }
.pcard--article { --c1: var(--blue-hi);   --c2: #121bb8;          --btn: #fff;        --icon: var(--blue); --on-cover: #fff;        --p1: #2a36f0; --p2: #1018a8; --on-panel: #fff; }
.pcard--talk    { --c1: #f4f3ee;          --c2: #dcdbd4;          --btn: var(--blue); --icon: #fff;        --on-cover: var(--ink); --p1: #f4f3ee; --p2: #e6e5df; --on-panel: var(--ink); }
.pcard__cover {
  position: absolute; inset: 8px; z-index: 3;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  color: var(--on-cover);
  clip-path: inset(0 0 0 0 round 16px);
  transition: clip-path var(--dur) var(--smooth);
}
.pcard__art {
  position: absolute; left: 14px; right: 14px; top: 44px;
  font-size: clamp(40px, 13.5cqw, 92px); font-weight: 900; line-height: .86;
  font-variation-settings: "wdth" 62; letter-spacing: -.01em;
  text-transform: uppercase; overflow-wrap: break-word;
  transform-origin: 0 0;
  transition: scale var(--dur) var(--smooth);
}
.pcard__kind {
  position: absolute; left: 12px; top: 12px;
  font-size: 11px; letter-spacing: .06em;
}
.pcard__cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 20%;
  transition: scale var(--dur) var(--smooth);
}
/* soft blur strip, tinted with the cover colour, so the title reads */
.pcard__cover::after {
  content: ""; position: absolute; inset: auto 0 0; height: calc(var(--head) + 48px);
  background: linear-gradient(transparent, color-mix(in srgb, var(--c2) 92%, transparent) 70%);
  transition: opacity .3s;
}

/* magnetic button (play / read): eased toward the pointer in main.js */
.pcard__play {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--btn); color: var(--icon);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 20, .45);
  transition: scale .35s var(--smooth);
}
.pcard__play svg { width: 24px; height: 24px; display: block; }
.pcard__play .i-play { fill: currentColor; }
.pcard__play .i-read { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* text: sits on the cover's bottom edge at rest, slides up into view on hover */
.pcard__body {
  position: absolute; left: 8px; right: 8px; bottom: 8px; height: var(--panel);
  z-index: 4;
  display: flex; flex-direction: column;
  padding: 12px 12px 10px;
  color: var(--on-cover);
  translate: 0 calc(100% - var(--head));
  transition: translate var(--dur) var(--smooth), color .3s;
}
.pcard__body::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--p1), var(--p2));
  opacity: 0;
  transition: opacity .3s;
}
.pcard__body > * { flex-shrink: 0; }
.pcard__outlet { font-size: 11px; }
.pcard__title {
  margin: 6px 0 0; padding-bottom: .08em;
  font-size: clamp(19px, 1.7vw, 26px); font-weight: 700; line-height: 1.05;
  font-variation-settings: "wdth" 78; letter-spacing: -.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__desc {
  margin: 6px 0 0;
  font-size: 15px; line-height: 1.38; color: inherit;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  opacity: 0; translate: 0 6px;
  transition: opacity .15s, translate .3s var(--smooth);
}
.pcard__foot {
  margin-top: auto; padding-top: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  opacity: 0; translate: 0 6px;
  transition: opacity .15s, translate .3s var(--smooth);
}
/* footer: warm-white text in the site's own type (no pills, no mono caps) */
.pcard { --warm: #fff3e2; --foot-fg: var(--warm); }
.pcard--talk { --foot-fg: var(--ink); }
.pcard__meta,
.pcard__verb {
  font-family: var(--display); text-transform: none; letter-spacing: -.005em;
  font-size: 14px; line-height: 1.2;
  color: var(--foot-fg);
}
.pcard__meta { font-weight: 500; opacity: .8; }
.pcard__verb {
  display: inline-block; font-weight: 700;
  transition: translate .3s var(--spring);
}
.pcard:hover .pcard__verb { translate: 4px 0; }

/* open state */
.pcard:is(:hover, .is-active) .pcard__cover, .pcard:focus-visible .pcard__cover { clip-path: inset(0 0 calc(var(--panel) + 6px) 0 round 16px); }
.pcard:is(:hover, .is-active) .pcard__cover::after, .pcard:focus-visible .pcard__cover::after { opacity: 0; }
.pcard:is(:hover, .is-active) .pcard__cover img, .pcard:focus-visible .pcard__cover img { scale: 1.05; }
.pcard:is(:hover, .is-active) .pcard__art, .pcard:focus-visible .pcard__art { scale: .62; }
.pcard:is(:hover, .is-active) .pcard__play, .pcard:focus-visible .pcard__play { scale: 1.12; }
.pcard:is(:hover, .is-active) .pcard__body, .pcard:focus-visible .pcard__body { translate: 0 0; color: var(--on-panel); }
.pcard:is(:hover, .is-active) .pcard__body::before, .pcard:focus-visible .pcard__body::before { opacity: 1; }
.pcard:is(:hover, .is-active) .pcard__desc, .pcard:focus-visible .pcard__desc,
.pcard:is(:hover, .is-active) .pcard__foot, .pcard:focus-visible .pcard__foot {
  opacity: 1; translate: 0 0;
  transition: opacity .35s .08s, translate .5s .08s var(--smooth);
}
.pcard:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* floating button that carries the open card's button with the cursor (main.js) */
.pcards { position: relative; }
.pcards__fly {
  position: absolute; left: 0; top: 0; z-index: 6;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--btn, #fff); color: var(--icon, var(--blue));
  box-shadow: 0 14px 30px -10px rgba(0, 0, 20, .5);
  pointer-events: none;
  opacity: 0; scale: .6;
  transition: opacity .2s, scale .35s var(--smooth), background-color .25s, color .25s;
  will-change: translate, transform;
}
.pcards__fly svg { width: 24px; height: 24px; display: block; }
/* the icon swaps when the button hops to another card (play ↔ read): ease the
   new one in so the hop doesn't blink; colours already cross-fade above */
.pcards__fly svg { animation: fly-icon .3s var(--smooth) both; }
@keyframes fly-icon { from { opacity: 0; scale: .5; } }
@media (prefers-reduced-motion: reduce) { .pcards__fly svg { animation: none; } }
.pcards__fly .i-play { fill: currentColor; }
.pcards__fly .i-read { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pcards.is-flying .pcards__fly { opacity: 1; scale: 1; }
.pcards.is-on .pcards__fly { scale: 1.12; }
/* the card being carried hides its own button while the floating one stands in */
.pcard.is-carried .pcard__play { opacity: 0; transition: opacity .1s; }
/* the magnetic button stands in for the cursor over the grid, so hide the
   system one (only once JS has the button up; is-on is set by main.js) */
@media (hover: hover) and (pointer: fine) {
  .pcards.is-on, .pcards.is-on * { cursor: none; }
}

/* touch: no hover, so every card shows open with the button centred on the cover */
@media (hover: none) {
  .pcard .pcard__cover { clip-path: inset(0 0 calc(var(--panel) + 6px) 0 round 16px); }
  .pcard .pcard__cover::after { opacity: 0; }
  .pcard .pcard__art { scale: .62; }
  .pcard .pcard__play { top: calc((100% - var(--panel) - 6px) / 2); }
  .pcard .pcard__body { translate: 0 0; color: var(--on-panel); }
  .pcard .pcard__body::before { opacity: 1; }
  .pcard .pcard__desc, .pcard .pcard__foot { opacity: 1; translate: 0 0; }
}
@media (max-width: 1000px) {
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard { height: clamp(440px, 58vw, 540px); }
}
@media (max-width: 620px) {
  .pcards { grid-template-columns: minmax(0, 1fr); }
  .pcard { height: 460px; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  padding: clamp(90px, 12vw, 160px) var(--pad) clamp(80px, 10vw, 140px);
  background: var(--blue); color: var(--paper);
}
.footer__word {
  margin: .12em calc(var(--pad) * -0.1) -.066em; /* top room for the hover lift; bottom: letters sit on the page edge */
  font-weight: 900; line-height: .74; letter-spacing: -.01em;
  font-variation-settings: "wdth" 62;
  white-space: nowrap;
}
.footer { overflow: hidden; }
/* "mezi" link (hero name + footer word): lowercase + orange. On hover the letters
   hop up in a quick wave and a rounded underline wipes in beneath them. */
.name__brand, .footer__mezi {
  position: relative; display: inline-block;
  color: var(--orange); text-decoration: none; text-transform: lowercase;
  transition: color .3s;
}
.name__brand > .ch, .footer__mezi > .l {
  display: inline-block;
  transition: translate .55s cubic-bezier(.34, 1.56, .64, 1);
}
.name__brand > :nth-child(2), .footer__mezi > :nth-child(2) { transition-delay: .04s; }
.name__brand > :nth-child(3), .footer__mezi > :nth-child(3) { transition-delay: .08s; }
.name__brand > :nth-child(4), .footer__mezi > :nth-child(4) { transition-delay: .12s; }
.name__brand:hover > *, .footer__mezi:hover > * { translate: 0 -.08em; }
/* hero: the lines sit only ~.06em apart, so a full .08em hop (on top of the
   cursor-proximity lift) pushes the dot of the "i" into the "L" above */
.name__brand:hover > * { translate: 0 -.025em; }
.name__brand::after, .footer__mezi::after {
  content: ""; position: absolute; left: .03em; right: .03em; bottom: -.02em; height: .045em;
  border-radius: 1em; background: currentColor;
  clip-path: inset(0 100% 0 0 round 1em);
  transition: clip-path .5s var(--ease) .08s;
}
.footer__mezi::after { bottom: .066em; height: .03em; } /* sits on the page's bottom edge, under the lifted letters */
.name__brand:hover, .footer__mezi:hover { color: var(--orange-hi); }
.name__brand:hover::after, .footer__mezi:hover::after { clip-path: inset(0 0 0 0 round 1em); }
/* tiny ".app" at the bottom right of the "i": out of flow so the big letters don't move.
   The outer span keeps the big font size, so its offsets and the hover lift (.08em)
   match the letters; the inner span carries the small text. */
.footer__tld {
  position: absolute; left: 100%; bottom: .066em; margin-left: -.016em; /* bottom = the page edge */
  transition: translate .55s cubic-bezier(.34, 1.56, .64, 1) .16s;
}
/* lifts a little less than the letters so the period lands on the bottom of the lifted "i" */
.footer__mezi:hover > .footer__tld { translate: 0 -.048em; }
.footer__tld > span {
  display: block; font-size: clamp(8px, .55vw, 11px); line-height: 1; letter-spacing: 0;
  font-weight: 700; font-variation-settings: "wdth" 100; text-transform: none;
}
.name__brand:focus-visible, .footer__mezi:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

/* =========================================================
   NFC TAP SCREEN
   ========================================================= */
.tap {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--blue); color: var(--paper);
  overflow-y: auto;
  transition: transform .8s var(--ease);
}
.tap[hidden] { display: none; }
.tap.is-leaving { transform: translateY(-100%); }
.tap__top { display: flex; justify-content: space-between; opacity: .8; }
.tap__stage { flex: 1; display: grid; place-items: center; min-height: 230px; perspective: 1000px; }
.card--tap { width: min(78vw, 340px); }
.card--tap .card__inner { animation: tapIn 1.4s var(--ease) both, float 6s 1.4s ease-in-out infinite; }
@keyframes tapIn {
  from { transform: translateY(70vh) rotateZ(25deg) rotateX(55deg) rotateY(-180deg); }
  to   { transform: rotateZ(-7deg); }
}
.tap__body { width: 100%; max-width: 480px; margin: 0 auto; animation: up .9s .5s var(--ease) both; }
@keyframes up { from { opacity: 0; transform: translateY(30px); } }
.tap__title {
  margin: 0;
  font-size: clamp(44px, 13vw, 72px); line-height: .9; font-weight: 800; letter-spacing: -.04em;
  font-variation-settings: "wdth" 80;
}
.tap__title em { font-weight: 900; }
.tap__sub { margin: 14px 0 24px; font-size: 18px; opacity: .85; max-width: 30ch; }
.tap__enter {
  display: block; margin: 22px auto 0; padding: 8px;
  border: 0; background: none; opacity: .75;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- mezi content ---------- */
.card__logo { display: inline-flex; align-items: center; gap: 8px; }
.card__logo img { width: 1.1em; height: 1.1em; border-radius: 6px; }

/* =========================================================
   SIMPLE: words, not pills
   ========================================================= */
.hero__top {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: clamp(16px, 2.4vw, 36px);
  align-self: start;
  padding-top: clamp(96px, 13vh, 150px);
  /* above the name: WILLIAM's box reaches higher than its letters and was
     swallowing hovers/clicks on these links. The row itself lets the mouse
     through (so the photo badge, which pokes up into it, still hovers);
     only the links catch it. */
  position: relative; z-index: 3;
  pointer-events: none;
}
.hero__top a { pointer-events: auto; }

.hero__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero__sub {
  font-size: clamp(16px, 1.5vw, 22px); font-weight: 600; line-height: 1.1;
  font-variation-settings: "wdth" 88; letter-spacing: -.01em;
  color: var(--paper); opacity: .85;
}
/* "MIT Physics" (not ", Course 8"): links to the department, turns MIT red on hover */
.hero__mit {
  display: inline-block;   /* a solid hover box, not just the glyphs */
  color: inherit; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  padding-bottom: 3px;
  transition: color .3s var(--ease), background-size .6s var(--ease);
}
.hero__mit:hover, .hero__mit:focus-visible { color: var(--mit-red); background-size: 100% 2px; outline: none; }

/* orange words, links to mezi */
.role {
  color: var(--orange-hi);
  font-size: clamp(22px, 2.4vw, 36px); font-weight: 700; line-height: 1.05;
  font-variation-settings: "wdth" 88; letter-spacing: -.02em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size .6s var(--ease);
}
.role:hover { background-size: 100% 2px; }
.role__arrow { display: inline-block; transition: transform .5s var(--ease); }
.role:hover .role__arrow { transform: translate(3px, -3px); }

/* underlined text link (used for "Visit mezi.app", "Send it") */
.textlink {
  display: inline-flex; gap: .3em; align-items: baseline;
  padding: 0 0 6px; border: 0; background: none;
  font-size: clamp(22px, 2.4vw, 34px); font-weight: 700; letter-spacing: -.02em;
  font-variation-settings: "wdth" 90;
  color: inherit; text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid currentColor;
}
.textlink span { display: inline-block; transition: transform .5s var(--ease); }
.textlink:hover span { transform: translate(4px, -4px); }

/* menu button: just three blue lines, they turn into an X */
.burger {
  /* name → burger icon matches photo → name: bar gap (14) + burger padding (10) - 12 = 12 */
  margin-left: -12px; flex: none;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--blue);
  cursor: pointer;
}
.burger:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.burger__icon { position: relative; width: 24px; height: 16px; }
.burger__icon i {
  position: absolute; right: 0; width: 100%; height: 2.5px; border-radius: 2px; background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease), width .35s var(--ease), opacity .2s;
}
.burger__icon i:nth-child(1) { top: 0; }
.burger__icon i:nth-child(2) { top: 6.75px; }
.burger__icon i:nth-child(3) { top: 13.5px; }
/* hover: the lines stagger */
.burger:not([aria-expanded="true"]):hover .burger__icon i:nth-child(2) { width: 70%; }
.burger:not([aria-expanded="true"]):hover .burger__icon i:nth-child(3) { width: 45%; }
.menu-open .burger__icon i:nth-child(1) { top: 6.75px; transform: rotate(45deg); }
.menu-open .burger__icon i:nth-child(2) { opacity: 0; }
.menu-open .burger__icon i:nth-child(3) { top: 6.75px; transform: rotate(-45deg); }


/* NFC tap screen: words */
.tap__save {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0;
  border-block: 2px solid var(--paper);
  font-size: clamp(30px, 9vw, 44px); font-weight: 800; letter-spacing: -.03em;
  font-variation-settings: "wdth" 85;
  text-decoration: none;
}
.tap__links { display: flex; gap: 22px; margin-top: 18px; }
.tap__links a { font-size: 18px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (max-width: 560px) {
  .me { width: 120px; --px: 88px; }
  .hero__top { gap: 14px; }
  .hero__foot span:nth-child(3) { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .hero__top { padding-top: 72px; padding-bottom: 32px; }
  .me { width: 110px; --px: 80px; }
}

/* =========================================================
   MEZI — one frame in mezi's style (Poppins, brand gradient,
   me·Z·i wordmark, white CTA, deal cards)
   ========================================================= */
.mz {
  --mz-font: "Poppins", system-ui, sans-serif;
  position: relative; isolation: isolate; overflow: hidden;
  font-family: var(--mz-font); font-variation-settings: normal;
  padding: 110px var(--pad) 70px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-hi), var(--orange-lo));
}
.mz::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46% 40% at 16% 10%, rgba(255,255,255,.22), transparent 70%),
    radial-gradient(50% 46% at 86% 92%, rgba(234,92,32,.5), transparent 72%);
  animation: mzDrift 20s ease-in-out infinite alternate;
}
.mz::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 38%, transparent 55%, rgba(0,0,0,.16));
}
@keyframes mzDrift { to { transform: translate3d(2%, 1.5%, 0) scale(1.08); } }
.mz-bubbles i {
  position: absolute; z-index: -1; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  animation: mzFloat 16s ease-in-out infinite alternate;
}
.mz-bubbles i:nth-child(1) { width: 30vw; max-width: 440px; aspect-ratio: 1; left: -10%; top: -22%; }
.mz-bubbles i:nth-child(2) { width: 40vw; max-width: 600px; aspect-ratio: 1; right: -12%; bottom: -30%; animation-duration: 19s; }
.mz-bubbles i:nth-child(3) { width: 16vw; max-width: 240px; aspect-ratio: 1; left: 40%; bottom: -12%; animation-duration: 13s; }
@keyframes mzFloat { to { translate: 2.5% -3%; scale: 1.05; } }

.mz-grid {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 5vw, 80px);
}
.mz-kicker { margin: 0 0 8px; font-size: 16px; font-weight: 600; letter-spacing: .01em; opacity: .9; }
.mz-kicker a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.mz-kicker a:hover { opacity: .7; }
.mz-wordmark {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-weight: 700; line-height: 1; letter-spacing: -.012em;
  font-size: clamp(3.6rem, 9vw, 8.5rem);
}
.mz-z {
  flex: 0 0 auto; width: .63em; height: .7em; margin: 0 .02em;
  transform: translateY(.08em);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)) drop-shadow(0 0 9px rgba(255,255,255,.45));
}
.mz-headline {
  margin: clamp(10px, 1.6vw, 18px) 0 0; max-width: 16ch;
  font-size: clamp(1.7rem, 3vw, 2.8rem); font-weight: 600; line-height: 1.12; letter-spacing: -.01em;
}
.mz-sub { margin: 18px 0 0; max-width: 38ch; font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.65; opacity: .92; }
.mz-actions { display: flex; align-items: center; gap: 12px; margin-top: clamp(28px, 4vh, 40px); flex-wrap: wrap; }
.mz-cta, .mz-store {
  display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 22px; border-radius: 16px;
  font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s ease, background .2s ease;
}
.mz-cta {
  background: #fff; color: var(--orange-lo); font-size: 1.1rem;
  box-shadow: 0 12px 30px -12px rgba(120, 40, 0, .55);
}
.mz-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.mz-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(120, 40, 0, .6); }
.mz-cta:hover svg { transform: translate(2px, -2px); }
.mz-store {
  padding: 0 20px 0 16px;
  background: #000; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 12px 30px -12px rgba(60, 20, 0, .6);
}
.mz-store:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 18px 36px -12px rgba(60, 20, 0, .65); }
.mz-store svg { width: 24px; height: 24px; flex: 0 0 auto; }
.mz-store span { display: flex; flex-direction: column; gap: 3px; font-size: 1.02rem; }
.mz-store small { font-size: 10.5px; font-weight: 500; letter-spacing: .03em; opacity: .85; }

/* interactive deal demo: mezi.app's "Try it out" carousel (the beats deal),
   ported from LandingPage.module.css / DealDemos.module.css with the app's
   tokens resolved to literal values. .mzd is a size container: at 760px+ the
   cards are the desktop ones as-is, 560-759px keeps their two columns with
   tighter padding, and under 560px they recompose the way mezi's phone layout
   does (one column, one fixed footprint, arrows beside the step heading). */
.mzd {
  container: mzd / inline-size;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  width: 100%; min-width: 0;
  font-family: "Poppins", system-ui, sans-serif; font-variation-settings: normal;
}
.mzd textarea { font-family: inherit; }
.mzd [data-bubbles] { position: relative; isolation: isolate; }
.mzd-file-input { display: none; }

/* role toggle: a rounded-rect segmented control; the orange fill is one
   element that slides between the tabs, under their labels */
.mzd-toggle {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center;
  padding: 4px; background: rgba(255, 255, 255, .18); border-radius: 12px;
}
.mzd-pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 9px; background: #fff;
  box-shadow: 0 2px 6px -2px rgba(90, 30, 0, .35);
  transition: transform .4s cubic-bezier(.3, 1.2, .5, 1), width .4s cubic-bezier(.3, 1.2, .5, 1);
}
.mzd-toggle.is-still .mzd-pill { transition: none; }
@media (prefers-reduced-motion: reduce) { .mzd-pill { transition: none; } }
.mzd-tab {
  position: relative; z-index: 1;
  padding: 8px 20px; background: none; border: none; border-radius: 9px;
  color: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 20px; white-space: nowrap;
  transition: color .2s ease-out;
}
.mzd-tab.is-active { color: #ea5c20; }

/* no frame: heading, card and controls sit straight on the orange */
.mzd-frame { position: relative; width: 100%; text-align: left; }
.mzd-viewport { position: relative; display: flex; justify-content: center; }
.mzd-slide { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.mzd-slide.is-in { animation: mzdMold .45s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes mzdMold { from { opacity: 0; transform: scale(.96); filter: blur(8px); } }
.mzd-heading, .mzd-step {
  margin: 0; color: #fff; text-align: center;
  font-size: 17px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; opacity: .92;
}
/* the step name above the buyer/seller switch: phones only (.mzm), where it
   stands in for the heading inside the slide */
.mzd-step { display: none; }
.mzm .mzd-step { display: block; }
.mzm .mzd-slide .mzd-heading { display: none; }
/* main.js moves keyboard focus here when a step changes: a landmark for
   screen readers, not a control, so no ring */
.mzd-heading:focus { outline: none; }
.mzd-controls { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.mzd-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: none; color: #fff; cursor: pointer;
  transition: opacity .15s ease-out;
}
.mzd-arrow svg { width: 22px; height: 22px; }
.mzd-arrow:hover { opacity: .75; }
.mzd-arrow.is-hidden { visibility: hidden; }
.mzd-dots { display: flex; align-items: center; justify-content: center; gap: 6px; }
.mzd-dot {
  width: 6px; height: 6px; padding: 0;
  background: rgba(255, 255, 255, .45); border: none; border-radius: 999px; cursor: pointer;
  transition: width .2s ease-out, background .2s ease-out;
}
.mzd-dot.is-active { width: 16px; background: #fff; }

/* the one white surface: the deal card */
.mzd-card, .mzd-review, .mzd-finish, .mzd-offer, .mzd-deliver, .mzd-payout {
  display: flex; width: 100%; min-height: 440px;
  background: #fff; border: none; border-radius: 20px;
  box-shadow: 0 24px 48px -24px rgba(90, 30, 0, .55);
  color: #000; text-align: left;
}

/* file thumbnails: a beat's waveform, the first lines of a text file, or the glyph */
.mzd-wave { display: block; width: 100%; height: 100%; padding: 4px; background: #f9f9f9; }
.mzd-wave canvas { display: block; width: 100%; height: 100%; }
.mzd-tthumb {
  width: 100%; height: 100%; margin: 0; padding: 4px; overflow: hidden;
  font: 5px/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre; text-align: left; color: #101828; background: #f9f9f9;
}
.mzd-ticon { display: grid; place-items: center; width: 100%; height: 100%; color: #6a7282; }
.mzd-ticon svg { width: 50%; height: 50%; }
/* image thumbnails: tiles crop to fill; the review plates show the whole render */
.mzd-thumb img, .mzd-ref-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mzd-plate-wave img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* a render needs the whole plate (a waveform leaves room for the labels); the labels sit over it */
.mzd-plate-wave.is-image, .mzd-plate-wave.is-image.is-badged { inset: 6px; }

/* 1. Create a deal */
.mzd-card {
  flex-direction: column; justify-content: center; gap: 12px;
  max-width: 560px; padding: 20px 28px 24px;
}
.mzd-card > * { flex: none; }
.mzd-card-title {
  display: flex; align-items: center; gap: 12px; margin: 0;
  color: #1f2738; font-size: 18px; font-weight: 700; letter-spacing: -.45px; line-height: 28px;
}
.mzd-card-title > span { text-decoration: none; }
.mzd-label { margin: 0; color: #000; font-size: 16px; letter-spacing: -.15px; line-height: 22px; }
.mzd-field {
  padding: 12px 18px; background: #f9f9f9; border: 2px solid #e4e4e4; border-radius: 14px;
  color: #000; font-size: 20px; letter-spacing: -.15px; line-height: 22px; overflow-wrap: anywhere;
}
.mzd-card > .mzd-field--multi { flex: 1 1 auto; min-height: 84px; font-size: 15px; }
.mzd-field--input { display: block; width: 100%; resize: none; transition: border-color .12s ease; }
.mzd-field--input::placeholder, .mzd-amount-input::placeholder { color: rgba(0, 0, 0, .3); }
.mzd-field--input:focus-visible { outline: none; border-color: #f97316; }
.mzd-amount { display: flex; align-items: center; gap: 4px; transition: border-color .12s ease; }
.mzd-amount:focus-within { border-color: #f97316; }
.mzd-amount-input {
  flex: 1; min-width: 0; padding: 0;
  background: none; border: none; color: inherit; font: inherit; letter-spacing: inherit;
}
.mzd-amount-input:focus-visible { outline: none; }
.mzd-action {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  height: 46px; margin-top: 4px;
  background: #f97316; border: none; border-radius: 24px; box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.44px;
  cursor: pointer; transition: transform .12s ease-out;
}
.mzd-action:hover, .mzd-action:focus-visible { transform: translateY(-1px); }

/* 2. Review the work */
.mzd-review { gap: 48px; max-width: 820px; padding: 40px 44px; }
.mzd-review-previews { display: flex; flex-direction: column; gap: 16px; flex: 1 1 330px; min-width: 0; }
.mzd-review-row { display: flex; gap: 16px; }
.mzd-plate {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  padding: 0; border: none; border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
  font-family: inherit; cursor: pointer;
}
.mzd-plate--main { height: 220px; background: linear-gradient(138deg, #f1f5f9 0%, #e2e8f0 100%); }
.mzd-plate--warm { flex: 1; height: 110px; background: linear-gradient(135deg, #fffbeb 0%, #ffedd4 100%); }
.mzd-plate--cool { flex: 1; height: 110px; background: linear-gradient(134deg, #eff6ff 0%, #cefafe 100%); }
.mzd-plate-wave { position: absolute; inset: 16px 20px 48px; display: block; overflow: hidden; transition: transform .15s ease; }
.mzd-plate-wave.is-badged { top: 48px; }
.mzd-plate-wave .mzd-wave { background: transparent; }
.mzd-plate:hover .mzd-plate-wave, .mzd-plate:focus-visible .mzd-plate-wave { transform: scale(1.04); }
.mzd-plate-label, .mzd-plate-file {
  position: absolute; left: 20px; padding: 6px 12px;
  background: rgba(0, 0, 0, .6); border-radius: 10px; color: #fff; font-size: 12px;
}
.mzd-plate-label { top: 16px; letter-spacing: -.15px; white-space: nowrap; }
.mzd-plate-file { bottom: 16px; letter-spacing: -.3px; }
.mzd-extras { display: flex; flex-direction: column; gap: 8px; }
.mzd-extra {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px;
  background: #f9f9f9; border: 1px solid rgba(0, 0, 0, .06); border-radius: 14px;
}
.mzd-extra-icon, .mzd-ficon, .mzd-dicon {
  display: flex; align-items: center; justify-content: center; flex: none;
  background: rgba(39, 174, 96, .09); color: #16a34a;
}
.mzd-extra-icon { width: 28px; height: 28px; border-radius: 10px; }
.mzd-extra-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #111; font-size: 12px; font-weight: 600; letter-spacing: -.15px;
}
.mzd-extra-size { flex: none; color: #6e6e6e; font-size: 12px; }
.mzd-review-right { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; flex: 1 1 300px; min-width: 0; }
.mzd-review-head { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mzd-review-deal { display: flex; flex-direction: column; gap: 4px; }
.mzd-review-title {
  margin: 0; color: #1f2738; text-decoration: none;
  font-size: 18px; font-weight: 700; letter-spacing: -.45px; line-height: 28px;
}
.mzd-note {
  display: flex; flex-direction: column; flex: none; gap: 4px; padding: 0;
}
.mzd-note-heading { margin: 0; color: #717182; font-size: 13px; font-weight: 500; letter-spacing: -.44px; }
.mzd-note-body { margin: 0; color: #0a0a0a; font-size: 13px; line-height: 1.6; letter-spacing: -.3px; overflow-wrap: anywhere; }
.mzd-review-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
.mzd-revision {
  padding: 6px 24px; color: #6e6e6e; font-size: 14px; text-align: center;
}
.mzd-approve, .mzd-download, .mzd-submit {
  padding: 8px 24px;
  background: linear-gradient(90deg, #ff6b35, #f97316); border: none; border-radius: 25px;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -.3px; text-align: center;
  cursor: pointer; transition: transform .12s ease-out;
}
.mzd-approve:hover, .mzd-approve:focus-visible,
.mzd-download:hover, .mzd-download:focus-visible,
.mzd-submit:hover, .mzd-submit:focus-visible { transform: translateY(-1px); }

/* 3. Get your files */
.mzd-finish { gap: 48px; max-width: 820px; padding: 40px 44px; }
.mzd-finish-files { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; min-width: 0; }
.mzd-finish-list {
  display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; min-height: 0;
  overflow-y: auto; direction: rtl; padding-left: 16px;
}
.mzd-finish-list, .mzd-dlist { scrollbar-width: thin; scrollbar-color: #d9d9d9 transparent; }
.mzd-frow, .mzd-drow {
  direction: ltr; display: flex; align-items: center; gap: 12px; flex: none;
  width: 100%; padding: 12px 16px;
  background: #f6f6f7; border: 1px solid transparent; border-radius: 14px;
  text-align: left; cursor: pointer; transition: border-color .12s ease;
}
.mzd-frow:hover, .mzd-frow:focus-visible, .mzd-drow:hover, .mzd-drow:focus-visible,
.mzd-frow.is-playing, .mzd-drow.is-playing { border-color: #f97316; }
.mzd-thumb { display: block; flex: none; overflow: hidden; width: 34px; height: 34px; border-radius: 10px; }
.mzd-ficon { width: 34px; height: 34px; border-radius: 14px; }
.mzd-ftext { display: flex; flex-direction: column; min-width: 0; }
.mzd-fname, .mzd-dname {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #111; font-size: 12px; font-weight: 600; letter-spacing: -.15px;
}
.mzd-fsize { color: #6e6e6e; font-size: 12px; }
.mzd-download { align-self: flex-end; padding-block: 6px; }
.mzd-finish-side { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; flex: 0 1 320px; min-width: 0; }
.mzd-receipt {
  display: flex; flex-direction: column; gap: 8px; flex: none; padding: 0;
}
.mzd-receipt-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex: none; }
.mzd-receipt-label { color: #6e6e6e; font-size: 12px; }
.mzd-receipt-value { color: #111; font-size: 14px; font-variant-numeric: tabular-nums; }
.mzd-receipt-divider { flex: none; height: 1px; background: rgba(0, 0, 0, .06); }
.mzd-total-label { color: #0d0d0d; font-size: 15px; font-weight: 600; }
.mzd-total-amount { color: #0d0d0d; font-size: 20px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.mzd-rate {
  display: flex; flex-direction: column; gap: 12px; flex: none; min-width: 0; padding: 0;
}
.mzd-rate-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.mzd-rate-label { margin: 0; color: #0d0d0d; font-size: 14px; font-weight: 500; }
.mzd-stars { display: inline-flex; gap: 2px; color: #f97316; }
.mzd-star {
  display: inline-flex; padding: 0; background: none; border: none; color: inherit;
  cursor: pointer; transition: transform .12s ease-out;
}
.mzd-star:hover, .mzd-star:focus-visible { transform: scale(1.2); }
.mzd-rate-input {
  display: block; flex: none; width: 100%; height: 128px; margin: 0; padding: 12px 14px;
  background: #f6f6f7; border: 2px solid transparent; border-radius: 14px;
  color: #000; font-size: 12px; line-height: 1.5; resize: none; transition: border-color .12s ease;
}
.mzd-rate-input::placeholder { color: #525252; font-style: italic; }
.mzd-rate-input:focus-visible { outline: none; border-color: #f97316; }

/* seller 1. Accept the deal */
.mzd-offer { flex-direction: column; gap: 16px; max-width: 452px; padding: 24px 32px 28px; }
.mzd-offer-head, .mzd-deliver-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mzd-offer-title { color: #101828; font-size: 18px; font-weight: 700; letter-spacing: -.45px; }
.mzd-offer-meta { display: inline-flex; align-items: center; gap: 6px; color: #555; font-size: 12px; letter-spacing: -.15px; }
.mzd-offer-desc { margin: 0; color: #555; font-size: 16px; letter-spacing: -.15px; line-height: 1.4; overflow-wrap: anywhere; }
.mzd-refs-label, .mzd-dlabel { margin: 0; color: #101828; font-size: 15px; font-weight: 700; letter-spacing: -.45px; }
.mzd-refs { display: flex; gap: 8px; min-width: 0; }
.mzd-ref {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  flex: 0 1 auto; min-width: 0; width: 94px; height: 42px; padding: 0;
  border: none; border-radius: 14px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #717182; cursor: pointer;
}
.mzd-ref--wide { width: 119px; }
.mzd-card .mzd-ref { width: 126px; height: 48px; }
.mzd-card .mzd-ref--wide { width: 160px; }
.mzd-ref-img { display: block; width: 100%; height: 100%; transition: transform .15s ease; }
.mzd-ref:hover .mzd-ref-img, .mzd-ref:focus-visible .mzd-ref-img { transform: scale(1.06); }
.mzd-receive {
  display: flex; flex-direction: column; justify-content: center; flex: 1; overflow: hidden;
  padding: 0; color: #16a34a;
}
.mzd-receive-label { position: relative; margin: 0; color: #6e6e6e; font-size: 12px; font-weight: 500; letter-spacing: .55px; text-transform: uppercase; }
.mzd-receive-amount { position: relative; margin: 4px 0 0; font-size: 30px; font-weight: 700; letter-spacing: .26px; }
.mzd-secured {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0;
  color: #16a34a; font-size: 13px; font-weight: 500;
}

/* seller 2. Deliver the work */
.mzd-deliver { flex-direction: column; gap: 20px; max-width: 773px; padding: 32px 40px 24px; }
.mzd-deliver-body { display: flex; gap: 40px; flex: 1; min-height: 0; }
.mzd-deliver-left { display: flex; flex-direction: column; gap: 16px; flex: 1 1 388px; min-width: 0; }
.mzd-deliver-right { display: flex; flex-direction: column; gap: 16px; flex: 1 1 300px; min-width: 0; min-height: 0; }
.mzd-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  flex: 1; min-height: 150px; padding: 24px;
  background: none; border: 2px dashed #e0e2e6; border-radius: 14px;
  cursor: pointer; transition: border-color .12s ease;
}
.mzd-drop:hover, .mzd-drop:focus-visible, .mzd-drop.is-drag { border-color: #f97316; }
.mzd-drop-icon {
  display: flex; align-items: center; justify-content: center; color: #f97316;
}
.mzd-drop-title { color: #101828; font-size: 12px; font-weight: 600; letter-spacing: -.3px; }
.mzd-drop-hint { color: #6a7282; font-size: 12px; }
.mzd-drop-browse { color: #f54900; font-weight: 500; }
.mzd-uploads { display: flex; min-height: 0; max-height: 136px; }
.mzd-dlist {
  display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; direction: rtl;
}
.mzd-dicon { overflow: hidden; width: 32px; height: 32px; border-radius: 14px; }
.mzd-dicon img { width: 100%; height: 100%; object-fit: cover; }
.mzd-dnote {
  display: block; flex: 1; width: 100%; min-height: 64px; padding: 12px 16px;
  background: #f6f6f7; border: 2px solid transparent; border-radius: 14px;
  color: #111; font-size: 13px; line-height: 18px; letter-spacing: -.15px;
  resize: none; transition: border-color .12s ease;
}
.mzd-dnote::placeholder { color: #6e6e6e; }
.mzd-dnote:focus-visible { outline: none; border-color: #f97316; }
.mzd-submit { align-self: flex-end; min-width: 163px; }

/* seller 3. Get paid */
.mzd-payout { flex-direction: column; gap: 20px; max-width: 420px; padding: 28px; }
.mzd-payout-confirm {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  flex: 1; padding: 8px; text-align: center;
}
.mzd-payout-check {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 62px; height: 62px; border-radius: 50%; background: #dcfce7; color: #15803d;
}
.mzd-payout-title { margin: 0; color: #101828; font-size: 16px; font-weight: 700; letter-spacing: -.45px; }
.mzd-payout-completed { margin: 0; color: #000; font-size: 12px; font-weight: 500; }
.mzd-wallet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; padding: 10px 32px;
  background: #f97316; border: none; border-radius: 25px;
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .12s ease-out;
}
.mzd-wallet:hover, .mzd-wallet:focus-visible { transform: translateY(-1px); }
.mzd-payout-total {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 0 0;
  border-top: 1px solid rgba(0, 0, 0, .07);
}
.mzd-payout-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #000; font-size: 12px; font-weight: 500; }
.mzd-payout-sub { margin: 0; color: #727272; font-size: 12px; font-weight: 500; }

/* one fixed card for every step and both roles, at every width: mezi's own
   phone layout, so switching buyer/seller or stepping never resizes it. */
@container mzd (min-width: 0px) {
  .mzd-tab { padding: 10px 18px; }

  .mzd-card, .mzd-review, .mzd-finish, .mzd-offer, .mzd-deliver, .mzd-payout {
    flex-direction: column; justify-content: flex-start;
    max-width: 452px; height: 500px; min-height: 0;
    padding: 20px; gap: 12px; overflow-y: auto;
  }
  .mzd-card > *, .mzd-review > *, .mzd-finish > *,
  .mzd-review-right > *, .mzd-review-head > *, .mzd-finish-files > *, .mzd-finish-side > * { flex: none; }
  .mzd-card > .mzd-field--multi { flex: 1 1 96px; height: auto; min-height: 64px; }
  .mzd-amount-input { min-height: 44px; }
  .mzd-action { flex-shrink: 0; min-height: 44px; }
  .mzd-card > .mzd-action, .mzd-offer > .mzd-action, .mzd-deliver > .mzd-submit, .mzd-review-actions { margin-top: auto; }

  .mzd-offer-head, .mzd-deliver-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .mzd-offer-title { font-size: 16px; }
  .mzd-offer-desc {
    flex: none; overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  }
  .mzd-receive { flex: none; }

  /* review: head, one mosaic, the note, the decision */
  .mzd-review > .mzd-review-right, .mzd-review-right > .mzd-review-head { display: contents; }
  .mzd-review-deal { order: -2; }
  .mzd-review-title { font-size: 16px; line-height: 24px; }
  .mzd-review-previews {
    order: -1; flex: 1 1 auto; min-height: 160px;
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px;
  }
  .mzd-review-row { display: contents; }
  .mzd-plate--main { grid-row: 1 / 3; }
  .mzd-plate--main, .mzd-plate--warm, .mzd-plate--cool { height: auto; min-height: 0; }
  .mzd-extras { grid-column: 1 / -1; }
  .mzd-plate-label, .mzd-plate-file { left: 12px; padding: 4px 8px; }
  .mzd-plate-label { top: 8px; }
  .mzd-plate-file { bottom: 8px; }
  .mzd-plate--warm .mzd-plate-file, .mzd-plate--cool .mzd-plate-file {
    left: 6px; right: 6px; bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .mzd-note-body {
    overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  }
  .mzd-review-actions { flex-direction: row; }
  .mzd-review-actions > .mzd-revision, .mzd-review-actions > .mzd-approve {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding-inline: 12px; white-space: nowrap;
  }

  /* files: two up, the receipt, the stars */
  .mzd-finish > .mzd-finish-files, .mzd-finish > .mzd-finish-side { display: contents; }
  .mzd-finish-list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    flex: none; overflow-y: visible; direction: ltr; padding-left: 0;
  }
  .mzd-frow { min-width: 0; padding: 8px; }
  .mzd-receipt { flex: none; gap: 6px; }
  .mzd-rate { flex: none; }
  .mzd-rate-input { display: none; }
  .mzd-download { order: 1; align-self: stretch; margin-top: auto; }

  /* deliver: the dropzone and the uploads */
  .mzd-deliver-body { flex-direction: column; gap: 16px; }
  .mzd-deliver-left { flex: 0 1 auto; gap: 12px; }
  .mzd-deliver-right { flex: 1 1 auto; min-height: 0; gap: 12px; }
  .mzd-drop-hint { display: none; }
  .mzd-drop { flex: none; min-height: 56px; padding: 8px; }
  .mzd-drop-icon { width: 28px; height: 28px; }
  .mzd-uploads { flex: none; max-height: none; }
  .mzd-drow { padding: 8px 12px; }
  .mzd-dnote { min-height: 56px; }

  .mzd-payout-confirm { flex: 1 1 auto; min-height: 0; gap: 12px; padding: 8px; }
  .mzd-payout-check { width: 44px; height: 44px; }

  /* one button style across every step: full width on the card's floor */
  .mzd-action, .mzd-approve, .mzd-download, .mzd-submit, .mzd-wallet, .mzd-revision {
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; min-height: 48px; margin: 0; padding: 0 16px;
    border-radius: 14px; box-shadow: none;
    font-size: 15px; font-weight: 600; letter-spacing: -.2px;
  }
  .mzd-action, .mzd-download, .mzd-submit, .mzd-wallet { align-self: stretch; width: 100%; flex: none; }
  .mzd-revision { background: #f4f4f5; color: #3f3f46; cursor: pointer; }
  .mzd-card > .mzd-action, .mzd-deliver > .mzd-submit, .mzd-payout > .mzd-wallet { margin-top: auto; }

  /* get your files: the review box takes the room above the button */
  .mzd-rate { flex: 1 1 auto; min-height: 0; padding-top: 4px; }
  .mzd-rate-input { display: block; flex: 1 1 auto; height: auto; min-height: 56px; font-size: 13px; }
  .mzd-download { margin-top: 0; }

  /* accept the deal: what you'll receive sits with the button */
  .mzd-receive {
    flex: none; flex-direction: row; align-items: baseline; justify-content: space-between;
    margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, .07);
  }
  .mzd-receive-amount { margin: 0; font-size: 26px; }
  .mzd-secured { justify-content: flex-start; margin-top: -6px; }
  .mzd-offer > .mzd-action { margin-top: 4px; }
  .mzd-offer .mzd-refs { gap: 8px; }
  .mzd-offer .mzd-ref, .mzd-offer .mzd-ref--wide { flex: 1 1 0; width: auto; height: 104px; }

  /* get paid: the amount is the hero, the deal under it, the button on the floor */
  .mzd-payout-confirm { gap: 10px; }
  .mzd-payout-check { width: 56px; height: 56px; }
  .mzd-payout-amount { margin: 6px 0 0; color: #101828; font-size: 40px; font-weight: 700; letter-spacing: -.8px; line-height: 1; }
  .mzd-payout-total { flex: none; gap: 4px; padding-top: 14px; }
  .mzd-payout-row { font-size: 14px; font-weight: 600; }
}

@media (max-width: 900px) {
  .mz { padding-top: 96px; }
  .mz-grid { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .mz-headline, .mz-sub { margin-inline: auto; }
  .mz-actions { justify-content: center; }
}
@media (max-width: 480px) {
  .mz-cta { width: 100%; justify-content: center; }
  .mz-store { flex: 1 1 0; justify-content: center; padding-inline: 10px; }
}
/* short laptop screens (1280×720, 1366×768): the demo is ~650px tall, so the
   frame trims its padding and draws the demo a little smaller to fit one screen */
@media (min-width: 621px) and (max-height: 820px) {
  .mz { padding-top: 90px; padding-bottom: 28px; }
  .mz .mzd { zoom: .84; }
}

/* =========================================================
   FRAMES: every section is one screen
   ========================================================= */
.frame {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
}
.press.frame { justify-content: flex-start; padding-bottom: 56px; }
.press.frame .press__inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 48px; }
.contact.frame { padding: 86px var(--pad) 40px; }
.frame .label { margin-bottom: clamp(18px, 3.2vh, 40px); }

/* Page turns between frames are done in main.js ("Frames") for touch, wheel
   and keys alike, so phones and desktops scroll the same way. The old
   touch-only CSS scroll snap is in archive/touch-scroll-snap/. */

/* =========================================================
   PRESS: fit all six cards on one desktop screen
   (kept last so it wins over the .frame rules above)
   ========================================================= */
.press .label {
  padding: 0; background: none; border: 0; box-shadow: none; transform: none;
  color: #fff; font: 500 12px var(--mono); letter-spacing: .02em;
}
@media (min-width: 1001px) {
  /* no banner: the grid fills the screen, clearing the floating nav pill */
  .press.frame { height: 100svh; min-height: 640px; padding: 0; }
  .press.frame .press__inner { padding: 92px var(--pad) 24px; justify-content: flex-start; }
  .pcards { flex: 1; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pcard { height: auto; min-height: 0; container-type: size; }
  .pcard__title { font-size: clamp(18px, 1.5vw, 24px); }
  .pcard__desc { font-size: 14px; }
}
@container (max-height: 330px) { .pcard__desc { -webkit-line-clamp: 2; } }
@container (max-height: 280px) { .pcard__desc { -webkit-line-clamp: 1; } }
@container (max-height: 240px) { .pcard__desc { display: none; } }


/* =========================================================
   CONTACT: form card + two inboxes
   ========================================================= */
.cf {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(18px, 2vw, 28px); align-items: stretch;
}
.cf__card {
  --acc: var(--orange);
  position: relative;
  padding: clamp(22px, 2.8vw, 44px);
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink);
}
.cf__card[data-topic="personal"] { --acc: var(--blue); }
.cf { min-height: min(740px, calc(100svh - 250px)); }
.cf__card { display: flex; flex-direction: column; }
.cf__form { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.fw { display: flex; flex-direction: column; gap: 6px; }
.fw--grow { flex: 1; }
.fw--grow textarea.fi { flex: 1; }
.cf__form[hidden], .cf__done[hidden] { display: none; }

.cf__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.cf__title {
  margin: 0; font-size: clamp(28px, 2.6vw, 42px); font-weight: 900; letter-spacing: -.035em; line-height: 1;
}

/* the pill: a yellow thumb springs between the two options */
.pill {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 5px; border: 2.5px solid var(--ink); border-radius: 999px;
  background: #fff; box-shadow: 3px 3px 0 var(--ink);
}
.pill__thumb {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px);
  background: var(--pop); border: 2px solid var(--ink); border-radius: 999px;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), rotate .5s;
}
[data-topic="personal"] > .pill .pill__thumb, [data-topic="personal"] .cf__head .pill__thumb { transform: translateX(100%); }
.pill label { position: relative; z-index: 1; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill label span {
  display: block; padding: 10px 18px; text-align: center; white-space: nowrap;
  font-weight: 700; font-size: 15px; opacity: .5; transition: opacity .25s;
}
.pill input:checked + span { opacity: 1; }
.pill input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 999px; }
.pill:active .pill__thumb { rotate: -3deg; }

/* fields */
.fi {
  width: 100%; padding: 18px 20px;
  font: 600 19px/1.35 var(--display); color: var(--ink);
  background: #fff; border: 2.5px solid var(--ink); border-radius: 18px;
  outline: none; resize: vertical;
  transition: box-shadow .2s, transform .2s;
}
textarea.fi { min-height: 160px; }
.fi::placeholder { color: rgba(12,12,13,.4); font-weight: 500; }
.fi:focus { box-shadow: 4px 4px 0 var(--acc); transform: translate(-2px, -2px); }
.fi.is-bad { border-color: #e63946; background: #fff1f2; box-shadow: 4px 4px 0 #e63946; animation: shake .35s; }
.fi.is-bad::placeholder { color: rgba(230,57,70,.55); }
.fe { display: none; align-items: center; gap: 6px; padding-left: 4px; font: 600 13px var(--display); color: #e63946; }
.fe::before { content: "!"; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #e63946; color: #fff; font-size: 11px; font-weight: 900; }
.fi.is-bad + .fe { display: flex; }
@keyframes shake { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }

.cf__send {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding: 8px 8px 8px 26px;
  font: 800 19px/1 var(--display); letter-spacing: -.01em;
  background: var(--acc); color: #fff;
  border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: background .4s, transform .15s, box-shadow .15s;
}
.cf__arrow {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font-size: 22px;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.cf__send:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.cf__send:hover .cf__arrow { transform: rotate(-45deg); }
.cf__send:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cf__send:disabled { opacity: .7; cursor: progress; }
.cf__send:disabled .cf__arrow { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cf__hint { margin: 0; min-height: 1em; font-size: 12px; color: #e63946; }
.cf__hint a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf__done { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 24px 0; }
.cf__check {
  display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 8px;
  font-size: 44px; font-weight: 900; color: var(--ink);
  background: var(--pop); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 4px 4px 0 var(--ink);
  animation: pop-in .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes pop-in { from { transform: scale(0) rotate(-90deg); } }
.cf__done-title { margin: 0; font-size: clamp(36px, 3.6vw, 60px); font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.cf__done-sub { margin: 0 0 10px; font-size: 19px; opacity: .7; }
.cf__again { padding: 0 0 2px; background: none; border: 0; border-bottom: 1.5px solid currentColor; color: inherit; cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* icons */
.ic { width: 1em; height: 1em; flex: none; }
.pill label span { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pill label .ic { width: 16px; height: 16px; }

/* full-width form: name + email side by side, emails as chips in the header */
.cf { grid-template-columns: minmax(0, 1fr); }
.cf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 640px) {
  .cf__card { box-shadow: 6px 6px 0 var(--ink); border-radius: 22px; }
  .cf__head { flex-direction: column; align-items: stretch; }
  .cf__row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pill__thumb, .cf__check, .fi.is-bad { transition: none; animation: none; }
}

/* nav photo uses the hero's pop-out: on hover the head scales up and pops out of
   the top of the circle, while the circle itself stays the same size */
.logo__photo { position: relative; overflow: visible; background: none; box-shadow: none; }
/* the circle part of the image fills the link exactly (the extra headroom sticks out the
   top), so the photo is centred in the bar and lines up with the orbiting photo (main.js) */
.logo__photo img.pop--nav {
  --px: 42px; --b: 2px; --c: #fff; --cb: var(--blue);
  position: absolute; left: 0; bottom: 0;
  width: var(--px); height: auto; object-position: 50% 0;
  translate: none;
  box-shadow: none;
}
.logo__photo:hover img.pop--nav, .logo__photo:focus-visible img.pop--nav { --f: 1.4; }
@media (max-width: 768px) { .logo__photo img.pop--nav { --px: 38px; } }

/* KEEP (nav): "mezi" inside "mezitis" is orange, links to mezi.app, underlines on hover */
.logo__top { color: inherit; text-decoration: none; }
.logo__mezi {
  color: var(--orange); text-decoration: underline;
  text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 4px;
  transition: text-decoration-color .25s;
}
.logo__mezi:hover, .logo__mezi:focus-visible { text-decoration-color: currentColor; outline: none; }

/* KEEP (menu): matches the compact nav — a white card that drops straight down from the bar */
.menu {
  --bg: #fff;
  top: 86px; right: auto; left: 50%; translate: -50% 0;
  width: min(380px, calc(100vw - 32px));
  max-height: min(600px, calc(100dvh - 104px));
  border: 0; border-radius: 14px;
  box-shadow: 0 24px 60px -24px rgba(20, 17, 13, .35), 0 2px 6px -2px rgba(20, 17, 13, .06);
  color: #2d2823;
  font-family: "Poppins", system-ui, sans-serif;
  transform-origin: 50% -12px;
  transform: translateY(-10px) scale(.97);
}
.menu-open .menu { transform: none; }
.menu__tail, .menu__puff { display: none; }
.menu__search { margin: 10px 10px 2px; }
.menu__search svg { fill: rgba(45, 40, 35, .55); }
.menu__search input {
  border: 1px solid transparent; border-radius: 10px; background: #f3f2ee;
  font: 500 15px "Poppins", system-ui, sans-serif; color: #2d2823;
}
.menu__search input::placeholder { color: rgba(45, 40, 35, .5); }
.menu__search:hover input { border-color: rgba(20, 17, 13, .12); background: #f3f2ee; }
.menu__search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31, 44, 255, .12); }
.menu .tree [role="treeitem"] { font-family: "Poppins", system-ui, sans-serif; font-weight: 600; font-variation-settings: normal; letter-spacing: -.01em; border-radius: 10px; }
@media (max-width: 768px) {
  .menu { top: 82px; right: auto; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 96px); }
}

/* KEEP (hero): "Founder & CEO of mezi" — white at rest; on hover only "mezi"
   fills with orange from the left, lifts a touch, and gets an orange underline;
   the arrow turns orange and nudges out. */
.role {
  color: var(--paper);
  background: none; padding-bottom: 6px;
  /* a solid hover box: as an inline link its hit area was just the glyphs, so
     "mezi" lifting 2px could slide out from under the cursor and drop the hover */
  display: inline-block; position: relative; padding-top: 4px; margin-top: -4px;
}
.role::after { content: ""; position: absolute; inset: -4px -6px; }   /* a little slack round the edges */
.role__mezi::after { pointer-events: none; }
.role__mezi {
  position: relative; display: inline-block;
  transition: translate .5s cubic-bezier(.34, 1.56, .64, 1);
}
.role__mezi::before {                 /* the orange copy that wipes in over the white */
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--orange-hi);
  clip-path: inset(0 100% 0 0);
  transition: clip-path .5s var(--ease);
}
.role__mezi::after {                  /* orange underline under "mezi" only */
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 3px;
  border-radius: 3px; background: var(--orange-hi);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease) .06s;
}
.role__arrow { display: inline-block; transition: transform .5s var(--ease), color .3s; }
.role:hover .role__mezi, .role:focus-visible .role__mezi { translate: 0 -2px; }
.role:hover .role__mezi::before, .role:focus-visible .role__mezi::before { clip-path: inset(0 0 0 0); }
.role:hover .role__mezi::after, .role:focus-visible .role__mezi::after { transform: scaleX(1); }
.role:hover .role__arrow, .role:focus-visible .role__arrow { transform: translate(4px, -4px); color: var(--orange-hi); }
.role:hover, .role:focus-visible { background: none; outline: none; }

/* Normal system cursor everywhere (the custom "Open" cursor is gone);
   every link and button carries its own hover instead. */
a, button, [role="button"], select, label[for], summary { cursor: pointer; }

/* KEEP (hero): "mezi" in "Founder & CEO of mezi" is orange; on hover it lifts
   and an orange underline draws in beneath it, and the arrow nudges out. */
.role__mezi { color: var(--orange-hi); }
.role__mezi::before { display: none; }

/* contact: narrower, centered form */
.cf { width: 100%; max-width: 920px; margin-inline: auto; }

/* icon picker: the picked option expands to show its label, the other is just an icon */
.pill { display: inline-flex; grid-template-columns: none; gap: 4px; }
.pill label span {
  display: inline-flex; align-items: center; gap: 0;
  padding: 9px 11px; border: 2px solid transparent; border-radius: 999px;
  opacity: .55;
  transition: background .3s, border-color .3s, opacity .2s, padding .45s cubic-bezier(.34, 1.56, .64, 1);
}
.pill label .ic { width: 19px; height: 19px; }
.pill label em {
  font-style: normal; white-space: nowrap; overflow: hidden;
  max-width: 0; opacity: 0;
  transition: max-width .45s cubic-bezier(.34, 1.56, .64, 1), opacity .25s, margin .45s;
}
.pill label:hover span { opacity: .9; }
.pill input:checked + span { opacity: 1; padding-right: 16px; background: var(--acc); color: #fff; border-color: var(--ink); }
.pill input:checked + span em { max-width: 110px; opacity: 1; margin-left: 8px; }
@media (max-width: 640px) { .pill { align-self: flex-start; } }


/* smoother picker switch: one easing curve, synced timing, label fades in after the pill opens */
.pill { --sw: .5s; --se: cubic-bezier(.65, 0, .35, 1); }
.pill label span {
  transition: background-color var(--sw) var(--se), color var(--sw) var(--se),
              border-color var(--sw) var(--se), padding var(--sw) var(--se), opacity .3s;
}
.pill label em {
  transition: max-width var(--sw) var(--se), margin var(--sw) var(--se), opacity .15s ease;
}
.pill input:checked + span em {
  transition: max-width var(--sw) var(--se), margin var(--sw) var(--se), opacity .3s ease .18s;
}
.pill label .ic { transition: transform var(--sw) var(--se); }
.pill input:checked + span .ic { transform: scale(1.06); }

.cf__send, .fi { transition: background-color .5s cubic-bezier(.65, 0, .35, 1), box-shadow .2s, transform .2s, border-color .2s; }

/* the hint line only takes space when it has something to say */
.cf__hint:empty { display: none; }

/* =========================================================
   MENU 2.0 — original look + popups, commands, logo links
   with tabs, a calculator, popups (panes) and logo social buttons
   ========================================================= */
.menu {
  --surf: #f3f2ee; --line: rgba(20, 17, 13, .08); --muted: rgba(45, 40, 35, .6);
  display: flex; flex-direction: column; gap: 8px; overflow: visible;
  background: none; box-shadow: none;
}
/* two boxes: the main card, and the socials box under it */
.menu__card, .menu__foot {
  background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px -24px rgba(20, 17, 13, .35), 0 2px 6px -2px rgba(20, 17, 13, .06);
}
.menu__card { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: clip; }
/* never scroll sideways: hover nudges and wide italics stay clipped */
.menu__nav, .pane__body { overflow-x: clip; }
.menu__nav { flex: 1 1 auto; min-height: 0; padding: 4px 0 8px; }
.menu__search { flex: none; }
.menu kbd { font-family: var(--mono); }

/* icons */
.ico { width: 18px; height: 18px; flex: none; display: block; }
.ico--mezi {
  display: block; background: currentColor;
  -webkit-mask: url(/assets/mezi-mark-white.svg) center / contain no-repeat;
          mask: url(/assets/mezi-mark-white.svg) center / contain no-repeat;
}

/* footer: the original text links, each with its logo in brand colour */
.menu__foot { flex: none; position: relative; z-index: 1; } /* above the card's shadow, so it stays pure white */
.menu__chips { display: flex; flex-wrap: nowrap; justify-content: space-evenly; padding: 8px 6px; }
.soc {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; margin: 0;
  appearance: none; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer;
  font: 500 14px "Poppins", system-ui, sans-serif; color: rgba(45, 40, 35, .75);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: color .2s, text-decoration-color .2s;
}
.soc { padding: 8px; }
.soc .ico { width: 20px; height: 20px; transition: transform .4s var(--spring); }
.soc--x .ico { color: #000; }
.soc--instagram .ico { color: #e1306c; }
.soc--mezi .ico { color: var(--orange); }
.soc--mail .ico { color: var(--blue); }
.soc--linkedin .ico { color: #0a66c2; }
.soc--youtube .ico { color: #ff0000; }
.soc--tiktok .ico, .soc--threads .ico { color: #000; }
/* brand logo next to a link's name in search results */
.res__logo { display: inline-block; margin-right: 8px; vertical-align: -2px; }
.res__logo .ico { width: 18px; height: 18px; }
.res.is-top .res__logo .ico { color: var(--paper); }
.soc:hover, .soc:focus-visible { color: var(--blue); background: none; text-decoration-color: currentColor; outline: none; }
.soc:hover .ico, .soc:focus-visible .ico { transform: scale(1.18); }

/* search tabs: centered, Archivo like the page; one underline runs under the name and its count */
.menu__tabs { flex: none; display: flex; justify-content: space-between; gap: 8px; padding: 12px 24px 2px; }
.menu__tabs[hidden] { display: none; }
.menu__tabs button {
  display: inline-flex; align-items: baseline; gap: 4px; flex: none;
  padding: 2px 0 4px; border: 0; border-bottom: 2px solid transparent; background: none;
  font: 600 14px var(--display); letter-spacing: -.01em; font-variation-settings: "wdth" 90;
  color: var(--muted); transition: color .2s, border-color .2s;
}
.menu__tabs button i { font: 500 12px var(--mono); font-style: normal; opacity: .7; }
.menu__tabs button:hover:not(:disabled) { color: var(--ink); }
.menu__tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.menu__tabs button:disabled { opacity: .35; cursor: default; }

/* ---- smart search results (original look) ---- */
.menu__results { padding: 8px 12px 4px; display: grid; gap: 4px; }
.menu__results[hidden] { display: none; }
.res {
  position: relative; display: grid; gap: 3px; width: 100%;
  padding: 10px 14px 10px 16px; border: 0; border-radius: 14px; background: none;
  text-align: left; text-decoration: none; color: var(--ink); font: inherit;
  animation: res-in .4s var(--ease) both;
  transition: background .2s, transform .45s var(--spring), padding .4s var(--spring);
}
.res:nth-child(2) { animation-delay: .03s; } .res:nth-child(3) { animation-delay: .06s; }
.res:nth-child(4) { animation-delay: .09s; } .res:nth-child(n+5) { animation-delay: .12s; }
@keyframes res-in { from { opacity: 0; transform: translateY(6px); } }
.res small { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.res b {
  font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05;
  font-variation-settings: "wdth" 85;
  transition: font-variation-settings .5s var(--ease);
}
.res b i { display: inline-block; font-style: normal; font-weight: 600; color: var(--blue); transition: transform .4s var(--ease); }
.res > span { font-size: 14px; line-height: 1.35; opacity: .8; }
.res mark { background: none; color: inherit; text-decoration: underline 2px var(--blue); text-underline-offset: 3px; }
.res[aria-selected="true"] { background: rgba(31, 44, 255, .07); }
.res[aria-selected="true"] b { font-variation-settings: "wdth" 105; }
.res[aria-selected="true"] b i { transform: translate(5px, -2px) rotate(-10deg); }
.res.is-top { margin: 6px 0 8px; padding: 14px 16px; background: var(--blue); color: var(--paper); }
.res.is-top small { color: var(--paper); opacity: .7; }
.res.is-top b { font-size: 26px; }
.res.is-top b i, .res.is-top > span { color: var(--paper); }
.res.is-top mark { text-decoration-color: var(--paper); }
.res.is-top[aria-selected="true"] { background: var(--blue-hi); }
/* calculator: a right-aligned display in the site's type — expression small on top, answer in the headline face */
.res.is-calc {
  gap: 0; margin: 2px 0 6px; padding: 12px 16px 14px;
  background: var(--surf); animation: none; cursor: default; text-align: right;
}
.res.is-calc[aria-selected="true"] { background: var(--surf); }
.calc__q { font: 400 13px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.res.is-calc .calc__a {
  margin-top: 2px;
  font: 800 44px/1 var(--display); letter-spacing: -.02em; font-variation-settings: "wdth" 80;
  font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere;
}
.res.is-calc .calc__a--sm { font-size: 26px; line-height: 1.1; }
.calc__alt { margin-top: 4px; font: 500 15px var(--display); color: var(--muted); }
.calc__copy {
  position: absolute; top: 12px; left: 16px;
  font: 400 11px var(--mono); color: var(--muted); opacity: 0; transition: opacity .2s;
}
.res.is-calc[aria-selected="true"] .calc__copy, .res.is-calc:hover .calc__copy { opacity: 1; }
.res.is-calc .plot { text-align: left; }

.plot { margin-top: 8px; }
.plot svg {
  display: block; width: 100%; border-radius: 8px; background: #fff;
  touch-action: none; cursor: crosshair; user-select: none;
}
.plot svg.is-dragging { cursor: grabbing; }
.plot__grid { stroke: rgba(20, 17, 13, .07); stroke-width: 1; }
.plot__axis { stroke: rgba(20, 17, 13, .45); stroke-width: 1; }
.plot__labels { font: 400 9.5px var(--mono); fill: rgba(45, 40, 35, .6); stroke: #fff; stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; }
.plot__curve { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.plot__mark { fill: #fff; stroke: rgba(20, 17, 13, .45); stroke-width: 1.5; }
.plot__dot { stroke: #fff; stroke-width: 2; }
.plot__read { display: flex; min-height: 18px; padding-top: 6px; font: 400 12px var(--mono); color: var(--ink); }
.plot__read em { font-style: normal; color: var(--muted); }
.plot__tip { color: var(--muted); }

.menu__none { display: grid; justify-items: center; gap: 2px; padding: 18px 8px 12px; text-align: center; }
.menu__none b { font: 800 22px/1.1 var(--display); letter-spacing: -.02em; font-variation-settings: "wdth" 85; color: var(--ink); }
.menu__none span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px var(--display); color: var(--muted); }

/* clear-search ×, inside the right end of the field */
.menu__clear {
  position: absolute; right: 8px; top: 50%; translate: 0 -50%;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none;
  color: var(--muted); cursor: pointer; transition: color .2s, background .2s;
}
.menu__clear[hidden] { display: none; }
.menu__clear::before, .menu__clear::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.75px; border-radius: 2px;
  background: currentColor; translate: -50% -50%; rotate: 45deg;
}
.menu__clear::after { rotate: -45deg; }
.menu__clear:hover, .menu__clear:focus-visible { color: var(--ink); background: rgba(20, 17, 13, .06); outline: none; }
.menu__search:has(.menu__clear:not([hidden])) input { padding-right: 42px; }


/* ---------- panes: popups that slide in over the menu ---------- */
.pane {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  background: #fff; opacity: 0; transform: translateX(28px);
  transition: opacity .2s ease, transform .4s var(--ease);
}
.pane[hidden] { display: none; }
.pane.is-in { opacity: 1; transform: none; }
.pane__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pane__back {
  display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: var(--surf); color: #2d2823; transition: background .2s, color .2s, transform .35s var(--spring);
}
.pane__back svg { width: 18px; height: 18px; }
.pane__back:hover, .pane__back:focus-visible { background: var(--blue); color: #fff; transform: translateX(-2px); outline: none; }
.pane__title { flex: 1; font-size: 16px; font-weight: 600; }
.pane__esc { font-size: 10px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); text-transform: lowercase; }
.pane__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: grid; gap: 10px; align-content: start; }
.pane__body > * { animation: res-in .4s var(--ease) both; }
.pane__body > :nth-child(2) { animation-delay: .04s; } .pane__body > :nth-child(3) { animation-delay: .08s; } .pane__body > :nth-child(n+4) { animation-delay: .12s; }
.pane__label { margin: 4px 2px 0; font-size: 10.5px; letter-spacing: .06em; color: var(--muted); }
.pane__note { margin: 0 2px; font-size: 13px; color: var(--muted); }

.pbtn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 11px; background: var(--surf); color: #2d2823;
  font: 500 13.5px "Poppins", system-ui, sans-serif; text-align: left; text-decoration: none;
  transition: background .2s, color .2s, transform .35s var(--spring);
}
.pbtn .ico { width: 17px; height: 17px; }
.pbtn:hover, .pbtn:focus-visible { background: var(--blue); color: #fff; transform: translateY(-2px); outline: none; }
.pbtn:active { transform: scale(.97); }
.pbtn--solid { justify-content: center; background: var(--blue); color: #fff; }
.pbtn--solid:hover, .pbtn--solid:focus-visible { background: var(--blue-hi); }
.pbtn--ghost { justify-content: center; background: none; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pgrid--3 { grid-template-columns: repeat(3, 1fr); }
.pgrid--3 .pbtn { flex-direction: column; justify-content: center; gap: 6px; min-height: 76px; text-align: center; font-size: 12px; }
@media (max-width: 380px) { .pgrid--3 { grid-template-columns: 1fr 1fr; } }

/* email */
.pe__addr {
  display: grid; gap: 4px; justify-items: center; padding: 22px 12px; border: 1.5px dashed rgba(31, 44, 255, .35);
  border-radius: 14px; background: rgba(31, 44, 255, .04); color: var(--blue);
  font: 700 clamp(18px, 5.4vw, 22px) "Poppins", system-ui, sans-serif; letter-spacing: -.02em;
  transition: background .2s, color .2s, border-color .2s, transform .4s var(--spring);
}
.pe__addr small { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.pe__addr small .ico { width: 12px; height: 12px; }
.pe__addr:hover, .pe__addr:focus-visible { background: var(--blue); border-color: var(--blue); color: #fff; outline: none; transform: rotate(-1deg) scale(1.01); }
.pe__addr:hover small, .pe__addr:focus-visible small { color: rgba(255, 255, 255, .75); }

/* share */
.ps__url {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left;
  font: 500 14px var(--mono); color: #2d2823;
}
.ps__url span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps__url b {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px;
  background: var(--blue); color: #fff; font: 600 13px "Poppins", system-ui, sans-serif;
  transition: background .2s, transform .35s var(--spring);
}
.ps__url b .ico { width: 14px; height: 14px; }
.ps__url:hover b, .ps__url:focus-visible b { background: var(--blue-hi); transform: scale(1.05); }
.ps__url:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* time */
.ptime { display: grid; justify-items: center; text-align: center; padding: 4px 0; }
.ptime__clock { width: 150px; height: 150px; margin-bottom: 10px; overflow: visible; }
.ptime__face { fill: var(--surf); stroke: #2d2823; stroke-width: 1.5; }
.ptime__tick { stroke: rgba(45, 40, 35, .35); stroke-width: 1.5; stroke-linecap: round; }
.ptime__tick.is-major { stroke: #2d2823; stroke-width: 2.5; }
.ptime__h, .ptime__m, .ptime__s { stroke-linecap: round; transform-origin: 50px 50px; transform-box: view-box; }
.ptime__h { stroke: #2d2823; stroke-width: 4.5; }
.ptime__m { stroke: #2d2823; stroke-width: 3; }
.ptime__s { stroke: var(--orange); stroke-width: 1.5; transition: transform .35s var(--spring); }
.ptime__pin { fill: var(--orange); }
.ptime__big { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ptime__city { margin-top: 6px; font-size: 11px; color: var(--muted); }
.ptime__status {
  margin: 12px 0 14px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(31, 191, 106, .12); color: #11804a;
  font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px;
}
.ptime__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ptime__status[data-mood="zz"] { background: rgba(154, 143, 216, .16); color: #5b4fb0; }
.ptime__status[data-mood="am"] { background: rgba(238, 103, 34, .12); color: #c0501a; }
.ptime__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin: 0; }
.ptime__rows div { padding: 10px; border-radius: 11px; background: var(--surf); }
.ptime__rows dt { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ptime__rows dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; }


/* shortcuts */
.pkeys { display: grid; gap: 2px; }
.pkeys__row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.pkeys__row:last-child { border-bottom: 0; }
.pkeys__row span { display: flex; gap: 4px; min-width: 74px; }
.pkeys__row b { font-size: 13.5px; font-weight: 500; }
.pkeys kbd {
  min-width: 26px; padding: 3px 7px; border-radius: 6px; text-align: center;
  background: #fff; border: 1px solid rgba(20, 17, 13, .15); box-shadow: 0 2px 0 rgba(20, 17, 13, .12);
  font-size: 12px; color: #2d2823;
}

/* coin flip: a two-sided 3D coin with a real edge */
/* fill the whole pane: coin in the middle of the space, controls at the bottom */
.pane__body:has(.pcoin) { align-content: stretch; }
.pcoin { display: grid; grid-template-rows: 1fr auto auto auto; justify-items: center; gap: 12px; min-height: 100%; }
.pcoin__stage { position: relative; display: grid; place-items: center; align-self: stretch; width: 100%; min-height: 150px; padding: 4px 0 20px; perspective: 900px; }
.pcoin__btn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.pcoin__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.coin3d {
  --d: 124px;
  position: relative; display: block; width: var(--d); height: var(--d);
  transform-style: preserve-3d; transition: transform .25s var(--ease);
}
.pcoin__btn:hover .coin3d { transform: translateY(-4px); }
.coin3d__face, .coin3d__edge { position: absolute; inset: 0; border-radius: 50%; }
.coin3d__face {
  display: grid; place-items: center; overflow: hidden; backface-visibility: hidden;
  /* brass: lit from the top left, a raised rim, fine reeding on the rim */
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 250, 220, .75), transparent 42%),
    radial-gradient(circle, #e9b949 0 62%, #c8902a 63% 64%, #f3cf6b 65% 70%, #b07a1f 71% 100%);
  box-shadow: inset 0 0 0 3px #a06d1a, inset 0 0 0 7px #f6d676, inset 0 -6px 14px rgba(120, 70, 0, .35);
  transform: translateZ(5px);
}
.coin3d__face--t { transform: rotateX(180deg) translateZ(5px); }
.coin3d__face::after { /* reeded edge */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(rgba(110, 65, 0, .28) 0 1.2deg, transparent 1.2deg 3deg);
  -webkit-mask: radial-gradient(circle, transparent 0 69%, #000 70%); mask: radial-gradient(circle, transparent 0 69%, #000 70%);
}
.coin3d__face svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.coin3d__face text {
  font: 700 15px var(--display); letter-spacing: .16em; fill: #7a4f0f;
  font-variation-settings: "wdth" 90;
}
.coin3d__face img {
  width: 58%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  filter: grayscale(1) sepia(1) saturate(2.2) hue-rotate(-8deg) contrast(1.05) brightness(.95);
  mix-blend-mode: multiply; pointer-events: none;
}
.coin3d__face b {
  font: 900 68px/1 var(--display); letter-spacing: -.04em; color: #b9831f;
  font-variation-settings: "wdth" 80;
  text-shadow: -1px -1px 0 rgba(255, 245, 200, .9), 2px 2px 2px rgba(110, 65, 0, .5);
}
.coin3d__edge { background: #a8741c; transform: translateZ(calc(var(--z) * 1px)); }
.coin3d__edge:nth-child(even) { background: #8f6216; }
.pcoin__shadow {
  position: absolute; bottom: 2px; width: 104px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 17, 13, .28), transparent);
}
/* result: big Archivo with the same yellow marker as the About section */
.pcoin__out {
  margin: 0; font: 800 40px/1 var(--display); letter-spacing: -.03em; font-variation-settings: "wdth" 85;
  color: var(--ink);
}
.pcoin__out mark {
  color: inherit; padding: 0 .08em; margin: 0 -.04em; border-radius: .08em;
  background: linear-gradient(var(--pop), var(--pop)) no-repeat 0 88% / 100% 42%;
  animation: pcoin-mark .5s var(--ease) both;
}
@keyframes pcoin-mark { from { background-size: 0% 42%; } }
.pcoin__hist { display: flex; justify-content: center; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 16px; color: var(--muted); }
.pcoin__hist:empty::before { content: "\00a0"; } /* hold the line so the button never jumps */
.pcoin__hist li.is-new { color: var(--ink); }
/* button: the "fun fact" sticker */
.pcoin__go {
  justify-self: stretch; margin: 4px 4px 4px 0; padding: 10px 16px;
  font: 400 22px/1 var(--comic); letter-spacing: .05em; color: var(--ink);
  background: var(--pop); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
  transition: translate .15s var(--ease), box-shadow .15s var(--ease);
}
.pcoin__go:hover { translate: 0 -2px; box-shadow: 4px 6px 0 var(--ink); }
.pcoin__go:active { translate: 3px 3px; box-shadow: 1px 1px 0 var(--ink); }
.pcoin__go:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- toast + confetti + little page effects ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 400;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px;
  border-radius: 12px; background: var(--blue); color: #fff;
  font: 600 15px var(--display); box-shadow: 0 0 0 2px #fff, 0 14px 30px -14px rgba(20, 17, 13, .5);
  translate: -50% 20px; opacity: 0; scale: .9; pointer-events: none;
  transition: translate .45s var(--spring), opacity .2s, scale .45s var(--spring);
}
.toast .ico { width: 16px; height: 16px; }
.toast.is-in { translate: -50% 0; opacity: 1; scale: 1; }
.confetti { position: fixed; inset: 0; z-index: 300; width: 100vw; height: 100vh; pointer-events: none; }
.pcard.is-picked { animation: picked 2.4s var(--ease); z-index: 2; }
@keyframes picked { 0%, 100% { box-shadow: 0 0 0 0 rgba(238, 103, 34, 0); } 15%, 70% { box-shadow: 0 0 0 5px var(--orange); transform: translateY(-8px) rotate(-1.5deg); } }

/* "Lights off": invert the page content (not the nav/menu), keep photos looking normal */

/* the picked search result is solid blue, so ⌃ ⌄ (and arrow keys) are easy to follow.
   Once you move off the top result it drops to a tint, so only one row is ever solid. */
.res[aria-selected="true"]:not(.is-calc) { background: var(--blue); color: var(--paper); }
.res[aria-selected="true"] small,
.res[aria-selected="true"] b i { color: var(--paper); }
.res[aria-selected="true"] small { opacity: .75; }
.res[aria-selected="true"] mark { text-decoration-color: var(--paper); }
.res.is-top:not([aria-selected="true"], .is-calc) { background: rgba(31, 44, 255, .08); color: var(--ink); }
.res.is-top:not([aria-selected="true"]) small,
.res.is-top:not([aria-selected="true"]) b i { color: var(--blue); opacity: 1; }
.res.is-top:not([aria-selected="true"]) > span { color: inherit; }
.res.is-top:not([aria-selected="true"]) mark { text-decoration-color: var(--blue); }

/* keyboard bar (touch only, main.js): ⌃ ⌄ on the left, ✓ on the right, docked
   above the on-screen keyboard. --kb is the keyboard's height, set from visualViewport. */
.kbar {
  position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 120;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(243, 242, 238, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(20, 17, 13, .1);
  opacity: 0; translate: 0 8px; transition: opacity .2s ease, translate .3s var(--ease);
}
.kbar[hidden] { display: none; }
.kbar.is-in { opacity: 1; translate: 0 0; }
.kbar__btn {
  display: grid; place-items: center; width: 40px; height: 36px; padding: 0;
  border: 0; border-radius: 10px; background: none; color: var(--blue);
  transition: background .15s, color .15s;
}
.kbar__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kbar__btn:active:not(:disabled) { background: rgba(31, 44, 255, .12); }
.kbar__btn:disabled { color: rgba(45, 40, 35, .3); }
.kbar__done { margin-left: auto; width: 48px; background: var(--blue); color: var(--paper); }
.kbar__done:active:not(:disabled) { background: var(--blue-hi); }

@media (prefers-reduced-motion: reduce) {
  .res, .pane, .pane__body > *, .toast, .soc { animation: none !important; transition-duration: .01s !important; }
  .kbar { translate: none; transition: none; }
}

/* =========================================================
   COLOUR MODE: System / Dark / Light, at the far end of the
   menu's Home row. Built like the contact form's Business /
   Personal picker: icons, and only the picked one opens to show
   its word. Square-ish corners, not a pill.
   ========================================================= */
.menu__home { position: relative; }
/* Home's row keeps clear of the switch (its → would sit under it) */
.menu__home .tree > li:first-child > [role="treeitem"] { padding-right: 190px; }
.mode {
  --sw: .5s; --se: cubic-bezier(.65, 0, .35, 1);
  position: absolute; top: 0; right: 12px; height: 52px;
  display: flex; align-items: center; gap: 2px;
}
.mode label { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode label span {
  display: inline-flex; align-items: center;
  padding: 6px 8px; border: 1.5px solid transparent; border-radius: 10px;
  font: 600 13px "Poppins", system-ui, sans-serif; color: var(--ink);
  opacity: .5;
  transition: background-color var(--sw) var(--se), color var(--sw) var(--se),
              border-color var(--sw) var(--se), padding var(--sw) var(--se), opacity .3s;
}
.mode label .ic { width: 17px; height: 17px; flex: none; transition: transform var(--sw) var(--se); }
.mode label em {
  font-style: normal; white-space: nowrap; overflow: hidden;
  max-width: 0; opacity: 0;
  transition: max-width var(--sw) var(--se), margin var(--sw) var(--se), opacity .15s ease;
}
.mode input:checked + span { opacity: 1; padding-right: 11px; background: var(--blue); color: #fff; border-color: var(--blue); }
.mode input:checked + span .ic { transform: scale(1.06); }
.mode input:checked + span em {
  max-width: 70px; opacity: 1; margin-left: 6px;
  transition: max-width var(--sw) var(--se), margin var(--sw) var(--se), opacity .3s ease .18s;
}
.mode input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .mode label:hover span { opacity: .9; } }
/* touch: the pressed icon dips, so a tap answers before the word opens */
.mode label:active span { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) {
  .mode label span, .mode label em, .mode label .ic { transition: none !important; }
}
/* switching modes: every colour changes in the same frame */
.is-theming, .is-theming *, .is-theming *::before, .is-theming *::after { transition: none !important; }

/* =========================================================
   PHONES: one block so the mobile layout lives in one place
   ========================================================= */
@media (max-width: 620px) {
  /* no "you are here" box on phones: the bar is all the screen has room for */
  .where { display: none; }

  /* Hero, phone edition: built for a tall screen, read top to bottom.
     1. who I am (role and MIT), top left
     2. the photo badge, big and centred in the free space (a tap pops the
        head out of the ring; main.js adds .is-popped)
     3. the name, WILLIAM / meziTIS, edge to edge along the bottom; main.js
        narrows the letters until the name takes up whatever height is left */
  .hero {
    display: flex; flex-direction: column;
    /* the role sits as close to the top as the name sits to the bottom */
    --edge: var(--pad);
    padding: calc(var(--edge) + env(safe-area-inset-top, 0px)) var(--pad) calc(var(--edge) + env(safe-area-inset-bottom, 0px));
  }
  /* static, so the photo below positions against the whole hero */
  .hero__name { position: static; order: 1; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; }
  /* the photo's centre is the screen's exact vertical middle */
  .me {
    --d: min(80vw, 38svh);
    position: absolute; right: auto; left: 50%; top: 50%;
    margin: 0; translate: -50% -50%; z-index: 2;
    width: var(--d); --px: calc(var(--d) * .745);
    transform-origin: 50% 50%;
  }
  .me.is-popped { scale: 1.06; }
  .me.is-popped .pop { --f: 1.4; }
  /* small nudges so the letters themselves (not their line boxes) sit exactly
     --edge from the top and bottom, matching the side margin */
  .hero__top { order: 0; align-self: stretch; padding-top: 0; margin-top: -3px; transition: opacity .4s var(--ease), visibility .4s; }
  .hero__name .name { margin-bottom: -8px; }
  /* once the nav bar has formed (it stays after the first scroll), the role
     and MIT lines bow out: the ring round the photo says the same thing */
  .bar.is-docked ~ main .hero__top { opacity: 0; visibility: hidden; }
  .hero__intro { gap: 6px; }
  .role { font-size: 21px; }
  .hero__sub { font-size: 15px; opacity: .85; }

  /* Nav: a slimmer bar */
  .bar__pill { height: 52px; gap: 10px; }
  .logo__word { font-size: 16px; }

  /* Frames, as on desktop: every section is exactly one screen and the page
     turns between them. Content clears the floating bar (top) and the edge. */
  .press.frame, .contact.frame, .mz.frame { height: 100svh; min-height: 0; }

  /* mezi on phones: its own design (.mzm in index.html), not the desktop
     form demo. Headline, then the money's journey as a track the $250 chip
     travels down, then get-the-app. */
  .mz.frame { padding: 78px var(--pad) 18px; justify-content: center; }
  .mz-grid { display: none; }
  .mzm { display: flex; }

  /* Press: all six cards on one screen in a 2×3 grid, at rest like desktop
     (cover + title strip). The glow follows your finger (main.js). */
  .press.frame { padding-bottom: 14px; }
  .press.frame .press__inner { padding-top: 80px; }
  .pcards {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    --row: calc((100svh - 80px - 14px - 20px) / 3);
  }
  .pcard { height: var(--row); border-radius: 18px; }
  .pcard::after { border-radius: 17px; }
  .pcard .pcard__cover { inset: 6px; border-radius: 13px; clip-path: inset(0 0 0 0 round 13px); }
  .pcard .pcard__cover::after { opacity: 1; height: 60%; }
  .pcard .pcard__art { scale: 1; top: 28px; left: 10px; right: 10px; font-size: clamp(22px, 7.4vw, 30px); overflow-wrap: normal; }
  .pcard .pcard__kind { left: 10px; top: 10px; font-size: 9.5px; }
  .pcard .pcard__play { top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .pcard .pcard__play svg { width: 17px; height: 17px; }
  .pcard .pcard__body {
    left: 6px; right: 6px; bottom: 6px; height: auto; padding: 8px 10px 9px;
    translate: 0 0; color: var(--on-cover);
  }
  .pcard .pcard__body::before { opacity: 0; }
  .pcard .pcard__outlet { font-size: 9.5px; }
  .pcard .pcard__title { margin-top: 3px; font-size: 15px; }
  .pcard .pcard__desc, .pcard .pcard__foot { display: none; }
  .pcard.is-lit::before { opacity: 1; }
  .pcard.is-lit::after { opacity: .925; }
  .pcard.is-lit .pcard__play { scale: 1.12; }

  /* contact: the form card fits the screen */
  .contact.frame { padding: 80px var(--pad) 20px; }
  textarea.fi { min-height: 0; }
  .fw--grow { flex: 1 1 auto; min-height: 110px; }
  /* topic picker: full width with both words showing, so it lines up with the
     fields below instead of hanging off the left as a half-labelled pill.
     Same 18px corners as the fields; the picked half fills with the accent. */
  .cf__head .pill { display: grid; grid-template-columns: 1fr 1fr; align-self: stretch; border-radius: 18px; }
  .cf__head .pill label span { width: 100%; justify-content: center; padding: 11px 12px; border-radius: 13px; }
  .cf__head .pill label em { max-width: 110px; opacity: 1; margin-left: 8px; }
  .cf__title { text-align: center; }

  /* menu: a compact card on phones, so it reads as a dropdown over the page
     rather than a sheet that covers it */
  .menu { width: min(320px, calc(100vw - 48px)); }
  .menu__search { margin: 8px 8px 2px; }
  .menu__search input { padding: 9px 12px 9px 36px; font-size: 14px; }
  .menu__search svg { left: 13px; width: 14px; }
  .menu__nav { padding: 2px 0 6px; }
  .tree [role="treeitem"] { min-height: 42px; padding: 0 12px 0 18px; font-size: 22px; }
  /* the colour mode switch matches the slimmer Home row */
  .mode { height: 42px; right: 8px; }
  .menu__home .tree > li:first-child > [role="treeitem"] { padding-right: 170px; }
  .tree [aria-level="2"] { min-height: 34px; font-size: 15px; }
  .tree__toggle { width: 26px; height: 26px; }
  .tree__toggle svg { width: 11px; }
  .menu__chips { padding: 4px 4px; }
  .soc { padding: 7px; }
  .soc .ico { width: 18px; height: 18px; }
}
/* touch: sticky :hover would leave the photo stuck big; main.js drives it with .is-popped */
@media (hover: none) {
  .me:hover:not(.is-popped), .me:focus-visible:not(.is-popped) { scale: 1; }
  .me:hover:not(.is-popped) .pop, .me:focus-visible:not(.is-popped) .pop { --f: 1; }
}

/* =========================================================
   MEZI, PHONE EDITION (.mzm): shown only under 620px
   ========================================================= */
.mzm { display: none; flex-direction: column; height: 100%; min-height: 0; text-align: left; }
.mzm-kick {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-size: 13px; font-weight: 600; letter-spacing: .01em; opacity: .92;
}
.mzm-logo { display: inline-flex; align-items: center; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1; opacity: 1; }
.mzm-logo svg { width: .62em; height: .7em; margin: 0 .02em; translate: 0 .06em; }
.mzm-title {
  margin: 14px 0 0;
  font-size: clamp(27px, 8.2vw, 36px); font-weight: 700; line-height: 1.05; letter-spacing: -.035em;
  text-wrap: balance;
}

/* get the app */
.mzm-get { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.mzm-store {
  flex: 1 1 0; height: 46px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 13px; background: #1d1d1f; color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.mzm-store svg { width: 19px; height: 19px; flex: none; }
.mzm-web { flex: none; padding: 0 4px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 620px) {
  .mzm { display: flex; }
  .mzm-title { margin-top: 8px; }

  /* the small demo (moved in by main.js), tightened to share the screen */
  .mzm .mzd { flex: 1 1 auto; min-height: 0; justify-content: center; gap: 8px; margin-top: 14px; }
  .mzm .mzd-tab { padding: 5px 14px; font-size: 13px; }
  .mzm .mzd-slide { gap: 8px; }
  .mzm .mzd-heading, .mzm .mzd-step { font-size: 14px; }
  .mzm .mzd-card { gap: 7px; padding: 14px 16px 16px; border-radius: 18px; }
  .mzm .mzd-card-title { font-size: 16px; line-height: 22px; }
  .mzm .mzd-label { font-size: 13px; line-height: 18px; }
  .mzm .mzd-field { padding: 8px 13px; font-size: 16px; border-radius: 11px; }
  .mzm .mzd-card > .mzd-field--multi { min-height: 56px; font-size: 13px; }
  .mzm .mzd-action { height: 40px; font-size: 16px; }
  .mzm .mzd-controls { margin-top: 2px; }
  .mzm .mzd-arrow { width: 34px; height: 34px; }
  .mzm-get { margin-top: 10px; }
}
@media (max-width: 620px) {
  /* mezi: headline on two lines, demo starts right under it (never rides up into it) */
  .mzm-title { font-size: clamp(23px, 6.6vw, 30px); line-height: 1.08; margin-top: 4px; }
  .mzm-logo { font-size: 22px; }
  .mzm .mzd { justify-content: flex-start; margin-top: 12px; gap: 6px; }
  .mzm .mzd-heading, .mzm .mzd-step { font-size: 13px; }
  .mzm .mzd-card { padding: 12px 14px 14px; gap: 6px; }
  .mzm .mzd-controls { margin-top: 0; }
  .mzm-get { margin-top: auto; padding-top: 6px; }
  .mzm-store { height: 42px; }

  /* About: the story reads bigger on a phone */
  .ab-line { font-size: clamp(36px, 11.2vw, 50px); max-width: 15ch; }
  .ab-line--lead { font-size: clamp(46px, 14vw, 62px); max-width: none; }
}
/* short phones: the demo is a fixed-size mock, so scale it down as a whole */
@media (max-width: 620px) and (max-height: 680px) { .mzm .mzd { zoom: .86; } }

/* ---------- mezi phone header + demo, v2: centred, the real wordmark ---------- */
@media (max-width: 620px) {
  .mzm { align-items: center; text-align: center; }
  .mzm-mark {
    display: inline-flex; align-items: center; color: #fff; text-decoration: none;
    font-size: clamp(64px, 20vw, 84px); font-weight: 700; line-height: .9; letter-spacing: -.012em;
  }
  .mzm-mark svg {
    width: .63em; height: .7em; margin: 0 .02em; transform: translateY(.08em);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)) drop-shadow(0 0 9px rgba(255,255,255,.45));
  }
  .mzm-title {
    margin: 6px auto 0; max-width: 20ch;
    font-size: clamp(17px, 5vw, 21px); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; opacity: .95;
  }
  .mzm .mzd { width: 100%; flex: 0 1 auto; margin-top: clamp(12px, 2.4svh, 22px); }
  /* the deal card: no tall empty box */
  .mzm .mzd-card, .mzm .mzd-review, .mzm .mzd-finish, .mzm .mzd-offer, .mzm .mzd-deliver, .mzm .mzd-payout {
    height: clamp(340px, 47svh, 420px); padding: 14px 16px 16px; border-radius: 20px;
  }
  .mzm .mzd-card > .mzd-field--multi { flex: 0 1 auto; min-height: 0; height: 66px; }
  .mzm .mzd-card .mzd-ref { width: 108px; height: 42px; }
  .mzm .mzd-card .mzd-ref--wide { width: 138px; }
  /* review: the CAD files sit side by side, names only, so the renders keep their room */
  .mzm .mzd-extras { flex-direction: row; gap: 6px; }
  .mzm .mzd-extra { flex: 1 1 0; min-width: 0; justify-content: center; padding: 7px 6px; border-radius: 11px; }
  .mzm .mzd-extra-icon, .mzm .mzd-extra-size { display: none; }
  .mzm .mzd-extra-name { flex: 0 1 auto; font-size: 11px; text-align: center; }
  /* accept: two lines of brief and shorter reference tiles, so the button stays on the card */
  .mzm .mzd-offer { gap: 10px; }
  .mzm .mzd-offer-desc { -webkit-line-clamp: 2; line-clamp: 2; }
  .mzm .mzd-offer .mzd-ref, .mzm .mzd-offer .mzd-ref--wide { height: 72px; }
  /* deliver: "Add more" is one slim row and the uploads scroll, so the note
     always keeps room to type in above Submit */
  .mzm .mzd-deliver { gap: 12px; }
  .mzm .mzd-deliver-body { gap: 10px; }
  .mzm .mzd-deliver-right { gap: 8px; }
  .mzm .mzd-drop { flex-direction: row; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 8px; }
  .mzm .mzd-drop-icon { width: 24px; height: 24px; }
  .mzm .mzd-uploads { flex: 0 1 auto; min-height: 48px; max-height: 112px; }
  .mzm .mzd-dlist { gap: 6px; }
  .mzm .mzd-drow { padding: 6px 10px; }
  .mzm .mzd-dicon { width: 28px; height: 28px; border-radius: 10px; }
  .mzm .mzd-dnote { flex: 1 0 64px; min-height: 64px; }
  .mzm-get { width: 100%; margin-top: auto; }

}
@media (max-width: 620px) {
  /* the deal card takes the room that's left on the screen */
  .mzm .mzd-card, .mzm .mzd-review, .mzm .mzd-finish, .mzm .mzd-offer, .mzm .mzd-deliver, .mzm .mzd-payout {
    height: clamp(330px, calc(100svh - 405px), 480px);
  }
}
/* short phones: a smaller header leaves the deal card room to breathe */
@media (max-width: 620px) and (max-height: 780px) {
  .mz.frame { padding-top: 72px; padding-bottom: 12px; }
  .mzm-mark { font-size: 50px; }
  .mzm-title { font-size: 15px; margin-top: 2px; }
  .mzm .mzd { margin-top: 10px; gap: 6px; }
  .mzm .mzd-card, .mzm .mzd-review, .mzm .mzd-finish, .mzm .mzd-offer, .mzm .mzd-deliver, .mzm .mzd-payout {
    height: clamp(320px, calc(100svh - 345px), 420px);
  }
  .mzm-store { height: 40px; }
}
/* the shortest phones zoom the demo to .86 (above), and svh isn't zoomed, so
   size the card in zoomed pixels: it then fills the room down to the store row */
@media (max-width: 620px) and (max-height: 680px) {
  .mzm .mzd-card, .mzm .mzd-review, .mzm .mzd-finish, .mzm .mzd-offer, .mzm .mzd-deliver, .mzm .mzd-payout {
    height: clamp(320px, calc((100svh - 300px) / .86), 420px);
  }
  /* no room for a written review here: the stars still rate the deal */
  .mzm .mzd-rate-input { display: none; }
}

/* ===== Nav name animations (main.js "Nav name shows") =====
   Ten little shows the name plays now and then. Letters are wrapped in .nl
   spans (inline at rest, so the wordmark looks identical); .is-anim turns them
   inline-block so they can move. Everything else is a throwaway .nfx overlay. */
.logo__word { position: relative; }
.logo__word.is-anim .nl { display: inline-block; transform-origin: 50% 80%; }
.logo__photo { transform-origin: 50% 85%; }
.logo.is-rolling .logo__photo { z-index: 3; }
/* brand pulse: an underline that draws itself under "mezi" */
.logo__mezi { position: relative; }
.logo__mezi::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .45s var(--ease); pointer-events: none;
}
.logo__mezi.is-lit::after { transform: scaleX(1); }
.nfx { position: absolute; left: 0; top: 0; pointer-events: none; }
/* glitch: colour-split copies of the name */
.nglitch { white-space: nowrap; mix-blend-mode: multiply; }
.nglitch--a { color: var(--orange); }
.nglitch--b { color: var(--blue-hi); }
/* typewriter caret */
.ncaret { width: 2px; border-radius: 1px; background: var(--blue); }
.ncaret.is-blink { animation: nblink .9s steps(1) infinite; }
@keyframes nblink { 50% { opacity: 0; } }
/* trace current */
.ntrace { overflow: visible; }
/* LED ticker */
.nled { border-radius: 8px; background: var(--mezi-ink); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nled canvas { display: block; width: 100%; height: 100%; }
/* i-dot eyes */
.neye {
  width: .5em; height: .5em; margin: -.25em 0 0 -.25em; border-radius: 50%;
  display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1.5px currentColor;
}
.neye i { width: 46%; height: 46%; border-radius: 50%; background: currentColor; transition: translate .16s var(--ease); }
/* hero: "MIT" is the MIT logo. White on the blue at rest; MIT's own red and
   grey on hover (or tap, via :active on touch) */
.hero__mit { white-space: nowrap; }
.hero__mit-logo { height: .74em; width: auto; vertical-align: -.02em; margin-right: .08em; overflow: visible; }
.hero__mit-logo rect { fill: currentColor; transition: fill .3s var(--ease); }
.hero__mit-logo .i { fill-opacity: .6; }
.hero__mit:hover, .hero__mit:focus-visible, .hero__mit:active { color: var(--paper); }
.hero__mit:hover .hero__mit-logo rect, .hero__mit:focus-visible .hero__mit-logo rect, .hero__mit:active .hero__mit-logo rect { fill: var(--mit-red); }
.hero__mit:hover .hero__mit-logo .i, .hero__mit:focus-visible .hero__mit-logo .i, .hero__mit:active .hero__mit-logo .i { fill: #8a8b8c; fill-opacity: 1; }
/* the planets orbiting "physics" swing past the screen edge; in Firefox that
   widened the whole page (phones then zoomed out). Clip them at the edge. */
.about { overflow-x: clip; }

/* hero: the MIT logo in MIT's own colours (red bars, grey "i"), on a small
   light plate so the dark red reads on the blue */
.hero__mit-logo {
  height: .74em; padding: .14em .2em; box-sizing: content-box;
  background: var(--paper); border-radius: .14em;
  vertical-align: -.2em; margin-right: .22em;
}
.hero__mit-logo rect, .hero__mit:hover .hero__mit-logo rect, .hero__mit:focus-visible .hero__mit-logo rect, .hero__mit:active .hero__mit-logo rect { fill: var(--mit-red); fill-opacity: 1; }
.hero__mit-logo .i, .hero__mit:hover .hero__mit-logo .i, .hero__mit:focus-visible .hero__mit-logo .i, .hero__mit:active .hero__mit-logo .i { fill: #8a8b8c; fill-opacity: 1; }

/* =========================================================
   DARK MODE: the paper parts of the page go to night; the blue
   hero, the orange mezi frame and the blue contact frame stay
   as they are. The meta tag declares both schemes, which tells
   browsers (and their "force dark" modes) the page draws its own dark.
   ========================================================= */
:root { color-scheme: light; --night: #121214; --night-up: #1d1d21; --night-line: rgba(233, 232, 227, .16); }
/* .is-dark is set on <html> by boot.js (before paint) and by the menu's
   colour mode switch: the visitor's pick, else the system's setting */
:root:where(.is-dark) { color-scheme: dark; }
html:where(.is-dark), :where(.is-dark) body { background: var(--night); }
:where(.is-dark) ::selection { background: var(--blue-hi); color: #fff; }

/* the story: light words on night. Swapping the two tokens inside it flips
   every outline, shadow and fill that was drawn in ink or paper */
:where(.is-dark) .about { --ink: #e9e8e3; --paper: var(--night); background: var(--night); color: var(--ink); }

/* the footer word sits on night too */
:where(.is-dark) .footer { background: var(--night); color: #e9e8e3; }

/* "William" in a lighter blue, so it reads on night */
:where(.is-dark) .about .ab-name.on { color: #7480ff; }
/* the Ca tile: a dark tile with a light rule; the age keeps dark ink on its yellow */
:where(.is-dark) .about .ab-el { background: var(--night-up); box-shadow: .06em .06em 0 rgba(233, 232, 227, .3); }
:where(.is-dark) .about .ab-el.on .ab-el__n { color: #0c0c0d; }
/* CAD: the SolidWorks viewport stays light, so the letters stay dark on it */
:where(.is-dark) .about .ab-cad .w { color: #0c0c0d; }
/* the stamp's ink can't multiply into black: lay it on, a touch brighter */
:where(.is-dark) .about .ab-scam__stamp { mix-blend-mode: normal; color: #ff4d3f; }

/* contact: a night card on the blue. Inside it the tokens swap so fields,
   the toggle and the send button draw light rules; the card keeps its black
   edge and offset shadow */
:where(.is-dark) .cf__card {
  --ink: #e9e8e3; --paper: var(--night);
  background: var(--night-up); color: var(--ink);
  border-color: #0c0c0d; box-shadow: 10px 10px 0 #0c0c0d;
}
:where(.is-dark) .cf__card .pill, :where(.is-dark) .cf__card .fi { background: var(--night); }
:where(.is-dark) .cf__card .fi::placeholder { color: rgba(233, 232, 227, .42); }
:where(.is-dark) .cf__card .fi.is-bad { background: #2a1214; }
:where(.is-dark) .cf__card .cf__check { color: #0c0c0d; }

/* the ⌘K menu: night cards. --ink goes light; --paper stays light because
   the menu uses it for text on blue. A lighter blue reads on the dark */
:where(.is-dark) .menu {
  --ink: #e9e8e3; --bg: var(--night-up); --blue: #6470ff;
  --surf: #26262b; --line: rgba(233, 232, 227, .1); --muted: rgba(233, 232, 227, .6);
}
:where(.is-dark) .menu__card, :where(.is-dark) .menu__foot, :where(.is-dark) .pane {
  background: var(--night-up);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8), 0 0 0 1px var(--night-line);
}
:where(.is-dark) .menu__search input { background: rgba(255, 255, 255, .04); border-color: var(--night-line); }
:where(.is-dark) .menu__search:hover input, :where(.is-dark) .menu__search input:focus { background: var(--surf); }
:where(.is-dark) .menu__clear:hover, :where(.is-dark) .menu__clear:focus-visible { background: rgba(255, 255, 255, .08); }
:where(.is-dark) .soc { color: rgba(233, 232, 227, .75); }
:where(.is-dark) .soc--x .ico, :where(.is-dark) .soc--tiktok .ico, :where(.is-dark) .soc--threads .ico { color: #e9e8e3; }
:where(.is-dark) .menu__search input, :where(.is-dark) .pane, :where(.is-dark) .pane__back, :where(.is-dark) .pbtn, :where(.is-dark) .ps__url, :where(.is-dark) .pkeys kbd { color: #e9e8e3; }
:where(.is-dark) .ps__url { background: var(--night); }
:where(.is-dark) .pkeys kbd { background: var(--surf); border-color: var(--night-line); box-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
:where(.is-dark) .ptime__face, :where(.is-dark) .ptime__tick.is-major { stroke: #e9e8e3; }
:where(.is-dark) .ptime__tick { stroke: rgba(233, 232, 227, .35); }
:where(.is-dark) .ptime__h, :where(.is-dark) .ptime__m { stroke: #e9e8e3; }
:where(.is-dark) .ptime__status { color: #4ade80; }
:where(.is-dark) .ptime__status[data-mood="zz"] { color: #b3a9f0; }
:where(.is-dark) .ptime__status[data-mood="am"] { color: #f5915a; }
:where(.is-dark) .plot svg { background: var(--surf); }
:where(.is-dark) .plot__grid { stroke: rgba(233, 232, 227, .08); }
:where(.is-dark) .plot__axis, :where(.is-dark) .plot__mark { stroke: rgba(233, 232, 227, .45); }
:where(.is-dark) .plot__labels { fill: rgba(233, 232, 227, .6); stroke: var(--surf); }
:where(.is-dark) .plot__mark { fill: var(--surf); }
:where(.is-dark) .plot__dot { stroke: var(--surf); }
:where(.is-dark) .pcoin__out mark, :where(.is-dark) .pcoin__go { color: #0c0c0d; }
:where(.is-dark) .kbar { background: rgba(29, 29, 33, .92); border-top-color: var(--night-line); }
:where(.is-dark) .kbar__btn:disabled { color: rgba(233, 232, 227, .3); }

/* nav bar and the "you are here" box */
:where(.is-dark) .bar__pill, :where(.is-dark) .where {
  --blue: #6470ff;
  background: var(--night-up); color: #e9e8e3;
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .7), 0 0 0 1px var(--night-line);
}
@media (max-width: 640px) {
  :where(.is-dark) .cf__card { box-shadow: 6px 6px 0 #0c0c0d; }
}
