/* Light (default) + dark tokens. Pages set data-theme via theme-boot.js. */
:root,
html[data-theme="light"] {
    color-scheme: light;
    --pft-bg: #f1f5f9;
    --pft-text: #0f172a;
    --pft-heading: #0f172a;
    --pft-muted: #64748b;
    --pft-muted-2: #475569;
    --pft-hero-bg:
        radial-gradient(ellipse 90% 70% at 50% -20%, rgba(147, 197, 253, 0.45), transparent),
        linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
    --pft-hero-border: transparent;
    --pft-hero-title: #fff;
    --pft-hero-muted: rgba(255, 255, 255, 0.88);
    --pft-hero-trust: #f8fafc;
    --pft-eyebrow-color: #dbeafe;
    --pft-eyebrow-bg: rgba(255, 255, 255, 0.12);
    --pft-eyebrow-border: rgba(255, 255, 255, 0.28);
    --pft-hero-cta-secondary-bg: transparent;
    --pft-hero-cta-secondary-color: #fff;
    --pft-hero-cta-secondary-border: rgba(255, 255, 255, 0.55);
    --pft-hero-cta-secondary-hover-bg: rgba(255, 255, 255, 0.12);
    --pft-cta-secondary-bg: transparent;
    --pft-cta-secondary-color: #1e40af;
    --pft-cta-secondary-border: #93c5fd;
    --pft-cta-secondary-hover-bg: #eff6ff;
    --pft-panel-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --pft-panel-border: #e2e8f0;
    --pft-panel-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --pft-filter-bg: rgba(255, 255, 255, 0.86);
    --pft-filter-border: #e2e8f0;
    --pft-input-bg: #ffffff;
    --pft-input-border: #cbd5e1;
    --pft-input-text: #0f172a;
    --pft-chip-bg: #ffffff;
    --pft-chip-border: #cbd5e1;
    --pft-chip-text: #334155;
    --pft-chip-hover-border: #94a3b8;
    --pft-chip-hover-text: #0f172a;
    --pft-link: #1d4ed8;
    --pft-link-hover: #1e40af;
    --pft-section-bg: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    --pft-section-border: #e2e8f0;
    --pft-trending-bg: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
    --pft-trending-border: rgba(245, 158, 11, 0.35);
    --pft-rail-bg: rgba(255, 255, 255, 0.94);
    --pft-rail-border: #e2e8f0;
    --pft-rail-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    --pft-rail-hover-bg: #f1f5f9;
    --pft-see-all-bg: rgba(37, 99, 235, 0.08);
    --pft-see-all-border: rgba(37, 99, 235, 0.28);
    --pft-see-all-color: #1d4ed8;
    --pft-error: #b91c1c;
    --pft-nav-bg: rgba(255, 255, 255, 0.95);
    --pft-nav-border: rgba(30, 64, 175, 0.1);
    --pft-nav-text: #374151;
    --pft-nav-hover: #1e40af;
    --pft-nav-muted: #6b7280;
    --pft-nav-menu-bg: #ffffff;
    --pft-nav-menu-border: #f3f4f6;
    --pft-hamburger: #1e40af;
    --pft-toggle-bg: #e2e8f0;
    --pft-toggle-border: #cbd5e1;
    --pft-toggle-knob: #ffffff;
    --pft-toggle-icon: #0f172a;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --pft-bg: #0f172a;
    --pft-text: #e2e8f0;
    --pft-heading: #f8fafc;
    --pft-muted: #94a3b8;
    --pft-muted-2: #cbd5e1;
    --pft-hero-bg:
        radial-gradient(ellipse 90% 70% at 50% -20%, rgba(96, 165, 250, 0.35), transparent),
        linear-gradient(135deg, #172554 0%, #1e3a8a 50%, #1d4ed8 100%);
    --pft-hero-border: transparent;
    --pft-hero-title: #fff;
    --pft-hero-muted: rgba(226, 232, 240, 0.9);
    --pft-hero-trust: #f1f5f9;
    --pft-eyebrow-color: #bfdbfe;
    --pft-eyebrow-bg: rgba(255, 255, 255, 0.1);
    --pft-eyebrow-border: rgba(191, 219, 254, 0.28);
    --pft-hero-cta-secondary-bg: transparent;
    --pft-hero-cta-secondary-color: #fff;
    --pft-hero-cta-secondary-border: rgba(255, 255, 255, 0.45);
    --pft-hero-cta-secondary-hover-bg: rgba(255, 255, 255, 0.1);
    --pft-cta-secondary-bg: transparent;
    --pft-cta-secondary-color: #e2e8f0;
    --pft-cta-secondary-border: rgba(148, 163, 184, 0.45);
    --pft-cta-secondary-hover-bg: rgba(255, 255, 255, 0.06);
    --pft-panel-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --pft-panel-border: rgba(255, 255, 255, 0.08);
    --pft-panel-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    --pft-filter-bg: rgba(15, 23, 42, 0.6);
    --pft-filter-border: rgba(255, 255, 255, 0.1);
    --pft-input-bg: #0f172a;
    --pft-input-border: #334155;
    --pft-input-text: #f1f5f9;
    --pft-chip-bg: #0f172a;
    --pft-chip-border: #334155;
    --pft-chip-text: #cbd5e1;
    --pft-chip-hover-border: #475569;
    --pft-chip-hover-text: #f8fafc;
    --pft-link: #93c5fd;
    --pft-link-hover: #dbeafe;
    --pft-section-bg: linear-gradient(160deg, rgba(30, 41, 59, 0.72) 0%, rgba(15, 23, 42, 0.35) 100%);
    --pft-section-border: rgba(148, 163, 184, 0.14);
    --pft-trending-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.88) 0%, rgba(120, 53, 15, 0.12) 100%);
    --pft-trending-border: rgba(251, 191, 36, 0.28);
    --pft-rail-bg: rgba(15, 23, 42, 0.92);
    --pft-rail-border: rgba(255, 255, 255, 0.12);
    --pft-rail-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    --pft-rail-hover-bg: rgba(255, 255, 255, 0.06);
    --pft-see-all-bg: rgba(37, 99, 235, 0.15);
    --pft-see-all-border: rgba(147, 197, 253, 0.35);
    --pft-see-all-color: #bfdbfe;
    --pft-error: #fecaca;
    --pft-nav-bg: rgba(15, 23, 42, 0.92);
    --pft-nav-border: rgba(148, 163, 184, 0.18);
    --pft-nav-text: #e2e8f0;
    --pft-nav-hover: #93c5fd;
    --pft-nav-muted: #94a3b8;
    --pft-nav-menu-bg: #0f172a;
    --pft-nav-menu-border: #1e293b;
    --pft-hamburger: #e2e8f0;
    --pft-toggle-bg: #1e293b;
    --pft-toggle-border: #334155;
    --pft-toggle-knob: #0f172a;
    --pft-toggle-icon: #f8fafc;
}

html {
    background: var(--pft-bg);
}

/* About / contact pages that still use page-local light styles */
html[data-theme="dark"] body:not(.flow-page) {
    background-color: var(--pft-bg);
    color: var(--pft-text);
}

html[data-theme="dark"] .section-title,
html[data-theme="dark"] .content-card h3,
html[data-theme="dark"] .contact-form h3,
html[data-theme="dark"] .faq-item h4 {
    color: var(--pft-heading);
}

html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .content-card p,
html[data-theme="dark"] .faq-item p,
html[data-theme="dark"] .form-group label {
    color: var(--pft-muted);
}

html[data-theme="dark"] .content-card,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .faq-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .faq-section {
    background: #0f172a;
}

html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .flow-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

html[data-theme="dark"] .flow-card {
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .flow-card h1 {
    color: #f8fafc;
}

html[data-theme="dark"] .flow-card .flow-lead,
html[data-theme="dark"] .flow-support,
html[data-theme="dark"] .flow-form-group label,
html[data-theme="dark"] .download-header p,
html[data-theme="dark"] .upsell-section p {
    color: #94a3b8;
}

html[data-theme="dark"] .flow-form-group input,
html[data-theme="dark"] .flow-form-group select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .flow-status,
html[data-theme="dark"] .flow-info-box,
html[data-theme="dark"] .download-stats,
html[data-theme="dark"] .upsell-card {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .flow-support,
html[data-theme="dark"] .upsell-section {
    border-top-color: #334155;
}

html[data-theme="dark"] .flow-support a {
    color: #93c5fd;
}

html[data-theme="dark"] .upsell-section h3,
html[data-theme="dark"] .upsell-card-name,
html[data-theme="dark"] #successUpsell p {
    color: #f8fafc;
}
