/* Quantory v3 production homepage styles. Approved from the staged Homepage. */

:root {
  --paper: #f2f0e9;
  --paper-bright: #fbfaf6;
  --ink: #14221f;
  --ink-soft: #42514d;
  --line: #cfcfc5;
  --line-dark: #384743;
  --navy: #0b1717;
  --navy-2: #10211f;
  --navy-3: #172b28;
  --sage: #a8c0b3;
  --sage-bright: #d7e5dc;
  --brass: #c6a15b;
  --brass-light: #e9d7ae;
  --white: #ffffff;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --page-pad: clamp(24px, 5vw, 76px);
  --max: 1440px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; min-width: 320px; overflow-x: clip; }
body, button, a { -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--brass-light); color: var(--ink); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }

.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; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; background: var(--ink); color: var(--white); padding: 12px 18px; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(242, 240, 233, .94); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; backdrop-filter: blur(14px); }
.site-header.is-scrolled { border-color: rgba(20, 34, 31, .12); box-shadow: 0 8px 30px rgba(20, 34, 31, .05); }
.nav-shell { width: min(100%, var(--max)); min-height: 82px; margin: 0 auto; padding: 0 var(--page-pad); display: flex; align-items: center; gap: 42px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 1.08rem; font-weight: 680; letter-spacing: -.025em; text-decoration: none; flex: 0 0 auto; }
.wordmark-mark { width: 31px; height: 31px; }
.wordmark-mark rect { fill: none; stroke: currentColor; stroke-width: 1.6; }
.wordmark-mark path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.primary-nav { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex: 1; }
.nav-links, .nav-actions { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.nav-links a, .text-link { color: #35433f; font-size: .79rem; font-weight: 620; letter-spacing: .015em; text-decoration: none; position: relative; }
.nav-links a::after, .text-link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 1px; background: currentColor; transition: right .25s var(--ease); }
.nav-links a:hover::after, .text-link:hover::after { right: 0; }
.nav-toggle { display: none; background: transparent; border: 0; width: 42px; height: 42px; padding: 10px; }
.nav-toggle > span:not(.sr-only) { display: block; width: 22px; height: 1px; background: currentColor; margin: 6px auto; transition: transform .2s; }

.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 24px; border: 1px solid transparent; color: var(--ink); font-size: .78rem; font-weight: 720; letter-spacing: .025em; text-decoration: none; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-small { min-height: 42px; padding: 0 19px; }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: #253632; }
.button-accent { background: var(--brass); color: #101a18; }
.button-accent:hover { background: #d4b26e; }
.button-outline { border-color: rgba(20, 34, 31, .35); background: transparent; }
.button-outline:hover { border-color: var(--ink); background: var(--paper-bright); }
.button-light { background: var(--paper-bright); color: var(--ink); margin-top: 28px; }
.quiet-link { display: inline-flex; gap: 14px; align-items: center; color: inherit; font-size: .82rem; font-weight: 680; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 5px; }
.quiet-link span { transition: transform .2s var(--ease); }
.quiet-link:hover span { transform: translate(2px, -2px); }

.hero { position: relative; overflow: hidden; }
.hero-grid { min-height: 0; max-width: var(--max); margin: 0 auto; padding: clamp(70px, 10vw, 142px) var(--page-pad) clamp(78px, 10vw, 136px); display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.eyebrow { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-family: var(--mono); font-size: .68rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow > span { width: 26px; height: 1px; background: currentColor; }
.eyebrow-light { color: var(--sage); }
.hero h1 { margin: 24px 0 24px; max-width: 1080px; font-family: var(--serif); font-size: clamp(3.8rem, 7.2vw, 7.2rem); font-weight: 400; letter-spacing: -.065em; line-height: .9; }
.hero h1 em { color: #496e62; font-weight: 400; }
.hero-lede { max-width: 690px; margin: 0; color: var(--ink-soft); font-size: clamp(1.02rem, 1.35vw, 1.25rem); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; margin-top: 38px; }
.proof-strip { margin: 72px 0 0; padding: 22px 0 0; max-width: 690px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.proof-strip div { min-width: 0; }
.proof-strip dt { color: var(--ink-soft); font-family: var(--mono); font-size: .61rem; letter-spacing: .08em; text-transform: uppercase; }
.proof-strip dd { margin: 7px 0 0; font-family: var(--mono); font-size: 1rem; font-weight: 680; font-variant-numeric: tabular-nums; }

.workspace-section { background: var(--navy); color: #edf3ef; padding: clamp(78px, 9vw, 136px) var(--page-pad); }
.section-intro { max-width: var(--max); margin: 0 auto 48px; display: grid; grid-template-columns: 1.4fr .6fr; gap: 60px; align-items: end; }
.section-intro h2 { margin: 18px 0 0; font-family: var(--serif); font-size: clamp(2.7rem, 5vw, 5rem); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.section-intro > p { margin: 0; color: #acbab5; font-size: .98rem; line-height: 1.7; max-width: 480px; justify-self: end; }
.product-frame { max-width: var(--max); margin: 0 auto; border: 1px solid #31423f; background: #0d1b1a; box-shadow: 0 50px 100px rgba(0, 0, 0, .28); }
.product-chrome { min-height: 62px; display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid #2a3c39; padding: 0 20px; }
.product-brand { display: flex; align-items: center; gap: 12px; color: #d5dfda; font-size: .75rem; font-weight: 650; }
.product-monogram { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #697a75; font-family: var(--serif); font-size: .82rem; }
.icon-button { justify-self: end; background: transparent; border: 0; color: #74857f; letter-spacing: 3px; }
.product-body { display: grid; grid-template-columns: 225px minmax(0, 1fr); }
.method-rail { min-width: 0; padding: 30px 18px 20px; border-right: 1px solid #2a3c39; background: #0a1615; display: flex; flex-direction: column; }
.rail-label, .panel-label, .canvas-kicker { margin: 0; color: #758983; font-family: var(--mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }
.method-list { display: grid; gap: 4px; margin-top: 18px; }
.method-button { width: 100%; min-height: 48px; padding: 9px 10px; display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; border: 1px solid transparent; background: transparent; color: #91a29c; text-align: left; font-size: .68rem; cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.method-button span { color: #586a64; font-family: var(--mono); font-size: .57rem; }
.method-button:hover { color: #e2ebe6; background: rgba(255, 255, 255, .035); }
.method-button.is-active { color: #f0f4f2; border-color: #40534e; background: #172926; }
.method-button.is-active span { color: var(--brass); }
.method-button:focus-visible { outline-offset: 1px; }
.rail-foot { margin-top: auto; padding: 24px 10px 6px; border-top: 1px solid #283a37; display: grid; gap: 6px; }
.rail-foot span { color: #6f817b; font-family: var(--mono); font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; }
.rail-foot strong { color: #aebbb7; font-size: .65rem; font-weight: 560; }
.analysis-canvas { padding: clamp(24px, 3vw, 42px); min-width: 0; }
.analysis-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 27px; border-bottom: 1px solid #2c3f3b; }
.analysis-head h3 { margin: 7px 0 0; font-size: clamp(1.45rem, 2vw, 2.1rem); font-weight: 480; letter-spacing: -.035em; }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .65fr); border-bottom: 1px solid #2c3f3b; }
.frontier-panel, .allocation-panel { min-width: 0; padding: 28px 0; }
.frontier-panel { padding-right: clamp(24px, 3vw, 48px); border-right: 1px solid #2c3f3b; }
.allocation-panel { padding-left: clamp(24px, 3vw, 38px); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-head h4 { margin: 5px 0 0; color: #dce6e1; font-size: .88rem; font-weight: 620; }
.legend { display: flex; gap: 17px; color: #6f817b; font-family: var(--mono); font-size: .52rem; letter-spacing: .04em; text-transform: uppercase; }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend-line { display: block; width: 17px; height: 1px; background: #6d8980; }
.legend-dot { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
.chart-wrap { margin-top: 6px; }
.frontier-chart { width: 100%; overflow: visible; }
.chart-grid path:first-child { fill: none; stroke: #4a5a56; stroke-width: 1; }
.chart-grid path:last-child { fill: none; stroke: #20312e; stroke-width: 1; }
.frontier-area { fill: url('#none'); fill: rgba(86, 118, 108, .06); }
.frontier-line { fill: none; stroke: #7da091; stroke-width: 2; }
.cloud-points circle { fill: #5c716a; opacity: .65; }
.point-halo { fill: rgba(198, 161, 91, .15); stroke: rgba(198, 161, 91, .32); }
.point-core { fill: var(--brass); }
.selected-point { transition: transform .45s var(--ease); }
.frontier-chart text { fill: #5f726b; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.chart-disclaimer { margin: -3px 0 0; color: #657872; font-size: .61rem; }
.sum-label { color: var(--brass); font-family: var(--mono); font-size: .65rem; }
.allocation-list { margin-top: 26px; display: grid; gap: 14px; }
.allocation-row { display: grid; grid-template-columns: 44px 1fr 38px; align-items: center; gap: 10px; }
.ticker { color: #b9c5c1; font-family: var(--mono); font-size: .61rem; }
.allocation-row strong { color: #dfe7e3; font-family: var(--mono); font-size: .62rem; text-align: right; font-weight: 590; font-variant-numeric: tabular-nums; }
.bar-track { height: 4px; background: #263835; overflow: hidden; }
.bar-track span { display: block; width: min(100%, calc(var(--weight) * 2)); height: 100%; background: linear-gradient(90deg, #657e75, var(--sage)); transition: width .45s var(--ease); }
.metric-ledger { margin-top: 28px; border-top: 1px solid #2b3e3a; }
.metric-ledger div { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #223431; }
.metric-ledger span { color: #71847e; font-size: .62rem; }
.metric-ledger strong { color: #dfe7e3; font-family: var(--mono); font-size: .67rem; font-weight: 570; font-variant-numeric: tabular-nums; }
.metric-note { min-height: 44px; margin: 18px 0 0; color: #80918b; font-size: .65rem; line-height: 1.55; }
.assumption-bar { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 22px; align-items: center; padding-top: 24px; }
.assumption-bar p { margin: 0; color: #c3cec9; font-size: .61rem; }
.assumption-bar p span { display: block; margin-bottom: 5px; color: #677a73; font-family: var(--mono); font-size: .52rem; letter-spacing: .07em; text-transform: uppercase; }
.assumption-bar button { border: 1px solid #3d514c; background: transparent; color: #83958f; padding: 10px 13px; font-size: .59rem; }

/* Concept E keeps Concept A's product frame and replaces only its illustrative content. */
.workflow-stage-list { list-style: none; display: grid; gap: 4px; margin: 18px 0 0; padding: 0; }
.workflow-stage-list li { position: relative; min-height: 67px; display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; padding: 10px; border: 1px solid transparent; color: #91a29c; }
.workflow-stage-list li:not(:last-child)::after { content: ""; position: absolute; left: 23px; top: 55px; height: 20px; width: 1px; background: #384d48; }
.workflow-stage-list li > span { color: #586a64; font-family: var(--mono); font-size: .57rem; }
.workflow-stage-list li strong { display: block; color: #dce5e1; font-size: .72rem; font-weight: 620; }
.workflow-stage-list li small { display: block; margin-top: 3px; color: #71847e; font-size: .58rem; line-height: 1.35; }
.workflow-stage-list li.is-active { border-color: #40534e; background: #172926; }
.workflow-stage-list li.is-active > span { color: var(--brass); }
.research-analysis-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr); }
.security-chart-wrap { margin-top: 9px; }
.security-chart { width: 100%; overflow: visible; }
.price-area { fill: rgba(86, 118, 108, .08); }
.price-line { fill: none; stroke: #86aa9a; stroke-width: 2.4; }
.research-markers circle { fill: var(--brass); stroke: #0d1b1a; stroke-width: 3; }
.security-chart text { fill: #5f726b; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.evidence-ledger { margin-top: 26px; }
.research-insight { margin-top: 24px; padding: 20px 0 0; border-top: 1px solid #2b3e3a; }
.research-insight > span { color: var(--brass); font-family: var(--mono); font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; }
.research-insight p { margin: 10px 0 0; color: #a8b8b2; font-family: var(--serif); font-size: .95rem; line-height: 1.55; }
.continuity-map { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; border-bottom: 1px solid #2c3f3b; }
.continuity-map li { position: relative; min-width: 0; padding: 22px 20px 22px 0; }
.continuity-map li + li { padding-left: 20px; border-left: 1px solid #2c3f3b; }
.continuity-map li:not(:last-child)::after { content: "→"; position: absolute; z-index: 1; top: 50%; right: -8px; color: var(--brass); font-family: var(--serif); font-size: .9rem; transform: translateY(-50%); }
.continuity-map span { display: block; color: #6f817b; font-family: var(--mono); font-size: .52rem; letter-spacing: .07em; text-transform: uppercase; }
.continuity-map strong { display: block; margin-top: 8px; color: #cbd6d1; font-family: var(--serif); font-size: .82rem; font-weight: 400; line-height: 1.4; }

.system-section, .research-section, .closing-section { max-width: var(--max); margin: 0 auto; padding: clamp(90px, 11vw, 160px) var(--page-pad); }
.system-heading, .research-head { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.system-heading h2, .research-head h2 { max-width: 840px; margin: 20px 0 0; font-family: var(--serif); font-size: clamp(2.7rem, 5.2vw, 5.2rem); font-weight: 400; line-height: 1; letter-spacing: -.05em; }
.system-heading > p:last-child, .research-head > p:last-child { margin: 44px 0 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.75; }
.system-flow { list-style: none; margin: clamp(65px, 8vw, 116px) 0 0 0; padding: 0; border-top: 1px solid var(--line); }
.system-flow li { display: grid; grid-template-columns: 90px 1fr; border-bottom: 1px solid var(--line); min-height: 190px; }
.flow-index { padding-top: 30px; color: #7d8985; font-family: var(--mono); font-size: .63rem; border-right: 1px solid var(--line); }
.flow-copy { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(260px, 1fr) auto; gap: clamp(28px, 5vw, 90px); align-items: center; padding: 30px 0 30px clamp(28px, 4vw, 62px); }
.flow-copy h3 { margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 2.4vw, 2.45rem); font-weight: 400; letter-spacing: -.035em; }
.flow-copy p { margin: 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.7; }
.flow-copy a { white-space: nowrap; font-size: .7rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.system-flow-six .flow-copy h3 { max-width: 430px; }
.flow-loop-row { position: relative; }
.flow-loop-row::after { content: "↩"; position: absolute; right: 2px; bottom: 18px; color: #8b6a2c; font-family: var(--serif); font-size: 1.45rem; }
.loop-note { margin: 38px 0 0 0; display: grid; grid-template-columns: 45px minmax(280px, 1fr) auto; gap: 22px; align-items: center; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.loop-note > span { color: #8b6a2c; font-family: var(--serif); font-size: 1.7rem; }
.loop-note p { margin: 0; color: var(--ink-soft); font-size: .78rem; }
.loop-note p strong { color: var(--ink); font-family: var(--serif); font-size: 1rem; font-weight: 400; }
.loop-note small { color: #687671; font-family: var(--mono); font-size: .55rem; letter-spacing: .06em; text-align: right; text-transform: uppercase; }

.research-section { padding-top: 0; padding-bottom: clamp(100px, 12vw, 180px); }
.research-artifact { margin: clamp(60px, 8vw, 110px) 0 0 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid #aeb2a9; background: var(--paper-bright); box-shadow: 0 28px 70px rgba(32, 43, 39, .08); }
.artifact-sidebar { padding: 38px 30px; border-right: 1px solid #c9cbc3; display: flex; flex-direction: column; min-height: 340px; }
.artifact-sidebar p, .artifact-topline { margin: 0; color: #6d7a75; font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.artifact-sidebar strong { margin-top: 18px; font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.artifact-sidebar span { margin-top: auto; color: #7c8783; font-size: .68rem; }
.artifact-main { min-width: 0; padding: 36px clamp(28px, 4vw, 58px); }
.artifact-topline { display: flex; justify-content: space-between; gap: 20px; }
.version-map { min-height: 150px; display: grid; grid-template-columns: 1fr .5fr 1fr .5fr 1fr; align-items: center; margin-top: 26px; }
.version-map > div:nth-child(odd) { display: grid; justify-items: center; text-align: center; gap: 8px; }
.version-dot { width: 11px; height: 11px; border: 2px solid #6d7c77; background: var(--paper-bright); border-radius: 50%; }
.version-line { width: 100%; height: 1px; background: #b9bdb4; }
.version-map strong { font-family: var(--mono); font-size: .7rem; }
.version-map small { color: #66736e; font-size: .66rem; }
.version-map .is-current .version-dot { border-color: var(--brass); background: var(--brass); box-shadow: 0 0 0 7px rgba(198, 161, 91, .15); }
.version-map-wide { grid-template-columns: 1fr .35fr 1fr .35fr 1fr .35fr 1fr; }
.artifact-summary { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #d2d3cd; }
.artifact-summary div { padding: 23px 20px 5px 0; }
.artifact-summary div + div { padding-left: 20px; border-left: 1px solid #d2d3cd; }
.artifact-summary span { display: block; color: #79847f; font-family: var(--mono); font-size: .54rem; letter-spacing: .07em; text-transform: uppercase; }
.artifact-summary strong { display: block; margin-top: 8px; font-size: .69rem; font-weight: 620; line-height: 1.5; }

.closing-section { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(50px, 9vw, 150px); align-items: end; }
.closing-copy h2 { max-width: 850px; margin: 20px 0 0; font-family: var(--serif); font-size: clamp(3.2rem, 5.6vw, 5.8rem); font-weight: 400; line-height: .98; letter-spacing: -.055em; }
.closing-copy > p:last-child { max-width: 600px; margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.7; }
.closing-actions { display: grid; justify-items: stretch; gap: 13px; max-width: 360px; justify-self: end; width: 100%; }
.closing-actions .quiet-link { justify-self: center; margin-top: 15px; }

.site-footer { background: #091413; color: #dce5e1; padding: 62px var(--page-pad) 22px; }
.footer-top, .footer-links, .footer-bottom { max-width: var(--max); margin-left: auto; margin-right: auto; }
.footer-top { display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: center; gap: 60px; padding-bottom: 50px; border-bottom: 1px solid #31423e; }
.wordmark-footer { color: #eef3f0; }
.footer-top p { margin: 0; color: #8fa09a; font-family: var(--serif); font-size: 1.2rem; }
.button-footer { min-height: 46px; border-color: #52645f; color: #e4ebe8; }
.button-footer:hover { background: #142522; }
.footer-links { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 50px; padding: 55px 0 70px; }
.footer-links h2 { margin: 0 0 18px; color: #738780; font-family: var(--mono); font-size: .58rem; font-weight: 560; letter-spacing: .09em; text-transform: uppercase; }
.footer-links a { display: block; width: fit-content; margin: 10px 0; color: #bdc9c4; font-size: .71rem; text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid #263834; color: #6f817b; font-family: var(--mono); font-size: .54rem; letter-spacing: .04em; text-transform: uppercase; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1160px) {
  .nav-links { gap: 19px; }
  .nav-links a { font-size: .72rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .analysis-grid { grid-template-columns: 1fr; }
  .research-analysis-grid { grid-template-columns: 1fr; }
  .frontier-panel { border-right: 0; padding-right: 0; border-bottom: 1px solid #2c3f3b; }
  .allocation-panel { padding-left: 0; }
  .allocation-list { grid-template-columns: repeat(5, 1fr); gap: 11px; }
  .allocation-row { grid-template-columns: 1fr; gap: 7px; align-items: end; }
  .allocation-row strong { text-align: left; }
  .bar-track { order: 3; }
  .metric-ledger { display: grid; grid-template-columns: repeat(3, 1fr); }
  .metric-ledger div { min-height: 56px; display: grid; gap: 5px; }
  .metric-ledger div + div { padding-left: 15px; }
  .system-heading, .research-head { grid-template-columns: 1.3fr .7fr; }
  .flow-copy { grid-template-columns: .7fr 1fr; }
  .flow-copy a { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 900px) {
  .nav-shell { min-height: 70px; justify-content: space-between; flex-wrap: wrap; padding-bottom: 20px; }
  .nav-toggle { display: none; margin-left: auto; cursor: pointer; }
  .js .nav-shell { flex-wrap: nowrap; padding-bottom: 0; }
  .js .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] > span:nth-last-child(2) { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] > span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .primary-nav { display: grid; flex-basis: 100%; gap: 26px; padding: 18px 0 10px; background: var(--paper-bright); }
  .js .primary-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; padding: 24px var(--page-pad) 30px; border-bottom: 1px solid var(--line); box-shadow: 0 22px 35px rgba(20, 34, 31, .09); }
  .js .primary-nav.is-open { display: grid; gap: 26px; }
  .nav-links { display: grid; gap: 0; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid #deded6; font-size: .86rem; }
  .nav-links a::after { display: none; }
  .nav-actions { justify-content: space-between; }
  .hero-grid { min-height: 0; grid-template-columns: 1fr; gap: 68px; padding-top: 92px; }
  .hero-copy { max-width: 100%; }
  .proof-strip { margin-top: 55px; }
  .section-intro { grid-template-columns: 1fr; gap: 24px; }
  .section-intro > p { justify-self: start; }
  .product-body { grid-template-columns: 1fr; }
  .method-rail { border-right: 0; border-bottom: 1px solid #2a3c39; padding: 20px; }
  .method-list { display: flex; overflow-x: auto; padding-bottom: 7px; scrollbar-color: #435651 transparent; }
  .method-button { flex: 0 0 165px; }
  .workflow-stage-list { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 7px; scrollbar-color: #435651 transparent; }
  .workflow-stage-list li { flex: 1 1 0; min-width: 0; }
  .workflow-stage-list li::after { display: none; }
  .rail-foot { display: none; }
  .analysis-grid { grid-template-columns: 1.2fr .8fr; }
  .research-analysis-grid { grid-template-columns: 1.2fr .8fr; }
  .frontier-panel { border-right: 1px solid #2c3f3b; border-bottom: 0; padding-right: 24px; }
  .allocation-panel { padding-left: 24px; }
  .allocation-list { display: grid; grid-template-columns: 1fr; }
  .allocation-row { grid-template-columns: 44px 1fr 38px; }
  .allocation-row strong { text-align: right; }
  .bar-track { order: initial; }
  .metric-ledger { display: block; }
  .metric-ledger div { display: flex; min-height: 37px; }
  .metric-ledger div + div { padding-left: 0; }
  .assumption-bar { grid-template-columns: repeat(3, 1fr); }
  .assumption-bar button { grid-column: 1 / -1; justify-self: start; }
  .continuity-map { grid-template-columns: repeat(2, 1fr); }
  .continuity-map li:nth-child(3) { padding-left: 0; border-top: 1px solid #2c3f3b; border-left: 0; }
  .continuity-map li:nth-child(4) { border-top: 1px solid #2c3f3b; }
  .continuity-map li:nth-child(2)::after { display: none; }
  .system-heading, .research-head { grid-template-columns: 1fr; }
  .system-heading > p:last-child, .research-head > p:last-child { grid-column: auto; margin-top: 0; max-width: 580px; }
  .system-flow, .research-artifact { margin-left: 0; }
  .loop-note { margin-left: 0; grid-template-columns: 40px 1fr; }
  .loop-note small { grid-column: 2; text-align: left; }
  .flow-copy { grid-template-columns: 1fr 1fr; }
  .research-artifact { grid-template-columns: 1fr; }
  .artifact-sidebar { min-height: 0; border-right: 0; border-bottom: 1px solid #c9cbc3; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .artifact-sidebar span { grid-column: 1 / -1; margin-top: 7px; }
  .closing-section { grid-template-columns: 1fr; align-items: start; }
  .closing-actions { justify-self: start; }
  .footer-top { grid-template-columns: 1fr auto; }
  .footer-top p { grid-column: 1 / -1; grid-row: 2; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  :root { --page-pad: 20px; }
  .hero-grid { padding-top: 72px; padding-bottom: 84px; }
  .hero h1 { font-size: clamp(3rem, 13vw, 4.4rem); line-height: .96; }
  .hero-lede { font-size: .98rem; }
  .hero-actions { align-items: stretch; gap: 20px; }
  .hero-actions .button { width: 100%; }
  .hero-actions .quiet-link { justify-self: start; width: fit-content; }
  .proof-strip { grid-template-columns: 1fr; gap: 15px; }
  .proof-strip div { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #d9d8cf; padding-bottom: 10px; }
  .proof-strip dd { margin: 0; }
  .workflow-stage-list { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .workflow-stage-list li { min-height: 72px; }
  .product-chrome { grid-template-columns: 1fr auto; }
  .analysis-canvas { padding: 22px 16px; }
  .analysis-head { align-items: flex-start; }
  .analysis-grid { grid-template-columns: 1fr; }
  .research-analysis-grid { grid-template-columns: 1fr; }
  .frontier-panel { border-right: 0; border-bottom: 1px solid #2c3f3b; padding-right: 0; }
  .allocation-panel { padding-left: 0; }
  .legend { display: none; }
  .allocation-list { grid-template-columns: 1fr; }
  .allocation-row { grid-template-columns: 44px 1fr 38px; }
  .metric-ledger { display: grid; grid-template-columns: repeat(3, 1fr); }
  .metric-ledger div { display: grid; align-content: center; gap: 5px; min-height: 66px; }
  .metric-ledger div + div { padding-left: 10px; }
  .assumption-bar { grid-template-columns: 1fr 1fr; }
  .assumption-bar p:nth-child(3) { grid-column: 1 / -1; }
  .continuity-map { grid-template-columns: 1fr; }
  .continuity-map li, .continuity-map li + li, .continuity-map li:nth-child(3) { padding: 18px 0; border-top: 1px solid #2c3f3b; border-left: 0; }
  .continuity-map li:first-child { border-top: 0; }
  .continuity-map li:not(:last-child)::after { display: block; top: auto; right: 3px; bottom: -10px; transform: rotate(90deg); }
  .system-heading, .research-head { grid-template-columns: 1fr; gap: 22px; }
  .system-heading > p:last-child, .research-head > p:last-child { grid-column: auto; }
  .system-flow, .research-artifact { margin-left: 0; }
  .loop-note { margin-left: 0; grid-template-columns: 32px 1fr; }
  .system-flow li { grid-template-columns: 48px 1fr; min-height: 0; }
  .flow-copy { grid-template-columns: 1fr; gap: 16px; padding: 28px 0 28px 22px; }
  .flow-copy a { grid-column: auto; }
  .flow-index { padding-top: 32px; }
  .artifact-topline { display: grid; }
  .version-map { grid-template-columns: 1fr; gap: 12px; justify-items: start; margin: 35px 0; }
  .version-map > div:nth-child(odd) { grid-template-columns: 20px 28px 1fr; justify-items: start; align-items: center; text-align: left; width: 100%; }
  .version-map > div:nth-child(even) { width: 1px; height: 28px; margin-left: 5px; }
  .version-line { width: 1px; height: 100%; }
  .artifact-summary { grid-template-columns: 1fr; }
  .artifact-summary div { padding: 17px 0; }
  .artifact-summary div + div { padding-left: 0; border-left: 0; border-top: 1px solid #d2d3cd; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-top p { grid-column: auto; grid-row: auto; }
  .button-footer { width: 100%; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .nav-actions { align-items: stretch; flex-direction: column; }
  .nav-actions .text-link { padding: 8px 0; }
  .proof-strip { margin-top: 46px; }
  .method-button { flex-basis: 150px; }
  .metric-ledger { grid-template-columns: 1fr; }
  .metric-ledger div { display: flex; min-height: 42px; }
  .metric-ledger div + div { padding-left: 0; }
  .assumption-bar { grid-template-columns: 1fr; }
  .assumption-bar p:nth-child(3) { grid-column: auto; }
  .footer-links { grid-template-columns: 1fr; }
}

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

@media print {
  .site-header, .hero-actions, .closing-actions, .nav-toggle { display: none; }
  body, .workspace-section, .site-footer { background: #fff; color: #000; }
  .product-frame, .research-artifact { box-shadow: none; }
}


/* Keep section headings visible below the sticky public navigation. */
#workspace, #system, #methodology { scroll-margin-top: 96px; }
