/* ============================================================
   Sophont — Deep space medical observatory
   ============================================================ */

:root {
  /* Dark base — deep indigo-black, inspired by logo colorway */
  --bg: #07071e;
  --bg-raised: #0e0e2e;
  --bg-panel: #12123a;
  --fg: #ddeeff;
  --fg-soft: #8aaac8;
  --fg-mute: #4a5a80;
  --rule: rgba(140, 180, 255, 0.09);
  --rule-strong: rgba(140, 180, 255, 0.20);

  /* Indigo → electric blue → ice */
  --blue-900: #0a0a38;
  --blue-700: #18186a;
  --blue-500: #3344cc;
  --blue-400: #5566ee;
  --blue-300: #88aaff;
  --blue-200: #c0dcff;
  --electric: #6688ff;
  --ice: #c8e8ff;

  /* Accents */
  --mint: #5cf0d0;
  --amber: #ffcc88;
  --magenta: #cc88ff;

  /* Logo: black PNG → invert to white on dark */
  --logo-filter: invert(1) brightness(2);

  --ease: cubic-bezier(.2,.7,.1,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

body.theme-light {
  --bg: #F8F5FA;
  --bg-raised: #EAEAF3;
  --bg-panel: #ffffff;
  --fg: #08082a;
  --fg-soft: #3a4468;
  --fg-mute: #7a84aa;
  --rule: rgba(8, 8, 42, 0.07);
  --rule-strong: rgba(8, 8, 42, 0.16);
  --blue-500: #2233bb;
  --blue-400: #3344cc;
  --electric: #2233bb;
  --ice: #2233bb;
  /* Logo: black PNG stays black on light */
  --logo-filter: none;
}

body.theme-brand {
  --bg: #eef4ff;
  --bg-raised: #e0ecff;
  --bg-panel: #ffffff;
  --fg: #0a0a60;
  --fg-soft: #2a3a88;
  --fg-mute: #7a8ac8;
  --rule: rgba(10,10,96,.08);
  --rule-strong: rgba(10,10,96,.18);
  --electric: #2233cc;
  --ice: #0a0a60;
  --mint: #00b8a0;
  --logo-filter: none;
}
body.theme-brand .btn-primary { background: #2233cc; color: #fff; }
body.theme-brand .ambient .stars { opacity: 0; }
body.theme-brand .ambient .grid { opacity: .12; }
body.theme-brand .ambient .orb-1 { background: radial-gradient(circle, #c0d8ff 0%, transparent 60%); opacity: .4; filter: blur(56px); }
body.theme-brand .ambient .orb-2 { background: radial-gradient(circle, #e0d0ff 0%, transparent 55%); opacity: .3; filter: blur(64px); }
body.theme-brand .ambient .orb-3 { background: radial-gradient(circle, #c0d8ff 0%, transparent 60%); opacity: .25; filter: blur(56px); }
body.theme-brand .card { background: #eef4ff; }
body.theme-brand .card:hover { background: #e0ecff; }
body.theme-brand .member { background: #eef4ff; }
body.theme-brand .member:hover { background: #e0ecff; }
body.theme-brand .press-item { background: #eef4ff; }
body.theme-brand .press-item:hover { background: #e0ecff; }
body.theme-brand .affil-tile { background: #eef4ff; }
body.theme-brand .affil-tile:hover { background: #e0ecff; }
body.theme-brand .section-id::before { background: #2233cc; }
body.theme-brand .nav { background: color-mix(in oklab, #eef4ff 85%, transparent); }
body.font-futurist {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
body.font-industrial {
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
body.font-editorial {
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
body.font-technical {
  --font-display: 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ------------ Base ------------ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Honor the OS-level reduced-motion preference: collapse CSS animations and
   transitions to imperceptible durations and fall back to instant scrolling. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Keyboard focus — visible ring without affecting mouse users. */
:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

/* Skip link: visually hidden until focused. */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--bg-panel);
  color: var(--fg);
  border: 1px solid var(--electric);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* selection */
::selection { background: var(--blue-500); color: white; }

/* ------------ Ambient background ------------ */
.ambient {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient .stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.5), transparent 50%),
    radial-gradient(1px 1px at 73% 12%, rgba(255,255,255,.35), transparent 50%),
    radial-gradient(1px 1px at 45% 88%, rgba(255,255,255,.4), transparent 50%),
    radial-gradient(1px 1px at 85% 65%, rgba(255,255,255,.25), transparent 50%),
    radial-gradient(1px 1px at 12% 74%, rgba(255,255,255,.3), transparent 50%),
    radial-gradient(1.5px 1.5px at 60% 40%, rgba(126,174,255,.5), transparent 50%),
    radial-gradient(1px 1px at 92% 22%, rgba(255,255,255,.2), transparent 50%),
    radial-gradient(1px 1px at 30% 55%, rgba(255,255,255,.25), transparent 50%);
  opacity: .6;
}
body.theme-light .ambient .stars { opacity: 0; }

.ambient .orb {
  position: absolute;
  border-radius: 50%;
  /* Smaller blur radius (still soft) — 80–140px blurs blow up the rasterized
     layer to >500px on each side and dominate paint time. */
  filter: blur(48px);
  opacity: .35;
  /* No mix-blend-mode: it forces the compositor to re-blend every frame
     as content scrolls beneath the fixed orbs. The radial-gradient with
     transparent edges already gives the soft halo look. */
  will-change: transform;
  transform: translateZ(0);
}
.ambient .orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #3344cc 0%, transparent 60%);
  top: -15%; left: -15%;
  animation: orb-float-1 24s var(--ease) infinite;
}
.ambient .orb-2 {
  width: 900px; height: 900px;
  background: radial-gradient(circle, #18186a 0%, transparent 55%);
  top: 25%; right: -25%;
  animation: orb-float-2 28s var(--ease) infinite;
}
.ambient .orb-3 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6688ff 0%, transparent 60%);
  bottom: -15%; left: 25%;
  animation: orb-float-3 22s var(--ease) infinite;
  opacity: .15;
}
body.theme-light .ambient .orb { opacity: .14; filter: blur(64px); }
body.theme-light .ambient .orb-1 { background: radial-gradient(circle, #c0dcff 0%, transparent 60%); }
body.theme-light .ambient .orb-2 { background: radial-gradient(circle, #e0d8f0 0%, transparent 55%); }
body.theme-light .ambient .orb-3 { background: radial-gradient(circle, #c0dcff 0%, transparent 60%); }
body.theme-light .ambient .grid { opacity: .25; }
body.motion-low .ambient .orb { animation: none; }

@keyframes orb-float-1 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(15%, 10%); }
}
@keyframes orb-float-2 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-10%, 15%); }
}
@keyframes orb-float-3 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(10%, -15%); }
}

.ambient .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black 30%, transparent 75%);
  opacity: .5;
}

/* ------------ Layout ------------ */
.app {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 768px) {
  .app { padding: 0 20px; }
}

/* ------------ Nav ------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  /* Slightly more opaque so a smaller blur still hides the underlying
     content; halves blur cost vs the original 16px. */
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.nav-brand img { max-width: min(136px, 36vw); }
.nav-brand .logo {
  width: 28px; height: 28px;
  position: relative;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.nav-links a {
  position: relative;
  transition: color .2s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--fg);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  content: ''; position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--electric);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.nav-cta:hover {
  border-color: var(--electric);
  color: var(--electric);
  background: color-mix(in oklab, var(--electric) 8%, transparent);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}
body.motion-low .status-dot { animation: none; }

/* ------------ Mobile nav (hamburger injected by site-footer.js) ------------ */
.nav-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 9px;
  margin-left: 2px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  flex-shrink: 0;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav-menu-toggle span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-menu-toggle:hover {
  border-color: var(--electric);
  background: color-mix(in oklab, var(--electric) 8%, transparent);
}
.nav-open .nav-menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-menu-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile-menu {
  position: absolute;
  top: 100%;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  display: none;
  flex-direction: column;
  padding: 8px 20px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule-strong);
  box-shadow: 0 24px 48px -24px rgba(8, 8, 42, .25);
}
.nav-mobile-menu a {
  padding: 14px 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-soft);
  border-bottom: 1px solid var(--rule);
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}
.nav-mobile-menu a:last-child { border-bottom: 0; }
.nav-mobile-menu a:hover,
.nav-mobile-menu a[aria-current="page"] { color: var(--fg); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav { justify-content: flex-start; }
  .nav-cta { margin-left: auto; }
  .nav-menu-toggle { display: inline-flex; }
  .nav.nav-open .nav-mobile-menu { display: flex; animation: nav-menu-in .22s var(--ease-out) both; }
}
@keyframes nav-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------ Section chrome ------------ */
.section {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 80px;
  /* Skip layout/paint for sections that are well off-screen. The hint
     keeps scrollbar geometry stable so anchor links still land correctly. */
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}
.section:first-of-type { border-top: 0; }
/* The vision section hosts the live network animation; keep it rendered
   so its ResizeObserver/animations don't pause when scrolled past. */
#upr { content-visibility: visible; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 60px;
  align-items: start;
}
.section-id {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: flex; align-items: center; gap: 12px;
}
.section-id::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--electric);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -.025em;
  font-weight: 400;
  margin: 0 0 20px 0;
}
.section-lede {
  color: var(--fg-soft);
  font-size: 18px;
  line-height: 1.5;
  max-width: 620px;
}
@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}

/* ------------ Hero ------------ */
.hero {
  position: relative;
  padding: 80px 0 120px;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
/* Variant A — big type */
.hero-a h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 136px);
  line-height: .92;
  letter-spacing: -.04em;
  font-weight: 300;
  margin: 0;
  max-width: 15ch;
}
.hero-a h1 em {
  font-style: normal;
  color: var(--ice);
  position: relative;
}
.hero-a h1 em::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: .05em;
  height: 1px; background: var(--ice);
  opacity: .3;
}
.hero-audience {
  display: block;
  color: var(--ice);
  animation: hero-audience-flip .55s var(--ease) both;
  vertical-align: baseline;
}
.hero-line,
.hero-core-phrase {
  display: block;
}
.hero-core-phrase,
.hero-audience {
  white-space: nowrap;
}
.hero-a .sub {
  margin-top: 48px;
  max-width: 520px;
  color: var(--fg-soft);
  font-size: 18px;
  line-height: 1.5;
}
.hero-a .cta-row {
  margin-top: 40px;
  display: flex; gap: 16px; flex-wrap: wrap;
}

/* Variant B — diagram centered */
.hero-b {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}
.hero-b h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.0;
  letter-spacing: -.03em;
  font-weight: 400;
  margin: 0;
}
.hero-b h1 .accent { color: var(--ice); }
.hero-b .sub {
  margin-top: 28px;
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.55;
  max-width: 480px;
}
.hero-b .cta-row {
  margin-top: 36px;
  display: flex; gap: 16px; flex-wrap: wrap;
}

/* Variant C — split / minimalist */
.hero-c {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  min-height: 70vh;
}
.hero-c .left h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -.02em;
  font-weight: 400;
  margin: 0;
  max-width: 14ch;
}
.hero-c .right {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-end;
  text-align: right;
}
.hero-c .artifact {
  aspect-ratio: 1;
  width: 320px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, color-mix(in oklab, var(--electric) 30%, transparent), transparent 70%);
}

/* Variant C centered */
.hero-c-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 70vh;
  justify-content: center;
  position: relative;
  isolation: isolate;
  padding: 32px 0 20px;
}
.hero-c-centered::before {
  content: '';
  position: absolute;
  inset: -12% -8%;
  width: auto;
  height: auto;
  transform: none;
  background:
    linear-gradient(90deg, transparent 0 49.8%, color-mix(in oklab, var(--fg) 10%, transparent) 49.8% 50%, transparent 50%),
    linear-gradient(0deg, transparent 0 49.8%, color-mix(in oklab, var(--fg) 10%, transparent) 49.8% 50%, transparent 50%),
    repeating-linear-gradient(90deg, transparent 0 96px, color-mix(in oklab, var(--fg) 5%, transparent) 96px 97px),
    repeating-linear-gradient(0deg, transparent 0 96px, color-mix(in oklab, var(--fg) 5%, transparent) 96px 97px);
  mask-image: radial-gradient(ellipse at center, black 0 48%, transparent 84%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0 48%, transparent 84%);
  opacity: .5;
  z-index: -2;
}
.hero-generated-bg {
  position: absolute;
  inset: -260px calc(50% - 50vw) -120px;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 55%, transparent), transparent 20%, transparent 72%, color-mix(in oklab, var(--bg) 62%, transparent)),
    radial-gradient(ellipse at 50% 47%, color-mix(in oklab, var(--bg) 12%, transparent) 0 24%, color-mix(in oklab, var(--bg) 42%, transparent) 58%, color-mix(in oklab, var(--bg) 72%, transparent) 86%),
    image-set(
      url("assets/generated/hero-medical-ai-bg.webp") type("image/webp"),
      url("assets/generated/hero-medical-ai-bg.png") type("image/png")
    );
  background-size: cover;
  background-position: center;
  filter: saturate(.92) contrast(.98);
}
.hero-generated-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 80px, color-mix(in oklab, var(--fg) 4%, transparent) 80px 81px),
    repeating-linear-gradient(0deg, transparent 0 80px, color-mix(in oklab, var(--fg) 4%, transparent) 80px 81px);
  opacity: .28;
  mask-image: radial-gradient(ellipse at center, black 0 44%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0 44%, transparent 82%);
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 32px;
  position: relative;
}
.hero-kicker,
.hero-c-title,
.hero-c-sub,
.hero-c-actions {
  position: relative;
  z-index: 1;
}
.hero-c-title,
.hero-c-sub {
  background: color-mix(in oklab, var(--bg) 20%, transparent);
}
.hero-c-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.9vw, 68px);
  line-height: 1.05;
  letter-spacing: -.025em;
  font-weight: 400;
  margin: 0;
  text-align: center;
  max-width: 24ch;
  text-wrap: balance;
  text-shadow: 0 1px 0 color-mix(in oklab, var(--bg) 70%, transparent);
}
.hero-c-title span {
  color: var(--ice);
}
.hero-c-title .hero-line,
.hero-c-title .hero-core-phrase {
  color: inherit;
}
.hero-c-title .hero-core-phrase > span,
.hero-c-title .hero-audience {
  color: var(--ice);
}
@keyframes hero-audience-flip {
  from {
    opacity: 0;
    transform: translateY(.35em) rotateX(-35deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}
.hero-c-sub {
  margin: 32px 0 0;
  max-width: 560px;
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.55;
  text-align: center;
}
.hero-c-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Variant D — single image hero background */
.hero-d-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 82vh;
  justify-content: center;
  position: relative;
  isolation: isolate;
  padding: 32px 0 20px;
}
.hero-d-centered .hero-kicker,
.hero-d-centered .hero-c-title,
.hero-d-centered .hero-c-sub,
.hero-d-centered .hero-c-actions {
  position: relative;
  z-index: 2;
}
.hero-d-centered .hero-c-title {
  text-shadow:
    0 0 24px color-mix(in oklab, var(--bg) 85%, transparent),
    0 0 60px color-mix(in oklab, var(--bg) 60%, transparent);
}
.hero-d-centered .hero-c-sub {
  text-shadow: 0 0 16px color-mix(in oklab, var(--bg) 75%, transparent);
}

/* Kicker chip — readable over the busy hero artwork */
.hero-d-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid color-mix(in oklab, var(--fg) 16%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  color: var(--fg-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 36px;
}
.hero-d-kicker .hero-kicker-sep {
  color: color-mix(in oklab, var(--fg-mute) 70%, transparent);
}

.hero-d-bg {
  position: absolute;
  /* Constrain to the hero's actual bounds (no full-viewport bleed and no
     custom 28-px upward shift). The clamped background-size below keeps
     the body image at a similar pixel size across resolutions instead of
     shrinking to fit each viewport. */
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 18%, color-mix(in oklab, var(--bg) 55%, transparent) 38%, transparent 60%),
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 55%, transparent), transparent 18%, transparent 78%, var(--bg) 100%),
    image-set(
      url("assets/generated/hero-body-transparent.webp") type("image/webp"),
      url("assets/generated/hero-body-transparent.png") type("image/png")
    ) center / auto clamp(360px, 70vh, 640px) no-repeat;
  /* The hero image is large; promote to its own layer so re-rasterization
     during scroll/orb-drift doesn't burn the main thread. */
  transform: translateZ(0);
  will-change: transform;
}

body.theme-dark .hero-d-bg {
  filter: invert(1) hue-rotate(180deg) saturate(.9) brightness(.85);
}

/* ------ Hero neuronal wave (above body image, below text/buttons) ------ */
/* Cubic-Bezier nerve-fiber traces fan in from the hero's periphery and
   converge on the glowing chest of the body image. A short dash travels
   along each (stroke-dashoffset animation) like an action potential,
   brightening as it nears the core where it dissolves into a softly
   breathing bloom anchored at the convergence point. */
.hero-d-wave {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Radial fade keeps the periphery quiet — traces dissolve into the
     hero corners so the eye is led toward the convergence rather than
     toward hard edges. */
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, black 30%, rgba(0,0,0,.55) 65%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, black 30%, rgba(0,0,0,.55) 65%, transparent 100%);
  overflow: hidden;
}
.hero-d-wave svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.hero-wave-trace {
  fill: none;
  stroke: var(--electric);
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: .045;
}
/* Traveling motes — tiny luminous ellipses that streak along each path.
   No hard stroke lines anywhere; the gradient fill on the ellipse
   already feathers off into transparency, and a soft drop-shadow
   provides the bloom around each mote. */
/* Filter is applied at the <g> level so the whole comet (head + trail)
   composites once and the halo wraps the streak coherently — instead of
   each overlapping ghost ellipse generating its own halo, which creates
   bright internal seams. */
.hero-wave-mote {
  filter:
    drop-shadow(0 0 5px  color-mix(in oklab, var(--ice)      80%, transparent))
    drop-shadow(0 0 14px color-mix(in oklab, var(--electric) 70%, transparent));
}
.hero-wave-mote--b {
  filter:
    drop-shadow(0 0 5px  color-mix(in oklab, var(--mint)     70%, transparent))
    drop-shadow(0 0 14px color-mix(in oklab, var(--electric) 60%, transparent));
}
.hero-wave-mote--c {
  filter:
    drop-shadow(0 0 6px  color-mix(in oklab, var(--ice)      90%, transparent))
    drop-shadow(0 0 16px color-mix(in oklab, var(--electric) 55%, transparent));
}
/* Pure-white motes: no electric/ice/mint tint, just a clean luminous
   pinpoint with a wider warm-white halo. Reads as starlight against
   the dark theme and as crisp ink-blank against the cream theme. */
.hero-wave-mote--d ellipse { fill: url(#hero-wave-mote-white); }
.hero-wave-mote--d {
  filter:
    drop-shadow(0 0 4px  rgba(255, 255, 255, .85))
    drop-shadow(0 0 12px rgba(255, 255, 255, .55))
    drop-shadow(0 0 22px color-mix(in oklab, var(--ice) 50%, transparent));
}
/* Light/brand themes have no luminosity to draw on (--electric is a deep
   ink blue, not a glow). Render the comet as ink with a faint haze
   instead of a halo. Pure-white motes would vanish under multiply, so
   on these themes the --d variant inherits the regular ink fill. */
body.theme-light .hero-wave-mote,
body.theme-brand .hero-wave-mote {
  filter: drop-shadow(0 0 3px color-mix(in oklab, var(--electric) 35%, transparent));
  mix-blend-mode: multiply;
}
/* On cream/light backgrounds pure-white would vanish under multiply, so
   the --d motes opt back into normal blend and are wrapped in a tight
   dark-navy ring. The dark halo carves a hole in the cream, the white
   core fills it as a bright pearl — clearly readable as white rather
   than blue. */
body.theme-light .hero-wave-mote--d,
body.theme-brand .hero-wave-mote--d {
  mix-blend-mode: normal;
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 1))
    drop-shadow(0 0 3px rgba(20, 25, 60, .85))
    drop-shadow(0 0 10px rgba(20, 25, 60, .35));
}
.hero-wave-bloom {
  transform-origin: 800px 450px;
  transform-box: fill-box;
  mix-blend-mode: screen;
  animation: heroWaveBloom 4.6s ease-in-out infinite;
}
@keyframes heroWaveBloom {
  0%, 100% { opacity: .22; transform: scale(.9); }
  50%      { opacity: .5;  transform: scale(1.05); }
}
body.theme-light .hero-wave-bloom,
body.theme-brand .hero-wave-bloom {
  /* Screen blending erases on light backgrounds — switch to multiply so
     the bloom registers as a soft warm halo instead of disappearing. */
  mix-blend-mode: multiply;
  opacity: .55;
}
body.motion-low .hero-wave-mote { display: none; }
body.motion-low .hero-wave-bloom { animation: none; opacity: .45; }

@media (max-width: 900px) {
  .hero-b, .hero-c { grid-template-columns: 1fr; }
  .hero-c .right { align-items: flex-start; text-align: left; }
  .hero {
    padding-top: 48px;
  }
  .hero-c-centered {
    min-height: 66vh;
  }
  .hero-d-centered {
    min-height: 70vh;
  }
  .hero-generated-bg {
    inset: -220px calc(50% - 50vw) -110px;
    background-position: center;
  }
}
@media (max-width: 560px) {
  .nav {
    gap: 14px;
  }
  .nav-cta {
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: .08em;
  }
  .nav-brand img {
    max-width: 118px;
  }
  .hero-c-centered {
    padding-top: 12px;
  }
  .hero-kicker {
    font-size: 10px;
    margin-bottom: 24px;
  }
  /* The display clamp floors at 38px, which is wider than ~360–400px
     phones can fit for "medical superintelligence". Drop the floor and
     let the core phrase wrap so it stops clipping on both sides. */
  .hero-c-title {
    font-size: clamp(26px, 8.4vw, 44px);
    max-width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }
  .hero-c-title .hero-core-phrase {
    white-space: normal;
  }
  .hero-c-sub {
    font-size: 15px;
    padding: 0 16px;
    box-sizing: border-box;
  }
  .hero-generated-bg {
    inset: -180px calc(50% - 50vw) -90px;
    background-position: 28% center;
    filter: saturate(.85) contrast(.95);
  }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease), opacity .25s var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--electric);
  color: #ffffff;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--electric) 40%, transparent);
}
.btn-primary:hover {
  box-shadow: 0 0 0 8px color-mix(in oklab, var(--electric) 20%, transparent);
  transform: translateY(-1px);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  border: 1px solid var(--rule-strong);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--electric);
  color: var(--electric);
}
.btn svg { width: 14px; height: 14px; }

/* ------------ Holon product feature ------------ */
/* Let the card's soft shadow extend beyond the section's side edges. */
#solutions { content-visibility: visible; }
.holon-product {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  padding: 20px;
  background: var(--bg-panel);
  border: 1px solid color-mix(in oklab, var(--fg) 13%, transparent);
  border-radius: 28px;
  box-shadow:
    0 4px 32px rgba(49, 30, 79, .06),
    0 2px 8px rgba(49, 30, 79, .03),
    inset 0 2px 0 rgba(198, 177, 227, .45);
  overflow: hidden;
}
.holon-product-copy { padding: clamp(28px, 3.2vw, 46px); }
.holon-product-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid color-mix(in oklab, var(--electric) 10%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, #bca8db 14%, var(--bg-panel));
  font: 10px var(--font-mono);
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 22px;
}
.holon-product-kicker::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #a089bd;
}
.holon-product h3 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.holon-product-headline {
  margin: 0 0 16px;
  font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.3;
  letter-spacing: -.025em;
}
.holon-product-description {
  max-width: 40ch;
  margin: 0;
  font-size: 16px;
  color: var(--fg-soft);
  line-height: 1.65;
}
.holon-product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.holon-product-actions .btn { padding: 13px 19px; font-size: 11px; white-space: nowrap; }
.holon-product-media {
  min-width: 0;
  aspect-ratio: 1;
  background: #f8f5fa;
  border: 1px solid #eae3f0;
  border-radius: 18px;
  overflow: hidden;
}
.holon-product-video { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: contain; }
@media (max-width: 900px) {
  .holon-product { grid-template-columns: 1fr; }
  .holon-product-copy { padding-bottom: 28px; }
  .holon-product-media { width: 100%; max-width: 620px; justify-self: center; }
}
@media (max-width: 480px) {
  .holon-product { padding: 12px; border-radius: 22px; }
  .holon-product-copy { padding: 24px 14px 28px; }
  .holon-product-media { border-radius: 13px; }
  .holon-product-actions { flex-direction: column; align-items: flex-start; }
  .holon-product-actions .btn { justify-content: center; }
}

/* ------------ UPR diagram ------------ */
.upr-diagram {
  position: relative;
  aspect-ratio: 1.1 / 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}
.upr-diagram svg { width: 100%; height: 100%; display: block; overflow: visible; }
.upr-ring { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.upr-ring.pulse {
  animation: ring-pulse 4s ease-in-out infinite;
}
body.motion-low .upr-ring.pulse { animation: none; }
@keyframes ring-pulse {
  0%,100% { opacity: .2; }
  50% { opacity: .9; stroke: var(--electric); }
}
.upr-node {
  fill: var(--bg-raised);
  stroke: var(--rule-strong);
  stroke-width: 1;
  transition: fill .3s var(--ease), stroke .3s var(--ease);
}
.upr-node.active { stroke: var(--electric); fill: color-mix(in oklab, var(--electric) 20%, var(--bg-raised)); }
.upr-core {
  fill: var(--electric);
  filter: drop-shadow(0 0 20px var(--electric));
}
.upr-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--fg-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.upr-line {
  stroke: var(--rule-strong);
  stroke-width: 1;
  fill: none;
}
.upr-line.active { stroke: var(--electric); stroke-width: 1.5; }

/* ------------ Vision flow ------------ */
.upr-flow {
  --upr-cycle: 64s;
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, .95fr) minmax(220px, .74fr) minmax(270px, 1fr);
  gap: clamp(36px, 6vw, 78px);
  align-items: stretch;
  min-height: 560px;
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--rule);
  background:
    linear-gradient(90deg, transparent 0 33%, color-mix(in oklab, var(--electric) 5%, transparent) 49%, transparent 67%),
    var(--bg);
  overflow: hidden;
}
.upr-flow::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .16;
  pointer-events: none;
}
.upr-flow-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.upr-connector {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.25;
  stroke-linecap: round;
  opacity: .52;
  vector-effect: non-scaling-stroke;
}
/* Visible anchor dot at each card-side endpoint of a connector — makes
   it obvious which input/output a curved line is attached to. The base
   dot is muted/gray; phase-synced overlays light up blue (inputs) or
   magenta (outputs) only while that connection is firing. */
.upr-card-anchor {
  stroke: color-mix(in oklab, var(--bg) 80%, transparent);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.upr-anchor-base {
  fill: color-mix(in oklab, var(--fg-mute) 60%, var(--bg-raised));
}
.upr-input-anchor-active,
.upr-output-anchor-active {
  opacity: 0;
  pointer-events: none;
}
.upr-input-anchor-active { fill: var(--electric); }
.upr-output-anchor-active { fill: color-mix(in oklab, var(--magenta) 70%, var(--electric)); }
.upr-input-anchor-active.phase-flow,
.upr-output-anchor-active.phase-flow {
  animation: uprCardPhase var(--upr-cycle) linear infinite;
  animation-delay: var(--phase-delay);
}
.upr-connector-glow {
  fill: none;
  stroke: var(--electric);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0;
  vector-effect: non-scaling-stroke;
}
.upr-connector.phase-flow {
  animation: uprPulsePhase var(--upr-cycle) linear infinite;
  animation-delay: var(--phase-delay);
}
.upr-connector-glow.phase-flow {
  animation: uprSignalPhase var(--upr-cycle) linear infinite;
  animation-delay: var(--phase-delay);
}
.upr-flow-column {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.upr-center-column {
  align-items: center;
  justify-content: space-between;
  text-align: center;
}
.upr-center-column .upr-step-header {
  text-align: left;
  align-self: stretch;
}
.upr-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.upr-step-header > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--electric);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.upr-step-header div div {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--electric);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.upr-step-header strong {
  display: block;
  margin-top: 2px;
  color: var(--fg-soft);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
}
.upr-data-list,
.upr-application-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}
.upr-data-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: color-mix(in oklab, var(--bg-raised) 74%, var(--bg));
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.upr-data-card > :not(.upr-data-sync) {
  position: relative;
  z-index: 1;
}
.upr-data-sync {
  position: absolute;
  inset: -1px;
  z-index: 0;
  border: 1px solid color-mix(in oklab, var(--electric) 64%, var(--rule));
  border-radius: inherit;
  background: color-mix(in oklab, var(--electric) 10%, transparent);
  opacity: 0;
  pointer-events: none;
}
.upr-data-sync.phase-flow {
  animation: uprCardPhase var(--upr-cycle) linear infinite;
  animation-delay: var(--phase-delay);
}
.upr-data-card > span {
  width: 36px;
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}
.upr-data-card strong,
.upr-application-card h3 {
  display: block;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.01em;
}
.upr-data-card strong {
  font-size: 14px;
}
.upr-data-card p,
.upr-application-card p {
  color: var(--fg-soft);
  margin: 0;
}
.upr-data-card p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
}
.upr-ai-core {
  display: grid;
  justify-items: center;
  align-content: center;
  flex: 1;
  width: min(100%, 260px);
  min-height: 380px;
}
.upr-ai-spacer {
  width: min(100%, 260px);
  height: 260px;
}
.upr-ai-graphic {
  width: min(100%, 260px);
  height: auto;
  overflow: visible;
}
.upr-core-edge {
  fill: none;
  stroke: color-mix(in oklab, var(--electric) 46%, var(--rule-strong));
  stroke-width: 1.15;
  stroke-linecap: round;
  opacity: .78;
  vector-effect: non-scaling-stroke;
}
.upr-core-node {
  fill: var(--bg-raised);
  stroke: var(--electric);
  stroke-width: 1.4;
  opacity: 1;
  vector-effect: non-scaling-stroke;
}
.upr-core-input {
  fill: color-mix(in oklab, var(--mint) 38%, var(--bg-raised));
}
.upr-core-hidden {
  fill: color-mix(in oklab, var(--electric) 34%, var(--bg-raised));
  opacity: 1;
  transform-origin: center;
  /* Was animating filter: drop-shadow keyframes — that re-rasterizes per
     frame. Animate fill brightness instead; same "breathing" effect, no
     compositor cost. */
  animation: uprCoreNodeBreath 4.2s ease-in-out infinite;
}
.upr-core-output {
  fill: color-mix(in oklab, var(--magenta) 38%, var(--bg-raised));
  stroke: url(#uprSignalGradient);
  opacity: 1;
  transform-origin: center;
  animation: uprCoreOutputBreath 3.2s ease-in-out infinite;
}
.upr-ai-caption {
  margin-top: -6px;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}
.upr-application-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  min-height: 148px;
  padding: 18px 18px 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg-raised) 76%, var(--bg));
}
.upr-application-card > :not(.upr-card-sync) {
  position: relative;
  z-index: 1;
}
.upr-card-sync {
  position: absolute;
  inset: -1px;
  z-index: 0;
  border: 1px solid color-mix(in oklab, var(--electric) 64%, var(--rule));
  border-radius: inherit;
  background: color-mix(in oklab, var(--electric) 10%, transparent);
  opacity: 0;
  pointer-events: none;
}
.upr-card-sync.phase-flow {
  animation: uprCardPhase var(--upr-cycle) linear infinite;
  animation-delay: var(--phase-delay);
}
.upr-application-card h3 {
  font-size: 21px;
  line-height: 1.08;
  margin: 0 0 8px;
}
.upr-application-card p {
  font-size: 13px;
  line-height: 1.45;
}
.upr-mini-trajectory,
.upr-mini-options,
.upr-mini-research {
  margin-top: 14px;
}
.upr-mini-trajectory {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
}
.upr-mini-trajectory i {
  width: 13px;
  height: 13px;
  border: 1px solid var(--electric);
  border-radius: 50%;
  background: color-mix(in oklab, var(--electric) 18%, transparent);
}
.upr-mini-options {
  display: grid;
  gap: 6px;
}
.upr-mini-options div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.upr-mini-options span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--electric);
  border-radius: 50%;
}
.upr-mini-research svg {
  width: 96px;
  height: 32px;
}
.upr-mini-research path {
  stroke: var(--electric);
  stroke-linecap: round;
  stroke-width: 1.4;
  opacity: .55;
}
.upr-mini-research circle {
  fill: var(--electric);
  filter: drop-shadow(0 0 3px color-mix(in oklab, var(--electric) 70%, transparent));
}
.upr-goal {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 1px;
  padding: 20px 32px;
  border: 1px solid var(--rule);
  border-top: 0;
  background: var(--bg-raised);
}
.upr-goal-label {
  flex: 0 0 auto;
  color: var(--electric);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.upr-goal-copy {
  flex: 1;
  min-width: 220px;
  color: var(--fg-soft);
  font-size: 14px;
  line-height: 1.5;
}
.upr-goal-items {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@keyframes uprPulsePhase {
  0% { stroke: var(--rule-strong); opacity: .46; stroke-width: 1.25; filter: none; }
  1.1%, 3.7% { stroke: var(--electric); opacity: .98; stroke-width: 1.9; filter: none; }
  4.8%, 100% { stroke: var(--rule-strong); opacity: .46; stroke-width: 1.25; filter: none; }
}
@keyframes uprSignalPhase {
  0% { opacity: 0; stroke-width: 1.1; filter: none; }
  1.1%, 3.7% { opacity: .95; stroke-width: 2; filter: none; }
  4.8%, 100% { opacity: 0; stroke-width: 1.1; filter: none; }
}
@keyframes uprCardPhase {
  0% { opacity: 0; }
  1.1%, 3.7% { opacity: 1; }
  4.8%, 100% { opacity: 0; }
}
/* Animate fill brightness rather than filter: drop-shadow — same visual
   pulse without per-frame rasterization. */
@keyframes uprCoreNodeBreath {
  0%, 100% { fill: color-mix(in oklab, var(--electric) 28%, var(--bg-raised)); }
  50%      { fill: color-mix(in oklab, var(--electric) 56%, var(--bg-raised)); }
}
@keyframes uprCoreOutputBreath {
  0%, 100% { fill: color-mix(in oklab, var(--magenta) 32%, var(--bg-raised)); }
  50%      { fill: color-mix(in oklab, var(--magenta) 62%, var(--bg-raised)); }
}
body.motion-low .upr-connector,
body.motion-low .upr-connector-glow,
body.motion-low .upr-data-card,
body.motion-low .upr-data-sync,
body.motion-low .upr-application-card,
body.motion-low .upr-card-sync,
body.motion-low .upr-core-network,
body.motion-low .upr-core-input,
body.motion-low .upr-core-hidden,
body.motion-low .upr-core-output,
body.motion-low .upr-core-edge,
body.motion-low .upr-input-anchor-active,
body.motion-low .upr-output-anchor-active {
  animation: none !important;
}
/* Vertical (stacked) layout for narrow viewports.
   The data-orientation attribute is set by JS based on the flow container's
   actual width so the SVG line geometry stays in lockstep with the grid. */
.upr-flow[data-orientation="vertical"] {
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 28px;
  min-height: 0;
}
.upr-flow[data-orientation="vertical"] .upr-center-column {
  align-items: stretch;
}
.upr-flow[data-orientation="vertical"] .upr-step-header {
  align-self: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-raised);
  position: relative;
  z-index: 3;
}
.upr-flow[data-orientation="vertical"] .upr-step-header > span {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
.upr-flow[data-orientation="vertical"] .upr-step-header strong {
  font-size: 12px;
}
.upr-flow[data-orientation="vertical"] .upr-step-header div div {
  font-size: 9px;
}
.upr-flow[data-orientation="vertical"] .upr-ai-core {
  width: 100%;
  min-height: 0;
}
.upr-flow[data-orientation="vertical"] .upr-ai-spacer {
  width: min(100%, 360px);
  height: 240px;
  margin: 0 auto;
}
/* Two-column input grid arranged so cards 0-3 fill the left column and
   cards 4-7 fill the right column. This keeps each card roughly above
   its corresponding network input node, so the cubic curves fan cleanly. */
.upr-flow[data-orientation="vertical"] .upr-data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 10px;
}
.upr-flow[data-orientation="vertical"] .upr-data-card {
  flex: 0 0 auto;
  min-height: 56px;
}
@media (max-width: 560px) {
  .upr-flow[data-orientation="vertical"] {
    padding: 22px;
    gap: 22px;
  }
  .upr-flow[data-orientation="vertical"] .upr-data-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
  .upr-flow[data-orientation="vertical"] .upr-ai-spacer {
    height: 220px;
  }
  .upr-goal {
    padding: 20px 22px;
  }
}

/* ------------ Cards ------------ */
.card-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .card-grid.cols-3, .card-grid.cols-2 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  padding: 36px 32px;
  background: var(--bg);
  transition: background .3s var(--ease);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card:hover { background: var(--bg-raised); }
.card.is-featured-project {
  grid-column: 1 / -1;
  min-height: 360px;
  background:
    linear-gradient(135deg,
      color-mix(in oklab, var(--electric) 8%, var(--bg)) 0%,
      var(--bg) 48%,
      color-mix(in oklab, var(--mint) 7%, var(--bg)) 100%);
}
.card.is-featured-project:hover {
  background:
    linear-gradient(135deg,
      color-mix(in oklab, var(--electric) 13%, var(--bg-raised)) 0%,
      var(--bg-raised) 48%,
      color-mix(in oklab, var(--mint) 10%, var(--bg-raised)) 100%);
}
.card.is-featured-project > div {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.25fr);
  grid-template-areas:
    "tag visual"
    "title visual"
    "desc visual";
  column-gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.card.is-featured-project .tag {
  grid-area: tag;
  align-self: end;
  margin-bottom: 0;
}
.card.is-featured-project h3 {
  grid-area: title;
  align-self: center;
  font-size: clamp(38px, 4.2vw, 60px);
  margin: 12px 0;
}
.card.is-featured-project p {
  grid-area: desc;
  align-self: start;
  max-width: 44ch;
  margin-bottom: 0;
  padding-right: 68px;
}
.card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card .tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--electric);
}
.card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.1;
  margin: 0 0 12px 0;
}
.card p {
  color: var(--fg-soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 20px 0;
}
.card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.card .arrow {
  width: 28px; height: 28px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.card:hover .arrow {
  background: var(--electric);
  border-color: var(--electric);
  color: #05080f;
}
.project-card-arrow {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--electric);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px color-mix(in oklab, var(--electric) 28%, transparent);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.project-card-arrow svg {
  width: 18px;
  height: 18px;
}
.card:hover .project-card-arrow {
  transform: translateX(3px);
  box-shadow: 0 12px 30px color-mix(in oklab, var(--electric) 40%, transparent);
}

/* Card visuals */
.card-visual {
  height: 300px;
  margin-bottom: 24px;
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
}
.card-visual svg { width: 100%; height: 100%; }
.card-visual-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.card-visual-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.card.is-featured-project .card-visual {
  grid-area: visual;
  height: clamp(190px, 22vw, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--electric) 12%, transparent), transparent 36%, color-mix(in oklab, var(--mint) 10%, transparent)),
    var(--bg-raised);
}
.nanopath-card-logo {
  object-fit: contain;
  padding: clamp(18px, 3.8vw, 46px);
}
@media (max-width: 900px) {
  .card.is-featured-project > div {
    display: block;
  }
  .card.is-featured-project h3 {
    font-size: 28px;
    margin: 0 0 12px 0;
  }
  .card.is-featured-project p {
    max-width: none;
    margin: 0 0 20px 0;
    padding-right: 58px;
  }
}

/* ------------ Community ------------ */
.community-column {
  display: flex;
  flex-direction: column;
}
.community-column-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.community-section-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 24px;
}
.community-journal-card {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-raised);
}
.community-kicker {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--electric);
}
.community-journal-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.015em;
}
.community-journal-card p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 14px;
  line-height: 1.55;
}
.community-journal-intro {
  margin-bottom: 28px;
}
.community-journal-intro p {
  color: var(--fg-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0;
}
.community-signup {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
}
.community-signup-fields {
  display: grid;
  gap: 14px;
  margin-top: 0;
}
.community-signup-field {
  display: grid;
  gap: 8px;
}
.community-signup label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.community-signup input {
  width: 100%;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--fg);
  padding: 13px 14px;
  border-radius: 0;
  font: 15px var(--font-body);
  outline: none;
}
.community-signup input:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--electric) 14%, transparent);
}
.community-signup button {
  justify-self: start;
  border: 0;
}
.community-journal-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding-top: 10px;
}
.community-calendar-group {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}
.community-action-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.community-calendar-options {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--rule);
  background: var(--bg-raised);
}
.community-signup-status {
  margin-top: 14px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: var(--fg-soft) !important;
}
.community-signup-status.is-error {
  color: #b4233a !important;
}
.community-journal-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  padding: 9px 12px;
  border-right: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-soft);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.community-journal-link:last-child {
  border-right: 0;
}
.community-journal-link:hover {
  color: var(--electric);
  background: color-mix(in oklab, var(--electric) 8%, transparent);
}
.community-journal-link svg {
  width: 13px;
  height: 13px;
}

/* ------------ Team ------------ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }
.member {
  position: relative;
  padding: 32px 28px;
  background: var(--bg);
  transition: background .3s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.member-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.member-footer .affil {
  padding-top: 0;
  border-top: 0;
  flex: 1 1 auto;
}
.member-social {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}
.member-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--electric);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px color-mix(in oklab, var(--electric) 26%, transparent);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.member-social a svg {
  width: 14px;
  height: 14px;
}
.member-social a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px color-mix(in oklab, var(--electric) 42%, transparent);
}
.member:hover { background: var(--bg-raised); }
.member .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-700), var(--electric));
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .05em;
  border: 1px solid var(--rule-strong);
  flex-shrink: 0;
}
.member .avatar::after {
  content: ''; position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--rule);
}
.member .avatar-photo::after { display: none; }
.member .name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0;
}
.member .role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--electric);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 4px 0 12px 0;
}
.member .bio {
  color: var(--fg-soft);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.member .affil {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.member .affil span {
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.team-note {
  max-width: 760px;
  margin: 24px 0 0;
  padding-left: 20px;
  border-left: 1px solid var(--rule-strong);
  color: var(--fg-soft);
  font-size: 15px;
  line-height: 1.6;
}

.affil-row {
  display: flex;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 48px;
  flex-wrap: wrap;
}
.affil-tile {
  flex: 1 1 0;
  min-width: 140px;
  padding: 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .3s var(--ease);
}
.affil-tile:hover { background: var(--bg-raised); }
.affil-tile .mono-mark {
  width: 44px; height: 44px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--electric);
  letter-spacing: -.02em;
}
.affil-tile .name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-soft);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.investor-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 40px;
}
.investor-logo-tile {
  min-height: 150px;
  padding: 28px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  transition: background .3s var(--ease);
}
.investor-logo-tile.is-featured {
  grid-column: 1 / -1;
  min-height: 168px;
}
.investor-logo-tile:hover {
  background: var(--bg-raised);
}
.investor-logo-tile img {
  display: block;
  max-width: min(210px, 80%);
  max-height: 62px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.investor-logo-tile.is-featured img {
  max-width: min(520px, 90%);
  max-height: 118px;
}
.investor-logo-tile span {
  display: none;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--fg);
}
.investor-logo-tile.has-label span {
  display: block;
}
.investor-subhead {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
#investors .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: transparent;
  border: 0;
  gap: 1px;
}
#investors .team-grid .member {
  border: 1px solid var(--rule);
  margin: -1px 0 0 -1px;
}
@media (max-width: 560px) {
  .investor-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .investor-logo-tile {
    min-height: 132px;
    padding: 24px 18px;
  }
}
@media (max-width: 430px) {
  .investor-logo-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------ Feed / list ------------ */
.feed {
  display: flex;
  flex-direction: column;
}
.feed-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  transition: padding .3s var(--ease);
  align-items: center;
  cursor: pointer;
}
.feed-item:last-child { border-bottom: 1px solid var(--rule); }
.feed-item:hover {
  padding-left: 16px;
}
.feed-item .date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.feed-item h4 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0 0 4px 0;
  transition: color .3s var(--ease);
}
.feed-item:hover h4 { color: var(--electric); }
.feed-item .authors {
  font-size: 13px;
  color: var(--fg-soft);
}
.feed-item .venue {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .feed-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .feed-item .venue { display: block; }
}

/* ------------ Press grid ------------ */
.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
/* MedARC community split (overrides the section's inline grid styles). */
@media (max-width: 900px) {
  .medarc-grid { grid-template-columns: 1fr !important; }
  .medarc-grid > div { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .medarc-detail-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 900px) { .press-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .press-grid { grid-template-columns: 1fr; } }
/* Let a lone trailing item stretch across the remaining columns so the grid
   never shows empty gray cells at the end of the last row. */
.press-item:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.press-item:last-child:nth-child(3n + 2) { grid-column: span 2; }
@media (max-width: 900px) {
  .press-item:last-child { grid-column: auto; }
  .press-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.press-item {
  padding: 28px;
  background: var(--bg);
  transition: background .3s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  cursor: pointer;
}
.press-item:hover { background: var(--bg-raised); }
.press-item .outlet {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--electric);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.press-item h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin: 0;
}
.press-item .meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

/* ------------ Footer ------------ */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--rule);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 16px 0;
  font-weight: 400;
}
.footer-col a {
  display: block;
  color: var(--fg-soft);
  font-size: 14px;
  margin-bottom: 8px;
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--electric); }
.footer-brand .wordmark {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -.03em;
  font-weight: 300;
  margin-bottom: 16px;
}
.footer-brand p {
  color: var(--fg-soft);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.5;
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer-meta .coords { display: flex; gap: 24px; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-meta { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ------------ Tweaks panel ------------ */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: color-mix(in oklab, var(--bg-panel) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  padding: 20px;
  z-index: 100;
  font-family: var(--font-body);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px var(--rule);
  transform: translateY(0);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.tweaks.hidden { display: none; }
.tweaks header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.tweaks h6 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 500;
}
.tweaks .close {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  color: var(--fg-soft);
  font-size: 14px;
  line-height: 1;
}
.tweak-group {
  margin-bottom: 16px;
}
.tweak-group label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.tweak-options {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tweak-options button {
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-soft);
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.tweak-options button:hover { border-color: var(--rule-strong); color: var(--fg); }
.tweak-options button.active {
  background: var(--electric);
  color: #05080f;
  border-color: var(--electric);
}
.tweak-group input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 13px;
}
.tweak-group input[type="text"]:focus {
  outline: none;
  border-color: var(--electric);
}

/* ------------ Utilities ------------ */
.mono { font-family: var(--font-mono); }
.reveal { opacity: 1; transform: none; }

/* scanline corner decorations */
.corner-mark {
  position: absolute;
  width: 20px; height: 20px;
  border: 1px solid var(--rule-strong);
}
.corner-mark.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.corner-mark.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.corner-mark.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.corner-mark.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* contact / cta band */
.cta-band {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 80px);
  letter-spacing: -.03em;
  font-weight: 300;
  line-height: 1.05;
  margin: 0 auto 32px;
  max-width: 14ch;
}
.cta-band h2 em {
  font-style: normal;
  color: var(--electric);
}
.cta-band .cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* standalone partner / hiring pages */
.simple-page {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 96px 0 120px;
}
.simple-hero {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 60px;
  padding: 80px 0;
  border-bottom: 1px solid var(--rule);
}
.simple-hero-centered {
  display: block;
  text-align: center;
}
.simple-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 96px);
  line-height: .98;
  font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 24px;
}
.simple-hero p {
  color: var(--fg-soft);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  max-width: 760px;
  margin: 0;
}
.simple-hero-centered p {
  max-width: none;
  margin: 0 auto;
}
.blog-index-page .simple-hero {
  grid-template-columns: 1fr;
}
.simple-panel {
  margin-top: 56px;
  border: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  padding: clamp(28px, 5vw, 56px);
}
.journal-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.journal-calendar-panel,
.journal-signup-panel {
  min-width: 0;
}
.journal-calendar-panel {
  display: grid;
  gap: 20px;
}
.journal-calendar-copy,
.journal-signup-copy {
  display: grid;
  gap: 10px;
}
.journal-calendar-copy h2,
.journal-signup-copy h2,
.form-success h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
}
.journal-signup-copy p,
.form-success p {
  margin: 0;
  color: var(--fg-soft);
  line-height: 1.55;
}
.journal-calendar-frame {
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px -52px rgba(8, 8, 42, .55);
}
.journal-calendar-frame iframe {
  display: block;
  width: 100%;
  height: clamp(540px, 68vh, 700px);
  border: 0;
  background: #fff;
}
.schedule-list {
  display: grid;
  gap: 16px;
}
.schedule-item {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--rule);
  background: var(--bg-raised);
}
.schedule-item span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.schedule-item strong {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--fg);
}
.schedule-item p {
  margin: 0;
  color: var(--fg-soft);
  line-height: 1.55;
}
.journal-calendar-group {
  margin-top: 24px;
  margin-bottom: 0;
}
.journal-calendar-group .community-calendar-options {
  width: 100%;
}
.journal-calendar-group .community-journal-link {
  flex: 1 1 145px;
  justify-content: center;
  text-align: center;
}
.journal-signup-panel {
  display: grid;
  gap: 24px;
}
.legal-page {
  width: min(1040px, calc(100% - 64px));
}
.legal-hero {
  grid-template-columns: minmax(160px, .75fr) minmax(0, 2fr);
}
.legal-document {
  color: var(--fg-soft);
  font-size: 16px;
  line-height: 1.68;
}
.legal-document h2 {
  margin: 42px 0 12px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
}
.legal-document h2:first-child {
  margin-top: 0;
}
.legal-document p {
  margin: 0 0 18px;
}
.legal-document ul {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding-left: 24px;
}
.legal-document li {
  padding-left: 4px;
}
.legal-document a {
  color: var(--electric);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-featured {
  margin-top: 56px;
}
.blog-featured-card,
.blog-post-card {
  color: inherit;
  text-decoration: none;
}
.blog-featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  border: 1px solid var(--rule);
  background: var(--bg);
  min-height: 420px;
  overflow: hidden;
}
.blog-featured-copy {
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 16px;
}
.blog-featured-card h2,
.blog-post-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--fg);
  transition: color .25s var(--ease);
}
.blog-featured-card h2 {
  font-size: clamp(32px, 4.4vw, 62px);
  line-height: 1;
  margin: 0 0 24px;
}
.blog-featured-card p,
.blog-post-card p {
  color: var(--fg-soft);
  line-height: 1.58;
}
.blog-featured-card p {
  max-width: 720px;
  font-size: 17px;
  margin: 0;
}
.blog-read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--electric);
}
.blog-featured-media,
.blog-post-media {
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
}
.blog-featured-media img,
.blog-post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease);
}
.blog-featured-card:hover h2,
.blog-post-card:hover h2 {
  color: var(--electric);
}
.blog-featured-card:hover img,
.blog-post-card:hover img {
  transform: scale(1.025);
}
.blog-subscribe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg-raised) 72%, transparent);
}
.blog-subscribe-copy {
  display: grid;
  gap: 8px;
  color: inherit;
}
.blog-subscribe-copy .blog-eyebrow {
  margin-bottom: 0;
}
.blog-subscribe-copy strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.08;
}
.blog-subscribe-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.blog-subscribe input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--fg);
  padding: 14px 16px;
  border-radius: 0;
  font: 15px var(--font-body);
  outline: none;
}
.blog-subscribe input:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--electric) 14%, transparent);
}
.blog-subscribe button {
  flex: 0 0 auto;
  border: 0;
}
.blog-post-grid {
  display: flex;
  flex-direction: column;
  margin-top: 48px;
  border: 1px solid var(--rule);
}
.blog-post-card {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  min-height: 220px;
}
.blog-post-card:last-child {
  border-bottom: 0;
}
.blog-post-media {
  min-height: 220px;
  padding: 16px;
  background: var(--bg);
}
.blog-post-media img {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
}
.blog-post-body {
  padding: clamp(24px, 3vw, 34px);
  display: flex;
  flex-direction: column;
}
.blog-post-card h2 {
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.08;
  margin: 0 0 16px;
}
.blog-post-card p {
  font-size: 14px;
  margin: 0;
}
.blog-post-card .blog-read-link {
  margin-top: auto;
  padding-top: 24px;
}
.blog-index-page .feed-item {
  color: inherit;
  text-decoration: none;
}
.blog-index-page .feed-item .venue span {
  color: var(--electric);
  margin-left: 8px;
}
@media (max-width: 900px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-featured-media {
    aspect-ratio: 16 / 9;
    order: -1;
  }
  .blog-subscribe {
    grid-template-columns: 1fr;
  }
  .blog-subscribe-actions {
    justify-content: stretch;
  }
  .blog-post-card {
    grid-template-columns: 1fr;
  }
  .blog-post-media {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}
@media (max-width: 620px) {
  .blog-subscribe-actions {
    flex-direction: column;
  }
  .blog-subscribe button {
    justify-content: center;
    width: 100%;
  }
}
.partner-form {
  display: grid;
  gap: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.partner-form label {
  display: grid;
  gap: 10px;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.partner-form input,
.partner-form textarea {
  width: 100%;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--fg);
  padding: 14px 16px;
  border-radius: 0;
  font: 16px var(--font-body);
  outline: none;
}
.partner-form textarea {
  resize: vertical;
  min-height: 160px;
}
.partner-form input:focus,
.partner-form textarea:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--electric) 14%, transparent);
}
.partner-form button {
  justify-self: start;
  border: 0;
  cursor: pointer;
}
.jobs-list {
  border: 1px solid var(--rule);
  margin-top: 56px;
}
.job-list-item {
  display: grid;
  gap: 14px;
  padding: clamp(28px, 5vw, 48px);
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  transition: background .25s var(--ease), padding-left .25s var(--ease);
}
.job-list-item:hover {
  background: var(--bg-raised);
  padding-left: clamp(32px, 6vw, 64px);
}
.job-list-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--electric);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.job-list-item strong {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
  font-weight: 400;
}
.job-list-item span:last-child {
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.5;
}
.jobs-note {
  max-width: 780px;
  margin: 28px 0 0;
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.6;
  text-align: left;
}
.jobs-note a {
  color: var(--electric);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* legacy standalone pages using the landing-page light shell */
.legacy-page #bg,
.distill-page .fixed-logo,
.distill-page .top-nav {
  display: none !important;
}
.legacy-page main,
.legacy-page footer,
.distill-page d-front-matter,
.distill-page d-title,
.distill-page d-byline,
.distill-page d-article,
.distill-page d-appendix,
.distill-page footer {
  position: relative;
  z-index: 1;
}
.legacy-page .topbar {
  display: none;
}
.legacy-page .job-posting-page,
.legacy-page .internal-main {
  width: min(920px, calc(100% - 64px));
  margin: 0 auto;
  padding: 88px 0 112px;
}
.legacy-page .job-content,
.legacy-page .internal-card {
  border-top: 1px solid var(--rule);
  padding-top: 56px;
}
.legacy-page .job-content h1,
.legacy-page .internal-card h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 32px;
  color: var(--fg);
}
.legacy-page .job-content h2,
.legacy-page .internal-card h2 {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--electric);
  margin: 56px 0 18px;
}
.legacy-page .job-content h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin: 40px 0 14px;
}
.legacy-page .job-content p,
.legacy-page .job-content li,
.legacy-page .internal-card p {
  color: var(--fg-soft);
  font-size: 18px;
  line-height: 1.65;
}
.legacy-page .job-content p,
.legacy-page .internal-card p {
  margin: 0 0 20px;
}
.legacy-page .job-content a,
.legacy-page .internal-card a {
  color: var(--electric);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legacy-page .job-content ul {
  padding-left: 1.2em;
  margin: 0 0 24px;
}
.legacy-page .job-content li {
  margin-bottom: 10px;
}
.legacy-page .seed-announcement-page {
  width: 100%;
  margin: 0;
  padding: 0 0 112px;
  background: #ffffff;
}
.legacy-page .seed-announcement-content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding-top: 0;
}
.legacy-page .seed-announcement-content h1 {
  width: 100%;
  max-width: none;
  margin: 0 0 56px;
  padding: 72px max(32px, calc((100vw - 1360px) / 2)) 56px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(32px, 3.35vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  background: #ffffff;
}
.legacy-page .seed-announcement-content h2 {
  max-width: 900px;
  margin: 56px auto 18px;
  padding-top: 8px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}
.legacy-page .seed-announcement-content h3 {
  max-width: 900px;
  margin: 36px auto 12px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}
.legacy-page .seed-announcement-content p {
  max-width: 900px;
  margin: 0 auto 20px;
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.65;
}
.legacy-page .seed-announcement-content a {
  color: var(--electric);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legacy-page .seed-announcement-content .quote-block {
  max-width: 940px;
  margin: 36px auto;
  padding: 22px 26px;
}
.legacy-page .seed-announcement-content .quote-block p {
  max-width: none;
  margin: 0 0 18px;
}
.legacy-page .seed-article-image {
  display: block;
  width: 100%;
  margin: 32px auto;
  border-radius: 8px;
}
.legacy-page .seed-article-image--illustration {
  max-width: 860px;
}
.legacy-page .seed-article-image--photo {
  max-width: 900px;
}
.legacy-page .apply-box,
.legacy-page .quote-block {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  padding: 24px;
  margin: 32px 0;
}
.legacy-page .apply-box p,
.legacy-page .quote-block p {
  margin: 0;
}
.legacy-page .quote-block {
  border-left: 3px solid var(--electric);
  color: var(--fg-soft);
  font-style: italic;
}
.legacy-page .quote-block cite {
  display: block;
  margin-top: 16px;
  color: var(--fg);
  font-style: normal;
  text-align: right;
}
.legacy-page .internal-form,
.legacy-page .partner-form {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
.legacy-page .internal-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.legacy-page .internal-form input {
  width: 100%;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--fg);
  padding: 14px 16px;
  font: 16px var(--font-body);
}
.legacy-page .internal-form .btn,
.legacy-page .job-content .btn {
  justify-self: start;
}
.legacy-page .internal-status {
  color: var(--fg-soft);
}
.legacy-page .internal-error {
  color: #b4233a;
}
.legacy-page .internal-hidden {
  display: none;
}
.legacy-page footer {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.legacy-page .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  color: var(--fg-soft);
  font-size: 14px;
}
.legacy-page .footer-links a {
  color: var(--fg-soft);
}
.legacy-page .footer-links a:hover {
  color: var(--electric);
}
.legacy-page .copyright {
  margin: 24px 0 0;
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.distill-page {
  background: var(--bg) !important;
  color: var(--fg) !important;
}
.distill-page d-title {
  background: #ffffff !important;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 0 !important;
  padding: 72px 0 56px !important;
}
.distill-page d-title::before {
  display: none !important;
}
.distill-page d-title h1 {
  color: var(--fg) !important;
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}
.distill-page d-byline,
.distill-page d-article,
.distill-page d-appendix {
  background: #ffffff !important;
  color: var(--fg-soft) !important;
}
.distill-page d-article {
  margin-bottom: 0 !important;
  padding-bottom: 48px !important;
}
.distill-page d-article::after {
  content: "";
  display: block;
  clear: both;
}
.distill-page d-article + d-appendix {
  clear: both;
  margin-top: 0 !important;
  padding-top: 48px !important;
}
.distill-page d-appendix pre,
.distill-page d-appendix code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.blog-page main {
  background: #ffffff;
}
.distill-page d-article h2,
.distill-page d-article h3 {
  color: var(--fg) !important;
}
.distill-page d-article a,
.distill-page d-appendix a {
  color: var(--electric) !important;
}
.distill-page .title-buttons a {
  background: transparent !important;
  color: var(--electric) !important;
  border-color: var(--rule-strong) !important;
}
.distill-page .scrollable-table,
.distill-page table {
  background: var(--bg) !important;
  color: var(--fg-soft) !important;
}
.distill-page .toc-header,
.distill-page .toc-content,
.distill-page d-contents,
.distill-page d-contents > nav {
  background: transparent !important;
  color: var(--fg) !important;
}
.distill-page d-contents a,
.distill-page d-contents nav a,
.distill-page .toc-content a {
  color: var(--fg) !important;
}
.distill-page d-contents,
.distill-page d-contents > nav,
.distill-page d-contents .toc-content,
.distill-page d-contents ul {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.distill-page d-contents ul {
  padding-left: 24px !important;
}
.distill-page d-contents .toc-content > div {
  margin: 0 !important;
  padding: 0 !important;
}
.distill-page d-article > d-contents {
  margin-top: -1.5rem !important;
}
.distill-page d-contents + * {
  margin-top: 0 !important;
}
.distill-page pre,
.distill-page .table-container {
  max-width: 100%;
  overflow-x: auto;
}
@media (max-width: 760px) {
  .simple-page {
    width: min(100% - 32px, 1180px);
    padding: 56px 0 88px;
  }
  .journal-page {
    width: 100%;
  }
  .simple-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 0;
  }
  .journal-page-grid { grid-template-columns: 1fr; }
  .journal-calendar-frame iframe { height: clamp(460px, 70vh, 560px); }
  .form-row { grid-template-columns: 1fr; }
  .legacy-page .job-posting-page,
  .legacy-page .internal-main,
  .legacy-page footer {
    width: min(100% - 32px, 920px);
  }
}
@media (max-width: 520px) {
  .simple-panel.journal-page-grid {
    width: calc(100vw - 16px);
    margin-left: calc(50% - 50vw + 8px);
    margin-right: calc(50% - 50vw + 8px);
    padding: 12px;
  }
  .journal-calendar-frame {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .journal-calendar-frame iframe {
    min-width: 320px;
  }
  .journal-calendar-group .community-calendar-options {
    display: grid;
    width: 100%;
  }
  .journal-calendar-group .community-journal-link {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .journal-calendar-group .community-journal-link:last-child {
    border-bottom: 0;
  }
}

/* bar chart for evals */
.bar-chart { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 16px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-soft); }
.bar-row .label { flex: 0 0 60px; color: var(--fg-mute); }
.bar-row .bar { flex: 1; height: 6px; background: var(--rule); position: relative; border-radius: 2px; }
.bar-row .bar-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--electric); border-radius: 2px; animation: bar-grow 1.2s var(--ease-out) both; }
@keyframes bar-grow { from { width: 0 !important; } }
.bar-row .val { flex: 0 0 40px; color: var(--fg); text-align: right; }

/* wave for brainmarks */
.wave-viz { width: 100%; height: 100%; }
.wave-viz path { fill: none; stroke: var(--electric); stroke-width: 1.2; }
.wave-viz path.faint { stroke: var(--fg-mute); opacity: .4; }

/* scanning for pathology */
.scan-viz { position: relative; width: 100%; height: 100%; overflow: hidden; }
.scan-viz::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--electric), transparent);
  animation: scan 2.5s ease-in-out infinite;
  box-shadow: 0 0 20px var(--electric);
}
body.motion-low .scan-viz::after { animation: none; opacity: .3; }
@keyframes scan {
  0%, 100% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  50% { top: 100%; opacity: 1; }
  60% { opacity: 0; }
}
.tile-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 1px;
}
.tile-grid div {
  background: color-mix(in oklab, var(--electric) 10%, transparent);
  opacity: 0;
  animation: tile-flick 3s ease-in-out infinite;
}
body.motion-low .tile-grid div { animation: none; opacity: .1; }
@keyframes tile-flick {
  0%, 85%, 100% { opacity: 0; }
  5%, 15% { opacity: .8; }
}

/* ============================================================
   Interpretability overlay — editorial footnote cards anchored to
   the network's hidden + output nodes, cycling individually so a
   handful are on screen at any time. Lives inside .upr-flow next
   to the modality/application columns; no scroll trigger.
   ============================================================ */
.upr-flow { --interp-ease: cubic-bezier(.16,1,.3,1); }

g.upr-interp-lines { pointer-events: none; }
.upr-interp-cards {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* Connector: hairline static line + a single traveling dash segment
   that ticks from the source node toward the card edge — same
   vocabulary as the network's .upr-edge-dot animation, repurposed
   as a one-shot "this is where this annotation came from" cue.    */
.upr-interp-line {
  stroke: var(--electric);
  stroke-width: 1.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: uprInterpLineCycle 12.8s linear infinite;
  animation-delay: var(--card-delay, 0s);
}
.upr-interp-pulse {
  fill: var(--electric);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: uprInterpPulseCycle 12.8s var(--interp-ease) infinite;
  animation-delay: var(--card-delay, 0s);
}
.upr-interp-pulse-ring {
  fill: none;
  stroke: var(--electric);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: uprInterpRingCycle 12.8s var(--interp-ease) infinite;
  animation-delay: var(--card-delay, 0s);
}

/* Card: editorial footnote — same DNA as .card and .upr-data-card.
   Solid panel ground over the cream, hairline rule border, mono
   kicker tag with electric dot, hairline divider, then serif body
   text and a mono telemetry value beneath.                        */
.upr-interp-card {
  position: absolute;
  box-sizing: border-box;
  padding: 12px 14px 13px;
  background: var(--bg-panel);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font-family: var(--font-body);
  color: var(--fg);
  box-shadow:
    0 1px 0 0 color-mix(in oklab, var(--electric) 8%, transparent),
    0 14px 32px -22px color-mix(in oklab, var(--fg) 55%, transparent);
  opacity: 0;
  transform: translateY(8px);
  animation: uprInterpCardCycle 12.8s var(--interp-ease) infinite;
  animation-delay: var(--card-delay, 0s);
}
.upr-interp-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.upr-interp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--electric);
  flex-shrink: 0;
}
.upr-interp-rule {
  height: 1px;
  background: var(--rule);
  margin: 8px 0 7px;
}
.upr-interp-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.012em;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.upr-interp-value {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--fg-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 12.8s cycle = 4 groups × 3.2s. Each group occupies exactly one
   phase block. Fade in/out mirror the connector pulse's rise/fall
   timing (~0.7s on the 64s flow cycle) so all four animations
   breathe at the same rate. ~6% of the 12.8s interp cycle ≈ 770ms.  */
@keyframes uprInterpLineCycle {
  0%        { opacity: 0; }
  6%, 19%   { opacity: 1; }
  25%, 100% { opacity: 0; }
}
@keyframes uprInterpPulseCycle {
  0%        { opacity: 0;   transform: scale(.6);  }
  6%        { opacity: .85; transform: scale(1.3); }
  19%       { opacity: .85; transform: scale(1.3); }
  25%, 100% { opacity: 0;   transform: scale(.6);  }
}
@keyframes uprInterpRingCycle {
  0%        { opacity: 0;   transform: scale(1);   }
  6%        { opacity: .55; transform: scale(1.4); }
  19%       { opacity: 0;   transform: scale(3);   }
  100%      { opacity: 0;   transform: scale(1);   }
}
@keyframes uprInterpCardCycle {
  0%        { opacity: 0; transform: translateY(6px);  }
  6%, 19%   { opacity: 1; transform: translateY(0);    }
  25%, 100% { opacity: 0; transform: translateY(-3px); }
}

@media (max-width: 980px) {
  /* Vertical UPR layout already cramps the diagram — hide the
     overlay there so the section reads as the original UPR. */
  .upr-interp-cards,
  g.upr-interp-lines  { display: none; }
}

body.motion-low .upr-interp-cards,
body.motion-low g.upr-interp-lines { display: none; }

/* ============================================================
   Performance — freeze diagram animations while the UPR section
   is off-screen. The vision diagram animates ~hundreds of SVG
   elements concurrently; on slow CPUs this is the dominant
   repaint cost when it isn't even visible.
   ============================================================ */
#upr.upr-offscreen .upr-connector,
#upr.upr-offscreen .upr-connector-glow,
#upr.upr-offscreen .upr-data-sync,
#upr.upr-offscreen .upr-card-sync,
#upr.upr-offscreen .upr-input-anchor-active,
#upr.upr-offscreen .upr-output-anchor-active,
#upr.upr-offscreen .upr-core-input,
#upr.upr-offscreen .upr-core-hidden,
#upr.upr-offscreen .upr-core-output,
#upr.upr-offscreen .upr-ring.pulse,
#upr.upr-offscreen .upr-interp-line,
#upr.upr-offscreen .upr-interp-pulse,
#upr.upr-offscreen .upr-interp-pulse-ring,
#upr.upr-offscreen .upr-interp-card {
  animation-play-state: paused;
}
