:root {
  --nav-height: 3.5rem;
  --max: 88rem;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
button { color: inherit; }

.site-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: var(--nav-height);
  padding: 0 max(1.2rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
}
.brand { color: var(--text); font: 900 .72rem/1 var(--font-ui); letter-spacing: .06em; text-decoration: none; }
.nav-links { display: flex; justify-content: center; gap: clamp(.9rem, 2vw, 2rem); }
.nav-links a { color: var(--muted); font: 750 .68rem/1 var(--font-ui); text-decoration: none; }
.nav-links a:hover,
.nav-links a.is-current { color: var(--text); }
.nav-toggle { display: none; border: 0; background: transparent; font: 800 .67rem var(--font-ui); }
.theme-button { width: 2.2rem; height: 2.2rem; border: 1px solid var(--rule); background: var(--surface); font: 800 .9rem var(--font-ui); cursor: pointer; }

.hero { min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; padding: clamp(6rem, 10vw, 10rem) max(1.3rem, calc((100vw - var(--max)) / 2)); }
.hero__inner { width: 100%; }
.eyebrow,
.kicker { margin: 0; color: var(--violet); font: 850 .68rem/1.35 var(--font-ui); text-transform: uppercase; letter-spacing: .075em; }
.hero h1 { max-width: 76rem; margin: 1.2rem 0 2rem; font-size: clamp(3.6rem, 8.1vw, 8.2rem); line-height: .9; letter-spacing: -.065em; }
.hero h1 em { color: var(--violet); font-style: normal; }
.hero__dek { max-width: 63rem; margin: 0 0 3rem; color: var(--text-2); font-size: clamp(1.05rem, 1.8vw, 1.45rem); line-height: 1.55; }
.hero__thesis { display: grid; grid-template-columns: 10rem 1fr; gap: 2rem; max-width: 72rem; padding: 1.3rem 0; border-block: 1px solid var(--rule); }
.hero__thesis span { color: var(--muted); font: 800 .66rem var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.hero__thesis p { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.hero__scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 72rem; margin-top: 1.4rem; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.hero__scope p { margin: 0; padding: 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hero__scope strong { display: block; margin-bottom: .45rem; font: 800 .7rem var(--font-ui); }
.hero__scope span { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.section { padding: clamp(5rem, 8vw, 8rem) max(1.3rem, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--rule); }
.section-heading { max-width: 76rem; margin-bottom: 3.5rem; }
.section-heading--split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 5rem; max-width: none; align-items: end; }
.section-heading h2 { margin: .8rem 0 0; font-size: clamp(2.5rem, 5vw, 5.2rem); line-height: .98; letter-spacing: -.055em; }
.section-heading > p,
.section-heading--split > p { margin: 0; color: var(--text-2); font-size: .96rem; line-height: 1.62; }

.section--map { background: var(--surface); }
.route-controls { display: flex; flex-wrap: wrap; gap: .2rem; padding: .2rem; border: 1px solid var(--rule); background: var(--bg); }
.route-controls button { flex: 1 1 10rem; min-height: 2.55rem; padding: .55rem .75rem; border: 0; background: transparent; color: var(--muted); font: 800 .68rem/1.25 var(--font-ui); cursor: pointer; }
.route-controls button:hover { color: var(--text); }
.route-controls button.is-active { background: var(--text); color: var(--bg); }
.route-status { min-height: 1.3rem; margin: .8rem 0 2rem; color: var(--muted); font: 650 .72rem/1.5 var(--font-ui); }

.map-legend { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; margin-bottom: 1rem; color: var(--muted); font: 700 .63rem/1.3 var(--font-ui); }
.map-legend span { display: inline-flex; gap: .45rem; align-items: center; }
.map-legend b { padding: .16rem .28rem; border: 1px solid var(--rule); color: var(--violet); font: 850 .54rem/1 var(--font-ui); }
.legend-swatch { width: .7rem; height: .7rem; border: 1px solid var(--rule); }
.legend-swatch--orientation { background: var(--text); }
.legend-swatch--core { background: var(--cyan-soft); }
.legend-swatch--deep { background: var(--surface-2); }
.legend-swatch--application { background: var(--violet-soft); }

.map-stage { position: relative; min-height: 910px; border: 1px solid var(--rule); background: var(--bg); overflow: hidden; }
.map-connectors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.connector { fill: none; stroke: var(--rule); stroke-width: 2; vector-effect: non-scaling-stroke; }
.connector--research { stroke: var(--cyan); }
.connector--practice { stroke: var(--violet); }
.connector--measurement { stroke: var(--green); }
.connector--application,
.connector--package { stroke-dasharray: 6 5; }
.connector--spine { stroke: var(--green); stroke-dasharray: 3 5; }

.content-node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: opacity 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.content-node:hover { border-color: var(--text); }
.content-node:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.content-node.is-selected { border-color: var(--text); box-shadow: inset .35rem 0 0 var(--text); }
.content-node.is-dimmed { opacity: .24; }
.content-node__role { color: var(--muted); font: 850 .58rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .07em; }
.content-node strong { margin: auto 0 .55rem; font: 850 clamp(.8rem, 1.15vw, 1.05rem)/1.2 var(--font-ui); }
.content-node small { color: var(--text-2); font: 650 .64rem/1.4 var(--font-ui); }
.surface-mark { position: absolute; top: .8rem; right: .8rem; padding: .15rem .25rem; border: 1px solid var(--rule); color: var(--violet); font: 850 .5rem/1 var(--font-ui); }

.content-node--orientation { left: 38%; top: 24px; width: 24%; height: 96px; background: var(--text); color: var(--bg); }
.content-node--orientation .content-node__role,
.content-node--orientation small { color: color-mix(in srgb, var(--bg) 68%, transparent); }
.content-node--orientation.is-selected { border-color: var(--text); box-shadow: inset .35rem 0 0 var(--violet); }
.content-node--core { top: 158px; width: 42%; height: 118px; }
.content-node--research { left: 4%; background: var(--cyan-soft); }
.content-node--practice { left: 54%; background: var(--violet-soft); }
.content-node--scorecard { left: 29%; top: 315px; width: 42%; height: 100px; background: color-mix(in srgb, var(--green) 13%, var(--surface)); }
.content-node--deep { top: 460px; height: 140px; background: var(--surface); }
.content-node--skills { left: 1.5%; width: 14.5%; }
.content-node--vision { left: 18%; width: 14.5%; }
.content-node--forecast { left: 34.5%; width: 14.5%; }
.content-node--benchmark { left: 51%; width: 14.5%; }
.content-node--human { left: 67.5%; width: 14.5%; }
.content-node--learning { left: 84%; width: 14.5%; }
.content-node--application { top: 675px; width: 26%; height: 120px; background: var(--surface-2); }
.content-node--vizier { left: 4%; }
.content-node--editorial { left: 37%; }
.content-node--audience { left: 70%; }
.evidence-spine { position: absolute; z-index: 2; left: 3%; right: 3%; top: 840px; display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--rule); border-left: .35rem solid var(--green); background: var(--surface); }
.evidence-spine strong { font: 850 .72rem/1.3 var(--font-ui); }
.evidence-spine span { color: var(--muted); font: 650 .66rem/1.4 var(--font-ui); text-align: right; }

.node-detail { display: grid; grid-template-columns: .75fr 1.25fr; margin-top: 1.2rem; border: 1px solid var(--rule); background: var(--bg); }
.node-detail__identity { padding: 1.5rem; border-right: 1px solid var(--rule); }
.node-detail__identity span { color: var(--violet); font: 850 .63rem var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.node-detail__identity h3 { margin: 3rem 0 1rem; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.04em; }
.node-detail__identity p { margin: 0; color: var(--text-2); font-size: .86rem; line-height: 1.55; }
.node-detail__link { display: inline-block; margin-top: 1.1rem; color: var(--text); font: 850 .72rem/1.3 var(--font-ui); text-decoration-thickness: .08rem; text-underline-offset: .2rem; }
.node-detail__link[hidden] { display: none; }
.node-detail__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.node-detail__fields div { min-width: 0; padding: 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.node-detail__fields div:nth-child(2n) { border-right: 0; }
.node-detail__fields .node-detail__file { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.node-detail dt { margin-bottom: .45rem; color: var(--muted); font: 850 .6rem var(--font-ui); text-transform: uppercase; letter-spacing: .055em; }
.node-detail dd { margin: 0; color: var(--text-2); font-size: .75rem; line-height: 1.52; }
.node-detail code { color: var(--text); font: 700 .68rem/1.5 var(--font-numeric); overflow-wrap: anywhere; }
.node-components { grid-column: 1 / -1; min-width: 0; border-top: 1px solid var(--rule); }
.node-components__heading { display: grid; grid-template-columns: .75fr 1.25fr; align-items: end; }
.node-components__heading > * { margin: 0; padding: 1rem 1.5rem; }
.node-components__heading > div { border-right: 1px solid var(--rule); }
.node-components__heading span { color: var(--violet); font: 850 .6rem var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.node-components__heading h3 { margin: .55rem 0 0; font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.08; letter-spacing: -.025em; }
.node-components__heading > p { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.component-ledger { margin: 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; counter-reset: component; }
.component-ledger li { display: grid; grid-template-columns: 2.5rem 8.5rem minmax(12rem, .8fr) 1.2fr; align-items: start; min-width: 0; border-bottom: 1px solid var(--rule); counter-increment: component; }
.component-ledger li:last-child { border-bottom: 0; }
.component-ledger li::before,
.component-ledger li > * { min-width: 0; padding: .9rem 1rem; }
.component-ledger li::before { content: counter(component, decimal-leading-zero); color: var(--muted); font: 800 .61rem/1.35 var(--font-numeric); }
.component-ledger li > span { color: var(--violet); font: 850 .58rem/1.35 var(--font-ui); text-transform: uppercase; letter-spacing: .055em; }
.component-ledger li > strong { font: 850 .78rem/1.35 var(--font-ui); }
.component-ledger li > p { margin: 0; color: var(--text-2); font-size: .72rem; line-height: 1.5; }

.reader-routes,
.coverage-map { border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.reader-routes__head,
.reader-routes > article,
.coverage-map__head,
.coverage-map > article { display: grid; grid-template-columns: 1.1fr .9fr 1.2fr 1fr; }
.reader-routes__head > *,
.reader-routes > article > *,
.coverage-map__head > *,
.coverage-map > article > * { min-width: 0; margin: 0; padding: 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.reader-routes__head span,
.coverage-map__head span { color: var(--muted); font: 850 .62rem var(--font-ui); text-transform: uppercase; letter-spacing: .055em; }
.reader-routes h3,
.coverage-map h3 { font: 850 .9rem/1.3 var(--font-ui); }
.reader-routes p,
.coverage-map p { color: var(--text-2); font-size: .76rem; line-height: 1.5; }
.reader-routes strong { color: var(--text); font-family: var(--font-ui); }

.section--coverage { background: var(--surface); }
.coverage-state { display: table; margin-bottom: .45rem; padding: .22rem .35rem; font: 850 .58rem/1.15 var(--font-ui); text-transform: uppercase; letter-spacing: .045em; }
.coverage-state--strong { background: var(--cyan-soft); color: var(--cyan); }
.coverage-state--partial { background: var(--violet-soft); color: var(--violet); }
.two-renderings { display: grid; grid-template-columns: 1fr 9rem 1fr; margin-top: 4rem; border: 1px solid var(--rule); background: var(--bg); }
.two-renderings article { min-height: 18rem; padding: 1.5rem; }
.two-renderings article span { color: var(--violet); font: 850 .64rem var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.two-renderings article h3 { margin: 4rem 0 1rem; font-size: 1.65rem; }
.two-renderings article p { color: var(--text-2); font-size: .85rem; line-height: 1.58; }
.two-renderings__bridge { display: flex; align-items: center; justify-content: center; padding: 1rem; border-inline: 1px solid var(--rule); background: var(--violet-soft); color: var(--violet); text-align: center; font: 850 .62rem/1.45 var(--font-ui); text-transform: uppercase; letter-spacing: .045em; }

.section--gaps {
  --inverted-accent: color-mix(in srgb, var(--bg) 68%, var(--violet));
  background: var(--text);
  color: var(--bg);
}
.section--gaps .section-heading h2 { color: var(--bg); }
.section--gaps .section-heading--split > p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.gap-bridges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); border-left: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); }
.gap-bridges article { min-height: 19rem; padding: 1.2rem; border-right: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); }
.gap-bridges span { color: var(--inverted-accent); font: 850 .62rem var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.gap-bridges h3 { margin: 3.7rem 0 1rem; color: var(--bg); font-size: 1.35rem; line-height: 1.25; }
.gap-bridges p { color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: .8rem; line-height: 1.55; }
.next-surfaces { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); }
.next-surfaces > span { color: var(--inverted-accent); font: 850 .64rem var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.next-surfaces ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: 0; padding: 0; list-style: none; counter-reset: surfaces; }
.next-surfaces li { min-height: 3rem; padding: .65rem; border: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); color: color-mix(in srgb, var(--bg) 82%, transparent); font: 750 .69rem/1.4 var(--font-ui); counter-increment: surfaces; }
.next-surfaces li::before { content: counter(surfaces, decimal-leading-zero) " · "; color: var(--inverted-accent); }

.section--method { padding-block: 5rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem max(1.3rem, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--rule); }
.footer p { margin: 0; color: var(--muted); font: 750 .62rem var(--font-ui); text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 1080px) {
  .map-stage { min-height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .8rem; }
  .map-connectors { display: none; }
  .content-node { position: relative; inset: auto; width: auto; height: auto; min-height: 9.5rem; }
  .content-node--orientation,
  .content-node--core,
  .content-node--scorecard,
  .content-node--application { grid-column: 1 / -1; }
  .content-node--orientation { min-height: 7rem; }
  .content-node strong { font-size: .95rem; }
  .evidence-spine { position: relative; inset: auto; grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .site-nav { grid-template-columns: 1fr auto auto; }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: .7rem 1.2rem 1rem; border-bottom: 1px solid var(--rule); background: var(--bg); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .55rem 0; }
  .section-heading--split { grid-template-columns: 1fr; gap: 1.3rem; }
  .gap-bridges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hero { min-height: auto; padding-top: 6rem; }
  .hero h1 { font-size: clamp(3rem, 14vw, 5.1rem); overflow-wrap: anywhere; }
  .hero__thesis,
  .hero__scope { grid-template-columns: 1fr; gap: .8rem; }
  .section { padding-left: 1.1rem; padding-right: 1.1rem; }
  .section-heading h2 { font-size: clamp(2.3rem, 11vw, 3.7rem); overflow-wrap: anywhere; }
  .route-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-controls button:first-child { grid-column: 1 / -1; }
  .map-stage { grid-template-columns: 1fr; }
  .content-node,
  .content-node--orientation,
  .content-node--core,
  .content-node--scorecard,
  .content-node--application { grid-column: 1; min-height: 8rem; }
  .evidence-spine { grid-column: 1; flex-direction: column; }
  .evidence-spine span { text-align: left; }
  .node-detail { grid-template-columns: 1fr; }
  .node-detail__identity { border-right: 0; border-bottom: 1px solid var(--rule); }
  .node-detail__fields { grid-template-columns: 1fr; }
  .node-detail__fields div,
  .node-detail__fields div:nth-child(2n) { border-right: 0; }
  .node-detail__fields .node-detail__file { grid-column: 1; }
  .node-components__heading { grid-template-columns: 1fr; }
  .node-components__heading > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .component-ledger li { grid-template-columns: 2.5rem 1fr; }
  .component-ledger li::before { grid-column: 1; grid-row: 1 / 4; }
  .component-ledger li > span,
  .component-ledger li > strong,
  .component-ledger li > p { grid-column: 2; }
  .component-ledger li > span { padding-bottom: .2rem; }
  .component-ledger li > strong { padding-top: .2rem; padding-bottom: .35rem; }
  .component-ledger li > p { padding-top: .35rem; }
  .reader-routes__head,
  .coverage-map__head { display: none; }
  .reader-routes > article,
  .coverage-map > article { display: block; border-right: 1px solid var(--rule); border-bottom: 4px solid var(--rule); }
  .reader-routes > article > *,
  .coverage-map > article > * { display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; border-right: 0; }
  .reader-routes > article > *::before,
  .coverage-map > article > *::before { content: attr(data-label); color: var(--muted); font: 850 .6rem var(--font-ui); text-transform: uppercase; }
  .reader-routes h3,
  .coverage-map h3 { display: block; }
  .reader-routes h3::before,
  .coverage-map h3::before { content: none; }
  .two-renderings { grid-template-columns: 1fr; }
  .two-renderings article { min-height: 14rem; }
  .two-renderings article h3 { margin-top: 2.5rem; }
  .two-renderings__bridge { min-height: 5rem; border-inline: 0; border-block: 1px solid var(--rule); }
  .gap-bridges { grid-template-columns: 1fr; }
  .gap-bridges article { min-height: 16rem; }
  .next-surfaces { grid-template-columns: 1fr; gap: 1rem; }
  .next-surfaces ol { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}

@media (max-width: 390px) {
  .brand { font-size: .61rem; }
  .theme-button { display: none; }
  .site-nav { grid-template-columns: 1fr auto; }
  .hero h1 { font-size: 2.85rem; }
  .route-controls { grid-template-columns: 1fr; }
  .route-controls button:first-child { grid-column: 1; }
  .map-legend { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .content-node { transition: none; }
}

@media print {
  .site-nav,
  .route-controls,
  .route-status { display: none; }
  .hero { min-height: auto; }
  .map-stage { min-height: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; padding: .5rem; }
  .map-connectors { display: none; }
  .content-node { position: relative; inset: auto; width: auto; height: auto; min-height: 7rem; }
  .evidence-spine { position: relative; inset: auto; grid-column: 1 / -1; }
}
