/*
 * style.css — bespoke (non-Tailwind) rules for the marketing index.html.
 * Extracted from the inline <style> block of index.html so that the page
 * complies with the Phase 1 production CSP `style-src 'self'`
 * (docs/security/headers.md §1). Tailwind utilities live in tailwind.css;
 * this file holds rules that cannot be expressed cleanly as utilities
 * (component classes, complex selectors, media queries, ::before, etc.).
 * Token references via `var(--color-nexus-*)` resolve from the @theme
 * block in input.css.
 */

/* ----------------------------------------------------------------
   Shadow tokens — soft multi-layer shadow for card depth (spec C).
   Intentionally restrained: barely perceptible lift, institutional.
   ---------------------------------------------------------------- */
:root {
  --shadow-card:
    0 1px 2px rgba(17, 24, 39, .04),
    0 4px 12px rgba(17, 24, 39, .05),
    0 14px 36px rgba(17, 24, 39, .04);
}

/* ----------------------------------------------------------------
   Base type & color
   ---------------------------------------------------------------- */
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html, body { background: #f7f5f0; }
body {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  color: #111827;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular, lining numerals — mandatory on every numeric span
   (Principle 7, html-css.md, Datawrapper / Nick Designer research). */
.num,
.tabular {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* Eyebrow / small-caps label */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Skip link — visible on keyboard focus, hidden otherwise */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #0b1220;
  color: #ffffff;
  z-index: 100;
  font-size: 13px;
  font-weight: 600;
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

/* ----------------------------------------------------------------
   Sticky nav — transparent on dark hero, white-on-scroll
   JS lives in /assets/nav.js (CSP `script-src 'self'`, no inline).
   Default state assumes the dark hero is in view; the script
   toggles `.nav-bar--scrolled` once the dark hero leaves view.
   If JS is disabled OR `IntersectionObserver` is unavailable, the
   script's fallback adds `.nav-bar--scrolled` immediately so the
   nav remains legible on white sections.
   ---------------------------------------------------------------- */
.nav-bar {
  transition:
    background-color 220ms ease,
    color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
  background-color: transparent;
  color: #e6ebf2;
  border-bottom: 1px solid transparent;
}
.nav-bar a, .nav-bar .brand { color: inherit; }
.nav-bar .nav-cta {
  border-color: rgba(230, 235, 242, 0.35);
  color: #e6ebf2;
  background-color: transparent;
}
.nav-bar .nav-cta:hover { background-color: rgba(230, 235, 242, 0.08); }
.nav-bar .nav-cta:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.nav-bar.nav-bar--scrolled {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}
.nav-bar.nav-bar--scrolled .nav-cta {
  border-color: #1a3a5c;
  color: #ffffff;
  background-color: #1a3a5c;
}
.nav-bar.nav-bar--scrolled .nav-cta:hover { background-color: var(--color-nexus-hero-surface-raised); }

/* ----------------------------------------------------------------
   Mobile navigation — hamburger button + sliding panel
   The panel is a child of .nav-bar so .nav-bar--mobile-open drives
   both the icon swap and panel display from a single toggle.
   ---------------------------------------------------------------- */
.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
  transition: border-color 140ms ease;
}
.nav-hamburger:hover { border-color: rgba(230, 235, 242, 0.35); }
.nav-bar.nav-bar--scrolled .nav-hamburger:hover { border-color: rgba(26, 58, 92, 0.25); }
.nav-hamburger:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}
/* Show hamburger on mobile only */
@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

/* Icon ↔ close swap driven by parent toggle class */
.nav-hamburger-close { display: none; }
.nav-hamburger-icon { display: block; }
.nav-bar--mobile-open .nav-hamburger-icon { display: none; }
.nav-bar--mobile-open .nav-hamburger-close { display: block; }

/* Mobile panel — full-width strip below the 64px nav bar */
.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background-color: #0b1220;
  border-top: 1px solid #1f2c44;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}
.nav-bar--mobile-open .nav-mobile-menu { display: block; }
.nav-mobile-menu-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px 28px;
  display: flex;
  flex-direction: column;
}
.nav-mobile-link {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: #c9d2df;
  text-decoration: none;
  border-bottom: 1px solid #1f2c44;
  transition: color 140ms ease;
}
.nav-mobile-link:hover { color: #ffffff; }
.nav-mobile-link:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}
.nav-mobile-link--active { color: #ffffff; font-weight: 600; }
.nav-mobile-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 20px;
  padding: 13px 20px;
  background-color: #e6ebf2;
  color: #0b1220;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid #e6ebf2;
  text-decoration: none;
  transition: background-color 140ms ease;
}
.nav-mobile-cta:hover { background-color: #ffffff; }
.nav-mobile-cta:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

/* ----------------------------------------------------------------
   Hero — the single dark gesture. One screen-height max.
   Decision 3 (2026-05-06): height clamped to 100vh (was min-height).
   Flex column with justify-between so the eyebrow/H1 cluster sits
   at the top, the foot anchor strip sits at the bottom, and the
   middle expands. Resolves the short-laptop overflow flagged by
   frontend-engineer review.
   ---------------------------------------------------------------- */
.hero-dark {
  background-color: #0b1220;
  color: #e6ebf2;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Restrained radial wash — depth without theatre */
.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 18% 38%, rgba(31, 44, 68, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 92% 80%, rgba(31, 44, 68, 0.35), transparent 70%);
  pointer-events: none;
}

/* Grain overlay — warms the flat dark hero field without any new hue.
   feTurbulence noise data-URI; opacity 0.04 keeps it barely perceptible.
   img-src data: is already allowed by the production CSP. */
.hero-dark::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23grain)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* Hero → white transition buffer.
   60px linear gradient from nexus-bg-grave to transparent, sits between
   the dark hero and the white risks section. Softens what was previously
   a hard horizontal edge at the dark/white boundary without bleeding the
   dark zone past the buffer. The element is purely decorative — pointer
   events are disabled and aria-hidden on the markup side. */
.hero-fade {
  height: 60px;
  background: linear-gradient(to bottom, var(--color-nexus-bg-grave), transparent);
  pointer-events: none;
}

/* Hero left rail — typographic anchor only */
.hero-rail {
  position: absolute;
  left: max(40px, calc((100vw - 1200px) / 2 + 40px));
  top: 96px;
  bottom: 64px;
  width: 1px;
  background-color: #1f2c44;
}

.hero-h1 {
  font-weight: 700;
  font-size: clamp(44px, 5.8vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  color: #ffffff;
  max-width: 18ch;
}
.hero-h1 .accent {
  /* Amber appearance #1 of 3 */
  color: #d97706;
}
.hero-sub {
  font-weight: 400;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.55;
  /* var(--color-nexus-hero-text-primary) on #0b1220 — measured contrast 9.4:1 (WCAG AA passes). */
  color: var(--color-nexus-hero-text-primary);
  max-width: 56ch;
}

/* CTA on dark hero — high-contrast bone on grave */
.cta-primary-dark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background-color: #e6ebf2;
  color: #0b1220;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid #e6ebf2;
  transition: background-color 160ms ease, transform 160ms ease;
}
.cta-primary-dark:hover { background-color: #ffffff; }
.cta-primary-dark:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 3px;
}

/* CTA on white sections — Nexus accent navy */
.cta-primary-light {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background-color: #1a3a5c;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid #1a3a5c;
  transition: background-color 160ms ease;
}
.cta-primary-light:hover { background-color: var(--color-nexus-hero-surface-raised); }
.cta-primary-light:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 3px;
}

/* ----------------------------------------------------------------
   Section heading on white surfaces
   ---------------------------------------------------------------- */
.section-h2 {
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: #1a1a2e;
}

/* ----------------------------------------------------------------
   Risk-strip opener — the "$2M misallocated equity" callout
   Amber appearance #2 of 3 (left-rule).
   ---------------------------------------------------------------- */
.opener-callout {
  border-left: 2px solid #d97706;
  padding: 8px 0 8px 24px;
}

/* ----------------------------------------------------------------
   Risk-strip cards (three failure modes)
   ---------------------------------------------------------------- */
.risk-card {
  position: relative;
  padding: 36px 28px 32px 28px;
  background-color: var(--color-nexus-card, #ffffff);
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-card);
  /* No amber stripe on cards — the global amber budget is spent
     on (1) hero accent, (2) opener-callout left rule, (3) compare-col-right
     amber top-rule. Three instances exactly. */
}
.risk-card .pain-noun {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #1a1a2e;
}
.risk-card .pain-line { color: #374151; font-size: 15px; line-height: 1.55; }
.risk-card .mech-line { color: #6b7280; font-size: 14px; line-height: 1.55; }
.risk-card .meta-row {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ----------------------------------------------------------------
   "Old way vs FinArrow" two-column teardown (DealRoom pattern)
   Strict 1fr 1px 1fr grid with hairline rule between columns.
   ---------------------------------------------------------------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  box-shadow: var(--shadow-card);
}
.compare-rule { background-color: #e5e7eb; }
.compare-col { padding: 56px 48px; }
.compare-col-left {
  /* Desaturated: warm stone tint, muted text — the "lesser" column */
  background-color: var(--color-nexus-bg-soft, #f0ece3);
}
.compare-col-right {
  /* White card surface pops against warm paper field.
     Amber top-rule = amber appearance #3 of 3 (replaces cta-marker which is removed). */
  background-color: var(--color-nexus-card, #ffffff);
  border-top: 3px solid var(--color-nexus-risk-amber, #d97706);
  box-shadow: var(--shadow-card);
}
.compare-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 18px;
}
.compare-h3 {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #1a1a2e;
  margin-bottom: 28px;
}
.compare-list { list-style: none; padding: 0; margin: 0; }
.compare-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid #f3f4f6;
  align-items: baseline;
}
.compare-list li:first-child { border-top: 1px solid #e5e7eb; }
.compare-list .glyph {
  /* Left column: Unicode minus — muted, low-opacity; lesser column register */
  color: #9ca3af;
  opacity: 0.7;
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}
.compare-list .glyph-right {
  /* Right column: SVG checks stroked in Nexus deep navy #1a3a5c
     — deliberately not green; restraint per direction-3.md. */
  color: #1a3a5c;
}
.compare-list .text {
  color: #374151;
  font-size: 15px;
  line-height: 1.55;
}
/* Left column body text desaturated — muted warm-gray */
.compare-col-left .compare-list .text {
  color: var(--color-nexus-text-mute, #4b5563);
}
.compare-col-left .compare-list .text strong {
  color: var(--color-nexus-text-mute, #4b5563);
  font-weight: 600;
}
.compare-col-left .compare-h3 {
  color: #4b5563;
}
.compare-col-right .compare-list .text {
  color: #1a1a2e;
}
.compare-list .text strong {
  color: #1a1a2e;
  font-weight: 600;
}
.compare-list .text .mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ----------------------------------------------------------------
   The Numbers strip — Principle 9 (specific over superlative)
   Mono numerals, big.
   ---------------------------------------------------------------- */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.numbers-cell {
  padding: 56px 32px 48px 32px;
  border-left: 1px solid #e5e7eb;
  background-color: var(--color-nexus-card, #ffffff);
}
.numbers-cell:first-child { border-left: 1px solid transparent; }
.numbers-figure {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  font-size: clamp(56px, 6.4vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums lining-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.numbers-unit {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: #6b7280;
  letter-spacing: -0.005em;
}
.numbers-label {
  margin-top: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #374151;
}
.numbers-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* ----------------------------------------------------------------
   Final CTA marker — was amber #3 of 3; amber budget moved to the
   compare-col-right 3px top-rule (spec E). Marker is now invisible
   but kept in markup for accessibility/structure. Not display:none
   because it anchors the eyebrow rhythm. Uses divider-medium tone.
   ---------------------------------------------------------------- */
.cta-marker {
  display: none;
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.footer {
  background-color: #0b1220;
  color: var(--color-nexus-hero-text-primary);
}
.footer a { color: var(--color-nexus-hero-text-primary); text-decoration: none; }
.footer a:hover { color: #ffffff; }
.footer a:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}
.footer-rule { background-color: #1f2c44; }

::selection { background-color: #1a3a5c; color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 900px) {
  .compare-grid { grid-template-columns: 1fr; }
  .compare-rule { display: none; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .numbers-cell:nth-child(3) { border-top: 1px solid #e5e7eb; }
  .numbers-cell:nth-child(4) { border-top: 1px solid #e5e7eb; }
  .numbers-cell:nth-child(odd) { border-left: 1px solid transparent; }
  .numbers-cell:nth-child(even) { border-left: 1px solid #e5e7eb; }
  .hero-rail { left: 24px; }
  .compare-col { padding: 40px 28px; }
}

/* Below 600px viewport height we relax the hero clamp so content
   isn't clipped on very short screens (mobile landscape, etc.). */
@media (max-height: 600px) {
  .hero-dark { height: auto; min-height: 100vh; }
}

/* ================================================================
   methodology.html — bespoke rules
   ----------------------------------------------------------------
   The methodology page absorbs D1's content as supporting depth
   (see docs/frontend-research/00-decision.md "Phase 1 inheritance").
   It uses the same chrome (nav, footer, palette) as index.html but
   adopts D1's working-paper register for the body: sticky-numbered
   pipeline, type-and-rules-only restraint, no illustrations, no
   amber accents (the page is content-dense, not pain-led).
   ================================================================ */

/* ----------------------------------------------------------------
   Active nav state — Methodology link is current page
   ---------------------------------------------------------------- */
.nav-active {
  position: relative;
  color: #1a1a2e;
}
.nav-bar.nav-bar--scrolled .nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background-color: #1a3a5c;
}

/* ----------------------------------------------------------------
   Masthead — compact, working-paper register (no dark hero)
   ---------------------------------------------------------------- */
.masthead {
  background-color: var(--color-nexus-card, #ffffff);
  border-bottom: 1px solid #e5e7eb;
}

.masthead-h1 {
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: #1a1a2e;
  max-width: 18ch;
}
.masthead-h1-accent {
  /* Nexus deep navy — D1 rule-strong promotion (no amber on this
     page; the methodology register is grave, not pain-led). */
  color: #1a3a5c;
}

.masthead-abstract {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: #374151;
  max-width: 56ch;
}

.masthead-meta {
  margin-top: 56px;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  font-variant-numeric: tabular-nums lining-nums;
}
.masthead-meta .meta-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.masthead-meta .meta-key {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: #9ca3af;
}
.masthead-meta .meta-val {
  color: #1a1a2e;
  font-weight: 500;
}
.masthead-meta .meta-sep {
  color: var(--color-nexus-divider-medium);
}

/* Table of contents */
.toc {
  margin-top: 48px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #f3f4f6;
}
.toc-list li {
  border-bottom: 1px solid #f3f4f6;
}
.toc-list li:nth-child(odd) {
  border-right: 1px solid #f3f4f6;
}
.toc-list a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 16px 18px 0;
  text-decoration: none;
  color: #374151;
  align-items: baseline;
  transition: color 140ms ease, background-color 140ms ease;
}
.toc-list a:hover {
  background-color: var(--color-nexus-bg-soft, #f0ece3);
  color: #1a1a2e;
}
.toc-list a:focus-visible {
  outline: 2px solid #1a3a5c;
  outline-offset: -2px;
  background-color: var(--color-nexus-bg-soft, #f0ece3);
}
.toc-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #9ca3af;
  letter-spacing: 0.02em;
}
.toc-label {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

/* ----------------------------------------------------------------
   Section header — uniform across §1..§6
   ---------------------------------------------------------------- */
.section-header {
  max-width: 760px;
}
.section-lede {
  font-size: 16px;
  line-height: 1.65;
  color: #374151;
  max-width: 60ch;
}

/* ----------------------------------------------------------------
   §1 Pipeline — sticky numbered stages (D1 lift, CSS-only)
   On desktop, .stage-num-wrap is sticky and the prose scrolls past.
   On mobile (≤900px) the sticky behaviour is dropped.
   ---------------------------------------------------------------- */
.stage-grid {
  /* No grid here at the wrapper; each .stage row carries its own
     two-column layout so the sticky calculation is per-row. */
}
.stage {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding: 56px 0 56px 0;
  border-top: 1px solid #e5e7eb;
  align-items: flex-start;
}
.stage:last-child {
  border-bottom: 1px solid #e5e7eb;
}
.stage-num-wrap {
  position: sticky;
  top: 96px;
  align-self: flex-start;
}
.stage-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: clamp(56px, 6vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums lining-nums;
}
.stage-body {
  max-width: 64ch;
}
.stage-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 14px;
}
.stage-h {
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: #1a1a2e;
  margin-bottom: 18px;
}
.stage-h .mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  letter-spacing: 0.01em;
  color: #1a3a5c;
  font-weight: 500;
}
.stage-prose {
  font-size: 16px;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 14px;
}
.stage-prose-mute {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.65;
}
.stage-prose .mono,
.stage-body .mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums lining-nums;
}
.stage-sig {
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid #e5e7eb;
  background-color: var(--color-nexus-bg-soft, #f0ece3);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}
.stage-sig-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9ca3af;
}
.stage-sig-code {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #1a3a5c;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ----------------------------------------------------------------
   §2 Ground rules — numbered cards on a soft surface
   ---------------------------------------------------------------- */
.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}
.rule-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 28px 28px 28px 24px;
  background-color: var(--color-nexus-card, #ffffff);
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  align-items: flex-start;
}
/* Subtle group separator between the three logical clusters of invariants
   (01–06 / 07–12 / 13–17). Applied to cards 07 and 13 only — at desktop
   the divider reads as a half-row tick at the start of each new group;
   at mobile single-column it spans the full card width. */
.rule-card--group-break {
  border-top: 1px solid var(--color-nexus-divider-medium);
}
.rule-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
  color: #1a3a5c;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}
.rule-rule {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.rule-rule .mono,
.rule-rule .num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #1a3a5c;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}
.rule-gloss {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  color: #6b7280;
}

/* ----------------------------------------------------------------
   §3 Anomaly cards
   ---------------------------------------------------------------- */
.anomaly-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}
.anomaly-card {
  padding: 32px 28px 28px 28px;
  background-color: var(--color-nexus-card, #ffffff);
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.anomaly-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a3a5c;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums lining-nums;
}
.anomaly-h {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #1a1a2e;
  margin-bottom: 12px;
}
.anomaly-prose {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 22px;
}
.anomaly-prose .mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: #1a1a2e;
}
.anomaly-meta {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums lining-nums;
  display: grid;
  gap: 6px;
}
.anomaly-meta > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: baseline;
}
.anomaly-meta dt {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: #9ca3af;
}
.anomaly-meta dd {
  margin: 0;
  color: #1a1a2e;
}
.anomaly-meta dd.mono,
.anomaly-meta .mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
}

/* ----------------------------------------------------------------
   §4 Determinism — pull-quote + body prose + audit trail aside
   ---------------------------------------------------------------- */
.determinism-quote {
  margin: 0 0 28px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid #1a3a5c;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #1a1a2e;
  font-style: normal;
}

.prose-body {
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
}
.prose-body-large {
  font-size: 17px;
  line-height: 1.65;
}
.prose-body-mute {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
}
.prose-body .mono,
.audit-list .mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums lining-nums;
}
.prose-body + .prose-body {
  margin-top: 16px;
}

.inline-link {
  color: #1a3a5c;
  text-decoration: underline;
  text-decoration-color: #c9d2df;
  text-underline-offset: 3px;
  transition: text-decoration-color 140ms ease;
}
.inline-link:hover {
  text-decoration-color: #1a3a5c;
}
.inline-link:focus-visible {
  outline: 2px solid #1a3a5c;
  outline-offset: 2px;
}

.audit-trail {
  border-left: 1px solid #e5e7eb;
  padding-left: 28px;
}
.audit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.audit-list li {
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}
.audit-list li:first-child {
  padding-top: 0;
}
.audit-list li:last-child {
  border-bottom: none;
}
.audit-h {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  color: #1a3a5c;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.audit-h a.inline-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
.audit-p {
  font-size: 13px;
  line-height: 1.55;
  color: #6b7280;
}

/* ----------------------------------------------------------------
   Mobile collapse — drop sticky pipeline; relax grids
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 36px 0;
  }
  .stage-num-wrap {
    position: static;
    top: auto;
  }
  .stage-num {
    font-size: 56px;
  }
  .rules-list {
    grid-template-columns: 1fr;
  }
  .anomaly-grid {
    grid-template-columns: 1fr;
  }
  .toc-list {
    grid-template-columns: 1fr;
  }
  .toc-list li:nth-child(odd) {
    border-right: none;
  }
  .audit-trail {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
    margin-top: 8px;
  }
  .nav-bar.nav-bar--scrolled .nav-active::after {
    bottom: -18px;
  }
}

/* ================================================================
   Sample-report page (frontend/marketing/sample-report.html)
   ----------------------------------------------------------------
   Three sections of a FinArrow VDD report rendered verbatim in
   marketing chrome on a synthetic target ("Project Mistral").
   The page is white-on-warm-paper throughout. Saturated RAG red
   appears ONLY inside the report-card surfaces; the surrounding
   chrome never carries red. Amber budget on this page is exactly
   3 instances of `nexus-risk-amber` (#d97706):
     1. .demo-banner left rail
     2. §01 .finding-pill--amber on the NRR header strip cell
     3. §05 .finding-pill--amber on one MED severity row
   Hex literals in this block are the canonical RAG palette taken
   from `Cursor/finarrow_vdd/reporting/html_report.py` and
   .claude/frontend/html-css.md (finding-pill / finding-card-border
   tokens). All other colors reuse Nexus tokens already declared
   in input.css's @theme block.
   ================================================================ */

/* ─── Demo banner (sticky, top of viewport, above the nav) ─── */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: var(--color-ev-bg-soft);
  border-bottom: 1px solid var(--color-ev-border);
  border-left: 3px solid var(--color-nexus-risk-amber); /* amber instance 1 of 3 */
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-ev-body);
  padding: 8px 0;
  letter-spacing: 0.01em;
}
.demo-banner-glyph {
  font-size: 13px;
  color: var(--color-nexus-risk-amber); /* amber instance 1 — same token re-used; not a new instance */
  flex-shrink: 0;
}
.demo-banner-text {
  font-size: 12px;
  color: var(--color-ev-body);
  letter-spacing: 0.005em;
}
.demo-banner-text strong {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  margin-right: 2px;
  color: var(--color-ev-body);
}
.demo-banner-sep {
  color: var(--color-nexus-risk-amber);
  margin: 0 6px;
  opacity: 0.6;
}

/* The fixed nav on this page sits below the sticky banner. Push the
   nav down by the banner height (~36px). The brief specifies the
   banner sits ABOVE the nav. We achieve that by leaving .nav-bar's
   `top` at 0 and giving the banner sticky positioning + z-index 60
   above the nav (z-50 in index.html's nav). The banner takes its
   space at the top of the document; the nav then `position: fixed`
   under it with a calc top. We override the `top: 0` here to push
   the nav to start below the banner height. */
body:has(.demo-banner) .nav-bar {
  top: 36px;
}

/* ─── Page-level wrapper paddings ─── */
.sr-main {
  background-color: var(--color-nexus-bg);
}

/* Masthead — compact, restrained */
.sr-masthead {
  border-bottom: 1px solid var(--color-nexus-divider-soft);
}
.sr-h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--color-nexus-text-heading);
}
.sr-lede {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-nexus-text-secondary);
}

/* Masthead meta block (right-rail key/val) */
.sr-meta {
  display: grid;
  gap: 10px;
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
}
.sr-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 14px;
  border-bottom: 1px solid var(--color-nexus-divider-soft);
  padding-bottom: 8px;
}
.sr-meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.sr-meta-key {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-nexus-text-mute-light);
  font-family: 'Inter', sans-serif;
}
.sr-meta-val {
  color: var(--color-nexus-text-heading);
  font-weight: 500;
}

/* TOC strip — three section anchors, mirrors report register */
.sr-toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--color-nexus-divider-strong);
  border-left: 1px solid var(--color-nexus-divider-strong);
}
.sr-toc-cell {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 24px;
  background-color: var(--color-nexus-card, #ffffff);
  border-right: 1px solid var(--color-nexus-divider-strong);
  border-bottom: 1px solid var(--color-nexus-divider-strong);
  text-decoration: none;
  color: inherit;
  transition: background-color 140ms ease;
}
.sr-toc-cell:hover {
  background-color: var(--color-nexus-bg-soft);
}
.sr-toc-cell:focus-visible {
  outline: 2px solid var(--color-nexus-accent);
  outline-offset: -2px;
}
.sr-toc-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-nexus-text-mute-light);
  font-variant-numeric: tabular-nums lining-nums;
}
.sr-toc-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-nexus-text-heading);
  letter-spacing: -0.005em;
}

/* ─── Report-card surfaces (the visually richest moments) ─── */
.sr-section {
  padding: 64px 0 12px 0;
}
.sr-section + .sr-section {
  padding-top: 24px;
}
.report-card {
  /* Explicit card-white surface so it pops against warm paper background */
  background-color: var(--color-nexus-card, #ffffff);
  border: 1px solid var(--color-nexus-divider-strong);
  /* nexus-shadow-document — soft 1px ring + a tiny lift */
  box-shadow:
    0 0 0 1px rgba(229, 231, 235, 0.6),
    0 8px 24px -16px rgba(17, 24, 39, 0.08);
  padding: 44px 48px 40px 48px;
  margin: 0;
}

/* Report-card header — big mono numeral + h2 + meta */
.report-card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-nexus-divider-strong);
  margin-bottom: 36px;
}
.report-card-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 40px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--color-nexus-text-meta);
  font-variant-numeric: tabular-nums lining-nums;
  padding-top: 4px;
}
.report-card-titlewrap { min-width: 0; }
.report-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-nexus-text-meta);
  margin-bottom: 10px;
}
.report-card-h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--color-nexus-text-heading);
  margin: 0;
  text-transform: none;
}
.report-card-meta {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-nexus-text-mute-light);
  font-variant-numeric: tabular-nums lining-nums;
  display: grid;
  gap: 4px;
  text-align: right;
  align-self: flex-start;
  padding-top: 8px;
}
.report-card-meta-key {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-nexus-text-mute-light);
  font-family: 'Inter', sans-serif;
}
.report-card-meta-val {
  color: var(--color-nexus-text-heading);
  font-weight: 500;
}

.report-card-foot {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--color-nexus-divider-strong);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.6;
}
.report-card-foot-key {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-nexus-text-mute-light);
}
.report-card-foot-val {
  color: var(--color-nexus-text-secondary);
}

/* ─── RAG header strip (used in §01 only) ─── */
.rag-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--color-nexus-divider-strong);
  margin-bottom: 36px;
}
.rag-cell {
  padding: 22px 24px 22px 24px;
  background-color: var(--color-nexus-bg-soft);
  border-right: 1px solid var(--color-nexus-divider-strong);
}
.rag-cell:last-child { border-right: none; }
.rag-cell-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-nexus-text-meta);
  margin-bottom: 14px;
}
.rag-cell-value {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-nexus-text-heading);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: 14px;
}
.rag-cell-unit {
  font-size: 18px;
  color: var(--color-nexus-text-meta);
  margin-left: 2px;
  font-weight: 400;
}
.rag-cell-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rag-cell-note {
  font-size: 12px;
  color: var(--color-nexus-text-meta);
  line-height: 1.4;
}

/* ─── Finding pills (RAG palette — saturated, used inside report cards only) ─── */
.finding-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 1px;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}
.finding-pill--green {
  background-color: var(--color-finding-pill-green-bg);
  color: var(--color-finding-pill-green-text);
}
.finding-pill--amber {
  background-color: var(--color-finding-pill-amber-bg);
  color: var(--color-nexus-risk-amber); /* amber instance 2 of 3 — only one .finding-pill--amber renders inside §01 */
}
.finding-pill--red {
  background-color: var(--color-finding-pill-red-bg);
  color: var(--color-finding-pill-red-text);
}
.finding-pill--neutral {
  background-color: var(--color-nexus-divider-strong);
  color: var(--color-nexus-text-mute);
}
.finding-pill--sm {
  font-size: 9px;
  padding: 2px 7px;
  letter-spacing: 0.12em;
}

/* ─── Finding cards (2x2 grid in §01) ─── */
.finding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--color-nexus-divider-strong);
  border-left: 1px solid var(--color-nexus-divider-strong);
}
.finding-card {
  background-color: var(--color-nexus-card, #ffffff);
  border-right: 1px solid var(--color-nexus-divider-strong);
  border-bottom: 1px solid var(--color-nexus-divider-strong);
  border-left-width: 3px;
  border-left-style: solid;
  padding: 24px 26px 24px 23px; /* 23 = 26 - 3 to keep optical alignment with the left rail */
}
.finding-card--red {
  border-left-color: var(--color-finding-pill-red-text);
}
.finding-card--amber {
  border-left-color: var(--color-nexus-risk-amber); /* reserved — not currently used on this page */
}
.finding-card--green {
  border-left-color: var(--color-finding-pill-green-text);
}
.finding-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.finding-card-id {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-nexus-text-mute-light);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums lining-nums;
}
.finding-card-h {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--color-nexus-text-heading);
  margin: 0 0 8px 0;
}
.finding-card-p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-nexus-text-secondary);
  margin: 0 0 14px 0;
}
.finding-card-p .num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--color-nexus-text-heading);
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}
.finding-card-meta {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-nexus-text-meta);
  font-variant-numeric: tabular-nums lining-nums;
  padding-top: 12px;
  border-top: 1px solid var(--color-nexus-divider-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

/* meta tag and separator — generic */
.meta-tag {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-nexus-text-meta);
  letter-spacing: 0.01em;
}
.meta-sep {
  color: var(--color-nexus-divider-medium);
}

.mono-inline {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--color-nexus-text-heading);
  letter-spacing: 0.01em;
  font-weight: 500;
}

/* ─── 4-up stat strip (§03) ─── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--color-nexus-divider-strong);
  margin-bottom: 36px;
  background-color: var(--color-nexus-bg-soft);
}
.stat-cell {
  padding: 24px 24px 22px 24px;
  border-right: 1px solid var(--color-nexus-divider-strong);
  background-color: var(--color-nexus-bg-soft);
}
.stat-cell:last-child { border-right: none; }
.stat-cell-value {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--color-nexus-text-heading);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: 10px;
}
.stat-cell-unit {
  font-size: 16px;
  color: var(--color-nexus-text-meta);
  margin-left: 1px;
  font-weight: 400;
}
.stat-cell-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-nexus-text-heading);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.stat-cell-sub {
  font-size: 11px;
  color: var(--color-nexus-text-meta);
  line-height: 1.4;
}

/* ─── 5-up count strip (§05) ─── */
.count-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--color-nexus-divider-strong);
  margin-bottom: 28px;
  background-color: var(--color-nexus-bg-soft);
}
.count-cell {
  padding: 22px 18px;
  border-right: 1px solid var(--color-nexus-divider-strong);
  background-color: var(--color-nexus-bg-soft);
}
.count-cell:last-child { border-right: none; }
.count-cell-value {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  color: var(--color-nexus-text-heading);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: 10px;
}
.count-cell-label {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-nexus-accent);
  letter-spacing: 0.01em;
  font-weight: 500;
  margin-bottom: 4px;
  word-break: break-word;
}
.count-cell-sub {
  font-size: 10px;
  color: var(--color-nexus-text-meta);
  line-height: 1.4;
  font-family: 'Inter', sans-serif;
}

/* ─── Report tables (the report's actual tabular look) ─── */
.report-subhead-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-nexus-divider-soft);
}
.report-subhead {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-nexus-text-secondary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-nexus-divider-soft);
}
.report-subhead-wrap .report-subhead {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.report-subhead-aside {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-nexus-text-meta);
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-shrink: 0;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--color-nexus-text-primary);
}
.report-table thead th {
  background-color: var(--color-nexus-bg-soft);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-nexus-text-meta);
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-nexus-divider-strong);
  border-top: 1px solid var(--color-nexus-divider-strong);
}
.report-table tbody td,
.report-table tbody th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-nexus-divider-soft);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}
.report-table tbody tr:last-child td,
.report-table tbody tr:last-child th {
  border-bottom: 1px solid var(--color-nexus-divider-strong);
}
.report-table .row-total th,
.report-table .row-total td {
  background-color: var(--color-nexus-bg-row-total);
  font-weight: 600;
  color: var(--color-nexus-text-heading);
  border-top: 2px solid var(--color-nexus-divider-strong);
}
.report-table .cell-label { font-weight: 500; color: var(--color-nexus-text-heading); }
.report-table .cell-indent { padding-left: 28px; font-weight: 400; color: var(--color-nexus-text-secondary); }
.report-table .cell-num {
  text-align: right;
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.report-table .cell-pos { color: var(--color-nexus-accent); }
.report-table .cell-neg { color: var(--color-nexus-text-mute); }
.report-table .cell-mono {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-nexus-text-heading);
}
.report-table--mono thead th { font-size: 10px; }
.report-table--mono tbody td { padding: 9px 12px; }
.report-table .cell-detector {
  font-size: 12px;
  color: var(--color-nexus-text-secondary);
  line-height: 1.45;
}
.report-table .text-right { text-align: right; }
.report-table .text-left { text-align: left; }

.report-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-nexus-divider-strong);
  border-bottom: none;
}

.report-table-foot {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--color-nexus-text-meta);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.report-table-foot--card {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-nexus-divider-soft);
}

/* ─── ARR bridge two-column layout ─── */
.bridge-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 36px;
  align-items: flex-start;
}
.bridge-table-wrap {
  min-width: 0;
}
.bridge-chart-wrap {
  margin: 0;
  min-width: 0;
}
.bridge-chart {
  width: 100%;
  height: auto;
  display: block;
}
.bridge-chart .bridge-baseline {
  stroke: var(--color-nexus-divider-strong);
  stroke-width: 1;
}
.bridge-chart .bridge-grid-line {
  stroke: var(--color-nexus-divider-soft);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.bridge-chart .bridge-connector {
  stroke: var(--color-nexus-divider-medium);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.bridge-chart .bridge-bar--total {
  fill: var(--color-nexus-text-heading);
}
.bridge-chart .bridge-bar--pos {
  fill: var(--color-nexus-accent);
}
.bridge-chart .bridge-bar--neg {
  fill: var(--color-nexus-text-mute-light);
}
.bridge-chart .bridge-close-pin {
  stroke: var(--color-nexus-text-heading);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0.4;
}
.bridge-chart .bridge-axis-label {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  fill: var(--color-nexus-text-mute-light);
  font-variant-numeric: tabular-nums lining-nums;
  text-anchor: end;
}
.bridge-chart .bridge-bar-num {
  font-family: 'ui-monospace', SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  fill: var(--color-nexus-text-heading);
  font-variant-numeric: tabular-nums lining-nums;
  text-anchor: middle;
  font-weight: 500;
}
.bridge-chart .bridge-bar-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  fill: var(--color-nexus-text-meta);
  text-anchor: middle;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bridge-chart .bridge-close-num {
  font-weight: 600;
  text-anchor: end;
}
.bridge-chart .bridge-close-label {
  font-weight: 600;
  fill: var(--color-nexus-text-heading);
  text-anchor: end;
}

.bridge-chart-foot {
  margin-top: 10px;
  font-size: 11px;
  color: var(--color-nexus-text-meta);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

/* ─── Post-report frame ─── */
.sr-postframe {
  background-color: var(--color-nexus-bg);
  border-top: 1px solid var(--color-nexus-divider-soft);
}

/* sr-only for table captions and similar (Tailwind-compatible) */
.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;
}

/* ─── Mobile collapse ─── */
@media (max-width: 1000px) {
  .bridge-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
@media (max-width: 900px) {
  .report-card {
    padding: 28px 22px 26px 22px;
  }
  .report-card-header {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .report-card-meta {
    grid-column: 1 / -1;
    text-align: left;
    justify-self: start;
  }
  .report-card-num { font-size: 32px; }
  .report-card-h2 { font-size: 19px; }
  .report-card-foot { grid-template-columns: 1fr; gap: 8px; }
  .rag-strip,
  .stat-strip,
  .count-strip,
  .finding-grid,
  .sr-toc {
    grid-template-columns: 1fr;
  }
  .rag-cell,
  .stat-cell,
  .count-cell {
    border-right: none;
    border-bottom: 1px solid var(--color-nexus-divider-strong);
  }
  .rag-cell:last-child,
  .stat-cell:last-child,
  .count-cell:last-child {
    border-bottom: none;
  }
}
