/* ModelBreeder.com — dependency-free publication system */
:root {
    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --bg: #06141f;
    --bg-elevated: #0a1d2b;
    --bg-soft: #0d2637;
    --surface: #102d40;
    --surface-2: #14364b;
    --surface-3: #1a4158;
    --text: #eff9ff;
    --text-soft: #bed0dc;
    --muted: #89a2b3;
    --border: rgba(180, 222, 244, .17);
    --border-strong: rgba(180, 222, 244, .32);
    --accent: #51d6c3;
    --accent-strong: #25bfa8;
    --accent-soft: rgba(81, 214, 195, .14);
    --secondary: #78a9ff;
    --secondary-soft: rgba(120, 169, 255, .13);
    --warm: #f4bf67;
    --danger: #ff8f95;
    --success: #72e0a1;
    --shadow: 0 22px 60px rgba(0, 5, 12, .32);
    --shadow-soft: 0 12px 34px rgba(0, 5, 12, .19);
    --radius-sm: .55rem;
    --radius: .9rem;
    --radius-lg: 1.35rem;
    --radius-xl: 2rem;
    --shell: 96rem;
    --article: 68rem;
    --header-height: 4.6rem;
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #f6fafc;
    --bg-elevated: #ffffff;
    --bg-soft: #eef5f8;
    --surface: #ffffff;
    --surface-2: #eaf4f6;
    --surface-3: #dcecef;
    --text: #102431;
    --text-soft: #425d6c;
    --muted: #657d8b;
    --border: rgba(27, 72, 92, .14);
    --border-strong: rgba(27, 72, 92, .26);
    --accent: #087d70;
    --accent-strong: #05695f;
    --accent-soft: rgba(8, 125, 112, .1);
    --secondary: #295ea8;
    --secondary-soft: rgba(41, 94, 168, .09);
    --warm: #9c6812;
    --danger: #bd3d48;
    --success: #147343;
    --shadow: 0 22px 60px rgba(31, 66, 83, .13);
    --shadow-soft: 0 12px 34px rgba(31, 66, 83, .09);
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }
body {
    margin: 0;
    min-width: 20rem;
    overflow-x: clip;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 34rem;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 5%, rgba(81, 214, 195, .10), transparent 34%),
        radial-gradient(circle at 87% 8%, rgba(120, 169, 255, .11), transparent 38%);
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
code, pre { font-family: var(--font-mono); }
::selection { color: #04201b; background: #82f0db; }

.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;
}
.skip-link {
    position: fixed;
    top: .7rem;
    left: .7rem;
    z-index: 1000;
    padding: .75rem 1rem;
    color: #05221d;
    background: #82f0db;
    border-radius: var(--radius-sm);
    transform: translateY(-160%);
    transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }
.shell { width: min(calc(100% - 2.4rem), var(--shell)); margin-inline: auto; }

/* Header and navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(18px) saturate(140%);
}
.site-header__inner { min-height: var(--header-height); display: flex; align-items: center; gap: .85rem; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__mark { width: 2.15rem; height: 2.15rem; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.brand__text { display: flex; align-items: baseline; letter-spacing: -.02em; }
.brand__text strong { font-size: 1.02rem; }
.brand__text small { color: var(--muted); font-size: .78rem; }
.primary-nav { display: flex; align-items: center; gap: .08rem; margin-left: auto; }
.primary-nav a {
    padding: .5rem .46rem;
    border-radius: .5rem;
    color: var(--text-soft);
    font-size: .77rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.primary-nav a:hover { color: var(--text); background: var(--accent-soft); }
.primary-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: .35rem; }
.icon-button {
    display: inline-grid;
    width: 2.3rem;
    height: 2.3rem;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: .68rem;
    color: var(--text-soft);
    background: var(--bg-elevated);
}
.icon-button:hover { color: var(--accent); border-color: var(--border-strong); }
.icon-button svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-toggle { display: none; margin-left: auto; width: 2.6rem; height: 2.6rem; padding: .6rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--bg-elevated); }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--text); }

/* Shared typography and buttons */
.eyebrow { display: inline-block; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .115em; line-height: 1.3; text-transform: uppercase; }
.button {
    display: inline-flex;
    min-height: 2.85rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .72rem 1.08rem;
    border: 1px solid transparent;
    border-radius: .72rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { color: #04211d; background: var(--accent); box-shadow: 0 10px 30px rgba(37, 191, 168, .18); }
.button--primary:hover { color: #021b17; background: #7bead8; }
.button--secondary { color: var(--text); background: var(--bg-elevated); border-color: var(--border-strong); }
.button--secondary:hover { background: var(--surface); }
.button--ghost { color: var(--text-soft); background: transparent; border-color: var(--border); }
.text-link { font-weight: 750; text-decoration: none; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: .2rem .55rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text-soft);
    background: var(--bg-soft);
    font-size: .68rem;
    font-weight: 760;
    line-height: 1.2;
    letter-spacing: .025em;
}
.privacy-chip { display: inline-flex; padding: .35rem .62rem; border: 1px solid rgba(114, 224, 161, .3); border-radius: 999px; color: var(--success); background: rgba(114, 224, 161, .08); font-size: .72rem; font-weight: 750; white-space: nowrap; }

/* Home */
.hero { overflow: hidden; }
.hero--home { padding: clamp(3.8rem, 8vw, 8rem) 0 4rem; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(24rem, .92fr); align-items: center; gap: clamp(2rem, 5vw, 5.5rem); }
.hero__copy h1 { max-width: min(100%, 20ch); margin: .65rem 0 1.2rem; font-size: clamp(2.7rem, 5.8vw, 5.3rem); font-weight: 780; letter-spacing: -.058em; line-height: .98; text-wrap: balance; }
.hero__copy h1 span { color: var(--accent); }
.hero__lede { max-width: 41rem; margin: 0; color: var(--text-soft); font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.7rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1rem 2.3rem; margin: 2.35rem 0 0; }
.hero-stats div { min-width: 7rem; }
.hero-stats dt { color: var(--text); font-size: 1.55rem; font-weight: 780; line-height: 1; }
.hero-stats dd { margin: .4rem 0 0; color: var(--muted); font-size: .77rem; }
.hero__visual { position: relative; isolation: isolate; }
.hero__visual::before { content: ""; position: absolute; inset: 12%; z-index: -1; border-radius: 50%; background: rgba(81, 214, 195, .09); filter: blur(55px); }
.hero__visual svg { display: block; width: 100%; }
.hero-orbit { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 5 9; }
.hero-orbit--2 { stroke: rgba(81, 214, 195, .35); }
.hero-glow { color: rgba(81, 214, 195, .18); }
.hero-lines path { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.hero-nodes circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.hero-nodes circle:first-child { fill: var(--accent-soft); stroke-width: 3; }
.hero__visual text { fill: var(--text-soft); font: 700 12px var(--font-sans); letter-spacing: .05em; }

.hero__visual--ecology { width: 100%; }
.home-ecology-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: center; padding: 1.05rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(81, 214, 195, .10), rgba(91, 141, 239, .08)); box-shadow: var(--shadow-soft); }
.flow-node { min-height: 4rem; display: grid; place-items: center; gap: .2rem; padding: .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-elevated); color: var(--text); font-size: .82rem; font-weight: 750; text-align: center; }
.flow-node span { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; line-height: 1.35; }
.flow-node--wide { grid-column: span 1; }
.flow-node--accent { border-color: rgba(81, 214, 195, .7); background: var(--accent-soft); }
.flow-arrow { color: var(--accent); font-weight: 900; text-align: center; }
.flow-note { grid-column: 1 / -1; padding: .75rem .9rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-soft); font-size: .78rem; text-align: center; background: rgba(255,255,255,.025); }
.callout-panel--compact { align-items: center; }
.callout-panel--compact h2 { margin-bottom: .35rem; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 44rem; }

.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section--tight { padding: 0 0 2rem; }
.section--surface { border-block: 1px solid var(--border); background: linear-gradient(180deg, color-mix(in srgb, var(--bg-soft) 72%, transparent), color-mix(in srgb, var(--bg-elevated) 78%, transparent)); }
.principle-strip { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elevated); box-shadow: var(--shadow-soft); overflow: hidden; }
.principle-strip div { padding: 1.2rem; border-right: 1px solid var(--border); }
.principle-strip div:last-child { border: 0; }
.principle-strip strong, .principle-strip span { display: block; }
.principle-strip strong { color: var(--accent); font-size: .82rem; }
.principle-strip span { margin-top: .32rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.section-heading { max-width: 49rem; margin-bottom: 2rem; }
.section-heading h2 { margin: .45rem 0 .7rem; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.045em; line-height: 1.08; }
.section-heading p { margin: 0; color: var(--text-soft); font-size: 1.05rem; }
.section-heading--split { display: grid; max-width: none; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 2rem; }
.section-heading--split > p { max-width: 32rem; justify-self: end; }
.concept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.concept-grid article, .track-card, .content-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); box-shadow: var(--shadow-soft); }
.concept-grid article { padding: 1.4rem; }
.concept-number { display: block; margin-bottom: 2.7rem; color: var(--accent); font: 700 .75rem var(--font-mono); }
.concept-grid h3 { margin: 0 0 .55rem; font-size: 1.12rem; }
.concept-grid p { margin: 0; color: var(--text-soft); font-size: .88rem; }
.track-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.track-card { display: flex; min-height: 18rem; flex-direction: column; padding: 1.45rem; }
.track-card > span { color: var(--accent); font: 700 .75rem var(--font-mono); }
.track-card h3 { margin: 2.1rem 0 .75rem; font-size: 1.35rem; line-height: 1.2; }
.track-card p { margin: 0 0 1.3rem; color: var(--text-soft); font-size: .88rem; }
.track-card a { margin-top: auto; font-weight: 760; text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card-grid--compact { grid-template-columns: repeat(4, 1fr); }
.content-card { display: flex; min-height: 15rem; flex-direction: column; padding: 1.35rem; transition: transform .16s ease, border-color .16s ease; }
.content-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.content-card__meta, .research-card__top { display: flex; justify-content: space-between; gap: .75rem; color: var(--muted); font-size: .72rem; }
.content-card h3 { margin: 2rem 0 .65rem; font-size: 1.2rem; line-height: 1.25; }
.content-card h3 a { color: var(--text); text-decoration: none; }
.content-card h3 a:hover { color: var(--accent); }
.content-card p { margin: 0; color: var(--text-soft); font-size: .84rem; }
.content-card__footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 1.15rem; }
.callout-panel { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--border-strong); border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--accent-soft), var(--secondary-soft)); }
.callout-panel h2 { margin: .4rem 0 .5rem; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.035em; }
.callout-panel p { max-width: 48rem; margin: 0; color: var(--text-soft); }

/* Generic page and article — dense, liquid, space-aware reading surfaces */
.page-hero { padding: clamp(1.8rem, 3.2vw, 3.2rem) 0 2rem; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, transparent, var(--bg-elevated)); }
.page-hero--compact { padding-bottom: 2.3rem; }
.page-hero h1 { max-width: min(100%, 26ch); margin: .45rem 0 .75rem; font-size: clamp(1.9rem, 3.2vw, 3.3rem); letter-spacing: -.045em; line-height: 1.04; text-wrap: balance; }
.page-hero p { max-width: 78ch; margin: 0; color: var(--text-soft); font-size: clamp(1rem, 1.2vw, 1.08rem); }
.hero-stats--inline { margin-top: 1.8rem; }
.article-shell { padding-bottom: 5rem; }
.breadcrumbs { padding: 1.05rem 0; color: var(--muted); font-size: .75rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .42rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .42rem; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.article-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem); align-items: end; gap: 1rem clamp(1.4rem, 3vw, 3rem); max-width: none; padding: clamp(1.1rem, 2.2vw, 2rem) 0 1.55rem; }
.article-hero__meta { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; color: var(--muted); font-size: .74rem; }
.article-hero h1 { grid-column: 1; max-width: min(100%, 28ch); margin: .5rem 0 .7rem; font-size: clamp(1.9rem, 3.2vw, 3.25rem); letter-spacing: -.045em; line-height: 1.04; text-wrap: balance; }
.article-hero > p { grid-column: 1; max-width: 80ch; margin: 0; color: var(--text-soft); font-size: clamp(1rem, 1.35vw, 1.14rem); line-height: 1.58; }
.evidence-bar { grid-column: 2; grid-row: 1 / span 3; display: grid; grid-template-columns: 1fr; width: 100%; margin-top: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; align-self: end; }
.evidence-bar span { display: flex; flex-direction: column; gap: .12rem; padding: .68rem .8rem; border-right: 0; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: .74rem; }
.evidence-bar span:last-child { border-bottom: 0; }
.evidence-bar strong { color: var(--muted); font-size: .66rem; letter-spacing: .055em; text-transform: uppercase; }
.article-layout { display: grid; grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); align-items: start; justify-content: stretch; gap: clamp(1rem, 2.2vw, 2.2rem); }
.article-sidebar { position: sticky; top: calc(var(--header-height) + 1rem); display: grid; max-height: calc(100vh - var(--header-height) - 2rem); gap: .8rem; overflow: auto; scrollbar-width: thin; }
.toc, .section-nav { padding: .78rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.toc__title, .section-nav__title { margin-bottom: .65rem; color: var(--text); font-size: .72rem; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: .22rem 0; line-height: 1.35; }
.toc__level-3 { padding-left: .75rem; }
.toc__level-4 { padding-left: 1.4rem; }
.toc a, .section-nav a { display: block; padding: .24rem .3rem; border-radius: .35rem; color: var(--muted); font-size: .7rem; text-decoration: none; }
.toc a:hover, .section-nav a:hover { color: var(--text); background: var(--accent-soft); }
.toc a.is-active, .section-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.section-nav { max-height: 22rem; overflow: auto; }
.article-content { min-width: 0; width: 100%; }
.prose { color: var(--text-soft); font-size: clamp(.97rem, .92rem + .18vw, 1.04rem); line-height: 1.62; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); letter-spacing: -.028em; line-height: 1.2; }
.prose h2 { max-width: 30ch; margin: 2.7rem 0 .85rem; padding-top: .2rem; font-size: clamp(1.55rem, 2.4vw, 2.05rem); }
.prose h3 { max-width: 42ch; margin: 2rem 0 .65rem; font-size: 1.26rem; }
.prose h4 { max-width: 50ch; margin: 1.6rem 0 .55rem; font-size: 1.04rem; }
.prose p { max-width: 76ch; margin: 0 0 1.05rem; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { max-width: 76ch; margin: 0 0 1.2rem; padding-left: 1.25rem; }
.prose li { margin: .38rem 0; padding-left: .25rem; }
.prose li::marker { color: var(--accent); }
.prose blockquote { max-width: 80ch; margin: 1.35rem 0; padding: .85rem 1rem; border-left: .24rem solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); background: var(--accent-soft); }
.prose blockquote p { margin: 0; }

.prose > .table-scroll,
.prose > .code-block,
.prose > .diagram-card,
.prose > .source-panel,
.prose > .tool-shell,
.prose > .metrics-grid,
.prose > .cards,
.prose > figure,
.prose > table { max-width: none; }
.prose p + .table-scroll,
.prose p + .code-block,
.prose p + .diagram-card { margin-top: 1rem; }

.prose hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--border); }
.prose a { font-weight: 650; }
.prose :not(pre) > code { padding: .16em .38em; border: 1px solid var(--border); border-radius: .34rem; color: var(--warm); background: var(--bg-elevated); font-size: .86em; overflow-wrap: anywhere; }
.source-figure-placeholder { display: inline-flex; padding: .1rem .42rem; border: 1px dashed var(--border-strong); border-radius: .35rem; color: var(--muted); font-size: .78rem; }
.code-block { width: 100%; margin: 1.35rem 0 1.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: #041019; box-shadow: var(--shadow-soft); overflow: hidden; }
html[data-theme="light"] .code-block { background: #132532; }
.code-block__bar { display: flex; align-items: center; justify-content: space-between; padding: .55rem .85rem; border-bottom: 1px solid rgba(200, 235, 250, .13); color: #9db6c4; font: 700 .69rem var(--font-mono); text-transform: uppercase; }
.copy-code { padding: .26rem .55rem; border: 1px solid rgba(200, 235, 250, .16); border-radius: .35rem; color: #cfe6f2; background: rgba(255, 255, 255, .04); font-size: .69rem; text-transform: none; }
.copy-code:hover { color: #82f0db; border-color: rgba(130, 240, 219, .4); }
.code-block pre { margin: 0; padding: 1.1rem; overflow: auto; color: #d7e8ef; font-size: .82rem; line-height: 1.65; tab-size: 4; }
.table-scroll { width: 100%; margin: 1.35rem 0 1.8rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.prose table { width: 100%; min-width: 38rem; border-collapse: collapse; background: var(--bg-elevated); font-size: .82rem; }
.prose th, .prose td { padding: .75rem .85rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { position: sticky; top: 0; color: var(--text); background: var(--surface); font-size: .72rem; letter-spacing: .025em; }
.prose tr:last-child td { border-bottom: 0; }
.source-panel { width: 100%; margin-top: 3rem; padding: 1.1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-elevated); }
.source-panel h2 { margin: 0 0 .5rem; padding: 0; font-size: 1.35rem; }
.source-panel > p { color: var(--muted); font-size: .82rem; }
.source-list { display: grid; gap: .65rem; margin-top: 1rem; }
.source-list a { display: grid; gap: .15rem; padding: .85rem; border: 1px solid var(--border); border-radius: .6rem; color: var(--text); background: var(--bg-soft); text-decoration: none; }
.source-list a:hover { border-color: var(--accent); }
.source-list span, .source-list small { color: var(--muted); font-size: .68rem; }
.article-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 4rem 0; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-pagination a { display: flex; min-height: 6.5rem; flex-direction: column; justify-content: center; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--bg-elevated); text-decoration: none; }
.article-pagination a:hover { border-color: var(--accent); }
.article-pagination span { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.article-pagination__next { align-items: flex-end; text-align: right; }
.related-guides { margin-top: 4rem; }

/* Diagrams */
.diagram-card { width: 100%; margin: 1.45rem 0 1.9rem; padding: .85rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elevated); box-shadow: var(--shadow-soft); overflow: hidden; }
.diagram-card--wide { margin-inline: 0; }
.diagram-card figcaption { padding: .75rem .4rem .1rem; color: var(--muted); font-size: .75rem; text-align: center; }
.diagram-svg { display: block; width: 100%; height: auto; }
.diagram-node rect, .diagram-node circle { fill: var(--surface); stroke: var(--border-strong); stroke-width: 2; }
.diagram-node--accent rect, .diagram-node--accent circle { fill: var(--accent-soft); stroke: var(--accent); }
.diagram-node--muted rect { fill: var(--bg-soft); }
.diagram-node text { fill: var(--text); font: 750 15px var(--font-sans); letter-spacing: .02em; }
.diagram-node .diagram-label { fill: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.diagram-arrow { fill: none; stroke: var(--border-strong); stroke-width: 2.2; }
.diagram-arrow--dashed { stroke-dasharray: 7 6; }
.diagram-arrow-head { fill: var(--accent); }
.layer-stack, .research-ladder { display: grid; gap: .65rem; padding: .2rem; }
.layer-stack__item, .research-ladder > div { display: grid; grid-template-columns: 10rem 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--bg-soft); }
.layer-stack__item strong, .research-ladder strong { color: var(--accent); }
.layer-stack__item span, .research-ladder span { color: var(--text-soft); font-size: .84rem; }
.layer-stack__item em { color: var(--muted); font-size: .72rem; }
.pipeline-diagram { display: grid; grid-template-columns: repeat(6, 1fr); gap: .55rem; margin: 0; padding: .4rem; list-style: none; }
.pipeline-diagram li { position: relative; min-height: 7rem; padding: 1rem .7rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--bg-soft); text-align: center; }
.pipeline-diagram li:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -.48rem; z-index: 2; color: var(--accent); transform: translateY(-50%); }
.pipeline-diagram strong, .pipeline-diagram span { display: block; }
.pipeline-diagram strong { color: var(--text); font-size: .84rem; }
.pipeline-diagram span { margin-top: .45rem; color: var(--muted); font-size: .68rem; }

/* Search and research */
.search-form { display: flex; max-width: 48rem; gap: .7rem; margin-top: 1.5rem; }
.search-form input { min-width: 0; flex: 1; padding: .82rem 1rem; border: 1px solid var(--border-strong); border-radius: .72rem; color: var(--text); background: var(--bg-elevated); outline: none; }
.search-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-results { padding-block: 3rem 6rem; }
.empty-state { max-width: 48rem; padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elevated); }
.empty-state h2 { margin-top: 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.tag-cloud a { padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); background: var(--bg-soft); font-size: .75rem; text-decoration: none; }
.result-count { color: var(--muted); }
.search-list { display: grid; gap: .75rem; }
.search-list article { padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.search-list span { color: var(--muted); font-size: .7rem; }
.search-list h3 { margin: .25rem 0 .4rem; }
.search-list h3 a { color: var(--text); text-decoration: none; }
.search-list p { margin: 0; color: var(--text-soft); font-size: .85rem; }
.research-layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); align-items: start; gap: 3rem; padding-block: 3.5rem 6rem; }
.research-filter { position: sticky; top: calc(var(--header-height) + 1.5rem); padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.research-filter h2 { margin: 0 0 .55rem; font-size: 1rem; }
.research-filter p { color: var(--muted); font-size: .78rem; }
.research-filter a { font-size: .78rem; font-weight: 700; text-decoration: none; }
.research-group + .research-group { margin-top: 4rem; }
.research-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.research-card { padding: 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.research-card h3 { margin: 1.4rem 0 .55rem; font-size: 1.08rem; line-height: 1.3; }
.research-card h3 a { color: var(--text); text-decoration: none; }
.research-card p { color: var(--text-soft); font-size: .8rem; }
.research-card__actions { display: flex; gap: .9rem; margin: 1rem 0; }
.research-card__actions a { font-size: .75rem; font-weight: 750; text-decoration: none; }
.research-card > code { color: var(--muted); font-size: .64rem; }
.article-hero--report { max-width: 76rem; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.7rem; }
.report-actions > span { color: var(--muted); font-size: .68rem; }
.report-actions code { overflow-wrap: anywhere; }
.research-warning { max-width: 76rem; margin: 0 0 2rem; padding: 1rem 1.2rem; border: 1px solid rgba(244, 191, 103, .3); border-radius: var(--radius); background: rgba(244, 191, 103, .08); }
.research-warning strong { color: var(--warm); }
.research-warning p { margin: .25rem 0 0; color: var(--text-soft); font-size: .82rem; }
.report-content { max-width: none; }

/* Interactive tools */
.interactive-tool { margin: 1.8rem 0 2.4rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--bg-elevated), var(--bg-soft)); box-shadow: var(--shadow-soft); }
.interactive-tool__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.3rem; }
.interactive-tool__header h3 { margin: .35rem 0 .4rem; color: var(--text); font-size: 1.45rem; }
.interactive-tool__header p { max-width: 42rem; margin: 0; color: var(--muted); font-size: .82rem; }
.tool-form { display: grid; gap: 1rem; }
.tool-grid--two { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.tool-fieldset, .release-checklist fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg-elevated); }
.tool-fieldset legend, .release-checklist legend { padding: 0 .35rem; color: var(--text); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.range-field { display: grid; gap: .25rem; margin: .75rem 0; }
.range-field > span { display: flex; justify-content: space-between; color: var(--text-soft); font-size: .78rem; }
.range-field output { color: var(--accent); font-family: var(--font-mono); font-weight: 750; }
.range-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.tool-details { border: 1px solid var(--border); border-radius: .7rem; background: var(--bg-elevated); }
.tool-details summary { padding: .75rem 1rem; color: var(--text); font-size: .8rem; font-weight: 750; }
.weight-grid, .select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; padding: 0 1rem 1rem; }
.weight-grid label, .select-grid label { display: grid; gap: .3rem; color: var(--muted); font-size: .72rem; }
.weight-grid input, .select-grid select { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--text); background: var(--bg-soft); }
.select-grid { padding: 0; }
.check-row { display: flex; align-items: flex-start; gap: .7rem; padding: .62rem .7rem; border-radius: .5rem; color: var(--text-soft); font-size: .78rem; }
.check-row:hover { background: var(--accent-soft); }
.check-row input { flex: 0 0 auto; margin-top: .22rem; accent-color: var(--accent); }
.check-row span { display: grid; gap: .12rem; }
.check-row small { color: var(--muted); }
.check-row--critical { border: 1px solid var(--border); background: var(--bg-elevated); }
.tool-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; padding: .9rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg-elevated); }
.tool-result > div { display: grid; gap: .15rem; padding: .6rem; }
.tool-result span { color: var(--muted); font-size: .7rem; }
.tool-result strong { color: var(--text); font: 780 1.6rem var(--font-mono); }
.tool-result__primary { border-radius: .55rem; background: var(--accent-soft); }
.tool-result p { grid-column: 1 / -1; margin: .2rem .6rem 0; color: var(--text-soft); font-size: .8rem; }
.architecture-results { margin-top: .4rem; }
.architecture-rank { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: start; gap: .8rem; padding: .9rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--bg-elevated); }
.architecture-rank + .architecture-rank { margin-top: .55rem; }
.architecture-rank__number { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; color: #04211d; background: var(--accent); font-weight: 800; }
.architecture-rank h4 { margin: 0 0 .3rem; color: var(--text); font-size: .95rem; }
.architecture-rank p { margin: 0; color: var(--muted); font-size: .75rem; }
.architecture-rank strong { color: var(--accent); font: 750 .8rem var(--font-mono); }
.release-progress { margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--bg-elevated); }
.release-progress > div { display: flex; justify-content: space-between; margin-bottom: .45rem; color: var(--muted); font-size: .76rem; }
.release-progress strong { color: var(--danger); }
.release-progress strong.is-ready { color: var(--success); }
.release-progress progress { width: 100%; height: .55rem; accent-color: var(--accent); }
.release-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.release-checklist fieldset:last-of-type { grid-column: 1 / -1; }
.tool-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .55rem; }


.mini-table { width: 100%; margin-top: .9rem; border-collapse: collapse; font-size: .78rem; }
.mini-table th, .mini-table td { padding: .55rem .65rem; border-bottom: 1px solid var(--border); text-align: left; }
.mini-table th { color: var(--text); font-weight: 800; }
.mini-table td { color: var(--text-soft); font-family: var(--font-mono); }
.sim-results { display: grid; gap: .75rem; }
.lineage-view { margin-top: 1rem; }
.lineage-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; counter-reset: lineage; }
.lineage-list li { counter-increment: lineage; position: relative; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .75rem; padding: .8rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg-elevated); }
.lineage-list li::before { content: counter(lineage); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; color: #04211d; background: var(--accent); font-weight: 800; }
.lineage-list strong { color: var(--text); }
.lineage-list span { grid-column: 2; color: var(--muted); font-size: .76rem; }
.packet-output { margin-top: 1rem; padding: 1rem; overflow-x: auto; border: 1px solid var(--border); border-radius: .75rem; color: var(--text-soft); background: var(--bg-elevated); font-size: .78rem; }
.tool-form textarea, .tool-form input[type="text"], .tool-form input[type="number"] { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--text); background: var(--bg-soft); }
.tool-form textarea { resize: vertical; min-height: 5rem; font: inherit; }
.tool-note { color: var(--muted); font-size: .78rem; }

/* Error and footer */
.error-page { min-height: 68vh; padding: 7rem 0; }
.error-code { display: block; color: var(--border-strong); font-size: clamp(5rem, 16vw, 12rem); font-weight: 850; letter-spacing: -.08em; line-height: .75; }
.error-page h1 { max-width: 14ch; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -.05em; }
.site-footer { border-top: 1px solid var(--border); background: #041019; }
html[data-theme="light"] .site-footer { background: #e9f2f5; }
.site-footer__grid { display: grid; grid-template-columns: 1.8fr repeat(3, 1fr); gap: 2.5rem; padding-block: 3.8rem; }
.site-footer__grid--with-creator { grid-template-columns: 1.55fr repeat(4, minmax(0, 1fr)); gap: 2rem; }
.brand--footer { margin-bottom: 1rem; }
.site-footer p { max-width: 24rem; color: var(--text-soft); font-size: .84rem; }
.site-footer .footer-note { color: var(--muted); font-size: .72rem; }
.footer-contact a { display: inline-flex; align-items: center; justify-content: center; margin-top: .35rem; padding: .62rem .8rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--accent) !important; font-weight: 780; }
.site-footer h2 { margin: 0 0 .8rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer__grid > div:not(:first-child) { display: flex; flex-direction: column; align-items: flex-start; gap: .48rem; }
.site-footer__grid a:not(.brand) { color: var(--text-soft); font-size: .78rem; text-decoration: none; }
.site-footer__grid a:hover { color: var(--accent); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .68rem; }
.site-footer__bottom a { color: var(--accent); text-decoration: none; }

/* Focus and motion */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, white); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Responsive */
@media (max-width: 78rem) {
    .nav-toggle { display: block; }
    .primary-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        display: none;
        max-height: calc(100vh - var(--header-height));
        flex-direction: column;
        align-items: stretch;
        gap: .2rem;
        padding: .8rem 1.2rem 1.2rem;
        border-bottom: 1px solid var(--border);
        background: var(--bg-elevated);
        overflow: auto;
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav a { padding: .72rem .8rem; font-size: .86rem; }
    .header-actions { margin-left: .1rem; }
    .concept-grid, .track-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid--compact { grid-template-columns: repeat(2, 1fr); }
    .article-layout { grid-template-columns: minmax(11.5rem, 13.5rem) minmax(0, 1fr); gap: 1.25rem; }
}
@media (max-width: 61rem) {
    .article-hero { display: block; }
    .evidence-bar { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); width: 100%; margin-top: 1.25rem; }
    .evidence-bar span { border-bottom: 0; border-right: 1px solid var(--border); }
    .evidence-bar span:last-child { border-right: 0; }
    .hero__grid { grid-template-columns: 1fr; }
    .hero__copy h1 { max-width: 18ch; }
    .hero__visual { max-width: 34rem; margin-inline: auto; }
    .principle-strip { grid-template-columns: repeat(2, 1fr); }
    .principle-strip div { border-bottom: 1px solid var(--border); }
    .principle-strip div:nth-child(2n) { border-right: 0; }
    .principle-strip div:last-child { grid-column: 1 / -1; border-bottom: 0; }
    .section-heading--split { grid-template-columns: 1fr; }
    .section-heading--split > p { justify-self: start; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout { display: block; }
    .article-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; max-height: none; margin-bottom: 2.5rem; overflow: visible; }
    .article-sidebar .section-nav { max-height: 18rem; }
    .research-layout { grid-template-columns: 1fr; }
    .research-filter { position: static; }
    .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }
    .site-footer__grid--with-creator { grid-template-columns: 1.5fr 1fr 1fr; }
    .site-footer__grid > div:last-child { grid-column: auto; }
    .pipeline-diagram { grid-template-columns: repeat(3, 1fr); }
    .pipeline-diagram li:nth-child(3)::after { display: none; }
}
@media (max-width: 44rem) {
    .shell { width: min(calc(100% - 1.3rem), var(--shell)); }
    .brand__text { display: none; }
    .hero--home { padding-top: 3rem; }
    .hero__copy h1 { font-size: clamp(2.3rem, 11vw, 3.8rem); }
    .principle-strip, .concept-grid, .track-grid, .card-grid, .card-grid--compact, .research-list { grid-template-columns: 1fr; }
    .principle-strip div, .principle-strip div:nth-child(2n) { border-right: 0; border-bottom: 1px solid var(--border); }
    .principle-strip div:last-child { grid-column: auto; }
    .callout-panel { align-items: flex-start; flex-direction: column; }
    .article-hero h1, .page-hero h1 { font-size: clamp(1.85rem, 8.5vw, 3rem); }
    .evidence-bar { grid-template-columns: 1fr; }
    .evidence-bar span { border-right: 0; border-bottom: 1px solid var(--border); }
    .evidence-bar span:last-child { border-bottom: 0; }
    .article-sidebar { grid-template-columns: 1fr; }
    .article-pagination { grid-template-columns: 1fr; }
    .search-form { flex-direction: column; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
    .site-footer__grid--with-creator { grid-template-columns: 1fr 1fr; }
    .site-footer__grid > div:first-child { grid-column: 1 / -1; }
    .site-footer__grid > div:last-child { grid-column: auto; }
    .site-footer__bottom { flex-direction: column; }
    .layer-stack__item, .research-ladder > div { grid-template-columns: 1fr; gap: .25rem; }
    .pipeline-diagram { grid-template-columns: 1fr 1fr; }
    .pipeline-diagram li:nth-child(2n)::after { display: none; }
    .tool-grid--two, .release-checklist, .select-grid, .weight-grid, .tool-result { grid-template-columns: 1fr; }
    .release-checklist fieldset:last-of-type, .tool-actions { grid-column: auto; }
    .tool-result p { grid-column: auto; }
    .interactive-tool__header { flex-direction: column; }
    .architecture-rank { grid-template-columns: 2.4rem minmax(0, 1fr); }
    .architecture-rank > strong { grid-column: 2; }
}
@media print {
    :root { --bg: #fff; --text: #111; --text-soft: #333; --muted: #555; --border: #bbb; --bg-elevated: #fff; --bg-soft: #f5f5f5; --surface: #eee; }
    .site-header, .site-footer, .article-sidebar, .hero__visual, .copy-code, .button, .tool-actions { display: none !important; }
    body { background: #fff; color: #111; font-size: 10.5pt; }
    .article-layout { display: block; }
    .article-content { max-width: none; }
    .code-block { break-inside: avoid; }
    a { color: #111; text-decoration: underline; }
}

.search-suggestions {
    position: relative;
    z-index: 10;
    display: grid;
    max-width: 48rem;
    margin-top: .55rem;
    padding: .45rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
}
.search-suggestions[hidden] { display: none; }
.search-suggestions a { display: grid; gap: .12rem; padding: .7rem .8rem; border-radius: .55rem; color: var(--text); text-decoration: none; }
.search-suggestions a:hover { background: var(--accent-soft); }
.search-suggestions span, .search-suggestions small { color: var(--muted); font-size: .68rem; }
.search-suggestions strong { font-size: .83rem; }
.tool-note { margin: .8rem 0 0; color: var(--muted); font-size: .74rem; }

.apex-diagram { overflow: visible; }
.apex-lanes {
    display: grid;
    gap: 1.15rem;
    padding: clamp(1rem, 2.4vw, 1.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-elevated));
}
.apex-lane {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    align-items: stretch;
    gap: .65rem;
}
.apex-lane__title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: .65rem .75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.apex-step {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3.2rem;
    padding: .7rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: .78rem;
    line-height: 1.35;
    box-shadow: var(--shadow-soft);
}
.apex-step::after {
    content: "→";
    position: absolute;
    right: -.52rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-weight: 800;
}
.apex-lane .apex-step:last-child::after { display: none; }
.apex-lane--request .apex-step { border-color: color-mix(in oklab, var(--accent) 26%, var(--border)); }
.apex-lane--evolution .apex-step { border-color: color-mix(in oklab, var(--secondary) 24%, var(--border)); }
.apex-lane-bridge {
    padding: .85rem 1rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
}
.apex-foundation {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-top: .25rem;
}
.apex-foundation span {
    padding: .45rem .65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}
@media (max-width: 52rem) {
    .apex-lane { grid-template-columns: 1fr; }
    .apex-step::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -.78rem;
        transform: translateX(50%);
    }
}
@media print {
    .apex-lanes { background: #fff; }
    .apex-step, .apex-lane__title, .apex-foundation span { box-shadow: none; }
}

/* v2.3.0 source-alignment and executable-theory additions */
.source-alignment-map,
.runtime-pipeline {
    display: grid;
    gap: .8rem;
    align-items: stretch;
}
.source-alignment-map { grid-template-columns: 1fr auto 1fr auto 1fr; }
.source-map-column,
.runtime-node {
    display: grid;
    gap: .45rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--bg-elevated);
}
.source-map-column strong,
.runtime-node { color: var(--text); }
.source-map-column span {
    display: block;
    padding: .45rem .55rem;
    border-radius: .5rem;
    color: var(--text-soft);
    background: var(--bg-soft);
    font-size: .78rem;
}
.source-map-column--accent { border-color: var(--border-strong); background: var(--accent-soft); }
.source-map-arrow {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-weight: 900;
}
.runtime-pipeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.runtime-node {
    min-height: 7.5rem;
    align-content: center;
    text-align: center;
    font-weight: 820;
}
.runtime-node small { color: var(--muted); font-weight: 650; }
.runtime-node--accent { border-color: var(--border-strong); background: var(--accent-soft); }
.sim-results,
.population-output,
.lineage-view,
.lineage-viewer,
.lineage-details,
.packet-output,
.release-packet-output {
    margin-top: 1rem;
}
.sim-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
}
.sim-grid div {
    padding: .9rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--bg-elevated);
}
.sim-grid span {
    display: block;
    color: var(--muted);
    font-size: .7rem;
}
.sim-grid strong {
    color: var(--accent);
    font: 800 1.45rem var(--font-mono);
}
.lineage-viewer {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    gap: 1rem;
    align-items: start;
}
.lineage-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
}
.lineage-node {
    max-width: 12rem;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    color: var(--text);
    background: var(--bg-elevated);
    text-align: left;
    cursor: pointer;
}
.lineage-node strong,
.lineage-node span,
.lineage-node small { display: block; }
.lineage-node span { margin-top: .2rem; color: var(--text-soft); font-size: .72rem; }
.lineage-node small { margin-top: .25rem; color: var(--accent); font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; }
.lineage-node:hover { border-color: var(--border-strong); }
.lineage-edge { color: var(--muted); }
.packet-output {
    display: block;
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    color: var(--text-soft);
    background: var(--bg-elevated);
    font: .78rem/1.6 var(--font-mono);
    white-space: pre-wrap;
}
.tool-form textarea,
.tool-form input[type="text"],
.tool-form input[type="number"] {
    width: 100%;
    padding: .55rem .6rem;
    border: 1px solid var(--border);
    border-radius: .5rem;
    color: var(--text);
    background: var(--bg-soft);
}
.tool-form label { color: var(--muted); font-size: .72rem; }
.tool-note { color: var(--muted); font-size: .78rem; }
@media (max-width: 73rem) {
    .runtime-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .source-alignment-map { grid-template-columns: 1fr; }
    .source-map-arrow { transform: rotate(90deg); }
    .sim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lineage-viewer { grid-template-columns: 1fr; }
}
@media (max-width: 44rem) {
    .runtime-pipeline,
    .sim-grid { grid-template-columns: 1fr; }
}

/* v2.6.0 Evolution dashboard */
.interactive-tool--wide { max-width: none; }
.evolution-dashboard-output { display: grid; gap: .9rem; margin-top: 1rem; }
.evolution-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, .8fr); gap: .8rem; align-items: stretch; }
.evolution-chart, .evolution-next { padding: 1rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--bg-elevated); }
.evolution-chart h4, .evolution-next h4 { margin: 0 0 .75rem; color: var(--text); font-size: .95rem; }
.evolution-bars { display: flex; align-items: end; gap: .35rem; min-height: 5.4rem; padding: .6rem; border-radius: .7rem; background: var(--bg-soft); }
.evolution-bars span { flex: 1; min-width: .6rem; border-radius: .35rem .35rem .15rem .15rem; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); }
.evolution-chart p { margin: .65rem 0 0; color: var(--muted); font-size: .75rem; }
.evolution-next dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.evolution-next div { padding: .7rem; border-radius: .65rem; background: var(--bg-soft); }
.evolution-next dt { color: var(--muted); font-size: .68rem; }
.evolution-next dd { margin: .15rem 0 0; color: var(--text); font: 780 .9rem var(--font-mono); }
.evolution-kpis strong { font-size: 1.45rem; }
@media (max-width: 58rem) {
    .evolution-dashboard-grid { grid-template-columns: 1fr; }
    .evolution-next dl { grid-template-columns: 1fr; }
}

.answer-first-card {
    margin: 1.5rem 0 1.75rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(91, 245, 213, 0.1), rgba(130, 177, 255, 0.08));
    box-shadow: var(--shadow-soft);
}
.answer-first-card h2 {
    margin: 0.25rem 0 0.6rem;
    font-size: clamp(1.25rem, 1.8vw, 1.9rem);
    letter-spacing: -0.02em;
}
.answer-first-card p {
    margin: 0;
    max-width: 85ch;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.65;
}
