/* ══════════════════════════════════════════════════════════════════
   Lazy Edge NBA — Design System v3 (Stitch Terminal Aesthetic)
   Aesthetic: Quant Terminal — sharp edges, cyan accent, grid-bg
   ══════════════════════════════════════════════════════════════════ */

/* ── Fonts ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
    /* Surfaces (Stitch palette) */
    --bg:              #0d0e12;
    --bg-raised:       #121317;
    --bg-card:         #1e1f23;
    --bg-card-hover:   #292a2e;
    --bg-card-solid:   #12151C;
    --bg-input:        #0d0e12;
    --bg-glass:        rgba(18, 19, 23, 0.85);

    /* Borders */
    --border:          #3b494b;
    --border-focus:    #849495;
    --border-accent:   rgba(0, 240, 255, 0.4);

    /* Text */
    --text:            #e3e2e7;
    --text-secondary:  #849495;
    --text-tertiary:   rgba(132, 148, 149, 0.6);
    --text-ghost:      rgba(132, 148, 149, 0.3);

    /* Accent Palette (Cyan — Stitch) */
    --accent:          #00f0ff;
    --accent-glow:     rgba(0, 240, 255, 0.15);
    --accent-strong:   #00dbe9;
    --green:           #00e475;
    --green-dim:       rgba(0, 228, 117, 0.12);
    --red:             #ffb4ab;
    --red-dim:         rgba(255, 180, 171, 0.12);
    --yellow:          #fbbf24;
    --yellow-dim:      rgba(251, 191, 36, 0.12);

    /* Gradients */
    --grad-hero:       linear-gradient(135deg, #00f0ff 0%, #00e475 100%);
    --grad-card:       linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(0, 228, 117, 0.04));
    --grad-surface:    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);

    /* Typography */
    --font:            'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    --font-mono:       'Space Grotesk', 'SF Mono', 'Fira Code', monospace;

    /* Geometry — Sharp edges (Stitch: 0px border-radius) */
    --radius:          0px;
    --radius-lg:       0px;
    --radius-xl:       0px;
    --radius-full:     9999px;

    /* Spacing scale */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
    --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;
    --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
    --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

    /* Motion */
    --ease:            cubic-bezier(0.16, 1, 0.3, 1);
    --duration:        0.3s;
    --duration-fast:   0.15s;
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

code, .mono {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: rgba(255,255,255,0.06);
    padding: 2px 7px;
    border-radius: 0;
}

::selection {
    background: #00f0ff;
    color: #000;
}

img { max-width: 100%; display: block; }

/* ── Stitch Terminal Utilities ─────────────────────────────────── */
.data-text {
    font-family: 'Space Grotesk', monospace;
}
.grid-bg {
    background-image: linear-gradient(to right, #1a1b1f 1px, transparent 1px),
                      linear-gradient(to bottom, #1a1b1f 1px, transparent 1px);
    background-size: 40px 40px;
}
.scanline {
    width: 100%;
    height: 2px;
    background: rgba(0, 240, 255, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px #00f0ff;
}
.cyan-glow {
    box-shadow: 0 0 20px -10px #00f0ff;
}
.cyan-glow-strong {
    box-shadow: 0 0 30px -5px #00f0ff;
}
.scanline-input:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
    background-color: rgba(0, 240, 255, 0.03);
}

/* ── Utility Classes ────────────────────────────────────────────── */
.accent  { color: var(--accent); }
.green   { color: var(--green); }
.red     { color: var(--red); }
.yellow  { color: var(--yellow); }
.mono    { font-family: var(--font-mono); }
.dim     { color: var(--text-secondary); }
.muted   { color: var(--text-tertiary); }
.caps    { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; font-weight: 600; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--duration-fast);
    background: rgba(255,255,255,0.08);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:hover { text-decoration: none; color: #fff; box-shadow: 0 0 40px rgba(99, 140, 255, 0.25); }

.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--border-focus); color: var(--text); text-decoration: none; }

.btn-accent {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(52,211,153,0.25);
}
.btn-accent:hover { background: rgba(52,211,153,0.2); color: var(--green); text-decoration: none; box-shadow: 0 0 20px rgba(52,211,153,0.15); }

.btn-lg { padding: 15px 36px; font-size: 0.95rem; }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }
.btn-full { width: 100%; }
.btn-disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ── Navigation ─────────────────────────────────────────────────── */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-6);
    height: 56px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.logo-icon {
    background: var(--grad-hero);
    color: #fff;
    padding: 4px 8px;
    border-radius: 7px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}
.logo-text .accent { color: var(--accent); }
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--duration-fast);
    letter-spacing: -0.01em;
}
.nav-links a:hover { color: var(--text); }
.nav-auth {
    display: flex;
    gap: 8px;
    align-items: center;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 20px;
    height: 1.5px;
    background: var(--text-secondary);
    display: block;
    border-radius: 2px;
    transition: all var(--duration) var(--ease);
}

/* ── Sections ───────────────────────────────────────────────────── */
.section {
    max-width: 1320px;
    margin: 0 auto;
    padding: var(--sp-20) var(--sp-6);
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: var(--sp-12);
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.section-note {
    text-align: center;
    margin-top: var(--sp-8);
    color: var(--text-tertiary);
    font-size: 0.88rem;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 140px var(--sp-6) 100px;
    max-width: 880px;
    margin: 0 auto;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 140, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: var(--sp-6);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.hero h1 .accent {
    background: var(--grad-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto var(--sp-10);
    font-weight: 400;
    line-height: 1.7;
}
.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: var(--sp-4);
}
.hero-note {
    color: var(--text-ghost);
    font-size: 0.8rem;
    margin-top: var(--sp-4);
}

/* ── How It Works Grid ──────────────────────────────────────────── */
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
}
.how-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    padding: var(--sp-8) var(--sp-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}
.how-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--grad-hero);
    opacity: 0;
    transition: opacity var(--duration);
}
.how-card:hover { border-color: var(--border-focus); transform: translateY(-2px); }
.how-card:hover::before { opacity: 1; }
.how-num {
    width: 40px;
    height: 40px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--sp-4);
    font-family: var(--font-mono);
}
.how-card h3 {
    margin-bottom: var(--sp-3);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.how-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ── Preview Card ───────────────────────────────────────────────── */
.preview-section { text-align: center; }
.preview-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3), 0 0 1px rgba(255,255,255,0.06);
}
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-4) var(--sp-6);
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
}
.preview-signals { padding: var(--sp-4) var(--sp-6); }
.signal-row {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border);
}
.signal-row:last-child { border-bottom: none; }
.signal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    min-width: 50px;
    letter-spacing: 0.04em;
    font-family: var(--font-mono);
}
.signal-badge.buy, .buy .signal-badge  { background: var(--green-dim); color: var(--green); }
.signal-badge.sell, .sell .signal-badge { background: var(--red-dim); color: var(--red); }
.signal-badge.hold, .hold .signal-badge { background: rgba(255,255,255,0.06); color: var(--text-tertiary); }
.signal-details {
    display: flex;
    gap: var(--sp-6);
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
}
.signal-details strong { color: var(--text); font-weight: 600; }
.preview-footer {
    padding: var(--sp-3) var(--sp-6);
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.preview-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--green-dim);
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ── Tier / Pricing Cards ───────────────────────────────────────── */
.tier-grid, .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--sp-5);
}
.tier-card, .pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--sp-8) var(--sp-6);
    text-align: center;
    position: relative;
    backdrop-filter: blur(12px);
    transition: all var(--duration) var(--ease);
}
.tier-card:hover, .pricing-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
}
.tier-card.featured, .pricing-card.featured {
    border-color: var(--border-accent);
    background: var(--grad-card);
    box-shadow: 0 0 48px var(--accent-glow);
}
/* Floating badge on pricing/tier cards */
.tier-card > .tier-badge,
.pricing-card > .tier-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--grad-hero);
    color: #fff;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.tier-price {
    font-size: 2.8rem;
    font-weight: 800;
    margin: var(--sp-4) 0;
    letter-spacing: -0.03em;
    font-family: var(--font-mono);
}
.tier-price span { font-size: 0.9rem; color: var(--text-tertiary); font-weight: 400; font-family: var(--font); }
.tier-card ul, .pricing-card ul {
    list-style: none;
    text-align: left;
    margin: var(--sp-6) 0;
}
.tier-card li, .pricing-card li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.tier-card li:last-child, .pricing-card li:last-child { border-bottom: none; }

.pricing-desc {
    color: var(--text-tertiary);
    margin-bottom: var(--sp-2);
    font-size: 0.85rem;
}
.pricing-features li.yes::before {
    content: "\2713  ";
    color: var(--green);
    font-weight: 700;
}
.pricing-features li.no {
    color: var(--text-ghost);
}
.pricing-features li.no::before {
    content: "\2014  ";
}
.pricing-limit {
    margin: var(--sp-4) 0;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}
.pricing-hero {
    text-align: center;
    padding-bottom: 0;
}
.pricing-hero h1 {
    font-size: 2.8rem;
    letter-spacing: -0.03em;
}

/* ── Trust Strip ────────────────────────────────────────────────── */
.trust-logos {
    display: flex;
    justify-content: center;
    gap: var(--sp-16);
    flex-wrap: wrap;
}
.trust-item {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.82rem;
}
.trust-icon {
    width: 72px;
    height: 72px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    margin: 0 auto var(--sp-2);
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
    transition: all var(--duration) var(--ease);
}
.trust-item:hover .trust-icon {
    border-color: var(--border-accent);
    box-shadow: 0 0 32px var(--accent-glow);
}

/* ── CTA Section ────────────────────────────────────────────────── */
.cta-section {
    text-align: center;
    padding: var(--sp-20) var(--sp-6);
    position: relative;
}
.cta-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.cta-section h2 {
    font-size: 2rem;
    margin-bottom: var(--sp-4);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.cta-section p { color: var(--text-secondary); margin-bottom: var(--sp-8); }

/* ── Auth Pages ─────────────────────────────────────────────────── */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 56px);
    padding: var(--sp-12) var(--sp-6);
}
.auth-card {
    background: var(--bg-card-solid);
    padding: var(--sp-10) var(--sp-8);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.auth-card h1 {
    font-size: 1.6rem;
    margin-bottom: var(--sp-2);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.auth-sub { color: var(--text-secondary); margin-bottom: var(--sp-8); font-size: 0.9rem; }
.auth-form { text-align: left; }
.form-group {
    margin-bottom: var(--sp-5);
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--sp-2);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    font-family: var(--font);
    transition: all var(--duration-fast);
}
.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder { color: var(--text-ghost); }
.form-hint {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    margin-top: var(--sp-1);
}
.auth-switch {
    margin-top: var(--sp-6);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius);
    margin-bottom: var(--sp-5);
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
}
.alert-error { background: var(--red-dim); border: 1px solid rgba(248,113,113,0.2); color: var(--red); }
.alert-info  { background: var(--accent-glow); border: 1px solid rgba(99,140,255,0.2); color: var(--accent); }

/* ── Checkout Success ───────────────────────────────────────────── */
.success-icon {
    width: 56px;
    height: 56px;
    background: var(--green-dim);
    color: var(--green);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: var(--sp-4);
}
.api-key-reveal {
    background: rgba(255,255,255,0.03);
    padding: var(--sp-6);
    border-radius: var(--radius-lg);
    margin: var(--sp-6) 0;
    text-align: left;
    border: 1px solid var(--border);
}
.key-warning {
    color: var(--yellow);
    font-size: 0.8rem;
    margin-bottom: var(--sp-3);
    font-weight: 500;
}
.key-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.key-display code {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.82rem;
    word-break: break-all;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: var(--sp-6);
}

/* ── Account Page ───────────────────────────────────────────────── */
.account-page {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--sp-12) var(--sp-6);
}
.account-page h1 {
    margin-bottom: var(--sp-8);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.account-grid { display: flex; flex-direction: column; gap: var(--sp-5); }
.account-card {
    background: var(--bg-card-solid);
    padding: var(--sp-6);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}
.account-card h3 {
    margin-bottom: var(--sp-4);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.account-row:last-child { border-bottom: none; }
.account-row .label { color: var(--text-tertiary); font-size: 0.82rem; }
.api-key-section { margin-top: var(--sp-2); }

.tier-badge.tier-free  { background: rgba(255,255,255,0.06); color: var(--text-tertiary); padding: 3px 10px; border-radius: 5px; font-size: 0.72rem; font-weight: 700; font-family: var(--font-mono); }
.tier-badge.tier-basic { background: var(--accent-glow); color: var(--accent); padding: 3px 10px; border-radius: 5px; font-size: 0.72rem; font-weight: 700; font-family: var(--font-mono); }
.tier-badge.tier-pro   { background: var(--green-dim); color: var(--green); padding: 3px 10px; border-radius: 5px; font-size: 0.72rem; font-weight: 700; font-family: var(--font-mono); }
.tier-badge.tier-elite { background: var(--yellow-dim); color: var(--yellow); padding: 3px 10px; border-radius: 5px; font-size: 0.72rem; font-weight: 700; font-family: var(--font-mono); }

/* ── Docs / How It Works ────────────────────────────────────────── */
.docs-hero {
    text-align: center;
    padding-bottom: var(--sp-8);
}
.docs-hero h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
.docs-section h2 {
    font-size: 1.4rem;
    margin-bottom: var(--sp-6);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--sp-3);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sp-5);
}
.docs-card {
    background: var(--bg-card);
    padding: var(--sp-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    transition: border-color var(--duration-fast);
}
.docs-card:hover { border-color: var(--border-focus); }
.docs-card h3 { margin-bottom: var(--sp-3); color: var(--accent); font-size: 0.95rem; }
.docs-card p { color: var(--text-secondary); font-size: 0.85rem; }
.docs-table-label {
    margin-top: var(--sp-3);
    font-size: 0.78rem;
    color: var(--text-tertiary);
}
.docs-content { max-width: 700px; }
.docs-content h3 { margin: var(--sp-6) 0 var(--sp-2); }
.docs-content p { color: var(--text-secondary); margin-bottom: var(--sp-3); }
.docs-content ul { margin: var(--sp-3) 0 var(--sp-6) 0; list-style: none; }
.docs-content li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}
.docs-formula {
    background: var(--bg-card-solid);
    padding: var(--sp-4) var(--sp-5);
    border-radius: var(--radius);
    margin: var(--sp-3) 0 var(--sp-6);
    border: 1px solid var(--border);
}
.docs-formula code { background: transparent; font-size: 0.95rem; }
.code-block {
    background: var(--bg-card-solid);
    padding: var(--sp-4) var(--sp-5);
    border-radius: var(--radius);
    margin: var(--sp-2) 0 var(--sp-6);
    overflow-x: auto;
    border: 1px solid var(--border);
}
.code-block pre {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: pre-wrap;
    font-family: var(--font-mono);
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--sp-12) 0 var(--sp-6);
    margin-top: var(--sp-16);
}
.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--sp-6);
}
.footer-brand { margin-bottom: var(--sp-8); }
.footer-brand p { color: var(--text-tertiary); margin-top: var(--sp-2); font-size: 0.85rem; }
.footer-links {
    display: flex;
    gap: var(--sp-16);
    margin-bottom: var(--sp-8);
}
.footer-links h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-ghost);
    margin-bottom: var(--sp-3);
    letter-spacing: 0.08em;
    font-weight: 600;
}
.footer-links a {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    padding: 3px 0;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--sp-6);
    color: var(--text-ghost);
    font-size: 0.78rem;
}

/* ── Loading / Misc ─────────────────────────────────────────────── */
.loading {
    text-align: center;
    color: var(--text-tertiary);
    padding: var(--sp-10);
    font-size: 0.88rem;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero { padding: 80px var(--sp-4) 60px; }
    .how-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
    .nav-links, .nav-auth {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 56px;
        right: 0;
        left: 0;
        background: var(--bg-glass);
        backdrop-filter: saturate(180%) blur(20px);
        padding: var(--sp-4) var(--sp-6);
        border-bottom: 1px solid var(--border);
        gap: var(--sp-3);
    }
    .nav-links.open, .nav-auth.open { display: flex; }
    .nav-toggle { display: flex; }
    .trust-logos { gap: var(--sp-8); }
    .footer-links { flex-direction: column; gap: var(--sp-6); }
    .pricing-grid { grid-template-columns: 1fr; }
    .auth-card { padding: var(--sp-8) var(--sp-5); }
    .section { padding: var(--sp-12) var(--sp-4); }
    .section-title { font-size: 1.6rem; margin-bottom: var(--sp-8); }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .nav-inner { padding: 0 var(--sp-4); }
    .section { padding: var(--sp-8) var(--sp-4); }
}

/* ══════════════════════════════════════════════════════════════════
   Docs — How It Works & API Reference
   ══════════════════════════════════════════════════════════════════ */

/* ── Docs Navigation Pills ─────────────────────────────────────── */
.docs-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: var(--sp-6);
}
.pill-link {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--duration-fast);
    text-decoration: none;
}
.pill-link:hover {
    color: var(--text);
    border-color: var(--border-focus);
    background: var(--bg-card-hover);
}

/* ── Pipeline Diagram ──────────────────────────────────────────── */
.pipeline-diagram {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--sp-10) var(--sp-6);
    overflow-x: auto;
}
.pipeline-track {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: 700px;
}
.pipeline-track--bottom {
    margin-top: var(--sp-6);
    justify-content: flex-start;
    padding-left: 0;
}
.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    flex-shrink: 0;
}
.pipeline-node-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    transition: all var(--duration) var(--ease);
}
.pipeline-node:hover .pipeline-node-icon {
    border-color: var(--border-accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.pipeline-node--accent .pipeline-node-icon {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: var(--border-accent);
}
.pipeline-node--green .pipeline-node-icon {
    background: var(--green-dim);
    color: var(--green);
    border-color: rgba(52,211,153,0.3);
}
.pipeline-node--output .pipeline-node-icon {
    width: 44px;
    height: 44px;
    font-size: 0.65rem;
}
.pipeline-node-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
}
.pipeline-node-detail {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}
.pipeline-arrow {
    width: 40px;
    height: 2px;
    background: var(--border);
    position: relative;
    flex-shrink: 0;
    margin: 0 4px;
    align-self: center;
    margin-bottom: 28px;
}
.pipeline-arrow::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -4px;
    border: 5px solid transparent;
    border-left: 6px solid var(--border);
}
.pipeline-arrow--up {
    width: 2px;
    height: 30px;
    margin: 0;
    margin-bottom: 0;
    transform: rotate(-90deg);
}
.pipeline-node-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.pipeline-merge-label {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
    margin-left: var(--sp-4);
}

/* ── Docs Card Badge ───────────────────────────────────────────── */
.docs-card-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--accent-glow);
    color: var(--accent);
    margin-bottom: var(--sp-3);
}

/* ── Docs Inline List ──────────────────────────────────────────── */
.docs-inline-list {
    list-style: none;
    margin: var(--sp-3) 0 0;
    padding: 0;
}
.docs-inline-list li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.docs-inline-list .accent-text {
    color: var(--accent);
    font-weight: 500;
}

/* ── Docs Numbered List ────────────────────────────────────────── */
.docs-numbered-list {
    list-style: none;
    counter-reset: docs-counter;
    margin: var(--sp-3) 0 var(--sp-4);
    padding: 0;
}
.docs-numbered-list li {
    counter-increment: docs-counter;
    padding: 6px 0 6px 28px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
}
.docs-numbered-list li::before {
    content: counter(docs-counter);
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Signal Example Cards ──────────────────────────────────────── */
.signal-example-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    margin: var(--sp-4) 0 var(--sp-8);
}
.signal-example-card {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color var(--duration-fast);
}
.signal-example-card:hover { border-color: var(--border-focus); }
.signal-example--buy { border-left: 3px solid var(--green); }
.signal-example--sell { border-left: 3px solid var(--red); }
.signal-example--hold { border-left: 3px solid var(--text-ghost); }
.signal-example-desc strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.88rem;
}
.signal-example-desc p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0;
}
.signal-example-sample {
    margin-top: var(--sp-2);
}
.signal-example-sample code {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ── Enrichment Grid ───────────────────────────────────────────── */
.enrichment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--sp-4);
    margin: var(--sp-4) 0 var(--sp-8);
}
.enrichment-item {
    padding: var(--sp-4);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.enrichment-item p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: var(--sp-2);
}
.enrichment-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.enrichment-tag--yellow { background: var(--yellow-dim); color: var(--yellow); }
.enrichment-tag--red { background: var(--red-dim); color: var(--red); }
.enrichment-tag--accent { background: var(--accent-glow); color: var(--accent); }
.enrichment-tag--green { background: var(--green-dim); color: var(--green); }

/* ── API Tier Blocks ───────────────────────────────────────────── */
.api-tier-block {
    margin-bottom: var(--sp-10);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
}
.api-tier-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-6);
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}
.api-tier-meta {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

/* ── API Endpoint Rows ─────────────────────────────────────────── */
.api-endpoint {
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4) var(--sp-6);
}
.api-endpoint:last-child { border-bottom: none; }
.api-method-row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    cursor: pointer;
}
.api-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 52px;
    flex-shrink: 0;
}
.api-method--get { background: var(--green-dim); color: var(--green); }
.api-method--post { background: var(--accent-glow); color: var(--accent); }
.api-method--delete { background: var(--red-dim); color: var(--red); }
.api-method--ws { background: var(--yellow-dim); color: var(--yellow); }
.api-path {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    background: transparent;
    padding: 0;
    color: var(--text);
    font-weight: 500;
}
.api-desc-inline {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    margin-left: auto;
}
.api-endpoint-body {
    margin-top: var(--sp-3);
    padding-left: 62px;
}

/* ── Rate Limit Table ──────────────────────────────────────────── */
.rate-limit-table {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: var(--sp-3) 0 var(--sp-4);
}
.rate-limit-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    align-items: center;
}
.rate-limit-row:last-child { border-bottom: none; }
.rate-limit-header {
    background: rgba(255,255,255,0.02);
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Schema Table ──────────────────────────────────────────────── */
.schema-table {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: var(--sp-3) 0 var(--sp-4);
}
.schema-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 1fr 2fr;
    gap: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    align-items: center;
    color: var(--text-secondary);
}
.schema-row:last-child { border-bottom: none; }
.schema-header {
    background: rgba(255,255,255,0.02);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.schema-row code {
    font-size: 0.8rem;
    color: var(--accent);
}

/* ── API Endpoint Explorer (Interactive) ───────────────────────── */
.api-endpoint-explorer {
    border-bottom: 1px solid var(--border);
}
.api-endpoint-explorer:last-child { border-bottom: none; }
.api-endpoint-explorer .api-method-row {
    padding: var(--sp-4) var(--sp-5);
    transition: background var(--duration-fast);
}
.api-endpoint-explorer .api-method-row:hover {
    background: rgba(255,255,255,0.02);
}
.api-expand-icon {
    margin-left: var(--sp-2);
    font-size: 1.1rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
}
.api-endpoint-detail {
    display: none;
    padding: 0 var(--sp-5) var(--sp-6);
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.01);
}
.api-endpoint-detail.open {
    display: block;
}
.api-detail-section {
    margin-top: var(--sp-5);
}
.api-detail-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--sp-2);
    font-weight: 600;
}
.api-detail-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ── Copy-to-Clipboard Code Block ──────────────────────────────── */
.code-block--copyable {
    position: relative;
    cursor: pointer;
}
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    border-radius: 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all var(--duration-fast);
}
.copy-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.1);
    border-color: var(--border-focus);
}

/* ── Docs Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .pipeline-diagram { padding: var(--sp-6) var(--sp-3); }
    .pipeline-track { min-width: 600px; }
    .pipeline-arrow { width: 24px; }
    .signal-example-card { flex-direction: column; }
    .enrichment-grid { grid-template-columns: 1fr; }
    .api-endpoint-body { padding-left: 0; margin-top: var(--sp-4); }
    .api-desc-inline { display: none; }
    .rate-limit-row { grid-template-columns: 80px 1fr 1fr; gap: var(--sp-2); font-size: 0.78rem; }
    .schema-row { grid-template-columns: 1fr 1fr; font-size: 0.78rem; }
    .schema-row span:last-child { grid-column: 1 / -1; }
    .docs-nav-pills { gap: 6px; }
    .pill-link { padding: 5px 12px; font-size: 0.72rem; }
}
