/* QuanterLab landing — page styles.
   Day 1 skeleton. Sections use placeholder divs (.viz-stub) for the
   interactive visuals coming in Day 2/3. Visual tokens live in
   tokens.css; this file is layout + composition only. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }

/* ── Beta banner ───────────────────────────────────────────── */
.beta-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 6px 16px; height: 30px;
    background: linear-gradient(90deg, #1a1206 0%, #2a1d0a 50%, #1a1206 100%);
    border-bottom: 1px solid rgba(201, 169, 98, 0.25);
    font-size: 0.72rem; color: rgba(201, 169, 98, 0.85);
    letter-spacing: 0.04em;
}
.beta-tag {
    display: inline-block; padding: 1px 8px; border-radius: 3px;
    background: rgba(201, 169, 98, 0.15); border: 1px solid rgba(201, 169, 98, 0.35);
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em;
    color: var(--accent-gold);
}
@media (max-width: 768px) {
    .beta-banner { font-size: 0.65rem; gap: 6px; padding: 6px 10px; }
    .beta-banner span:last-child { display: none; }
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 30px; left: 0; right: 0; z-index: 100;
    padding: 0 var(--landing-pad-x); height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--card-border);
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text-primary);
}
.nav-logo .nav-mark {
    width: 28px; height: 28px; color: var(--accent-gold);
}
.nav-logo .nav-wordmark {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 600; letter-spacing: 0.18em;
    text-transform: uppercase;
}
.nav-logo .nav-wordmark .wm-accent {
    font-weight: 400; color: var(--accent-gold);
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.78rem;
    font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
    transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-btn {
    padding: 7px 22px; border: 1px solid var(--accent-gold); border-radius: 4px;
    background: transparent; color: var(--accent-gold) !important;
    font-size: 0.72rem !important; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    transition: all 0.25s ease !important;
}
.nav-btn:hover { background: var(--accent-gold) !important; color: #000 !important; }
.nav-hamburger {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
    display: block; width: 18px; height: 1.5px;
    background: var(--text-secondary); transition: all 0.3s ease;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; padding: 11px 32px;
    background: var(--accent-gold); color: #000;
    border: 1px solid var(--accent-gold); border-radius: 4px;
    font-family: inherit; font-size: 0.82rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
    cursor: pointer; transition: all 0.25s ease;
}
.btn-primary:hover {
    background: #d4b46e; border-color: #d4b46e; transform: translateY(-1px);
}
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px; padding: 11px 24px;
    background: transparent; color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px;
    font-family: inherit; font-size: 0.82rem; font-weight: 400;
    letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
    cursor: pointer; transition: all 0.25s ease;
}
.btn-ghost:hover {
    color: var(--text-primary); border-color: rgba(255, 255, 255, 0.25);
}

/* ── Section shell ────────────────────────────────────────── */
.section {
    max-width: var(--landing-max-width);
    margin: 0 auto;
    padding: 96px var(--landing-pad-x);
    position: relative;
}
.section.compact { padding: 64px var(--landing-pad-x); }
.section-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent-gold); margin-bottom: 20px;
}
.section-eyebrow .line {
    width: 28px; height: 1px; background: currentColor; opacity: 0.5;
}
.section-eyebrow.teal { color: var(--accent-teal); }
.section-eyebrow.purple { color: var(--accent-purple); }
.section-eyebrow.red { color: #c87575; }

/* ── Major section eyebrow (2026-05-13 unified) ──────────────
   Bigger, bolder, always-centered, flanked with lines. Used for
   the three flagship section openers — Time Travel, Meet Quantin,
   Tour the Lab — so they read as peer-level brand marks rather
   than secondary section tags. Color is inherited from the
   `.teal`/`.purple`/`.red`/etc. modifier on the same element.
   When no color modifier is present, defaults to gold. */
.section-eyebrow.section-eyebrow-major {
    display: flex; justify-content: center;
    margin-bottom: 24px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.24em;
}
.section-eyebrow.section-eyebrow-major .line { width: 36px; }
.section-title {
    font-family: var(--font-display);
    font-size: 2.4rem; font-weight: 200; line-height: 1.12;
    letter-spacing: -0.025em; margin-bottom: 14px;
    color: var(--text-primary);
    max-width: 820px;
    /* Same subtle gradient treatment as the hero — keeps headlines
       visually anchored at the same level of weight across the page. */
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #d6d6d6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-title strong {
    font-weight: 500;
    background: linear-gradient(180deg, #ffffff 0%, #f0e2c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-lede {
    font-size: 1rem; color: var(--text-secondary); line-height: 1.7;
    font-weight: 300; max-width: 640px; margin-bottom: 36px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    position: relative; padding-top: 130px; padding-bottom: 120px; overflow: hidden;
    isolation: isolate;
}
/* Layer 1 — background photo (Background_image.png) with smooth
   fade-to-black at bottom + gentle radial vignette so it doesn't
   visually clip into the next section. */
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('/static/images/landing/screens/Background_image.png');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    /* 2026-05-14 — bumped from 0.22 to 0.38 so the image is more
       visible behind the overlay, giving the hero scene visible
       contrast against the surrounding pure-black sections. */
    opacity: 0.38;
    filter: saturate(0.85) contrast(1.05);
    pointer-events: none;
    z-index: -2;
}
/* Layer 2 — multi-stop overlay. Top: keep the brand accent radial
   glows. Middle: a translucent dark veil; alphas dropped 2026-05-14
   so the photo bleeds through more (was 0.55→0.95, now 0.30→0.80).
   Bottom: still hard fades to pure --bg-primary so the next section's
   pure-black surface meets this section's tail seamlessly. */
.hero::after {
    content: '';
    position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 20% 0%, rgba(201, 169, 98, 0.10) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 90% 30%, rgba(91, 164, 164, 0.06) 0%, transparent 60%),
      linear-gradient(180deg,
          rgba(8, 8, 10, 0.30) 0%,
          rgba(8, 8, 10, 0.55) 55%,
          rgba(8, 8, 10, 0.85) 88%,
          var(--bg-primary) 100%);
    pointer-events: none;
    z-index: -1;
}
.hero-inner {
    max-width: var(--landing-max-width);
    margin: 0 auto; padding: 0 var(--landing-pad-x);
    /* 2026-05-13 — flipped column ratio so the screenshot reads
       larger than the headline column. Was 1.1fr / 1fr (text wider);
       now 1fr / 1.3fr (visual wider) with a tighter gap. */
    display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px;
    align-items: center; position: relative; z-index: 1;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    background: rgba(201, 169, 98, 0.08);
    border: 1px solid rgba(201, 169, 98, 0.25);
    border-radius: 999px;
    color: var(--accent-gold);
    font-size: 0.74rem; font-weight: 500; letter-spacing: 0.04em;
    text-decoration: none;
    margin-bottom: 28px;
    transition: all 0.2s ease;
}
.hero-eyebrow:hover {
    background: rgba(201, 169, 98, 0.14);
    border-color: rgba(201, 169, 98, 0.45);
}
.hero-eyebrow .eb-arrow { opacity: 0.7; transition: transform 0.2s ease; }
.hero-eyebrow:hover .eb-arrow { transform: translateX(3px); opacity: 1; }
.hero h1 {
    font-family: var(--font-display);
    font-size: 4.2rem; font-weight: 200; line-height: 1.02;
    letter-spacing: -0.04em; margin-bottom: 24px;
    color: var(--text-primary);
    /* Subtle gradient from pure white at the top to a touch of
       silver/grey at the bottom — adds dimensionality without
       feeling like a gimmick. */
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #d4d4d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 0 rgba(255,255,255,0.02);
}
.hero h1 strong {
    font-weight: 500;
    background: linear-gradient(180deg, #ffffff 0%, #f0e2c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Secondary tagline directly under the H1 — landed 2026-05-14 per
   redesign request: the H1 names the product, the tagline names the
   action. Gold gradient on the italic to mirror the H1 <strong>
   accent; "your own" is the load-bearing phrase so it carries the
   weight, not the whole line. Smaller than the H1 but bigger than
   the subtitle so the visual hierarchy stays product → action →
   description. */
.hero-tagline {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 200;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: -8px 0 22px;
    max-width: 560px;
}
.hero-tagline em {
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(180deg, #f5e8c5 0%, #c9a962 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.1rem; color: var(--text-secondary);
    max-width: 560px; line-height: 1.7; font-weight: 300;
    margin-bottom: 38px;
    letter-spacing: 0.005em;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-visual {
    position: relative;
    aspect-ratio: 1 / 0.9;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background:
      linear-gradient(135deg, rgba(201, 169, 98, 0.04) 0%, rgba(91, 164, 164, 0.04) 100%),
      var(--bg-secondary);
    overflow: hidden;
}
.hero-visual .viz-stub,
.hero-visual [data-viz] {
    width: 100%; height: 100%;
}

/* ── Hero visual — platform screenshot mode (2026-05-13 polish-2) ──
   Frames the actual workspace screenshot. Removed the faux
   window-chrome dot strip in 2026-05-13 polish-2 (felt too much
   like an Apple-commercial pastiche). Kept the rounded edge +
   floating gold-tinted shadow + soft bottom fade so the image
   doesn't terminate as a hard rectangle. */
.hero-visual-screenshot {
    aspect-ratio: 16 / 9;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    /* Floating shadow under the frame */
    filter: drop-shadow(0 24px 56px rgba(0,0,0,0.55))
            drop-shadow(0 0 32px rgba(201,169,98,0.10));
}
.hv-frame {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid rgba(201,169,98,0.18);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.04),
      0 1px 0 rgba(255,255,255,0.06);
}
.hv-frame img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    /* `contain` keeps the entire screenshot visible — no critical
       UI is cropped. The platform screenshot's own background is
       near-black, so any letterboxing matches `--bg-secondary`
       and is invisible. */
    object-fit: contain; object-position: center;
    display: block;
}
/* Soft bottom fade so the screenshot dissolves rather than cuts */
.hv-frame::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 16%;
    background: linear-gradient(180deg, transparent 0%, rgba(8,8,10,0.5) 100%);
    pointer-events: none;
}
.timetravel-grid [data-viz] {
    width: 100%; height: 100%;
}
.viz-target {
    width: 100%; height: 100%;
    min-height: 220px;
    display: block;
    background: transparent;
}
.tt-viz-target {
    aspect-ratio: 1 / 0.55;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
}

/* ── Visualization stubs (Day 2/3 will replace contents) ──── */
.viz-stub {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; padding: 32px;
    color: var(--text-muted); font-size: 0.8rem;
    font-family: var(--font-mono); letter-spacing: 0.08em;
    text-align: center;
}
.viz-stub .stub-mark {
    width: 56px; height: 56px; opacity: 0.35;
    color: var(--accent-gold);
}
.viz-stub .stub-label {
    text-transform: uppercase; opacity: 0.7;
}
.viz-stub .stub-note {
    font-family: var(--font-sans);
    font-size: 0.74rem; letter-spacing: 0.02em;
    text-transform: none; max-width: 320px;
    line-height: 1.55; opacity: 0.55;
}

/* ── Time Travel section (placeholder for interactive widget) ── */
.timetravel {
    background: linear-gradient(180deg,
        rgba(201, 169, 98, 0.02) 0%,
        rgba(0, 0, 0, 0) 100%);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}
.timetravel-grid {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px;
    align-items: start;
}
.timetravel-grid .viz-stub {
    aspect-ratio: 1 / 0.55;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
}

/* ── Adaptive thresholds 4-card row ───────────────────────── */
.thresholds-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.threshold-card {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    display: flex; flex-direction: column; gap: 12px;
    min-height: 280px;
    transition: all 0.25s ease;
    position: relative; overflow: hidden;
}
.threshold-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: var(--accent-gold); opacity: 0;
    transition: opacity 0.25s ease;
}
.threshold-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}
.threshold-card:hover::before { opacity: 1; }
.threshold-card.tc-static    { --c: #58a6ff; }
.threshold-card.tc-regime    { --c: #3fb950; }
.threshold-card.tc-dynamic   { --c: #e6db74; }
.threshold-card.tc-regression{ --c: #f97316; }
.threshold-card .tc-name {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--c);
}
.threshold-card .tc-desc {
    font-size: 0.86rem; color: var(--text-secondary);
    line-height: 1.55; font-weight: 300;
}
.threshold-card .tc-desc strong {
    color: var(--text-primary); font-weight: 500;
}
.threshold-card .tc-tags {
    margin-top: auto;
    font-size: 0.68rem; letter-spacing: 0.08em;
    color: var(--c); opacity: 0.7;
}
.threshold-card .tc-mini {
    height: 140px; border-radius: 6px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    color: var(--c);
}
.threshold-card .tc-mini .js-plotly-plot,
.threshold-card .tc-mini > div { width: 100% !important; height: 100% !important; }
.threshold-card { min-height: 360px; }

/* ── Quantin section ──────────────────────────────────────── */
.quantin-grid {
    display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px;
    align-items: start;
}
.lens-list {
    list-style: none; display: flex; flex-direction: column;
    gap: 16px; margin-top: 8px;
}
.lens-list li {
    padding: 18px 20px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--bg-card);
    transition: all 0.2s ease;
}
.lens-list li:hover {
    border-color: var(--card-border-hover);
    background: rgba(201, 169, 98, 0.03);
}
.lens-list .lens-name {
    font-size: 0.86rem; font-weight: 600; color: var(--text-primary);
    letter-spacing: 0.04em; margin-bottom: 4px;
}
.lens-list .lens-desc {
    font-size: 0.86rem; color: var(--text-secondary);
    line-height: 1.55; font-weight: 300;
}
.lens-list li.skeptic .lens-name { color: #c87575; }
.quantin-tile {
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.quantin-tile-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(20, 20, 20, 0.6);
}
.quantin-tile-header .qt-mark {
    width: 28px; height: 28px; color: var(--accent-gold);
}
.quantin-tile-header .qt-name {
    font-size: 0.86rem; font-weight: 600; color: var(--text-primary);
}
.quantin-tile-header .qt-lens {
    margin-left: auto;
    font-size: 0.72rem; padding: 4px 10px;
    border-radius: 999px;
    background: rgba(200, 117, 117, 0.12);
    border: 1px solid rgba(200, 117, 117, 0.4);
    color: #c87575;
    letter-spacing: 0.04em;
}
.quantin-tile-body {
    padding: 18px; display: flex; flex-direction: column; gap: 14px;
    font-size: 0.86rem; line-height: 1.55;
}
.qt-msg {
    padding: 12px 14px; border-radius: 10px;
    max-width: 86%;
}
.qt-msg.user {
    align-self: flex-end;
    background: rgba(201, 169, 98, 0.08);
    border: 1px solid rgba(201, 169, 98, 0.18);
    color: var(--text-primary);
}
.qt-msg.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
}
.qt-msg.assistant strong { color: var(--text-primary); }

/* ── Pipeline (CSS-only) ──────────────────────────────────── */
.pipeline {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 12px; margin-top: 16px;
}
.pipeline-step {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--bg-card);
    position: relative;
}
.pipeline-step .ps-num {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 600;
}
.pipeline-step .ps-label {
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-primary);
}
.pipeline-step .ps-desc {
    font-size: 0.75rem; color: var(--text-secondary);
    line-height: 1.5; font-weight: 300;
}

/* analytics-grid removed: analytics 4-card strip dropped (no real
   Monte Carlo / VaR / bootstrap / autopsy data extracted yet). When
   real samples land, restore from index_legacy.html. */

/* ── Code-export frame (full-width split rendered by JS) ──── */
.code-export-frame {
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
    overflow: hidden;
    height: 460px;
}
.code-export-frame [data-viz="code_export"] { width: 100%; height: 100%; }
@media (max-width: 720px) {
    .code-export-frame { height: auto; min-height: 600px; }
}

/* ── MCP / Bring your own Claude ──────────────────────────── */
.mcp-section {
    background:
      radial-gradient(ellipse 60% 50% at 50% 0%, rgba(217, 119, 87, 0.06) 0%, transparent 60%),
      var(--bg-primary);
    border-top: 1px solid var(--card-border);
}
.mcp-grid {
    display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px;
    align-items: center;
}
.mcp-tile {
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    display: flex; flex-direction: column; gap: 14px;
}
.mcp-tile .mcp-url {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-family: var(--font-mono); font-size: 0.82rem;
    color: #e8d5a8;
}
.mcp-tile .mcp-url code { color: inherit; flex: 1; }
.mcp-prompts {
    list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.mcp-prompts li {
    padding: 12px 14px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.015);
    border-radius: 8px;
    font-size: 0.84rem; color: var(--text-secondary);
    line-height: 1.5; font-style: italic;
    position: relative; padding-left: 28px;
}
.mcp-prompts li::before {
    content: '"';
    position: absolute; left: 12px; top: 6px;
    font-family: var(--font-display);
    font-size: 1.4rem; color: var(--accent-gold); opacity: 0.6;
}

/* ── Pricing teaser ───────────────────────────────────────── */
.pricing-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px; max-width: 760px; margin: 0 auto;
}
.pricing-card {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px; padding: 28px;
    display: flex; flex-direction: column; gap: 16px;
}
.pricing-card.featured {
    border-color: rgba(201, 169, 98, 0.4);
    background: linear-gradient(180deg,
        rgba(201, 169, 98, 0.04) 0%,
        rgba(15, 15, 15, 0.8) 100%);
}
.pricing-card .pc-name {
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent-gold);
}
.pricing-card .pc-headline {
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 300; color: var(--text-primary);
}
.pricing-card .pc-features {
    list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.pricing-card .pc-features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.86rem; color: var(--text-secondary); line-height: 1.5;
}
.pricing-card .pc-features li::before {
    content: '✓'; color: var(--accent-gold); font-weight: 600;
}

/* ── KB teaser ────────────────────────────────────────────── */
.kb-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.kb-card {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px; padding: 24px;
    display: flex; flex-direction: column; gap: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}
.kb-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}
.kb-card .kb-tag {
    font-size: 0.66rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent-teal);
}
.kb-card .kb-title {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 500; color: var(--text-primary);
    line-height: 1.35;
}
.kb-card .kb-excerpt {
    font-size: 0.82rem; color: var(--text-secondary);
    line-height: 1.55; font-weight: 300;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list {
    display: flex; flex-direction: column; gap: 12px;
    max-width: 820px; margin: 0 auto;
}
.faq-item {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 10px; overflow: hidden;
}
.faq-item summary {
    list-style: none;
    padding: 18px 22px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.95rem; font-weight: 500; color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; font-size: 1.2rem; font-weight: 300;
    color: var(--accent-gold); transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
    padding: 0 22px 18px;
    font-size: 0.88rem; color: var(--text-secondary);
    line-height: 1.65; font-weight: 300;
}

/* ── CTA + Footer ─────────────────────────────────────────── */
.final-cta {
    text-align: center;
    padding: 96px var(--landing-pad-x);
    max-width: var(--landing-max-width); margin: 0 auto;
    position: relative;
}
.final-cta::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%,
        rgba(201, 169, 98, 0.05) 0%, transparent 70%);
    pointer-events: none;
}
.final-cta h2 {
    font-family: var(--font-display);
    font-size: 2.4rem; font-weight: 200; letter-spacing: -0.02em;
    margin-bottom: 14px; position: relative;
}
.final-cta h2 strong { font-weight: 500; }
.final-cta p {
    font-size: 1rem; color: var(--text-secondary);
    max-width: 520px; margin: 0 auto 28px;
    line-height: 1.65; font-weight: 300; position: relative;
}
.final-cta .cta-actions {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; position: relative; flex-wrap: wrap;
}
.footer {
    padding: 28px var(--landing-pad-x);
    border-top: 1px solid var(--card-border);
    display: flex; justify-content: space-between; align-items: center;
    max-width: var(--landing-max-width); margin: 0 auto;
}
.footer-left {
    display: flex; align-items: center; gap: 14px;
}
.footer-left .footer-mark {
    width: 22px; height: 22px; color: var(--accent-gold); opacity: 0.6;
}
.footer-left span {
    font-size: 0.74rem; color: var(--text-muted); letter-spacing: 0.02em;
}
.footer-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.74rem;
    letter-spacing: 0.04em; transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--text-secondary); }

/* ── Animations ───────────────────────────────────────────── */
.fade-up {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .thresholds-grid { grid-template-columns: repeat(2, 1fr); }
    .pipeline { grid-template-columns: repeat(3, 1fr); }
    .kb-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
    :root {
        --landing-pad-x: var(--landing-pad-x-md);
    }
    .navbar { padding: 0 var(--landing-pad-x-md); }
    .section { padding: 80px var(--landing-pad-x-md); }
    .hero-inner { gap: 48px; padding: 0 var(--landing-pad-x-md); }
    .hero h1 { font-size: 3rem; }
    .timetravel-grid,
    .quantin-grid,
    .mcp-grid { grid-template-columns: 1fr; }
    .kb-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root {
        --landing-pad-x: var(--landing-pad-x-sm);
    }
    .navbar { padding: 0 var(--landing-pad-x-sm); }
    .section { padding: 64px var(--landing-pad-x-sm); }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-links.open {
        display: flex; flex-direction: column; position: absolute;
        top: 56px; left: 0; right: 0; background: rgba(0, 0, 0, 0.96);
        padding: 20px var(--landing-pad-x-sm); gap: 16px;
        border-bottom: 1px solid var(--card-border);
    }
    .hero { padding-top: 110px; }
    .hero-inner {
        grid-template-columns: 1fr; gap: 40px;
        padding: 0 var(--landing-pad-x-sm);
    }
    .hero h1 { font-size: 2.4rem; }
    .hero-actions { justify-content: flex-start; }
    .section-title { font-size: 1.7rem; }
    .thresholds-grid,
    .pricing-grid,
    .kb-grid { grid-template-columns: 1fr; }
    .pipeline { grid-template-columns: 1fr 1fr; }
    .footer {
        flex-direction: column; gap: 16px; text-align: center;
    }
    .footer-links { justify-content: center; }
    .pricing-grid { max-width: 100%; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.5rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions a { text-align: center; justify-content: center; }
    .pipeline { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   PRESTIGE IMAGE GALLERY — used to embed actual platform screens.
   Drop screenshots in wrapper/static/images/landing/screens/ with
   the canonical filenames documented in landing-image-gallery.js;
   they slot into the .pl-frame markers below automatically.
   When an image is missing, the .pl-fallback content shows instead
   (clean stylised placeholder, never a broken-image icon).
   ═══════════════════════════════════════════════════════════════ */

.pl-frame {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #0c0c0c, #060606);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 24px 80px -20px rgba(0, 0, 0, 0.65),
        0 12px 40px -16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}
.pl-frame::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg,
        rgba(201, 169, 98, 0.04) 0%,
        rgba(91, 164, 164, 0.02) 50%,
        rgba(155, 123, 184, 0.04) 100%);
    z-index: 1;
}
.pl-frame::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    z-index: 2;
}
.pl-frame:hover {
    transform: translateY(-3px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 32px 100px -20px rgba(0, 0, 0, 0.75),
        0 14px 50px -16px rgba(0, 0, 0, 0.6),
        0 0 60px -20px rgba(201, 169, 98, 0.15);
}
.pl-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
    position: relative;
    z-index: 0;
}

/* Graceful placeholder shown when the image isn't on disk yet —
   styled to read as a deliberate "screenshot loading" frame.
   Subtle scan-line shimmer animation runs across the surface so it
   feels live rather than empty. */
.pl-fallback {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px;
    padding: 56px 32px;
    aspect-ratio: 16 / 9;
    color: var(--text-muted);
    text-align: center;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 12px, transparent 12px 24px),
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(201,169,98,0.05), transparent 70%),
        linear-gradient(180deg, #080808, #050505);
    position: relative; z-index: 1; overflow: hidden;
}

/* Scan-line shimmer — diagonal gradient travelling left-to-right.
   Slow and faint; reads as "live waiting" rather than "broken". */
.pl-fallback::before {
    content: '';
    position: absolute;
    top: -50%; bottom: -50%;
    left: -30%;
    width: 30%;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(201, 169, 98, 0.0) 35%,
        rgba(201, 169, 98, 0.05) 50%,
        rgba(201, 169, 98, 0.0) 65%,
        transparent 100%);
    transform: skewX(-12deg);
    animation: pl-shimmer 3.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes pl-shimmer {
    0%   { left: -30%; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}

/* Corner-bracket frame markers — terminal-style chrome that makes
   the empty state look intentional, like the platform is preparing
   a panel rather than missing one. */
.pl-fallback::after {
    content: '';
    position: absolute;
    inset: 14px;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(201,169,98,0.35) 0 14px, transparent 14px) top left / 14px 1px no-repeat,
        linear-gradient(to bottom, rgba(201,169,98,0.35) 0 14px, transparent 14px) top left / 1px 14px no-repeat,
        linear-gradient(to left, rgba(201,169,98,0.35) 0 14px, transparent 14px) top right / 14px 1px no-repeat,
        linear-gradient(to bottom, rgba(201,169,98,0.35) 0 14px, transparent 14px) top right / 1px 14px no-repeat,
        linear-gradient(to right, rgba(201,169,98,0.35) 0 14px, transparent 14px) bottom left / 14px 1px no-repeat,
        linear-gradient(to top, rgba(201,169,98,0.35) 0 14px, transparent 14px) bottom left / 1px 14px no-repeat,
        linear-gradient(to left, rgba(201,169,98,0.35) 0 14px, transparent 14px) bottom right / 14px 1px no-repeat,
        linear-gradient(to top, rgba(201,169,98,0.35) 0 14px, transparent 14px) bottom right / 1px 14px no-repeat;
    opacity: 0.7;
}

.pl-fallback > * { position: relative; z-index: 1; }

.pl-fallback .pl-icon {
    width: 44px; height: 44px;
    color: var(--accent-gold);
    opacity: 0.5;
    animation: pl-pulse 2.4s ease-in-out infinite;
}
@keyframes pl-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 0.85; transform: scale(1.04); }
}

.pl-fallback .pl-name {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-gold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.92;
    padding: 3px 10px;
    border: 1px solid rgba(201, 169, 98, 0.28);
    border-radius: 3px;
    background: rgba(201, 169, 98, 0.04);
}
.pl-fallback .pl-caption {
    font-family: var(--font-sans);
    font-size: 0.86rem;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.55;
    font-weight: 300;
}
.pl-fallback .pl-hint {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--accent-gold);
    letter-spacing: 0.06em;
    margin-top: 4px;
    opacity: 0.55;
    text-transform: uppercase;
}

/* When the user @prefers-reduced-motion, kill the animations
   politely — placeholder still looks intentional via the
   corner brackets + gold badge. */
@media (prefers-reduced-motion: reduce) {
    .pl-fallback::before { animation: none; opacity: 0; }
    .pl-fallback .pl-icon { animation: none; }
}
.pl-frame[data-loaded="true"] .pl-fallback { display: none; }
.pl-frame[data-loaded="false"] img { display: none; }

/* Tabbed image gallery — rendered via landing-image-gallery.js
   wherever a `.pl-tabs` wrapper appears with data-tabs JSON */
.pl-gallery {
    display: flex; flex-direction: column;
    gap: 18px;
    margin-top: 8px;
}
.pl-tabs {
    display: flex; flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}
.pl-tab {
    padding: 9px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.pl-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.025);
}
.pl-tab.active {
    color: var(--accent-gold);
    background: rgba(201, 169, 98, 0.08);
    border-color: rgba(201, 169, 98, 0.25);
}
.pl-gallery-stage { position: relative; }
.pl-gallery-stage .pl-frame { display: none; }
.pl-gallery-stage .pl-frame.active { display: block; }
.pl-caption-strip {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
    font-weight: 300;
}
.pl-caption-strip strong {
    color: var(--text-primary);
    font-weight: 500;
    margin-right: 6px;
}

/* Lightbox modal — click any .pl-frame to open full-screen */
.pl-lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center; justify-content: center;
    padding: 32px;
    cursor: zoom-out;
}
.pl-lightbox.active { display: flex; }
.pl-lightbox img {
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    border-radius: 8px;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8);
    cursor: default;
}
.pl-lightbox .pl-lightbox-close {
    position: absolute; top: 24px; right: 24px;
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.pl-lightbox .pl-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

/* Full-bleed showcase — used for the most striking screenshots.
   Image takes the entire section width with text above. */
.pl-showcase {
    margin-top: 24px;
}
.pl-showcase .pl-frame {
    border-radius: 14px;
}
.pl-showcase-pair {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    margin-top: 24px;
}
@media (max-width: 1024px) {
    .pl-showcase-pair { grid-template-columns: 1fr; }
}

/* Hero variant — image stacked behind text with subtle overlay */
.hero-visual.pl-frame {
    aspect-ratio: 16 / 11;
    cursor: zoom-in;
}
.hero-visual.pl-frame img { aspect-ratio: 16 / 11; object-fit: cover; }

/* ═══════════════════════════════════════════════════════════════
   NEW SECTIONS — workflow loop, modules grid, deep-dive substeps,
   stochastic cards, factor stages, supplementary cards, ops grid
   (active execution + project board)
   ═══════════════════════════════════════════════════════════════ */

/* ── Workflow loop — elegant 4×2 grid with oversized numerals ── */
.workflow-section {
    background: linear-gradient(180deg, rgba(201,169,98,0.02), transparent);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}
.loop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;                                /* hairline rule between cards */
    margin-top: 44px;
    background: rgba(255, 255, 255, 0.04);   /* shows through the gap as a subtle grid */
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
}
.loop-step {
    display: flex; flex-direction: column;
    gap: 14px;
    padding: 36px 32px 32px;
    background: linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
    min-height: 220px;
    position: relative;
    transition: background 0.4s ease, transform 0.4s ease;
    cursor: default;
}
.loop-step::before {
    /* subtle gold glow that breathes on hover — adds dimensionality */
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 30% 0%, rgba(201,169,98,0.04), transparent 60%);
    opacity: 0; transition: opacity 0.4s ease;
    pointer-events: none;
}
.loop-step:hover {
    background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%);
}
.loop-step:hover::before { opacity: 1; }
.loop-step .ls-num {
    font-family: var(--font-display);
    font-size: 2.4rem; font-weight: 200;
    color: var(--accent-gold);
    letter-spacing: -0.02em;
    line-height: 1;
    /* Subtle gradient — same treatment as the page headlines so the
       big numerals feel like part of the type system, not stickers. */
    background: linear-gradient(180deg, #e6c97a 0%, #c9a962 60%, #8b7340 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(201, 169, 98, 0.12);
    width: fit-content;
    padding-right: 22px;
}
.loop-step .ls-name {
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-top: 4px;
}
.loop-step .ls-desc {
    font-size: 0.84rem; color: var(--text-secondary);
    line-height: 1.6; font-weight: 300;
    margin-top: auto;
}
/* Last card (Diagnose) gets a hint that it loops back */
.loop-step.is-final {
    background: linear-gradient(180deg, #0e0d1a 0%, #08080f 100%);
}
.loop-step.is-final .ls-num {
    background: linear-gradient(180deg, #c5a3e2 0%, #9b7bb8 60%, #6a5482 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: rgba(155, 123, 184, 0.18);
}

/* The "the loop never stops" closer line — elegant footer */
.loop-closer {
    display: flex; align-items: center; justify-content: center;
    gap: 14px;
    margin-top: 36px;
    padding: 18px 28px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.01em;
}
.loop-closer .lc-arrow {
    font-size: 1.3rem;
    color: var(--accent-purple);
    opacity: 0.85;
    animation: lc-rotate 8s linear infinite;
    display: inline-block;
    transform-origin: center;
}
@keyframes lc-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.loop-closer strong {
    color: var(--text-primary);
    font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
    .loop-closer .lc-arrow { animation: none; }
}

/* ── 7 Modules grid ──────────────────────────────────────── */
.modules-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-top: 12px;
}
.module-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 22px 20px;
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    text-decoration: none; color: inherit;
    transition: all 0.25s ease;
    min-height: 220px;
    position: relative; overflow: hidden;
}
.module-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: var(--accent-gold); opacity: 0; transition: opacity 0.25s ease;
}
.module-card:hover { border-color: var(--card-border-hover); transform: translateY(-2px); }
.module-card:hover::before { opacity: 1; }
.module-card.featured { border-color: rgba(201,169,98,0.35); background: linear-gradient(180deg, rgba(201,169,98,0.05), var(--bg-card)); }
.module-card.featured::before { opacity: 1; }
.module-card .mc-num { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent-gold); letter-spacing: 0.18em; }
.module-card .mc-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.module-card .mc-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; font-weight: 300; flex: 1; }
.module-card .mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.module-card .mc-tags span {
    font-size: 0.62rem; padding: 3px 8px; border-radius: 999px;
    background: rgba(201,169,98,0.06);
    border: 1px solid rgba(201,169,98,0.18);
    color: var(--accent-gold); letter-spacing: 0.04em;
}

/* ── Deep-dive substep heading ──────────────────────────── */
.deep-section .substep { margin-top: 56px; }
.deep-section .substep-label {
    font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-secondary);
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px;
    padding-bottom: 8px; border-bottom: 1px solid var(--card-border);
}
.deep-section .substep-note {
    margin-top: 14px; font-size: 0.82rem; color: var(--text-muted);
    line-height: 1.55; font-weight: 300; font-style: italic;
}
.deep-section code {
    font-family: var(--font-mono); font-size: 0.84em;
    padding: 1px 6px; border-radius: 3px;
    background: rgba(201,169,98,0.08); color: var(--accent-gold);
    border: 1px solid rgba(201,169,98,0.18);
}

/* ── Regime Analysis demo (faithful copy of RA001RGAX shell) ──
   Lifted from strategies/RA001RGAX/templates/index.html and namespaced
   .ra-demo-* so it doesn't collide with the rest of the landing.
   Tokens redeclared inside the wrapper so the panel inherits the
   platform's exact look (#000 background, #1e3a2f green border, mono
   font) regardless of what the surrounding landing CSS says. */
.ra-demo {
    --ra-bg-primary: #000;
    --ra-bg-secondary: #0a0a0a;
    --ra-bg-tertiary: #111;
    --ra-bg-input: #0a0a0a;
    --ra-bg-hover: #1a1a1a;
    --ra-text-primary: #c9d1d9;
    --ra-text-secondary: #8b949e;
    --ra-text-tertiary: #6e7681;
    --ra-border-primary: #1e3a2f;
    --ra-accent-teal: #2ea043;
    --ra-accent-teal-dim: #238636;
    --ra-accent-blue: #58a6ff;
    --ra-accent-green: #3fb950;
    --ra-accent-red: #f85149;
    --ra-accent-yellow: #d29922;

    border: 1px solid var(--ra-border-primary);
    background: var(--ra-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'SF Mono', 'Menlo', 'Consolas', 'Monaco', monospace;
    color: var(--ra-text-primary);
}

/* Header */
.ra-demo-header {
    background: var(--ra-bg-secondary);
    border-bottom: 1px solid var(--ra-border-primary);
    padding: 8px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.ra-demo-h-title { font-size: 0.9rem; font-weight: 600; color: var(--ra-text-primary); letter-spacing: 0.5px; }
.ra-demo-h-subtitle { font-size: 0.6rem; color: var(--ra-text-secondary); max-width: 600px; line-height: 1.3; }
.ra-demo-status {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 4px;
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
}
.ra-demo-status.loaded { background: rgba(34, 197, 94, 0.2); color: var(--ra-accent-green); }
.ra-demo-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Main grid */
.ra-demo-main {
    display: grid; grid-template-columns: 280px 1fr;
    height: 600px;
}

/* Left panel */
.ra-demo-left {
    background: var(--ra-bg-primary);
    border-right: 1px solid var(--ra-border-primary);
    overflow-y: auto;
    padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.ra-demo-section { display: flex; flex-direction: column; gap: 6px; }
.ra-demo-st {
    font-size: 11px; font-weight: 500; color: var(--ra-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px;
    padding-bottom: 6px; border-bottom: 1px solid var(--ra-border-primary);
    margin-bottom: 6px;
}
.ra-demo-label {
    display: block; font-size: 11px; font-weight: 500;
    text-transform: uppercase; color: var(--ra-text-tertiary);
    margin-bottom: 6px; letter-spacing: 0.5px;
}
.ra-demo-input, .ra-demo-select {
    width: 100%; padding: 8px 10px;
    background: var(--ra-bg-input);
    border: 1px solid var(--ra-border-primary);
    border-radius: 6px;
    color: var(--ra-text-primary); font-size: 13px; font-family: inherit;
}
.ra-demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: end; }
.ra-demo-btn {
    padding: 9px 14px; border: none; border-radius: 6px;
    font-size: 13px; font-weight: 500; font-family: inherit;
    cursor: not-allowed; width: 100%;
}
.ra-demo-btn-primary { background: var(--ra-accent-teal-dim); color: #fff; opacity: 0.85; }

/* Metrics quadrant */
.ra-demo-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ra-demo-mc {
    background: var(--ra-bg-input);
    border: 1px solid var(--ra-border-primary);
    border-radius: 6px;
    padding: 10px 8px; text-align: center;
}
.ra-demo-mv {
    font-size: 14px; font-weight: 600; color: var(--ra-text-secondary);
}
.ra-demo-mv.bullish { color: var(--ra-accent-green); }
.ra-demo-mv.bearish { color: var(--ra-accent-red); }
.ra-demo-mv.sideways { color: var(--ra-accent-yellow); }
.ra-demo-mv.mean-reverting { color: var(--ra-accent-teal); }
.ra-demo-ml {
    font-size: 10px; color: var(--ra-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.3px; margin-top: 4px;
}

/* Hurst scale */
.ra-demo-scale {
    background: var(--ra-bg-input);
    border: 1px solid var(--ra-border-primary);
    border-radius: 6px;
    padding: 10px 12px; margin-top: 8px;
}
.ra-demo-scale-top { font-size: 11px; color: var(--ra-text-tertiary); margin-bottom: 4px; }
.ra-demo-hurst-val { color: var(--ra-accent-teal); }
.ra-demo-scale-bar {
    height: 6px;
    background: linear-gradient(to right, var(--ra-accent-teal), var(--ra-text-tertiary), var(--ra-accent-blue));
    border-radius: 3px; position: relative; margin: 6px 0;
}
.ra-demo-scale-marker {
    position: absolute; top: -4px; width: 14px; height: 14px;
    background: white;
    border: 2px solid var(--ra-accent-teal);
    border-radius: 50%; transform: translateX(-50%);
}
.ra-demo-scale-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--ra-text-tertiary); }

/* Config cards */
.ra-demo-cc {
    background: var(--ra-bg-primary);
    border: 1px solid var(--ra-border-primary);
    border-radius: 6px; padding: 10px 12px; margin-bottom: 8px;
    display: flex; flex-direction: column; gap: 6px;
}
.ra-demo-cct {
    font-size: 12px; font-weight: 500; color: var(--ra-text-primary);
    display: flex; align-items: center; justify-content: space-between;
}
.ra-demo-toggle {
    position: relative; width: 32px; height: 16px;
    background: var(--ra-accent-teal);
    border: 1px solid var(--ra-accent-teal);
    border-radius: 8px; flex-shrink: 0;
}
.ra-demo-toggle::after {
    content: ''; position: absolute; width: 12px; height: 12px;
    background: white; border-radius: 50%;
    top: 1px; left: 1px;
}
.ra-demo-toggle.active::after { transform: translateX(16px); }

.ra-demo-slider-row { display: flex; align-items: center; gap: 10px; }
.ra-demo-slider-row input[type="range"] {
    flex: 1; height: 4px;
    -webkit-appearance: none; background: var(--ra-bg-hover);
    border-radius: 2px; outline: none;
}
.ra-demo-sv {
    font-size: 12px; color: var(--ra-text-primary);
    min-width: 35px; text-align: right;
}

/* Right panel — chart tabs + chart area */
.ra-demo-right {
    background: var(--ra-bg-primary);
    display: flex; flex-direction: column; overflow: hidden;
}
.ra-demo-tabs {
    display: flex;
    background: var(--ra-bg-secondary);
    border-bottom: 1px solid var(--ra-border-primary);
    padding: 0 12px;
    overflow-x: auto;
}
.ra-demo-tab {
    padding: 10px 16px;
    font-size: 12px; color: var(--ra-text-secondary);
    background: none; border: none; border-bottom: 2px solid transparent;
    cursor: default; font-family: inherit; white-space: nowrap;
}
.ra-demo-tab.active { color: var(--ra-accent-teal); border-bottom-color: var(--ra-accent-teal); }

.ra-demo-charts {
    flex: 1; padding: 12px; background: var(--ra-bg-primary);
    overflow: hidden; display: flex; flex-direction: column; gap: 10px;
}
.ra-demo-chart-quad {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
    gap: 8px; flex: 1; min-height: 280px;
}

/* Evidence callout — populated by JS with real synthesis output */
.ra-demo-evidence-wrap {
    border-top: 1px solid var(--ra-border-primary);
    padding-top: 10px;
    flex-shrink: 0;
}
.ra-demo-evidence-title {
    font-size: 10px; color: var(--ra-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.ra-demo-evidence {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.ra-demo-evidence li {
    font-size: 11px; color: var(--ra-text-secondary);
    line-height: 1.5; padding: 4px 0;
    display: flex; align-items: flex-start; gap: 8px;
}
.ra-demo-ev-tag {
    font-size: 9px; padding: 2px 7px;
    background: rgba(46, 160, 67, 0.12);
    border: 1px solid rgba(46, 160, 67, 0.3);
    color: var(--ra-accent-teal);
    border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.4px;
    flex-shrink: 0; align-self: flex-start;
    font-weight: 500;
}
.ra-demo-chart-cell {
    border: 1px solid var(--ra-border-primary);
    background: var(--ra-bg-secondary);
    border-radius: 4px;
    padding: 8px; display: flex; flex-direction: column; gap: 4px;
    overflow: hidden;
}
.ra-demo-cell-title {
    font-size: 10px; color: var(--ra-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.ra-demo-cell-viz { flex: 1; min-height: 0; position: relative; }

/* Mobile collapse */
@media (max-width: 880px) {
    .ra-demo-main { grid-template-columns: 1fr; height: auto; }
    .ra-demo-left { max-height: 400px; border-right: none; border-bottom: 1px solid var(--ra-border-primary); }
    .ra-demo-right { min-height: 460px; }
}

/* ── Validation grid (walk-forward + equity curve) ────────── */
.validation-grid {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px;
}
.vc-panel {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.vc-title {
    padding: 14px 18px; border-bottom: 1px solid var(--card-border);
    font-size: 0.78rem; color: var(--accent-purple);
    letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}
.vc-viz { flex: 1; min-height: 360px; }
.vc-equity .vc-viz { min-height: 260px; }
.vc-walkforward .vc-viz { min-height: 360px; }
.vc-note {
    padding: 12px 18px; border-top: 1px solid var(--card-border);
    font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; font-weight: 300;
}

/* ── Stochastic cards row ───────────────────────────────── */
.stoch-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px;
}
.stoch-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 24px 20px;
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    min-height: 220px;
    transition: all 0.25s ease;
}
.stoch-card:hover { border-color: rgba(91,164,164,0.4); transform: translateY(-2px); }
.stoch-card .sc-icon {
    height: 48px; padding: 8px 0; color: var(--accent-teal); opacity: 0.85;
}
.stoch-card .sc-icon svg { width: 100%; height: 100%; }
.stoch-card .sc-name { font-family: var(--font-display); font-size: 0.96rem; font-weight: 600; color: var(--text-primary); }
.stoch-card .sc-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; font-weight: 300; }
.stoch-foot {
    margin-top: 24px; padding: 16px 20px;
    border: 1px solid var(--card-border);
    background: rgba(91,164,164,0.04);
    border-radius: 10px;
    font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; font-weight: 300;
}

/* ── Factor stages (3-column workflow) ──────────────────── */
.factor-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
    margin-top: 8px;
}
.fc-stage {
    display: flex; flex-direction: column; gap: 14px;
    padding: 24px;
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    min-height: 380px;
}
.fc-step {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--accent-purple); color: var(--accent-purple);
    font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
}
.fc-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text-primary); letter-spacing: 0.02em; }
.fc-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; font-weight: 300; }
.fc-desc strong { color: var(--text-primary); font-weight: 500; }
.fc-mock { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--card-border); }

/* Rank table */
.fc-mock-rank .fr-row {
    display: grid; grid-template-columns: 22px 80px 1fr 56px;
    gap: 8px; align-items: center;
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary);
}
.fr-rank { color: var(--text-muted); }
.fr-tic { color: var(--text-primary); font-weight: 500; }
.fr-bar { height: 6px; background: rgba(155,123,184,0.1); border-radius: 3px; overflow: hidden; }
.fr-bar i { display: block; height: 100%; background: var(--accent-purple); border-radius: 3px; }
.fr-score { color: #3fb950; text-align: right; font-weight: 500; }

/* Allocation bar */
.fc-mock-construct .alloc-bar {
    display: flex; height: 12px; border-radius: 6px; overflow: hidden;
}
.alloc-bar i { display: block; height: 100%; }
.ab-mvo { background: var(--accent-gold); }
.ab-hrp { background: var(--accent-teal); }
.ab-ivol { background: var(--accent-purple); }
.alloc-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 0.7rem; color: var(--text-secondary); flex-wrap: wrap; }
.alloc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.alloc-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* Autopsy bars */
.fc-mock-autopsy .ap-row {
    display: grid; grid-template-columns: 64px 1fr 56px; gap: 10px; align-items: center;
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary);
}
.ap-bar { height: 6px; border-radius: 3px; }
.ap-bar.pos { background: rgba(63,185,80,0.55); }
.ap-bar.neg { background: rgba(248,81,73,0.55); }

.factor-foot {
    margin-top: 24px; padding: 16px 20px;
    border: 1px solid var(--card-border);
    background: rgba(155,123,184,0.04);
    border-radius: 10px;
    font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; font-weight: 300;
}

/* ── Supplementary cards ────────────────────────────────── */
.supp-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.supp-card {
    padding: 22px 20px;
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    transition: all 0.25s ease;
}
.supp-card:hover { border-color: rgba(91,164,164,0.4); transform: translateY(-2px); }
.supp-card .supp-name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; color: var(--accent-teal); margin-bottom: 8px; }
.supp-card .supp-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; font-weight: 300; }

/* ── Operations grid (active execution + project board) ─── */
.ops-grid {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px;
    align-items: stretch;
}

/* Active execution panel — mirrors home.html sidebar */
.active-exec-panel {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.aep-header {
    font-family: var(--font-mono);
    font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent-gold); display: flex; align-items: center; gap: 8px;
    padding-bottom: 8px; border-bottom: 1px solid var(--card-border);
}
.aep-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #3fb950;
    box-shadow: 0 0 0 2px rgba(63,185,80,0.18), 0 0 12px rgba(63,185,80,0.4);
    animation: aep-pulse 2.4s ease-in-out infinite;
}
@keyframes aep-pulse { 0%,100% { opacity: 0.65; } 50% { opacity: 1; } }
.aep-card {
    border: 1px solid var(--card-border);
    background: rgba(255,255,255,0.015);
    border-radius: 8px; padding: 12px;
    display: flex; flex-direction: column; gap: 6px;
}
.aep-card-top { display: flex; justify-content: space-between; align-items: center; }
.aep-name { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); }
.aep-status { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; color: #3fb950; }
.aep-status.portfolio-tag { color: var(--accent-purple); }
.aep-card-mid { font-size: 0.7rem; color: var(--text-secondary); font-family: var(--font-mono); letter-spacing: 0.04em; }
.aep-instance {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: 6px;
    background: rgba(201,169,98,0.04);
    border: 1px solid rgba(201,169,98,0.12);
    font-size: 0.74rem; color: var(--text-primary);
}
.aep-mr { font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent-gold); padding: 1px 6px; border: 1px solid rgba(201,169,98,0.3); border-radius: 3px; margin-right: 8px; }
.aep-pill { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 999px; background: rgba(63,185,80,0.1); color: #3fb950; border: 1px solid rgba(63,185,80,0.2); }
.aep-pill.scan { background: rgba(91,164,164,0.1); color: var(--accent-teal); border-color: rgba(91,164,164,0.2); }
.aep-card.portfolio { border-color: rgba(155,123,184,0.18); background: rgba(155,123,184,0.04); }
.aep-pf-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-size: 0.72rem; color: var(--text-secondary); padding: 4px 0; }
.aep-pf-row.totals { color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); border-top: 1px solid var(--card-border); padding-top: 8px; margin-top: 4px; }
.pl-pos { color: #3fb950; }

/* Project board */
.project-board {
    border: 1px solid var(--card-border);
    background: var(--bg-card);
    border-radius: 12px;
    padding: 22px;
    display: flex; flex-direction: column; gap: 16px;
}
.pb-header { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--card-border); }
.pb-tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; color: var(--accent-purple); }
.pb-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.pb-thread { display: flex; flex-direction: column; gap: 10px; position: relative; }
.pb-thread::before {
    content: ''; position: absolute; left: 8px; top: 12px; bottom: 12px;
    width: 1px; background: linear-gradient(180deg, var(--accent-purple) 0%, rgba(155,123,184,0.2) 60%, transparent);
}
.pb-step { display: grid; grid-template-columns: 18px 140px 1fr; gap: 12px; align-items: center; padding: 6px 0; position: relative; }
.pb-mark { width: 18px; text-align: center; font-size: 0.95rem; }
.pb-step.done .pb-mark { color: var(--accent-purple); }
.pb-step.active .pb-mark { color: var(--accent-gold); }
.pb-step.pending .pb-mark { color: var(--text-muted); }
.pb-label { font-size: 0.84rem; font-weight: 500; color: var(--text-primary); }
.pb-step.pending .pb-label { color: var(--text-muted); }
.pb-meta { font-size: 0.74rem; color: var(--text-secondary); font-family: var(--font-mono); letter-spacing: 0.02em; }
.pb-actions { display: flex; gap: 16px; padding-top: 8px; border-top: 1px solid var(--card-border); }
.pb-action { font-size: 0.78rem; color: var(--accent-gold); font-weight: 500; cursor: pointer; }
.pb-action:hover { color: #d4b46e; }

/* ═══════════════════════════════════════════════════════════════
   QUANTIN — type-first lens grid + exchange transcript
   ═══════════════════════════════════════════════════════════════ */

.qn-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 48px;
}
.qn-head .section-title,
.qn-head .section-lede {
    margin-left: auto; margin-right: auto;
}

.qn-lens-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
}
.qn-lens {
    background: linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
    padding: 32px 24px 28px;
    display: flex; flex-direction: column;
    gap: 12px;
    position: relative;
    transition: background 0.35s ease;
    min-height: 280px;
}
.qn-lens::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 30% 0%, rgba(201,169,98,0.04), transparent 60%);
    opacity: 0; transition: opacity 0.35s ease;
    pointer-events: none;
}
.qn-lens:hover { background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%); }
.qn-lens:hover::before { opacity: 1; }

.qn-lens-num {
    font-family: var(--font-display);
    font-size: 1.9rem; font-weight: 200;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #e6c97a 0%, #c9a962 60%, #8b7340 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(201, 169, 98, 0.12);
    width: fit-content;
    padding-right: 18px;
}
.qn-lens-name {
    font-family: var(--font-display);
    font-size: 1.15rem; font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.qn-lens-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.16em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.qn-lens-body {
    font-size: 0.84rem; color: var(--text-secondary);
    line-height: 1.6; font-weight: 300;
    margin-top: auto;
}

/* Skeptic gets the adversarial purple variant — same treatment
   as the Diagnose card in the workflow loop, so the visual rhyme
   tells you "this is the loop-closing lens". */
.qn-lens-skeptic {
    background: linear-gradient(180deg, #0e0d1a 0%, #08080f 100%);
}
.qn-lens-skeptic .qn-lens-num {
    background: linear-gradient(180deg, #c5a3e2 0%, #9b7bb8 60%, #6a5482 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: rgba(155, 123, 184, 0.18);
}
.qn-lens-skeptic .qn-lens-tag { color: #c87575; }

/* Exchange transcript — typewritten Q&A, no chat-bubble UI */
.qn-exchange {
    max-width: 860px;
    margin: 56px auto 0;
    padding: 36px 40px;
    background: linear-gradient(180deg, #0c0c0c, #070707);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 18px 60px -20px rgba(0, 0, 0, 0.5);
    position: relative;
}
.qn-exchange-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.qn-exchange-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.qn-exchange-lens {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c87575;
    padding: 4px 11px;
    border: 1px solid rgba(200, 117, 117, 0.3);
    background: rgba(200, 117, 117, 0.05);
    border-radius: 999px;
}
.qn-q {
    margin: 0 0 20px;
    padding: 0 0 0 18px;
    border-left: 2px solid rgba(201, 169, 98, 0.35);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 300;
    line-height: 1.55;
    color: var(--text-primary);
    font-style: italic;
}
.qn-a {
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.72;
    font-weight: 300;
}
.qn-a-prefix {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c87575;
    margin-right: 8px;
}
.qn-a strong { color: var(--text-primary); font-weight: 500; }
.qn-a p { margin: 0 0 12px; }
.qn-a-list {
    margin: 0 0 12px;
    padding-left: 22px;
    display: flex; flex-direction: column; gap: 10px;
}
.qn-a-list li::marker { color: var(--accent-gold); font-weight: 600; }
.qn-a-close { margin-top: 14px; font-style: italic; color: var(--text-secondary); }

/* ── Quantin Skeptic-first redesign (2026-05-13) ─────────────
   The Skeptic exchange is now the section's centerpiece. The
   hero exchange card carries the verdict block + numbered demands
   as the visual anchor; the supporting three lenses (Tutor /
   Librarian / Mathematician) live below as a compact icon row. */

.qn-skeptic-word {
    color: #c87575;
    font-weight: 500;
}

.qn-skeptic-hero {
    max-width: 860px;
    margin: 56px auto 0;
    position: relative;
}
/* 2026-05-13 — toned down to feel like a clean chat exchange
   rather than a system-alert card. Single border in the standard
   card-border colour (not red), no glow ring, no animated dot,
   no top accent rail. The Skeptic identity now comes purely from
   the meta strip + the lens chip on the response. */
.qn-skeptic-frame {
    position: relative;
    padding: 32px 36px 36px;
    background: linear-gradient(180deg, #0c0c0c 0%, #070707 100%);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 18px 56px -22px rgba(0, 0, 0, 0.55);
}

.qn-skeptic-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    text-transform: uppercase;
}
.qn-skeptic-meta-left {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text-muted);
}
/* Static lens marker — no animation, no glow. Reads as a chat
   header dot, not a critical-alert pulse. */
.qn-skeptic-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #c87575;
}
.qn-skeptic-lens-name {
    font-weight: 600; letter-spacing: 0.22em;
    color: #c87575;
}
.qn-skeptic-meta-sep { opacity: 0.4; }
.qn-skeptic-meta-mode { color: var(--text-muted); }
.qn-skeptic-meta-right { color: var(--text-muted); }

.qn-skeptic-q {
    margin: 0 0 28px;
    padding: 0 0 0 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.18);
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 300;
    line-height: 1.55;
    color: var(--text-primary);
    font-style: italic;
    position: relative;
}
.qn-skeptic-q-prefix {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-style: normal;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    margin-right: 10px;
    vertical-align: 2px;
}

.qn-skeptic-a {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.72;
    font-weight: 300;
}
.qn-skeptic-a-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
}
.qn-skeptic-a-prefix {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c87575;
    font-weight: 600;
}
.qn-skeptic-a-lens {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c87575;
    padding: 3px 9px;
    border: 1px solid rgba(200, 117, 117, 0.3);
    background: rgba(200, 117, 117, 0.06);
    border-radius: 999px;
}
.qn-skeptic-headline {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin: 0 0 18px;
}
.qn-skeptic-para {
    margin: 0 0 14px;
    color: var(--text-secondary);
}
.qn-skeptic-para em {
    color: var(--text-primary);
    font-style: italic;
    font-weight: 400;
}
.qn-skeptic-para strong {
    color: var(--text-primary); font-weight: 500;
}

/* Verdict block — the visual punch in the middle of the response.
   2026-05-13 — softer red tint, slimmer accent rail. Reads as a
   pulled-quote callout, not an emergency banner. */
.qn-verdict {
    margin: 22px 0 22px;
    padding: 20px 22px;
    background:
        linear-gradient(180deg, rgba(200, 117, 117, 0.055) 0%, rgba(200, 117, 117, 0.02) 100%),
        rgba(255, 255, 255, 0.008);
    border-left: 2px solid rgba(200, 117, 117, 0.7);
    border-radius: 0 10px 10px 0;
}
.qn-verdict-tag {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c87575;
    margin-bottom: 6px;
    font-weight: 600;
    opacity: 0.85;
}
.qn-verdict-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #e8b8b8;
    margin-bottom: 10px;
}
.qn-verdict-desc {
    margin: 0 0 8px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.qn-verdict-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.68;
    display: flex; flex-direction: column; gap: 4px;
}
.qn-verdict-list li::marker { color: #c87575; }

/* Three numbered demands */
.qn-skeptic-demands-intro {
    margin-top: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 400;
}
.qn-skeptic-demands {
    margin: 0 0 18px;
    padding-left: 0;
    list-style: none;
    counter-reset: qn-demand;
    display: flex; flex-direction: column; gap: 14px;
}
.qn-skeptic-demands li {
    position: relative;
    padding: 14px 16px 14px 50px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    counter-increment: qn-demand;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.92rem;
    transition: border-color 0.2s ease;
}
.qn-skeptic-demands li::before {
    content: counter(qn-demand);
    position: absolute;
    left: 16px; top: 14px;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px;                       /* sharper, less "badge" */
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.qn-skeptic-demands li:hover::before {
    border-color: rgba(200, 117, 117, 0.5);
    color: #c87575;
}
.qn-skeptic-demands li strong { color: var(--text-primary); font-weight: 500; }

.qn-skeptic-close {
    margin: 18px 0 0;
    font-style: italic;
    color: var(--text-primary);
    font-size: 0.96rem;
    line-height: 1.65;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.qn-skeptic-close em {
    color: #e8b8b8;
    font-style: italic;
}

/* Supporting three lenses (Tutor / Librarian / Mathematician) */
.qn-supporting-head {
    max-width: 860px;
    margin: 72px auto 24px;
    text-align: center;
}
.qn-supporting-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.qn-supporting-lede {
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
    margin: 0;
    max-width: 560px;
    margin: 0 auto;
}

.qn-supporting-grid {
    max-width: var(--landing-max-width);
    margin: 0 auto;
    padding: 0 var(--landing-pad-x);
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.qn-lens-mini {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15,15,15,0.85), rgba(10,10,10,0.85));
    transition: all 0.25s ease;
}
.qn-lens-mini:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-1px);
}
.qn-lens-mini-glyph {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.015);
}
.qn-lens-mini-glyph svg {
    width: 20px; height: 20px;
    opacity: 0.85;
}
.qn-lens-mini-tutor      { color: #a09080; }
.qn-lens-mini-librarian  { color: #80a0a0; }
.qn-lens-mini-math       { color: #9080a0; }
.qn-lens-mini-text {
    display: flex; flex-direction: column; gap: 2px;
    min-width: 0;
}
.qn-lens-mini-num {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: currentColor;
    opacity: 0.7;
}
.qn-lens-mini-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}
.qn-lens-mini-hook {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    font-weight: 300;
    margin-top: 2px;
}
.qn-lens-mini-hook em {
    color: var(--text-primary);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   QUANTIN — four-lens tab carousel (2026-05-14 redesign)
   Replaces the static Skeptic-hero + 3-tile supporting-row pattern.
   Tabs at the top, swappable panel below. Each panel uses the same
   chat-frame chrome as the old Skeptic card (we kept the visual,
   broadened the family of who's talking). Auto-rotates every 9s
   until the user clicks a tab.
   ═══════════════════════════════════════════════════════════════ */

.qn-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 980px;
    margin: 48px auto 18px;
    padding: 0 var(--landing-pad-x);
}
.qn-tab {
    display: flex; flex-direction: column; gap: 4px;
    text-align: left;
    padding: 14px 16px 13px;
    background: linear-gradient(180deg, rgba(15,15,15,0.85), rgba(10,10,10,0.85));
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
    color: inherit;
    font: inherit;
    position: relative;
    overflow: hidden;
}
.qn-tab:hover { transform: translateY(-1px); border-color: var(--card-border-hover); }
.qn-tab .qn-tab-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
    align-self: flex-start;
    margin-bottom: 4px;
    opacity: 0.85;
}
.qn-tab .qn-tab-name {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}
.qn-tab .qn-tab-hook {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 300;
}

/* Per-lens accent colour. Skeptic is the red-tinted hero; others
   pick from the same muted palette as the old supporting tiles. */
.qn-tab[data-qn-tab="skeptic"]    { color: #c87575; }
.qn-tab[data-qn-tab="tutor"]      { color: #a09080; }
.qn-tab[data-qn-tab="librarian"]  { color: #80a0a0; }
.qn-tab[data-qn-tab="math"]       { color: #9080a0; }

.qn-tab.is-active {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.005) 100%),
        rgba(10, 10, 10, 0.95);
    border-color: currentColor;
    box-shadow: 0 0 0 1px currentColor inset;
}
.qn-tab.is-active::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: currentColor;
    opacity: 0.85;
}

/* Panel container — only the .is-active panel renders */
.qn-panels {
    max-width: 880px;
    margin: 0 auto;
    position: relative;
    padding: 0 var(--landing-pad-x);
}
.qn-panel { display: none; }
.qn-panel.is-active { display: block; animation: qn-fade-in 0.32s ease; }
@keyframes qn-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Frame — generic version of the old Skeptic frame. The accent
   colour propagates from the panel's lens via currentColor. */
.qn-frame {
    position: relative;
    padding: 32px 36px 36px;
    background: linear-gradient(180deg, #0c0c0c 0%, #070707 100%);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 18px 56px -22px rgba(0, 0, 0, 0.55);
}
.qn-frame-skeptic    { color: #c87575; }
.qn-frame-tutor      { color: #a09080; }
.qn-frame-librarian  { color: #80a0a0; }
.qn-frame-math       { color: #9080a0; }

.qn-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    text-transform: uppercase;
}
.qn-meta-left {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text-muted);
}
.qn-meta-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
}
.qn-meta-lens {
    font-weight: 600; letter-spacing: 0.22em;
    color: currentColor;
}
.qn-meta-sep { opacity: 0.4; }
.qn-meta-mode { color: var(--text-muted); }
.qn-meta-right { color: var(--text-muted); }

.qn-q {
    margin: 0 0 28px;
    padding: 0 0 0 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.18);
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 300;
    line-height: 1.55;
    color: var(--text-primary);
    font-style: italic;
}
.qn-q-prefix {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-style: normal;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    margin-right: 10px;
    vertical-align: 2px;
}

.qn-a {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.72;
    font-weight: 300;
}
.qn-a-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
}
.qn-a-prefix {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: currentColor;
    font-weight: 600;
}
.qn-a-lens {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: currentColor;
    padding: 3px 9px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 999px;
    opacity: 0.95;
}
.qn-headline {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin: 0 0 18px;
}
.qn-para {
    margin: 0 0 14px;
    color: var(--text-secondary);
}
.qn-para em { color: var(--text-primary); font-style: italic; font-weight: 400; }
.qn-para strong { color: var(--text-primary); font-weight: 500; }
.qn-close {
    margin: 18px 0 0;
    font-style: italic;
    color: var(--text-primary);
    font-size: 0.96rem;
    line-height: 1.65;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.qn-close em { color: currentColor; font-style: italic; }

/* Skeptic-only blocks (verdict + demands) — keep the existing CSS
   from the old `.qn-skeptic-*` block by aliasing the new generic
   selectors. */
.qn-demands-intro {
    margin-top: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 400;
}
.qn-demands {
    margin: 0 0 18px;
    padding-left: 0;
    list-style: none;
    counter-reset: qn-demand;
    display: flex; flex-direction: column; gap: 14px;
}
.qn-demands li {
    position: relative;
    padding: 14px 16px 14px 50px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    counter-increment: qn-demand;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.92rem;
}
.qn-demands li::before {
    content: counter(qn-demand);
    position: absolute;
    left: 16px; top: 14px;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
}
.qn-demands li strong { color: var(--text-primary); font-weight: 500; }

/* Tutor — animated walk-forward window illustration. Three frames
   slide-stacked, each one shifted further right than the last to
   suggest the rolling window. Pure CSS, no JS. */
.qn-tutor-frames {
    margin: 14px 0 18px;
    padding: 18px 16px;
    border: 1px dashed rgba(160, 144, 128, 0.3);
    border-radius: 10px;
    background: rgba(160, 144, 128, 0.02);
    display: flex; flex-direction: column; gap: 8px;
}
.qn-tutor-frame {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 4px;
    align-items: stretch;
}
.qn-tutor-frame-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    padding: 8px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}
.qn-tutor-frame .qn-tutor-frame-label:first-child {
    background: linear-gradient(90deg, rgba(160, 144, 128, 0.14), rgba(160, 144, 128, 0.06));
    border: 1px solid rgba(160, 144, 128, 0.25);
}
.qn-tutor-frame .qn-tutor-frame-label:last-child {
    background: rgba(232, 184, 184, 0.06);
    border: 1px solid rgba(232, 184, 184, 0.2);
    color: #e8b8b8;
}
.qn-tutor-frame-shift  { margin-left: 8%;  opacity: 0.85; }
.qn-tutor-frame-shift2 { margin-left: 16%; opacity: 0.7;  }
.qn-tutor-caption {
    margin-top: 4px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Librarian — set of mini "row cards" for the recommended projects. */
.qn-lib-cards {
    list-style: none;
    margin: 12px 0 8px;
    padding: 0;
    display: flex; flex-direction: column;
    gap: 12px;
}
.qn-lib-card {
    padding: 14px 16px;
    border: 1px solid rgba(128, 160, 160, 0.18);
    background: rgba(128, 160, 160, 0.02);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}
.qn-lib-card-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 6px;
}
.qn-lib-card-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}
.qn-lib-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
    flex-shrink: 0;
}
.qn-lib-tag-keep {
    color: #9fbf95;
    border: 1px solid rgba(159, 191, 149, 0.35);
    background: rgba(159, 191, 149, 0.06);
}
.qn-lib-tag-warn {
    color: #d4b56a;
    border: 1px solid rgba(212, 181, 106, 0.35);
    background: rgba(212, 181, 106, 0.06);
}
.qn-lib-tag-drop {
    color: #c87575;
    border: 1px solid rgba(200, 117, 117, 0.35);
    background: rgba(200, 117, 117, 0.06);
}
.qn-lib-card p { margin: 0; }

/* Mathematician — math block container. KaTeX renders inline; we
   just want vertical space + a subtle box around display equations. */
.qn-math-block {
    margin: 14px 0 18px;
    padding: 14px 12px;
    background: rgba(144, 128, 160, 0.04);
    border: 1px solid rgba(144, 128, 160, 0.18);
    border-radius: 10px;
    text-align: center;
    overflow-x: auto;
}
.qn-math-block .katex { font-size: 1.05em; color: var(--text-primary); }
.qn-math-block .katex-display { margin: 0; }

/* Responsive: tabs collapse to 2x2 on narrow viewports. The panel
   itself already flexes via its parent .qn-panels max-width. */
@media (max-width: 768px) {
    .qn-tabs { grid-template-columns: repeat(2, 1fr); }
    .qn-frame { padding: 24px 22px 26px; }
    .qn-headline { font-size: 1.4rem; }
    .qn-math-block .katex { font-size: 0.95em; }
}
@media (max-width: 420px) {
    .qn-tabs { grid-template-columns: 1fr 1fr; gap: 8px; }
    .qn-tab .qn-tab-hook { display: none; }
    .qn-tab { padding: 12px 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   TIME TRAVEL — flagship centerpiece (Backwards / Forwards)
   ═══════════════════════════════════════════════════════════════ */

/* Centered headline + lede for the section */
.tt-hero-head {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 56px;
}
.tt-hero-title {
    margin-left: auto; margin-right: auto;
    font-size: 2.8rem;
    line-height: 1.08;
}
.tt-hero-lede {
    margin-left: auto; margin-right: auto;
    font-size: 1.05rem;
}
.tt-hero-lede em {
    font-style: italic;
    color: var(--text-primary);
}

/* Two-mode showcase — Backwards | divider | Forwards */
.tt-modes {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: stretch;
    border: 1px solid rgba(201, 169, 98, 0.15);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #0c0c0c 0%, #070707 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 24px 80px -20px rgba(0, 0, 0, 0.55);
}
.tt-mode {
    padding: 44px 44px 40px;
    display: flex; flex-direction: column;
    gap: 18px;
    position: relative;
    transition: background 0.4s ease;
}
.tt-mode-back {
    background: radial-gradient(ellipse 90% 70% at 0% 50%, rgba(155, 123, 184, 0.05), transparent 60%);
}
.tt-mode-forward {
    background: radial-gradient(ellipse 90% 70% at 100% 50%, rgba(201, 169, 98, 0.05), transparent 60%);
}
.tt-mode-glyph {
    width: 56px; height: 56px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.015);
}
.tt-mode-back .tt-mode-glyph { color: var(--accent-purple); }
.tt-mode-forward .tt-mode-glyph { color: var(--accent-gold); }
.tt-mode-glyph svg { width: 100%; height: 100%; }

.tt-mode-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem; letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.tt-mode-back .tt-mode-tag { color: var(--accent-purple); }
.tt-mode-forward .tt-mode-tag { color: var(--accent-gold); }

.tt-mode-name {
    font-family: var(--font-display);
    font-size: 1.95rem; font-weight: 200;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #d6d6d6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tt-mode-back .tt-mode-name {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #c5a3e2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tt-mode-forward .tt-mode-name {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #f0e2c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tt-mode-body {
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.65;
    font-weight: 300;
    margin: 0;
}
.tt-mode-body em {
    font-style: italic;
    color: var(--text-primary);
}

.tt-mode-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.tt-mode-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    font-weight: 300;
    padding-left: 16px;
    position: relative;
}
.tt-mode-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 6px; height: 1px;
    background: currentColor;
    opacity: 0.5;
}
.tt-mode-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Divider between the two modes. 2026-05-13 — beefed up so the
   chip is actually readable; was nearly invisible at default
   mid-grey on the dark background. Brighter chip, brighter line,
   gold accent ring. */
.tt-mode-divider {
    display: flex; align-items: center; justify-content: center;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 5%,
        rgba(201, 169, 98, 0.18) 30%,
        rgba(201, 169, 98, 0.28) 50%,
        rgba(201, 169, 98, 0.18) 70%,
        transparent 95%);
    position: relative;
}
.tt-mode-divider span {
    position: absolute;
    padding: 8px 18px;
    background: linear-gradient(180deg, #14110a 0%, #0c0a07 100%);
    border: 1px solid rgba(201, 169, 98, 0.45);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    box-shadow:
        0 0 0 4px rgba(10, 10, 10, 0.9),
        0 0 24px rgba(201, 169, 98, 0.15);
}

/* Crisis-cards block — 2026-05-14 redesigned as a compact chip strip.
   Previously a 4-up card grid with three lines of body copy per card
   (year + name + sentence); on mobile that became four full-height
   stacked blocks. Now a horizontal "year chip" pattern: large gold
   year as the anchor, name + one-line context underneath, much
   shorter visual budget. Mobile (≤640px) collapses to a 2×2 grid
   that fits in a single screen. */
.tt-crisis-block {
    margin-top: 56px;
}
.tt-crisis-head {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 18px;
}

.tt-feature {
    margin-top: 32px;
    padding: 40px 44px 36px;
    border: 1px solid rgba(201, 169, 98, 0.18);
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,169,98,0.04) 0%, transparent 60%),
        linear-gradient(180deg, #0d0d0d 0%, #070707 100%);
    border-radius: 16px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 24px 80px -20px rgba(0, 0, 0, 0.55);
}
.tt-feature-head { margin-bottom: 32px; max-width: 740px; }
.tt-feature-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem; letter-spacing: 0.16em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 14px;
}
.tt-feature-title {
    font-family: var(--font-display);
    font-size: 1.85rem; font-weight: 200; line-height: 1.18;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #d6d6d6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tt-feature-lede {
    font-size: 0.98rem; color: var(--text-secondary);
    line-height: 1.7; font-weight: 300;
    max-width: 720px;
}
.tt-feature-lede em {
    font-style: italic;
    color: var(--text-primary);
}

.tt-crisis-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 0;
}
.tt-crisis-card {
    padding: 16px 16px 14px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.012);
    border-radius: 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: baseline;
    transition: all 0.25s ease;
}
.tt-crisis-card:hover {
    border-color: rgba(201, 169, 98, 0.28);
    background: rgba(201, 169, 98, 0.03);
    transform: translateY(-2px);
}
.tt-crisis-year {
    grid-row: 1 / span 2;
    align-self: center;
    font-family: var(--font-display);
    font-size: 1.85rem; font-weight: 200;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #e6c97a 0%, #c9a962 60%, #8b7340 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.tt-crisis-name {
    font-size: 0.88rem; font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}
.tt-crisis-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.45; font-weight: 300;
    margin-top: 2px;
}
.tt-feature-foot {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Responsive overrides for the new sections ─────────── */
@media (max-width: 1280px) {
    .modules-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1280px) {
    .qn-lens-grid { grid-template-columns: repeat(3, 1fr); }
    .qn-lens:nth-child(4), .qn-lens:nth-child(5) { grid-column: span 1; }
}
/* Crisis chips: 4 across down to ~860px, 2x2 below that (mobile-friendly).
   The whole chip block stays one or two screen-rows max on phones. */
@media (max-width: 860px) {
    .tt-crisis-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    /* Below 560px the side-by-side year+text layout cramps the
       description into a 5-line wrap. Switch to vertical stack:
       year on top as a tag, name below, description hidden. The
       card becomes a compact "year + crisis name" chip. */
    .tt-crisis-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        padding: 12px 12px 12px;
        gap: 4px;
        align-items: flex-start;
    }
    .tt-crisis-year {
        grid-row: 1 / span 1;
        align-self: flex-start;
        font-size: 1.45rem;
    }
    .tt-crisis-name { font-size: 0.8rem; }
    .tt-crisis-desc { display: none; }
}
@media (max-width: 1100px) {
    .stoch-grid { grid-template-columns: repeat(2, 1fr); }
    .factor-grid { grid-template-columns: 1fr; }
    .supp-grid { grid-template-columns: 1fr 1fr; }
    .modules-grid { grid-template-columns: repeat(2, 1fr); }
    .validation-grid { grid-template-columns: 1fr; }
    .ops-grid { grid-template-columns: 1fr; }
    .loop { grid-template-columns: repeat(2, 1fr); }
    .qn-lens-grid { grid-template-columns: repeat(2, 1fr); }
    .qn-supporting-grid { grid-template-columns: 1fr; }
    .tt-feature { padding: 32px 28px 28px; }
    .tt-modes {
        grid-template-columns: 1fr;
    }
    .tt-mode { padding: 36px 32px 32px; }
    .tt-mode-divider {
        width: auto; height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    }
    .tt-hero-title { font-size: 2.2rem; }
}
@media (max-width: 768px) {
    .modules-grid { grid-template-columns: 1fr; }
    .stoch-grid, .supp-grid { grid-template-columns: 1fr; }
    .loop { grid-template-columns: 1fr; }
    .loop-step { min-height: auto; padding: 28px 24px 24px; }
    .loop-step .ls-num { font-size: 2rem; }
    .regime-chips { flex-direction: column; }
    .rc-chip { width: 100%; }
    .pb-step { grid-template-columns: 18px 1fr; }
    .pb-meta { grid-column: 2 / 3; padding-left: 0; }
    .qn-lens-grid { grid-template-columns: 1fr; }
    .qn-lens { min-height: auto; }
    .qn-exchange { padding: 24px 22px; }
    /* Quantin Skeptic-first — mobile tightening */
    .qn-skeptic-frame { padding: 26px 22px 30px; }
    .qn-skeptic-headline { font-size: 1.35rem; line-height: 1.22; }
    .qn-skeptic-meta {
        flex-direction: column; align-items: flex-start; gap: 8px;
        padding-bottom: 14px; margin-bottom: 18px;
    }
    .qn-verdict { padding: 18px 18px; }
    .qn-verdict-name { font-size: 1.2rem; }
    .qn-skeptic-demands li {
        padding: 12px 14px 12px 44px;
        font-size: 0.88rem;
    }
    .qn-skeptic-demands li::before {
        left: 12px; top: 12px;
        width: 20px; height: 20px;
        font-size: 0.68rem;
    }
    .qn-skeptic-q { font-size: 1rem; padding-left: 14px; }
    .qn-supporting-grid { grid-template-columns: 1fr; gap: 12px; }
    /* 2026-05-14 — crisis row stays 2x2 on mobile (was 1-col). The
       new chip layout is short enough that 4 cards fit in two rows;
       collapsing to 1-col was creating the "too much vertical space"
       feedback. */
    .tt-crisis-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tt-feature { padding: 28px 22px 24px; }
    .tt-feature-title { font-size: 1.45rem; }
}

/* ═══════════════════════════════════════════════════════════════
   WAVE 7 (2026-05-12) — Landing redesign
   ───────────────────────────────────────────────────────────────
   New rules:
     .hero-pillars / .pillar             — three-bucket row under hero
     .methodology-section / .mstep       — 8-step grid with output line
     .qn-grid-4                          — Quantin 5→4 lens override
     .qn-mcp-callout                     — bring-your-own-AI strip
     .tour-section / .tour-row           — Tour the Lab shell
     .coverflow / .cf-track / .cf-card   — 3D coverflow carousel
   Everything below is additive — pre-Wave-7 sections keep their
   existing rules above.
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero pillars ─────────────────────────────────────────────
   Three-bucket row beneath the hero h1 + visual. Each pillar
   carries the "value prop in one card" load — Research methods,
   Validation system, Execution layer. */
.hero-pillars {
    max-width: var(--landing-max-width);
    margin: 72px auto 0;
    padding: 0 var(--landing-pad-x);
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative; z-index: 1;
}

/* Legacy pillar (paragraph cards) — kept for any internal page
   that still uses it. The landing now uses .pillar inside
   .hero-pillars-compact below. */
.pillar {
    padding: 28px 26px 30px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15,15,15,0.85) 0%, rgba(10,10,10,0.85) 100%);
    display: flex; flex-direction: column; gap: 10px;
    transition: all 0.25s ease;
    position: relative; overflow: hidden;
    text-decoration: none;
}
.pillar::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: currentColor; opacity: 0; transition: opacity 0.25s ease;
}
.pillar:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}
.pillar:hover::before { opacity: 1; }
.pillar-research   { color: var(--accent-gold); }
.pillar-validation { color: var(--accent-teal); }
.pillar-execution  { color: var(--accent-purple); }
.pillar-num {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    color: currentColor; opacity: 0.85;
}
.pillar-name {
    font-family: var(--font-display);
    font-size: 1.08rem; font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.005em;
    margin-bottom: 2px;
}
.pillar-body {
    font-size: 0.88rem; color: var(--text-secondary);
    line-height: 1.6; font-weight: 300; margin: 0;
}

/* ── Compact 3-pillar ribbon (2026-05-13 landing redesign) ──────
   Replaces the paragraph-heavy pillar cards. Each tile is a tight
   icon-led row: glyph on the left, eyebrow / name / 1-line hook
   stacked on the right. Scannable on mobile in two seconds. */
.hero-pillars-compact {
    margin-top: 56px;
    gap: 16px;
}
.hero-pillars-compact .pillar {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(16,16,18,0.72) 0%, rgba(10,10,12,0.78) 100%);
    backdrop-filter: blur(6px);
}
.hero-pillars-compact .pillar-glyph {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px;
    border: 1px solid currentColor;
    color: currentColor;
    background:
      radial-gradient(circle at 30% 30%, rgba(255,255,255,0.04), transparent 60%),
      rgba(255,255,255,0.015);
    transition: background 0.25s ease, transform 0.25s ease;
}
.hero-pillars-compact .pillar-glyph svg {
    width: 22px; height: 22px;
    opacity: 0.85;
}
.hero-pillars-compact .pillar:hover .pillar-glyph {
    background:
      radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 60%),
      rgba(255,255,255,0.04);
    transform: scale(1.04);
}
.hero-pillars-compact .pillar-text {
    display: flex; flex-direction: column; gap: 2px;
    min-width: 0;
}
.hero-pillars-compact .pillar-num {
    font-size: 0.62rem; letter-spacing: 0.18em;
    margin-bottom: 1px;
}
.hero-pillars-compact .pillar-name {
    font-size: 1.05rem; margin-bottom: 0;
}
.hero-pillars-compact .pillar-hook {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    font-weight: 300;
    letter-spacing: 0.005em;
    margin-top: 2px;
}

/* ── Methodology grid (8-stage canonical loop) ────────────────
   Each step is a small card; the action line says what the user
   does, the output line says what the platform produces. The
   arrow + output line is the Stripe-style "what does this step
   give the next step?" anchor. */
.methodology-section .section-title { max-width: 920px; }
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}
.mstep {
    padding: 20px 22px 22px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--bg-card);
    display: flex; flex-direction: column; gap: 12px;
    transition: all 0.25s ease;
    position: relative; overflow: hidden;
    min-height: 120px;
}
.mstep::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: var(--accent-gold); opacity: 0;
    transition: opacity 0.25s ease;
}
.mstep:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}
.mstep:hover::before { opacity: 1; }
.mstep-head {
    display: flex; align-items: baseline; gap: 10px;
}
.mstep-num {
    font-family: var(--font-mono);
    font-size: 0.68rem; letter-spacing: 0.18em;
    color: var(--accent-gold);
}
.mstep-name {
    font-family: var(--font-display);
    font-size: 1.08rem; font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}
.mstep-output {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5; font-weight: 300;
}
.mstep-output .mstep-arrow {
    display: inline-block; margin-right: 6px;
    color: var(--accent-gold); font-weight: 600;
    font-size: 0.95rem;
}
.mstep-output strong {
    color: var(--text-primary); font-weight: 500;
}
.mstep.is-final {
    background: linear-gradient(180deg, rgba(155,123,184,0.04), var(--bg-card));
}
.mstep.is-final .mstep-num { color: var(--accent-purple); }
.mstep.is-final::before { background: var(--accent-purple); }
.mstep.is-final .mstep-output .mstep-arrow { color: var(--accent-purple); }

/* ── Time Travel — eyebrow tweak ─────────────────────────────
   Slightly bolder + larger than the default .section-eyebrow so
   the name reads like a brand mark, not just a section tag. */
.section-eyebrow.tt-eyebrow {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.24em;
}
.section-eyebrow.tt-eyebrow .line {
    width: 36px;
}

/* The loop-closer line already exists from the old workflow
   section above — only the colour & spacing tweaked for the new
   methodology grid context. */
.methodology-section + .loop-closer,
.methodology-section .loop-closer {
    margin-top: 40px;
}

/* ── Quantin 4-lens override ──────────────────────────────────
   The original .qn-lens-grid is 5 columns. The new layout drops
   Interpreter; override to 4 columns. */
.qn-lens-grid.qn-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Quantin MCP callout (bring-your-own-AI) ─────────────────── */
.qn-mcp-callout {
    max-width: 860px;
    margin: 32px auto 0;
    padding: 22px 28px;
    display: flex; align-items: center; gap: 24px;
    border: 1px solid rgba(201,169,98,0.25);
    border-radius: 14px;
    background:
        radial-gradient(ellipse 70% 60% at 0% 50%, rgba(201,169,98,0.06), transparent 70%),
        linear-gradient(180deg, rgba(15,15,15,0.85), rgba(10,10,10,0.85));
}
.qn-mcp-text { flex: 1; min-width: 0; }
.qn-mcp-label {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.qn-mcp-text p {
    margin: 0;
    font-size: 0.92rem; color: var(--text-secondary);
    line-height: 1.55; font-weight: 300;
}
.qn-mcp-text strong {
    color: var(--text-primary); font-weight: 500;
}
.qn-mcp-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    background: transparent;
    color: var(--accent-gold);
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.qn-mcp-cta:hover {
    background: var(--accent-gold); color: #000;
}
.qn-mcp-cta span { transition: transform 0.2s ease; }
.qn-mcp-cta:hover span { transform: translateX(3px); }

/* ── Tour the Lab — section shell ─────────────────────────────
   Stack of mini-rows. Each row gets its own accent colour driven
   by the `data-accent` attribute so the eye can move through 7
   carousels without feeling like the same shot 7 times. */
.tour-section { padding-top: 80px; padding-bottom: 80px; }
/* 2026-05-14 — centered to match Time Travel + Meet Quantin head
   blocks; the asymmetric left-aligned eyebrow read as inconsistent
   when scrolling between sections. Same max-width / margin-auto
   pattern as `.tt-hero-head` and `.qn-head`. */
.tour-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 32px;
}
.tour-head .section-title,
.tour-head .section-lede {
    margin-left: auto; margin-right: auto;
}

.tour-row {
    padding: 36px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.tour-row:first-of-type { border-top: none; padding-top: 8px; }

.tour-row-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 32px;
    margin-bottom: 24px;
}
.tour-row-head > div:first-child { flex: 1; min-width: 0; }
.tour-row-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 10px;
}
.tour-row-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.tour-row-title {
    font-family: var(--font-display);
    font-size: 1.55rem; font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin-bottom: 8px;
    line-height: 1.15;
}
.tour-row-lede {
    font-size: 0.92rem; color: var(--text-secondary);
    line-height: 1.6; font-weight: 300;
    max-width: 720px; margin: 0;
}
.tour-row-cta {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    color: var(--text-primary); text-decoration: none;
    font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.tour-row-cta:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.tour-row-cta span { transition: transform 0.2s ease; }
.tour-row-cta:hover span { transform: translateX(3px); }

/* Per-row accent colour from data-accent attribute. Affects the
   eyebrow dot + headline underline on hover. */
.tour-row[data-accent="gold"]   .tour-row-eyebrow { color: var(--accent-gold); }
.tour-row[data-accent="teal"]   .tour-row-eyebrow { color: var(--accent-teal); }
.tour-row[data-accent="purple"] .tour-row-eyebrow { color: var(--accent-purple); }

/* ── Coverflow carousel ───────────────────────────────────────
   3D perspective track; center card frontal, sides angled inward.
   Hand-rolled vanilla CSS + a small JS controller in
   landing-coverflow.js handles index changes + transforms.
   Cards have a fixed width; the track translates left/right so
   the selected card centers in the viewport. */

.coverflow {
    position: relative;
    height: 380px;
    overflow: hidden;
    border-radius: 14px;
    background:
        radial-gradient(ellipse 90% 60% at 50% 50%, rgba(201,169,98,0.04), transparent 60%),
        linear-gradient(180deg, rgba(15,15,15,0.6), rgba(10,10,10,0.85));
    perspective: 1400px;
    user-select: none;
}
.cf-track {
    position: absolute;
    top: 0; left: 50%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* JS sets translateX to center the active card. */
    will-change: transform;
}
.cf-card {
    position: absolute;
    top: 50%;
    left: 0;
    width: 480px;
    height: 320px;
    margin: -160px 0 0 -240px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: 0 14px 40px -12px rgba(0,0,0,0.5);
    cursor: pointer;
    transition:
        transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.4s ease,
        filter 0.4s ease,
        box-shadow 0.4s ease,
        border-color 0.2s ease;
    /* JS positions each card via inline transform — but we set a
       default of "off to the right" so the layout doesn't flash
       on page load before the JS runs. */
    transform: translateX(0) translateZ(-400px);
    opacity: 0;
}
.cf-card.cf-loaded { opacity: 1; }
.cf-card.is-active {
    z-index: 10;
    box-shadow: 0 24px 60px -10px rgba(0,0,0,0.65);
    border-color: rgba(201,169,98,0.32);
}
.cf-card.is-side { z-index: 5; cursor: pointer; }
.cf-card img {
    width: 100%; height: 100%;
    /* 2026-05-13 — switched from `cover` (which cropped the bottom
       half of each screenshot, lopping off the control panels)
       to `contain` so the entire UI renders. The card's dark
       background matches the screenshots so any letterboxing is
       invisible. */
    object-fit: contain;
    object-position: center;
    pointer-events: none;
}
.cf-card-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 14px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.95) 100%);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.86rem; font-weight: 500;
    letter-spacing: -0.005em;
    pointer-events: none;
}

/* Text-only cards for the "Single-Name Deep Dives" row (no
   screenshots yet — placeholder cards still styled like a
   gallery so the coverflow looks consistent). */
.cf-card-text { background: linear-gradient(160deg, #0f0f0f, #080808); }
.cf-text-card {
    width: 100%; height: 100%;
    padding: 36px 28px 60px;
    display: flex; flex-direction: column; gap: 14px;
    color: var(--text-primary);
}
.cf-text-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem; letter-spacing: 0.18em;
    color: var(--accent-teal);
    text-transform: uppercase;
}
.cf-text-title {
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 500;
    letter-spacing: -0.015em;
    margin-bottom: 4px;
}
.cf-text-body {
    font-size: 0.92rem; color: var(--text-secondary);
    line-height: 1.6; font-weight: 300;
}

/* Arrows */
.cf-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: rgba(10,10,10,0.85);
    color: var(--text-primary);
    font-size: 1.6rem; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 20;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}
.cf-arrow:hover {
    background: rgba(201,169,98,0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.cf-arrow:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
.cf-prev { left: 18px; }
.cf-next { right: 18px; }
.cf-arrow[disabled] {
    opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

/* Foot: caption + counter — sibling of .coverflow, sits BELOW it
   so cards remain visually unobstructed. */
.cf-foot {
    margin-top: 16px;
    padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: rgba(10,10,10,0.5);
}
.cf-caption {
    flex: 1; min-width: 0;
    font-size: 0.82rem; color: var(--text-secondary);
    line-height: 1.5; font-weight: 300;
    text-align: left;
}
.cf-caption:empty::before {
    content: 'Drag, click a side card, or use the arrows.';
    color: var(--text-muted); opacity: 0.6;
}
.cf-counter {
    font-family: var(--font-mono);
    font-size: 0.72rem; letter-spacing: 0.12em;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Code Export row — no carousel, just the Plotly viz frame.
   2026-05-13 polish-2 — kept for any legacy embed; the new
   landing uses `.ce2` (below). */
.tour-row-code .tour-code-frame {
    aspect-ratio: 16 / 8;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.tour-row-code .tour-code-frame .viz-target {
    width: 100%; height: 100%;
}

/* ── Code Export 2.0 (2026-05-13 polish-2) ──────────────────────
   Replaces the prior Plotly split-view (code panel + low-res 3D
   surface). New shell: stats column on the left, real code preview
   on the right. The protagonist is the actual export file
   `sc001_NFLX_kalman_trend_grid_50x50.py`. */
.ce2 {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    margin-top: 8px;
    align-items: stretch;
}

/* ── Stats column ── */
.ce2-stats {
    display: flex; flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 28px 26px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(201, 169, 98, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
}
.ce2-stat {
    display: flex; flex-direction: column; gap: 4px;
}
.ce2-stat-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--accent-gold);
    line-height: 1;
}
.ce2-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    font-weight: 300;
    letter-spacing: 0.005em;
}
.ce2-stat-label code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    padding: 0 4px;
    border-radius: 3px;
}
.ce2-foot {
    margin-top: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.55;
    font-weight: 300;
}
.ce2-foot strong {
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.ce2-foot code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-gold);
    background: rgba(201, 169, 98, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
}

/* ── Editor pane ── */
.ce2-editor {
    display: flex; flex-direction: column;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    background: #0a0a0a;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 18px 56px -22px rgba(0, 0, 0, 0.55);
}
.ce2-tab-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(180deg, #131313 0%, #0d0d0d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ce2-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 10px;
    background: rgba(201, 169, 98, 0.06);
    border: 1px solid rgba(201, 169, 98, 0.22);
    border-radius: 6px;
}
.ce2-tab-icon {
    width: 14px; height: 14px;
    color: var(--accent-gold);
}
.ce2-tab-name {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}
.ce2-tab-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* The code preview itself — line-numbered, monospace, soft
   syntax-highlight palette tuned to match the brand's gold/teal/
   purple accents instead of generic IDE colors. */
.ce2-code {
    margin: 0;
    padding: 18px 20px 22px;
    font-family: 'JetBrains Mono', 'Consolas', 'Menlo', monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #d8dde4;
    background: transparent;
    overflow-x: auto;
    white-space: pre;
    tab-size: 4;
}
.ce2-ln {
    display: inline-block;
    width: 24px;
    margin-right: 14px;
    color: rgba(255, 255, 255, 0.18);
    text-align: right;
    user-select: none;
    font-weight: 400;
}
.ce2-cm { color: #6b7080; font-style: italic; }
.ce2-kw { color: #a07ec0; font-weight: 500; }    /* keywords — purple-ish */
.ce2-st { color: #c9a962; }                      /* strings — gold */
.ce2-nm { color: #6fb5b5; }                      /* numbers — teal */
.ce2-fn { color: #d8a4b2; }                      /* function calls — soft red */

/* Responsive — stack stats above editor on narrow */
@media (max-width: 960px) {
    .ce2 { grid-template-columns: 1fr; gap: 16px; }
    .ce2-stats {
        flex-direction: row; flex-wrap: wrap;
        justify-content: space-around;
        gap: 18px;
        padding: 22px 20px;
    }
    .ce2-stat { flex: 1 1 0; min-width: 130px; }
    .ce2-foot { flex: 1 1 100%; }
}
@media (max-width: 600px) {
    .ce2-stats { flex-direction: column; gap: 18px; }
    .ce2-stat { flex: 0 0 auto; width: 100%; }
    /* Reset the row-mode `flex: 1 1 100%` from the 960px rule —
       in a column container, `flex-basis: 100%` collapses the
       child into the cross-axis weirdly. */
    .ce2-foot { flex: 0 0 auto; width: 100%; }
    .ce2-code { font-size: 0.72rem; padding: 14px 14px 18px; }
    .ce2-stat-num { font-size: 1.9rem; }
    .ce2-tab-name {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    /* Drop the line-count meta on narrow viewports — redundant with
       the "1,487 lines" stat above and was clipping awkwardly. */
    .ce2-tab-meta { display: none; }
    .ce2-tab { max-width: 100%; min-width: 0; overflow: hidden; }
}

/* ── Responsive (Wave 7) ──────────────────────────────────────
   Below 960px: pillars stack 1-col, methodology becomes 2-col,
   coverflow scales down + stops showing side cards. */
@media (max-width: 1100px) {
    .methodology-grid { grid-template-columns: repeat(2, 1fr); }
    .qn-lens-grid.qn-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .cf-card { width: 380px; margin-left: -190px; }
}
@media (max-width: 768px) {
    .hero-pillars { grid-template-columns: 1fr; gap: 14px; margin-top: 56px; }
    .methodology-grid { grid-template-columns: 1fr; }
    .qn-lens-grid.qn-grid-4 { grid-template-columns: 1fr; }
    .qn-mcp-callout { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 22px; }
    .tour-row-head { flex-direction: column; gap: 18px; }
    .tour-row-cta { align-self: flex-start; }
    .coverflow { height: 320px; border-radius: 10px; }
    .cf-card {
        width: 280px; height: 240px;
        margin: -120px 0 0 -140px;
    }
    .cf-foot { padding: 8px 12px; flex-direction: column; align-items: flex-start; gap: 6px; }
    .cf-caption { font-size: 0.78rem; }
    .cf-counter { font-size: 0.68rem; }
}
