:root {
  color-scheme: dark;
  font-family: Figtree, system-ui, sans-serif;
  background: #0b1020;
  color: #f1f3ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #a2abc9;
  --soft: #7783a7;
  --line: #29314b;
  --mint: #35f0d2;
  --violet: #9f8cff;
  --amber: #ffc24b;
  --red: #ff7894;
  --panel: #11182b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  margin: 0;
  min-width: 320px;
  background-color: #0b1020;
  color: #f1f3ff;
  background-image:
    radial-gradient(900px 480px at 78% -8%, color-mix(in srgb, #35f0d2 13%, transparent), transparent 70%),
    linear-gradient(rgba(140,160,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,160,255,.045) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
}
button { color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgb(11 16 32 / 92%); backdrop-filter: blur(12px); }
.topbar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; font-weight: 700; letter-spacing: -.03em; }
.brand-logo { display: block; width: 150px; height: auto; flex: 0 0 auto; }
.brand-divider { margin-inline: 5px; color: #53607f; }
.brand-module { color: var(--muted); font-weight: 500; }
.collection-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.collection-link:hover { color: var(--mint); }
.subnav { border-top: 1px solid rgb(41 49 75 / 65%); }
.subnav-inner { min-height: 48px; display: flex; align-items: center; gap: 16px; }
.module-nav { display: flex; min-width: 0; align-items: center; gap: 4px; margin-right: auto; }
.module-nav a { flex: 0 0 auto; border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; }
.module-nav a:hover, .module-nav a:focus-visible { background: #ff789412; color: var(--red); }
.lang-toggle { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: transparent; color: var(--muted); font: 600 12px "JetBrains Mono", monospace; }
.lang-toggle:hover, .lang-toggle:focus-visible { border-color: var(--mint); color: var(--mint); }

.hero { padding-block: clamp(64px, 9vw, 112px) 54px; }
.eyebrow, .kicker, .live-label { display: flex; align-items: center; gap: 9px; color: var(--mint); font: 600 10px "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { margin-bottom: 22px; }
.pulse, .live-dot { width: 7px; aspect-ratio: 1; border-radius: 50%; background: var(--mint); box-shadow: 0 0 15px var(--mint); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 22px 0; font: 500 clamp(34px, 6vw, 64px)/1.08 Unbounded, sans-serif; letter-spacing: -.065em; }
.hero h1 { margin: 0 0 22px; }
.title-accent { color: var(--red); }
.hero-copy { max-width: 700px; margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.section { margin-bottom: 84px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.section-heading .kicker { margin-bottom: 10px; color: var(--soft); }
.section-heading h2 { margin-bottom: 0; font: 500 clamp(22px, 3.3vw, 31px)/1.25 Unbounded, sans-serif; letter-spacing: -.045em; }
.section-index { color: var(--soft); font: 12px "JetBrains Mono", monospace; white-space: nowrap; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #141c32, var(--panel) 72%); }
h3 { font: 500 17px/1.35 Unbounded, sans-serif; letter-spacing: -.03em; }
.barrier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.barrier-card { padding: 22px; }
.barrier-icon { display: grid; width: 38px; height: 38px; margin-bottom: 18px; place-items: center; border: 1px solid #35f0d255; border-radius: 12px; color: var(--mint); font-size: 20px; }
.barrier-card h3 { margin-bottom: 8px; }
.barrier-card p, .adaptive-card p, .memory-intro p { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.response-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .8fr); gap: 16px; }
.response-panel { min-width: 0; padding: 22px; overflow: hidden; }
.response-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.live-label { color: var(--soft); font-size: 9px; }
.live-dot { width: 6px; }
.action-button { border: 1px solid #ff789470; border-radius: 9px; padding: 9px 13px; background: #ff789418; color: #ffc0cb; font-size: 12px; font-weight: 700; transition: background .2s, border-color .2s, transform .2s; }
.action-button:hover:not(:disabled), .action-button:focus-visible { border-color: var(--red); background: #ff78942b; }
.action-button:active:not(:disabled) { transform: translateY(1px); }
.action-button:disabled { cursor: default; opacity: .65; }
.arena { position: relative; min-height: 280px; margin-top: 18px; overflow: hidden; border: 1px solid #29314b; border-radius: 14px; background: radial-gradient(ellipse at center, #1b1c35, #0b1020 75%); }
.tissue { position: absolute; inset: 0; overflow: hidden; }
.tissue-cell { position: absolute; width: 115px; height: 85px; border: 1px solid #35f0d233; border-radius: 46% 54% 53% 47%; background: #35f0d207; }
.tissue-cell:nth-child(1) { top: 22px; left: 12%; transform: rotate(18deg); }
.tissue-cell:nth-child(2) { top: 25px; right: 15%; transform: rotate(-13deg); }
.tissue-cell:nth-child(3) { bottom: 17px; left: 24%; transform: rotate(-8deg); }
.tissue-cell:nth-child(4) { right: 12%; bottom: 20px; transform: rotate(15deg); }
.pathogen { position: absolute; top: 50%; left: 51%; display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid var(--red); border-radius: 50%; background: #ff789435; box-shadow: 0 0 18px #ff789455; transform: translate(-50%, -50%); transition: left .7s, opacity .5s, transform .5s; }
.pathogen i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #ffc0cb; }
.pathogen i:nth-child(1) { top: 5px; left: 8px; }.pathogen i:nth-child(2) { top: 8px; right: 6px; }.pathogen i:nth-child(3) { bottom: 6px; left: 9px; }.pathogen i:nth-child(4) { right: 7px; bottom: 7px; }.pathogen i:nth-child(5) { top: 16px; left: 16px; }
.phagocyte { position: absolute; top: 50%; left: 20%; display: grid; width: 62px; height: 62px; place-items: center; border: 2px solid #9f8cff; border-radius: 50%; background: #9f8cff27; box-shadow: 0 0 20px #9f8cff26; opacity: 0; transform: translate(-50%, -50%) scale(.7); transition: left .7s, opacity .4s, transform .4s; }
.phagocyte i { width: 19px; height: 19px; border-radius: 50%; background: #9f8cff; box-shadow: 0 0 9px #9f8cff; }
.helper-cell, .b-cell { position: absolute; top: 28%; display: grid; width: 48px; height: 48px; place-items: center; border: 2px solid var(--mint); border-radius: 50%; background: #35f0d220; color: var(--mint); font: 700 16px "JetBrains Mono", monospace; opacity: 0; transform: scale(.6); transition: opacity .4s, transform .4s; }
.helper-cell { left: 70%; }.b-cell { top: 60%; left: 78%; border-color: var(--amber); background: #ffc24b20; color: var(--amber); }
.antibody { position: absolute; color: var(--amber); font: 700 28px "JetBrains Mono", monospace; opacity: 0; transform: scale(.6) rotate(180deg); transition: opacity .4s, transform .4s; }
.antibody-one { top: 39%; left: 39%; }.antibody-two { top: 58%; left: 55%; }.antibody-three { top: 29%; left: 60%; }
.arena[data-stage="1"] .pathogen { left: 47%; }
.arena[data-stage="1"] .phagocyte { left: 32%; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.arena[data-stage="2"] .pathogen, .arena[data-stage="3"] .pathogen, .arena[data-stage="4"] .pathogen { left: 41%; }
.arena[data-stage="2"] .phagocyte, .arena[data-stage="3"] .phagocyte, .arena[data-stage="4"] .phagocyte { left: 32%; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.arena[data-stage="2"] .helper-cell, .arena[data-stage="3"] .helper-cell, .arena[data-stage="4"] .helper-cell, .arena[data-stage="3"] .b-cell, .arena[data-stage="4"] .b-cell { opacity: 1; transform: scale(1); }
.arena[data-stage="3"] .antibody, .arena[data-stage="4"] .antibody { opacity: 1; transform: scale(1) rotate(0); }
.arena[data-stage="4"] .pathogen { opacity: .28; transform: translate(-50%, -50%) scale(.65); }
.arena-caption { position: absolute; right: 14px; bottom: 14px; left: 14px; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #29314bcc; border-radius: 10px; background: #0b1020d9; }
.stage-counter { color: var(--mint); font: 600 10px "JetBrains Mono", monospace; letter-spacing: .08em; }
.stage-name { font-size: 13px; font-weight: 600; }
.stage-progress { display: flex; gap: 7px; margin: 16px 0 12px; }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; background: #29314b; transition: background .2s, box-shadow .2s; }
.stage-dot.is-current { background: var(--mint); box-shadow: 0 0 10px #35f0d270; }
.stage-dot.is-complete { background: #9f8cff; }
.stage-description { min-height: 4.8em; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.response-controls { display: flex; justify-content: flex-end; margin-top: 10px; }
.text-button { border: 0; padding: 5px 8px; background: transparent; color: var(--soft); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover:not(:disabled) { color: var(--mint); }
.text-button:disabled { cursor: default; opacity: .45; }
.insight-panel { padding: 24px; }
.insight-icon { display: grid; width: 38px; height: 38px; margin-bottom: 18px; place-items: center; border: 1px solid #ff789455; border-radius: 12px; color: var(--red); font-size: 21px; }
.insight-panel .kicker { margin-bottom: 10px; color: var(--soft); }
.insight-panel h3 { margin-bottom: 12px; }
.insight-panel p:not(.kicker) { color: var(--muted); font-size: 14px; line-height: 1.7; }
.insight-panel .small-note { margin-bottom: 0; color: var(--soft); font-size: 12px; }

.adaptive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adaptive-card { position: relative; min-height: 330px; padding: 24px; overflow: hidden; }
.cell-badge { display: grid; width: 42px; height: 42px; margin-bottom: 18px; place-items: center; border: 1px solid; border-radius: 50%; font: 700 15px "JetBrains Mono", monospace; }
.b-badge { border-color: #ffc24b80; background: #ffc24b15; color: var(--amber); }
.t-badge { border-color: #35f0d280; background: #35f0d215; color: var(--mint); }
.adaptive-card .kicker { margin-bottom: 9px; color: var(--soft); }
.adaptive-card h3 { max-width: 28ch; margin-bottom: 12px; }
.antibody-visual { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 17px; height: 65px; margin-block: 12px 17px; padding-right: 28px; border-bottom: 1px solid var(--line); }
.antibody-shape { color: var(--amber); font: 700 30px "JetBrains Mono", monospace; transform: rotate(180deg); }
.antigen { position: absolute; bottom: -2px; left: 25%; width: 23px; height: 19px; border: 2px solid var(--red); border-radius: 8px 8px 0 0; background: #ff789430; }
.t-cell-visual { position: relative; display: flex; align-items: center; justify-content: center; gap: 26px; height: 65px; margin-block: 12px 17px; border-bottom: 1px solid var(--line); }
.target-cell { width: 32px; height: 32px; border: 2px solid var(--red); border-radius: 45% 55% 50% 50%; background: #ff78941c; }
.t-cell { display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid var(--mint); border-radius: 50%; color: var(--mint); font: 700 13px "JetBrains Mono", monospace; }
.signal-arrow { color: var(--mint); }
.science-note { margin: 16px 0 0; padding: 14px 16px; border-left: 2px solid var(--violet); background: #9f8cff0c; color: var(--muted); font-size: 13px; line-height: 1.65; }

.memory-panel { display: grid; grid-template-columns: minmax(0, .9fr) minmax(300px, 1fr); gap: 28px; padding: clamp(22px, 4vw, 36px); }
.memory-intro .kicker { margin-bottom: 12px; color: var(--soft); }
.memory-intro h3 { margin-bottom: 12px; font-size: 20px; }
.scenario-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.scenario-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.scenario-button:hover, .scenario-button.is-active { border-color: #35f0d277; background: #35f0d214; color: var(--mint); }
.comparison { display: grid; align-content: center; gap: 13px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #0b1020a8; }
.response-card { padding: 13px; border: 1px solid #29314b; border-radius: 10px; background: #11182b; }
.response-card-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 600; }
.response-symbol { color: var(--mint); font-size: 17px; }
.response-track { height: 7px; margin-block: 13px 10px; overflow: hidden; border-radius: 999px; background: #29314b; }
.response-bar { display: block; width: var(--bar-level); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9f8cff, #35f0d2); transition: width .45s ease; }
.response-caption { min-height: 2.8em; margin: 0; color: var(--soft); font-size: 12px; line-height: 1.5; }
.qualitative-label { margin: 1px 0 0; color: var(--soft); font: 600 9px "JetBrains Mono", monospace; letter-spacing: .09em; text-align: right; }
.sources-section { margin-bottom: 64px; }
.source-list { display: grid; gap: 10px; margin: 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: #11182b99; list-style: none; }
.source-list a { color: #c4baff; font-size: 14px; line-height: 1.6; text-decoration-color: #9f8cff60; text-underline-offset: 3px; }
.source-list a:hover { color: var(--mint); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding-block: 22px 30px; border-top: 1px solid var(--line); color: var(--soft); font-size: 12px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

@media (max-width: 820px) {
  .response-layout { grid-template-columns: 1fr; }
  .barrier-grid { grid-template-columns: 1fr; }
  .barrier-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; }
  .barrier-icon { grid-row: span 2; margin: 0; }
  .barrier-card h3 { margin-bottom: 4px; }
  .barrier-card p { font-size: 13px; }
  .memory-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 144px; }
  .wrap { width: min(100% - 28px, 1160px); }
  .topbar-inner { min-height: 62px; }
  .brand { gap: 7px; font-size: 12px; }
  .brand-logo { width: 124px; }
  .collection-link { font-size: 11px; }
  .subnav-inner { min-height: 0; flex-direction: column; align-items: stretch; gap: 5px; padding-block: 6px; }
  .module-nav { width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .module-nav a { padding: 6px 10px; font-size: 12px; }
  .subnav .lang-toggle { align-self: flex-end; padding: 6px 10px; }
  .hero { padding-top: 58px; }
  .section { margin-bottom: 64px; }
  .section-heading { align-items: start; }
  .response-panel { padding: 15px; }
  .response-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .arena { min-height: 250px; }
  .pathogen { left: 56%; }
  .insight-panel { padding: 20px; }
  .adaptive-grid { grid-template-columns: 1fr; }
  .adaptive-card { min-height: 0; padding: 20px; }
  .memory-panel { gap: 20px; padding: 20px; }
  .comparison { padding: 13px; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
