/* Nitrogenase: a 4.5-billion-year story. Each era has its own palette;
   sections blend from the previous era's color into their own. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("fonts/alegreya-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("fonts/alegreya-italic-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Alegreya", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4rem;
  --night: #07050d;
  --from: #0b0f14;
  --bg: #0b0f14;
  --bg2: #0b0f14;
  --ink: #eef3f7;
  --muted: #a8b4bf;
  --accent: #ff6f98;
  --accent-2: #6fd3ff;
  --line: rgba(238, 243, 247, 0.16);
  --panel: rgba(255, 255, 255, 0.045);
  color-scheme: dark;
}

/* Era palettes */
.era-archean   { --from: #2b1237; --bg: #120a24; --bg2: #1d1036; --ink: #efeaff; --muted: #b3aad3; --accent: #9fd3ff; --accent-2: #ff7a3c; }
.era-life      { --from: #1d1036; --bg: #082129; --bg2: #0a3340; --ink: #e7f7f4; --muted: #9cc6c0; --accent: #5ee0c2; --accent-2: #f2c14e; }
.era-oxygen    { --from: #0a3340; --bg: #2a0f0a; --bg2: #43170e; --ink: #fff0ea; --muted: #e2b3a4; --accent: #ff8a55; --accent-2: #8fd1ff; }
.era-free      { --from: #43170e; --bg: #052433; --bg2: #073b4f; --ink: #e5f4f9; --muted: #9cc2d0; --accent: #3fd0c9; --accent-2: #f2c14e; }
.era-plants    { --from: #073b4f; --bg: #0b1d12; --bg2: #12301c; --ink: #edf7ee; --muted: #a7c7af; --accent: #7ddb8f; --accent-2: #ff6f98; }
.era-discovery { --from: #12301c; --bg: #efe5cf; --bg2: #e5d6b6; --ink: #2a2118; --muted: #6a5640; --accent: #8a4b22; --accent-2: #b5345c; --line: rgba(42, 33, 24, 0.2); --panel: rgba(255, 255, 255, 0.5); color-scheme: light; }
.era-industry  { --from: #e5d6b6; --bg: #16181c; --bg2: #262a31; --ink: #f6f1e9; --muted: #bdb5aa; --accent: #ffb547; --accent-2: #ff6a1a; }
.era-now       { --from: #262a31; --bg: #0b1016; --bg2: #0e1720; --ink: #eef3f7; --muted: #a6b4c1; --accent: #ff6f98; --accent-2: #6fd3ff; }
.zone-enzyme   { --from: #0e1720; --bg: #0d1520; --bg2: #0a1119; --ink: #eef3f7; --muted: #a6b4c1; --accent: #ff6f98; --accent-2: #6fd3ff; }
.zone-nfix     { --from: #0a1119; --bg: #072a2f; --bg2: #0a3a40; --ink: #e6f7f6; --muted: #9dc8c5; --accent: #5ee0c2; --accent-2: #f2c14e; }
.zone-ref      { --from: #0a3a40; --bg: #f3f5f6; --bg2: #f3f5f6; --ink: #14181c; --muted: #56616b; --accent: #b5345c; --accent-2: #3f5b70; --line: rgba(20, 24, 28, 0.14); --panel: #ffffff; color-scheme: light; }
.zone-ref--tail { --from: #f3f5f6; }
@media (prefers-color-scheme: dark) {
  .zone-ref      { --bg: #11161b; --bg2: #11161b; --ink: #e9eef2; --muted: #a5b0ba; --accent: #ff86a6; --accent-2: #9fbad0; --line: rgba(233, 238, 242, 0.14); --panel: rgba(255, 255, 255, 0.04); color-scheme: dark; }
  .zone-ref--tail { --from: #11161b; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 430;
  line-height: 1.62;
  font-variant-numeric: lining-nums;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
}
p, ul, ol, dl, figure { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 700; font-stretch: 100%; line-height: 1.25; letter-spacing: -0.005em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
sub, sup { font-size: 0.68em; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.55rem 1rem; border-radius: 999px; background: #fff; color: #120b24; font-family: var(--display); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 0.75rem; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  color: #f1eeff;
  background: rgba(7, 5, 13, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { position: absolute; } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem 2rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: #fff; font-family: var(--display); font-size: 1.15rem; font-weight: 750; font-stretch: 112%; letter-spacing: -0.01em; text-decoration: none; }
.brand-mark { width: 2.3rem; height: 1.05rem; flex: none; }
.mark-atom { fill: #f1eeff; }
.mark-bar { fill: #ff6f98; }
.site-nav ul { display: flex; gap: 0.25rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding-block: 0.45rem; border-bottom: 2px solid transparent; color: rgba(241, 238, 255, 0.72); font-family: var(--display); font-size: 0.95rem; font-weight: 550; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="true"] { color: #fff; border-bottom-color: #ff6f98; }
@media (max-width: 860px) {
  :root { --header-h: 6rem; }
  .site-header .wrap { flex-wrap: wrap; padding-top: 0.55rem; }
  .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: 1.2rem; padding-right: 2.5rem; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.45rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 104%;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.15s ease, box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease; }
  .btn:hover { transform: translateY(-1px); }
}
.btn--glow { background: linear-gradient(95deg, #a9dcff, #d9c6ff 60%, #ffc2d4); color: #120b24; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 12px 40px -10px rgba(159, 211, 255, 0.7); }
.btn--glow:hover { color: #120b24; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 16px 54px -8px rgba(159, 211, 255, 0.9); }
.btn--ghost { border-color: color-mix(in srgb, currentColor 40%, transparent); color: inherit; }
.btn--ghost:hover { border-color: currentColor; color: inherit; }
.btn--small { min-height: 2.4rem; padding: 0.35rem 1rem; font-size: 0.92rem; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { color: var(--bg); }
.btn:disabled { opacity: 0.35; cursor: default; transform: none; }
.actions, .hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.story .actions { margin-top: 1.75rem; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #f1eeff;
  background:
    radial-gradient(70% 55% at 78% 108%, rgba(255, 106, 31, 0.42), transparent 62%),
    radial-gradient(60% 50% at 10% -5%, rgba(124, 82, 230, 0.34), transparent 65%),
    linear-gradient(180deg, #05040b 0%, #110a24 52%, #2b1237 100%);
}
.hero-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; cursor: crosshair; }
.hero-land { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; width: 100%; height: 26vh; min-height: 120px; pointer-events: none; }
.hero-inner { padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(3.5rem, 12vh, 7.5rem); pointer-events: none; }
.hero-inner a { pointer-events: auto; }
.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 10.6vw, 10.2rem);
  font-weight: 800;
  font-stretch: 116%;
  line-height: 0.86;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #ffffff 35%, #cdbff7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px rgba(159, 211, 255, 0.22));
}
.hero-sub { max-width: 38ch; margin-top: 1.5rem; color: #ddd6f6; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); font-weight: 450; line-height: 1.38; }
.hero-actions { margin-top: 2rem; }
.hero-hint { position: absolute; right: var(--gutter); bottom: 1.1rem; margin: 0; color: rgba(241, 238, 255, 0.6); font-family: var(--display); font-size: 0.82rem; font-weight: 500; pointer-events: none; }

/* Timeline rail */
.rail {
  position: fixed;
  left: 1.1rem;
  top: 50%;
  z-index: 55;
  transform: translateY(-50%);
  padding: 0.9rem 1rem 0.9rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(7, 5, 13, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.rail.is-on { opacity: 1; visibility: visible; }
.rail ol { position: relative; display: grid; gap: 0.95rem; margin: 0; padding: 0; list-style: none; }
.rail ol::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: rgba(255, 255, 255, 0.2); }
.rail a { position: relative; display: flex; align-items: center; gap: 0.7rem; color: rgba(241, 238, 255, 0.5); font-family: var(--display); font-size: 0.8rem; font-weight: 600; font-stretch: 88%; text-decoration: none; }
.rail a:hover, .rail a:focus-visible { color: #fff; }
.rail-dot { width: 11px; height: 11px; flex: none; border: 1.5px solid currentColor; border-radius: 50%; background: #0b0718; }
.rail-name { position: absolute; left: calc(100% + 0.9rem); padding: 0.25rem 0.6rem; border-radius: 999px; background: rgba(7, 5, 13, 0.85); color: #fff; font-stretch: 100%; white-space: nowrap; opacity: 0; transform: translateX(-4px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.rail a:hover .rail-name, .rail a:focus-visible .rail-name { opacity: 1; transform: none; }
.rail a[aria-current="step"] { color: #fff; }
.rail a[aria-current="step"] .rail-dot { border-color: var(--rail-accent, #ff6f98); background: var(--rail-accent, #ff6f98); box-shadow: 0 0 12px var(--rail-accent, #ff6f98); }
@media (max-width: 1399px) { .rail { display: none; } }

/* Scenes and zones */
.scene, .zone {
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding-block: clamp(5rem, 11vw, 9.5rem);
  color: var(--ink);
  background: linear-gradient(180deg, var(--from) 0, var(--bg) 18rem, var(--bg2) 100%);
}
.era-discovery, .zone-ref { font-weight: 400; }
.stamp { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.25rem 1.1rem; }
.stamp-num {
  padding-right: 0.04em;
  font-family: var(--display);
  font-size: clamp(5.5rem, 16vw, 13.5rem);
  font-weight: 800;
  font-stretch: 70%;
  line-height: 0.8;
  letter-spacing: -0.035em;
  background: linear-gradient(172deg, var(--ink) 8%, var(--accent) 58%, var(--accent-2) 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stamp-unit { max-width: 17ch; padding-bottom: 0.5em; color: var(--muted); font-family: var(--display); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem); font-weight: 500; line-height: 1.2; }
.stamp-unit:empty { display: none; }
.scene h2 {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.5rem);
  font-weight: 750;
  font-stretch: 108%;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.scene-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-top: clamp(2.25rem, 5vw, 3.75rem);
}
.scene--flip .art { order: 2; }
.art { position: relative; margin: 0; }
@media (min-width: 921px) {
  .scene-body { align-items: start; }
  .art { position: sticky; top: calc(var(--header-h) + 2.5rem); }
}
.art-svg { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: 0 40px 90px -35px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.07); }
.era-discovery .art-svg { max-width: 26rem; margin-inline: auto; border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(60, 40, 20, 0.45), 0 0 0 1px rgba(42, 33, 24, 0.12); }
.story { max-width: 37rem; }
.story-lede { color: var(--ink); font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem); font-weight: 560; line-height: 1.3; letter-spacing: -0.005em; }
.story > * + * { margin-top: 1.05em; }
.story > p:not(.story-lede) { color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
@media (max-width: 920px) {
  .scene-body { grid-template-columns: 1fr; }
  .scene--flip .art { order: 0; }
  .art { margin-inline: calc(var(--gutter) * -0.5); }
}

/* Illustration labels and motion */
.lbl text { font-family: var(--display); font-size: 17px; font-weight: 650; paint-order: stroke; stroke: rgba(5, 4, 12, 0.7); stroke-width: 4px; stroke-linejoin: round; }
.lbl text:not([fill]) { fill: #f6f3ff; }
.lbl text.sub { font-size: 14.5px; font-weight: 550; }
.lbl text.sub:not([fill]) { fill: rgba(246, 243, 255, 0.86); }
.plate { fill: #6a5640; font-family: var(--serif); font-size: 14px; font-style: italic; }
@media (prefers-reduced-motion: no-preference) {
  .is-visible .bolt { animation: bolt 6.5s linear infinite; }
  .is-visible .drift { animation: drift 16s ease-in-out infinite alternate; }
  .is-visible .plume { animation: drift 11s ease-in-out infinite alternate-reverse; }
  .is-visible .bob { animation: bob 5.5s ease-in-out infinite alternate; }
  .is-visible .sway { animation: sway 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
  .is-visible .pulse { animation: pulse 3.6s ease-in-out infinite; }
  .is-visible .pulse-soft { animation: pulse-soft 4.2s ease-in-out infinite; }
  .is-visible .shimmer { animation: shimmer 7s ease-in-out infinite alternate; }
}
@keyframes bolt { 0%, 58%, 100% { opacity: 0; } 59% { opacity: 1; } 60.5% { opacity: 0.2; } 62% { opacity: 1; } 68% { opacity: 0.85; } 74% { opacity: 0; } }
@keyframes drift { from { transform: translate(-6px, 4px); } to { transform: translate(8px, -6px); } }
@keyframes bob { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes pulse-soft { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes shimmer { from { opacity: 0.04; } to { opacity: 0.1; } }
.io .ink .draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.io .is-visible .ink .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 2.8s cubic-bezier(0.3, 0.6, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { .io .ink .draw { stroke-dasharray: none; stroke-dashoffset: 0; } }

/* Reaction */
.eq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 0.7rem; padding: 1.25rem 1.3rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); font-family: var(--display); }
.eq .side { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.9rem 0.7rem; }
.eq .term { display: flex; flex-direction: column; align-items: center; text-align: center; }
.eq .t, .eq .op { font-size: clamp(1.45rem, 1.1rem + 1vw, 1.95rem); font-weight: 650; font-stretch: 92%; line-height: 1.15; white-space: nowrap; }
.eq .op { color: var(--muted); font-weight: 400; }
.eq .op--arrow { color: var(--accent); }
.eq .note { max-width: 10ch; margin-top: 0.4rem; padding-top: 0.3rem; border-top: 2px solid var(--accent); color: var(--muted); font-family: var(--display); font-size: 0.78rem; font-weight: 500; line-height: 1.2; }
.story .eq-note { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 600px) {
  .eq { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem 1rem; align-items: center; }
  .eq .side, .eq .term { display: contents; }
  .eq .op { display: none; }
  .eq .op--arrow { display: block; grid-column: 1 / -1; font-size: 1.6rem; line-height: 1; }
  .eq .t { justify-self: start; }
  .eq .note { max-width: none; margin: 0; padding: 0.1rem 0 0.1rem 0.7rem; border-top: 0; border-left: 2px solid var(--accent); text-align: left; font-size: 0.9rem; }
}

/* Oxygen tactics */
.tactics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.75rem; }
.tactics dt { color: var(--accent); font-family: var(--display); font-size: 1.02rem; font-weight: 700; }
.tactics dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.5; }
@media (max-width: 560px) { .tactics { grid-template-columns: 1fr; } }

/* Ordered sequences (nodule, Fe-protein cycle) */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 1.05rem 2.9rem; counter-increment: step; font-size: 1.05rem; line-height: 1.5; color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  display: grid; place-items: center;
  width: 1.95rem; height: 1.95rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--bg2);
  color: var(--accent);
  font-family: var(--display); font-size: 0.95rem; font-weight: 700;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: calc(0.975rem - 1px); top: 2.05rem; bottom: 0.15rem; width: 2px; background: var(--line); }
.steps b { color: var(--ink); font-family: var(--display); font-weight: 700; }

.scene-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4.5rem); margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.scene-foot h3 { color: var(--accent); }
.scene-foot p { margin-top: 0.5rem; color: color-mix(in srgb, var(--ink) 86%, var(--bg)); font-size: 1.05rem; }
@media (max-width: 760px) { .scene-foot { grid-template-columns: 1fr; } }

/* Discovery cards */
.cards { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.cards li { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 1rem; padding: 0.95rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 3px; background: var(--panel); }
.card-year { color: var(--accent); font-family: var(--display); font-size: 1.9rem; font-weight: 800; font-stretch: 74%; line-height: 1; }
.card-text { font-size: 1.04rem; line-height: 1.45; }

/* Big number */
.bigstat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem clamp(1.5rem, 4vw, 3rem); margin: clamp(3rem, 7vw, 5.5rem) 0; padding-block: clamp(1.5rem, 3vw, 2.5rem); border-block: 1px solid var(--line); }
.bigstat-num { font-family: var(--display); font-size: clamp(6rem, 19vw, 15rem); font-weight: 850; font-stretch: 66%; line-height: 0.78; letter-spacing: -0.04em; background: linear-gradient(180deg, #fff3d8 0%, var(--accent) 52%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bigstat-text { max-width: 24ch; font-size: clamp(1.3rem, 1rem + 1.1vw, 1.9rem); font-weight: 560; line-height: 1.28; }
@media (max-width: 640px) { .bigstat { grid-template-columns: 1fr; } }

/* Budget chart */
.budget { padding: clamp(1.25rem, 3vw, 1.9rem); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.budget-title { font-family: var(--display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.budget-unit { margin-top: 0.3rem; color: var(--muted); font-size: 0.98rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 0.9rem; color: var(--muted); font-family: var(--display); font-size: 0.85rem; }
.legend span::before { content: ""; display: inline-block; width: 0.8rem; height: 0.8rem; margin-right: 0.45rem; border-radius: 2px; background: #5ee0c2; vertical-align: -0.08em; }
.legend .other::before { background: var(--accent); }
.bars { display: grid; gap: 0.7rem; margin-top: 1.3rem; }
.bar { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); gap: 0.2rem 1rem; align-items: center; }
.bar dt { font-family: var(--display); font-size: 0.92rem; font-weight: 500; line-height: 1.2; }
.bar dd { display: flex; align-items: center; gap: 0.55rem; margin: 0; }
.bar .fill { display: block; flex: 0 0 calc(var(--v) / 140 * 84%); min-width: 3px; height: 1.1rem; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, #2fae95, #5ee0c2); box-shadow: 0 0 18px -4px rgba(94, 224, 194, 0.7); }
.bar--other .fill { background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 18px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
.bar .val { font-family: var(--display); font-size: 1.05rem; font-weight: 750; font-stretch: 90%; }
.budget-total { margin-top: 1.25rem; padding-top: 0.9rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.98rem; }
@media (max-width: 560px) { .bar { grid-template-columns: 1fr; } }

/* Shared layout pieces */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.spaced { margin-top: 2.25rem; }
.split p { margin-top: 0.55rem; }
.section-head { max-width: 50rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.zone h2, .h2-sub { font-family: var(--display); font-size: clamp(2.2rem, 1.4rem + 3vw, 3.9rem); font-weight: 750; font-stretch: 106%; line-height: 1; letter-spacing: -0.03em; }
.h2-small { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem) !important; }
.section-lede { margin-top: 1rem; color: var(--muted); font-size: 1.22rem; line-height: 1.5; max-width: 46rem; }
.subblock { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.subblock > .section-lede { margin-bottom: 2.25rem; }
.prose-p { max-width: 66ch; margin-top: 0.5rem; }
.small-note { max-width: 70ch; margin-top: 1rem; color: var(--muted); font-size: 1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.cols h3 { color: var(--accent); }
.cols p { margin-top: 0.5rem; color: color-mix(in srgb, var(--ink) 86%, var(--bg)); font-size: 1.05rem; }

/* Tables */
.table-wrap { margin-top: 1.1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: 1rem; line-height: 1.4; }
th, td { padding: 0.75rem 1rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { border-top: 0; color: var(--ink); font-family: var(--display); font-size: 1rem; font-weight: 700; }
tbody th { width: 26%; color: var(--muted); font-family: var(--display); font-size: 0.9rem; font-weight: 550; }
@media (max-width: 600px) { table { min-width: 0; font-size: 0.92rem; } th, td { padding: 0.6rem 0.55rem; } tbody th { width: auto; } }

/* Milestones */
.milestones { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; margin: clamp(3.5rem, 7vw, 5rem) 0 0; padding: 0; list-style: none; }
.milestones::before { content: ""; position: absolute; left: 0; right: 0; top: 0.42rem; height: 2px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); opacity: 0.7; }
.milestones li { position: relative; padding-top: 1.9rem; }
.milestones li::before { content: ""; position: absolute; left: 0; top: 0; width: 0.95rem; height: 0.95rem; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg2); box-shadow: 0 0 14px var(--accent); }
.ms-year { display: block; font-family: var(--display); font-size: 2.3rem; font-weight: 800; font-stretch: 74%; line-height: 1; }
.ms-text { display: block; margin-top: 0.45rem; color: var(--muted); font-size: 1rem; line-height: 1.45; }
@media (max-width: 920px) {
  .milestones { grid-template-columns: 1fr; gap: 1.4rem; }
  .milestones::before { left: 0.42rem; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .milestones li { padding: 0 0 0 2.2rem; }
}

/* Electron path figure (enzyme zone) */
.eflow { margin-bottom: clamp(3rem, 6vw, 4rem); padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(120% 120% at 50% 0%, rgba(111, 211, 255, 0.08), transparent 60%), var(--panel); }
.eflow-track { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1fr); align-items: start; }
.node { padding-inline: 0.25rem; text-align: center; }
.node .cluster { display: block; width: auto; height: 5.2rem; max-width: 100%; margin: 0 auto 0.8rem; filter: drop-shadow(0 0 10px rgba(255, 180, 120, 0.35)); }
.node-name { font-family: var(--display); font-size: 1rem; font-weight: 700; line-height: 1.25; }
.node-sub { margin-top: 0.25rem; color: var(--muted); font-size: 0.92rem; line-height: 1.35; }
.hop { display: flex; flex-direction: column; align-items: center; margin-top: 1.6rem; padding-inline: 0.15rem; color: var(--accent); font-family: var(--display); font-size: 0.95rem; font-weight: 700; line-height: 1; }
.hop svg { width: 2.4rem; height: 0.75rem; margin-top: 0.3rem; overflow: visible; }
.hop path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fig-caption { max-width: 72ch; margin-top: 1.5rem; color: var(--muted); font-size: 0.95rem; }
.b path { fill: none; stroke: #cfe3f0; stroke-width: 1.4; stroke-linecap: round; opacity: 0.55; }
.b--back path { opacity: 0.25; }
.a-fe { fill: #ff8a5c; }
.a-s { fill: #ffd25e; }
.a-s--hub { stroke: #0d1520; stroke-width: 1; }
.a-mo { fill: #8fc7ff; }
.a-c { fill: #ffffff; }
.badge { fill: none; stroke: rgba(238, 243, 247, 0.4); stroke-width: 1.5; stroke-dasharray: 3 3; }
.badge--product { stroke: var(--accent); stroke-dasharray: none; }
.badge-t { fill: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 700; text-anchor: middle; }
.badge-t--product { font-size: 15px; }
.badge-sup, .badge-sub { font-size: 11px; }
.key { white-space: nowrap; }
.key::before { content: ""; display: inline-block; width: 0.65em; height: 0.65em; margin-right: 0.3em; border-radius: 50%; vertical-align: 0.02em; }
.key--fe::before { background: #ff8a5c; }
.key--s::before { background: #ffd25e; }
.key--mo::before { background: #8fc7ff; }
.key--c::before { background: #ffffff; }
@media (max-width: 760px) {
  .eflow-track { display: flex; flex-direction: column; align-items: stretch; }
  .node { display: grid; grid-template-columns: 5rem minmax(0, 1fr); column-gap: 1rem; align-items: center; text-align: left; }
  .node .cluster { grid-row: span 2; width: 100%; height: auto; max-height: 3.6rem; margin: 0; }
  .node-name { align-self: end; }
  .node-sub { align-self: start; }
  .hop { flex-direction: row; gap: 0.5rem; margin: 0.5rem 0 0.5rem 1.75rem; }
  .hop svg { width: 1.6rem; margin: 0; transform: rotate(90deg); }
}

/* E-state stepper */
.stepper { padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.stepper h3 { color: var(--ink); }
.stepper-intro { margin-top: 0.5rem; color: var(--muted); font-size: 1rem; }
.estates { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.estates > li + li { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.js .estates { min-height: 9.5rem; }
.js .estates > li { display: none; margin: 0; padding: 0; border: 0; }
.js .estates > li.is-current { display: block; }
.estate-name { font-family: var(--display); font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.estate-name + p { margin-top: 0.4rem; color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.meter { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.35rem; margin-top: 1.25rem; }
.meter span { height: 0.7rem; border: 1px solid var(--line); border-radius: 3px; }
.meter span.on { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
@media (prefers-reduced-motion: no-preference) { .meter span { transition: background-color 0.25s ease, box-shadow 0.25s ease; } }
.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem 1rem; margin-top: 0.9rem; }
.counters dt { color: var(--muted); font-family: var(--display); font-size: 0.8rem; line-height: 1.2; }
.counters dd { margin: 0; font-family: var(--display); font-size: 1.6rem; font-weight: 750; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 480px) { .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stepper-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.stepper-controls .buttons { display: flex; gap: 0.6rem; }
.stepper-controls .btn { border-color: color-mix(in srgb, var(--ink) 40%, transparent); color: var(--ink); }
.stepper-controls .btn--primary { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.step-pos { color: var(--muted); font-family: var(--display); font-size: 0.9rem; }

/* NFixDB */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.75rem 1.25rem; margin-top: 1.75rem; font-size: 1.02rem; }
.facts dt { color: var(--accent); font-family: var(--display); font-size: 0.95rem; font-weight: 700; }
.facts dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: 0.15rem; } .facts dd { margin-bottom: 0.6rem; } }
.linklist { margin: 0.9rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.linklist li { border-bottom: 1px solid var(--line); }
.linklist a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.1rem 1rem; padding: 0.85rem 0.1rem; color: var(--ink); font-family: var(--display); font-weight: 650; text-decoration: none; }
.linklist a span { color: var(--muted); font-size: 0.9rem; font-weight: 450; }
.linklist a:hover { color: var(--accent); }
.cite { margin-top: 1.75rem; padding: 1.1rem 1.25rem 1.25rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--panel); }
.cite-label { font-family: var(--display); font-weight: 700; }
.cite-label + p { margin-top: 0.35rem; font-size: 0.98rem; overflow-wrap: anywhere; }
.cite .btn { margin-top: 0.9rem; border-color: color-mix(in srgb, var(--ink) 40%, transparent); color: var(--ink); }

/* Papers */
.pub-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { min-height: 2.5rem; padding: 0.4rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-family: var(--display); font-size: 0.92rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chip .n { margin-left: 0.4rem; opacity: 0.65; font-variant-numeric: lining-nums tabular-nums; }
.search { display: flex; flex-direction: column; gap: 0.3rem; color: var(--muted); font-family: var(--display); font-size: 0.85rem; }
.search input { width: 100%; min-width: min(22rem, 100%); padding: 0.6rem 0.9rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; font-family: var(--serif); font-size: 1rem; }
.pub-status { min-height: 1.6em; margin-top: 0.75rem; color: var(--muted); font-family: var(--display); font-size: 0.88rem; }
.pubs { margin: 0.75rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.pub { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.25rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.pub-year { color: var(--accent); font-family: var(--display); font-size: 1.5rem; font-weight: 800; font-stretch: 76%; line-height: 1.15; }
.pub-title { max-width: 72ch; font-family: var(--display); font-size: 1.05rem; font-weight: 650; line-height: 1.35; }
.pub-title a { color: var(--ink); text-decoration-color: var(--line); }
.pub-title a:hover { color: var(--accent); }
.pub-authors, .pub-venue { margin-top: 0.3rem; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.pub-venue { margin-top: 0.1rem; }
.pub-authors b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.pub-venue .doi { overflow-wrap: anywhere; }
.pub-note { max-width: 72ch; margin-top: 0.45rem; font-size: 1rem; }
.pub-badge { display: inline-block; margin-left: 0.5rem; padding: 0.05rem 0.55rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-family: var(--display); font-size: 0.72rem; font-weight: 700; line-height: 1.5; vertical-align: 0.15em; white-space: nowrap; }
.pub-empty { margin-top: 1.5rem; color: var(--muted); }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 0.15rem; } .search { width: 100%; } }

/* Labs and sources */
.labs { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2.5rem clamp(2rem, 5vw, 4.5rem); }
.lab { padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.lab h3 { font-size: 1.7rem; font-stretch: 106%; letter-spacing: -0.02em; }
.lab .who { margin-top: 0.4rem; font-family: var(--display); font-weight: 650; }
.lab .where { margin-top: 0.15rem; color: var(--muted); }
.lab .where + p { margin-top: 0.85rem; }
.lab .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1rem 0 0; padding: 0; list-style: none; font-family: var(--display); font-size: 0.95rem; }
.collab { max-width: 70ch; margin-top: 2.5rem; color: var(--muted); }
.zone-ref--tail { padding-block: clamp(3rem, 6vw, 5rem); }
#labs { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.refs { display: grid; gap: 0.55rem; max-width: 64rem; margin: 1.25rem 0 0; padding: 0; color: var(--muted); font-size: 0.96rem; line-height: 1.45; list-style: none; }
.refs li { padding-left: 1.25rem; text-indent: -1.25rem; }

/* Footer */
.site-footer { padding-block: 3rem 3.5rem; background: var(--night); color: rgba(241, 238, 255, 0.65); font-family: var(--display); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer a { color: #ffb3c9; }
.footer-text p + p { margin-top: 0.3rem; }
.footer-mark { display: flex; align-items: center; color: #f1eeff; font-family: var(--display); font-size: 2.2rem; font-weight: 800; font-stretch: 110%; line-height: 1; }
.fm-bars { display: flex; flex-direction: column; gap: 0.11em; width: 0.9em; margin-inline: 0.08em; }
.fm-bars i { display: block; height: 0.07em; border-radius: 1px; background: #ff6f98; }

/* WordPress posts and pages, and the Netlify 404 */
.wp-main { min-height: 70vh; padding-block: calc(var(--header-h) + 3.5rem) clamp(3rem, 7vw, 6rem); background: linear-gradient(180deg, #120a24, #0b1016 40%); }
.wp-main article + article { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.entry-title { font-family: var(--display); font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); font-weight: 750; font-stretch: 106%; line-height: 1.05; letter-spacing: -0.025em; }
.entry-title a { color: var(--ink); text-decoration: none; }
.entry-content { max-width: 68ch; margin-top: 1.25rem; }
.entry-content > * + * { margin-top: 1em; }
.entry-content img { max-width: 100%; height: auto; }
.nav-links { display: flex; gap: 1rem; margin-top: 3rem; font-family: var(--display); }

/* Print */
@media print {
  body::after, .site-header, .rail, .hero-canvas, .pub-tools, .stepper-controls, .actions, .hero-actions, .skip-link { display: none !important; }
  .scene, .zone, .hero { background: #fff !important; color: #000 !important; }
  .js .estates > li { display: block; }
}
