:root {
    --bg: #07090d;
    --bg-soft: #0d1117;
    --bg-card: #14181f;
    --bg-card-2: #1a1f28;
    --text: #f3f4f6;
    --text-dim: #a1a8b3;
    --text-mute: #6b7280;

    --accent: #4a9eff;
    --positive: #34d399;
    --positive-soft: rgba(52, 211, 153, 0.12);
    --negative: #f87171;
    --negative-soft: rgba(248, 113, 113, 0.12);
    --warning: #fbbf24;
    --neutral: #94a3b8;

    --border: #1f242f;
    --border-soft: #161a22;

    --regime-bull: #34d399;
    --regime-bear: #ef4444;
    --regime-warn: #fbbf24;
    --regime-rebound: #2dd4bf;
    --regime-neutral: #94a3b8;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Display", "Inter", system-ui, sans-serif;
    --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
    --font-mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    background: var(--bg); color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.pos { color: var(--positive); }
.neg { color: var(--negative); }
.muted { color: var(--text-mute); }
.check { color: var(--positive); font-weight: 600; }
.cross { color: var(--negative); font-weight: 600; }
.dot { color: var(--text-mute); margin: 0 6px; }

/* ═══════════ SCREEN 1 — VERDICT ═══════════ */
.screen {
    width: 100%;
    padding: 0 24px;
}
.screen-verdict {
    min-height: 100vh;
    min-height: 100svh;                  /* iOS-safe : excludes the dynamic toolbar */
    display: flex; flex-direction: column;
    align-items: center; justify-content: space-between;
    padding-top: 32px; padding-bottom: 48px;
    background: radial-gradient(ellipse at 50% 30%, rgba(74,158,255,0.05) 0%, var(--bg) 65%);
}

.masthead {
    width: 100%; max-width: 1200px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 4px 0;
}

/* Index selector (segmented control) — touch-optimised */
.index-selector {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    -webkit-tap-highlight-color: transparent;
}
.idx-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 12px 22px;
    min-height: 44px;                    /* WCAG / Apple HIG minimum tap target */
    min-width: 44px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;          /* eliminate 300ms tap delay on iOS */
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, transform 0.08s;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.25);
}
.idx-btn:hover { color: var(--text); }
.idx-btn:active { transform: scale(0.96); }
.idx-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.idx-btn-active {
    background: var(--accent);
    color: #07090d;
}
.idx-btn-active:hover { color: #07090d; }
.idx-btn:disabled { opacity: 0.5; cursor: wait; }

/* On phones : selector is full-width, 3 buttons share equally, big tap zones */
@media (max-width: 640px) {
    .index-selector {
        display: flex;
        margin: 18px auto 0;
        width: 100%;
        max-width: 380px;
        padding: 5px;
        gap: 4px;
        justify-content: stretch;
        box-sizing: border-box;
    }
    .idx-btn {
        flex: 1 1 0;
        padding: 12px 6px;
        font-size: 13px;
        letter-spacing: 0;
        min-height: 44px;
    }
}
@media (max-width: 380px) {
    .idx-btn { font-size: 12px; padding: 12px 4px; }
}
.brand {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700;
    letter-spacing: -0.02em;
}
.brand-taglines {
    display: flex; flex-direction: column; gap: 1px;
    line-height: 1.25;
}
.brand-tag {
    font-size: 13px; color: var(--text-mute);
    font-weight: 400;
}
.brand-tag-sub {
    font-size: 11px; color: var(--text-mute);
    font-weight: 400; opacity: 0.78;
    letter-spacing: 0.01em;
}

/* Header CTA pill — bold filled accent, glowing + breathing so it pops */
.nav-pill {
    flex: none;
    display: inline-flex; align-items: center;
    padding: 13px 26px;
    font-size: 15px; font-weight: 800;
    letter-spacing: 0.01em;
    color: #07090d;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.40);
    animation: nav-pill-glow 2.6s ease-in-out infinite;
    transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
}
.nav-pill:hover {
    background: var(--accent); color: #07090d;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(74, 158, 255, 0.55);
    text-decoration: none;
}
.nav-pill:active { transform: translateY(0); }
@keyframes nav-pill-glow {
    0%, 100% { box-shadow: 0 4px 16px rgba(74, 158, 255, 0.28); }
    50%      { box-shadow: 0 5px 28px rgba(74, 158, 255, 0.60); }
}
@media (prefers-reduced-motion: reduce) {
    .nav-pill { animation: none; }
}

.verdict-wrap {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 18px;
    text-align: center;
    width: 100%;
}
.verdict-prefix {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--text-mute);
    font-weight: 600;
}
.verdict {
    font-family: var(--font-display);
    font-size: clamp(56px, 12vw, 156px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
    font-feature-settings: "tnum" 1;
    text-shadow: 0 8px 40px currentColor;
}
.verdict-positive { color: var(--positive); }
.verdict-negative { color: var(--negative); }
.verdict-neutral  { color: var(--warning); }

.verdict-meta {
    margin-top: 6px;
    font-size: clamp(14px, 1.6vw, 18px);
    color: var(--text-dim);
}
.verdict-meta strong { color: var(--text); font-weight: 600; }

.regime-tier-bull     { color: var(--regime-bull) !important; }
.regime-tier-bear     { color: var(--regime-bear) !important; }
.regime-tier-warn     { color: var(--regime-warn) !important; }
.regime-tier-rebound  { color: var(--regime-rebound) !important; }
.regime-tier-neutral  { color: var(--regime-neutral) !important; }

.yesterday-line {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    max-width: 800px;
    padding: 14px 24px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(20, 24, 31, 0.55);
}
.yesterday-line strong { color: var(--text); }

.chev {
    margin-top: 24px;
    color: var(--text-mute);
    font-size: 28px;
    text-decoration: none;
    opacity: 0.7;
    animation: chev-bob 2.4s ease-in-out infinite;
}
.chev:hover { opacity: 1; text-decoration: none; }
@keyframes chev-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ═══════════ SCREEN 2 — PROOF ═══════════ */
.screen-proof {
    padding: 96px 24px;
    max-width: 1240px;
    margin: 0 auto;
    display: flex; flex-direction: column;
    gap: 48px;
}

.proof-title {
    text-align: center;
}
.proof-title h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
}
.proof-title p { margin-top: 14px; font-size: 16px; }

.perf-twoup {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 760px) { .perf-twoup { grid-template-columns: 1fr; } }
.perf-pillar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px 32px 28px;
    text-align: center;
    display: flex; flex-direction: column;
    gap: 6px;
}
.perf-pillar-strategy { border-color: rgba(52, 211, 153, 0.35); }
.perf-pillar-bh { border-color: var(--border); }

.perf-pillar-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-mute);
    font-weight: 700;
}
.perf-pillar-value {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: clamp(46px, 7vw, 78px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    font-feature-settings: "tnum" 1;
}
.perf-pillar-strategy .perf-pillar-value.pos { text-shadow: 0 6px 28px rgba(52, 211, 153, 0.3); }
.perf-pillar-sub {
    font-size: 13px; color: var(--text-mute);
    margin-top: 2px;
}
.perf-pillar-dd {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    display: flex; align-items: baseline; justify-content: center;
    gap: 10px;
}
.dd-tag {
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}
.dd-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    font-feature-settings: "tnum" 1;
}
.dd-strategy { color: var(--positive); }   /* the SMALLER drawdown — the win */
.dd-market { color: var(--negative); }     /* the LARGER drawdown — the loss */

.punchline {
    text-align: center;
    margin: 16px auto 0;
    max-width: 720px;
    padding: 22px 24px;
    font-family: var(--font-display);
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.3;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 28px 24px;
}
.card-header h3 {
    font-size: 13px; font-weight: 600;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.card-header p { margin-top: 6px; font-size: 14px; color: var(--text-mute); }
.line-wrap { position: relative; height: 320px; margin-top: 16px; }
.line-wrap-tall { height: 460px; }

.crisis-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 720px) { .crisis-grid { grid-template-columns: 1fr; } }
.crisis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
}
.crisis-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-mute);
    font-weight: 600;
}
.crisis-headline {
    margin-top: 8px;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.45;
    color: var(--text);
}

/* Transparency table */
.transparency {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
}
.transparency th, .transparency td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    font-feature-settings: "tnum" 1;
}
.transparency th {
    color: var(--text-mute);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}
.transparency tr:last-child td { border-bottom: none; }
.transparency td:last-child, .transparency th:last-child { text-align: center; }

/* ═══════════ SCREEN 3 — CTA ═══════════ */
.screen-cta {
    min-height: 80vh;
    padding: 96px 24px 48px;
    max-width: 720px;
    margin: 0 auto;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 36px;
    text-align: center;
}

.cta-block { width: 100%; }
.cta-block h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
}
.cta-block p { margin-top: 12px; font-size: 15px; }

.signup-form {
    margin-top: 28px;
    display: flex; gap: 8px;
    width: 100%; max-width: 520px;
    margin-left: auto; margin-right: auto;
}
@media (max-width: 520px) { .signup-form { flex-direction: column; } }
.signup-form input {
    flex: 1; min-width: 0;
    padding: 14px 16px;
    font-size: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.15s;
}
.signup-form input::placeholder { color: var(--text-mute); }
.signup-form input:focus { outline: none; border-color: var(--accent); }
.signup-form button {
    padding: 14px 22px;
    font-size: 15px; font-weight: 600;
    background: var(--accent);
    color: #07090d;
    border: none; border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}
.signup-form button:hover { opacity: 0.9; }
.signup-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.signup-msg { margin-top: 14px; font-size: 14px; min-height: 1.2em; }
.signup-msg.ok { color: var(--positive); }
.signup-msg.err { color: var(--negative); }

.cta-secondary {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-dim);
}
.cta-secondary a { color: var(--accent); font-weight: 500; }

.footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px;
    color: var(--text-mute);
    width: 100%;
}
.footer strong { color: var(--text-dim); }

/* Horizontal-scroll wrapper for the transparency table on narrow screens. */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ═══════════ MOBILE — ≤ 640 px (iPhone 14: 390 px, iPhone SE: 375 px) ═══════════ */
@media (max-width: 640px) {
    .screen { padding: 0 16px; }
    .screen-proof { padding: 56px 16px; gap: 36px; }
    .screen-cta { padding: 56px 16px 32px; gap: 28px; }

    /* Masthead : brand + tag stacked, centered */
    .masthead {
        flex-direction: column; align-items: center; gap: 6px;
        padding: 4px 0 6px;
    }
    .brand { font-size: 20px; }
    .brand-tag { font-size: 12px; }
    .brand-taglines { align-items: center; text-align: center; }
    .nav-pill { margin-top: 6px; font-size: 13px; padding: 10px 16px; }

    /* Verdict still big — clamp ensures it dominates a 375-px screen */
    .verdict-prefix { font-size: 11px; letter-spacing: 0.28em; }
    .verdict {
        font-size: clamp(52px, 16vw, 92px);
        letter-spacing: -0.04em;
    }
    .verdict-meta {
        font-size: 13px;
        display: flex; flex-direction: column; gap: 4px;
    }
    .verdict-meta .dot { display: none; }

    .yesterday-line {
        padding: 12px 16px;
        font-size: 12px;
        border-radius: 14px;
        line-height: 1.45;
    }
    .chev { margin-top: 12px; font-size: 24px; }

    /* Proof title */
    .proof-title h2 { font-size: clamp(24px, 7.5vw, 40px); }
    .proof-title p { font-size: 14px; margin-top: 10px; }

    /* Perf pillars stack */
    .perf-twoup { grid-template-columns: 1fr; gap: 14px; }
    .perf-pillar { padding: 26px 22px 22px; border-radius: 14px; }
    .perf-pillar-value { font-size: clamp(40px, 14vw, 64px); }
    .perf-pillar-dd { margin-top: 14px; padding-top: 12px; }
    .dd-value { font-size: 20px; }
    .dd-tag { font-size: 10px; }

    .punchline {
        font-size: clamp(18px, 5vw, 24px);
        padding: 18px 4px;
    }

    /* Crisis cards stack */
    .crisis-grid { grid-template-columns: 1fr; gap: 12px; }
    .crisis-card { padding: 18px 18px; border-radius: 12px; }
    .crisis-headline { font-size: 16px; }

    /* Cards */
    .card { padding: 22px 18px 18px; border-radius: 14px; }
    .line-wrap { height: 240px; margin-top: 10px; }
    .line-wrap-tall { height: 320px; }

    /* Transparency table : horizontal scroll on phones */
    .transparency { min-width: 460px; font-size: 13px; }
    .transparency th, .transparency td { padding: 10px 10px; }
    .transparency th:first-child, .transparency td:first-child { padding-left: 0; }

    /* CTA */
    .cta-block h2 { font-size: clamp(24px, 7vw, 36px); }
    .cta-block p { font-size: 14px; }
    .signup-form { gap: 10px; }
    .footer { margin-top: 28px; padding-top: 20px; }
}

/* ═══════════ EXTRA-SMALL (≤ 380 px) ═══════════ */
@media (max-width: 380px) {
    .verdict { font-size: clamp(46px, 17vw, 64px); }
    .perf-pillar-value { font-size: clamp(34px, 13vw, 50px); }
    .proof-title h2 { font-size: clamp(22px, 7.5vw, 34px); }
    .crisis-headline { font-size: 15px; }
    .yesterday-line { font-size: 11.5px; }
}

/* ═══════════ PRODUCT TESTING — CTA BAND ═══════════ */
.product-band-wrap {
    width: 100%;
    padding: 0 24px;
    margin: 4px 0 72px;
}
.product-band {
    max-width: 1200px;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 40px;
    padding: 32px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 18px;
}
.product-band-main { flex: 1 1 auto; min-width: 0; }
.product-band-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.product-band-sub {
    margin-top: 12px;
    font-size: 15px; line-height: 1.5;
    color: var(--text-dim);
    max-width: 580px;
}
.product-band-cta {
    display: inline-flex; align-items: center;
    margin-top: 20px;
    padding: 12px 22px;
    font-size: 15px; font-weight: 700;
    color: #ffffff;
    background: var(--positive);
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.18);
    transition: transform 0.08s, box-shadow 0.15s, filter 0.15s;
}
.product-band-cta:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 26px rgba(52, 211, 153, 0.26);
    text-decoration: none;
}
.product-band-cta:active { transform: translateY(1px); }
.product-band-bridge {
    margin-top: 18px;
    font-size: 12.5px; font-style: italic;
    color: var(--text-mute);
}
.product-band-stats {
    flex: none;
    display: flex; flex-direction: column;
    gap: 14px;
}
.product-band-stat {
    display: flex; align-items: center; gap: 9px;
    font-size: 14px; color: var(--text-dim);
    white-space: nowrap;
}
.pb-ico { font-size: 16px; line-height: 1; }

/* Band stacks on tablet / phone */
@media (max-width: 760px) {
    .product-band {
        flex-direction: column; align-items: flex-start;
        gap: 24px;
        padding: 26px 24px;
    }
    .product-band-stats {
        flex-direction: row; flex-wrap: wrap;
        gap: 12px 22px;
    }
}
@media (max-width: 640px) {
    .product-band-wrap { padding: 0 16px; margin: 0 0 56px; }
    .product-band { padding: 22px 18px; border-radius: 14px; }
    .product-band-sub { font-size: 14px; }
    .product-band-cta { width: 100%; justify-content: center; }
    .product-band-stat { font-size: 13px; }
}
