/* landing.css — the ProveTrade landing (index.html). Phase U0 v3:
   PREMIUM MONOCHROME (D-UI-3 revised) + editorial section layouts.

   Color contract: warm near-black / off-white monochrome; the light-on-dark
   primary button is the only "accent"; white-alpha borders; green/red
   (--pnl-*) STRICTLY for PnL/risk data; --focus ice blue for focus rings and
   links. There is deliberately NO warm hue anywhere in this file.

   Layout contract (v3): no two sections share a layout — hero (copy | report),
   what-you-get (thesis + 2×2 widget grid), how-it-works (full-width pipeline
   diagram + three plain columns), export (terminal | copy), trust (glyph card
   grid), not (narrow manifesto), closing (centered CTA).

   The tokens on :root OVERRIDE style.css's values — safe because index.html is
   the only page that loads this file. Motion is transform/opacity/canvas only;
   the hero cinematic is orchestrated by landing.js via html.lp-anim +
   .lp-metrics/.lp-stamped. Without JS or under reduced motion the page is
   fully static and readable. */

/* ── Design tokens (ui-redesign-roadmap.md §4, monochrome revision) ────────── */
:root {
  /* Dark — "Refined Terminal" */
  --bg: #131312;
  --surface-1: #1B1B1A;
  --surface-2: #232322;
  --surface-3: #2B2B29;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #D9D6CF;
  --fg-strong: #F0EDE6;
  --muted: #8D8B85;
  --hint: #A5A29B;
  --accent: #F0EDE6;                      /* monochrome: the light primary IS the accent */
  --accent-hover: #FFFFFF;
  --accent-muted: rgba(255, 255, 255, 0.07);
  --brand: #53B57E;                       /* company green — dosed brand accents */
  --brand-hover: #67C791;
  --brand-muted: rgba(83, 181, 126, 0.12);
  --focus: var(--brand);                  /* focus rings + links carry the brand */
  --pnl-pos: #53B57E;
  --pnl-neg: #E05C5C;
  --danger: #E05C5C;
  --radius: 10px;
  --radius-btn: 8px;
  --radius-chip: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --veil: rgba(19, 19, 18, 0.78);         /* sticky topbar glass */
  /* Legacy names still read by style.css's base rules on this page. */
  --panel: var(--surface-1);
  --panel-2: var(--surface-2);
  --grid: #20201E;
  --dotted: rgba(255, 255, 255, 0.08);
  --row-hover: var(--surface-2);
  --warn: var(--hint);                    /* legacy alias — landing renders no warm hue */
}

:root[data-theme="light"] {
  /* Light — "Audit Paper" */
  --bg: #FAF7F1;
  --surface-1: #FFFFFF;
  --surface-2: #F3EFE8;
  --surface-3: #ECE7DD;
  --border: #E6E1D7;
  --border-strong: #D2CCBE;
  --fg: #3A3833;
  --fg-strong: #211F1B;
  --muted: #6F6B61;
  --hint: #7C776C;
  --accent: #211F1B;                      /* ink — monochrome primary on paper */
  --accent-hover: #000000;
  --accent-muted: rgba(0, 0, 0, 0.05);
  --brand: #2E7D53;
  --brand-hover: #256B46;
  --brand-muted: rgba(46, 125, 83, 0.10);
  --focus: var(--brand);
  --pnl-pos: #2E7D53;
  --pnl-neg: #C13B3B;
  --danger: #C13B3B;
  --veil: rgba(250, 247, 241, 0.82);
  --grid: #E9E4D8;
  --dotted: #E6E1D7;
  --row-hover: #F3EFE8;
  --warn: var(--hint);
}

/* ── Page frame ────────────────────────────────────────────────────────────── */
/* Native UI (scrollbars, form controls) must match the theme — without this
   Chrome paints a glaring light scrollbar on the dark page. */
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

body.lp {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 64px;
  font-size: 15px;
}
/* Absolutely positioned flip faces may poke past the viewport on narrow
   screens — clip on the content container (NOT on html/body: root-level
   overflow swaps the scroll container and has bitten Chrome's compositor). */
.lp-main { overflow-x: clip; }

::selection { background: rgba(83, 181, 126, 0.28); }

/* Living background canvas — painted by JS; a whisper, not a pattern. */
#lp-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.07;
  z-index: -1;
}
:root[data-theme="light"] #lp-bg { opacity: 0.09; }

/* ── Topbar (sticky glass) ─────────────────────────────────────────────────── */
.lp-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(40px, 7vh, 72px);
  flex-wrap: wrap;
  background: var(--veil);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lp-brand {
  color: var(--fg-strong);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
}
.lp-brand-mark { color: var(--brand); }
.lp-topbar-status {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 1px;
}
.lp-topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lp-theme-btn {
  background: transparent;
  color: var(--hint);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
}
.lp-theme-btn:hover { color: var(--fg-strong); border-color: var(--border-strong); }
.lp-theme-btn:active { transform: scale(0.94); }
.lp-theme-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.lp-lang { display: flex; }
.lp-lang-btn {
  background: transparent;
  color: var(--hint);
  border: 1px solid var(--border);
  border-left-width: 0;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.lp-lang-btn:first-child {
  border-left-width: 1px;
  border-top-left-radius: var(--radius-btn);
  border-bottom-left-radius: var(--radius-btn);
}
.lp-lang-btn:last-child {
  border-top-right-radius: var(--radius-btn);
  border-bottom-right-radius: var(--radius-btn);
}
.lp-lang-btn:hover { color: var(--fg-strong); }
.lp-lang-btn.lp-lang-active {
  background: var(--accent-muted);
  color: var(--fg-strong);
  font-weight: 700;
}
.lp-lang-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── Typographic rhythm ────────────────────────────────────────────────────
   Sections breathe (generous outer space), content inside stays dense.
   Hierarchy: mono [label] → big thesis (fg-strong) → sans lead (hint) → body. */
.lp-section, .lp-hero { margin-bottom: clamp(110px, 16vh, 170px); }
.lp-cta-block { margin-bottom: clamp(80px, 10vh, 120px); }
.lp-h2 {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 0 0 20px;
}
.lp-thesis {
  color: var(--fg-strong);
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.16;
  letter-spacing: 0.4px;
  margin: 0 0 16px;
  max-width: 24ch;
}
.lp-lead {
  color: var(--hint);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0 0 40px;
  max-width: 60ch;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  padding-top: 8px;
}
.lp-headline {
  color: var(--hint);                     /* monochrome hierarchy: dim setup line… */
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.14;
  letter-spacing: 0.5px;
  margin: 0 0 22px;
}
.lp-headline em {
  color: var(--brand);                    /* …the payoff line wears the brand */
  font-style: normal;
}
.lp-subhead {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  max-width: 58ch;
  margin: 0 0 30px;
}
.lp-microtrust {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 18px 0 0;
}

/* ── CTAs ──────────────────────────────────────────────────────────────────── */
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lp-cta {
  display: inline-block;
  background: var(--brand);               /* the primary action wears the company green */
  color: #10120F;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-btn);
  transition: transform 150ms var(--ease), background-color 150ms var(--ease),
              color 150ms var(--ease), border-color 150ms var(--ease),
              box-shadow 150ms var(--ease), opacity 250ms var(--ease);
}
:root[data-theme="light"] .lp-cta:not(.lp-cta-secondary) { color: #FAF7F1; }
.lp-cta:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(83, 181, 126, 0.25);
}
.lp-cta:active { transform: translateY(0) scale(0.98); box-shadow: none; }
.lp-cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.lp-cta-secondary {
  background: transparent;
  color: var(--fg-strong);
  border-color: var(--border-strong);
}
.lp-cta-secondary:hover {
  background: var(--brand-muted);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: none;
}

/* :has() enhancement — hovering one CTA quietly recedes its sibling. */
.lp-cta-row:has(.lp-cta:hover) .lp-cta:not(:hover) { opacity: 0.65; }

.lp-cta-block {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: 44px 24px;
}
.lp-cta-line { color: var(--fg); font-size: 1.05rem; letter-spacing: 1px; margin: 0 0 24px; }
.lp-cta-demo { margin: 16px 0 0; font-size: 0.85rem; }
.lp-cta-demo a { color: var(--focus); text-decoration: underline; text-underline-offset: 3px; }
.lp-cta-demo a:hover { color: var(--fg-strong); }
.lp-cta-demo a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── Hero visual: the self-auditing report ─────────────────────────────────── */
.lp-hero-visual {
  position: relative;
  container-type: inline-size;
}

.lp-report {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.30);
  font-size: 0.85rem;
}
:root[data-theme="light"] .lp-report { box-shadow: 0 14px 40px rgba(60, 55, 45, 0.10); }

.lp-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.lp-report-tag { color: var(--muted); font-size: 0.68rem; letter-spacing: 1.5px; }
.lp-report-head-right { display: inline-flex; align-items: center; gap: 8px; }
.lp-report-sample {
  color: var(--hint);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-chip);
  font-size: 0.6rem;
  letter-spacing: 2px;
  padding: 2px 8px;
}
.lp-replay {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1;
  padding: 3px 7px;
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease), transform 300ms var(--ease);
}
.lp-replay:hover { color: var(--fg-strong); border-color: var(--border-strong); transform: rotate(-180deg); }
.lp-replay:active { transform: rotate(-180deg) scale(0.9); }
.lp-replay:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The replay affordance only exists when the cinematic can actually play. */
html:not(.lp-anim) .lp-replay { display: none; }

/* Equity chart: SVG is the static truth; the canvas is the live retelling. */
.lp-chart {
  position: relative;
  height: clamp(120px, 22cqw, 160px);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.lp-chart-static, .lp-chart-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lp-chart-canvas { display: none; }
html.lp-anim .lp-chart-canvas { display: block; }
html.lp-anim .lp-chart-static { visibility: hidden; }

.lp-report-label {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.lp-report-verdict { margin-bottom: 14px; }
.lp-report-problem {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 16px;
}

/* The verdict stamp — red is risk semantics, allowed. Lands with the impact. */
.lp-stamp {
  position: relative;
  display: inline-block;
  color: var(--danger);
  border: 2px solid var(--danger);
  border-radius: var(--radius-chip);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 6px 14px;
  transform: rotate(-2deg);
}

/* Metric rows */
.lp-report-rows { border-top: 1px solid var(--border); }
.lp-report-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.lp-report-metric {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 1 1 auto;
}
.lp-report-value {
  color: var(--fg-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lp-report-value.lp-neg { color: var(--pnl-neg); }
.lp-num { display: inline-block; min-width: 5ch; text-align: right; }

/* Provenance badge — neutral monochrome chips (brand.md §9: "muted,
   non-alarming"); flips to its meaning on hover/focus. */
.lp-prov {
  flex: 0 0 auto;
  perspective: 300px;
}
.lp-prov-inner {
  position: relative;
  display: inline-block;
  transform-style: preserve-3d;
  transition: transform 250ms var(--ease);
}
.lp-prov:hover .lp-prov-inner,
.lp-prov:focus-within .lp-prov-inner { transform: rotateX(180deg); }
.lp-prov-face {
  display: inline-block;
  color: var(--brand);                    /* exact = verified = brand green */
  background: var(--brand-muted);
  border: 1px solid rgba(83, 181, 126, 0.35);
  border-radius: var(--radius-chip);
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  text-align: center;
  backface-visibility: hidden;
}
:root[data-theme="light"] .lp-prov-face { border-color: rgba(46, 125, 83, 0.35); }
.lp-prov-est .lp-prov-face {
  color: var(--hint);
  background: var(--accent-muted);
  border: 1px dashed var(--border-strong);
}
/* The back face overlays rightward-anchored at its natural width, so the badge
   stays as small as its front label and the flipped note can be longer. */
.lp-prov-back {
  position: absolute;
  top: 0;
  right: 0;
  width: max-content;
  max-width: 220px;
  white-space: normal;
  transform: rotateX(180deg);
  background: var(--surface-3);
  z-index: 1;
}
/* Behavioral flag line — monochrome; severity is carried by the words. */
.lp-report-flag {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--surface-2);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-chip);
  padding: 10px 12px;
  margin-top: 16px;
}
.lp-report-flag strong { color: var(--fg-strong); font-weight: 600; }
.lp-flag-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transform: translateY(-1px);
}

/* Score chips — good/bad keep PnL semantics; mid is neutral monochrome. */
.lp-report-scores { display: flex; gap: 10px; margin-top: 16px; }
.lp-score {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 10px 8px;
}
.lp-score-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lp-score-value .lp-num { min-width: 2ch; text-align: center; }
.lp-score-value.lp-score-good { color: var(--pnl-pos); }
.lp-score-value.lp-score-mid  { color: var(--fg-strong); }
.lp-score-value.lp-score-bad  { color: var(--pnl-neg); }
.lp-score-label {
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

/* Container query — when the report card itself is narrow, rows stack and
   score chips go vertical. */
@container (max-width: 380px) {
  .lp-report-row { flex-wrap: wrap; row-gap: 4px; }
  .lp-report-metric { flex-basis: 100%; }
  .lp-report-scores { flex-direction: column; }
  .lp-score { flex-direction: row; justify-content: space-between; padding: 8px 12px; }
}

/* ── Hero cinematic states (armed only under html.lp-anim) ─────────────────── */
html.lp-anim .lp-report .lp-asm { opacity: 0; }
html.lp-anim .lp-report.lp-metrics .lp-asm {
  animation: lp-rise 460ms var(--ease) both;
  animation-delay: var(--asm-delay, 0s);
}
.lp-asm-1 { --asm-delay: 0ms; }
.lp-asm-2 { --asm-delay: 60ms; }
.lp-asm-3 { --asm-delay: 150ms; }
.lp-asm-4 { --asm-delay: 240ms; }
.lp-asm-5 { --asm-delay: 480ms; }
.lp-asm-6 { --asm-delay: 620ms; }

/* Before the verdict lands, the stamp is a dashed "awaiting signature" slot —
   same box metrics as the real stamp, so nothing shifts when it hits. */
html.lp-anim .lp-report:not(.lp-stamped) .lp-stamp {
  color: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
}
html.lp-anim .lp-report.lp-stamped .lp-stamp {
  animation: lp-stamp 420ms var(--ease) both;
}
html.lp-anim .lp-report.lp-stamped {
  animation: lp-impact 300ms 240ms linear;
}
/* The stamp's shockwave — a thin ring that blooms and dies on impact. */
html.lp-anim .lp-report.lp-stamped .lp-stamp::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid var(--danger);
  border-radius: var(--radius-chip);
  opacity: 0;
  animation: lp-shockwave 460ms 250ms var(--ease) both;
  pointer-events: none;
}
@keyframes lp-shockwave {
  0%   { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.45); }
}

/* While the curve is still drawing, the not-yet-assembled report reads as a
   quiet pulsing skeleton — a form being filled in, not a void. */
html.lp-anim .lp-report:not(.lp-metrics) .lp-report-rows {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 9px,
    var(--accent-muted) 9px 27px,
    transparent 27px 38px
  );
  animation: lp-skeleton 1.1s ease-in-out infinite;
}
html.lp-anim .lp-report:not(.lp-metrics) .lp-report-flag,
html.lp-anim .lp-report:not(.lp-metrics) .lp-report-scores {
  opacity: 1;
  animation: lp-skeleton 1.1s ease-in-out infinite;
}
html.lp-anim .lp-report:not(.lp-metrics) .lp-report-flag,
html.lp-anim .lp-report:not(.lp-metrics) .lp-report-flag strong,
html.lp-anim .lp-report:not(.lp-metrics) .lp-score-value,
html.lp-anim .lp-report:not(.lp-metrics) .lp-score-label {
  color: transparent;
}
@keyframes lp-skeleton {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lp-stamp {
  0%   { opacity: 0; transform: scale(1.9) rotate(4deg); }
  62%  { opacity: 1; transform: scale(0.94) rotate(-2.6deg); }
  82%  { transform: scale(1.03) rotate(-1.7deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}
/* The physical impact: the whole report takes the hit — 2–3px, then settles. */
@keyframes lp-impact {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(1px, 2.5px); }
  40%  { transform: translate(-2px, -1px); }
  60%  { transform: translate(1.5px, 1px); }
  80%  { transform: translate(-1px, 0.5px); }
  100% { transform: translate(0, 0); }
}

/* The hero copy still greets on load (independent of the cinematic). */
.lp-hero-copy { animation: lp-rise 520ms var(--ease) both; }
.lp-hero-visual { animation: lp-rise 560ms 90ms var(--ease) both; }

/* ── Scroll-driven reveals ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    html:not(.lp-io):not([data-motion="reduced"]) .lp-reveal {
      animation: lp-rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 38%;
    }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > * {
      animation: lp-rise linear both;
      animation-timeline: view();
    }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > *:nth-child(1) { animation-range: entry 5% entry 35%; }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > *:nth-child(2) { animation-range: entry 12% entry 42%; }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > *:nth-child(3) { animation-range: entry 19% entry 49%; }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > *:nth-child(4) { animation-range: entry 26% entry 56%; }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > *:nth-child(5) { animation-range: entry 33% entry 63%; }
    html:not(.lp-io):not([data-motion="reduced"]) .lp-stagger > *:nth-child(6) { animation-range: entry 40% entry 70%; }
    /* The pipeline packet scrubs along the track as the section crosses the
       viewport — the data literally travels CSV → engine → numbers → voice. */
    html:not(.lp-io):not([data-motion="reduced"]) .lp-packet {
      animation: lp-packet linear both;
      animation-timeline: view();
      animation-range: entry 15% exit 70%;
    }
    /* The score bars in the widgets fill as they enter. */
    html:not(.lp-io):not([data-motion="reduced"]) .lp-mini-bar-fill {
      animation: lp-fill 1s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 10% entry 60%;
    }
  }
}
html.lp-io .lp-reveal,
html.lp-io .lp-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms var(--ease), transform 550ms var(--ease);
}
html.lp-io .lp-stagger > *:nth-child(2) { transition-delay: 70ms; }
html.lp-io .lp-stagger > *:nth-child(3) { transition-delay: 140ms; }
html.lp-io .lp-stagger > *:nth-child(4) { transition-delay: 210ms; }
html.lp-io .lp-stagger > *:nth-child(5) { transition-delay: 280ms; }
html.lp-io .lp-stagger > *:nth-child(6) { transition-delay: 350ms; }
html.lp-io .lp-in,
html.lp-io .lp-in > * { opacity: 1; transform: none; }
/* IO fallback: the packet loops while its section is revealed; bars fill once. */
html.lp-io .lp-reveal.lp-in .lp-packet { animation: lp-packet 2.8s ease-in-out 200ms infinite; }
html.lp-io .lp-mini-bar-fill { transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease) 250ms; }
html.lp-io .lp-in .lp-mini-bar-fill { transform: scaleX(1); }

@keyframes lp-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Section 2: What you get — 2×2 widget grid ─────────────────────────────── */
.lp-widgets {
  display: grid;
  /* 380px floor forces a clean 2×2 at desktop widths (no orphan third column). */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}
.lp-widget {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: transform 250ms var(--ease), border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.lp-widget:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
:root[data-theme="light"] .lp-widget:hover { box-shadow: 0 10px 28px rgba(60, 55, 45, 0.10); }
.lp-widget-visual {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--dotted);
}
.lp-widget-visual .lp-report-label { margin-bottom: 0; }
.lp-widget-text {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}
.lp-widget-text strong { color: var(--fg-strong); font-weight: 600; }

.lp-mini-stamp {
  align-self: flex-start;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-chip);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 10px;
  transform: rotate(-2deg);
}

.lp-mini-score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-mini-score-label {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 0 0 84px;
}
.lp-mini-bar {
  flex: 1 1 auto;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.lp-mini-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transform-origin: left;
}
.lp-mini-bar-fill.lp-fill-bad  { background: var(--pnl-neg); }
.lp-mini-bar-fill.lp-fill-good { background: var(--pnl-pos); }
.lp-mini-score-num {
  color: var(--fg-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.lp-mini-flag { display: flex; align-items: center; gap: 8px; }
.lp-mini-flag strong { color: var(--fg-strong); font-size: 0.85rem; letter-spacing: 0.5px; }
.lp-mini-flag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pnl-neg);
}
.lp-mini-evidence {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.3px;
}

.lp-spark { width: 100%; height: 40px; display: block; }

/* ── Section 3: How it works — pipeline diagram + plain columns ────────────── */
.lp-pipe-diagram {
  container-type: inline-size;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 0 30px;
  margin-bottom: 34px;
}
.lp-pipe-node {
  flex: 0 0 auto;
  color: var(--fg);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.lp-pipe-node-core {
  color: #10120F;
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 700;
}
:root[data-theme="light"] .lp-pipe-node-core { color: #FAF7F1; }
.lp-pipe-link {
  flex: 1 1 24px;
  height: 1px;
  background: var(--border-strong);
}
/* The data packet: invisible unless an animation context drives it, so the
   static page never shows a stray dot. */
.lp-packet {
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(83, 181, 126, 0.65);
  opacity: 0;
  pointer-events: none;
}
@keyframes lp-packet {
  0%   { opacity: 0; transform: translateX(0); }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(100cqw - 7px)); }
}

.lp-pipe-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 4vw, 48px);
}
.lp-pipe-col { border-top: 1px solid var(--border); padding-top: 16px; }
.lp-pipe-title {
  color: var(--fg-strong);
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}
.lp-pipe-body {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
}

/* ── Section 4: Export — terminal frame | copy ─────────────────────────────── */
.lp-export-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: start;
}
.lp-export-copy .lp-lead { margin-bottom: 26px; }

.lp-terminal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}
:root[data-theme="light"] .lp-terminal { box-shadow: 0 12px 32px rgba(60, 55, 45, 0.08); }
.lp-terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.lp-term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.lp-terminal-title {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 1px;
}

.lp-steps { list-style: none; margin: 0; padding: 6px 18px 10px; }
.lp-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dotted var(--dotted);
}
.lp-step:last-child { border-bottom: none; }
.lp-step-n {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.lp-step-body {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.75;
}
/* Breadcrumb chips: the click-path reads as UI crumbs, not bold words. */
.lp-step-body strong {
  color: var(--fg-strong);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  padding: 1px 7px;
  white-space: nowrap;
}
.lp-step-body kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--fg-strong);
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.lp-hint, .lp-note {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 16px 0 0;
}
.lp-hint { color: var(--fg); }
.lp-hint strong { color: var(--fg-strong); font-weight: 600; }
.lp-note { color: var(--hint); }
.lp-hint code, .lp-note code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg-strong);
  padding: 0 5px;
  font-family: var(--font-mono);
}

/* ── Section 5: Trust — mono-glyph card grid ───────────────────────────────── */
.lp-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.lp-trust-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform 250ms var(--ease), border-color 250ms var(--ease);
}
.lp-trust-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.lp-glyph {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.lp-trust-card p {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}
.lp-trust-card strong { color: var(--fg-strong); font-weight: 600; }
.lp-trust-card a { color: var(--focus); text-underline-offset: 3px; }
.lp-trust-card a:hover { color: var(--fg-strong); }
.lp-trust-card a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── Section 6: Anti-positioning — a narrow manifesto ──────────────────────── */
.lp-not {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 62ch;
}
.lp-not li {
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.65;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--dotted);
  position: relative;
}
.lp-not li:last-child { border-bottom: none; }
.lp-not li::before {
  content: "×";
  position: absolute;
  left: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 700;
}
.lp-not strong { color: var(--fg-strong); font-weight: 600; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.lp-foot {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-align: center;
}
.lp-foot-tagline { margin: 0; }
.lp-foot-legal { margin-top: 10px; }
.lp-foot-legal a { color: var(--muted); text-decoration: none; }
.lp-foot-legal a:hover { color: var(--fg-strong); }
.lp-foot-legal a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── Theme switch (View Transitions enhancement) ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ── Reduced-motion safety net for the no-JS visitor ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.lp *, body.lp *::before, body.lp *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
  }
  #lp-bg { display: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-hero-visual { max-width: 560px; }
  .lp-export-grid { grid-template-columns: 1fr; }
  .lp-export-copy { order: -1; }          /* thesis first, terminal below on mobile */
  .lp-pipe-diagram { flex-wrap: wrap; row-gap: 12px; }
  .lp-pipe-link { min-width: 16px; }
  .lp-packet { display: none; }           /* the track wraps — the packet's path would lie */
}
@media (max-width: 560px) {
  body.lp {
    padding: 0 16px 48px;
    font-size: 16px;                      /* phone readability: lift the rem base */
  }
  .lp-cta { display: block; text-align: center; width: 100%; }
  .lp-cta-row { flex-direction: column; align-items: stretch; }
  .lp-report { padding: 18px 16px 20px; }
  .lp-steps { padding: 2px 14px 6px; }
  .lp-step-body strong { white-space: normal; }  /* breadcrumb chips may wrap, never overflow */
  .lp-topbar-status { display: none; }    /* the descriptor crowds a phone topbar */
  .lp-lead, .lp-subhead { font-size: 1rem; }
  .lp-widget-text, .lp-trust-card p, .lp-pipe-body, .lp-step-body { font-size: 0.98rem; }
}
