:root {
  --ink: #10231f;
  --muted: #53645e;
  --paper: #f4efe3;
  --paper-2: #e8dfcc;
  --green: #234f42;
  --green-light: #8caf8c;
  --gold: #dba943;
  --gold-light: #f3de93;
  --coral: #c56b4f;
  --line: rgba(16, 35, 31, 0.18);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.55; }
a { color: inherit; }
button, select, input { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.site-header { min-height: 76px; padding: 0 clamp(1rem, 4vw, 5rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--paper); background: var(--green); font-size: 1.35rem; }
nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
nav a { text-decoration: none; font-size: .92rem; }
nav a:hover { text-decoration: underline; text-underline-offset: .3rem; }

.hero { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(380px, .97fr); align-items: center; overflow: hidden; }
.hero-copy { padding: clamp(3rem, 7vw, 8rem); padding-right: 2rem; }
.eyebrow { margin: 0 0 1rem; color: #8b4b3d; font: 700 .75rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.04; }
h1 { max-width: 850px; margin: 0; font-size: clamp(3.4rem, 7vw, 7.8rem); letter-spacing: -.055em; }
h2 { margin: 0 0 1rem; font-size: clamp(2.3rem, 4vw, 4.6rem); letter-spacing: -.035em; }
h3 { margin: .7rem 0; font-size: 1.6rem; }
.lede { max-width: 720px; margin: 2rem 0; color: var(--muted); font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.55rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; justify-content: center; padding: .9rem 1.2rem; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; cursor: pointer; }
.button.primary { color: white; background: var(--ink); }
.button.secondary, .button.compact { background: transparent; }
.button.compact { width: 100%; margin-top: .3rem; padding: .65rem 1rem; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 680px; margin: 3rem 0 0; border-top: 1px solid var(--line); }
.hero-facts div { padding: 1.3rem 1rem 0 0; }
.hero-facts dt { font: 700 2rem/1 var(--serif); }
.hero-facts dd { margin: .45rem 0 0; color: var(--muted); font-size: .82rem; }
.hero-organism { min-height: 100%; display: grid; place-items: center; position: relative; background: var(--green); overflow: hidden; }
.hero-organism svg { width: min(80%, 720px); animation: breathe 9s ease-in-out infinite; }
.halo { fill: rgba(244, 239, 227, .06); stroke: rgba(244, 239, 227, .12); stroke-width: 1; }
.model-label { position: absolute; bottom: 1.5rem; color: rgba(255,255,255,.66); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
@keyframes breathe { 50% { transform: scale(1.035) rotate(1.5deg); } }

.band { background: var(--paper-2); }
.question { display: grid; grid-template-columns: 1.4fr .6fr; gap: 4rem; align-items: center; padding: clamp(4rem, 8vw, 8rem); }
.result-card { padding: 2rem; border-left: 4px solid var(--green); }
.result-card strong { display: block; font: 700 clamp(2.6rem, 5vw, 5rem)/1 var(--serif); }
.result-status { color: var(--green); font-weight: 750; }
.result-card p { margin-bottom: 0; }

.experiment, .treatments, .new-idea, .sources, .genome-section { padding: clamp(4rem, 8vw, 8rem); }
.section-heading { max-width: 850px; }
.section-heading > p:not(.eyebrow) { color: var(--muted); font: 1.2rem/1.6 var(--serif); }
.lab-shell { display: grid; grid-template-columns: minmax(250px, .34fr) minmax(0, 1fr); margin-top: 3rem; background: #10231f; color: white; }
.controls { padding: clamp(1.5rem, 3vw, 3rem); background: #18352e; }
.controls label { display: block; margin: 1rem 0 .45rem; color: #d9e5de; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.controls select { width: 100%; padding: .7rem; color: white; background: #10231f; border: 1px solid #6f8b81; }
.controls input[type="range"] { width: 100%; accent-color: var(--gold); }
.lineage-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin-top: .65rem; }
.lineage-picker button { display: grid; place-items: center; gap: .25rem; min-width: 0; padding: .55rem .2rem; color: #b9cac3; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: .4rem; cursor: pointer; font-size: .7rem; }
.lineage-picker button i { width: 16px; height: 4px; border-radius: 99px; background: var(--lineage-color); }
.lineage-picker button:nth-child(1) { --lineage-color: #55a889; }
.lineage-picker button:nth-child(2) { --lineage-color: #e78769; }
.lineage-picker button:nth-child(3) { --lineage-color: #e4bd59; }
.lineage-picker button:nth-child(4) { --lineage-color: #7795cf; }
.lineage-picker button:nth-child(5) { --lineage-color: #aa78b2; }
.lineage-picker button.active { color: white; border-color: var(--lineage-color); background: rgba(255,255,255,.08); }
.range-label { display: flex; align-items: baseline; justify-content: space-between; }
.range-label output { color: var(--gold-light); font: 700 1.5rem var(--serif); }
.measurement-status { min-height: 2.6em; margin: .35rem 0 .8rem; color: #a9c1b7; font-size: .7rem; line-height: 1.35; }
.measurement-status.warning { color: #ffd095; }
.controls .button { color: white; border-color: rgba(255,255,255,.7); }
.view-controls { margin: 1.5rem 0 0; padding: 0; border: 0; }
.view-controls legend { margin-bottom: .55rem; color: #d9e5de; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.view-controls > div { display: grid; grid-template-columns: repeat(3, 1fr); }
.view-choice { min-width: 0; padding: .55rem .25rem; color: #c2d3cc; background: transparent; border: 1px solid rgba(255,255,255,.25); cursor: pointer; font-size: .72rem; }
.view-choice:first-child { border-radius: .4rem 0 0 .4rem; }
.view-choice:last-child { border-radius: 0 .4rem .4rem 0; }
.view-choice + .view-choice { border-left: 0; }
.view-choice.active { color: var(--ink); background: var(--gold-light); }
.readout { margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.16); }
.readout div { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.readout span { color: #b9cac3; font-size: .82rem; }
.chamber { position: relative; min-height: 620px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #315d50 0, #10231f 66%); }
.chamber svg { width: 100%; height: 100%; max-height: 680px; }
.model-cell { transition: cx .18s ease, cy .18s ease, rx .18s ease, ry .18s ease, fill .18s ease, opacity .18s ease; }
.tree-bond { stroke-linecap: round; }
.tree-junction { filter: drop-shadow(0 0 2px rgba(216,255,240,.7)); }
.entanglement { stroke-dasharray: 9 5; stroke-linecap: round; animation: trace-contact 1.8s linear infinite; filter: drop-shadow(0 0 4px rgba(255,209,102,.5)); }
.broken-bond { stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(255,107,94,.75)); }
.cut-junction { filter: drop-shadow(0 0 7px rgba(255,107,94,.95)); }
.detached-component { filter: drop-shadow(0 0 2px rgba(231,135,105,.4)); }
.packing-field { animation: stress-pulse 2.2s ease-in-out infinite alternate; }
@keyframes trace-contact { to { stroke-dashoffset: -22; } }
@keyframes stress-pulse { to { transform: scale(1.08); transform-origin: center; } }
.chamber-key { position: absolute; left: 1.2rem; bottom: 1rem; display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; max-width: calc(100% - 2.4rem); color: #c6d4ce; font-size: .7rem; }
.chamber-key span { display: flex; align-items: center; gap: .45rem; }
.chamber-key span { transition: opacity .2s ease; }
.chamber-key span.inactive { opacity: .28; }
.key-cell { width: 12px; height: 18px; border-radius: 50%; background: var(--gold-light); }
.key-link { width: 20px; height: 6px; background: radial-gradient(circle, #d8fff0 0 25%, transparent 27%), linear-gradient(#b8e0d0,#b8e0d0) center/100% 2px no-repeat; }
.key-entangle { width: 20px; height: 7px; border-top: 3px dashed #ffd166; }
.key-break { width: 20px; height: 5px; background: linear-gradient(90deg, #ff6b5e 0 34%, transparent 34% 66%, #ff6b5e 66%); }
.mechanism-status { position: absolute; top: 1rem; left: 1rem; z-index: 2; display: grid; gap: .18rem; max-width: 320px; padding: .7rem .9rem; color: #c6d4ce; background: rgba(7,24,20,.78); border: 1px solid rgba(255,255,255,.14); border-radius: .5rem; backdrop-filter: blur(8px); font-size: .67rem; }
.mechanism-status strong { color: white; font-size: .72rem; }
.fracture-outcome { position: absolute; left: 50%; bottom: 3.5rem; z-index: 2; max-width: min(520px, calc(100% - 2rem)); padding: .55rem .85rem; border: 1px solid; border-radius: 999px; background: rgba(7,24,20,.88); transform: translateX(-50%); text-align: center; font-size: .68rem; font-weight: 750; letter-spacing: .02em; }
.fracture-outcome.retained { color: #ffe59a; border-color: rgba(255,209,102,.65); }
.fracture-outcome.detached { color: #ffb1a2; border-color: rgba(255,107,94,.68); }
.evidence-key { position: absolute; top: 1rem; right: 1rem; max-width: 310px; padding: .7rem .9rem; color: #c6d4ce; background: rgba(7,24,20,.72); border: 1px solid rgba(255,255,255,.12); border-radius: .5rem; backdrop-filter: blur(8px); font-size: .67rem; }
.evidence-key p { margin: .25rem 0; }
.evidence-key strong { color: white; }
.model-note { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); border-top: 0; }
.model-note p:not(.eyebrow) { margin: 0; color: var(--muted); font-family: var(--serif); }

.trajectory-section, .mechanisms, .boundary { padding: clamp(4rem, 8vw, 8rem); }
.chart-toolbar { display: flex; gap: .6rem; margin: 2rem 0 1rem; }
.chart-choice { padding: .65rem 1rem; border: 1px solid var(--ink); border-radius: 999px; background: transparent; cursor: pointer; }
.chart-choice.active { color: white; background: var(--ink); }
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { min-width: 720px; width: 100%; background: rgba(255,255,255,.4); }

.treatment-plot { display: grid; gap: 1.2rem; max-width: 1000px; margin-top: 3rem; }
.treatment-row { display: grid; grid-template-columns: 180px 1fr 90px; align-items: center; gap: 1rem; }
.treatment-track { position: relative; height: 38px; border-bottom: 1px solid var(--line); }
.treatment-dot { position: absolute; top: 10px; width: 15px; height: 15px; border: 2px solid var(--paper); border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 1px var(--ink); transform: translateX(-50%); }
.treatment-row[data-treatment="anaerobic"] .treatment-dot { background: var(--green); }
.treatment-row strong { text-align: right; font-family: var(--serif); }

.mechanism-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mechanism-grid article { min-height: 260px; padding: 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mechanism-grid article > span { color: var(--coral); font-family: ui-monospace, monospace; }
.mechanism-grid p { color: var(--muted); }

.genome-section { color: #edf5f0; background: #10231f; }
.genome-section .section-heading > p:not(.eyebrow) { color: #b8cbc3; }
.genome-section .eyebrow { color: #f0bd70; }
.genome-shell { display: grid; grid-template-columns: minmax(250px, .32fr) minmax(0, .68fr); margin-top: 3rem; border: 1px solid rgba(255,255,255,.16); }
.genome-controls { padding: clamp(1.4rem, 3vw, 2.5rem); background: #18352e; }
.genome-controls fieldset { margin: 0 0 1.5rem; padding: 0; border: 0; }
.genome-controls legend, .genome-controls > label { display: block; margin: 0 0 .55rem; color: #c9d8d2; font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.genome-controls select { width: 100%; margin-bottom: 1.5rem; padding: .75rem; color: white; background: #10231f; border: 1px solid #718b82; }
.segmented, .time-picker { display: grid; grid-template-columns: repeat(2, 1fr); }
.time-picker { grid-template-columns: repeat(4, 1fr); }
.segmented button, .time-picker button { min-width: 0; padding: .65rem .3rem; color: #c5d5ce; background: transparent; border: 1px solid rgba(255,255,255,.25); cursor: pointer; font-size: .75rem; }
.segmented button + button, .time-picker button + button { border-left: 0; }
.segmented button[aria-pressed="true"], .time-picker button[aria-pressed="true"] { color: var(--ink); background: var(--gold-light); }
.genome-readout { margin: 2rem 0 0; }
.genome-readout div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid rgba(255,255,255,.15); }
.genome-readout dt { color: #aec2ba; font-size: .78rem; }
.genome-readout dd { margin: 0; font-family: var(--serif); font-weight: 700; }
.genome-display { min-width: 0; padding: clamp(1.4rem, 3vw, 2.8rem); background: radial-gradient(circle at 50% 20%, #2b574b, #10231f 70%); }
.chromosome-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.chromosome-heading h3 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); }
.chromosome-heading > p { max-width: 180px; margin: 0; color: #afc3bb; text-align: right; font-size: .72rem; }
.chromosome-grid { display: grid; grid-template-columns: repeat(16, minmax(24px, 1fr)); gap: clamp(.25rem, .8vw, .75rem); align-items: end; min-height: 330px; margin-top: 2rem; padding: 2rem 1rem 0; border-bottom: 1px solid rgba(255,255,255,.3); }
.chromosome { display: grid; grid-template-rows: 240px auto; gap: .6rem; align-items: end; text-align: center; }
.chromosome-bar { position: relative; min-height: 18px; border-radius: 999px 999px .25rem .25rem; background: var(--copy-color); box-shadow: 0 0 24px color-mix(in srgb, var(--copy-color) 30%, transparent); transition: height .35s ease, background .35s ease; }
.chromosome-bar::after { content: attr(data-copy); position: absolute; inset: .45rem 0 auto; color: #10231f; font-size: .7rem; font-weight: 800; }
.chromosome-label { color: #becfc8; font: .68rem ui-monospace, monospace; }
.display-note { margin: 1.25rem 0 0; color: #a9beb6; font-size: .72rem; }
.intervention-card, .two-key { margin-top: 1px; padding: clamp(1.5rem, 4vw, 3rem); color: var(--ink); background: var(--paper-2); }
.intervention-card > div:first-child { display: flex; justify-content: space-between; gap: 2rem; align-items: end; }
.intervention-card h3, .two-key h3 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); }
.effect-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.effect-grid article { display: flex; flex-direction: column; min-height: 170px; padding: 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.effect-grid span { color: var(--muted); font-size: .78rem; }
.effect-grid strong { margin: auto 0 .25rem; font: 700 clamp(2rem, 4vw, 4rem)/1 var(--serif); }
.effect-grid small { color: var(--muted); }
.gate-note { margin-bottom: 0; font-size: .8rem; }
.two-key { display: grid; grid-template-columns: .75fr 1.25fr; gap: 2rem 4rem; margin-top: 2rem; }
.two-key > p { grid-column: 1 / -1; max-width: 900px; margin: 0; color: var(--muted); }
.sufficiency-timeline { display: grid; gap: .8rem; align-content: center; }
.timeline-row { display: grid; grid-template-columns: 70px 1fr 75px; gap: .8rem; align-items: center; }
.timeline-track { display: grid; gap: .28rem; }
.timeline-bar { min-width: 2px; height: 12px; border-radius: 99px; background: var(--green); }
.timeline-bar.pm { background: var(--coral); }
.timeline-row strong { text-align: right; font: 700 .82rem var(--serif); }
.timeline-key { display: flex; gap: 1rem; color: var(--muted); font-size: .72rem; }
.timeline-key i { display: inline-block; width: 12px; height: 4px; margin-right: .3rem; border-radius: 9px; background: var(--green); }
.timeline-key .pm { background: var(--coral); }
.evidence-boundary { padding: 1.2rem; color: #c9d8d2; border: 1px solid rgba(255,255,255,.18); border-top: 0; font-size: .82rem; }
.large-copy { max-width: 1000px; font: clamp(1.4rem, 2.5vw, 2.2rem)/1.45 var(--serif); }
.idea-diagram { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 1.2rem; align-items: center; margin-top: 3rem; }
.idea-diagram div { min-height: 160px; display: grid; place-content: center; padding: 1.5rem; text-align: center; border: 1px solid var(--line); font: 700 1.3rem var(--serif); }
.idea-diagram small { color: var(--muted); font: 400 .82rem var(--sans); }
.idea-diagram .emphasis { color: white; background: var(--green); }
.boundary ul { max-width: 900px; margin: 2rem 0 0; padding: 0; list-style: none; }
.boundary li { padding: 1rem 0 1rem 2rem; border-top: 1px solid var(--line); position: relative; }
.boundary li::before { content: "—"; position: absolute; left: 0; color: var(--coral); }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 3rem; background: var(--line); }
.source-grid a { display: flex; flex-direction: column; gap: .5rem; min-height: 150px; padding: 2rem; background: var(--paper); text-decoration: none; }
.source-grid a:hover { background: var(--gold-light); }
.source-grid span { color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1rem, 4vw, 5rem); color: #cbd9d3; background: var(--ink); font-size: .78rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .site-header { align-items: flex-start; padding-block: 1rem; }
  nav { justify-content: flex-end; gap: .8rem 1rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-right: clamp(1rem, 7vw, 8rem); }
  .hero-organism { min-height: 65vh; }
  .question { grid-template-columns: 1fr; gap: 2rem; }
  .lab-shell { grid-template-columns: 1fr; }
  .chamber { min-height: 520px; }
  .model-note { grid-template-columns: 1fr; }
  .genome-shell { grid-template-columns: 1fr; }
  .chromosome-grid { min-height: 290px; overflow-x: auto; }
  .mechanism-grid { grid-template-columns: repeat(2, 1fr); }
  .idea-diagram { grid-template-columns: 1fr; }
  .idea-diagram > span { transform: rotate(90deg); text-align: center; }
}

@media (max-width: 620px) {
  .site-header { display: block; }
  nav { margin-top: 1rem; justify-content: flex-start; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-copy, .experiment, .treatments, .new-idea, .sources, .question, .trajectory-section, .mechanisms, .boundary, .genome-section { padding-inline: 1.1rem; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div { display: grid; grid-template-columns: 70px 1fr; align-items: baseline; }
  .hero-organism { min-height: 70vw; }
  .lab-shell { margin-inline: -1.1rem; }
  .chamber { min-height: 420px; }
  .evidence-key { position: static; max-width: none; margin: .75rem; }
  .mechanism-status { position: static; max-width: none; margin: .75rem; }
  .fracture-outcome { position: static; max-width: none; margin: 0 .75rem .75rem; transform: none; border-radius: .5rem; }
  .chamber svg { height: 360px; }
  .chamber-key { position: static; padding: 0 .9rem 1rem; }
  .mechanism-grid, .source-grid { grid-template-columns: 1fr; }
  .genome-shell, .intervention-card, .two-key, .evidence-boundary { margin-inline: -1.1rem; }
  .chromosome-heading { display: block; }
  .chromosome-heading > p { margin-top: .5rem; text-align: left; }
  .chromosome-grid { grid-template-columns: repeat(16, 28px); padding-inline: 0; }
  .effect-grid { grid-template-columns: 1fr; }
  .two-key { grid-template-columns: 1fr; }
  .treatment-row { grid-template-columns: 110px 1fr 65px; font-size: .8rem; }
  footer { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
