:root, [data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-hover: #f1f3f5;
    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --border-color: #dee2e6;
    --accent: #1e3a5f;
    --accent-hover: #162d4a;
    --accent-light: #edf2f8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #253348;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent: #6fa3e0;
    --accent-hover: #8db8ea;
    --accent-light: #1a2a3d;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary); color: var(--text-primary);
    line-height: 1.6; min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250,251,252,0.85);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
[data-theme="dark"] .landing-nav { background: rgba(15,23,42,0.85); }
.landing-nav .logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.25rem; font-weight: 700; color: var(--text-primary);
    text-decoration: none;
}
.landing-nav-inner .logo-text { color: var(--accent); }
.landing-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.landing-nav-links a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
    transition: color var(--transition);
}
.landing-nav-links a:hover { color: var(--accent); }
.btn-cta {
    padding: 0.5rem 1.25rem; background: var(--accent); color: #ffffff;
    border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
    font-size: 0.875rem; transition: all var(--transition);
}
.btn-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-cta-primary { background: var(--accent); color: #ffffff; padding: 0.75rem 1.75rem; font-size: 1rem; font-weight: 800; box-shadow: 0 4px 14px rgba(30, 58, 95, 0.3); }
.btn-cta-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-cta-secondary { background: transparent; color: var(--text-primary); border: 2px solid var(--border-color); }
.btn-cta-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero {
    text-align: center; padding: 5rem 1.5rem 3rem;
    max-width: 900px; margin: 0 auto;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
    line-height: 1.1; margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.features-section, .how-section, .cleaning-section, .privacy-section, .cta-section {
    padding: 4rem 1.5rem; max-width: 1200px; margin: 0 auto;
}
.features-section h2, .how-section h2, .cleaning-section h2,
.privacy-section h2, .cta-section h2 {
    font-size: 2rem; font-weight: 700; text-align: center;
    margin-bottom: 2.5rem;
}
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    padding: 2rem; background: var(--bg-secondary);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

.steps-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}
.step-card { text-align: center; }
.step-number {
    width: 56px; height: 56px; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: white; border-radius: 50%;
    font-size: 1.5rem; font-weight: 700;
}
.step-card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; }

.cleaning-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.cleaning-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; background: var(--bg-secondary);
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.clean-icon { font-size: 1.25rem; }

/* ===== Hero accent span (gradient) ===== */
.hero h1 .hero-accent {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub a.hero-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.hero-sub a.hero-link:hover { text-decoration: underline; }
.hero-brand { color: var(--text-muted); font-size: 0.875rem; margin-top: 1.25rem; }
.hero-brand strong { color: var(--accent); font-weight: 600; }
.hero-cta { margin-bottom: 1.5rem; }

/* ===== Inline link styling inside feature cards / body ===== */
.inline-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.inline-link:hover { text-decoration: underline; }

/* ===== Pro comparison table ===== */
.pro-section { padding: 5rem 1.5rem 4rem; max-width: 1100px; margin: 0 auto; }
.pro-section h2 { text-align: center; font-size: 2.25rem; font-weight: 800; margin-bottom: 0.75rem; }
.pro-section-sub { text-align: center; color: var(--text-secondary); margin: 0 auto 2.5rem; max-width: 640px; }
.pro-table-wrap {
    overflow-x: auto; border-radius: var(--radius-lg);
    border: 1px solid var(--border-color); background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}
.pro-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.pro-table thead th {
    background: var(--bg-tertiary); color: var(--text-primary);
    text-align: left; padding: 0.875rem 1rem; font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0;
}
.pro-table thead th.col-free { color: var(--text-secondary); width: 30%; text-align: center; }
.pro-table thead th.col-pro { color: var(--accent); width: 40%; text-align: center; }
.pro-table thead th.col-pro span[data-heroicon] { color: var(--accent); }
.pro-table thead th.col-pro span[data-heroicon],
.pro-table thead th.col-pro { display: flex; align-items: center; justify-content: center; gap: 0.35rem; }
.pro-table tbody td {
    padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.pro-table tbody td:not(:first-child) { text-align: center; }
.pro-table tbody tr:last-child td { border-bottom: none; }
.pro-yes { color: var(--accent); font-weight: 700; }
.free-yes { color: var(--text-secondary); font-weight: 600; }
.free-no, .pro-table tbody td.free-no { color: var(--text-muted); }

@media (max-width: 600px) {
    .pro-table thead th,
    .pro-table tbody td { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
    .pro-table tbody td:first-child { min-width: 220px; }
}

/* ===== Pro pricing cards ===== */
.pro-pricing {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; margin: 3rem auto 0; max-width: 720px;
}
.pro-card {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 2rem 1.75rem;
    box-shadow: var(--shadow-sm); transition: transform var(--transition);
    display: flex; flex-direction: column; gap: 1rem;
}
.pro-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.pro-card-head { display: flex; flex-direction: column; gap: 0.5rem; }
.pro-card-badge {
    display: inline-flex; align-items: center; gap: 0.35rem; align-self: flex-start;
    background: var(--accent-light); color: var(--accent);
    padding: 0.25rem 0.75rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pro-card h3 { font-size: 1.125rem; font-weight: 700; }
.pro-price { display: flex; align-items: baseline; gap: 0.15rem; margin: 0.5rem 0; }
.pro-currency { font-size: 1.25rem; color: var(--text-secondary); }
.pro-amount { font-size: 2.75rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.pro-period { font-size: 0.95rem; color: var(--text-secondary); margin-left: 0.25rem; }
.pro-features {
    list-style: none; padding: 0; margin: 0 0 0.5rem;
    display: flex; flex-direction: column; gap: 0.4rem;
}
.pro-features li {
    position: relative; padding-left: 1.5rem; font-size: 0.9rem;
    color: var(--text-secondary);
}
.pro-features li::before {
    content: ""; position: absolute; left: 0; top: 0.35rem;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent-light); border: 2px solid var(--accent);
}
.pro-card .btn-cta { margin-top: auto; justify-content: center; text-align: center; }

.pro-foot {
    text-align: center; color: var(--text-muted); font-size: 0.875rem;
    margin: 2rem auto 0; max-width: 720px;
}
.pro-foot strong { color: var(--text-secondary); }
.pro-foot span[data-heroicon] { color: var(--accent); vertical-align: -0.15em; }

/* ===== Sidequest Labs suite ===== */
.suite-section {
    background: var(--bg-secondary); max-width: 100%;
    padding: 5rem 1.5rem; text-align: center;
}
.suite-section h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.suite-sub { color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; }
.suite-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem; max-width: 880px; margin: 0 auto;
}
.suite-card {
    display: flex; flex-direction: column; gap: 0.75rem;
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 1.75rem;
    text-align: left; text-decoration: none; color: var(--text-primary);
    transition: all var(--transition);
}
.suite-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.suite-card-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); cursor: default; }
.suite-card-active:hover { transform: none; }
.suite-icon { color: var(--accent); }
.suite-icon span[data-heroicon] { width: 28px; height: 28px; }
.suite-card h3 { font-size: 1.25rem; }
.suite-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.suite-link { color: var(--accent); font-weight: 600; font-size: 0.875rem; margin-top: auto; }
.suite-card-active .suite-link { color: var(--text-muted); }
.suite-tag { margin-top: 2rem; color: var(--text-muted); font-size: 0.95rem; }
.suite-tag strong { color: var(--accent); }

/* ===== Final CTA tweak ===== */
.step-card-final {
    background: linear-gradient(135deg, var(--accent-light), transparent);
    border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--accent);
}
.step-card-final p { color: var(--text-secondary); }
.step-card-final strong { color: var(--accent); }

.privacy-section { background: var(--bg-secondary); max-width: 100%; text-align: center; padding: 4rem 1.5rem; }
.privacy-section h2 { margin-bottom: 1rem; }
.privacy-section p { max-width: 700px; margin: 0 auto 1rem; color: var(--text-secondary); }
.privacy-section a { color: var(--accent); text-decoration: none; font-weight: 600; }
.privacy-note { font-size: 0.875rem; }

.cta-section { text-align: center; padding: 5rem 1.5rem; }

.landing-footer {
    background: var(--bg-secondary); padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.landing-footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    flex-wrap: wrap;
}
.footer-brand { font-weight: 600; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text-muted); font-size: 0.8125rem; }

@media (max-width: 768px) {
    .landing-nav-links { gap: 1rem; }
    .landing-nav-links a:not(.btn-cta) { display: none; }
    .features-section h2, .how-section h2, .cleaning-section h2 { font-size: 1.5rem; }
}
.hero-brand { color: var(--text-muted); font-size: 0.875rem; margin-top: 1rem; }
.hero-brand strong { color: var(--accent); font-weight: 600; }

/* Logo dark mode switching */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Compass logo — theme-adaptive via currentColor */
.logo-compass { color: var(--accent); }

span[data-heroicon] { width: 18px; height: 18px; vertical-align: middle; }
.feature-icon span[data-heroicon] { width: 28px; height: 28px; stroke-width: 1.5; }
.btn-icon span[data-heroicon] { width: 16px; height: 16px; }

/* ===== Landing: "Install" CTA next to "Launch" ===== */
.nav-install {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: var(--accent-light, #dbeafe);
    color: var(--accent, #1e40af);
    border: 1px solid var(--accent, #1e40af);
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.nav-install:hover { background: var(--accent, #1e40af); color: #fff; }
.nav-install[hidden] { display: none; }

/* ===== Landing: offline / online toast ===== */
#pwa-offline-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-elevated, #1a2332);
    color: var(--text-primary, #e6edf3);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
}
#pwa-offline-toast.pwa-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#pwa-offline-toast[data-kind="warn"] { background: #b45309; color: #fff; }
#pwa-offline-toast[data-kind="success"] { background: #15803d; color: #fff; }

/* ===== Pricing Cards (matching VizFlow) ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 880px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all var(--transition);
    position: relative;
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pricing-card-featured {
    border: 2px solid var(--accent);
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    padding-top: 3rem;
}

.pricing-card-featured:hover {
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.15);
}

[data-theme="dark"] .pricing-card-featured {
    box-shadow: 0 8px 32px rgba(111, 163, 224, 0.1);
}

[data-theme="dark"] .pricing-card-featured:hover {
    box-shadow: 0 8px 32px rgba(111, 163, 224, 0.2);
}

.pricing-popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 1.25rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}

[data-theme="dark"] .pricing-popular-badge {
    box-shadow: 0 2px 8px rgba(111, 163, 224, 0.3);
}

.pricing-tier {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.pricing-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.pricing-card-featured .pricing-amount {
    color: var(--accent);
}

.pricing-period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-alt-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

.pricing-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    text-align: left;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-feature span:last-child {
    flex: 1;
}

.pricing-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.pricing-check [data-heroicon] {
    width: 16px;
    height: 16px;
}

.pricing-feature-pro .pricing-check {
    color: var(--accent);
}

.pricing-btn {
    width: 100%;
    text-align: center;
}

/* Responsive pricing */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
    
    .pricing-card {
        padding: 2rem 1.5rem;
    }
    
    .pricing-card-featured {
        padding-top: 2.5rem;
    }
    
    .pricing-amount {
        font-size: 2.5rem;
    }
}

/* Nav CTA button white text */
.landing-nav-links .btn-cta,
.landing-nav-links .btn-cta:visited {
    color: white !important;
}

/* Star icon alignment in buttons */
.btn-cta [data-heroicon],
.btn-primary [data-heroicon],
.btn-secondary [data-heroicon] {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}
