:root {
  --bg: #07111f;
  --bg-deep: #030914;
  --panel: #0d1b2d;
  --panel-soft: #11233a;
  --line: rgba(164, 190, 218, 0.18);
  --text: #eef6ff;
  --muted: #a9bad0;
  --cyan: #58d6d0;
  --cyan-soft: rgba(88, 214, 208, 0.14);
  --gold: #e2ba69;
  --gold-soft: rgba(226, 186, 105, 0.14);
  --red: #ff8b8b;
  --red-soft: rgba(255, 139, 139, 0.14);
  --violet: #b9a5ff;
  --green: #87dfaa;
  --max: 1180px;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: var(--cyan); text-underline-offset: 0.22em; }
a:hover { color: #92ebe7; }
img { max-width: 100%; }
button, input { font: inherit; }

.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 999; background: var(--text); color: var(--bg); padding: 0.7rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { max-width: 820px; }

.site-header { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(18px); background: rgba(3, 9, 20, 0.82); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.8rem; color: var(--text); text-decoration: none; min-width: 210px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(88, 214, 208, 0.6); border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(88, 214, 208, 0.3), rgba(226, 186, 105, 0.08) 50%, transparent 72%); box-shadow: 0 0 34px rgba(88, 214, 208, 0.18); font-family: Georgia, serif; color: var(--gold); }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: 0.16em; font-size: 0.95rem; }
.brand small { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.02em; }
.site-nav { display: flex; align-items: center; gap: 0.3rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 0.55rem 0.72rem; border-radius: 10px; font-size: 0.92rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav .nav-repo { color: var(--bg-deep); background: var(--gold); margin-left: 0.4rem; font-weight: 700; }
.site-nav .nav-repo:hover { color: var(--bg-deep); background: #efd08d; }
.menu-button { display: none; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); padding: 0.55rem 0.8rem; }

.hero { position: relative; overflow: hidden; padding: 7rem 0 5rem; background: radial-gradient(circle at 75% 30%, rgba(88, 214, 208, 0.11), transparent 30%), radial-gradient(circle at 15% 10%, rgba(226, 186, 105, 0.09), transparent 26%), linear-gradient(180deg, var(--bg-deep), var(--bg)); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: 0.2; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 60px 60px; mask-image: linear-gradient(to bottom, black, transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 5rem; }
.eyebrow { margin: 0 0 0.8rem; color: var(--gold); font-size: 0.77rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.17em; }
h1, h2, h3 { margin-top: 0; line-height: 1.15; }
h1 { margin-bottom: 1.4rem; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(3.2rem, 7vw, 6.5rem); letter-spacing: -0.045em; }
h2 { margin-bottom: 1rem; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.8rem); letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; }
.hero-lead { max-width: 720px; color: #d1deec; font-size: clamp(1.1rem, 2vw, 1.34rem); }
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.75rem 1.15rem; border: 1px solid transparent; border-radius: 12px; text-decoration: none; font-weight: 800; }
.button.primary { background: var(--gold); color: var(--bg-deep); }
.button.primary:hover { background: #efd08d; color: var(--bg-deep); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,0.025); color: var(--text); }
.button.secondary:hover { border-color: rgba(88, 214, 208, 0.55); background: var(--cyan-soft); }
.scope-note { max-width: 700px; margin-top: 1.2rem; color: var(--muted); font-size: 0.9rem; }

.hero-visual { position: relative; min-height: 500px; display: grid; place-items: center; }
.core { position: absolute; z-index: 3; display: grid; place-items: center; width: 122px; height: 122px; border-radius: 50%; border: 1px solid rgba(226, 186, 105, 0.7); background: radial-gradient(circle at 34% 30%, #1b4961, #07111f 65%); color: var(--gold); font-family: Georgia, serif; font-size: 1.35rem; letter-spacing: 0.18em; box-shadow: 0 0 70px rgba(88, 214, 208, 0.17); }
.orbit { position: absolute; border: 1px solid rgba(88, 214, 208, 0.22); border-radius: 50%; }
.orbit-one { width: 300px; height: 300px; }
.orbit-two { width: 460px; height: 460px; border-color: rgba(226, 186, 105, 0.15); }
.chain { list-style: none; padding: 0; margin: 0; position: absolute; inset: 0; }
.chain li { position: absolute; display: flex; align-items: center; gap: 0.55rem; min-width: 140px; padding: 0.58rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(13, 27, 45, 0.88); color: #d6e2ef; font-size: 0.86rem; box-shadow: 0 12px 34px rgba(0,0,0,0.2); }
.chain li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan); font-size: 0.72rem; font-weight: 800; }
.chain li:nth-child(1) { top: 3%; left: 34%; }
.chain li:nth-child(2) { top: 24%; right: 0; }
.chain li:nth-child(3) { bottom: 25%; right: 1%; }
.chain li:nth-child(4) { bottom: 2%; left: 34%; }
.chain li:nth-child(5) { bottom: 25%; left: 0; }
.chain li:nth-child(6) { top: 24%; left: 0; }

.section { padding: 6rem 0; }
.section.compact { padding: 3.5rem 0; }
.section.alt { background: var(--bg-deep); border-block: 1px solid rgba(164,190,218,0.08); }
.section-heading { max-width: 800px; margin-bottom: 2.5rem; }
.section-heading > p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.split-heading { max-width: none; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: end; }
.split-heading > p { color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: var(--shadow); }
.metric-grid.four { grid-template-columns: repeat(4, 1fr); }
.metric { min-height: 165px; padding: 1.4rem; background: var(--panel); display: flex; flex-direction: column; justify-content: center; }
.metric strong { color: var(--gold); font-family: Georgia, serif; font-size: 2.1rem; font-weight: 500; }
.metric span { color: var(--text); font-weight: 750; line-height: 1.3; }
.metric small { margin-top: 0.5rem; color: var(--muted); line-height: 1.35; }

.feature-grid, .branch-grid, .evidence-grid, .legend-grid, .document-grid, .command-grid { display: grid; gap: 1.2rem; }
.feature-grid { grid-template-columns: repeat(2, 1fr); }
.feature-card, .branch-card, .evidence-card, .command-grid article { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(17,35,58,0.92), rgba(8,20,35,0.92)); border-radius: var(--radius); box-shadow: 0 14px 45px rgba(0,0,0,0.14); }
.feature-card { padding: 2rem; }
.feature-card h3 { margin: 1.1rem 0 0.8rem; font-size: 1.45rem; }
.feature-card p { color: var(--muted); }
.feature-card > a { font-weight: 800; }

.status { display: inline-flex; align-items: center; width: fit-content; padding: 0.28rem 0.62rem; border: 1px solid currentColor; border-radius: 999px; font-size: 0.68rem; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 900; }
.status.established { color: var(--green); background: rgba(135,223,170,0.08); }
.status.model { color: var(--cyan); background: var(--cyan-soft); }
.status.structural { color: var(--violet); background: rgba(185,165,255,0.09); }
.status.supported { color: var(--gold); background: var(--gold-soft); }
.status.concept { color: #9cc9ff; background: rgba(156,201,255,0.08); }
.status.refuted { color: var(--red); background: var(--red-soft); }
.status.untested { color: var(--muted); background: rgba(169,186,208,0.07); }
.status.inconclusive { color: #c6b4ff; background: rgba(198,180,255,0.09); }
.status.outside { color: #cbd5df; background: rgba(203,213,223,0.06); border-style: dashed; }

.branch-grid { grid-template-columns: repeat(4, 1fr); }
.branch-card { position: relative; overflow: hidden; min-height: 280px; padding: 1.7rem; }
.branch-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -90px; bottom: -90px; border-radius: 50%; background: var(--cyan-soft); }
.branch-card.matter::after { background: var(--gold-soft); }
.branch-card.planet::after { background: rgba(185,165,255,0.11); }
.branch-card.life::after { background: rgba(135,223,170,0.1); }
.branch-number { color: var(--gold); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }
.branch-card p:not(.branch-number) { color: var(--muted); }
.branch-card a { position: absolute; left: 1.7rem; bottom: 1.7rem; font-weight: 800; z-index: 1; }

.limit-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 5rem; align-items: start; }
.limit-list { border-top: 1px solid var(--line); }
.limit-list article { display: grid; grid-template-columns: 48px 1fr; gap: 1.2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.limit-list article > span { color: var(--gold); font-family: Georgia, serif; font-size: 1.3rem; }
.limit-list h3 { margin-bottom: 0.4rem; }
.limit-list p { margin: 0; color: var(--muted); }

.cta-section { padding-top: 2rem; }
.cta-panel { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; padding: 3rem; border: 1px solid rgba(226,186,105,0.3); border-radius: 28px; background: radial-gradient(circle at 85% 20%, rgba(88,214,208,0.13), transparent 35%), linear-gradient(135deg, #13253c, #091522); box-shadow: var(--shadow); }
.cta-panel h2 { margin-bottom: 0; font-size: clamp(2rem, 3.8vw, 3.2rem); }

.page-hero { padding: 6rem 0 4rem; background: radial-gradient(circle at 65% 0%, rgba(88,214,208,0.11), transparent 38%), linear-gradient(180deg, var(--bg-deep), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(3.2rem, 6vw, 5.4rem); }
.page-hero p:not(.eyebrow) { color: #c9d7e7; font-size: 1.15rem; }
.source-strip { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.source-strip a { padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.82rem; }
.ci-badge { display: inline-block; margin-top: 1rem; }

.legend-grid { grid-template-columns: repeat(4, 1fr); }
.legend-grid > div { padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.025); }
.legend-grid p { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.86rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.55rem; position: sticky; top: 90px; z-index: 20; margin-bottom: 3rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 15px; background: rgba(7,17,31,0.9); backdrop-filter: blur(14px); }
.filter-button { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 0.45rem 0.75rem; cursor: pointer; font-size: 0.82rem; }
.filter-button:hover, .filter-button.active, .filter-button[aria-pressed="true"] { color: var(--bg-deep); background: var(--gold); border-color: var(--gold); }
.filter-summary { min-height: 1.5rem; margin: -2.1rem 0 2.5rem; color: var(--muted); font-size: 0.86rem; }
.evidence-group { scroll-margin-top: 110px; margin-bottom: 5rem; }
.group-heading { margin-bottom: 1.5rem; }
.group-heading h2 { font-size: clamp(2rem, 3vw, 3rem); }
.evidence-grid { grid-template-columns: repeat(2, 1fr); }
.evidence-card { scroll-margin-top: 120px; padding: 1.7rem; }
.evidence-card.is-hidden { display: none; }
.evidence-top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.evidence-id { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; }
.evidence-card h3 { margin: 1.1rem 0 0.7rem; font-size: 1.45rem; }
.evidence-card .claim { color: #d8e5f2; font-size: 1.02rem; }
.evidence-card dl { margin: 1.3rem 0; border-top: 1px solid var(--line); }
.evidence-card dl div { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.evidence-card dt { color: var(--gold); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 900; }
.evidence-card dd { margin: 0.25rem 0 0; color: var(--muted); }
.evidence-links { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.evidence-links a { font-size: 0.86rem; font-weight: 800; }

.process-flow { display: flex; align-items: stretch; gap: 0.6rem; overflow-x: auto; padding: 1rem 0 1.5rem; }
.process-flow > div { min-width: 145px; flex: 1; padding: 1.2rem; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.process-flow > div span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 0.8rem; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan); font-family: Georgia, serif; }
.process-flow strong, .process-flow small { display: block; }
.process-flow small { color: var(--muted); }
.process-flow > b { align-self: center; color: var(--gold); }
.callout, .data-note { padding: 1.2rem 1.4rem; border-left: 3px solid var(--gold); background: var(--gold-soft); color: #dbe7f3; }
.dimension-grid, .axis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.dimension-grid article, .axis-grid article { padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.dimension-grid article > span, .axis-grid article > span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 0.4rem; margin-bottom: 1rem; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan); font-family: Georgia, serif; }
.dimension-grid p, .axis-grid p { color: var(--muted); margin-bottom: 0; }
.two-column { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 5rem; align-items: center; }
.two-column.align-start { align-items: start; }
.code-list { border-top: 1px solid var(--line); }
.code-list div { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.code-list code { color: var(--gold); font-weight: 900; }
.code-list span { color: var(--muted); }
.axis-grid { grid-template-columns: repeat(4, 1fr); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.comparison-table { width: 100%; min-width: 680px; border-collapse: collapse; background: var(--panel); }
.comparison-table th, .comparison-table td { padding: 0.9rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table th:last-child, .comparison-table td:last-child { border-right: 0; }
.comparison-table tbody tr:last-child td { border-bottom: 0; }
.comparison-table th { color: var(--gold); background: var(--panel-soft); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.comparison-table td { color: var(--muted); }

.terminal { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #02070e; box-shadow: var(--shadow); }
.terminal-bar { display: flex; gap: 0.4rem; padding: 0.75rem; border-bottom: 1px solid var(--line); background: #0b1522; }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.terminal-bar span:first-child { background: var(--red); }
.terminal-bar span:nth-child(2) { background: var(--gold); }
.terminal-bar span:nth-child(3) { background: var(--green); }
pre { margin: 0; overflow-x: auto; }
pre code { display: block; padding: 1.2rem; color: #c9f8df; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86rem; line-height: 1.65; }
.command-grid { grid-template-columns: repeat(2, 1fr); }
.command-grid article { overflow: hidden; }
.command-grid article h3, .command-grid article p { margin-inline: 1.2rem; }
.command-grid article h3 { margin-top: 1.2rem; }
.command-grid article p { color: var(--muted); }
.command-grid pre { background: #02070e; border-block: 1px solid var(--line); }
.document-grid { grid-template-columns: repeat(3, 1fr); }
.document-grid a { display: block; min-height: 145px; padding: 1.3rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; }
.document-grid strong, .document-grid span { display: block; }
.document-grid strong { color: var(--text); font-size: 1.05rem; }
.document-grid span { margin-top: 0.55rem; color: var(--muted); font-size: 0.88rem; }
.warning-panel { padding: 1.7rem; border: 1px solid rgba(255,139,139,0.3); border-radius: 16px; background: var(--red-soft); }
.warning-panel p { color: #dfc9ce; }
.build-panel { margin-top: 1.2rem; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.025); color: var(--muted); font-size: 0.86rem; }
.build-meta { font-size: 0.75rem; }
.build-meta code, .build-panel code { color: var(--gold); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.site-footer { padding: 3rem 0; border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid p { color: var(--muted); margin: 0.4rem 0 0; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; margin-bottom: 0.4rem; }
.footer-grid a:hover { color: var(--cyan); }

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 460px; max-width: 620px; width: 100%; margin-inline: auto; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
  .legend-grid { grid-template-columns: repeat(2, 1fr); }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); }
  .axis-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .header-inner { min-height: 68px; }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 68px; left: 1rem; right: 1rem; flex-direction: column; align-items: stretch; padding: 0.8rem; border: 1px solid var(--line); border-radius: 14px; background: #081422; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav .nav-repo { margin-left: 0; text-align: center; }
  .hero { padding-top: 4.5rem; }
  .hero-visual { transform: scale(0.88); margin-block: -30px; }
  .split-heading, .limit-layout, .cta-panel, .two-column { grid-template-columns: 1fr; gap: 2rem; }
  .feature-grid, .evidence-grid, .command-grid, .document-grid { grid-template-columns: 1fr; }
  .filter-bar { top: 78px; }
  .comparison-row { grid-template-columns: 1fr; }
  .comparison-row.header { display: none; }
  .comparison-row span { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 1.2rem), var(--max)); }
  .brand small { display: none; }
  h1 { font-size: 3rem; }
  .section { padding: 4rem 0; }
  .metric-grid, .metric-grid.four, .branch-grid, .legend-grid, .dimension-grid, .axis-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .cta-panel { padding: 1.6rem; }
  .process-flow > b { display: none; }
}

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

/* Exploration interactive — vues dérivées, sans dépendance externe */
.interactive-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.interactive-panel { background: rgba(8,20,34,.74); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; min-width: 0; }
.interactive-panel h3 { margin-top: .2rem; }
.interactive-grid { display: grid; gap: 1rem; }
.interactive-grid.two { grid-template-columns: minmax(0, 1.8fr) minmax(260px, .8fr); }
.control-row { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; flex-wrap: wrap; }
.control-row label { font-weight: 700; }
.control-row select { min-width: 210px; border: 1px solid var(--line); background: #081422; color: var(--text); border-radius: 10px; padding: .65rem .8rem; }
.genealogy-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 1rem; align-items: start; }
.genealogy-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.stage-button { appearance: none; border: 1px solid var(--line); background: rgba(8,20,34,.72); color: var(--text); border-radius: 14px; padding: .75rem; text-align: left; cursor: pointer; min-height: 120px; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.stage-button:hover, .stage-button:focus-visible { transform: translateY(-2px); border-color: #5d7fa2; }
.stage-button.active { background: rgba(34,78,112,.45); border-color: #7fa8d3; }
.stage-button span { color: var(--muted); font-size: .78rem; }
.stage-button strong { display: block; margin: .15rem 0 .35rem; }
.stage-button small { color: var(--muted); line-height: 1.3; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: .5rem .85rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.data-plot { width: 100%; min-height: 330px; background: rgba(3,11,19,.45); border-radius: 14px; border: 1px solid rgba(255,255,255,.05); }
.grid-line { stroke: rgba(180,205,225,.13); stroke-width: 1; }
.axis-line, .zero-line { stroke: rgba(210,226,238,.42); stroke-width: 1.2; }
.axis-text, .axis-title, .reservoir-label { fill: #b7c9d8; font: 13px system-ui, sans-serif; }
.axis-title, .reservoir-label { font-weight: 700; }
.plot-point.nc, .legend-dot.nc { fill: #7fb4ff; background: #7fb4ff; }
.plot-point.cc, .legend-dot.cc { fill: #f3b86d; background: #f3b86d; }
.error-line { stroke-width: 2; opacity: .62; }
.error-line.nc { stroke: #7fb4ff; }.error-line.cc { stroke: #f3b86d; }
.plot-legend { display: flex; gap: 1.2rem; color: var(--muted); margin-top: .6rem; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; }
.stat-line { color: var(--muted); margin-bottom: .8rem; }
.stat-line strong { color: var(--text); }
.mono-note { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; font-size: .82rem; }
.mini-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin: 1rem 0; }
.mini-metrics div { border: 1px solid var(--line); border-radius: 12px; padding: .75rem; }
.mini-metrics span { display: block; color: var(--muted); font-size: .82rem; }
.mini-metrics strong { display: block; margin-top: .2rem; font-size: 1.15rem; }
.sandbox-grid { display: grid; grid-template-columns: minmax(260px,.75fr) minmax(0,1.7fr); gap: 1rem; }
.controls-panel label { display: grid; gap: .45rem; margin-bottom: 1rem; color: var(--muted); }
.controls-panel label output { color: var(--text); font-weight: 700; }
.controls-panel input[type="range"] { width: 100%; }
.controls-panel .toggle-line { display: flex; align-items: center; gap: .55rem; color: var(--text); }
.future-range { stroke-width: 8; stroke-linecap: round; opacity: .46; }
.future-range.hist-a { stroke: #7fb4ff; }.future-range.hist-b { stroke: #f3b86d; }
.sandbox-point.hist-a { fill: #7fb4ff; }.sandbox-point.hist-b { fill: #f3b86d; }
@media (max-width: 980px) {
  .genealogy-layout, .interactive-grid.two, .sandbox-grid { grid-template-columns: 1fr; }
  .genealogy-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .interactive-summary { grid-template-columns: 1fr; }
  .genealogy-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-metrics { grid-template-columns: 1fr; }
  .detail-list { grid-template-columns: 1fr; }
  .data-plot { min-height: 260px; }
}
