/* Quanta website. Tokens are the app's own (ACUViewerApp/styles.css): same inks, accent, hairlines and glass,
   so the page and the phones inside it read as one product. */

:root {
  --night: #05050a;          /* the onboarding dive's sky */
  --night-clear: rgba(5, 5, 10, 0);
  --cosmos-ink: 236, 236, 241;
  --bg: #16161c;
  --surface: #1c1c23;
  --overlay: #23232c;
  --overlay-border: #32323d;
  --text: #ececf1;
  --text-2: #d8d8df;
  --muted: #8b8b9a;
  --faint: #7a7a8a;
  --source: #6a6a7c;
  --accent: #6c9ef8;
  --lamp-rgb: 108, 158, 248;
  --danger-rgb: 240, 113, 113;
  --ok-rgb: 110, 231, 183;
  --card-border: #2e2e38;
  --hairline: rgba(255, 255, 255, 0.07);
  --field-bg: rgba(255, 255, 255, 0.06);
  --badge-bg: #25252e;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --bar-bg: rgba(5, 5, 10, 0.55);
  --phone-bezel: #000;
  --phone-ring: #2a2a33;
  --phone-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);

  --f-neuro: #a78bfa; --f-bio: #4ade80; --f-genomics: #6ee7b7; --f-micro: #2dd4bf;
  --f-immuno: #fb923c; --f-med: #f472b6; --f-onco: #f87171; --f-psych: #c084fc;
  --f-chem: #fbbf24; --f-phys: #38bdf8; --f-mat: #a8a29e; --f-earth: #84cc16;
  --f-astro: #818cf8; --f-comp: #60a5fa; --f-math: #facc15; --f-eng: #fb7185; --f-other: #8b8b9a;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: 16px;
  --max: 1120px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --night: #f8faff;
  --night-clear: rgba(248, 250, 255, 0);
  --cosmos-ink: 29, 36, 49;
  --bg: #f8faff;
  --surface: #ffffff;
  --overlay: #edf2fb;
  --overlay-border: #cfd8e9;
  --text: #1d2431;
  --text-2: #1d2431;
  --muted: #59647a;
  --faint: #6b7385;
  --source: #6b7385;
  --accent: #3d6fe0;
  --lamp-rgb: 61, 111, 224;
  --danger-rgb: 201, 54, 54;
  --ok-rgb: 5, 150, 105;
  --card-border: #d5ddea;
  --hairline: rgba(29, 36, 49, 0.08);
  --field-bg: #eef2f9;
  --badge-bg: #e6ecf8;
  --glass: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 8px 24px rgba(29, 36, 49, 0.08);
  --bar-bg: rgba(248, 250, 255, 0.7);
  --phone-bezel: #1d2431;
  --phone-ring: #c9d2e3;
  --phone-shadow: 0 30px 60px -30px rgba(29, 36, 49, 0.35), 0 0 0 1px rgba(29, 36, 49, 0.06);

  --f-neuro: #7c3aed; --f-bio: #16a34a; --f-genomics: #059669; --f-micro: #0d9488;
  --f-immuno: #ea580c; --f-med: #db2777; --f-onco: #dc2626; --f-psych: #9333ea;
  --f-chem: #b45309; --f-phys: #0284c7; --f-mat: #57534e; --f-earth: #4d7c0f;
  --f-astro: #4f46e5; --f-comp: #2563eb; --f-math: #a16207; --f-eng: #e11d48; --f-other: #59647a;
  color-scheme: light;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
.skip-link:focus { top: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wordmark-ink { fill: var(--text); }
.wordmark-particle { fill: var(--accent); }

.muted { color: var(--muted); }

/* ── Pill buttons: the app's nav-bar material ─────────────────────────────── */
.q-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 26px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--text);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, border-color 0.2s;
}
.q-btn:hover { text-decoration: none; }
.q-btn:active { transform: scale(0.96); transition-duration: 0.12s; }
.q-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.q-btn--sm { height: 44px; padding: 0 18px; font-size: 15px; }
.q-btn--bar { height: 36px; padding: 0 16px; font-size: 14px; }
/* Primary: the nav's active tab, accent text on a faint lamp tint with a tinted outline, as in the app's dialogs */
.q-btn--accent,
.q-btn--bar {
  color: var(--accent);
  background: rgba(var(--lamp-rgb), 0.12);
  border-color: rgba(var(--lamp-rgb), 0.45);
}
.q-btn--accent:hover,
.q-btn--bar:hover { background: rgba(var(--lamp-rgb), 0.18); }
.q-btn--quiet { box-shadow: none; }
.q-btn-label { display: inline-flex; align-items: center; gap: 8px; pointer-events: none; }
.q-btn-label svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.site-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-bar.is-scrolled { border-bottom-color: var(--hairline); }
.site-bar-brand { display: inline-flex; align-items: center; padding: 6px 0; }
.wordmark { display: block; height: 18px; width: auto; aspect-ratio: 379 / 66; }
.site-bar-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--accent); background: rgba(var(--lamp-rgb), 0.12); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ── Hero: the dive ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--night);
  color: rgb(var(--cosmos-ink));
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
  cursor: pointer;
}
.hero-hud {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
.hero-hud-label {
  min-height: 1.4em;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(var(--cosmos-ink), 0.55);
  opacity: 0;
}
.hero-hud-label.is-in { animation: label-in 0.5s ease-out forwards; }
@keyframes label-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.hero-hud-scale {
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.hero-replay {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 80px);
  right: var(--gutter);
  padding: 6px 2px;
  border: 0;
  background: none;
  color: rgba(var(--cosmos-ink), 0.55);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.hero-replay:hover { color: var(--accent); }
.hero-replay[hidden] { display: none; }

.hero-copy {
  position: relative;
  padding: 120px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 40px);
  background: linear-gradient(to top, var(--bg) 0, var(--night) 64px, var(--night) 52%, var(--night-clear));
}
.hero-title {
  max-width: 11ch;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(44px, 12.5vw, 96px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-lede {
  max-width: 34ch;
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(var(--cosmos-ink), 0.72);
}

@media (min-width: 900px) {
  .hero { justify-content: center; }
  .hero-copy {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 140px var(--gutter) 96px;
    background: none;
  }
  /* The dive is drawn to the right of the copy; a soft wash keeps the copy legible where the two meet */
  .hero-canvas { left: 36%; width: 64%; }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, var(--night) 34%, var(--night-clear) 58%);
    pointer-events: none;
  }
  .hero-copy, .hero-hud, .hero-replay { z-index: 1; }
  .hero-hud {
    top: auto;
    bottom: 40px;
    left: auto;
    right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    align-items: flex-end;
    text-align: right;
  }
  .hero-replay { top: auto; bottom: 104px; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
  .hero-lede { font-size: 19px; }
}

/* ── Call to action ───────────────────────────────────────────────────────── */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.cta-soon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: rgba(var(--cosmos-ink), 0.9);
}
.cta-soon svg { width: 18px; height: 18px; color: var(--accent); }
.cta-store[hidden] { display: none; }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cta--center { align-items: center; }
.cta--center .cta-links { justify-content: center; }
@media (max-width: 419px) {
  .cta-links { width: 100%; }
  .cta-links .q-btn { flex: 1 1 0; padding: 0 14px; }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px var(--gutter);
}
.section-text { max-width: 34rem; }
.section-text--wide { max-width: none; }
.section-title {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(32px, 8.4vw, 52px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-text p { color: var(--muted); }
.section-text p.live-line { color: var(--text); }
.live-line strong { font-weight: 650; font-variant-numeric: tabular-nums; }

.device-wrap { display: flex; flex-direction: column; align-items: center; margin-top: 40px; }
.device-hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

@media (min-width: 900px) {
  .section { padding: 128px var(--gutter); }
  .section--feed,
  .section--leaps,
  .section--depth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
  }
  .device-wrap { margin-top: 0; }
  .section--leaps .section-text { order: 2; }
  .section--leaps .device-wrap { order: 1; }
  .section--depth { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
}

/* ── Field list (the feed's live spectrum) ───────────────────────────────── */
.field-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
/* On phones the sixteen fields scroll sideways in one row, so the phone frame isn't pushed a screen down */
@media (max-width: 899px) {
  .field-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .field-list::-webkit-scrollbar { display: none; }
  .field-chip { flex-shrink: 0; }
}
.field-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--hairline);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}
.field-chip::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--f, var(--f-other));
}
.field-chip-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.field-chip:hover { border-color: var(--card-border); }
.field-chip[aria-pressed="true"] { border-color: var(--accent); background: rgba(var(--lamp-rgb), 0.12); }

.f-neuro { --f: var(--f-neuro); } .f-bio { --f: var(--f-bio); } .f-genomics { --f: var(--f-genomics); }
.f-micro { --f: var(--f-micro); } .f-immuno { --f: var(--f-immuno); } .f-med { --f: var(--f-med); }
.f-onco { --f: var(--f-onco); } .f-psych { --f: var(--f-psych); } .f-chem { --f: var(--f-chem); }
.f-phys { --f: var(--f-phys); } .f-mat { --f: var(--f-mat); } .f-earth { --f: var(--f-earth); }
.f-astro { --f: var(--f-astro); } .f-comp { --f: var(--f-comp); } .f-math { --f: var(--f-math); }
.f-eng { --f: var(--f-eng); } .f-other { --f: var(--f-other); }

/* ── Phone frame ──────────────────────────────────────────────────────────── */
.phone {
  /* Fixed size, never grown by its content; on short desktop windows it shrinks to stay on screen */
  --pw: min(320px, 82vw, max(250px, calc((100vh - 150px) * 9 / 19)));
  position: relative;
  flex-shrink: 0;
  width: var(--pw);
  height: calc(var(--pw) * 19 / 9);
  padding: 9px;
  border-radius: 48px;
  background: var(--phone-bezel);
  box-shadow: 0 0 0 1.5px var(--phone-ring), var(--phone-shadow);
}
.phone::before {
  /* the island */
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  z-index: 5;
  width: 31%;
  height: 22px;
  margin-left: -15.5%;
  border-radius: 999px;
  background: #000;
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 39px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.app-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 18px 9px;
  border-bottom: 1px solid var(--card-border);
}
.wordmark--app { height: 12px; }
.app-bar-search { width: 18px; height: 18px; color: var(--muted); }

.app-nav { flex-shrink: 0; display: flex; justify-content: center; padding: 6px 12px 18px; }
.tube-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}
.branch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.branch svg { width: 16px; height: 16px; }
.branch.is-active { color: var(--accent); background: rgba(var(--lamp-rgb), 0.1); }

/* ── Feed inside the phone ────────────────────────────────────────────────── */
.feed {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.feed:focus-visible { outline-offset: -3px; }

.card {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 14px;
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--f, transparent) 9%, transparent) 0%, transparent 45%);
}
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--f, var(--muted));
  background: color-mix(in srgb, var(--f, var(--muted)) 12%, transparent);
}
.card-title {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--faint);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-source { margin: 3px 0 0; font-size: 10px; color: var(--source); }
.card-doi {
  display: block;
  margin-top: 5px;
  font-size: 9.5px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-hook {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: -0.01em;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.card-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.card-more::after {
  content: "";
  width: 5px; height: 5px;
  margin: -3px 0 0 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 16px;
  padding-top: 10px;
  color: var(--muted);
}
.card-actions svg { width: 19px; height: 19px; }
.card-actions .push { margin-left: auto; }

.card-sheet {
  position: absolute;
  inset: 8px;
  z-index: 3;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--overlay-border);
  background: var(--overlay);
  overflow-y: auto;
  scrollbar-width: none;
  transform: translateY(104%);
  transition: transform 0.32s cubic-bezier(0.34, 1.05, 0.64, 1);
}
.card-sheet::-webkit-scrollbar { display: none; }
.card-sheet.is-open { transform: none; }
.card-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card-sheet-title { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.card-sheet-close { border: 0; background: none; padding: 4px 0; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.card-sheet p { margin: 0; font-size: 13.5px; line-height: 1.5; text-align: justify; hyphens: auto; -webkit-hyphens: auto; color: var(--text-2); }
.card-sheet .tech-label { margin: 12px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
.card-sheet .tech-label:first-child { margin-top: 2px; }
.card-sheet .card-more { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .card-sheet { transition: none; }
}

/* ── Depths ───────────────────────────────────────────────────────────────── */
.depth { position: relative; margin-top: 36px; }
@media (min-width: 900px) { .depth { margin-top: 0; } }
.depth-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: var(--hairline);
}
.depth-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 8px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, color 0.2s;
}
.depth-num {
  display: inline-grid;
  place-items: center;
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.depth-step.is-active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
:root[data-theme="dark"] .depth-step.is-active { background: #2c2c37; }

.depth-card {
  margin-top: 14px;
  padding: 20px 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--overlay-border);
  background: var(--overlay);
}
.depth-meta .badges { margin-bottom: 10px; }
.depth-meta .card-title { font-size: 13px; -webkit-line-clamp: unset; display: block; }
.depth-meta .card-source { font-size: 12px; }
.depth-meta .card-doi { font-size: 12px; }
.depth-body { margin-top: 16px; min-height: 8em; }
.depth-body p {
  margin: 0 0 0.8em;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--text);
  text-wrap: pretty;
}
.depth-body.is-gist p { font-size: clamp(19px, 4.6vw, 22px); font-weight: 500; line-height: 1.45; letter-spacing: -0.015em; }
.depth-body.is-technical p { font-size: 15.5px; color: var(--text-2); }
.depth-body .tech-label { margin: 16px 0 3px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
.depth-body .tech-label:first-child { margin-top: 0; }
.depth-body.is-swapping { animation: depth-in 0.32s ease-out; }
@keyframes depth-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .depth-body.is-swapping { animation: none; }
}

.gloss {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline solid var(--faint);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.gloss[aria-expanded="true"] { text-decoration-color: var(--accent); }
.depth-another {
  margin-top: 14px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.depth-another[hidden] { display: none; }

/* ── Email action page (/auth/action/) ────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(var(--lamp-rgb), 0.10), transparent 70%),
    var(--night);
}
.auth {
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 48px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.auth-symbol { width: 48px; height: 48px; margin-bottom: 28px; }
.auth-panel { width: 100%; }
.auth-panel[hidden] { display: none; }
.auth-panel h1 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.03em;
  outline: none;
}
.auth-text { color: var(--muted); }
.auth-email { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.auth-form { display: flex; flex-direction: column; margin-top: 18px; }
.auth-label { margin: 0 0 6px 4px; font-size: 14px; font-weight: 500; color: var(--muted); }
.auth-input {
  width: 100%;
  height: 50px;
  margin: 0 0 14px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input:focus { border-color: rgba(var(--lamp-rgb), 0.75); box-shadow: 0 0 0 3px rgba(var(--lamp-rgb), 0.2); }
.auth-input[aria-invalid="true"] { border-color: rgba(var(--danger-rgb), 0.75); }
.auth-hint { margin: -6px 4px 10px; font-size: 13px; color: var(--muted); }
.auth-show { display: inline-flex; align-items: center; gap: 8px; margin: 0 4px 6px; font-size: 15px; color: var(--muted); cursor: pointer; }
.auth-show input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.auth-error { min-height: 0; margin: 6px 4px 0; font-size: 15px; color: rgb(var(--danger-rgb)); }
.auth-error:empty { display: none; }
.auth-submit, .auth-retry { margin-top: 16px; width: 100%; }
.auth-open { margin-top: 22px; width: 100%; }
.auth-open[hidden] { display: none; }

/* The night sky of the hero settles into the app's background below it */
@media (min-width: 900px) {
  .hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 96px;
    z-index: 0;
    background: linear-gradient(to bottom, var(--night-clear), var(--bg));
    pointer-events: none;
  }
}
/* On phones the hero's own buttons are right there; the bar keeps just the logo and theme switch */
@media (max-width: 519px) {
  .q-btn--bar { display: none; }
}
.gloss-pop {
  position: absolute;
  z-index: 10;
  max-width: min(320px, calc(100% - 8px));
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  font-size: 15px;
  line-height: 1.45;
}
.gloss-pop[hidden] { display: none; }
.gloss-term { display: block; margin-bottom: 3px; color: var(--accent); font-weight: 600; }

/* ── Leaps ────────────────────────────────────────────────────────────────── */
.leap-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
#leap-sound .sound-off { display: none; }
#leap-sound[aria-pressed="false"] .sound-wave { display: none; }
#leap-sound[aria-pressed="false"] .sound-off { display: inline; }

.leap-screen { background: #000; color: #fff; }
.leap-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.leap-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 24px;
  padding: 9px 12px 10px;
  border-radius: 14px;
  background: rgba(30, 30, 38, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.leap-caption[hidden] { display: none; }
.leap-title {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leap-title:hover { text-decoration: underline; }
.leap-source { margin: 2px 0 0; font-size: 12px; opacity: 0.7; }
.leap-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.18); }
.leap-progress span { display: block; height: 100%; width: 0; background: #fff; }
.leap-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}
.leap-fallback[hidden] { display: none; }

/* ── How it's made: four steps along one line ─────────────────────────────── */
.made-steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}
.made-steps li {
  position: relative;
  padding: 0 0 26px 40px;
  counter-increment: step;
}
/* A vertical scale line with a tick per step; the particle sits on the last, as in the logo */
.made-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--card-border);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.made-steps li:last-child::before { border-color: var(--accent); color: var(--accent); }
.made-steps li::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 28px;
  bottom: 2px;
  width: 1px;
  background: var(--card-border);
}
.made-steps li:last-child::after { display: none; }
.made-steps h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; line-height: 26px; }
.made-steps p { margin: 4px 0 0; color: var(--muted); max-width: 34ch; }
.made-note { margin-top: 12px; max-width: 40rem; color: var(--text) !important; }

@media (min-width: 900px) {
  .made-steps { grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 40px; }
  .made-steps li { padding: 44px 0 0; }
  .made-steps li::after { left: 30px; right: -28px; top: 12.5px; bottom: auto; width: auto; height: 1px; }
  .made-steps li:last-child::after { display: none; }
}

/* ── Also in the app ──────────────────────────────────────────────────────── */
.also { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.also > div { padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.also dt { font-weight: 650; letter-spacing: -0.01em; }
.also dd { margin: 4px 0 0; color: var(--muted); }
@media (min-width: 720px) {
  .also { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}
@media (min-width: 1000px) {
  .also { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Join ─────────────────────────────────────────────────────────────────── */
.section--join {
  max-width: none;
  padding-top: 96px;
  padding-bottom: 104px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(var(--lamp-rgb), 0.10), transparent 70%),
    var(--night);
  border-top: 1px solid var(--hairline);
}
.join-copy { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.join-symbol { width: 56px; height: 56px; margin-bottom: 22px; }
.join-lede { color: var(--muted); max-width: 30ch; margin-bottom: 26px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 40px);
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--muted);
}
.wordmark--foot { height: 14px; margin-bottom: 20px; }
.site-foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 18px; }
.site-foot-links a { color: var(--text); text-decoration: none; }
.site-foot-links a:hover { color: var(--accent); }
.site-foot-note { max-width: 60ch; margin: 0; font-size: 13px; line-height: 1.5; }

/* ── Text pages (privacy, terms, 404) ─────────────────────────────────────── */
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 104px) var(--gutter) 72px;
}
.page h1 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.page h2 { margin: 36px 0 10px; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.page p, .page li { color: var(--text-2); }
.page ul { padding-left: 20px; margin: 0 0 1em; }
.page li { margin-bottom: 6px; }
.page-updated { color: var(--muted) !important; font-size: 15px; }
.page-lede { font-size: 19px; line-height: 1.5; }
.page-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hairline); color: var(--muted) !important; font-size: 15px; }

.lost { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
