/* ============================================================
   deslop.media · Forecast PAGE — page shell + mobile-first layout.
   Self-contained: the deslop tokens are COPIED here as :root vars
   (NOT @imported from speedo-pub, a hot read-only surface). This
   file owns the PAGE chrome (hero / sections / footer / breadcrumb
   / mobile-flow). The INSTRUMENT's own surfaces are styled by
   forecast-instrument.css + each component. All .fi-* namespaced.
   Flat, dark-native: NO gradients, NO shadows, NO glow. ONE easing.

   BASE = MOBILE. Desktop spread starts at the --island breakpoint
   (@media min-width: 720px). Reduced-motion + ≤640px turn the
   scroll-morph OFF and let the hero autoplay on the instrument face.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ── deslop tokens (copied from deslop-tokens.css) ─────────── */
  --color-bg: #101820;
  --color-surface: #1a2230;
  --color-surface-2: #151c27;
  --color-border: #2a3240;
  --color-border-subtle: #1e2835;

  --color-text: #E8E6E1;
  --color-text-secondary: #8A8F98;
  --color-text-tertiary: #828a99;   /* lifted for mobile AA legibility (was #5a6070 ~2.6:1) */

  --color-volt: #CEFF00;            /* hold / signal — THE ONLY GREEN */
  --color-coral: #d9646e;           /* deny */
  --color-steel: #b6c2d4;           /* structure */
  --color-accent: #CEFF00;
  --color-accent-hover: #d9ff4d;

  --font-editorial: 'Inter Tight', 'Inter', -apple-system, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale — mobile-first sizes; desktop bumps below. */
  --fs-display: 2.25rem;    /* hero verdict — mobile */
  --fs-h1: 1.875rem;
  --fs-h2: 1.5rem;
  --fs-h3: 1.1875rem;
  --fs-body: 1rem;
  --fs-body-sm: 0.9375rem;
  --fs-meta: 0.8125rem;     /* 13px */
  --fs-micro: 0.75rem;      /* 12px — legibility floor pinned ≥11px */
  --fs-tiny: 0.6875rem;     /* 11px */

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.15s;
  --dur: 0.2s;

  /* ── page layout tokens ──────────────────────────────────── */
  --page-max: 72rem;        /* page max width */
  --read-max: 44rem;        /* editorial reading column ~700px */
  --hit: 44px;              /* minimum touch target */
  --island: 720px;          /* the mobile→desktop breakpoint */
}

/* ── Reset / base (mobile-first) ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text);
  /* Sentence case is a copy rule, enforced in content not CSS:
     never text-transform headings to uppercase. */
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin-bottom: var(--space-md); color: var(--color-text-secondary); }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-accent-hover); }

code, .mono { font-family: var(--font-mono); }

.editorial {
  font-family: var(--font-editorial);
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Mono uppercase label — section labels, kickers, stamps. */
.label-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

/* ── Page frame ────────────────────────────────────────────── */
.fp-page { width: 100%; overflow-x: hidden; }

.fp-wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--space-md);
}
.fp-read {
  width: 100%;
  max-width: var(--read-max);
  margin-inline: auto;
}

/* Section rhythm — matched to the Panel's .sec (decomp-v3.css:67): 46px
   top and bottom at ALL widths; the top hairline idiom (1px border-subtle,
   first-of-type suppressed) already mirrors .sec--rule. (The desktop
   space-3xl bump is removed in the ≥720px block below.) */
.fp-section {
  padding-block: 46px;
  border-top: 1px solid var(--color-border-subtle);
}
.fp-section:first-of-type { border-top: 0; }

/* ── R11 SECTION HEADER PARITY (matches the Panel's header.hd band) ──
   Panel canon (decomp-v3.css:59-65):
     · header.hd — 220px kicker column | 1fr title+sub column, 28px gap,
       align-items:start, closed by a 22px pad-bottom + 1px border + 28px
       gap to the body; collapses to one column ≤760px.
     · .hd__ix  — mono 11px / 600 / 0.16em / uppercase / volt / pad-top 4px.
     · .hd__t   — editorial 30px (24px ≤760) / 700 / -0.03em / lh 1.05 / m0.
     · .hd__sub — Inter 14px / 400 / secondary / lh 1.6 / 64ch / mt 9px.
   Kicker + title are always the first two children of .fp-section in both
   index.html and twins-preview.html, so the eyebrow column is pure-CSS —
   no markup change. Mobile keeps the stack (matches the Panel ≤760 cut). */

/* Section kicker — the Panel's .hd__ix volt mono index (no § glyph).
   Compounded with .label-mono so it out-specifies the .label-mono base
   rule that also matches this element (equal-specificity + later source
   order in forecast-instrument.css otherwise wins). */
.fp-section__kicker { margin-bottom: var(--space-sm); }
.fp-section__kicker.label-mono {
  font-size: 11px;
  color: var(--color-volt);
  font-weight: 600;
  letter-spacing: 0.16em;
}
/* Section title — the Panel's .hd__t. Explicit px (24 → 30 at the Panel's
   760 cut) also out-specifies the twins pane's #twin-model --fs-h2 var, so
   the twins pane needs no extra title rule. */
.fp-section__title {
  font-family: var(--font-editorial);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-md);
}
/* Section sub-line — the Panel's .hd__sub numbers, so any sub matches the
   canon. (The ABSENCE of sub copy in the Model headers is intentional
   under R10's word diet — the class spec is fixed, no copy is added.) */
.fp-section__lede {
  max-width: 64ch;
  margin-top: 9px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

/* ── HERO (pinned scroll-animation host) ───────────────────────
   On desktop the hero is a tall scroll-stage: the .fp-hero is given
   height by the animation (the Build agent sets the scroll length);
   .fp-hero__pin sticks while the acts play. On mobile / reduced-
   motion the pin is released and the acts autoplay (mobile-flow). */
.fp-hero {
  position: relative;
  width: 100%;
}
.fp-hero__pin {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-2xl);
}
/* R11 — hero eyebrow parity (standalone). The Panel hero leads with
   .lede__kicker (speedo-morph.css:29): mono 13px / 700 / 0.18em / uppercase
   / text color + a 24px×2px volt-dash ::before, 12px @≤640. The twins pane
   already injects exactly this onto the Model hero; here the standalone's
   native .fp-hero__stamp is restyled to match, so both surfaces read the
   same. No markup change. */
/* Qualified .fp-hero__stamp.label-mono (0,2,0) so it out-specifies the
   page-scoped .label-mono 10px furniture normalization in
   forecast-instrument.css (0,1,0) that also matches this element — the hero
   eyebrow must stay 13px, matching the twins pane's visible injected
   .lede__kicker (the native stamp is hidden on the twins). */
.fp-hero__stamp.label-mono {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 13px;
}
.fp-hero__stamp::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--color-volt);
  flex: 0 0 auto;
  border-radius: 1px;
}
@media (max-width: 640px) {
  .fp-hero__stamp.label-mono { font-size: 12px; letter-spacing: 0.15em; gap: 9px; margin-bottom: 11px; }
  .fp-hero__stamp::before { width: 20px; }
}
/* R11 — hero headline parity: the Panel's .lede h1 (decomp-v3.css:74) —
   fluid clamp(30,5.4vw,52), -0.035em, lh 1.0 (kills the 56px step overshoot
   and the fluid-vs-step mismatch). The twins pane inherits. */
.fp-hero__verdict {
  font-family: var(--font-editorial);
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  max-width: 18ch;
  margin-bottom: var(--space-lg);
}
.fp-hero__verdict .fp-hl-noLead { color: var(--color-text); }
.fp-hero__anim {
  position: relative;
  width: 100%;
  min-height: 40svh;
}
.fp-hero__captions { min-height: 3.5em; margin-top: var(--space-lg); }

/* ANIMATION PAUSED (operator, 2026-06-14) — the 5-act hero is a reviewable
   DRAFT, opt-in only behind ?anim=1. Default = a clean compact STATIC hero
   (the static verdict + the settled instrument below), no tall scroll-stage,
   no animation-only chrome. Mirrors the reduced-motion treatment. */
.fp-anim-paused .fp-hero { min-height: auto !important; }
.fp-anim-paused .fp-hero__pin {
  position: static; top: auto;
  min-height: auto !important;   /* collapse the reserved 100svh scroll-scrub
                                    height so the paused hero leaves no empty
                                    gap above the instrument */
}
.fp-anim-paused .fp-hero__anim,
.fp-anim-paused .fp-hero__captions,
.fp-anim-paused .fp-breadcrumb { display: none; }

/* R10 — compact hero (the gauge is the hero). The static (anim-paused) hero
   still reserved section-scale padding above the gauge; shrink it so the gauge
   sits near the top. The .fp-instrument band compression lives at its canonical
   rules below (line ~363 + the ≥720px block) so source order can't regress it. */
.fp-anim-paused .fp-hero__pin { padding-block: var(--space-lg) var(--space-sm); }

/* ── Sticky compact readout (#fi-sticky) ────────────────────────────
   Follows the reader once the full headline scrolls above the viewport,
   so changing a dial down at the controls visibly moves an anchored
   answer. A SECOND readout element (the orchestrator still solely owns
   #fi-headline). Reveals via the .is-visible class set by an
   IntersectionObserver on #fi-headline. */
.fi-sticky {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px var(--space-md);
  padding: 10px var(--space-lg);
  background: var(--color-surface);
  border-top: 2px solid var(--color-volt);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .6);
  transform: translateY(-101%);
  transition: transform var(--dur) var(--ease);
  pointer-events: none;
}
.fi-sticky.is-visible { transform: translateY(0); }
.fi-sticky__name {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--fs-tiny);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-text-secondary);
}
/* NO-CROWN: a neutral live-instrument marker, not a win color — steel,
   never volt, so nothing in the sticky reads as a crowned winner. */
.fi-sticky__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-steel); flex: none;
}
/* Qualified .label-mono compound (0,2,0) so the live-readout year keeps its
   11px against the page-scoped .label-mono 10px furniture normalization in
   forecast-instrument.css — the sticky is a live instrument readout, not a
   section eyebrow (and is hidden on the twins, so has no parity reference). */
.fi-sticky__yr.label-mono {
  font-family: var(--font-mono); font-size: var(--fs-tiny);
  letter-spacing: .04em; color: var(--color-text-tertiary);
}
.fi-sticky__scs {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 14px;
}
.fi-sticky__sc {
  font-size: 12.5px; color: var(--color-text-secondary); white-space: nowrap;
}
.fi-sticky__sc b {
  font-family: var(--font-mono); font-weight: 600; color: var(--color-text);
}
/* NO-CROWN: no per-scenario win color in the sticky — the heaviest pattern
   is shown in plain text like the rest, never volt. */
@media (prefers-reduced-motion: reduce) { .fi-sticky { transition: none; } }
@media (max-width: 640px) {
  .fi-sticky { padding: 8px var(--space-md); }
  .fi-sticky__sc { font-size: var(--fs-micro); }
}

/* R16 — the SOURCE toggle (.fi-source*) and the per-source visibility rules
   (.fi-experts-only / [data-fi-source="experts"]) are removed with the Voices
   mode. The model is the only source; every block is always visible. */
.fi-block { margin: var(--space-lg) 0; }
.fi-block__kicker {
  display: block; color: var(--color-text-tertiary);
  margin-bottom: var(--space-sm);
}

/* Breadcrumb act-tracker — 5 dots/labels, the current act lit volt. */
.fp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  list-style: none;
  margin-top: var(--space-lg);
}
.fp-breadcrumb__step {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--hit);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
}
.fp-breadcrumb__step[aria-current="step"],
.fp-breadcrumb__step.is-active { color: var(--color-volt); }
.fp-breadcrumb__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-border);
  flex: 0 0 auto;
}
.fp-breadcrumb__step.is-active .fp-breadcrumb__dot {
  background: var(--color-volt);
}

/* ── INSTRUMENT (settled state) host ───────────────────────────
   The instrument's own internal layout lives in forecast-instrument
   .css; here we just give it a band on the page. R10: the top pad is
   trimmed so the gauge is the hero near the top; the bottom pad keeps
   breathing room before the backing band. */
.fp-instrument { padding-block: var(--space-md) var(--space-2xl); }

/* ── Disclosure (honesty spine) — the lede carries the honesty in
     editorial register: an un-boxed bold intro passage, not a callout. */
.fp-disclosure {
  font-family: var(--font-editorial);
  font-size: var(--fs-h3);           /* 1.1875rem — intro-graf scale */
  line-height: 1.55;
  font-weight: 600;                   /* the bold intro passage */
  color: var(--color-text);
  max-width: var(--read-max);
}
.fp-disclosure b { font-weight: 700; }

/* ── Machine channel ───────────────────────────────────────── */
.fp-machine pre {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  color: var(--color-text-secondary);
}

/* ── Footer ────────────────────────────────────────────────── */
.fp-footer {
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--color-border-subtle);
  color: var(--color-text-tertiary);
  font-size: var(--fs-body-sm);
}
/* 16px reading floor: the colophon is a reading sentence, not a label —
   the .fp-return nav links below keep the smaller footer size. */
.fp-footer > p:not(.fp-return) { font-size: 16px; line-height: 1.5; }
.fp-footer a { color: var(--color-text-secondary); }
.fp-footer a:hover { color: var(--color-accent); }

/* Skip link for keyboard/a11y. */
.fp-skip {
  position: absolute; left: -999px; top: 0;
  background: var(--color-volt); color: var(--color-bg);
  padding: var(--space-sm) var(--space-md); z-index: 100;
  font-family: var(--font-mono); font-size: var(--fs-micro);
}
.fp-skip:focus { left: var(--space-sm); }

/* Horizontal-swipe rail for wide content (cascade / evidence cards). */
.fp-swipe {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
}
.fp-swipe > * { scroll-snap-align: start; flex: 0 0 auto; }
/* mobile: a right-edge fade signals the swipe rail has more content → */
@media (max-width: 640px) {
  .fp-swipe {
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }
}

/* Visually-hidden utility (a11y labels). */
.fp-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── DESKTOP SPREAD (≥ --island) ───────────────────────────────
   Mobile is the base; here we add the desktop type bumps + the
   side-by-side needle/distribution width the spec asks for. */
@media (min-width: 720px) {
  :root {
    --fs-display: 3.5rem;
    --fs-h1: 2.5rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.25rem;
  }
  .fp-wrap { padding-inline: var(--space-xl); }
  /* R11: section rhythm is 46px at ALL widths (Panel .sec); no desktop bump.
     The hero verdict is a fluid clamp now — no 22ch desktop widen (Panel
     .lede h1 holds 18ch across widths). */
  /* The instrument top (needle + distribution) goes side-by-side on
     desktop; the component CSS handles the internal grid, this just
     widens the band. */
  .fp-instrument { padding-block: var(--space-lg) var(--space-3xl); }
}

/* ── R11 SECTION HEADER — desktop eyebrow column + closing rule ────────
   Panel cuts its .hd grid at 760px; mirror that with ≥761px. The kicker
   and title are always the first two children of .fp-section, so the grid
   places them by source order (col1/col2 row1) and spans every following
   child full-width — no markup. The 22px pad-bottom + 1px border + 28px
   gap-to-body closure spans the full band via both header cells. */
@media (min-width: 761px) {
  .fp-section {
    display: grid;
    grid-template-columns: 220px 1fr;
    column-gap: 28px;
    align-items: start;
  }
  .fp-section__kicker {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    padding-top: 4px;          /* cap-aligns the kicker to the H2 (Panel .hd__ix) */
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
  }
  .fp-section__title {
    grid-column: 2;
    grid-row: 1;
    font-size: 30px;           /* Panel .hd__t desktop step */
    margin-bottom: 0;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
  }
  /* every child after the header spans the full band, below the closing
     rule, offset by the Panel's 28px header→body gap. */
  .fp-section > :not(.fp-section__kicker):not(.fp-section__title) {
    grid-column: 1 / -1;
    margin-top: 28px;
  }
}

/* R11 — mobile header closure: below the eyebrow-column breakpoint the
   header is a stack, so the closing hairline rides the title alone (the
   Panel's ≤760 collapse behaves the same way — the rule closes the band
   above the body). 22px pad + 1px border + 28px gap to the first body child. */
@media (max-width: 760px) {
  .fp-section__title {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 28px;
  }
}

/* R11 — in-flow instrument section titles (cascade "How five constraints
   route…", controls "Turn five dials…", the distribution axis legend).
   The Panel has no bare mid-scale flow titles: its sub-header prose
   register is the 18px / 600 / -0.02em editorial of .faq__q. Normalize
   .fi-section__title to that register (it ships at --fs-h3 19/20px / 700).
   Do NOT promote to the full .hd band — these sit inside the hero
   instrument whose Panel twin uses small furniture, and R10 already cut
   their kickers. Later source order + equal specificity out-specifies the
   forecast-instrument.css base rule; explicit px also beats #twin-model's
   --fs-h3 var, so the twins pane matches with no extra rule. */
.fi-section__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ── MOBILE / REDUCED-MOTION: scroll-morph OFF ─────────────────
   At ≤640px OR prefers-reduced-motion, the hero is NOT pinned; the
   acts autoplay on the instrument face (mobile-flow). The animation
   JS reads these signals too (matchMedia) — CSS releases the pin so
   the page is a normal scroll document. */
@media (max-width: 640px) {
  .fp-hero__pin {
    position: static;
    min-height: auto;
  }
  .fp-hero { min-height: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fp-hero__pin {
    position: static;
    min-height: auto;
  }
  .fp-hero { min-height: auto !important; }
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ════════════════ R17e (c) — MOBILE CHROME DIET, STANDALONE HERO ════════════════
   The standalone /aifutures/ai-forecast/ page has its OWN mobile hero (the
   autoplay 5-act) — the twins-shell diet does not reach it. Same move, scoped
   to THIS page only (body:not(.twin-body): the twins surfaces load this file
   too and carry their own scoped diet in twins-shell.css): the masthead
   text-nav + the Apply pill leave frame one (kept in the DOM; the end-of-read
   band keeps the publisher door), the stamp reads as ONE line, and the hero's
   reserved padding tightens so the animation — and the instrument below it —
   crest the fold sooner. Space is cut, never fonts: the 16px reading floor is
   untouched (the stamp is a mono micro-kicker, the sanctioned edge). */
@media (max-width: 640px) {
  body:not(.twin-body) .aff-mast__nav { display: none; }
  body:not(.twin-body) .aff-mast__cta { display: none; }
  body:not(.twin-body) .fp-hero__stamp.label-mono {
    font-size: 11px;
    letter-spacing: 0.12em;
    gap: 8px;
    white-space: nowrap;
    margin-bottom: 8px;
  }
  body:not(.twin-body) .fp-hero__stamp::before { width: 16px; }
  body:not(.twin-body) .fp-hero__pin { padding-block: 10px 4px; }
  body:not(.twin-body) .fp-hero__captions { margin-top: var(--space-sm, 12px); }
}
