/* --------------------------------------------------------------------------
   geisten — one stylesheet for every page.
   Landing (body.lab-page) + content pages (body.content-page).
   Theme follows prefers-color-scheme; dark is the base palette.
   -------------------------------------------------------------------------- */

:root {
  --page: #090b10;
  --surface: #0e121a;
  --surface-raised: #141923;
  --text: #edf1f5;
  --text-muted: #9da7b5;
  --text-dim: #7f8b99;
  --accent: #a8e063;
  --accent-soft: rgb(168 224 99 / 10%);
  --line: rgba(181, 195, 213, 0.15);
  --line-strong: rgb(181 195 213 / 24%);
  --cyan: #65d9e4;
  --orange: #e5a368;
  --font-sans: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --content-width: 77.5rem;
  --reading-width: 56rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

html { font-family: var(--font-sans); font-size: 16px; line-height: 1.6; background: var(--page); color: var(--text); scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; overflow-x: hidden; }

/* ===== Shared components (both page types) =====
   Defined once here; .lab-page / .content-page blocks below only override
   what genuinely differs. Shared media rules live at the end of the file. */
.skip-link { position: fixed; z-index: 10; top: 0.75rem; left: 0.75rem; padding: 0.55rem 0.8rem; transform: translateY(-150%); border: 1px solid var(--accent); background: var(--page); color: var(--text); }
.skip-link:focus { transform: translateY(0); }
.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; }
.company-name { color: var(--accent); font-weight: 700; }
.logo { display: flex; align-items: center; gap: 0.65rem; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo-mark { display: block; flex: 0 0 auto; width: 2.25rem; height: 2.25rem; }
.logo-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; line-height: 1; }
.logo-text { font-size: 1.3rem; font-weight: 750; }
.logo-tagline { color: var(--text-dim); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; line-height: 1; text-transform: uppercase; }
.primary-nav { display: flex; align-items: center; gap: 0.2rem; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.4rem 0.55rem; color: var(--text-muted); font-size: 0.875rem; font-weight: 650; text-decoration: none; }
.nav-link-secondary { border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.nav-link-secondary:hover { background: var(--accent-soft); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 2.65rem; padding: 0.6rem 1rem; border: 1px solid transparent; border-radius: 0.2rem; cursor: pointer; font: inherit; font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.button-primary { border-color: var(--accent); background: var(--accent); color: #0a0c10; }
.button-primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); color: #0a0c10; }
.bottom-tab-bar { display: none; position: fixed; z-index: 5; left: 50%; bottom: 1rem; transform: translateX(-50%); align-items: center; justify-content: center; gap: 0.15rem; min-height: 3.85rem; padding: 0.35rem; border: 1px solid var(--line-strong); border-radius: 0.3rem; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 20%); backdrop-filter: blur(14px); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-width: 3.5rem; min-height: 3.05rem; padding: 0.28rem 0.48rem; color: var(--text-muted); font-size: 0.72rem; font-weight: 650; text-align: center; text-decoration: none; }
.tab-icon { display: grid; width: 1.25rem; height: 1.25rem; place-items: center; }
.tab-icon svg { width: 1.2rem; height: 1.2rem; }
.tab-home-logo { width: 1.1rem; height: 1.1rem; background: currentColor; mask: url("../logo/geisten-mark.svg") center / contain no-repeat; }
.tab-label { font-size: 0.68rem; line-height: 1.1; }

/* ===== Landing page (body.lab-page) ===== */
body.lab-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; }
.lab-page h1,
.lab-page h2,
.lab-page h3,
.lab-page p { margin-top: 0; }
.lab-page p { margin-bottom: 0; }
.lab-page a { transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; }
.lab-page img { max-width: 100%; }
.hero-actions,
.community-actions { display: flex; flex-wrap: wrap; }
body.lab-page { --font-display: var(--font-sans); min-height: 100vh; background: var(--page); color: var(--text); letter-spacing: 0; }
.lab-page::before { opacity: 0.3; background-image: linear-gradient(rgba(177, 195, 218, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(177, 195, 218, 0.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, black, transparent 62rem); }
.lab-page h1,
.lab-page h2,
.lab-page h3,
.lab-page h4,
.lab-page h5,
.lab-page h6 { color: var(--text); font-family: var(--font-display); font-weight: 600; }
.lab-page a { color: inherit; text-decoration-color: rgba(168, 224, 99, 0.45); }
.lab-page a:hover { color: var(--accent); }
.lab-nav,
.lab-page main,
.lab-page > footer { width: min(calc(100% - 2.5rem), 1240px); margin-inline: auto; }
.lab-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.lab-page .logo-text { font-family: var(--font-sans); font-size: 1.35rem; font-weight: 750; letter-spacing: 0.02em; }
.lab-page .logo-tagline { color: var(--text-dim); letter-spacing: 0.13em; }
.lab-page .nav-link { min-height: 2.75rem; padding: 0.4rem 0.55rem; border: 0; border-radius: 0; color: var(--text-muted); font-size: 0.875rem; font-weight: 600; }
.lab-page .nav-link-secondary { padding: 0.46rem 0.78rem; border: 1px solid rgba(168, 224, 99, 0.42); color: var(--accent); }
.lab-page .nav-link-secondary:hover { border-color: var(--accent); background: rgba(168, 224, 99, 0.08); }
.lab-nav-actions { display: flex; align-items: center; gap: 0.55rem; }
.lab-page main { padding: 0 0 4rem; }
.lab-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(29rem, 0.9fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; min-height: min(650px, calc(100vh - 82px)); padding: clamp(2.5rem, 5vw, 5rem) 0; }
.lab-hero-copy { position: relative; z-index: 1; }
.lab-overline { display: flex; align-items: center; gap: 0.65rem; margin: 0; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; line-height: 1.4; text-transform: uppercase; }
.lab-page .lab-overline { margin-bottom: var(--overline-gap, clamp(1.25rem, 2vw, 1.75rem)); }
.lab-hero .lab-overline { --overline-gap: clamp(1.75rem, 3vw, 2.5rem); }
.lab-overline span { width: 0.65rem; height: 0.65rem; background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.lab-hero h1 { max-width: 8ch; margin-bottom: 1rem; font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 600; line-height: 0.91; letter-spacing: 0; }
.lab-hero h1 em { color: var(--accent); font-style: normal; }
.lab-lead { max-width: 35rem; color: var(--text-muted); font-size: clamp(1.05rem, 1.8vw, 1.28rem); line-height: 1.65; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 1.6rem 0 0; }
.hero-proof div + div { padding-left: 2rem; border-left: 1px solid var(--line); }
.hero-proof dt { color: var(--text); font-family: var(--font-mono); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 600; line-height: 1.1; }
.hero-proof dd { margin: 0.35rem 0 0; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; }
.lab-page .hero-actions { gap: 0.65rem; margin-top: 1.5rem; }
.lab-page .button { min-height: 2.9rem; padding: 0.68rem 1rem; border-radius: 0.2rem; box-shadow: none; font-size: 0.88rem; }
.lab-page .button-primary { border-color: var(--accent); background: var(--accent); color: #0a0c10; }
.lab-page .button-primary:hover { background: #c0ef89; color: #0a0c10; }
.lab-page .button-secondary { border-color: var(--line); background: transparent; color: var(--text); }
.lab-page .button-secondary:hover { border-color: var(--accent); background: rgba(168, 224, 99, 0.06); color: var(--accent); }
.hero-terminal { position: relative; min-height: 24rem; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.hero-terminal::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(181, 195, 213, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(181, 195, 213, 0.08) 1px, transparent 1px); background-size: 32px 32px; }
.terminal-bar,
.terminal-screen { position: relative; z-index: 1; }
.terminal-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); color: var(--text-muted); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; }
.terminal-screen { display: flex; min-height: calc(24rem - 2.7rem); flex-direction: column; padding: clamp(1rem, 3vw, 2rem); }
.terminal-command,
.terminal-replay,
.terminal-link { font-family: var(--font-mono); }
.terminal-command { margin: 0 0 1.6rem; color: var(--text); font-size: clamp(0.72rem, 1.2vw, 0.85rem); line-height: 1.5; }
.terminal-command span,
.terminal-result strong,
.terminal-link { color: var(--accent); }
.terminal-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1.5rem; margin: 0; }
.terminal-facts div { min-width: 0; }
.terminal-facts dt,
.terminal-facts dd { margin: 0; font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.45; }
.terminal-facts dt { margin-bottom: 0.15rem; color: var(--text-dim); letter-spacing: 0.07em; text-transform: uppercase; }
.terminal-facts dd { color: var(--text); }
.terminal-result { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; align-items: baseline; margin-top: auto; padding: 1.35rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--font-mono); }
.terminal-result span { color: var(--text-dim); font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; }
.terminal-result span:last-child { grid-column: 1 / -1; color: var(--cyan); }
.terminal-result strong { font-size: clamp(1.7rem, 3vw, 2.45rem); font-weight: 600; letter-spacing: 0; }
.terminal-replay { display: flex; width: fit-content; max-width: 100%; margin: 1.1rem 0 0; overflow: hidden; color: var(--text-muted); font-size: 0.7rem; line-height: 1.5; white-space: nowrap; }
.terminal-replay span { display: block; width: 0; overflow: hidden; animation: terminal-replay 7s steps(64, end) infinite; }
.terminal-replay i { width: 0.55em; margin-left: 0.15rem; background: var(--accent); animation: terminal-cursor 0.8s steps(2, start) infinite; }
.terminal-link { width: fit-content; margin-top: auto; padding-top: 1.2rem; font-size: 0.74rem; text-decoration: none; }
.terminal-link:hover { color: var(--cyan); }
@keyframes terminal-replay { 0%, 15% { width: 0; } 55%, 82% { width: 100%; } 100% { width: 0; } }
@keyframes terminal-cursor { 50% { opacity: 0; } }
.lab-section { position: relative; display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; column-gap: 2rem; margin: 0; padding: clamp(4rem, 9vw, 8rem) 0; border: 0; border-radius: 0; border-top: 1px solid var(--line); background: none; box-shadow: none; }
.section-index { color: var(--accent); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; }
.lab-section .section-index { grid-row: 1 / span 2; }
.lab-section-heading { max-width: 52rem; }
.lab-section h2 { margin: 0; font-size: clamp(2.15rem, 4.5vw, 4.4rem); line-height: 1.02; letter-spacing: -0.04em; }
.mission-section { grid-template-columns: 7rem minmax(0, 1.1fr) minmax(18rem, 0.75fr); column-gap: 2rem; }
.mission-section .section-index { grid-row: 1 / span 3; }
.mission-section .lab-section-heading { grid-column: 2 / -1; }
.mission-copy { display: grid; gap: 1rem; align-content: start; }
.mission-copy p { color: var(--text-muted); font-size: 1.04rem; line-height: 1.75; }
.constraint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 0; margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.constraint-grid div { min-height: 8rem; padding: 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.constraint-grid dt { margin-bottom: 0.6rem; color: var(--accent); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; }
.constraint-grid dd { margin: 0; color: var(--text-muted); font-size: 0.85rem; line-height: 1.45; }
.principle-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle-list article { min-height: 12rem; padding: 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle-list article > span { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.72rem; }
.principle-list h3 { margin: 2.3rem 0 0.6rem; font-size: 1.1rem; letter-spacing: -0.02em; }
.principle-list p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; max-width: none; gap: 1.5rem; }
.text-link { flex: 0 0 auto; padding-bottom: 0.25rem; border-bottom: 1px solid currentColor; color: var(--accent); font-family: var(--font-mono); font-size: 0.78rem; text-decoration: none; }
.research-log { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.research-entry { display: flex; flex-direction: column; min-height: 16rem; padding: 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; text-decoration: none; }
.research-entry.feature { background: linear-gradient(135deg, rgba(168, 224, 99, 0.12), transparent 65%); }
.entry-kind,
.entry-meta,
.project-status { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.research-entry h3 { margin: auto 0 0.7rem; font-size: clamp(1.35rem, 2.3vw, 1.9rem); letter-spacing: -0.035em; }
.research-entry p { max-width: 30rem; color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }
.research-entry .entry-meta { margin-top: 1.25rem; color: var(--accent); }
.benchmark-layout { display: grid; grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr); gap: 0; border: 1px solid var(--line); }
.benchmark-summary { padding: 1.5rem; border-right: 1px solid var(--line); background: linear-gradient(160deg, rgba(101, 217, 228, 0.1), transparent 70%); }
.summary-label { display: block; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.benchmark-summary strong { display: block; margin: 1.2rem 0 0.2rem; color: var(--accent); font-size: clamp(3rem, 5vw, 5rem); font-weight: 600; letter-spacing: -0.07em; line-height: 0.95; }
.benchmark-summary strong small { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; letter-spacing: 0; }
.benchmark-summary > p,
.measurement-note { color: var(--text-muted); font-size: 0.86rem; line-height: 1.55; }
.bar-compare { display: grid; gap: 0.7rem; margin-top: 2.25rem; }
.bar { position: relative; display: flex; justify-content: space-between; width: var(--value); min-width: 6rem; height: 1.8rem; padding: 0.28rem 0.5rem; color: #0a0c10; font-family: var(--font-mono); font-size: 0.68rem; }
.bar b,
.bar i { font-style: normal; }
.geisten-bar { background: var(--accent); }
.ref-bar { background: var(--text-dim); }
.benchmark-table-wrap { padding: 1.5rem; overflow-x: auto; }
.lab-table { width: 100%; min-width: 38rem; border-collapse: collapse; font-size: 0.82rem; }
.lab-table caption { padding-bottom: 1rem; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.lab-table th,
.lab-table td { padding: 0.72rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; }
.lab-table th { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.67rem; font-weight: 500; text-transform: uppercase; }
.lab-table td { color: var(--text-muted); }
.lab-table td:nth-child(3) { color: var(--accent); font-family: var(--font-mono); }
.measurement-note { margin-top: 1rem; font-size: 0.75rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project-card { display: flex; flex-direction: column; padding: 1.25rem; background: var(--surface); }
.project-card.project-primary { background: linear-gradient(135deg, rgba(168, 224, 99, 0.09), var(--surface) 58%); }
.project-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.project-window { display: flex; flex-wrap: wrap; align-content: start; gap: 0.35rem; min-height: 9rem; margin-bottom: 2rem; padding: 0.75rem; border: 1px solid var(--line); background: #080a0e; }
.project-window > span { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--text-dim); }
.project-window > span:first-child { background: var(--orange); }
.project-window pre { width: 100%; margin: 0.6rem 0 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--accent); font-family: var(--font-mono); font-size: 0.65rem; line-height: 1.65; white-space: normal; }
.project-window code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.project-card h3 { margin: 0.8rem 0; font-size: 1.55rem; letter-spacing: -0.03em; }
.project-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.58; }
.project-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: auto; padding-top: 1.4rem; }
.project-links a { color: var(--accent); font-family: var(--font-mono); font-size: 0.72rem; }
.roadmap-list { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.roadmap-list li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.roadmap-state { align-self: start; width: fit-content; padding: 0.25rem 0.45rem; border: 1px solid var(--line); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; }
.roadmap-state.done { border-color: rgba(168, 224, 99, 0.45); color: var(--accent); }
.roadmap-state.active { border-color: rgba(101, 217, 228, 0.45); color: var(--cyan); }
.roadmap-list h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.roadmap-list p { color: var(--text-muted); font-size: 0.9rem; }
.lab-section.community-section { grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.75fr); align-items: end; column-gap: 3rem; padding-bottom: clamp(5rem, 10vw, 9rem); }
.community-section > p { color: var(--text-muted); line-height: 1.7; }
.community-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; grid-column: 2; }
.lab-page > footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 0.78rem; text-align: left; }
.lab-page > footer p + p { margin-top: 0.4rem; }
.lab-page .bottom-tab-bar { border-color: var(--line); border-radius: 0.25rem; background: rgba(14, 18, 26, 0.92); }
.lab-page .bottom-tab-bar.bottom-tab-bar-landing { grid-auto-flow: column; grid-auto-columns: 1fr; width: min(calc(100% - 1rem), 30rem); }
.lab-page .tab { min-height: 3.5rem; border-radius: 0; color: var(--text-muted); }
.lab-page .tab-icon { font-family: var(--font-mono); font-size: 1rem; }
@media (max-width: 959px) {
  .lab-page .primary-nav { display: none; }
  .lab-page .bottom-tab-bar { display: grid; }
  .lab-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .hero-terminal { min-height: 23rem; }
  .lab-section { grid-template-columns: 5rem minmax(0, 1fr); }
  .mission-section .constraint-grid { grid-column: 2; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .lab-nav,
  .lab-page main,
  .lab-page > footer { width: min(calc(100% - 1.5rem), 1240px); }
  .lab-nav { padding: 1rem 0; }
  .lab-hero { gap: 2.5rem; padding: 3.5rem 0 4.5rem; }
  .lab-hero h1 { max-width: 11ch; font-size: clamp(3.8rem, 17vw, 6.2rem); }
  .hero-proof { gap: 0.9rem 1.1rem; }
  .hero-proof div + div { padding-left: 1.1rem; }
  .hero-terminal { min-height: 15rem; }
  .terminal-screen { min-height: calc(15rem - 2.7rem); }
  .terminal-facts { grid-template-columns: 1fr; gap: 0.55rem; }
  .terminal-command { margin-bottom: 1rem; }
  .terminal-result { margin-top: 1rem; padding: 0.9rem 0; }
  .terminal-replay { margin-top: 0.85rem; font-size: 0.64rem; }
  .terminal-link { padding-top: 0.85rem; }
  .lab-section { grid-template-columns: 1fr; gap: 1.2rem; padding: 4rem 0; }
  .lab-section .section-index { grid-row: auto; }
  .mission-section .constraint-grid { grid-column: auto; }
  .mission-section .lab-section-heading { grid-column: auto; }
  .lab-section h2 { font-size: clamp(2.1rem, 10vw, 3.2rem); }
  .principle-list { grid-template-columns: 1fr; }
  .principle-list article { min-height: 9rem; }
  .principle-list h3 { margin-top: 1.3rem; }
  .research-log { grid-template-columns: 1fr; }
  .research-entry { min-height: 13rem; }
  .section-heading-row { display: grid; align-items: start; }
  .benchmark-layout { grid-template-columns: 1fr; }
  .benchmark-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .project-card.project-primary { grid-template-columns: 1fr; gap: 1.25rem; }
  .lab-section.community-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .community-actions { grid-column: auto; }
}
/* ===== Content pages (body.content-page) ===== */
body.content-page { min-width: 0; min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--page); color: var(--text); }
body.content-page::before { position: fixed; z-index: -1; inset: 0; content: ""; pointer-events: none; background-image: linear-gradient(rgb(177 195 218 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(177 195 218 / 4%) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, black, transparent 62rem); }
body.content-page img { max-width: 100%; }
body.content-page a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 0.18em; }
body.content-page a:hover { color: var(--accent); }
body.content-page h1, body.content-page h2, body.content-page h3, body.content-page h4, body.content-page h5, body.content-page h6, body.content-page p { margin-top: 0; }
body.content-page h1, body.content-page h2, body.content-page h3, body.content-page h4, body.content-page h5, body.content-page h6 { color: var(--text); font-weight: 650; line-height: 1.08; }
body.content-page p, body.content-page li, body.content-page dd { color: var(--text-muted); }
.navbar,
.content-page main,
.content-page > footer { width: min(calc(100% - 2.5rem), var(--content-width)); margin-inline: auto; }
.navbar { display: flex; align-items: center; gap: 1rem; min-height: 5.1rem; border-bottom: 1px solid var(--line); }
.panel-topline,
.eyebrow-home,
.article-label-row,
.article-meta,
.article-hero-meta,
.summary-hero-meta { display: flex; align-items: center; }
.content-page main { padding-bottom: 5rem; }
.content-page main > section,
.content-page main > article > section { padding: clamp(3.5rem, 7vw, 6rem) 0; border-top: 1px solid var(--line); }
.page-intro { border-top: 0 !important; }
.eyebrow,
.section-kicker,
.micro-label { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; color: var(--text-dim); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow::before,
.section-kicker::before,
.micro-label::before { width: 1.25rem; height: 1px; content: ""; background: var(--accent); }
.page-intro h1 { max-width: 12ch; margin-bottom: 1.35rem; font-size: clamp(2.8rem, 6vw, 5.4rem); letter-spacing: 0; }
.hero-lead,
.section-intro > p { max-width: 43rem; margin-bottom: 0; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.section-intro > p + p { margin-top: 1rem; }
.section-intro h2 { max-width: 20ch; margin-bottom: 1rem; font-size: clamp(1.75rem, 3vw, 2.75rem); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; margin-top: 2rem; }
.detail-card,
.contact-card { border: 1px solid var(--line); border-radius: 0.35rem; background: var(--surface); }
.detail-card { min-height: 13rem; padding: 1.35rem; }
.detail-card h3 { margin: 1.6rem 0 0.7rem; font-size: 1.1rem; }
.detail-card p { margin-bottom: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(17rem, 0.7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.contact-card { padding: 1.4rem; }
.contact-card > p { margin: 1.5rem 0; }
.signal-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; padding: 1.2rem 0 0; margin: 1.3rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.signal-list li { color: var(--text-dim); font-size: 0.78rem; }
.legal-list { display: grid; grid-template-columns: minmax(10rem, 0.35fr) 1fr; gap: 0.8rem 1.5rem; margin: 0; }
.legal-list dt { color: var(--text); font-weight: 700; }
.legal-list dd { margin: 0; }
.legal-page main > article { max-width: var(--reading-width); }
.legal-page main > article h2 { margin-bottom: 0.75rem; font-size: 1.4rem; }
.legal-page main > article p:last-child { margin-bottom: 0; }
.legal-page main > article ul { padding-left: 1.2rem; }
.summary-hero,
.research-summary-page main,
.research-summary-page > footer { width: min(calc(100% - 2.5rem), var(--content-width)); margin-inline: auto; }
.article-hero,
.research-article-page main,
.research-article-page > footer { width: min(calc(100% - 2.5rem), var(--reading-width)); margin-inline: auto; }
.summary-hero,
.article-hero { padding-top: clamp(1.2rem, 4vw, 3rem); }
.summary-hero-panel,
.article-hero-panel { position: relative; overflow: hidden; padding: clamp(1.5rem, 4vw, 3.5rem); border: 1px solid var(--line); border-radius: 0.35rem; background: var(--surface); }
.summary-hero-panel::after,
.article-hero-panel::after { position: absolute; top: -6rem; right: -6rem; width: 17rem; height: 17rem; border-radius: 50%; content: ""; background: radial-gradient(circle, rgb(101 217 228 / 12%), transparent 70%); pointer-events: none; }
.panel-topline { position: relative; z-index: 1; justify-content: space-between; }
.panel-topline .eyebrow { margin-bottom: 0; }
.eyebrow-brand { gap: 0.7rem; }
.eyebrow-brand > span:last-child { color: var(--accent); }
.eyebrow-home { gap: 0.45rem; color: var(--text); font-size: 0.8rem; text-decoration: none; }
.research-home-mark { width: 1.2rem; height: 1.2rem; }
.research-hero-image { position: absolute; right: clamp(1.5rem, 7vw, 7rem); bottom: 2.75rem; width: min(26vw, 16rem); max-height: 13rem; object-fit: contain; object-position: bottom; opacity: 0.84; }
.summary-title-group { position: relative; z-index: 1; max-width: 42rem; margin-top: clamp(3rem, 7vw, 6rem); }
.summary-title-group h2 { margin-bottom: 1rem; font-size: clamp(2.7rem, 6vw, 5.3rem); }
.summary-title-group blockquote,
.article-hero blockquote { max-width: 38rem; margin: 0; color: var(--text-muted); font-size: 1.05rem; }
.summary-hero-meta,
.article-hero-meta { position: relative; z-index: 1; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.5rem; }
.summary-meta-chip,
.article-meta-chip,
.article-date,
.reading-time { display: inline-flex; align-items: center; min-height: 1.85rem; padding: 0.2rem 0.55rem; border: 1px solid var(--line); background: var(--surface-raised); color: var(--text-muted); font-size: 0.78rem; }
.research-intro-lead { max-width: 48rem; margin: 1.4rem 0 clamp(2rem, 4vw, 4rem); color: var(--text-muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.article-list { display: grid; gap: 0.8rem; padding: 0; margin: 0; list-style: none; }
.research-list-card { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 0.35rem; background: var(--surface); }
.featured-research-card { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.article-label-row { justify-content: space-between; gap: 0.8rem; }
.article-kicker { margin: 0; color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.article-topic-badge { display: inline-flex; padding: 0.2rem 0.48rem; border: 1px solid currentColor; color: var(--cyan); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-strategie { color: var(--orange); }
.badge-gesellschaft { color: var(--accent); }
.badge-benchmark { color: var(--cyan); }
.badge-guide { color: var(--orange); }
.research-list-card h3 { max-width: 34ch; margin: 1.3rem 0 0.8rem; font-size: clamp(1.35rem, 3vw, 2rem); }
.research-list-card h3 a { color: var(--text); text-decoration: none; }
.research-list-card h3 a:hover { color: var(--accent); }
.article-meta { flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.article-summary p { max-width: 45rem; margin: 1rem 0 0; }
.article-back-link { display: inline-flex; margin-top: clamp(2.5rem, 5vw, 4rem); color: var(--text-muted); font-size: 0.82rem; text-decoration: none; }
.article-back-link::before { margin-right: 0.45rem; content: "←"; }
.article-hero h1 { position: relative; z-index: 1; max-width: 18ch; margin: 1rem 0 1.4rem; font-size: clamp(2.4rem, 5vw, 4.7rem); }
.article-hero-deck { position: relative; z-index: 1; max-width: 45rem; margin: 1.4rem 0 1.8rem; color: var(--text-muted); font-size: 1.12rem; }
.article-hero blockquote { position: relative; z-index: 1; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.article-prose { width: min(100%, var(--reading-width)); margin: clamp(2rem, 6vw, 5rem) auto; padding: clamp(1.25rem, 3vw, 2.5rem); border: 1px solid var(--line); border-radius: 0.35rem; background: var(--surface); }
.article-prose > * { max-width: 100%; }
.article-prose > * + * { margin-top: 1.3rem; }
.article-prose h2 { margin-top: 2.8rem; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.article-prose h3 { margin-top: 2.2rem; font-size: 1.35rem; }
.article-prose h4, .article-prose h5, .article-prose h6 { margin-top: 1.8rem; font-size: 1.08rem; }
.article-prose p, .article-prose li { line-height: 1.75; }
.article-prose ul, .article-prose ol { padding-left: 1.35rem; }
.article-prose li + li { margin-top: 0.5rem; }
.article-prose img { display: block; margin-inline: auto; border: 1px solid var(--line); }
.article-prose blockquote { padding: 0.25rem 0 0.25rem 1rem; margin-inline: 0; border-left: 2px solid var(--accent); }
.article-prose pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); background: #07090d; color: #d9e2eb; font-family: var(--font-mono); font-size: 0.83rem; line-height: 1.55; }
.article-prose code { font-family: var(--font-mono); }
.article-prose :not(pre) > code { font-size: 0.9em; padding: 0.12rem 0.3rem; background: var(--surface-raised); color: var(--cyan); }
.article-prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.article-prose th, .article-prose td { padding: 0.65rem; border: 1px solid var(--line); text-align: left; }
.article-prose th { color: var(--text); background: var(--surface-raised); }
.article-prose .hljs-keyword, .article-prose .hljs-selector-tag, .article-prose .hljs-title.function_ { color: #8ee7ef; }
.article-prose .hljs-string, .article-prose .hljs-attr, .article-prose .hljs-number { color: #f0bc8c; }
.article-prose .hljs-comment { color: #778492; }
.content-page > footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 0.82rem; }
.content-page > footer p { margin-bottom: 0.6rem; color: var(--text-dim); }
@media (max-width: 719px) {
  .navbar,
  .content-page main,
  .content-page > footer,
  .summary-hero,
  .research-summary-page main,
  .research-summary-page > footer,
  .article-hero,
  .research-article-page main,
  .research-article-page > footer { width: min(calc(100% - 1.5rem), var(--reading-width)); }
  .navbar { min-height: 4.7rem; }
  .content-page .primary-nav { display: none; }
  .content-page .bottom-tab-bar { display: flex; }
  .content-page > footer { padding-bottom: 7rem; }
  .content-page main > section,
  .content-page main > article > section { padding: 3.5rem 0; }
  .card-grid { grid-template-columns: 1fr; }
  .detail-card { min-height: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .research-hero-image { right: 0.8rem; width: 9.5rem; opacity: 0.35; }
  .summary-title-group { margin-top: 4.5rem; }
  .research-list-card { padding: 1.25rem; }
  .article-prose { padding: 1.15rem; }
  .article-prose pre { margin-inline: -0.25rem; }
}
@media (max-width: 479px) {
  .legal-list { grid-template-columns: 1fr; gap: 0.25rem; }
  .legal-list dt:not(:first-child) { margin-top: 1rem; }
  .article-label-row { align-items: flex-start; flex-direction: column; }
}
@media print {
  body.content-page { background: #fff; color: #000; }
  .content-page main,
  .article-prose { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; }
  .content-page > footer { padding: 1rem 0; }
}

/* ===== Light theme ===== */
@media (prefers-color-scheme: light) {
  :root {
    --page: #f3f6f8;
    --surface: #fbfcfd;
    --surface-raised: #e9eff2;
    --text: #17212b;
    --text-muted: #4f5f6d;
    --text-dim: #596b7a;
    --accent: #347c20;
    --accent-soft: rgb(52 124 32 / 10%);
    --line: rgba(23, 33, 43, 0.16);
    --line-strong: rgb(23 33 43 / 24%);
    --cyan: #087984;
    --orange: #ad5f1d;
  }
  body.lab-page::before { opacity: 0.45; }
  body.lab-page .button-primary { color: #fff; }
  body.lab-page .button-primary:hover { background: #286319; color: #fff; }
  body.lab-page .bottom-tab-bar { background: rgba(251, 252, 253, 0.92); }
}

/* ===== Shared responsive + a11y (must stay last for cascade order) ===== */
@media (max-width: 479px) {
  .logo-tagline { display: none; }
  .bottom-tab-bar { bottom: 0.55rem; width: calc(100% - 1rem); }
  .tab { flex: 1 1 0; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .terminal-replay span { width: 100%; }
}
