﻿/* ── Google Font ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap');

/* ── Light Theme ──────────────────────────────────────────── */
:root {
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --heading-hero-size: clamp(2.25rem, 3vw, 2.75rem);
    --heading-section-size: clamp(1.65rem, 2.2vw, 2.35rem);
    --page-gutter: 32px;
    --page-gutter-mobile: 16px;
    --section-padding-y: 48px;
    --panel-padding: 28px;
    --panel-padding-lg: 32px;
    --panel-padding-mobile: 20px;
    --card-gap: 28px;
    --brand-primary: #2563EB;
    --brand-secondary: #6D5DFC;
    --brand-accent: #06B6D4;
    --brand-success: #10B981;
    /* Primary — Blue */
    --primary: #2250F4;
    --primary-dark: #1A3FD4;
    --primary-light: #EEEFFD;
    --primary-mid: #C0C8FA;
    /* Accent — Violet (AI features only) */
    --accent: #7C3AED;
    --accent-light: #EDE9FE;
    --accent-mid: #C4B5FD;
    --accent-dark: #4C1D95;
    /* Success — Teal (downloads, completed states) */
    --success: #0D9488;
    --success-light: #CCFBF1;
    --success-dark: #134E4A;
    /* Backgrounds */
    --bg: #F7F7FC;
    --surface: #FFFFFF;
    --surface-2: #F1EFF8;
    /* Borders */
    --border: #D0CDE8;
    --border-focus: #C0C8FA;
    /* Text */
    --text: #1E1B4B;
    --text-secondary: #5B5880;
    --text-muted: #9795B5;
    /* Semantic */
    --error: #EF4444;
    --error-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    /* Nav */
    --navbar-bg: #FFFFFF;
    --navbar-border: #EEEDF8;
    /* Shadows */
    --card-shadow: 0 1px 3px rgba(34,80,244,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 4px 12px rgba(34,80,244,0.14), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.08);
    --shadow-elevated: 0 24px 70px rgba(37, 99, 235, 0.18);
    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-card: 20px;
    --radius-panel: 24px;
    --transition: all 0.18s ease;
}

/* ── Dark Theme ───────────────────────────────────────────── */
[data-theme="dark"] {
    color: #F5F3FF;
    --brand-primary: #60A5FA;
    --brand-secondary: #8B5CF6;
    --brand-accent: #22D3EE;
    --brand-success: #34D399;
    /* Primary — Blue (brighter for dark bg) */
    --primary: #4F6EF7;
    --primary-dark: #2250F4;
    --primary-light: #1E2152;
    --primary-mid: #2D3580;
    /* Accent — Violet */
    --accent: #7C3AED;
    --accent-light: #2D1B69;
    --accent-mid: #4C1D95;
    --accent-dark: #DDD6FE;
    /* Success — Teal */
    --success: #0D9488;
    --success-light: #0F3B38;
    --success-dark: #2DD4BF;
    /* Backgrounds */
    --bg: #13111F;
    --surface: #1C1929;
    --surface-2: #252235;
    /* Borders */
    --border: #2D2A45;
    --border-focus: #4F6EF7;
    /* Text */
    --text: #F5F3FF;
    --text-secondary: #A09DC0;
    --text-muted: #5C5880;
    /* Semantic */
    --error: #F87171;
    --error-light: #450A0A;
    --warning: #FBBF24;
    --warning-light: #451A03;
    /* Nav */
    --navbar-bg: #1C1929;
    --navbar-border: #2D2A45;
    /* Shadows */
    --card-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --card-shadow-hover: 0 4px 16px rgba(79,110,247,0.2), 0 2px 4px rgba(0,0,0,0.4);
    --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.26);
    --shadow-elevated: 0 24px 70px rgba(96, 165, 250, 0.16);
    /* Radius — unchanged */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.18s ease;
}

    [data-theme="dark"] .nav-brand-text,
    [data-theme="dark"] .footer-logo-text {
        color: #F5F3FF;
    }

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, .hero-title {
    font-family: var(--font-heading);
}

h1 {
    letter-spacing: -0.02em;
}

h2 {
    letter-spacing: -0.01em;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.25s ease, border-color 0.25s ease, height 0.25s ease, box-shadow 0.25s ease;
}


    .navbar.scrolled {
        height: 56px;
        box-shadow: 0 1px 12px rgba(0,0,0,0.08);
    }

.nav-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .nav-brand span {
        color: var(--primary);
    }

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
}

    .nav-link:hover {
        color: var(--primary);
        background: var(--primary-light);
    }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Search Bar ───────────────────────────────────────────── */
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 280px;
    margin-left: auto;
}

    .nav-search input {
        width: 100%;
        padding: 0.45rem 0.75rem 0.45rem 2.2rem;
        height: 34px; /* ← add this */
        border: 1px solid var(--border);
        border-radius: 20px;
        background: var(--surface-2);
        color: var(--text);
        font-size: 0.85rem;
        font-family: inherit;
        outline: none;
        transition: var(--transition);
    }

        .nav-search input:focus {
            border-color: var(--primary);
            background: var(--surface);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .nav-search input::placeholder {
            color: var(--text-muted);
        }

.nav-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: var(--text-muted);
    pointer-events: none;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 2000;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

    .search-result-item:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.search-result-icon {
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.search-result-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}



/* ── Dark / Light Toggle ──────────────────────────────────── */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    transition: var(--transition);
}

    .theme-toggle:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

.theme-toggle-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.theme-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ── Auth Buttons ─────────────────────────────────────────── */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: none;
    border: none;
}

    .login-btn:hover {
        color: var(--text);
        background: var(--surface-2);
    }

.signup-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

    .signup-btn:hover {
        background: var(--primary-dark);
    }

.logout-btn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--error-light);
    background: transparent;
    color: var(--error);
    cursor: pointer;
    transition: var(--transition);
}

    .logout-btn:hover {
        background: var(--error-light);
    }

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
}

    .hero-section h1 {
        font-size: 2.75rem;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -0.75px;
        line-height: 1.15;
        margin-bottom: 1rem;
    }

        .hero-section h1 span {
            color: var(--primary);
        }

    .hero-section p {
        font-size: 1.1rem;
        color: var(--text-secondary);
        max-width: 540px;
        margin: 0 auto 2rem;
        line-height: 1.6;
    }

.hero-search {
    position: relative;
    margin-top: 1rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

    .hero-search input {
        width: 100%;
        padding: 0.85rem 1rem 0.85rem 3rem;
        border: 1.5px solid var(--border);
        border-radius: 30px;
        background: var(--bg);
        color: var(--text);
        font-size: 0.95rem;
        font-family: inherit;
        outline: none;
        transition: var(--transition);
        box-shadow: var(--card-shadow);
    }

        .hero-search input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px var(--primary-light);
        }

        .hero-search input::placeholder {
            color: var(--text-muted);
        }

.hero-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* ── Tools Section ────────────────────────────────────────── */
.tools-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.tools-category {
    margin-bottom: 36px;
}

.tools-category-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .tool-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        border-color: var(--primary);
    }

        .tool-card:hover .tool-card-icon {
            transform: scale(1.1);
        }

.tool-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.6rem;
    display: block;
    transition: transform 0.2s ease;
}

.tool-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.tool-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.tool-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

    .tool-card-badge.new {
        background: var(--success-light);
        color: var(--success);
    }

    .tool-card-badge.ai {
        background: var(--accent-light);
        color: var(--accent);
    }

[data-theme="dark"] .tool-card-badge.ai {
    background: var(--accent-mid);
    color: var(--accent-dark);
}

/* ── Tool Pages ───────────────────────────────────────────── */
.tool-page:has(.workflow-grid),
.tool-page:has(.stepper) {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.tool-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    text-align: center;
}

    .tool-container h1 {
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -0.4px;
        margin-bottom: 0.5rem;
    }

.tool-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ── Upload Area ──────────────────────────────────────────── */
.upload-container {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 0.5rem;
}

    .upload-container:hover,
    .upload-container.dragging {
        border-color: var(--primary);
        background: var(--primary-light);
    }

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 2.5rem;
    display: block;
}

.upload-prompt p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.upload-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

    .upload-button:hover {
        background: var(--primary-dark);
    }

.file-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.file-icon {
    font-size: 2rem;
}

.file-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Buttons ──────────────────────────────────────────────── */
.process-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
    max-width: 320px;
    margin-top: 1rem;
}

    .process-button:hover:not(:disabled) {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    }

    .process-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
    max-width: 320px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

    .download-button:hover {
        background: var(--success-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(13,148,136,0.35);
    }

.reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.75rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid #9795B5;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
    max-width: 320px;
}

    .reset-button:hover {
        border-color: var(--text);
        color: var(--text);
        background: var(--surface-2);
    }

/* ── Result States ────────────────────────────────────────── */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.result-container h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.processing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

    .processing-container p {
        color: var(--text-secondary);
        font-size: 0.95rem;
    }

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.error-icon {
    font-size: 2.5rem;
}

.error-message {
    color: var(--error);
    font-size: 0.9rem;
    text-align: center;
    background: var(--error-light);
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    width: 100%;
}

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Stats ────────────────────────────────────────────────── */
.stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

.stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1.25rem;
    text-align: center;
    min-width: 110px;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.stat.highlight .stat-value {
    color: var(--success);
}

/* ── FAQ Section ──────────────────────────────────────────── */
.faq-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

    .faq-section h2 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border);
    }

.faq-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

    .faq-item:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .faq-item h3 {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.4rem;
    }

    .faq-item p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        line-height: 1.65;
    }

/* ── Merge Upload Area ────────────────────────────────────── */
.merge-upload-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.merge-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.merge-file-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.merge-file-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merge-file-size {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.remove-button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

    .remove-button:hover {
        background: var(--error-light);
        color: var(--error);
        border-color: var(--error);
    }

/* ── Form Fields ──────────────────────────────────────────── */
.field-input {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

    .field-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

    .field-input::placeholder {
        color: var(--text-muted);
    }

.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-align: left;
}

.field-technical-name {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    margin-top: 0.15rem;
}

/* ── Upgrade Banner ───────────────────────────────────────── */
.upgrade-banner {
    background: var(--primary-light);
    border: 1.5px solid var(--primary-mid);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.upgrade-icon {
    font-size: 2.5rem;
}

.upgrade-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.upgrade-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.upgrade-price {
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.price-highlight {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 800;
}

.upgrade-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

    .upgrade-features span {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
        color: var(--text);
        font-weight: 500;
    }

.upgrade-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    max-width: 260px;
}

.upgrade-btn {
    background: var(--accent) !important;
    max-width: 100% !important;
}

    .upgrade-btn:hover {
        background: #059669 !important;
    }

/* ── Page Controls ────────────────────────────────────────── */
.page-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.page-btn {
    padding: 0.4rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

    .page-btn:hover:not(:disabled) {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

    .page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.page-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* ── Canvas wrappers ──────────────────────────────────────── */
.canvas-wrapper {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.regions-summary {
    background: var(--primary-light);
    border: 1px solid var(--primary-mid);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
}

/* ── Legal Pages ──────────────────────────────────────────── */
.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.legal-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
}

.legal-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
}

    .legal-header h1 {
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -0.4px;
    }

.legal-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.legal-section {
    margin-bottom: 2rem;
}

    .legal-section h2 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 0.6rem;
    }

    .legal-section p {
        color: var(--text-secondary);
        font-size: 0.9rem;
        line-height: 1.75;
        margin-bottom: 0.6rem;
    }

    .legal-section ul {
        padding-left: 1.25rem;
        margin-bottom: 0.75rem;
    }

        .legal-section ul li {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.75;
            margin-bottom: 0.3rem;
        }

    .legal-section a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
    }

        .legal-section a:hover {
            text-decoration: underline;
        }

/* ── Cookie Table ─────────────────────────────────────────── */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

    .cookie-table th {
        background: var(--primary);
        color: #fff;
        padding: 0.6rem 0.875rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.8rem;
    }

    .cookie-table td {
        padding: 0.6rem 0.875rem;
        border-bottom: 1px solid var(--border);
        color: var(--text-secondary);
        font-size: 0.85rem;
    }

    .cookie-table tr:nth-child(even) td {
        background: var(--surface-2);
    }

/* ── Contact Page ─────────────────────────────────────────── */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.875rem;
    margin-bottom: 2rem;
}

.contact-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}

    .contact-card:hover {
        border-color: var(--primary-mid);
        background: var(--primary-light);
    }

.contact-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.6rem;
}

.contact-card h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.contact-card a {
    color: var(--primary);
    font-size: 0.8rem;
    text-decoration: none;
    word-break: break-all;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .form-group label {
        font-weight: 600;
        color: var(--text);
        font-size: 0.875rem;
    }

.contact-textarea {
    min-height: 130px;
    resize: vertical;
    font-family: var(--font-body);
}

.contact-success {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 1.25rem;
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-2);
    color: var(--primary);
    padding: 0.45rem 0.875rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

    .social-link:hover {
        border-color: var(--primary);
        background: var(--primary-light);
        transform: translateY(-1px);
    }

/* ── Account Page ─────────────────────────────────────────── */
.account-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

    .account-section:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .account-section h2 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 1rem;
    }

.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.account-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
    font-size: 0.875rem;
}

.account-value {
    color: var(--text);
    font-size: 0.875rem;
}

.subscription-card {
    background: var(--primary-light);
    border: 1.5px solid var(--primary-mid);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 280px;
}

    .subscription-card h3 {
        font-weight: 800;
        color: var(--text);
        margin-bottom: 0.5rem;
    }

    .subscription-card p {
        color: var(--text-secondary);
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: 3rem;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

.social-icon {
    width: 34px;
    height: 34px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

    .social-icon:hover {
        background: var(--primary-light);
        border-color: var(--primary-mid);
        transform: translateY(-2px);
    }

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

    .footer-col a:hover {
        color: var(--primary);
        transform: translateX(2px);
    }

.footer-bottom {
    border-top: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .footer-bottom p {
        color: var(--text-muted);
        font-size: 0.825rem;
    }

    .footer-bottom a {
        color: var(--text-muted);
        text-decoration: none;
        transition: var(--transition);
    }

        .footer-bottom a:hover {
            color: var(--primary);
        }

/* ── Tool Options Panel ───────────────────────────────────── */
.tool-options-panel {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.25rem 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .option-group label {
        font-weight: 600;
        color: var(--text);
        font-size: 0.875rem;
    }

.option-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 0;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
}

/* ── Coming Soon Banner ───────────────────────────────────── */
.coming-soon-banner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--primary-light);
    border: 1.5px solid var(--primary-mid);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    text-align: left;
}

.coming-soon-icon {
    font-size: 2.25rem;
    flex-shrink: 0;
}

.coming-soon-banner h3 {
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.coming-soon-banner p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.coming-soon-banner a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

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

    .notify-section h3 {
        font-weight: 700;
        color: var(--text);
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }

.notify-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
}

    .notify-form input {
        flex: 1;
        min-width: 0;
        height: 44px;
        padding: 0 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text);
        font-size: 0.9rem;
        font-family: inherit;
        outline: none;
        transition: var(--transition);
        box-sizing: border-box;
    }

        .notify-form input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

    .notify-form button {
        height: 44px;
        flex-shrink: 0;
        padding: 0 1.5rem;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        transition: var(--transition);
        white-space: nowrap;
        box-sizing: border-box;
    }

        .notify-form button:hover {
            background: var(--primary-dark);
        }

@media (max-width: 480px) {
    .notify-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ── Organize PDF ─────────────────────────────────────────── */
.organize-container {
    margin-top: 1.5rem;
}

.organize-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
    justify-content: center;
}

.organize-tile {
    width: 86px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

    .organize-tile:hover {
        border-color: var(--primary-mid);
        box-shadow: var(--card-shadow-hover);
    }

.organize-tile-deleted {
    opacity: 0.4;
    border-color: var(--error) !important;
}

.organize-page-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.organize-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.org-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 4px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: inherit;
}

    .org-btn:hover:not(:disabled) {
        background: var(--primary-light);
        color: var(--primary);
        border-color: var(--primary-mid);
    }

    .org-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.org-btn-delete {
    color: var(--error) !important;
}

.rotation-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* ── Sign PDF ─────────────────────────────────────────────── */
.sign-section {
    margin-top: 1.5rem;
    text-align: left;
}

.sign-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.signature-pad-wrapper {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--border);
}

.sign-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sign-page-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text);
}

/* ── Edit / Annotate ──────────────────────────────────────── */
.edit-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.tool-options {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tool-option-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.825rem;
    color: var(--text);
    transition: var(--transition);
    font-weight: 500;
    font-family: inherit;
}

    .tool-option-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .tool-option-btn.active {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
    }

.tool-settings {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── PDF Reader ───────────────────────────────────────────── */
.reader-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.reader-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zoom-level {
    font-weight: 700;
    color: var(--text);
    min-width: 45px;
    text-align: center;
    font-size: 0.875rem;
}

.reader-canvas-wrapper {
    overflow: auto;
    max-height: 80vh;
    border-radius: var(--radius);
}

.reader-file-info {
    color: var(--text-muted);
    font-size: 0.825rem;
    margin-top: 0.75rem;
}

/* ── Delete Pages ─────────────────────────────────────────── */
.page-selector {
    margin-top: 1.5rem;
    text-align: left;
}

    .page-selector h3 {
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.4rem;
        font-size: 0.95rem;
    }

.page-selector-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.page-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.page-tile {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    font-size: 0.875rem;
    font-family: inherit;
}

    .page-tile:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

.page-tile-selected {
    background: var(--error) !important;
    border-color: var(--error) !important;
    color: white !important;
}

.page-delete-x {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.65rem;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-summary {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}

.selected-file-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    margin: 1rem 0;
    color: var(--text);
    font-size: 0.875rem;
    text-align: left;
}

/* ── Converter Hub ────────────────────────────────────────── */
.converter-hub {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

    .converter-hub h2 {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--text);
        margin-bottom: 1rem;
        margin-top: 1.5rem;
        letter-spacing: -0.3px;
    }

.coming-soon-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Home page ────────────────────────────────────────────── */
.home-page {
    min-height: calc(100vh - 64px);
}

/* ── Responsive ──────────────────────────────────────────── */

.home-page {
    width: 100%;
    overflow-x: hidden;
}

.tools-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 64px;
    width: 100%;
    box-sizing: border-box;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* iPad */
@media (max-width: 1024px) {
    .tools-section {
        padding: 1.5rem 1.25rem 48px;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .popular-fixes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small tablet / large phone landscape */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-search {
        max-width: 200px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 1.25rem 2rem;
    }

        .hero-section h1 {
            font-size: 2rem;
        }

        .hero-section p {
            font-size: 1rem;
        }

    .tools-section {
        padding: 1.25rem 1rem 40px;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }

    .ai-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-fixes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-divider {
        display: none;
    }

    .trust-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.82rem;
        color: var(--text-secondary);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-card-featured {
        transform: none;
    }

        .pricing-card-featured:hover {
            transform: translateY(-2px);
        }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile portrait */
@media (max-width: 640px) {
    .nav-search {
        display: none;
    }

    .hero-section {
        padding: 2rem 1rem 1.5rem;
    }

        .hero-section h1 {
            font-size: 1.65rem;
            line-height: 1.2;
        }

        .hero-section p {
            font-size: 0.95rem;
        }

    .hero-badge {
        background: var(--accent-light);
        color: var(--accent);
        border-radius: 999px;
    }

    .hero-cta-row {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .hero-cta-primary,
    .hero-cta-secondary {
        text-align: center;
        width: 100%;
    }

    .tools-section {
        padding: 1rem 0.75rem 32px;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .ai-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .popular-fixes-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        padding: 1rem 0.75rem;
    }

    .tool-card-icon {
        font-size: 1.5rem;
    }

    .tool-card h3 {
        font-size: 0.8rem;
    }

    .tool-card p {
        font-size: 0.7rem;
    }

    .tools-category-title {
        font-size: 0.72rem;
    }

    .tool-container {
        padding: 1.5rem;
    }

    .trust-item {
        width: 50%;
        text-align: center;
        padding: 0.3rem 0;
        font-size: 0.72rem;
    }

    .trust-badges {
        gap: 0.6rem;
    }

    .trust-badge {
        flex: 1;
        min-width: 140px;
    }

    .compare-grid {
        grid-template-columns: 1fr;
    }

    .chat-input-row {
        flex-direction: column;
    }

    .batch-file-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .history-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .stats {
        gap: 0.5rem;
    }

    .cookie-banner-content {
        flex-direction: column;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-accept-btn, .cookie-decline-btn {
        flex: 1;
        text-align: center;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.45rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-card {
        padding: 0.875rem 0.5rem;
    }

    .batch-file-row {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ── Pricing responsive ───────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
    align-items: start;
}

/* ── Popular fixes responsive ─────────────────── */
.popular-fixes-section {
    max-width: 1100px;
    margin: 1.25rem auto 2rem;
    padding: 0 1rem;
}

.popular-fixes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .popular-fixes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Test mode badge ──────────────────────────── */
.test-mode-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}
/* ── Toast Notifications ──────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 280px;
    max-width: 400px;
    pointer-events: all;
    animation: toastIn 0.25s ease;
    border: 1px solid;
}

.toast-leaving {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-success {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.toast-error {
    background: var(--error-light);
    border-color: var(--error);
    color: var(--error);
}

.toast-warning {
    background: #FFFBEB;
    border-color: var(--warning);
    color: #92400E;
}

[data-theme="dark"] .toast-warning {
    background: #451A03;
    color: var(--warning);
}

.toast-info {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 0.75rem;
    opacity: 0.6;
    padding: 2px;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

    .toast-close:hover {
        opacity: 1;
    }

/* ── Error Pages ──────────────────────────────────────────── */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 2rem;
}

.error-page-content {
    text-align: center;
    max-width: 480px;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.15;
}

.error-page-content h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.4px;
}

.error-page-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Cookie Consent Banner ────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-left {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.cookie-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.cookie-desc {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

    .cookie-desc a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
    }

        .cookie-desc a:hover {
            text-decoration: underline;
        }

.cookie-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.cookie-decline-btn {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .cookie-decline-btn:hover {
        border-color: var(--text-secondary);
        color: var(--text);
    }

.cookie-accept-btn {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .cookie-accept-btn:hover {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
    }

/* ── Trust Badges ─────────────────────────────────────────── */
.trust-badges {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid var(--border);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

    .trust-badge:hover {
        border-color: var(--primary-mid);
        background: var(--primary-light);
    }

.trust-badge-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.trust-badge-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.trust-badge-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.2;
}

@media (max-width: 640px) {
    .trust-badges {
        gap: 0.6rem;
    }

    .trust-badge {
        flex: 1;
        min-width: 140px;
    }

    .cookie-banner-content {
        flex-direction: column;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-accept-btn,
    .cookie-decline-btn {
        flex: 1;
        text-align: center;
    }
}

/* ── Pricing Page ─────────────────────────────────────────── */
.pricing-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.pricing-hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
}

    .pricing-hero h1 {
        font-size: 2.25rem;
        font-weight: 800;
        color: var(--text);
        letter-spacing: -0.5px;
        margin-bottom: 0.75rem;
    }

    .pricing-hero p {
        font-size: 1.1rem;
        color: var(--text-secondary);
    }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
    align-items: start;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

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

.pricing-card-featured {
    border: 2px solid var(--primary);
    transform: scale(1.02);
}

    .pricing-card-featured:hover {
        transform: scale(1.02) translateY(-2px);
    }

.pricing-popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-save-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-plan-name {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    line-height: 1;
}

    .pricing-price span {
        font-size: 1rem;
        font-weight: 400;
        color: var(--text-secondary);
    }

.pricing-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    min-height: 200px;
}

    .pricing-features li {
        font-size: 0.875rem;
        color: var(--text-secondary);
    }

.pricing-btn-free {
    display: block;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

    .pricing-btn-free:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

.pricing-btn-pro {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

    .pricing-btn-pro:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    }

.pricing-btn-yearly {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: var(--success);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

    .pricing-btn-yearly:hover {
        background: #059669;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16,185,129,0.3);
    }

.pricing-faq {
    max-width: 900px;
    margin: 4rem auto 2rem;
    padding: 0 1rem;
}

    .pricing-faq h2 {
        text-align: center;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 2rem;
    }

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card-featured {
        transform: none;
    }

        .pricing-card-featured:hover {
            transform: translateY(-2px);
        }
}

.popular-fixes-section {
    max-width: 1100px;
    margin: 1.25rem auto 2rem;
    padding: 0 1rem;
}

.popular-fixes-header {
    text-align: center;
    margin-bottom: 1rem;
}

.popular-fixes-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.popular-fixes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

    .popular-fixes-grid .tool-card {
        min-height: 152px;
        text-decoration: none;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    }

        .popular-fixes-grid .tool-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--card-shadow-hover);
        }

        .popular-fixes-grid .tool-card h3 {
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.95rem;
            font-weight: 600;
            line-height: 1.3;
            margin: 8px 0 4px;
            color: var(--text);
            text-align: center;
        }

        .popular-fixes-grid .tool-card p {
            min-height: 36px;
            font-size: 0.85rem;
            line-height: 1.35;
            color: var(--text-muted);
            margin: 0;
        }

.featured-fix {
    border-color: rgba(59,130,246,0.35);
    box-shadow: inset 0 0 0 1px rgba(59,130,246,0.12), var(--card-shadow);
}

.featured-fix-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #3b82f6;
    color: white;
    padding: 3px 7px;
    border-radius: 999px;
    line-height: 1.2;
    z-index: 2;
}

@media (max-width: 1100px) {
    .popular-fixes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .popular-fixes-section {
        margin: 1.25rem auto 2rem;
        padding: 0 1rem;
    }

    .popular-fixes-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

.test-mode-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.upgrade-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

    .upgrade-features span {
        background: #ffffff;
        border: 1px solid #dfe7f3;
        border-radius: 999px;
        padding: 8px 14px;
        font-size: 0.95rem;
    }

/* ── Account / History ───────────────────────── */
.history-table-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .history-table th {
        text-align: left;
        padding: 0.5rem 0.75rem;
        border-bottom: 2px solid var(--border-color, #e5e7eb);
        color: var(--gray, #6b7280);
        font-weight: 500;
        white-space: nowrap;
    }

    .history-table td {
        padding: 0.6rem 0.75rem;
        border-bottom: 1px solid var(--border-color, #f3f4f6);
        vertical-align: middle;
    }

    .history-table tbody tr:hover {
        background: var(--hover-bg, #f9fafb);
    }

.history-filename {
    font-weight: 500;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-tool-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    white-space: nowrap;
}

.history-size {
    color: var(--gray, #6b7280);
    white-space: nowrap;
}

.history-date {
    color: var(--gray, #6b7280);
    white-space: nowrap;
    font-size: 0.8rem;
}

.history-pro-nudge {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray, #6b7280);
}

    .history-pro-nudge a {
        color: var(--primary, #2563eb);
        text-decoration: none;
        font-weight: 500;
    }

.subscription-card.pro {
    border-left: 4px solid var(--primary, #2563eb);
    padding: 1rem 1.25rem;
    background: var(--primary-light, #eff6ff);
    border-radius: 8px;
}

/* ── Batch Processing ────────────────────────── */
.batch-select {
    width: 100%;
    max-width: 380px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--card-bg, #fff);
    color: var(--text, #111);
    margin-top: 0.5rem;
}

.batch-file-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.batch-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    background: var(--hover-bg, #f9fafb);
    border-radius: 6px;
    font-size: 0.875rem;
}

.batch-file-name {
    flex: 1;
    font-weight: 500;
}

.batch-file-size {
    color: var(--gray, #6b7280);
    white-space: nowrap;
}

.batch-file-status {
    white-space: nowrap;
    font-size: 0.8rem;
    min-width: 90px;
    text-align: right;
}

.status-done {
    color: var(--success, #16a34a);
    font-weight: 500;
}

.status-error {
    color: var(--danger, #dc2626);
    font-weight: 500;
}

.status-pending {
    color: var(--gray, #6b7280);
}

.upgrade-nudge {
    text-align: center;
    padding: 2rem;
    background: var(--hover-bg, #f9fafb);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.secondary-button {
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: transparent;
    color: var(--text, #111);
    cursor: pointer;
    font-size: 0.9rem;
}

    .secondary-button:hover {
        background: var(--hover-bg, #f9fafb);
    }

/* ── PDF Compare ─────────────────────────────── */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }
}

.compare-drop {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 140px;
}

.compare-drop-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compare-file-badge {
    font-size: 0.875rem;
    padding: 6px 12px;
    background: var(--hover-bg, #f9fafb);
    border-radius: 6px;
    color: var(--text, #111);
    border: 1px solid var(--border-color, #e5e7eb);
}

.compare-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.compare-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.compare-stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text, #111);
}

    .compare-stat-value.added {
        color: #16a34a;
    }

    .compare-stat-value.removed {
        color: #dc2626;
    }

.compare-stat-label {
    font-size: 0.8rem;
    color: var(--gray, #6b7280);
}

/* ── AI Extractor ────────────────────────────── */
.extract-type-grid {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.extract-type-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: transparent;
    color: var(--text, #111);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all .15s;
}

    .extract-type-btn:hover {
        background: var(--hover-bg, #f9fafb);
    }

    .extract-type-btn.active {
        background: var(--primary, #2563eb);
        color: #fff;
        border-color: var(--primary, #2563eb);
    }

.extract-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.extract-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.6rem 0.75rem;
    background: var(--hover-bg, #f9fafb);
    border-radius: 6px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.extract-field-label {
    font-size: 0.75rem;
    color: var(--gray, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.extract-field-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text, #111);
    word-break: break-word;
}

/* ── AI Hub ──────────────────────────────────── */
.ai-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.ai-hub-card {
    background: var(--color-background-primary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
    position: relative;
}

    .ai-hub-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
        transform: translateY(-2px);
    }

.ai-hub-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ai-hub-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.ai-hub-desc {
    font-size: 0.85rem;
    color: var(--gray, #6b7280);
    line-height: 1.5;
}

.ai-hub-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 7px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    border-radius: 4px;
}

/* ── AI Output ───────────────────────────────── */
.ai-output-card {
    margin-top: 0;
}

.ai-output-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.ai-output-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text, #111);
    white-space: pre-wrap;
}

/* ── Chat ────────────────────────────────────── */
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 420px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--hover-bg, #f9fafb);
    border-radius: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chat-user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-ai {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-ai-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chat-bubble-text {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.chat-user .chat-bubble-text {
    background: var(--primary, #2563eb);
    color: #fff;
}

.chat-ai .chat-bubble-text {
    background: var(--color-background-primary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text, #111);
}

.chat-thinking {
    color: var(--gray, #6b7280);
    font-style: italic;
}

.chat-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--color-background-primary, #fff);
    color: var(--text, #111);
}

/* ── Questions ───────────────────────────────── */
.questions-list {
    margin: 0;
    padding-left: 1.25rem;
}

.question-item {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0.6rem;
    color: var(--text, #111);
}

/* ── Hero redesign ───────────────────────────── */
.hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 14px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    border-radius: 999px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.hero-cta-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.hero-cta-primary {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary, #2563eb);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity .15s;
}

    .hero-cta-primary:hover {
        opacity: 0.88;
    }

.hero-cta-secondary {
    display: inline-block;
    padding: 0.7rem 1.25rem;
    color: var(--primary, #2563eb);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
}

    .hero-cta-secondary:hover {
        text-decoration: underline;
    }

/* ── Trust bar ───────────────────────────────── */
.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    background: var(--surface, #f8f9fa);
    border-bottom: 1px solid var(--border, #e5e7eb);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trust-item {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
    padding: 0 1rem;
    white-space: nowrap;
}

.trust-divider {
    width: 1px;
    height: 14px;
    background: var(--border, #e5e7eb);
}

@media (max-width: 600px) {
    .trust-divider {
        display: none;
    }

    .trust-item {
        padding: 0 0.5rem;
    }
}

/* ── AI tools section ────────────────────────── */
.ai-category {
    background: var(--primary-light);
    border: 1px solid var(--primary-mid);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.ai-category-title {
    color: var(--primary);
}

.pro-label {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--primary, #2563eb);
    color: #fff;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.tool-card-ai {
    border-color: var(--primary-light, #bfdbfe) !important;
}

.featured-ai-card {
    border: 2px solid var(--primary, #2563eb) !important;
}

.pro-badge {
    background: var(--primary, #2563eb) !important;
    color: #fff !important;
}

.ai-tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.footer-providers {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* ── Tool icon tiles ─────────────────────────── */
.tool-icon-tile {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    flex-shrink: 0;
}

    .tool-icon-tile svg {
        width: 26px;
        height: 26px;
    }

/* Category color families */
.tile-blue {
    background: #DBEAFE;
}

.tile-violet {
    background: #EDE9FE;
}

.tile-teal {
    background: #CCFBF1;
}

.tile-amber {
    background: #FEF3C7;
}

.tile-red {
    background: #FEE2E2;
}

.tile-indigo {
    background: #E0E7FF;
}

.tile-pink {
    background: #FCE7F3;
}

[data-theme="dark"] .tile-blue {
    background: #1E3A5F;
}

[data-theme="dark"] .tile-violet {
    background: #2D1B69;
}

[data-theme="dark"] .tile-teal {
    background: #0F3B38;
}

[data-theme="dark"] .tile-amber {
    background: #451A03;
}

[data-theme="dark"] .tile-red {
    background: #450A0A;
}

[data-theme="dark"] .tile-indigo {
    background: #1E2152;
}

[data-theme="dark"] .tile-pink {
    background: #500724;
}

/* ── Accessibility ───────────────────────────────────── */

/* Visible focus rings for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

h1:focus-visible,
h2:focus-visible,
h3:focus-visible,
div:focus-visible,
section:focus-visible {
    outline: none;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    text-decoration: none;
    transition: top 0.1s;
}

    .skip-link:focus {
        top: 1rem;
    }

/* Error messages announced to screen readers */
.error-message {
    role: alert;
}

/* Processing spinner label */
.spinner {
    role: status;
}

/* Ensure sufficient touch target size on mobile */
button,
.upload-button,
.nav-link,
.tool-card {
    min-height: 44px;
}

.tool-card {
    min-height: unset; /* cards handle their own height */
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
}

.nav-brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0F0D1F;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

    .nav-brand-text span {
        color: var(--primary);
    }

/* ── Pricing Page Additions ───────────────────────────────── */

.pricing-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    align-items: start;
}

.pricing-trust-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Feature list items */
.pricing-features li {
    list-style: none;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

    .pricing-features li:last-child {
        border-bottom: none;
    }

.feat-yes::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.feat-no {
    opacity: 0.45;
}

    .feat-no::before {
        content: "–";
        color: var(--text-muted);
        font-weight: 700;
        flex-shrink: 0;
    }

/* Teams card */
.pricing-card-teams {
    border: 2px solid #7C3AED;
    position: relative;
}

.pricing-teams-badge {
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.pricing-btn-teams {
    display: block;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 1rem;
}

    .pricing-btn-teams:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

/* Annual nudge */
.pricing-yearly-nudge {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.pricing-link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Comparison table */
.pricing-compare {
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 0 1rem;
}

    .pricing-compare h2 {
        text-align: center;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 1.5rem;
    }

.compare-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .compare-table th {
        background: var(--surface-2);
        padding: 0.85rem 1rem;
        text-align: center;
        font-weight: 700;
        color: var(--text);
        border-bottom: 2px solid var(--border);
    }

        .compare-table th:first-child {
            text-align: left;
        }

.compare-th-pro {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.compare-th-teams {
    background: #EDE9FE !important;
    color: #7C3AED !important;
}

[data-theme="dark"] .compare-th-teams {
    background: #2D1B69 !important;
    color: #A78BFA !important;
}

.compare-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
}

    .compare-table td:first-child {
        text-align: left;
        color: var(--text);
        font-weight: 500;
    }

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-section-row td {
    background: var(--surface-2);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
}

.compare-table tr:hover td {
    background: var(--surface-2);
}

.compare-section-row:hover td {
    background: var(--surface-2) !important;
}

/* Audience section */
.pricing-audience {
    max-width: 1000px;
    margin: 4rem auto 0;
    padding: 0 1rem;
    text-align: center;
}

    .pricing-audience h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 2rem;
    }

.audience-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.audience-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: left;
}

.audience-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.audience-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.audience-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 900px) {
    .pricing-grid-3 {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .audience-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .audience-grid {
        grid-template-columns: 1fr;
    }

    .pricing-trust-row {
        gap: 0.75rem;
    }
}

.hero-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    max-width: 520px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.25rem;
    flex: 1;
}

.hero-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    margin-top: 0.3rem;
    text-transform: none;
    white-space: nowrap;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
    flex-shrink: 0;
}

@media (max-width: 540px) {
    .hero-stats-row {
        padding: 0.75rem 1rem;
        max-width: 100%;
    }

    .hero-stat {
        padding: 0 0.75rem;
    }

    .hero-stat-num {
        font-size: 1.1rem;
    }
}

/* ── AI Tool Header ───────────────────────────────────────── */
.ai-tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ai-tool-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

/* ── How It Works ─────────────────────────────────────────── */
.how-it-works {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hiw-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    flex: 1;
    min-width: 160px;
    max-width: 220px;
}

.hiw-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hiw-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

    .hiw-text strong {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text);
    }

    .hiw-text span {
        font-size: 0.72rem;
        color: var(--text-muted);
    }

.hiw-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Upgrade Card ─────────────────────────────────────────── */
.ai-upgrade-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.ai-upgrade-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.ai-upgrade-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.ai-upgrade-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.ai-upgrade-features {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.75rem;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.ai-upgrade-feat {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

    .ai-upgrade-feat::before {
        color: var(--success);
    }

.ai-upgrade-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Document type selector ───────────────────────────────── */
.extract-type-section {
    margin-bottom: 1.5rem;
}

.extract-type-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.extract-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.extract-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

    .extract-type-btn:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

    .extract-type-btn.active {
        border-color: var(--primary);
        background: var(--primary-light);
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.extract-type-icon {
    font-size: 1.5rem;
}

.extract-type-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.extract-type-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

/* ── AI Processing ────────────────────────────────────────── */
.ai-processing-container {
    text-align: center;
    padding: 3rem 1rem;
}

.ai-processing-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.ai-processing-container h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.ai-processing-container p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.ai-processing-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 280px;
    margin: 0 auto;
}

.ai-processing-step {
    font-size: 0.825rem;
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    transition: all 0.3s ease;
}

    .ai-processing-step.done {
        color: var(--success);
        background: var(--success-light);
        font-weight: 600;
    }

        .ai-processing-step.done::before {
            content: "✓ ";
        }

/* ── Extraction Results ───────────────────────────────────── */
.extract-results {
    margin-top: 1rem;
}

.extract-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

    .extract-results-header h2 {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.25rem;
    }

.extract-results-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.extract-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.extract-field-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.extract-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extract-field-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.extract-line-items {
    margin-top: 1.5rem;
}

    .extract-line-items h3 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.75rem;
    }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .how-it-works {
        flex-direction: column;
        align-items: stretch;
    }

    .hiw-step {
        max-width: 100%;
    }

    .hiw-arrow {
        transform: rotate(90deg);
        align-self: center;
    }

    .extract-type-grid {
        grid-template-columns: 1fr;
    }

    .extract-results-header {
        flex-direction: column;
    }
}

/* ── Account Page ─────────────────────────────────────────── */
.account-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.account-email {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.account-pro-badge {
    background: var(--success);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 20px;
}

/* Stats row */
.account-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.account-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.account-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.account-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: none;
    margin-top: 0.25rem;
}

/* Main grid */
.account-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.account-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.account-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

    .account-panel-header h2 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
        margin: 0;
    }

.account-panel-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--surface-2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.account-loading {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Subscription cards */
.sub-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.sub-card-pro {
    background: var(--success-light);
    border: 1px solid var(--success);
}

[data-theme="dark"] .sub-card-pro {
    background: #042F2E;
    border-color: var(--success);
}

.sub-card-free {
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.sub-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.sub-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.sub-card-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.sub-card-date {
    margin-top: 0.25rem !important;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
}

.sub-upgrade-list {
    margin: 0.75rem 0;
}

.sub-upgrade-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.sub-upgrade-feat {
    font-size: 0.825rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}

/* Quick links */
.account-quick-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

    .account-quick-links h3 {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.75rem;
    }

.account-quick-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

    .account-quick-link:hover {
        background: var(--surface-2);
        color: var(--primary);
    }

/* History list */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .history-item:hover {
        background: var(--surface-2);
    }

.history-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.history-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-item-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.history-pro-nudge {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

    .history-pro-nudge a {
        color: var(--primary);
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
    }

/* Empty & loading states */
.account-empty-state,
.account-loading-state {
    text-align: center;
    padding: 3rem 1rem;
}

.account-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.account-empty-state h3,
.account-loading-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.account-empty-state p,
.account-loading-state p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* Sign in prompt */
.account-signin-prompt {
    text-align: center;
    padding: 5rem 1rem;
    max-width: 400px;
    margin: 0 auto;
}

    .account-signin-prompt h2 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.75rem;
    }

    .account-signin-prompt p {
        font-size: 0.9rem;
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
    }

/* Responsive */
@media (max-width: 900px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .account-stats {
        grid-template-columns: 1fr 1fr;
    }

    .account-header {
        flex-wrap: wrap;
    }

    .account-pro-badge {
        background: #F59E0B;
        color: white;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 0.35rem 1rem;
        border-radius: 20px;
    }
}

.nav-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.nav-account-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
}

    .nav-account-link:hover {
        color: var(--primary);
    }

.nav-signout-btn {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--error, #DC2626);
    background: none;
    border: 1px solid currentColor;
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .nav-signout-btn:hover {
        background: #FEF2F2;
        color: #B91C1C;
    }

/* ── Nav user chip — modern pill style ─────────────────────── */
.nav-user-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.2rem 0.75rem 0.2rem 0.2rem !important;
    height: 34px !important;
    border-radius: 20px !important;
    border: none !important;
    background: var(--surface-2) !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    max-width: 160px !important;
}

    .nav-user-chip:hover {
        background: var(--primary-light) !important;
    }

    /* Force avatar image to circle no matter what auth0 returns */
    .nav-user-chip img,
    .nav-user-chip .nav-user-avatar-img {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        flex-shrink: 0 !important;
        display: block !important;
        overflow: hidden !important;
    }

.nav-user-avatar {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border-radius: 50% !important;
    background: var(--primary) !important;
    color: white !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.nav-user-name {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 90px !important;
}

.nav-user-chevron-svg {
    width: 10px !important;
    height: 10px !important;
    flex-shrink: 0 !important;
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
}
.nav-signout-btn {
    font-size: 0.825rem;
    font-weight: 600;
    color: #DC2626;
    background: none;
    border: 1px solid #DC2626;
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

    .nav-signout-btn:hover {
        background: #FEF2F2;
    }

[data-theme="dark"] .nav-signout-btn:hover {
    background: #3B0000;
}

.nav-user-avatar-img {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
}


/* ── Contract Review Results ──────────────────────────────── */
.contract-review-results {
    margin-top: 1rem;
}

.review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

    .review-header h2 {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.25rem;
    }

.review-risk-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.risk-low {
    background: var(--success-light);
    color: var(--success-dark);
}

.risk-medium {
    background: #FEF3C7;
    color: #92400E;
}

.risk-high {
    background: #FEE2E2;
    color: #991B1B;
}

[data-theme="dark"] .risk-medium {
    background: #1C1500;
    color: #FCD34D;
}

[data-theme="dark"] .risk-high {
    background: #1C0000;
    color: #FCA5A5;
}

/* Review sections */
.review-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

    .review-section:last-of-type {
        border-bottom: none;
    }

    .review-section h3 {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.85rem;
    }

.review-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border-left: 3px solid var(--primary);
}

/* Parties */
.review-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.review-tag {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.review-tag-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.review-tag-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

/* Key dates */
.review-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.review-date-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.review-date-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-date-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.review-date-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Risky clauses */
.review-risks {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.review-risk-card {
    border-radius: var(--radius-sm);
    padding: 1rem;
    border-left: 4px solid;
}

.severity-high {
    background: #FEF2F2;
    border-left-color: #DC2626;
}

.severity-medium {
    background: #FFFBEB;
    border-left-color: #F59E0B;
}

.severity-low {
    background: #F0FDF4;
    border-left-color: #16A34A;
}

[data-theme="dark"] .severity-high {
    background: #1C0000;
    border-left-color: #EF4444;
}

[data-theme="dark"] .severity-medium {
    background: #1C1000;
    border-left-color: #FBBF24;
}

[data-theme="dark"] .severity-low {
    background: #001C00;
    border-left-color: #4ADE80;
}

.review-risk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.review-risk-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.review-risk-severity {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    background: rgba(0,0,0,0.08);
    color: var(--text);
    flex-shrink: 0;
}

.review-risk-excerpt {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 2px solid var(--border);
    padding-left: 0.75rem;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.review-risk-explanation {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* Obligations */
.review-obligations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-obligation {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
}

.obligation-critical {
    border-color: #F59E0B;
    background: #FFFBEB;
}

[data-theme="dark"] .obligation-critical {
    background: #1C1000;
}

.obligation-party {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
}

.obligation-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.5;
}

.obligation-critical-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: #F59E0B;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Missing elements */
.review-missing {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.review-missing-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

/* Recommendations */
.review-recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    counter-reset: rec-counter;
}

.review-rec-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.6rem 0.75rem 0.6rem 1rem;
    background: var(--success-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--success);
    line-height: 1.5;
}

/* Disclaimer */
.review-disclaimer {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-dates-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.account-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── Profile Menu ─────────────────────────────────────────── */
.profile-menu-wrap {
    position: relative;
}

.nav-user-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: -0.1rem;
}

/* Dropdown panel */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    overflow: hidden;
    animation: dropdown-in 0.12s ease;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Backdrop to close on outside click */
.profile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}

/* Header */
.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.profile-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-dropdown-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-dropdown-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-dropdown-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Divider */
.profile-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

/* Menu items */
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s;
}

    .profile-menu-item:hover {
        background: var(--surface-2);
        color: var(--text);
    }

.profile-menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}

.profile-menu-signout {
    color: #DC2626;
}

    .profile-menu-signout:hover {
        background: #FEF2F2;
        color: #B91C1C;
    }

[data-theme="dark"] .profile-menu-signout:hover {
    background: #1C0000;
}

/* Section label */
.profile-menu-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.6rem 1rem 0.3rem;
}

/* Theme options */
.profile-theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding: 0.4rem 1rem 0.75rem;
}

.profile-theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

    .profile-theme-btn:hover {
        border-color: var(--primary);
        color: var(--text);
    }

    .profile-theme-btn.active {
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 600;
    }

    .profile-theme-btn span {
        font-size: 1rem;
    }

/* ── Footer Logo ──────────────────────────────────────────── */
.footer-logo-wrap {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer-brand-logo {
    height: 58px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .footer-brand-logo {
        height: 40px;
    }
}

/*.footer-logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0F0D1F;
    letter-spacing: -0.5px;
}

    .footer-logo-text span {
        color: var(--primary);
    }*/

/* ── Footer Social Sign-in ────────────────────────────────── */
.footer-signin-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0 0.5rem;
}

.footer-signin-icons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

    .footer-signin-btn:hover {
        border-color: var(--primary);
        background: var(--surface-2);
        transform: translateY(-2px);
    }

/* ── Blog Page ────────────────────────────────────────────── */
.blog-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

    .blog-header h1 {
        font-size: 2rem;
        font-weight: 800;
        color: var(--text);
        margin-bottom: 0.75rem;
    }

.blog-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
}

    .blog-card:hover {
        border-color: var(--primary);
        box-shadow: 0 4px 16px rgba(34, 80, 244, 0.08);
        transform: translateY(-2px);
    }

.blog-card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    width: fit-content;
}

.blog-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
}

.blog-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* ── Blog Article Page ────────────────────────────────────── */
.blog-article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.blog-article-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-back-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    transition: var(--transition);
}

    .blog-back-link:hover {
        color: var(--primary);
    }

.blog-article-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.blog-article-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 0.75rem;
}

.blog-article-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Article body */
.blog-article-body {
    line-height: 1.75;
}

.blog-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.blog-article-body h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 2rem 0 0.75rem;
}

.blog-article-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.blog-article-body ul,
.blog-article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-article-body li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.65;
}

.blog-article-body a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

    .blog-article-body a:hover {
        text-decoration: underline;
    }

.blog-article-body strong {
    color: var(--text);
    font-weight: 600;
}

/* CTA box */
.blog-cta-box {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

    .blog-cta-box h3 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.5rem;
    }

    .blog-cta-box p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-bottom: 1rem;
    }

/* Related articles */
.blog-related {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

    .blog-related h3 {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.75rem;
    }

.blog-related-link {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.4rem 0;
    transition: var(--transition);
}

    .blog-related-link:hover {
        text-decoration: underline;
    }

/* Responsive */
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-article-header h1 {
        font-size: 1.4rem;
    }
}

.theme-toggle-switch {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.theme-toggle-track {
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 11px;
    position: relative;
    transition: background 0.2s ease;
}

.theme-toggle-switch.active .theme-toggle-track {
    background: var(--primary);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
}

.theme-toggle-switch.active .theme-toggle-thumb {
    transform: translateX(18px);
    color: var(--primary);
}

.ai-usage-meter {
    margin-top: 1rem;
    padding: 0.85rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.ai-usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ai-usage-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ai-usage-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
}

.ai-usage-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.ai-usage-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ai-usage-remaining {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ── Cloud Storage Pickers ────────────────────────────────── */
.cloud-picker-row {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.cloud-picker-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.cloud-picker-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cloud-picker-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

    .cloud-picker-btn:hover {
        border-color: var(--primary);
        color: var(--text);
        background: var(--primary-light);
    }

/* Prevent Google Picker iframe from causing layout shift */
div[id^="picker-dialog"],
div.picker-dialog,
.picker-dialog-bg {
    position: fixed !important;
}

.cloud-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.cloud-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem; /* more breathing room */
    padding: 0.75rem 1.1rem;
    border: 1px solid #d9def0;
    border-radius: 0.7rem;
    background: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

    .cloud-picker-btn:hover {
        border-color: #bfc8ea;
        box-shadow: 0 3px 10px rgba(20, 30, 60, 0.08);
        transform: translateY(-1px);
    }

/* ── Batch UI v2 ──────────────────────────────────────────── */
.batch-section {
    margin-bottom: 1.75rem;
}

.batch-section-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.batch-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.batch-file-count-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-2);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
}

/* Tool grid */
.batch-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
}

.batch-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    text-align: left;
}

    .batch-tool-btn:hover {
        border-color: var(--primary);
        color: var(--text);
        background: var(--primary-light);
    }

    .batch-tool-btn.active {
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 700;
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.batch-tool-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .batch-tool-icon svg {
        width: 16px;
        height: 16px;
    }

/* Drop zone */
.batch-drop-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    min-height: 180px;
    margin-bottom: 1rem;
}

    .batch-drop-zone:hover,
    .batch-drop-zone.dragging {
        border-color: var(--primary);
        background: var(--primary-light);
    }

/* File list v2 */
.batch-file-row-v2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    transition: var(--transition);
}

    .batch-file-row-v2:hover {
        border-color: var(--primary-mid);
        background: var(--primary-light);
    }

.batch-file-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.batch-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.batch-file-name-v2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-file-size-v2 {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Status chips */
.batch-status-chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-done {
    background: var(--success-light);
    color: var(--success);
}

.status-error {
    background: var(--error-light);
    color: var(--error);
}

.status-pending {
    background: var(--surface-2);
    color: var(--text-muted);
}

/* Processing spinner */
.batch-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* Result card */
.batch-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.batch-result-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.batch-result-info {
    flex: 1;
    min-width: 0;
}

    .batch-result-info h3 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--success-dark);
        margin-bottom: 0.25rem;
    }

    .batch-result-info p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin: 0;
    }

@media (max-width: 640px) {
    .batch-tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .batch-result-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ── AI Result Card ───────────────────────────────────────── */
.ai-result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-top: 1rem;
}

.ai-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

    .ai-result-header h2 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.25rem;
    }

/* Summary body */
.ai-summary-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 1.25rem;
    border-left: 3px solid var(--primary);
}

/* Chat file bar */
.chat-file-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.chat-file-bar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.chat-file-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-file-ready {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--success);
    background: var(--success-light);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Chat AI avatar */
.chat-ai-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Typing dots */
.chat-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    margin: 0 2px;
    animation: chatDot 1.2s ease-in-out infinite;
}

    .chat-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .chat-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes chatDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Suggested questions */
.chat-suggestions {
    margin-bottom: 1rem;
}

.chat-suggestions-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.chat-suggestion-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.875rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: var(--transition);
    line-height: 1.4;
}

    .chat-suggestion-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

/* Questions count selector */
.questions-count-section {
    margin: 1.25rem 0;
}

.questions-count-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.questions-count-grid {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.questions-count-btn {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .questions-count-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

    .questions-count-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: white;
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

/* Questions result list */
.questions-result-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

    .question-result-item:hover {
        border-color: var(--primary-mid);
        background: var(--primary-light);
    }

.question-result-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.question-result-text {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
    flex: 1;
}

@media (max-width: 640px) {
    .chat-suggestions-grid {
        grid-template-columns: 1fr;
    }

    .ai-result-header {
        flex-direction: column;
    }
}

/* ── Extract Spreadsheet Preview ──────────────────────────── */
.extract-confidence-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.extract-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--success);
    background: var(--success-light);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

.extract-type-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.extract-spreadsheet-wrap {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.extract-spreadsheet-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: #F0FDF4;
    border-bottom: 1px solid #D1FAE5;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--success-dark);
}

[data-theme="dark"] .extract-spreadsheet-header {
    background: #042F2E;
    border-bottom-color: #065F46;
}

.extract-spreadsheet-table-wrap {
    overflow-x: auto;
}

.extract-spreadsheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .extract-spreadsheet-table thead tr {
        background: #F8FAFC;
        border-bottom: 1px solid var(--border);
    }

[data-theme="dark"] .extract-spreadsheet-table thead tr {
    background: var(--surface-2);
}

.extract-sheet-col-a {
    width: 35%;
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-right: 1px solid var(--border);
}

.extract-sheet-col-b {
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extract-sheet-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s ease;
}

    .extract-sheet-row:last-child {
        border-bottom: none;
    }

    .extract-sheet-row:hover {
        background: var(--primary-light);
    }

.extract-sheet-label {
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-right: 1px solid var(--border);
    background: var(--surface-2);
    white-space: nowrap;
}

.extract-sheet-value {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 500;
}

.extract-sheet-total {
    font-weight: 700;
    color: var(--success-dark);
}

/* Download CTA bar */
.extract-download-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.extract-download-cta-text {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

    .extract-download-cta-text strong {
        font-size: 0.95rem;
        color: var(--text);
        display: block;
        margin-bottom: 0.2rem;
    }

    .extract-download-cta-text p {
        font-size: 0.8rem;
        color: var(--text-secondary);
        margin: 0;
    }

@media (max-width: 640px) {
    .extract-download-cta {
        flex-direction: column;
    }

        .extract-download-cta .download-button {
            max-width: 100% !important;
            width: 100%;
        }
}

/* ── AI PDF Assist Hub ───────────────────────────────────── */
.ai-hub-page {
    width: min(1320px, calc(100% - 64px));
    margin: 0 auto;
    padding: 56px 0 80px;
    color: var(--text);
}

.ai-hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
    gap: 48px;
    align-items: center;
    min-height: 560px;
}

.ai-hub-hero-copy h1 {
    margin: 0 0 18px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 5.4rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.ai-hub-hero-copy p {
    max-width: 720px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.75;
}

.ai-hub-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.ai-hub-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 750;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.ai-hub-trust-row span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
}

[data-theme="dark"] .ai-hub-trust-row span {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.18);
}

.ai-hub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.ai-hub-primary-cta,
.ai-hub-secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ai-hub-primary-cta {
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.26);
}

.ai-hub-secondary-cta {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
}

.ai-hub-primary-cta:hover,
.ai-hub-secondary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.2);
}

.ai-hub-animation {
    position: relative;
    min-height: 470px;
    border-radius: 34px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(109, 93, 252, 0.18), transparent 34%),
        radial-gradient(circle at 82% 16%, rgba(6, 182, 212, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.82), rgba(248,250,252,0.7));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    pointer-events: none;
}

[data-theme="dark"] .ai-hub-animation {
    background:
        radial-gradient(circle at 20% 20%, rgba(109, 93, 252, 0.26), transparent 34%),
        radial-gradient(circle at 82% 16%, rgba(6, 182, 212, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.52));
    border-color: rgba(148, 163, 184, 0.18);
}

.ai-flow-line {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 49%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.36), rgba(6, 182, 212, 0.5), transparent);
}

.ai-flow-line::after {
    content: "";
    position: absolute;
    inset: -1px 75% -1px 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    animation: aiFlowShimmer 6s ease-in-out infinite;
}

.ai-flow-stage {
    position: absolute;
    z-index: 2;
}

.ai-flow-upload {
    left: 7%;
    top: 29%;
    width: 178px;
}

.ai-flow-brain {
    left: 36%;
    top: 22%;
    width: 240px;
}

.ai-flow-output {
    right: 7%;
    top: 18%;
    width: 210px;
}

.ai-flow-file,
.ai-workspace-panel,
.ai-output-card {
    border-radius: 22px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] .ai-flow-file,
[data-theme="dark"] .ai-workspace-panel,
[data-theme="dark"] .ai-output-card {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.2);
}

.ai-flow-file {
    padding: 18px;
    transform: rotate(-2deg);
    animation: aiFloatOne 6s ease-in-out infinite;
}

.ai-flow-file-top {
    width: 42px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
    position: relative;
}

.ai-flow-file-top::after {
    content: "PDF";
    position: absolute;
    left: 8px;
    bottom: 8px;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
}

.ai-flow-file strong,
.ai-output-card strong {
    display: block;
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.25;
}

.ai-flow-file span,
.ai-output-card span,
.ai-flow-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.ai-flow-file-lines {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.ai-flow-file-lines i {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
}

.ai-flow-file-lines i:nth-child(2) {
    width: 74%;
}

.ai-flow-file-lines i:nth-child(3) {
    width: 56%;
}

.ai-workspace-panel {
    padding: 18px;
    animation: aiFloatTwo 6s ease-in-out infinite;
}

.ai-workspace-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
}

.ai-workspace-header span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.ai-workflow-chip-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ai-workflow-chip {
    border-radius: 999px;
    padding: 8px 10px;
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    animation: aiChipCycle 10s ease-in-out infinite;
}

.chip-two { animation-delay: 2s; }
.chip-three { animation-delay: 4s; }
.chip-four { animation-delay: 6s; }
.chip-five { animation-delay: 8s; }

.ai-processing-bar {
    height: 10px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
}

.ai-processing-bar span {
    display: block;
    width: 48%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6d5dfc, #06b6d4);
    animation: aiProgress 6s ease-in-out infinite;
}

.ai-output-stack {
    display: grid;
    gap: 10px;
}

.ai-output-card {
    padding: 12px 14px;
    animation: aiOutputCycle 10s ease-in-out infinite;
}

.output-two { animation-delay: 2s; }
.output-three { animation-delay: 4s; }
.output-four { animation-delay: 6s; }
.output-five { animation-delay: 8s; }

.ai-flow-label {
    margin-top: 12px;
    text-align: center;
    font-weight: 800;
}

.ai-hub-section,
.ai-hub-privacy,
.ai-hub-final-cta {
    margin-top: 56px;
}

.ai-hub-section-header {
    max-width: 760px;
    margin-bottom: 24px;
}

.ai-hub-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-hub-section-header h2,
.ai-hub-privacy h2,
.ai-hub-final-cta h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.ai-hub-section-header p,
.ai-hub-privacy p,
.ai-hub-final-cta p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.ai-hub-page .ai-hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.ai-hub-page .ai-hub-card {
    min-height: 260px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

[data-theme="dark"] .ai-hub-page .ai-hub-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

.ai-hub-page .ai-hub-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: 0 26px 58px rgba(37, 99, 235, 0.14);
}

.ai-hub-page .ai-hub-featured {
    background:
        linear-gradient(135deg, rgba(109, 93, 252, 0.12), rgba(6, 182, 212, 0.1)),
        rgba(255,255,255,0.82);
}

[data-theme="dark"] .ai-hub-page .ai-hub-featured {
    background:
        linear-gradient(135deg, rgba(109, 93, 252, 0.18), rgba(6, 182, 212, 0.12)),
        rgba(15, 23, 42, 0.76);
}

.ai-hub-page .ai-hub-icon-tile {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--brand-primary);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.14), rgba(6, 182, 212, 0.12)) !important;
    margin-bottom: 18px;
}

.ai-hub-page .ai-hub-icon-tile svg {
    width: 24px;
    height: 24px;
}

.ai-hub-page .ai-hub-name {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 850;
}

.ai-hub-page .ai-hub-desc {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.ai-hub-page .ai-hub-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 22px;
    color: var(--brand-primary);
    font-size: 0.86rem;
    font-weight: 850;
}

.ai-hub-page .ai-hub-arrow {
    transition: transform 0.18s ease;
}

.ai-hub-page .ai-hub-card:hover .ai-hub-arrow {
    transform: translateX(4px);
}

.ai-hub-privacy {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 32px;
    align-items: start;
    padding: 34px;
    border-radius: 28px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .ai-hub-privacy {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

.ai-hub-privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ai-hub-privacy-grid div {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.ai-hub-privacy-grid strong,
.ai-hub-privacy-grid span {
    display: block;
}

.ai-hub-privacy-grid strong {
    color: var(--text);
    margin-bottom: 6px;
}

.ai-hub-privacy-grid span {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.ai-hub-final-cta {
    padding: 42px;
    border-radius: 30px;
    text-align: center;
    background:
        radial-gradient(circle at 20% 10%, rgba(109, 93, 252, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.82), rgba(238,245,255,0.76));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .ai-hub-final-cta {
    background:
        radial-gradient(circle at 20% 10%, rgba(109, 93, 252, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.58));
    border-color: rgba(148, 163, 184, 0.18);
}

.ai-hub-final-cta .ai-hub-hero-actions {
    justify-content: center;
}

@keyframes aiFlowShimmer {
    0%, 18% { transform: translateX(0); opacity: 0; }
    35%, 65% { opacity: 1; }
    100% { transform: translateX(420%); opacity: 0; }
}

@keyframes aiChipCycle {
    0%, 18%, 100% {
        color: var(--text-secondary);
        background: var(--surface-2);
        box-shadow: none;
    }
    8%, 13% {
        color: #fff;
        background: linear-gradient(135deg, #6d5dfc, #2563eb);
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    }
}

@keyframes aiOutputCycle {
    0%, 18%, 100% { transform: translateX(0); opacity: 0.74; }
    8%, 13% { transform: translateX(-8px); opacity: 1; }
}

@keyframes aiProgress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(70%); }
    100% { transform: translateX(210%); }
}

@keyframes aiFloatOne {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes aiFloatTwo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
    .ai-hub-animation *,
    .ai-hub-animation *::after {
        animation: none !important;
    }
}

@media (max-width: 1100px) {
    .ai-hub-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .ai-hub-animation {
        min-height: 430px;
    }

    .ai-hub-page .ai-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ai-hub-page {
        width: min(100%, calc(100% - 24px));
        padding: 32px 0 56px;
    }

    .ai-hub-hero-copy h1 {
        font-size: clamp(2.45rem, 11vw, 3.5rem);
    }

    .ai-hub-animation {
        min-height: 620px;
    }

    .ai-flow-line {
        left: 50%;
        right: auto;
        top: 11%;
        bottom: 11%;
        width: 2px;
        height: auto;
    }

    .ai-flow-line::after {
        inset: 0 -1px 80% -1px;
        animation: aiFlowShimmerMobile 6s ease-in-out infinite;
    }

    .ai-flow-upload,
    .ai-flow-brain,
    .ai-flow-output {
        left: 50%;
        right: auto;
        width: min(82%, 260px);
        transform: translateX(-50%);
    }

    .ai-flow-upload {
        top: 7%;
    }

    .ai-flow-brain {
        top: 37%;
    }

    .ai-flow-output {
        top: 64%;
    }

    .ai-hub-page .ai-hub-grid,
    .ai-hub-privacy,
    .ai-hub-privacy-grid {
        grid-template-columns: 1fr;
    }

    .ai-hub-privacy,
    .ai-hub-final-cta {
        padding: 24px;
        border-radius: 24px;
    }
}

@keyframes aiFlowShimmerMobile {
    0%, 18% { transform: translateY(0); opacity: 0; }
    35%, 65% { opacity: 1; }
    100% { transform: translateY(420%); opacity: 0; }
}

/* ── Shared Premium AI Tool Layout ───────────────────────── */
.ai-tool-page {
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 48px 0 72px;
}

.ai-tool-container {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
    margin: 0 auto;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.ai-tool-hero {
    width: 100%;
    max-width: none;
    margin-bottom: 24px;
    text-align: left;
}

.ai-tool-hero h1 {
    max-width: 980px;
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.ai-tool-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.ai-tool-stepper {
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .ai-tool-stepper {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

.ai-tool-stepper .stepper-step {
    min-width: 0;
    border-radius: 999px;
}

.ai-tool-workflow {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
    gap: 32px;
    align-items: start;
}

.ai-tool-workspace,
.ai-tool-settings {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: var(--panel-padding-lg);
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    box-sizing: border-box;
}

.ai-tool-settings {
    position: sticky;
    top: 96px;
}

.ai-tool-card-header {
    margin-bottom: 22px;
}

.ai-tool-card-header > span,
.ai-tool-result-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-tool-card-header h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ai-tool-card-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.ai-tool-primary-cta {
    margin-top: 22px;
}

.ai-tool-processing {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 22px;
    background: var(--surface-2);
}

.ai-tool-result-card {
    margin: 0;
    border-radius: 22px;
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.ai-tool-settings .free-uses-banner {
    margin: 0 0 22px;
    align-items: flex-start;
    text-align: left;
}

.ai-tool-settings .questions-count-section,
.ai-tool-settings .rewrite-section {
    margin: 0 0 24px;
}

.ai-tool-settings .questions-count-label,
.ai-tool-settings .rewrite-section-label {
    text-align: left;
}

.ai-tool-settings .rewrite-tone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-tool-settings .rewrite-tone-btn {
    min-width: 0;
}

.ai-tool-settings .rewrite-textarea {
    width: 100%;
    max-width: none;
}

.ai-tool-guidance-card {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.1), rgba(6, 182, 212, 0.1));
    padding: 20px;
}

.ai-tool-guidance-card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.ai-tool-guidance-card p {
    margin: 0 0 14px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.ai-tool-guidance-list {
    display: grid;
    gap: 10px;
}

.ai-tool-guidance-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.ai-tool-guidance-list span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    flex: 0 0 auto;
}

.ai-tool-page .error-container {
    margin: 0;
}

.review-contract-results-card {
    margin: 0;
}

.review-contract-results-card .review-header {
    margin-bottom: 1.5rem;
}

.review-contract-settings .free-uses-banner {
    margin-bottom: 22px;
}

.review-contract-checks {
    margin-bottom: 16px;
}

.review-contract-note {
    padding: 18px 20px;
    border-radius: 18px;
    color: var(--text-secondary);
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.9rem;
    line-height: 1.6;
}

.chat-ai-workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 540px;
}

.chat-ai-workspace .chat-file-bar {
    margin: 0;
    border-radius: 18px;
    background: var(--surface-2);
}

.chat-ai-workspace .chat-history {
    min-height: 360px;
    max-height: 560px;
    margin: 0;
    padding: 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.08), transparent 32%),
        var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.chat-ai-workspace .chat-suggestions {
    margin: 0;
    padding: 22px;
    border-radius: 22px;
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.chat-ai-workspace .chat-suggestions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-ai-workspace .chat-input-row {
    margin-top: auto;
    padding: 12px;
    border-radius: 22px;
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.chat-ai-workspace .chat-input {
    min-height: 48px;
    background: var(--surface);
    border-color: rgba(148, 163, 184, 0.28);
}

.chat-ai-settings .free-uses-banner {
    margin-bottom: 22px;
}

.chat-ai-value-card {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    color: var(--text-secondary);
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.9rem;
    line-height: 1.6;
}

[data-theme="dark"] .ai-tool-workspace,
[data-theme="dark"] .ai-tool-settings {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .ai-tool-processing,
[data-theme="dark"] .ai-tool-result-card {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .ai-tool-guidance-card {
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.16), rgba(6, 182, 212, 0.12));
}

[data-theme="dark"] .review-contract-note {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .chat-ai-workspace .chat-file-bar,
[data-theme="dark"] .chat-ai-workspace .chat-history,
[data-theme="dark"] .chat-ai-workspace .chat-suggestions,
[data-theme="dark"] .chat-ai-workspace .chat-input-row,
[data-theme="dark"] .chat-ai-value-card {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .chat-ai-workspace .chat-input {
    background: rgba(15, 23, 42, 0.74);
    border-color: rgba(148, 163, 184, 0.24);
}

@media (max-width: 980px) {
    .ai-tool-workflow {
        grid-template-columns: 1fr;
    }

    .ai-tool-settings {
        position: static;
    }
}

@media (max-width: 640px) {
    .ai-tool-page {
        padding: 28px 0 48px;
    }

    .ai-tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .ai-tool-stepper {
        grid-template-columns: 1fr 1fr;
        border-radius: 22px;
    }

    .ai-tool-workflow {
        gap: 20px;
    }

    .ai-tool-workspace,
    .ai-tool-settings {
        padding: var(--panel-padding-mobile);
        border-radius: 20px;
    }

    .ai-tool-settings .rewrite-tone-grid {
        grid-template-columns: 1fr;
    }

    .chat-ai-workspace .chat-suggestions-grid {
        grid-template-columns: 1fr;
    }

    .chat-ai-workspace .chat-history {
        max-height: 460px;
    }
}

/* ── Extract Invoice Data Premium Layout ─────────────────── */
.extract-invoice-tool-page {
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 48px 0 72px;
}

.extract-invoice-container {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
    margin: 0 auto;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.extract-invoice-hero {
    width: 100%;
    max-width: none;
    margin-bottom: 24px;
    text-align: left;
}

.extract-invoice-hero h1 {
    max-width: 900px;
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 14px;
}

.extract-invoice-hero p {
    max-width: 760px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.extract-invoice-stepper {
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .extract-invoice-stepper {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

.extract-invoice-stepper .stepper-step {
    min-width: 0;
    border-radius: 999px;
}

.extract-invoice-workflow {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
    gap: 32px;
    align-items: start;
}

.extract-invoice-workspace,
.extract-invoice-settings {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: var(--panel-padding-lg);
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    box-sizing: border-box;
}

.extract-invoice-settings {
    position: sticky;
    top: 96px;
}

.extract-workspace-header,
.extract-settings-header {
    margin-bottom: 22px;
}

.extract-workspace-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.extract-workspace-header h2,
.extract-settings-header h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.extract-workspace-header p,
.extract-settings-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.extract-primary-cta {
    margin-top: 22px;
}

.extract-invoice-settings .free-uses-banner {
    margin: 0 0 22px;
    align-items: flex-start;
    text-align: left;
}

.extract-invoice-settings .extract-type-section {
    margin: 0 0 24px;
}

.extract-invoice-settings .extract-type-label {
    text-align: left;
}

.extract-invoice-settings .extract-type-grid {
    grid-template-columns: 1fr;
}

.extract-invoice-settings .extract-type-btn {
    align-items: flex-start;
    text-align: left;
    padding: 1rem;
}

.extract-invoice-settings .extract-type-icon {
    font-size: 1.35rem;
}

.extract-explainer-card,
.extract-guidance-card {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: var(--surface-2);
    padding: 20px;
}

.extract-explainer-card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.extract-explainer-card p,
.extract-guidance-card {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.extract-explainer-card p {
    margin: 0 0 14px;
}

.extract-explainer-list {
    display: grid;
    gap: 10px;
}

.extract-explainer-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.extract-explainer-list span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    flex: 0 0 auto;
}

.extract-guidance-card {
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.1), rgba(6, 182, 212, 0.1));
}

.extract-results-card {
    margin-top: 0;
}

.extract-results-card .extract-results {
    margin-top: 0;
}

.extract-processing-card {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 22px;
    background: var(--surface-2);
}

.extract-invoice-tool-page .error-container {
    margin: 0;
}

[data-theme="dark"] .extract-invoice-workspace,
[data-theme="dark"] .extract-invoice-settings {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .extract-explainer-card,
[data-theme="dark"] .extract-processing-card {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .extract-guidance-card {
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.16), rgba(6, 182, 212, 0.12));
}

@media (max-width: 980px) {
    .extract-invoice-workflow {
        grid-template-columns: 1fr;
    }

    .extract-invoice-settings {
        position: static;
    }
}

@media (max-width: 640px) {
    .extract-invoice-tool-page {
        padding: 28px 0 48px;
    }

    .extract-invoice-container {
        width: min(100%, calc(100% - 24px));
    }

    .extract-invoice-stepper {
        grid-template-columns: 1fr 1fr;
        border-radius: 22px;
    }

    .extract-invoice-workflow {
        gap: 20px;
    }

    .extract-invoice-workspace,
    .extract-invoice-settings {
        padding: var(--panel-padding-mobile);
        border-radius: 20px;
    }
}

/* ── Translate Tool ───────────────────────────────────────── */
.translate-lang-section {
    margin: 1.25rem 0;
}

.translate-lang-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.translate-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.translate-lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    text-align: left;
}

    .translate-lang-btn:hover {
        border-color: var(--primary);
        color: var(--text);
        background: var(--primary-light);
    }

    .translate-lang-btn.active {
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 700;
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.translate-lang-flag {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.translate-lang-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.translate-custom-wrap {
    margin-top: 0.75rem;
}

/* Translation preview */
.translate-preview {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 0;
}

.translate-preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.translate-preview-body {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 640px) {
    .translate-lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Pricing Toggle ───────────────────────────────────────── */
.pricing-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pricing-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .pricing-toggle-label.active {
        color: var(--text);
        font-weight: 700;
    }

.pricing-toggle {
    all: unset;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border);
    cursor: pointer;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    transition: background 0.25s ease;
    box-sizing: border-box;
}


    .pricing-toggle.on {
        background: var(--primary);
    }

.pricing-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform 0.25s ease;
    display: block;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pricing-toggle.on .pricing-toggle-thumb {
    transform: translateX(20px);
}

.pricing-save-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    background: var(--success-light);
    color: var(--success);
    border-radius: 20px;
    white-space: nowrap;
}

/* Pricing price display */
.pricing-price-old {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 0.25rem;
    font-weight: 400;
}

.pricing-price-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
}

.pricing-billed-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Competitor comparison bar */
.pricing-vs-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 2rem auto;
    max-width: 860px;
}

.pricing-vs-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.pricing-vs-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
}

.pricing-vs-items {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.pricing-vs-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pricing-vs-them {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pricing-vs-price-them {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: line-through;
}

.pricing-vs-sep {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pricing-vs-us {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.pricing-vs-price-us {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-vs-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
}

.pricing-vs-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .pricing-vs-items {
        flex-direction: column;
        align-items: flex-start;
    }

    .pricing-vs-divider {
        width: 100%;
        height: 1px;
    }
}

/* ── AI Rewrite Tool ──────────────────────────────────────── */
.rewrite-section {
    margin: 1.25rem 0;
}

.rewrite-section-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.rewrite-tone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rewrite-tone-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.65rem 0.75rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    text-align: left;
}

    .rewrite-tone-btn:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

    .rewrite-tone-btn.active {
        border-color: var(--primary);
        background: var(--primary-light);
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.rewrite-tone-icon {
    font-size: 1.1rem;
}

.rewrite-tone-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.rewrite-tone-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.rewrite-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.rewrite-suggestion-btn {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

    .rewrite-suggestion-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

.rewrite-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    resize: vertical;
    transition: var(--transition);
    line-height: 1.6;
}

    .rewrite-textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.rewrite-char-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

/* Before / After tabs */
.rewrite-compare-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}

.rewrite-compare-tab {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    margin-bottom: -1px;
}

    .rewrite-compare-tab:hover {
        color: var(--text);
    }

    .rewrite-compare-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 600;
    }

@media (max-width: 640px) {
    .rewrite-tone-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Contract Risk Score Card ─────────────────────────────── */
.risk-score-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.75rem;
    border: 1.5px solid;
    flex-wrap: wrap;
}

    .risk-score-card.risk-score-low {
        background: #F0FDF4;
        border-color: #86EFAC;
    }

    .risk-score-card.risk-score-medium {
        background: #FFFBEB;
        border-color: #FCD34D;
    }

    .risk-score-card.risk-score-high {
        background: #FFF1F2;
        border-color: #FCA5A5;
    }

[data-theme="dark"] .risk-score-card.risk-score-low {
    background: #052E16;
    border-color: #166534;
}

[data-theme="dark"] .risk-score-card.risk-score-medium {
    background: #1C1500;
    border-color: #854D0E;
}

[data-theme="dark"] .risk-score-card.risk-score-high {
    background: #1C0000;
    border-color: #991B1B;
}

.risk-score-left {
    flex: 1;
    min-width: 200px;
}

.risk-score-meter {
    width: 100%;
}

.risk-score-track {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #22C55E 0%, #EAB308 50%, #EF4444 100%);
    position: relative;
    margin-bottom: 6px;
}

.risk-score-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2.5px solid;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.risk-marker-low {
    left: 16.5%;
    border-color: #16A34A;
}

.risk-marker-medium {
    left: 50%;
    border-color: #D97706;
}

.risk-marker-high {
    left: 83.5%;
    border-color: #DC2626;
}

.risk-score-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
}

.risk-score-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.risk-score-badge {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.35rem 0.875rem;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.risk-badge-low {
    background: #DCFCE7;
    color: #14532D;
}

.risk-badge-medium {
    background: #FEF3C7;
    color: #78350F;
}

.risk-badge-high {
    background: #FEE2E2;
    color: #7F1D1D;
}

[data-theme="dark"] .risk-badge-low {
    background: #166534;
    color: #DCFCE7;
}

[data-theme="dark"] .risk-badge-medium {
    background: #78350F;
    color: #FEF3C7;
}

[data-theme="dark"] .risk-badge-high {
    background: #7F1D1D;
    color: #FEE2E2;
}

.risk-score-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    max-width: 240px;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 640px) {
    .risk-score-card {
        flex-direction: column;
    }

    .risk-score-right {
        align-items: flex-start;
        width: 100%;
    }

    .risk-score-desc {
        text-align: left;
        max-width: 100%;
    }
}

/* ── Rewrite format selector ──────────────────────────────── */
.rewrite-format-select {
    position: relative;
}

.rewrite-format-dropdown {
    appearance: none;
    padding: 0.55rem 2rem 0.55rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    transition: var(--transition);
}

    .rewrite-format-dropdown:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

    .rewrite-format-dropdown:hover {
        border-color: var(--primary);
    }

/* ── AI Hub Page ──────────────────────────────────────────── */
.ai-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ai-hub-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

    .ai-hub-card:hover {
        border-color: var(--primary);
        box-shadow: 0 4px 16px rgba(124,58,237,0.1);
        transform: translateY(-2px);
    }

.ai-hub-featured {
    border-color: var(--primary);
    background: var(--primary-light);
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
}

    .ai-hub-featured:hover {
        box-shadow: 0 4px 20px rgba(124,58,237,0.15);
    }

    .ai-hub-featured .ai-hub-content {
        flex: 1;
    }

.ai-hub-icon-tile {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ai-hub-icon-tile svg {
        width: 24px;
        height: 24px;
    }

.ai-hub-content {
    flex: 1;
}

.ai-hub-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.ai-hub-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ai-hub-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.ai-hub-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    border: 0.5px solid var(--primary-mid);
}

.ai-hub-arrow {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
    transition: transform 0.15s ease;
}

.ai-hub-card:hover .ai-hub-arrow {
    transform: translateX(4px);
}

/* Claude callout */
.ai-hub-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    flex-wrap: wrap;
}

.ai-hub-callout-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.ai-hub-callout-text {
    flex: 1;
    min-width: 200px;
}

    .ai-hub-callout-text strong {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text);
        display: block;
        margin-bottom: 0.2rem;
    }

    .ai-hub-callout-text p {
        font-size: 0.8rem;
        color: var(--text-secondary);
        margin: 0;
        line-height: 1.5;
    }

@media (max-width: 640px) {
    .ai-hub-featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .ai-hub-grid {
        grid-template-columns: 1fr;
    }

    .ai-hub-callout {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── OCR Tool ─────────────────────────────────────────────── */
.ocr-lang-section {
    margin-bottom: 1.5rem;
}

.ocr-lang-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.ocr-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}

.ocr-lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .ocr-lang-btn:hover {
        border-color: var(--primary);
        color: var(--text);
        background: var(--primary-light);
    }

    .ocr-lang-btn.active {
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 700;
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.ocr-lang-flag {
    font-size: 1rem;
    flex-shrink: 0;
}

.ocr-lang-name {
    flex: 1;
    text-align: left;
}

/* OCR result features */
.ocr-result-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: var(--surface-2);
    border-radius: var(--radius);
}

.ocr-result-feat {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.ocr-result-feat-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.ocr-result-feat strong {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 0.2rem;
}

.ocr-result-feat p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .ocr-result-features {
        grid-template-columns: 1fr;
    }

    .ocr-lang-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── PDF OCR Premium Layout ──────────────────────────────── */
.ocr-tool-page {
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 48px 0 72px;
}

.ocr-tool-container {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
    margin: 0 auto;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.ocr-tool-hero {
    width: 100%;
    max-width: none;
    margin-bottom: 24px;
    text-align: left;
}

.ocr-tool-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.ocr-tool-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.ocr-tool-stepper {
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .ocr-tool-stepper {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

.ocr-tool-stepper .stepper-step {
    min-width: 0;
    border-radius: 999px;
}

.ocr-tool-workflow {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
    gap: 32px;
    align-items: start;
}

.ocr-tool-workspace,
.ocr-tool-settings {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: var(--panel-padding-lg);
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    box-sizing: border-box;
}

.ocr-tool-settings {
    position: sticky;
    top: 96px;
}

.ocr-workspace-header,
.ocr-settings-header {
    margin-bottom: 22px;
}

.ocr-workspace-header > span,
.ocr-settings-header > span,
.ocr-result-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ocr-workspace-header h2,
.ocr-settings-header h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ocr-workspace-header p,
.ocr-settings-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.ocr-primary-cta {
    margin-top: 22px;
}

.ocr-processing-card {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 22px;
    background: var(--surface-2);
}

.ocr-result-card {
    margin: 0;
    border-radius: 22px;
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.ocr-tool-settings .ocr-lang-section {
    margin: 0 0 24px;
}

.ocr-tool-settings .ocr-lang-label {
    text-align: left;
}

.ocr-tool-settings .ocr-lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ocr-tool-page .faq-section {
    max-width: min(1320px, calc(100% - 64px));
    margin: 3rem auto 4rem;
}

.ocr-pro-unlocked {
    padding: .85rem 1rem;
    border-radius: 14px;
    background: rgba(16,185,129,.12);
    color: #047857;
    font-weight: 900;
    font-size: .9rem;
    margin-bottom: .75rem;
}

/* PDF Scanner coming soon page */
.scanner-coming-page {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 72px);
    padding: 56px 0 76px;
    background:
        radial-gradient(circle at 10% 8%, rgba(109, 93, 252, .16), transparent 34%),
        radial-gradient(circle at 92% 18%, rgba(6, 182, 212, .14), transparent 32%),
        linear-gradient(135deg, rgba(248, 250, 252, .96), rgba(241, 245, 249, .88));
    color: var(--text, #111827);
}

.scanner-coming-hero,
.scanner-feature-section {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
}

.scanner-coming-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    align-items: center;
    gap: 48px;
    padding: 48px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 32px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .1);
    backdrop-filter: blur(18px);
}

.scanner-coming-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 999px;
    background: rgba(99, 102, 241, .08);
    color: var(--brand-primary, #4f46e5);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.scanner-coming-copy h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--text, #111827);
    font-family: var(--font-heading, inherit);
    font-size: clamp(2.75rem, 5vw, 5.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: .98;
}

.scanner-coming-copy p {
    max-width: 620px;
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 1.12rem;
    line-height: 1.75;
}

.scanner-coming-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.scanner-coming-primary,
.scanner-coming-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 850;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.scanner-coming-primary {
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 18px 36px rgba(37, 99, 235, .26);
}

.scanner-coming-secondary {
    border: 1px solid rgba(148, 163, 184, .32);
    background: rgba(255, 255, 255, .74);
    color: var(--text, #111827);
}

.scanner-coming-primary:hover,
.scanner-coming-secondary:hover {
    transform: translateY(-2px);
}

.scanner-coming-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 640px;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid rgba(6, 182, 212, .2);
    border-radius: 18px;
    background: rgba(236, 254, 255, .72);
    color: var(--text-secondary, #475569);
    line-height: 1.55;
}

.scanner-coming-note strong {
    color: var(--text, #111827);
}

.scanner-coming-visual {
    display: flex;
    justify-content: center;
}

.scanner-phone-shell {
    position: relative;
    width: min(100%, 310px);
    aspect-ratio: 9 / 16;
    padding: 24px 20px;
    border: 1px solid rgba(99, 102, 241, .22);
    border-radius: 38px;
    background: linear-gradient(160deg, rgba(255,255,255,.94), rgba(238,242,255,.88));
    box-shadow: 0 28px 70px rgba(15, 23, 42, .16);
    overflow: hidden;
}

.scanner-phone-top,
.scanner-phone-action {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, .16);
}

.scanner-phone-top {
    top: 12px;
    width: 72px;
    height: 6px;
    border-radius: 999px;
}

.scanner-phone-action {
    bottom: 14px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, .88);
}

.scanner-doc-frame {
    position: absolute;
    inset: 74px 42px 86px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(79, 70, 229, .12), rgba(6, 182, 212, .1));
}

.scanner-doc-sheet {
    width: 76%;
    height: 82%;
    padding: 22px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.scanner-doc-sheet span {
    display: block;
    height: 9px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, .26), rgba(6, 182, 212, .18));
}

.scanner-doc-sheet span:nth-child(2) {
    width: 78%;
}

.scanner-doc-sheet span:nth-child(3) {
    width: 58%;
}

.scanner-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #2563eb;
}

.scanner-corner-tl {
    top: 18px;
    left: 18px;
    border-top: 3px solid;
    border-left: 3px solid;
}

.scanner-corner-tr {
    top: 18px;
    right: 18px;
    border-top: 3px solid;
    border-right: 3px solid;
}

.scanner-corner-bl {
    bottom: 18px;
    left: 18px;
    border-bottom: 3px solid;
    border-left: 3px solid;
}

.scanner-corner-br {
    right: 18px;
    bottom: 18px;
    border-right: 3px solid;
    border-bottom: 3px solid;
}

.scanner-scan-line {
    position: absolute;
    left: 34px;
    right: 34px;
    top: 38%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, .9), transparent);
    box-shadow: 0 0 24px rgba(6, 182, 212, .55);
}

.scanner-feature-section {
    margin-top: 44px;
}

.scanner-section-header {
    max-width: 760px;
    margin-bottom: 24px;
}

.scanner-section-header h2 {
    margin: 0 0 10px;
    color: var(--text, #111827);
    font-family: var(--font-heading, inherit);
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.scanner-section-header p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 1rem;
    line-height: 1.7;
}

.scanner-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.scanner-feature-card {
    min-height: 230px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 24px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.scanner-feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(109, 93, 252, .14), rgba(6, 182, 212, .12));
    color: var(--brand-primary, #4f46e5);
}

.scanner-feature-icon svg {
    width: 22px;
    height: 22px;
}

.scanner-feature-card h3 {
    margin: 0 0 10px;
    color: var(--text, #111827);
    font-family: var(--font-heading, inherit);
    font-size: 1.05rem;
    line-height: 1.25;
}

.scanner-feature-card p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: .93rem;
    line-height: 1.65;
}

[data-theme="dark"] .scanner-coming-page {
    background:
        radial-gradient(circle at 10% 8%, rgba(109, 93, 252, .22), transparent 34%),
        radial-gradient(circle at 92% 18%, rgba(6, 182, 212, .16), transparent 32%),
        linear-gradient(135deg, rgba(8, 10, 22, .98), rgba(15, 23, 42, .96));
}

[data-theme="dark"] .scanner-coming-hero,
[data-theme="dark"] .scanner-feature-card {
    border-color: rgba(255, 255, 255, .1);
    background: linear-gradient(145deg, rgba(28, 25, 41, .86), rgba(15, 23, 42, .72));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

[data-theme="dark"] .scanner-coming-secondary {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(15, 23, 42, .7);
    color: var(--text, #f8fafc);
}

[data-theme="dark"] .scanner-coming-note {
    border-color: rgba(6, 182, 212, .2);
    background: rgba(8, 47, 73, .36);
}

[data-theme="dark"] .scanner-phone-shell {
    border-color: rgba(255, 255, 255, .12);
    background: linear-gradient(160deg, rgba(30, 41, 59, .94), rgba(15, 23, 42, .9));
}

@media (max-width: 980px) {
    .scanner-coming-page {
        padding: 36px 0 60px;
    }

    .scanner-coming-hero {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .scanner-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .scanner-coming-hero,
    .scanner-feature-section {
        width: min(100%, calc(100% - 32px));
    }

    .scanner-coming-hero {
        padding: 24px;
        border-radius: 24px;
    }

    .scanner-coming-copy h1 {
        font-size: clamp(2.25rem, 12vw, 3.4rem);
    }

    .scanner-coming-primary,
    .scanner-coming-secondary {
        width: 100%;
    }

    .scanner-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Compare PDF Premium Layout ──────────────────────────── */
.compare-tool-page {
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 48px 0 72px;
}

.compare-tool-container {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
    margin: 0 auto;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.compare-tool-hero {
    width: 100%;
    max-width: none;
    margin-bottom: 24px;
    text-align: left;
}

.compare-tool-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.compare-tool-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.compare-tool-stepper {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center;
    gap: 12px;
    width: 100% !important;
    max-width: none;
    margin: 0 0 24px !important;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .compare-tool-stepper {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

.compare-tool-stepper .stepper-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.compare-tool-stepper .stepper-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.1);
    font-size: 0.76rem;
    font-weight: 900;
    flex: 0 0 auto;
}

.compare-tool-stepper .stepper-step.active {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.compare-tool-stepper .stepper-step.active span {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

.compare-tool-workflow {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
    gap: 32px;
    align-items: start;
}

.compare-tool-workspace,
.compare-tool-settings {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: var(--panel-padding-lg);
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    box-sizing: border-box;
}

.compare-tool-settings {
    position: sticky;
    top: 96px;
}

.compare-workspace-header,
.compare-settings-header {
    margin-bottom: 22px;
}

.compare-workspace-header > span,
.compare-settings-header > span,
.compare-result-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compare-workspace-header h2,
.compare-settings-header h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.compare-workspace-header p,
.compare-settings-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.compare-tool-page .compare-grid {
    margin: 0;
}

.compare-result-card {
    border-radius: 22px;
    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.compare-guidance-card,
.compare-tip-card {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.1), rgba(6, 182, 212, 0.1));
    padding: 20px;
}

.compare-guidance-card h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.compare-guidance-list {
    display: grid;
    gap: 10px;
}

.compare-guidance-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.compare-guidance-list span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    flex: 0 0 auto;
}

.compare-tip-card {
    margin-top: 16px;
    background: var(--surface-2);
}

.compare-tip-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.compare-tip-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

[data-theme="dark"] .compare-tool-workspace,
[data-theme="dark"] .compare-tool-settings {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .compare-result-card,
[data-theme="dark"] .compare-tip-card {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .compare-guidance-card {
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.16), rgba(6, 182, 212, 0.12));
}

@media (max-width: 980px) {
    .compare-tool-workflow {
        grid-template-columns: 1fr;
    }

    .compare-tool-settings {
        position: static;
    }
}

@media (max-width: 640px) {
    .compare-tool-page {
        padding: 28px 0 48px;
    }

    .compare-tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .compare-tool-stepper {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
        padding: 8px;
        border-radius: 22px;
    }

    .compare-tool-workflow {
        gap: 20px;
    }

    .compare-tool-workspace,
    .compare-tool-settings {
        padding: var(--panel-padding-mobile);
        border-radius: 20px;
    }
}

/* ── Premium AI Stepper Normalization ────────────────────── */
.ai-tool-stepper,
.extract-invoice-stepper,
.ocr-tool-stepper {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center;
    gap: 12px;
    width: 100% !important;
    max-width: none;
    margin: 0 0 24px !important;
    padding: 10px;
    border-radius: 999px;
}

.ai-tool-stepper .stepper-step,
.extract-invoice-stepper .stepper-step,
.ocr-tool-stepper .stepper-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

.ai-tool-stepper .stepper-step span,
.extract-invoice-stepper .stepper-step span,
.ocr-tool-stepper .stepper-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.1);
    font-size: 0.76rem;
    font-weight: 900;
    flex: 0 0 auto;
}

.ai-tool-stepper .stepper-step.active,
.extract-invoice-stepper .stepper-step.active,
.ocr-tool-stepper .stepper-step.active {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.ai-tool-stepper .stepper-step.active span,
.extract-invoice-stepper .stepper-step.active span,
.ocr-tool-stepper .stepper-step.active span {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

[data-theme="dark"] .ai-tool-stepper .stepper-step span,
[data-theme="dark"] .extract-invoice-stepper .stepper-step span,
[data-theme="dark"] .ocr-tool-stepper .stepper-step span {
    background: rgba(96, 165, 250, 0.16);
}

.ocr-value-card {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.1), rgba(6, 182, 212, 0.1));
    padding: 20px;
}

.ocr-value-card h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.ocr-value-list {
    display: grid;
    gap: 10px;
}

.ocr-value-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.ocr-value-list span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    flex: 0 0 auto;
}

.ocr-quality-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

[data-theme="dark"] .ocr-tool-workspace,
[data-theme="dark"] .ocr-tool-settings {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .ocr-processing-card,
[data-theme="dark"] .ocr-result-card {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .ocr-value-card {
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.16), rgba(6, 182, 212, 0.12));
}

@media (max-width: 980px) {
    .ocr-tool-workflow {
        grid-template-columns: 1fr;
    }

    .ocr-tool-settings {
        position: static;
    }
}

@media (max-width: 640px) {
    .ocr-tool-page {
        padding: 28px 0 48px;
    }

    .ocr-tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .ocr-tool-stepper {
        grid-template-columns: 1fr 1fr;
        border-radius: 22px;
    }

    .ocr-tool-workflow {
        gap: 20px;
    }

    .ocr-tool-workspace,
    .ocr-tool-settings {
        padding: var(--panel-padding-mobile);
        border-radius: 20px;
    }

    .ocr-tool-settings .ocr-lang-grid {
        grid-template-columns: 1fr;
    }

    .ai-tool-stepper,
    .extract-invoice-stepper,
    .ocr-tool-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        padding: 8px;
        border-radius: 22px;
    }

    .ai-tool-stepper .stepper-step,
    .extract-invoice-stepper .stepper-step,
    .ocr-tool-stepper .stepper-step {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* ── PDF Editor ───────────────────────────────────────────── */
.edit-toolbar-v2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.edit-toolbar-tools {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.edit-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .edit-tool-btn:hover {
        border-color: var(--primary);
        color: var(--text);
        background: var(--primary-light);
    }

    .edit-tool-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: white;
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.edit-toolbar-settings {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.edit-text-input {
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    width: 180px;
    transition: var(--transition);
}

    .edit-text-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-mid);
    }

.edit-font-size {
    padding: 0.4rem 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
}

    .edit-font-size:focus {
        outline: none;
        border-color: var(--primary);
    }

.edit-color-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.edit-color-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.edit-color-picker {
    width: 36px;
    height: 32px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    padding: 2px;
    background: var(--surface);
}

.edit-clear-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--error);
    border-radius: var(--radius);
    background: var(--error-light);
    color: var(--error);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .edit-clear-btn:hover {
        background: var(--error);
        color: white;
    }

.edit-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem 0.875rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-canvas-wrap {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1.5px solid var(--border);
}

.edit-page-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.edit-page-btn {
    padding: 0.4rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .edit-page-btn:hover:not(:disabled) {
        border-color: var(--primary);
        color: var(--primary);
    }

    .edit-page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.edit-page-info {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.edit-annotation-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.875rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    width: fit-content;
}

@media (max-width: 640px) {
    .edit-toolbar-v2 {
        flex-direction: column;
        align-items: flex-start;
    }

    .edit-toolbar-settings {
        margin-left: 0;
    }
}

.edit-undo-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .edit-undo-btn:hover:not(:disabled) {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

    .edit-undo-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

/* PDF Editor */
.pdf-editor-wrap {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    overflow: hidden;
    background: var(--surface);
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.pdf-toolbar-left,
.pdf-toolbar-center,
.pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pdf-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

    .pdf-tool-btn:hover {
        background: var(--primary-light);
        border-color: var(--primary);
    }

    .pdf-tool-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

.pdf-nav-btn {
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

    .pdf-nav-btn:hover {
        background: var(--surface-2);
    }

.pdf-save-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    border: none;
    background: var(--primary);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

    .pdf-save-btn:hover {
        opacity: 0.9;
    }

    .pdf-save-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.pdf-color-input {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 0;
    cursor: pointer;
}

.pdf-select {
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
}

.pdf-tool-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.25rem;
}

.pdf-canvas-area {
    overflow: auto;
    background: #666;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem;
}

.pdf-canvas-container {
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    display: inline-block;
}

#pdf-canvas {
    display: block;
}

#pdf-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
}

.pdf-color-palette {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 7px;
}

.pdf-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

    .pdf-color-swatch:hover {
        transform: scale(1.2);
        box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    }

    .pdf-color-swatch.active {
        border-color: #333;
        transform: scale(1.15);
        box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px #333;
    }

.pdf-color-custom {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1.5px solid var(--border);
    padding: 0;
    cursor: pointer;
    background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
}

    .pdf-color-custom::-webkit-color-swatch-wrapper {
        padding: 0;
    }

    .pdf-color-custom::-webkit-color-swatch {
        border: none;
        border-radius: 2px;
    }

.pdf-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    width: 100%;
    gap: 1rem;
    color: #fff;
    font-size: 0.9rem;
}

.pdf-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: pdf-spin 0.8s linear infinite;
}

@keyframes pdf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── PDF Editor Mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
    .pdf-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.6rem 0.75rem;
    }

    .pdf-toolbar-left {
        flex-wrap: wrap;
        gap: 0.35rem;
        width: 100%;
    }

    .pdf-toolbar-center {
        width: 100%;
        justify-content: center;
        gap: 0.35rem;
    }

    .pdf-toolbar-right {
        width: 100%;
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .pdf-tool-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }

    .pdf-nav-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }

    .pdf-save-btn {
        flex: 1;
        justify-content: center;
    }

    .pdf-color-palette {
        gap: 3px;
        padding: 4px 6px;
    }

    .pdf-color-swatch {
        width: 16px;
        height: 16px;
    }

    .pdf-color-custom {
        width: 16px;
        height: 16px;
    }

    .pdf-select {
        font-size: 0.75rem;
        padding: 0.25rem 0.35rem;
    }

    .pdf-canvas-area {
        padding: 0.5rem;
    }

    .pdf-tool-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .pdf-tool-btn span,
    .pdf-tool-btn svg + * {
        display: none;
    }

    .pdf-tool-btn {
        padding: 0.4rem;
        min-width: 36px;
        justify-content: center;
    }

    .pdf-save-btn span {
        display: none;
    }
}

/* ── Sign PDF ──────────────────────────────────────────────── */
.sign-workflow {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.sign-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.sign-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

    .sign-card-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
    }

.sign-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sign-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--surface-2);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}

.sign-tab {
    padding: 0.45rem 1.25rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

    .sign-tab.active {
        background: var(--surface);
        color: var(--primary);
        font-weight: 600;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

.sign-pad-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary);
    background: white;
}

.sign-canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
    touch-action: none;
}

.sign-pad-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #ccc;
    pointer-events: none;
    letter-spacing: 0.05em;
}

.sign-pad-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sign-action-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

    .sign-action-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

.sign-color-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sign-color-swatches {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sign-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    padding: 0;
    flex-shrink: 0;
}

    .sign-color-dot:hover {
        transform: scale(1.2);
    }

    .sign-color-dot.active {
        border-color: var(--text);
        box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
        transform: scale(1.15);
    }

.sign-color-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    padding: 0;
    cursor: pointer;
    background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
}

    .sign-color-custom::-webkit-color-swatch-wrapper {
        padding: 0;
    }

    .sign-color-custom::-webkit-color-swatch {
        border: none;
        border-radius: 50%;
    }

.sign-type-container {
    margin-top: 0.5rem;
}

.sign-type-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--primary);
    border-radius: 10px;
    background: white;
    color: #1a1a2e;
    font-family: 'Brush Script MT', cursive;
    font-size: 2rem;
    outline: none;
    transition: border-color 0.15s;
}

    .sign-type-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

.sign-pdf-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.sign-placed-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.825rem;
    color: var(--success);
    font-weight: 600;
}

.sign-drag-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.sign-pdf-preview-wrap {
    position: relative;
}

    .sign-pdf-preview-wrap canvas {
        display: block;
        max-width: 100%;
    }

#signOverlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
}

    #signOverlayCanvas:active {
        cursor: grabbing;
    }
/* ── Gradient Buttons (Option 1 — Blue to Indigo) ────────────────────────── */
.process-button {
    background: linear-gradient(135deg, #2250F4, #4F46E5);
    border: none;
}

    .process-button:hover:not(:disabled) {
        background: linear-gradient(135deg, #1a40d4, #3f36c5);
        box-shadow: 0 4px 16px rgba(34,80,244,0.35);
        transform: translateY(-1px);
    }

.download-button {
    background: linear-gradient(135deg, #2250F4, #4F46E5);
    border: none;
}

    .download-button:hover {
        background: linear-gradient(135deg, #1a40d4, #3f36c5);
        box-shadow: 0 4px 16px rgba(34,80,244,0.35);
        transform: translateY(-1px);
    }

.hero-cta-primary {
    background: linear-gradient(135deg, #2250F4, #4F46E5);
}

    .hero-cta-primary:hover {
        background: linear-gradient(135deg, #1a40d4, #3f36c5);
        opacity: 1;
    }

.ai-upgrade-actions .download-button,
.blog-cta-box .download-button {
    background: linear-gradient(135deg, #2250F4, #4F46E5);
    color: #fff !important;
}

    .ai-upgrade-actions .download-button:hover,
    .blog-cta-box .download-button:hover {
        background: linear-gradient(135deg, #1a40d4, #3f36c5);
        box-shadow: 0 4px 16px rgba(34,80,244,0.35);
    }

/* ── Option 3: Founder Statement ─────────────────────────────────────────── */
.founder-statement {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 780px;
    margin: 2.5rem auto;
    padding: 1.75rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
}

.founder-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2250F4, #4F46E5);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.founder-quote-wrap {
    flex: 1;
}

.founder-quote {
    margin: 0 0 0.5rem;
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
}

.founder-attr {
    margin: 0;
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 600;
}

@media (max-width: 640px) {
    .founder-statement {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
        margin: 1.5rem 1rem;
    }
}

/* ── Option 4: Split-screen Hero ─────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════
   HERO SPLIT LAYOUT — DEFINITIVE FIX
   Replace ALL existing .hero-split-* rules with these
   ══════════════════════════════════════════════════════════ */

.hero-split-layout {
    display: grid !important;
    grid-template-columns: 44% 56% !important;
    gap: 0 !important;
    align-items: center !important;
    text-align: left !important;
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 3rem 2rem 2.5rem !important;
    overflow: visible !important; /* let illustration breathe */
    box-sizing: border-box !important;
}

.hero-split-text {
    padding-right: 2rem !important;
    position: relative !important;
    z-index: 2 !important;
    min-width: 0 !important;
}

    .hero-split-text h1 {
        text-align: left !important;
    }

    .hero-split-text p {
        text-align: left !important;
    }

    .hero-split-text .hero-cta-row {
        justify-content: flex-start !important;
        flex-direction: row !important;
        padding: 0 !important;
    }

.hero-split-illustration {
    width: 100% !important;
    max-width: none !important;
    max-height: none !important; /* remove the 440px cap */
    overflow: visible !important; /* show badges that stick out */
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    align-self: center !important;
    min-width: 0 !important;
}

    .hero-split-illustration svg {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important; /* remove the 440px cap */
        overflow: visible !important;
    }

/* Hero section must NOT clip the illustration */
.hero-section {
    overflow: visible !important;
    width: 100% !important;
}

    /* Gradient background section — transparent so page gradient shows */
    .hero-section.hero-split-layout {
        background: transparent !important;
        border-radius: 0 !important;
        padding: 4rem 3rem 2.5rem !important;
        max-width: 1400px !important;
        margin: 0 auto !important;
    }

/* home-page must not clip */
.home-page {
    overflow-x: hidden !important; /* only hide horizontal overflow */
    overflow-y: visible !important;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .hero-split-layout {
        grid-template-columns: 46% 54% !important;
        padding: 2.5rem 1.5rem 2rem !important;
    }
}

@media (max-width: 900px) {
    .hero-split-layout {
        grid-template-columns: 1fr !important;
        max-width: 560px !important;
        margin: 0 auto !important;
        padding: 2rem 1.5rem !important;
    }

    .hero-split-text {
        padding-right: 0 !important;
        text-align: center !important;
    }

        .hero-split-text h1,
        .hero-split-text p {
            text-align: center !important;
        }

        .hero-split-text .hero-cta-row {
            justify-content: center !important;
        }

    .hero-split-illustration {
        display: none !important;
    }
}


/* ── Option 5: Tool Card Hover Micro-animations ───────────────────────────── */
.tool-card {
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

    .tool-card:hover {
        transform: translateY(-4px);
        border-color: var(--primary);
        box-shadow: 0 8px 24px rgba(34,80,244,0.12);
    }

.tool-card-ai:hover {
    border-color: #4F46E5;
    box-shadow: 0 8px 24px rgba(79,70,229,0.12);
}

.tool-icon-tile {
    transition: transform 0.18s ease;
}

.tool-card:hover .tool-icon-tile {
    transform: scale(1.08);
}

/* ── Hero Gradient Background — Light (Option B) ─────────────────────────── */
.hero-section.hero-split-layout {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8e0ff 40%, #dbeafe 80%, #eff6ff 100%);
    border-radius: 0 0 24px 24px;
    padding: 3.5rem 3rem 3rem !important;
}

/* ── Gradient Text on "your documents." ──────────────────────────────────── */
.hero-split-text h1 span.hero-gradient-text {
    background: linear-gradient(90deg, #2250F4, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── "No free trials" badge ──────────────────────────────────────────────── */
.hero-no-trials-badge {
    display: inline-block;
    background: rgba(34,80,244,0.1);
    border: 1px solid rgba(34,80,244,0.25);
    color: #2250F4;
    border-radius: 999px;
    padding: 5px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

/* ── Stats inside hero — adjust for light bg ─────────────────────────────── */
.hero-split-layout .hero-stats-row {
    margin-top: 1.5rem;
    border: 1px solid rgba(34,80,244,0.15);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    width: fit-content;
}

/* ── Search moved to tools section ───────────────────────────────────────── */
.tools-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 520px;
    margin: 0 auto 2rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    transition: border-color 0.15s;
}

    .tools-search-wrap:focus-within {
        border-color: var(--primary);
    }

    .tools-search-wrap input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 0.9rem;
        color: var(--text);
        width: 100%;
        font-family: inherit;
    }

        .tools-search-wrap input::placeholder {
            color: var(--text-muted);
        }

/* ── Dark Mode — Hero (Option A: deep navy + indigo) ─────────────────────── */
[data-theme="dark"] .hero-section.hero-split-layout {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 40%, #0d2060 70%, #0a1a40 100%);
}

[data-theme="dark"] .hero-no-trials-badge {
    background: rgba(79,70,229,0.2);
    border-color: rgba(79,70,229,0.4);
    color: #a5b4fc;
}

[data-theme="dark"] .hero-split-text h1 span.hero-gradient-text {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .hero-split-layout .hero-stats-row {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .hero-cta-secondary {
    color: #a5b4fc;
}

[data-theme="dark"] .hero-split-illustration svg rect[fill="#EFF6FF"] {
    fill: rgba(34,80,244,0.15);
}

[data-theme="dark"] .hero-split-illustration svg rect[fill="#EEF2FF"] {
    fill: rgba(79,70,229,0.15);
}

[data-theme="dark"] .hero-split-illustration svg circle[fill="#E1F5EE"] {
    fill: rgba(13,148,136,0.2);
}

/* ── Mobile adjustments ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section.hero-split-layout {
        padding: 2.5rem 1.5rem 2rem !important;
        border-radius: 0 0 16px 16px;
    }

    .hero-split-layout .hero-stats-row {
        width: 100%;
        justify-content: space-around;
    }
}

/* ── Fix 1: Hero gradient fills full width ───────────────────────────────── */
.home-page {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8e0ff 40%, #dbeafe 80%, #eff6ff 100%);
    min-height: 100vh;
}

[data-theme="dark"] .home-page {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 40%, #0d2060 70%, #0a1a40 100%);
}

/* Remove the box look from the hero — make it blend into the page bg */
.hero-section.hero-split-layout {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 4rem 3rem 2.5rem !important;
    max-width: 1200px;
    margin: 0 auto;
}

/* Trust bar and tools section sit on the same gradient */
.trust-bar {
    background: transparent;
}

.tools-section {
    background: transparent;
}

/* ── Fix 2: Kill the floating magnifier ──────────────────────────────────── */
.hero-search-icon {
    position: static !important;
    transform: none !important;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Fix 3: Tools section gets a white card to separate from gradient ─────── */
.tools-section {
    background: var(--bg, #fff);
    border-radius: 24px 24px 0 0;
    margin-top: 2rem;
    padding: 2rem 2rem 64px !important;
    max-width: 100%;
}

    /* Keep inner content constrained */
    .tools-section > *:not(.tools-search-wrap) {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

.tools-search-wrap {
    max-width: 520px;
    margin: 0 auto 2rem;
}

/* ── Dark mode trust bar text ─────────────────────────────────────────────── */
[data-theme="dark"] .trust-item {
    color: #94a3b8;
}

[data-theme="dark"] .trust-divider {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .hero-section.hero-split-layout {
        padding: 2.5rem 1.25rem 2rem !important;
    }

    .tools-section {
        border-radius: 16px 16px 0 0;
        padding: 1.5rem 1rem 48px !important;
    }
}

/* ── Strengthened Trust Bar ───────────────────────────────────────────────── */
.trust-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 1.1rem 2rem !important;
    background: rgba(255,255,255,0.7) !important;
    backdrop-filter: blur(8px) !important;
    border-top: 1px solid rgba(34,80,244,0.1) !important;
    border-bottom: 1px solid rgba(34,80,244,0.1) !important;
    flex-wrap: wrap !important;
}

.trust-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    font-size: 0.85rem !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    padding: 0 1.25rem !important;
    white-space: nowrap !important;
}

    .trust-item svg {
        color: #2250F4;
        flex-shrink: 0;
    }

.trust-divider {
    width: 1px !important;
    height: 18px !important;
    background: rgba(34,80,244,0.15) !important;
}

[data-theme="dark"] .trust-bar {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .trust-item {
    color: #cbd5e1 !important;
}

    [data-theme="dark"] .trust-item svg {
        color: #818cf8;
    }

[data-theme="dark"] .trust-divider {
    background: rgba(255,255,255,0.1) !important;
}

/* ── Dark mode tool card icon tiles ──────────────────────────────────────── */
[data-theme="dark"] .tool-icon-tile[style*="background:#EEF2FF"],
[data-theme="dark"] .tool-icon-tile[style*="background:#EFF6FF"] {
    background: rgba(34,80,244,0.2) !important;
}

[data-theme="dark"] .tool-icon-tile[style*="background:#F5F3FF"] {
    background: rgba(124,58,237,0.2) !important;
}

[data-theme="dark"] .tool-icon-tile[style*="background:#F0FDF9"] {
    background: rgba(13,148,136,0.2) !important;
}

[data-theme="dark"] .tool-icon-tile[style*="background:#F1F5F9"] {
    background: rgba(71,85,105,0.25) !important;
}

[data-theme="dark"] .tool-icon-tile[style*="background:#F0FDF4"] {
    background: rgba(5,150,105,0.2) !important;
}

/* Dark mode tool card ── keep border and bg subtle */
[data-theme="dark"] .tool-card {
    background: #1e1e2e;
    border-color: rgba(255,255,255,0.08);
}

    [data-theme="dark"] .tool-card:hover {
        border-color: rgba(34,80,244,0.5);
        box-shadow: 0 8px 24px rgba(34,80,244,0.15);
    }

    [data-theme="dark"] .tool-card h3 {
        color: #e2e8f0;
    }

    [data-theme="dark"] .tool-card p {
        color: #64748b;
    }

/* ── Strengthened Footer Trust Badges ────────────────────────────────────── */
.trust-badges {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem 1.5rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    justify-content: center !important;
    border-top: 1px solid var(--border) !important;
}

.trust-badge {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding: 0.9rem 1.25rem !important;
    background: var(--surface, #f8fafc) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s !important;
    min-width: 180px !important;
    flex: 1 !important;
    max-width: 220px !important;
}

    .trust-badge:hover {
        border-color: var(--primary) !important;
        box-shadow: 0 4px 16px rgba(34,80,244,0.1) !important;
        transform: translateY(-2px) !important;
    }

.trust-badge-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 1.2rem !important;
}

.trust-badge-title {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
}

.trust-badge-desc {
    font-size: 0.75rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.3 !important;
}

/* Dark mode badges */
[data-theme="dark"] .trust-badge {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

    [data-theme="dark"] .trust-badge:hover {
        border-color: rgba(34,80,244,0.5) !important;
        box-shadow: 0 4px 16px rgba(34,80,244,0.15) !important;
    }

[data-theme="dark"] .trust-badge-title {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .trust-badge-desc {
    color: #64748b !important;
}

@media (max-width: 640px) {
    .trust-badge {
        min-width: calc(50% - 0.5rem) !important;
        max-width: none !important;
        flex: 1 1 calc(50% - 0.5rem) !important;
    }
}

/* ── Logo light/dark switching ───────────────────────────────────────────── */
.nav-logo-light {
    display: block;
}

.nav-logo-dark {
    display: none;
}

[data-theme="dark"] .nav-logo-light {
    display: none;
}

[data-theme="dark"] .nav-logo-dark {
    display: block;
}

/* Remove old nav-brand-text since logo SVG includes wordmark */
.nav-brand-text {
    display: none !important;
}

/* Ensure nav-brand aligns properly with just the image */
.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* ── Consolidated fixes — override all conflicts ─────────────────────────── */

/* Gradient fills entire page */
.home-page {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8e0ff 40%, #dbeafe 80%, #eff6ff 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

[data-theme="dark"] .home-page {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 40%, #0d2060 70%, #0a1a40 100%) !important;
    background-attachment: fixed !important;
}

/* Tools section — transparent so gradient shows through everywhere */
.tools-section {
    background: transparent !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 2rem 1.5rem 64px !important;
}

    /* Remove the inner constraint that was clipping cards */
    .tools-section > *:not(.tools-search-wrap) {
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

/* Tool cards on gradient — give them a clean white surface */
.tool-card {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(34,80,244,0.12) !important;
}

    .tool-card:hover {
        background: rgba(255,255,255,0.98) !important;
        border-color: var(--primary) !important;
        box-shadow: 0 8px 24px rgba(34,80,244,0.15) !important;
        transform: translateY(-4px) !important;
    }

[data-theme="dark"] .tool-card {
    background: rgba(30,30,50,0.75) !important;
    border-color: rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(8px) !important;
}

    [data-theme="dark"] .tool-card:hover {
        background: rgba(30,30,50,0.95) !important;
        border-color: rgba(34,80,244,0.5) !important;
    }

/* Founder statement on gradient */
.founder-statement {
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(8px) !important;
}

[data-theme="dark"] .founder-statement {
    background: rgba(255,255,255,0.05) !important;
}

/* Search wrap on gradient */
.tools-search-wrap {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(8px) !important;
}

[data-theme="dark"] .tools-search-wrap {
    background: rgba(255,255,255,0.06) !important;
}

/* Category titles on gradient */
.tools-category-title {
    color: var(--text) !important;
}

/* Tool icon tiles — ensure they display */
.tool-icon-tile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    margin: 0 auto 0.75rem !important;
    flex-shrink: 0 !important;
}

    .tool-icon-tile svg {
        width: 26px !important;
        height: 26px !important;
        display: block !important;
    }

/* ── Homepage dark glass cards ─────────────────────────────────────────────
   Scoped to the homepage so upgraded tool pages keep their light panels. */
.home-page .popular-workflow-card,
.home-page .tool-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.68)) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18) !important;
    backdrop-filter: blur(16px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(135%) !important;
}

    .home-page .popular-workflow-card::before {
        background: linear-gradient(90deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%) !important;
        opacity: 0.95 !important;
    }

    .home-page .popular-workflow-card:hover,
    .home-page .tool-card:hover {
        background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.82)) !important;
        border-color: rgba(109, 93, 252, 0.62) !important;
        box-shadow: 0 24px 60px rgba(37, 99, 235, 0.24), 0 10px 30px rgba(15, 23, 42, 0.18) !important;
        transform: translateY(-5px) !important;
    }

.home-page .tool-card-ai,
.home-page .ai-tools-grid .tool-card,
.home-page .featured-ai-card {
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.86), rgba(15, 23, 42, 0.72)) !important;
    border-color: rgba(129, 140, 248, 0.3) !important;
}

    .home-page .tool-card-ai:hover,
    .home-page .ai-tools-grid .tool-card:hover,
    .home-page .featured-ai-card:hover {
        border-color: rgba(6, 182, 212, 0.62) !important;
        box-shadow: 0 24px 60px rgba(79, 70, 229, 0.28), 0 10px 30px rgba(15, 23, 42, 0.2) !important;
    }

.home-page .popular-workflow-card h3,
.home-page .tool-card h3 {
    color: #f8fafc !important;
}

.home-page .popular-workflow-card p,
.home-page .tool-card p {
    color: #cbd5e1 !important;
}

.home-page .popular-workflow-action {
    color: #93c5fd !important;
    text-shadow: 0 0 18px rgba(37, 99, 235, 0.28) !important;
}

    .home-page .popular-workflow-card:hover .popular-workflow-action {
        color: #c4b5fd !important;
    }

.home-page .popular-workflow-icon,
.home-page .tool-icon-tile {
    background: rgba(255, 255, 255, 0.11) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #bfdbfe !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 22px rgba(15, 23, 42, 0.2) !important;
}

.home-page .tool-card-badge {
    background: rgba(37, 99, 235, 0.24) !important;
    border: 1px solid rgba(147, 197, 253, 0.28) !important;
    color: #bfdbfe !important;
}

    .home-page .tool-card-badge.ai {
        background: rgba(124, 58, 237, 0.28) !important;
        border-color: rgba(196, 181, 253, 0.32) !important;
        color: #ddd6fe !important;
    }

    .home-page .tool-card-badge.new {
        background: rgba(20, 184, 166, 0.22) !important;
        border-color: rgba(94, 234, 212, 0.3) !important;
        color: #99f6e4 !important;
    }

/* ── Fix white gap before footer ─────────────────────────────────────────── */
footer,
.site-footer {
    background: transparent !important;
}

.trust-badges {
    background: transparent !important;
}

/* Ensure home-page gradient extends to cover the gap area */
.home-page {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove any bottom margin/padding creating the gap */
.tools-section {
    padding-bottom: 3rem !important;
    margin-bottom: 0 !important;
}

/* Gap is likely from an empty div — hide any empty block-level children of home-page */
.home-page > div:empty {
    display: none !important;
}

/* ── Fix footer gap and background ───────────────────────────────────────── */
.site-footer {
    background: rgba(255,255,255,0.6) !important;
    backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(34,80,244,0.12) !important;
    margin-top: 0 !important;
}

[data-theme="dark"] .site-footer {
    background: rgba(10,10,26,0.85) !important;
    border-top-color: rgba(255,255,255,0.08) !important;
}

/* Trust badges inside footer — transparent */
.site-footer .trust-badges {
    background: transparent !important;
    border-top-color: rgba(34,80,244,0.1) !important;
}

/* Account dashboard refresh */
.acc-root.acc-root {
    width: min(1320px, calc(100% - (var(--page-gutter, 32px) * 2)));
    max-width: 1320px;
    margin: 0 auto;
    padding: 42px 0 72px;
}

.acc-dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
    padding: 38px var(--panel-padding-lg, 32px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.acc-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.acc-dashboard-hero h1 {
    margin: 0 0 10px;
    color: #0f172a;
    font-family: var(--font-heading, inherit);
    font-size: clamp(2.35rem, 4vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
}

.acc-dashboard-hero p {
    max-width: 620px;
    margin: 0;
    color: #64748b;
    font-size: 1.02rem;
    line-height: 1.7;
}

.acc-profile-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.acc-profile-chip strong,
.acc-profile-chip span {
    display: block;
}

.acc-profile-chip strong {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 850;
}

.acc-profile-chip > div:last-child > span {
    max-width: 220px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-dashboard-grid,
.acc-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--card-gap, 28px);
    margin-bottom: var(--card-gap, 28px);
}

.acc-main-section,
.acc-workflow-section {
    margin-bottom: var(--card-gap, 28px);
}

.acc-card.acc-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: var(--panel-padding-lg, 32px);
}

.acc-card-header.acc-card-header {
    margin-bottom: 20px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.acc-header-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.acc-plan-pill {
    --plan-color: #2563eb;
    display: inline-flex;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--plan-color) 30%, transparent);
    border-radius: 999px;
    padding: 5px 11px;
    background: color-mix(in srgb, var(--plan-color) 10%, white);
    color: var(--plan-color);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.acc-plan-summary h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-family: var(--font-heading, inherit);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.acc-plan-summary p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.65;
}

.acc-plan-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.acc-plan-benefits span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px;
    border: 1px solid rgba(109, 93, 252, 0.16);
    border-radius: 14px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

.acc-action-btn.acc-action-btn {
    min-height: 46px;
    border-radius: 999px;
    font-weight: 850;
}

.acc-action-btn--upgrade.acc-action-btn--upgrade,
.acc-action-btn--primary.acc-action-btn--primary {
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.2);
}

.acc-action-btn--upgrade.acc-action-btn--upgrade:hover,
.acc-action-btn--primary.acc-action-btn--primary:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.28);
}

.acc-usage-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.acc-usage-stat {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.acc-usage-stat strong,
.acc-usage-stat span {
    display: block;
}

.acc-usage-stat strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-usage-stat span {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.acc-usage-empty {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    padding: 16px;
    color: #64748b;
    font-size: 0.88rem;
}

.acc-billing-error {
    margin: 12px 0 0;
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(254, 242, 242, 0.82);
    color: #b91c1c;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
}

.acc-documents-card.acc-card--full {
    min-height: 0;
}

.acc-history.acc-history {
    gap: 10px;
}

.acc-history-row.acc-history-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.68);
}

.acc-history-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.acc-history-action {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 850;
}

.acc-history-action:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.acc-inline-action {
    display: inline-flex !important;
    width: auto !important;
    text-decoration: none !important;
}

.acc-history-nudge.acc-history-nudge {
    border: 1px solid rgba(109, 93, 252, 0.2);
    background:
        radial-gradient(circle at left, rgba(109, 93, 252, 0.1), transparent 40%),
        rgba(248, 250, 252, 0.9);
    color: #334155;
}

.acc-history-nudge a {
    color: #2563eb !important;
}

.acc-section-heading {
    margin-bottom: 14px;
}

.acc-section-heading span {
    display: block;
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.acc-section-heading h2 {
    margin: 6px 0 0;
    color: #0f172a;
    font-family: var(--font-heading, inherit);
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.acc-workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.acc-workflow-card {
    display: grid;
    gap: 8px;
    min-height: 170px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(109, 93, 252, 0.13), transparent 42%),
        rgba(255, 255, 255, 0.92);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.acc-workflow-card:hover {
    border-color: rgba(109, 93, 252, 0.34);
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.14);
    transform: translateY(-3px);
}

.acc-workflow-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.acc-workflow-card strong {
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.acc-workflow-card small {
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.55;
}

.acc-account-list {
    display: grid;
    gap: 12px;
}

.acc-account-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.acc-account-list div:last-child {
    border-bottom: 0;
}

.acc-account-list span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 750;
}

.acc-account-list strong {
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 850;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-danger-details {
    align-self: start;
    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.acc-danger-details summary {
    cursor: pointer;
    padding: 20px var(--panel-padding-lg, 32px);
    color: #991b1b;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.acc-danger-details .acc-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 980px) {
    .acc-root.acc-root {
        width: min(100%, calc(100% - (var(--page-gutter-mobile, 16px) * 2)));
        padding: 28px 0 56px;
    }

    .acc-dashboard-hero,
    .acc-dashboard-grid,
    .acc-lower-grid {
        grid-template-columns: 1fr;
    }

    .acc-dashboard-hero {
        display: grid;
        padding: 28px var(--panel-padding-mobile, 20px);
    }

    .acc-profile-chip {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .acc-usage-stats,
    .acc-workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .acc-history-row.acc-history-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .acc-history-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 50px;
    }
}

@media (max-width: 640px) {
    .acc-dashboard-hero h1 {
        font-size: clamp(2rem, 10vw, 2.85rem);
    }

    .acc-card.acc-card {
        padding: var(--panel-padding-mobile, 20px);
    }

    .acc-plan-benefits,
    .acc-usage-stats,
    .acc-workflow-grid {
        grid-template-columns: 1fr;
    }

    .acc-account-list div {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .acc-account-list strong {
        text-align: left;
    }

    .acc-history-actions {
        padding-left: 0;
    }
}

/* ── Global gradient background — applies to every page ─────────────────── */
body {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8e0ff 40%, #dbeafe 80%, #eff6ff 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 40%, #0d2060 70%, #0a1a40 100%) !important;
    background-attachment: fixed !important;
}

/* Tool pages — keep their content readable on gradient */
.tool-page:has(> .tool-container) {
    background: transparent !important;
}

.tool-container {
    background: rgba(255,255,255,0.82) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(34,80,244,0.1) !important;
    border-radius: var(--radius-xl) !important;
}

[data-theme="dark"] .tool-container {
    background: rgba(20,18,40,0.82) !important;
    border-color: rgba(255,255,255,0.07) !important;
}

/* Pricing, blog, about pages */
.pricing-page,
.blog-page,
.blog-article-page,
.about-page,
.contact-page,
.account-page {
    background: transparent !important;
}

/* Give content containers a frosted glass look */
.pricing-container,
.blog-article-container,
.blog-container {
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: var(--radius-xl) !important;
    border: 1px solid rgba(34,80,244,0.08) !important;
    padding: 2rem !important;
}

[data-theme="dark"] .pricing-container,
[data-theme="dark"] .blog-article-container,
[data-theme="dark"] .blog-container {
    background: rgba(20,18,40,0.8) !important;
    border-color: rgba(255,255,255,0.06) !important;
}

/* ── How It Works — Modern Redesign ──────────────────────────────────────── */
.how-it-works {
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 0 !important;
    margin-bottom: 2.5rem !important;
    flex-wrap: nowrap !important;
    position: relative !important;
}

.hiw-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.75rem !important;
    background: rgba(255,255,255,0.75) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(34,80,244,0.12) !important;
    border-radius: 16px !important;
    padding: 1.5rem 1.25rem 1.25rem !important;
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    position: relative !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

    .hiw-step:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 24px rgba(34,80,244,0.12) !important;
    }

.hiw-num {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #2250F4, #4F46E5) !important;
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(34,80,244,0.3) !important;
    margin-bottom: 0.25rem !important;
}

.hiw-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem !important;
    align-items: center !important;
}

    .hiw-text strong {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: var(--text) !important;
        line-height: 1.3 !important;
    }

    .hiw-text span {
        font-size: 0.78rem !important;
        color: var(--text-muted) !important;
        line-height: 1.4 !important;
    }

/* Replace plain → text arrow with a styled connector line */
.hiw-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    font-size: 0 !important;
    position: relative !important;
    margin-top: -1.5rem !important;
}

    .hiw-arrow::after {
        content: '' !important;
        display: block !important;
        width: 28px !important;
        height: 2px !important;
        background: linear-gradient(90deg, #2250F4, #4F46E5) !important;
        border-radius: 2px !important;
        opacity: 0.4 !important;
    }

/* Dark mode */
[data-theme="dark"] .hiw-step {
    background: rgba(30,28,50,0.75) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

    [data-theme="dark"] .hiw-step:hover {
        box-shadow: 0 8px 24px rgba(34,80,244,0.2) !important;
    }

/* Mobile — stack vertically */
@media (max-width: 640px) {
    .how-it-works {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .hiw-step {
        flex-direction: row !important;
        text-align: left !important;
        padding: 1rem 1.25rem !important;
    }

    .hiw-text {
        align-items: flex-start !important;
    }

    .hiw-arrow {
        width: auto !important;
        height: 16px !important;
        margin: 0 auto !important;
    }

        .hiw-arrow::after {
            width: 2px !important;
            height: 16px !important;
            background: linear-gradient(180deg, #2250F4, #4F46E5) !important;
        }
}

/* ── Inline SVG Logo ─────────────────────────────────────────────────────── */
.nav-logo-svg {
    display: block;
    flex-shrink: 0;
}

.nav-logo-text-main {
    fill: #0f172a;
}

.nav-logo-text-accent {
    fill: #2250F4;
}

.nav-logo-text-sub {
    fill: #94a3b8;
}

/* Dark mode */
[data-theme="dark"] .nav-logo-text-main {
    fill: #ffffff;
}

[data-theme="dark"] .nav-logo-text-accent {
    fill: #818cf8;
}

[data-theme="dark"] .nav-logo-text-sub {
    fill: #475569;
}

/* Hide the old img-based logos if any remain */
.nav-logo-light,
.nav-logo-dark {
    display: none !important;
}

/* Remove old nav-brand-text */
.nav-brand-text {
    display: none !important;
}

/* ── HTML Logo (bulletproof rendering) ───────────────────────────────────── */
.nav-logo-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

.nav-logo-icon {
    flex-shrink: 0 !important;
    display: block !important;
}

.nav-logo-wordmark {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    line-height: 1 !important;
}

.nav-logo-name {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.4px !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

    .nav-logo-name span {
        color: #2250F4 !important;
    }

.nav-logo-tagline {
    font-size: 0.55rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap !important;
}

/* Dark mode */
[data-theme="dark"] .nav-logo-name {
    color: #ffffff !important;
}

    [data-theme="dark"] .nav-logo-name span {
        color: #818cf8 !important;
    }

[data-theme="dark"] .nav-logo-tagline {
    color: #475569 !important;
}

/* ── Fix trust bar side panels ───────────────────────────────────────────── */
.trust-bar {
    background: transparent !important;
    border-top: 1px solid rgba(34,80,244,0.1) !important;
    border-bottom: 1px solid rgba(34,80,244,0.1) !important;
    backdrop-filter: none !important;
    width: 100% !important;
}

[data-theme="dark"] .trust-bar {
    border-color: rgba(255,255,255,0.07) !important;
}

/* ── Pricing Audience Cards — modernized ─────────────────────────────────── */
.audience-card {
    background: rgba(255,255,255,0.82) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(34,80,244,0.1) !important;
    border-radius: 16px !important;
    padding: 1.75rem 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

    .audience-card:hover {
        transform: translateY(-4px) !important;
        border-color: var(--primary) !important;
        box-shadow: 0 8px 24px rgba(34,80,244,0.12) !important;
    }

    .audience-card h3 {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: var(--text) !important;
        margin: 0 0 0.5rem !important;
    }

    .audience-card p {
        font-size: 0.875rem !important;
        color: var(--text-secondary) !important;
        line-height: 1.6 !important;
        margin: 0 !important;
    }

/* Remove old emoji icon style */
.audience-icon {
    display: none !important;
}

[data-theme="dark"] .audience-card {
    background: rgba(30,28,50,0.75) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

    [data-theme="dark"] .audience-card:hover {
        border-color: rgba(34,80,244,0.5) !important;
        box-shadow: 0 8px 24px rgba(34,80,244,0.18) !important;
    }

.pdf-loading-card {
    width: min(340px, calc(100% - 2rem));
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

[data-theme="dark"] .pdf-loading-card {
    background: rgba(28,25,41,0.85);
    border-color: rgba(255,255,255,0.08);
}

.pdf-loading-icon {
    width: 64px;
    height: 64px;
    background: #EFF6FF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pdf-loading-pulse 1.8s ease-in-out infinite;
}

[data-theme="dark"] .pdf-loading-icon {
    background: rgba(34,80,244,0.15);
}

@keyframes pdf-loading-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.06);
        opacity: 0.8;
    }
}

.pdf-loading-spinner {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}


@keyframes pdf-spin {
    to {
        transform: rotate(360deg);
    }
}

.pdf-loading-message {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.pdf-loading-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Remove trust bar border lines ───────────────────────────────────────── */
.trust-bar {
    border-top: none !important;
    border-bottom: none !important;
    padding: 1.25rem 2rem !important;
}

/* ── AI Credit Top-Up Modal ──────────────────────────────────── */
.topup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,10,40,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: topupFadeIn 0.2s ease;
}

@keyframes topupFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.topup-modal {
    position: relative;
    background: var(--surface);
    border-radius: 24px;
    border: 1.5px solid var(--border);
    padding: 2rem 1.75rem 1.75rem;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(15,10,40,0.25);
    animation: topupSlideUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes topupSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.topup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s ease;
    padding: 0;
}

.topup-close:hover { background: var(--border); color: var(--text); }
.topup-close svg { width: 14px; height: 14px; }

.topup-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.topup-icon-wrap svg { width: 40px; height: 40px; display: block; flex-shrink: 0; }

.topup-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
    line-height: 1.25;
}

.topup-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* Packages */
.topup-packages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.topup-package {
    position: relative;
    background: var(--surface-2);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.topup-package:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.topup-package-selected {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
}

.topup-package-best {
    border-color: var(--accent);
}

.topup-package-best:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.topup-package-best.topup-package-selected {
    border-color: var(--accent) !important;
    background: var(--accent-light) !important;
}

.topup-package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

.topup-package-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.topup-package-credits {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
}

.topup-package-price {
    font-size: 1rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.topup-package-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.topup-package-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.topup-package-check {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
}

.topup-package-check svg { width: 18px; height: 18px; }

/* Credit note */
.topup-credit-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--surface-2);
    border-radius: 10px;
    padding: 0.6rem 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.topup-credit-note strong {
    color: var(--text);
}

/* CTA button */
.topup-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 4px 16px rgba(34,80,244,0.3);
    margin-bottom: 0.875rem;
}

.topup-cta:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34,80,244,0.4);
}

.topup-cta:disabled { opacity: 0.7; cursor: not-allowed; }

.topup-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: topupSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes topupSpin { to { transform: rotate(360deg); } }

.topup-error {
    font-size: 0.8rem;
    color: var(--error);
    text-align: center;
    margin: 0 0 0.75rem;
}

.topup-upgrade-nudge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.topup-upgrade-nudge a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.topup-upgrade-nudge a:hover { text-decoration: underline; }

/* ── Inline top-up button on Account page ── */
.topup-inline-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 3px 10px rgba(34,80,244,0.25);
}

.topup-inline-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(34,80,244,0.35);
}

.topup-inline-btn-warn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 3px 10px rgba(217,119,6,0.25);
}

.topup-inline-btn-warn:hover {
    box-shadow: 0 5px 14px rgba(217,119,6,0.35);
}

/* ── Credits badge on usage meter ── */
.ai-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

/* ── Top-up success toast ── */
.topup-success-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1.5px solid #6EE7B7;
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 32px rgba(13,148,136,0.18);
    z-index: 9200;
    max-width: 480px;
    width: calc(100vw - 2rem);
    animation: toastSlideUp 0.3s ease;
    font-size: 0.875rem;
    color: var(--text);
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* ══════════════════════════════════════════════════════════
   CONTRACT REVIEWER LANDING PAGE  (crl-)
══════════════════════════════════════════════════════════ */

.crl-page { max-width: 100%; overflow-x: hidden; }

/* ── Shared ── */
.crl-section { padding: 5rem 1.5rem; }
.crl-section-inner { max-width: 1080px; margin: 0 auto; }

.crl-section-label {
    display: inline-block;
    font-size: 0.72rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--accent); background: var(--accent-light);
    padding: 0.25rem 0.75rem; border-radius: 20px;
    margin-bottom: 1rem;
}

.crl-section-h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 900; color: var(--text);
    letter-spacing: -0.03em; line-height: 1.15;
    margin-bottom: 1.25rem;
}

/* ── Buttons ── */
.crl-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
    color: #fff; font-size: 0.9375rem; font-weight: 700;
    border-radius: 12px; text-decoration: none; border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124,58,237,0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}
.crl-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124,58,237,0.42);
    color: #fff; text-decoration: none;
}
.crl-btn-primary.crl-btn-lg { padding: 1.1rem 2.25rem; font-size: 1rem; border-radius: 14px; }

.crl-btn-secondary {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.9rem 1.5rem;
    background: transparent; color: var(--text-secondary);
    font-size: 0.9rem; font-weight: 600;
    border-radius: 12px; text-decoration: none;
    border: 1.5px solid var(--border);
    transition: all 0.18s ease; white-space: nowrap;
}
.crl-btn-secondary:hover {
    border-color: var(--accent); color: var(--accent);
    background: var(--accent-light); text-decoration: none;
}

/* ══ HERO ══════════════════════════════════════════════════ */
.crl-hero {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center;
    max-width: 1140px; margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
}

.crl-hero-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.75rem; font-weight: 700;
    color: var(--accent); background: var(--accent-light);
    padding: 0.3rem 0.85rem; border-radius: 20px;
    margin-bottom: 1.25rem; letter-spacing: 0.03em;
}

.crl-hero-h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900; color: var(--text);
    letter-spacing: -0.04em; line-height: 1.1;
    margin-bottom: 1.25rem;
}

.crl-hero-accent { color: #DC2626; }

.crl-hero-sub {
    font-size: 1.0625rem; color: var(--text-secondary);
    line-height: 1.65; margin-bottom: 2rem; max-width: 520px;
}

.crl-hero-cta-row {
    display: flex; align-items: center; gap: 1rem;
    flex-wrap: wrap; margin-bottom: 1.25rem;
}

.crl-hero-trust {
    display: flex; gap: 1.25rem; flex-wrap: wrap;
    font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
}

/* ── Contract mockup ── */
.crl-hero-visual {
    display: flex; gap: 1rem; align-items: flex-start;
    justify-content: center;
}

.crl-contract-card {
    position: relative;
    background: #fff;
    border: 1px solid #E2E0F0; border-radius: 16px;
    padding: 1.5rem; width: 195px;
    box-shadow: 0 8px 32px rgba(124,58,237,0.10);
    overflow: hidden; flex-shrink: 0;
}

[data-theme="dark"] .crl-contract-card {
    background: #1C1929; border-color: #2D2A45;
}

.crl-contract-top { margin-bottom: 1rem; }

.crl-contract-title-stub {
    height: 10px; width: 70%; border-radius: 5px;
    background: var(--text); opacity: 0.15;
    margin-bottom: 0.4rem;
}

.crl-contract-subtitle-stub {
    height: 7px; width: 50%; border-radius: 4px;
    background: var(--border);
}

.crl-contract-body { display: flex; flex-direction: column; gap: 0.45rem; }

.crl-line {
    height: 7px; border-radius: 4px;
    background: var(--border); opacity: 0.6;
}
.crl-line-full { width: 100%; }
.crl-line-long { width: 85%; }
.crl-line-med  { width: 65%; }
.crl-line-short { width: 45%; }

.crl-line-risk { background: #FCA5A5; opacity: 1; }
.crl-line-warn { background: #FCD34D; opacity: 1; }
.crl-line-ok   { background: #6EE7B7; opacity: 1; }

/* Risk flag groups */
.crl-line-group { position: relative; }

.crl-risk-group {
    animation: riskGroupAppear 0.4s ease both;
}

@keyframes riskGroupAppear {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

.crl-risk-flag {
    position: absolute;
    right: -8px; top: 50%;
    transform: translateY(-50%);
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.55rem; font-weight: 800;
    padding: 0.2rem 0.4rem; border-radius: 6px;
    white-space: nowrap;
    animation: flagPop 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
    opacity: 0;
}

@keyframes flagPop {
    from { opacity: 0; transform: translateY(-50%) scale(0.7); }
    to   { opacity: 1; transform: translateY(-50%) scale(1); }
}

.crl-risk-high { background: #EF4444; color: #fff; }
.crl-risk-med  { background: #F59E0B; color: #fff; }
.crl-risk-ok   { background: #10B981; color: #fff; }

/* AI scan line */
.crl-scan-line {
    position: absolute; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(124,58,237,0.7), transparent);
    animation: crlScanDown 3s ease-in-out infinite;
    top: 0;
}

@keyframes crlScanDown {
    0%   { top: 5%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 95%; opacity: 0; }
}

/* Results panel */
.crl-results-card {
    background: #fff;
    border: 1px solid #E2E0F0; border-radius: 16px;
    overflow: hidden; width: 210px;
    box-shadow: 0 8px 32px rgba(239,68,68,0.08);
    flex-shrink: 0;
}

[data-theme="dark"] .crl-results-card {
    background: #1C1929; border-color: #2D2A45;
}

.crl-results-header {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 0.875rem;
    background: #FEF2F2; border-bottom: 1px solid #FECACA;
    font-size: 0.68rem; font-weight: 700; color: #DC2626;
}

[data-theme="dark"] .crl-results-header {
    background: #450A0A; border-color: #7F1D1D;
}

.crl-result-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.875rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    animation: resultSlideIn 0.3s ease both;
}

@keyframes resultSlideIn {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.crl-result-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.crl-dot-high { background: #EF4444; }
.crl-dot-med  { background: #F59E0B; }
.crl-dot-ok   { background: #10B981; }

.crl-result-label {
    flex: 1; color: var(--text-secondary); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.crl-result-sev {
    font-size: 0.55rem; font-weight: 800;
    padding: 0.1rem 0.3rem; border-radius: 4px;
    flex-shrink: 0;
}
.crl-result-high .crl-result-sev { background: #FEE2E2; color: #DC2626; }
.crl-result-med  .crl-result-sev { background: #FEF3C7; color: #D97706; }
.crl-result-ok   .crl-result-sev { background: #D1FAE5; color: #065F46; }

/* Risk meter */
.crl-risk-meter { padding: 0.75rem 0.875rem; }
.crl-risk-meter-label {
    font-size: 0.6rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.07em; margin-bottom: 0.4rem;
}

.crl-risk-track {
    position: relative; height: 8px; border-radius: 4px;
    background: linear-gradient(90deg, #10B981 0%, #F59E0B 50%, #EF4444 100%);
    margin-bottom: 0.3rem;
}

.crl-risk-fill { display: none; }

.crl-risk-needle {
    position: absolute; top: 50%;
    left: 68%;
    transform: translate(-50%, -50%);
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid #EF4444;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    animation: needleSettle 1s cubic-bezier(0.34,1.56,0.64,1) 0.5s both;
}

@keyframes needleSettle {
    from { left: 10%; }
    to   { left: 68%; }
}

.crl-risk-labels {
    display: flex; justify-content: space-between;
    font-size: 0.55rem; color: var(--text-muted); font-weight: 600;
}

/* ══ PAIN ══════════════════════════════════════════════════ */
.crl-pain {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .crl-pain { background: rgba(26,23,41,0.5); }

.crl-pain-grid {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 1.5rem; margin-top: 2.5rem;
}

.crl-pain-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(124,58,237,0.06);
}
[data-theme="dark"] .crl-pain-card { background: rgba(34,31,53,0.82); }

.crl-pain-icon { font-size: 1.75rem; margin-bottom: 0.875rem; }
.crl-pain-card h3 {
    font-size: 1rem; font-weight: 800; color: var(--text);
    margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.crl-pain-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ══ HOW IT WORKS ══════════════════════════════════════════ */
.crl-steps {
    display: flex; align-items: flex-start;
    gap: 0; margin: 2.5rem 0;
}

.crl-step {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; text-align: center;
    gap: 1rem; padding: 0 1.5rem;
}

.crl-step-num {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
    color: #fff; font-size: 1.1rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(124,58,237,0.3);
    flex-shrink: 0;
}

.crl-step-content h3 {
    font-size: 1rem; font-weight: 800; color: var(--text);
    margin-bottom: 0.4rem; letter-spacing: -0.01em;
}
.crl-step-content p {
    font-size: 0.875rem; color: var(--text-secondary);
    line-height: 1.55; margin: 0;
}

.crl-step-connector {
    flex-shrink: 0; width: 60px; height: 2px;
    background: linear-gradient(90deg, #7C3AED, var(--border));
    margin-top: 24px; border-radius: 1px;
}

.crl-how-cta { text-align: center; margin-top: 2rem; }

/* ══ WHAT AI CATCHES ═══════════════════════════════════════ */
.crl-catches-grid {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 1rem; margin-top: 2.5rem;
}

.crl-catch-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    border: 1.5px solid; border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.crl-catch-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }

.crl-catch-high { border-color: #FECACA; background: rgba(254,242,242,0.85); }
.crl-catch-med  { border-color: #FDE68A; background: rgba(255,251,235,0.85); }

[data-theme="dark"] .crl-catch-high { background: rgba(69,10,10,0.5); border-color: #7F1D1D; }
[data-theme="dark"] .crl-catch-med  { background: rgba(69,26,3,0.5); border-color: #78350F; }

.crl-catch-severity {
    font-size: 0.62rem; font-weight: 800;
    letter-spacing: 0.08em; margin-bottom: 0.6rem;
}
.crl-catch-high .crl-catch-severity { color: #DC2626; }
.crl-catch-med  .crl-catch-severity { color: #D97706; }

.crl-catch-card h3 {
    font-size: 0.9375rem; font-weight: 800; color: var(--text);
    margin-bottom: 0.4rem; letter-spacing: -0.01em;
}
.crl-catch-card p { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }

/* ══ WHO IT'S FOR ══════════════════════════════════════════ */
.crl-who-grid {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 1.5rem; margin-top: 2.5rem;
}

.crl-who-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(124,58,237,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.crl-who-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(124,58,237,0.12); }
[data-theme="dark"] .crl-who-card { background: rgba(34,31,53,0.82); }

.crl-who-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.1rem;
}
.crl-who-card h3 {
    font-size: 1rem; font-weight: 800; color: var(--text);
    margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.crl-who-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.crl-who-stat {
    font-size: 0.75rem; font-weight: 700; color: #DC2626;
    background: #FEE2E2; padding: 0.3rem 0.75rem;
    border-radius: 20px; display: inline-block;
}

/* ══ ROI SECTION ═══════════════════════════════════════════ */
.crl-roi-section {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .crl-roi-section { background: rgba(26,23,41,0.5); }

.crl-roi-inner {
    display: grid; grid-template-columns: 1fr 420px;
    gap: 4rem; align-items: start;
}

.crl-pricing-tiers { display: flex; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }

.crl-tier {
    flex: 1; min-width: 110px;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid var(--border); border-radius: 14px;
    padding: 1rem; position: relative;
}
[data-theme="dark"] .crl-tier { background: rgba(34,31,53,0.8); }

.crl-tier-featured { border-color: var(--accent); background: var(--accent-light) !important; }

.crl-tier-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em;
    padding: 0.15rem 0.6rem; border-radius: 20px; white-space: nowrap;
}

.crl-tier-name {
    font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.35rem;
}
.crl-tier-price {
    font-size: 1.35rem; font-weight: 900; color: var(--text);
    letter-spacing: -0.02em; line-height: 1; margin-bottom: 0.3rem;
}
.crl-tier-price span { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.crl-tier-featured .crl-tier-price { color: var(--accent); }
.crl-tier-detail { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }

.crl-pricing-actions { display: flex; gap: 0.875rem; flex-wrap: wrap; align-items: center; }

/* ROI Card */
.crl-roi-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border); border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 24px rgba(124,58,237,0.1);
}
[data-theme="dark"] .crl-roi-card { background: rgba(34,31,53,0.9); }

.crl-roi-title {
    font-size: 0.875rem; font-weight: 800; color: var(--text);
    margin-bottom: 1.25rem; letter-spacing: -0.01em;
}

.crl-roi-compare-row {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.crl-roi-option {
    flex: 1; padding: 0.875rem; border-radius: 12px;
    text-align: center;
}
.crl-roi-lawyer {
    background: #FEF2F2; border: 1px solid #FECACA;
}
.crl-roi-ai {
    background: #F0FDF4; border: 1px solid #BBF7D0;
}
[data-theme="dark"] .crl-roi-lawyer { background: rgba(69,10,10,0.4); border-color: #7F1D1D; }
[data-theme="dark"] .crl-roi-ai { background: rgba(4,47,46,0.4); border-color: #0D9488; }

.crl-roi-option-label {
    font-size: 0.7rem; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.crl-roi-option-price {
    font-size: 1.25rem; font-weight: 900; letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}
.crl-roi-lawyer .crl-roi-option-price { color: #DC2626; }
.crl-roi-ai .crl-roi-option-price { color: #059669; }
.crl-roi-option-detail { font-size: 0.65rem; color: var(--text-muted); line-height: 1.4; }

.crl-roi-vs {
    font-size: 0.7rem; font-weight: 800; color: var(--text-muted);
    flex-shrink: 0;
}

.crl-roi-divider { height: 1px; background: var(--border); margin: 1rem 0; }

.crl-roi-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 0.5rem;
}
.crl-roi-row strong { color: var(--text); font-weight: 800; }

.crl-roi-slider { width: 100%; margin: 0.25rem 0 1rem; accent-color: var(--accent); cursor: pointer; }

.crl-roi-result {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.75rem;
}
.crl-roi-result-label { font-size: 0.8rem; color: var(--text-secondary); }
.crl-roi-result-num { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.03em; }
.crl-roi-bad  { color: #DC2626; }
.crl-roi-good { color: #059669; }

.crl-roi-savings {
    background: var(--accent-light); border: 1px solid var(--accent-mid);
    border-radius: 10px; padding: 0.65rem 0.875rem;
    font-size: 0.8125rem; color: var(--accent); text-align: center;
}
.crl-roi-savings strong { font-weight: 900; font-size: 1rem; }

/* ══ FAQ ═══════════════════════════════════════════════════ */
.crl-faq-grid {
    display: grid; grid-template-columns: repeat(2,1fr);
    gap: 1.25rem; margin-top: 2.5rem;
}

.crl-faq-item {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border); border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 6px rgba(124,58,237,0.04);
}
[data-theme="dark"] .crl-faq-item { background: rgba(34,31,53,0.82); }

.crl-faq-item h3 {
    font-size: 0.9375rem; font-weight: 800; color: var(--text);
    margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.crl-faq-item p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ══ FINAL CTA ═════════════════════════════════════════════ */
.crl-final-cta { padding: 5rem 1.5rem; text-align: center; }
.crl-final-cta-inner {
    max-width: 560px; margin: 0 auto;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border); border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 8px 40px rgba(124,58,237,0.12);
}
[data-theme="dark"] .crl-final-cta-inner { background: rgba(26,23,41,0.88); }

.crl-final-cta h2 {
    font-size: clamp(1.5rem,3vw,2rem); font-weight: 900;
    color: var(--text); letter-spacing: -0.03em; margin-bottom: 0.75rem;
}
.crl-final-cta p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1.75rem; line-height: 1.5; }
.crl-final-fine { font-size: 0.75rem !important; color: var(--text-muted) !important; margin-top: 1rem !important; margin-bottom: 0 !important; }

/* ══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .crl-hero { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .crl-hero-sub { max-width: 100%; }
    .crl-hero-cta-row { justify-content: center; }
    .crl-hero-trust { justify-content: center; }
    .crl-hero-visual { justify-content: center; }
    .crl-roi-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .crl-pain-grid,
    .crl-catches-grid,
    .crl-who-grid,
    .crl-faq-grid { grid-template-columns: 1fr; }
    .crl-steps { flex-direction: column; align-items: center; }
    .crl-step-connector { width: 2px; height: 32px; margin: 0; background: linear-gradient(180deg, #7C3AED, var(--border)); }
    .crl-hero-visual { flex-direction: column; gap: 1rem; }
}

/* ══════════════════════════════════════════════════════════════
   INVOICE EXTRACTION LANDING PAGE
   ══════════════════════════════════════════════════════════════ */

.iel-page {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Shared section styles ── */
.iel-section {
    padding: 5rem 1.5rem;
}

.iel-section-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.iel-section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.iel-section-h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.iel-section-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 640px;
    margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.iel-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(34,80,244,0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

    .iel-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(34,80,244,0.42);
        color: #fff;
        text-decoration: none;
    }

    .iel-btn-primary.iel-btn-lg {
        padding: 1.1rem 2.25rem;
        font-size: 1rem;
        border-radius: 14px;
    }

.iel-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid var(--border);
    transition: all 0.18s ease;
    white-space: nowrap;
}

    .iel-btn-secondary:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
        text-decoration: none;
    }

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.iel-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
}

.iel-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
}

.iel-hero-h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.iel-hero-accent {
    color: var(--primary);
    position: relative;
}

.iel-hero-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 520px;
}

.iel-hero-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.iel-hero-trust {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Invoice mockup ── */
.iel-hero-visual {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.iel-invoice-card {
    position: relative;
    background: #fff;
    border: 1px solid #E2E0F0;
    border-radius: 16px;
    padding: 1.5rem;
    width: 200px;
    box-shadow: 0 8px 32px rgba(34,80,244,0.1);
    overflow: hidden;
    flex-shrink: 0;
}

[data-theme="dark"] .iel-invoice-card {
    background: #1C1929;
    border-color: #2D2A45;
}

.iel-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.iel-invoice-logo-stub {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2250F4, #7C3AED);
    opacity: 0.3;
}

.iel-invoice-meta {
    text-align: right;
}

.iel-invoice-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.iel-invoice-num {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.iel-invoice-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.iel-invoice-field-stub {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    opacity: 0.5;
}

.iel-stub-long {
    width: 65%;
}

.iel-stub-med {
    width: 45%;
}

.iel-stub-short {
    width: 30%;
}

.iel-invoice-divider {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 0;
}

.iel-invoice-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iel-invoice-total {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
}

/* AI scan animation */
.iel-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34,80,244,0.6), transparent);
    animation: ielScanDown 2.5s ease-in-out infinite;
    top: 0;
}

@keyframes ielScanDown {
    0% {
        top: 10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 90%;
        opacity: 0;
    }
}

.iel-scan-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: ielDotPop 2.5s ease-in-out infinite;
    opacity: 0;
}

@keyframes ielDotPop {
    0%, 60% {
        opacity: 0;
        transform: scale(0);
    }

    70% {
        opacity: 1;
        transform: scale(1.4);
    }

    80%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
}

/* Arrow badge */
.iel-arrow-badge {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

/* Excel output card */
.iel-excel-card {
    background: #fff;
    border: 1px solid #E2E0F0;
    border-radius: 16px;
    overflow: hidden;
    width: 210px;
    box-shadow: 0 8px 32px rgba(13,148,136,0.1);
    flex-shrink: 0;
}

[data-theme="dark"] .iel-excel-card {
    background: #1C1929;
    border-color: #2D2A45;
}

.iel-excel-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.85rem;
    background: #F0FDF9;
    border-bottom: 1px solid #CCFBF1;
    font-size: 0.68rem;
    font-weight: 700;
    color: #0D9488;
}

[data-theme="dark"] .iel-excel-header {
    background: #042F2E;
    border-color: #0D9488;
}

.iel-excel-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.85rem;
    font-size: 0.65rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.iel-excel-head-row {
    background: var(--surface-2);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.iel-excel-row-hl {
    background: rgba(34,80,244,0.04);
}

.iel-excel-key {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.iel-excel-val {
    color: var(--text);
    font-weight: 700;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ══════════════════════════════════
   PAIN POINTS
══════════════════════════════════ */
.iel-pain {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .iel-pain {
    background: rgba(26,23,41,0.5);
}

.iel-pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.iel-pain-card {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(34,80,244,0.06);
}

[data-theme="dark"] .iel-pain-card {
    background: rgba(34,31,53,0.8);
}

.iel-pain-icon {
    font-size: 1.75rem;
    margin-bottom: 0.875rem;
}

.iel-pain-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.iel-pain-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ══════════════════════════════════
   HOW IT WORKS
══════════════════════════════════ */
.iel-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 2.5rem 0;
}

.iel-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0 1.5rem;
}

.iel-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #4F46E5);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(34,80,244,0.3);
    flex-shrink: 0;
}

.iel-step-content h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.iel-step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.iel-step-connector {
    flex-shrink: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-mid), var(--border));
    margin-top: 24px;
    border-radius: 1px;
}

.iel-how-cta {
    text-align: center;
    margin-top: 2rem;
}

/* ══════════════════════════════════
   FIELDS
══════════════════════════════════ */
.iel-fields {
    text-align: center;
}

.iel-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    text-align: left;
}

.iel-fields-col {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(34,80,244,0.05);
}

[data-theme="dark"] .iel-fields-col {
    background: rgba(34,31,53,0.8);
}

.iel-fields-col-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.iel-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8375rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
    font-weight: 500;
}

    .iel-field-row svg {
        flex-shrink: 0;
    }

/* ══════════════════════════════════
   WHO IT'S FOR
══════════════════════════════════ */
.iel-who-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.iel-who-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(34,80,244,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .iel-who-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 28px rgba(34,80,244,0.12);
    }

[data-theme="dark"] .iel-who-card {
    background: rgba(34,31,53,0.82);
}

.iel-who-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.iel-who-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.iel-who-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.iel-who-stat {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
    background: var(--success-light);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

/* ══════════════════════════════════
   PRICING CTA
══════════════════════════════════ */
.iel-pricing-cta {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .iel-pricing-cta {
    background: rgba(26,23,41,0.5);
}

.iel-pricing-cta-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4rem;
    align-items: start;
}

.iel-pricing-tiers {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.iel-pricing-tier {
    flex: 1;
    min-width: 120px;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    position: relative;
}

[data-theme="dark"] .iel-pricing-tier {
    background: rgba(34,31,53,0.8);
}

.iel-pricing-tier-featured {
    border-color: var(--primary);
    background: var(--primary-light) !important;
}

.iel-tier-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

.iel-tier-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.iel-tier-price {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

    .iel-tier-price span {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--text-muted);
        letter-spacing: 0;
    }

.iel-pricing-tier-featured .iel-tier-price {
    color: var(--primary);
}

.iel-tier-detail {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.iel-pricing-actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ROI Calculator */
.iel-roi-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 24px rgba(34,80,244,0.1);
}

[data-theme="dark"] .iel-roi-card {
    background: rgba(34,31,53,0.9);
}

.iel-roi-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.iel-roi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

    .iel-roi-row strong {
        color: var(--text);
        font-weight: 800;
    }

.iel-roi-slider {
    width: 100%;
    margin: 0.25rem 0 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.iel-roi-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.iel-roi-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.iel-roi-result-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.iel-roi-result-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
}

.iel-roi-money {
    color: var(--success);
}

.iel-roi-vs {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

    .iel-roi-vs strong {
        color: var(--primary);
    }

/* ══════════════════════════════════
   FAQ
══════════════════════════════════ */
.iel-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.iel-faq-item {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 6px rgba(34,80,244,0.04);
}

[data-theme="dark"] .iel-faq-item {
    background: rgba(34,31,53,0.8);
}

.iel-faq-item h3 {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.iel-faq-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ══════════════════════════════════
   FINAL CTA
══════════════════════════════════ */
.iel-final-cta {
    padding: 5rem 1.5rem;
    text-align: center;
}

.iel-final-cta-inner {
    max-width: 580px;
    margin: 0 auto;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 8px 40px rgba(34,80,244,0.12);
}

[data-theme="dark"] .iel-final-cta-inner {
    background: rgba(26,23,41,0.88);
}

.iel-final-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.iel-final-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.iel-final-fine {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 1024px) {
    .iel-hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .iel-hero-sub {
        max-width: 100%;
    }

    .iel-hero-cta-row {
        justify-content: center;
    }

    .iel-hero-trust {
        justify-content: center;
    }

    .iel-hero-visual {
        justify-content: center;
    }

    .iel-pricing-cta-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .iel-pain-grid,
    .iel-fields-grid,
    .iel-who-grid {
        grid-template-columns: 1fr;
    }

    .iel-faq-grid {
        grid-template-columns: 1fr;
    }

    .iel-steps {
        flex-direction: column;
        align-items: center;
    }

    .iel-step-connector {
        width: 2px;
        height: 32px;
        margin: 0;
        background: linear-gradient(180deg, var(--primary-mid), var(--border));
    }

    .iel-hero-visual {
        flex-direction: column;
        gap: 1rem;
    }

    .iel-arrow-badge {
        transform: rotate(90deg);
    }
}
/* ══════════════════════════════════════════════════════════
   CONTRACT REVIEWER LANDING PAGE  (crl-)
══════════════════════════════════════════════════════════ */

.crl-page {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Shared ── */
.crl-section {
    padding: 5rem 1.5rem;
}

.crl-section-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.crl-section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.crl-section-h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

/* ── Buttons ── */
.crl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124,58,237,0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

    .crl-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(124,58,237,0.42);
        color: #fff;
        text-decoration: none;
    }

    .crl-btn-primary.crl-btn-lg {
        padding: 1.1rem 2.25rem;
        font-size: 1rem;
        border-radius: 14px;
    }

.crl-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid var(--border);
    transition: all 0.18s ease;
    white-space: nowrap;
}

    .crl-btn-secondary:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: var(--accent-light);
        text-decoration: none;
    }

/* ══ HERO ══════════════════════════════════════════════════ */
.crl-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
}

.crl-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
}

.crl-hero-h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.crl-hero-accent {
    color: #DC2626;
}

.crl-hero-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 520px;
}

.crl-hero-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.crl-hero-trust {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Contract mockup ── */
.crl-hero-visual {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: center;
}

.crl-contract-card {
    position: relative;
    background: #fff;
    border: 1px solid #E2E0F0;
    border-radius: 16px;
    padding: 1.5rem;
    width: 195px;
    box-shadow: 0 8px 32px rgba(124,58,237,0.10);
    overflow: hidden;
    flex-shrink: 0;
}

[data-theme="dark"] .crl-contract-card {
    background: #1C1929;
    border-color: #2D2A45;
}

.crl-contract-top {
    margin-bottom: 1rem;
}

.crl-contract-title-stub {
    height: 10px;
    width: 70%;
    border-radius: 5px;
    background: var(--text);
    opacity: 0.15;
    margin-bottom: 0.4rem;
}

.crl-contract-subtitle-stub {
    height: 7px;
    width: 50%;
    border-radius: 4px;
    background: var(--border);
}

.crl-contract-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.crl-line {
    height: 7px;
    border-radius: 4px;
    background: var(--border);
    opacity: 0.6;
}

.crl-line-full {
    width: 100%;
}

.crl-line-long {
    width: 85%;
}

.crl-line-med {
    width: 65%;
}

.crl-line-short {
    width: 45%;
}

.crl-line-risk {
    background: #FCA5A5;
    opacity: 1;
}

.crl-line-warn {
    background: #FCD34D;
    opacity: 1;
}

.crl-line-ok {
    background: #6EE7B7;
    opacity: 1;
}

/* Risk flag groups */
.crl-line-group {
    position: relative;
}

.crl-risk-group {
    animation: riskGroupAppear 0.4s ease both;
}

@keyframes riskGroupAppear {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.crl-risk-flag {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    white-space: nowrap;
    animation: flagPop 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
    opacity: 0;
}

@keyframes flagPop {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.7);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.crl-risk-high {
    background: #EF4444;
    color: #fff;
}

.crl-risk-med {
    background: #F59E0B;
    color: #fff;
}

.crl-risk-ok {
    background: #10B981;
    color: #fff;
}

/* AI scan line */
.crl-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(124,58,237,0.7), transparent);
    animation: crlScanDown 3s ease-in-out infinite;
    top: 0;
}

@keyframes crlScanDown {
    0% {
        top: 5%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 95%;
        opacity: 0;
    }
}

/* Results panel */
.crl-results-card {
    background: #fff;
    border: 1px solid #E2E0F0;
    border-radius: 16px;
    overflow: hidden;
    width: 210px;
    box-shadow: 0 8px 32px rgba(239,68,68,0.08);
    flex-shrink: 0;
}

[data-theme="dark"] .crl-results-card {
    background: #1C1929;
    border-color: #2D2A45;
}

.crl-results-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.875rem;
    background: #FEF2F2;
    border-bottom: 1px solid #FECACA;
    font-size: 0.68rem;
    font-weight: 700;
    color: #DC2626;
}

[data-theme="dark"] .crl-results-header {
    background: #450A0A;
    border-color: #7F1D1D;
}

.crl-result-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.875rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    animation: resultSlideIn 0.3s ease both;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: translateX(6px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.crl-result-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.crl-dot-high {
    background: #EF4444;
}

.crl-dot-med {
    background: #F59E0B;
}

.crl-dot-ok {
    background: #10B981;
}

.crl-result-label {
    flex: 1;
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crl-result-sev {
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.crl-result-high .crl-result-sev {
    background: #FEE2E2;
    color: #DC2626;
}

.crl-result-med .crl-result-sev {
    background: #FEF3C7;
    color: #D97706;
}

.crl-result-ok .crl-result-sev {
    background: #D1FAE5;
    color: #065F46;
}

/* Risk meter */
.crl-risk-meter {
    padding: 0.75rem 0.875rem;
}

.crl-risk-meter-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.4rem;
}

.crl-risk-track {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #10B981 0%, #F59E0B 50%, #EF4444 100%);
    margin-bottom: 0.3rem;
}

.crl-risk-fill {
    display: none;
}

.crl-risk-needle {
    position: absolute;
    top: 50%;
    left: 68%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #EF4444;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    animation: needleSettle 1s cubic-bezier(0.34,1.56,0.64,1) 0.5s both;
}

@keyframes needleSettle {
    from {
        left: 10%;
    }

    to {
        left: 68%;
    }
}

.crl-risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ══ PAIN ══════════════════════════════════════════════════ */
.crl-pain {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .crl-pain {
    background: rgba(26,23,41,0.5);
}

.crl-pain-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.crl-pain-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(124,58,237,0.06);
}

[data-theme="dark"] .crl-pain-card {
    background: rgba(34,31,53,0.82);
}

.crl-pain-icon {
    font-size: 1.75rem;
    margin-bottom: 0.875rem;
}

.crl-pain-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.crl-pain-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ══ HOW IT WORKS ══════════════════════════════════════════ */
.crl-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 2.5rem 0;
}

.crl-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0 1.5rem;
}

.crl-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(124,58,237,0.3);
    flex-shrink: 0;
}

.crl-step-content h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.crl-step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.crl-step-connector {
    flex-shrink: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #7C3AED, var(--border));
    margin-top: 24px;
    border-radius: 1px;
}

.crl-how-cta {
    text-align: center;
    margin-top: 2rem;
}

/* ══ WHAT AI CATCHES ═══════════════════════════════════════ */
.crl-catches-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 1rem;
    margin-top: 2.5rem;
}

.crl-catch-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    border: 1.5px solid;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .crl-catch-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    }

.crl-catch-high {
    border-color: #FECACA;
    background: rgba(254,242,242,0.85);
}

.crl-catch-med {
    border-color: #FDE68A;
    background: rgba(255,251,235,0.85);
}

[data-theme="dark"] .crl-catch-high {
    background: rgba(69,10,10,0.5);
    border-color: #7F1D1D;
}

[data-theme="dark"] .crl-catch-med {
    background: rgba(69,26,3,0.5);
    border-color: #78350F;
}

.crl-catch-severity {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}

.crl-catch-high .crl-catch-severity {
    color: #DC2626;
}

.crl-catch-med .crl-catch-severity {
    color: #D97706;
}

.crl-catch-card h3 {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.crl-catch-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* ══ WHO IT'S FOR ══════════════════════════════════════════ */
.crl-who-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.crl-who-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(124,58,237,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .crl-who-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 28px rgba(124,58,237,0.12);
    }

[data-theme="dark"] .crl-who-card {
    background: rgba(34,31,53,0.82);
}

.crl-who-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.crl-who-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.crl-who-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.crl-who-stat {
    font-size: 0.75rem;
    font-weight: 700;
    color: #DC2626;
    background: #FEE2E2;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

/* ══ ROI SECTION ═══════════════════════════════════════════ */
.crl-roi-section {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .crl-roi-section {
    background: rgba(26,23,41,0.5);
}

.crl-roi-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4rem;
    align-items: start;
}

.crl-pricing-tiers {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.crl-tier {
    flex: 1;
    min-width: 110px;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    position: relative;
}

[data-theme="dark"] .crl-tier {
    background: rgba(34,31,53,0.8);
}

.crl-tier-featured {
    border-color: var(--accent);
    background: var(--accent-light) !important;
}

.crl-tier-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

.crl-tier-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.crl-tier-price {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

    .crl-tier-price span {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--text-muted);
        letter-spacing: 0;
    }

.crl-tier-featured .crl-tier-price {
    color: var(--accent);
}

.crl-tier-detail {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.crl-pricing-actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ROI Card */
.crl-roi-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 24px rgba(124,58,237,0.1);
}

[data-theme="dark"] .crl-roi-card {
    background: rgba(34,31,53,0.9);
}

.crl-roi-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.crl-roi-compare-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.crl-roi-option {
    flex: 1;
    padding: 0.875rem;
    border-radius: 12px;
    text-align: center;
}

.crl-roi-lawyer {
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

.crl-roi-ai {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
}

[data-theme="dark"] .crl-roi-lawyer {
    background: rgba(69,10,10,0.4);
    border-color: #7F1D1D;
}

[data-theme="dark"] .crl-roi-ai {
    background: rgba(4,47,46,0.4);
    border-color: #0D9488;
}

.crl-roi-option-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crl-roi-option-price {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}

.crl-roi-lawyer .crl-roi-option-price {
    color: #DC2626;
}

.crl-roi-ai .crl-roi-option-price {
    color: #059669;
}

.crl-roi-option-detail {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.crl-roi-vs {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
}

.crl-roi-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.crl-roi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

    .crl-roi-row strong {
        color: var(--text);
        font-weight: 800;
    }

.crl-roi-slider {
    width: 100%;
    margin: 0.25rem 0 1rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.crl-roi-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.crl-roi-result-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.crl-roi-result-num {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.crl-roi-bad {
    color: #DC2626;
}

.crl-roi-good {
    color: #059669;
}

.crl-roi-savings {
    background: var(--accent-light);
    border: 1px solid var(--accent-mid);
    border-radius: 10px;
    padding: 0.65rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--accent);
    text-align: center;
}

    .crl-roi-savings strong {
        font-weight: 900;
        font-size: 1rem;
    }

/* ══ FAQ ═══════════════════════════════════════════════════ */
.crl-faq-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.crl-faq-item {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 6px rgba(124,58,237,0.04);
}

[data-theme="dark"] .crl-faq-item {
    background: rgba(34,31,53,0.82);
}

.crl-faq-item h3 {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.crl-faq-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ══ FINAL CTA ═════════════════════════════════════════════ */
.crl-final-cta {
    padding: 5rem 1.5rem;
    text-align: center;
}

.crl-final-cta-inner {
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 8px 40px rgba(124,58,237,0.12);
}

[data-theme="dark"] .crl-final-cta-inner {
    background: rgba(26,23,41,0.88);
}

.crl-final-cta h2 {
    font-size: clamp(1.5rem,3vw,2rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.crl-final-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.crl-final-fine {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

/* ══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .crl-hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .crl-hero-sub {
        max-width: 100%;
    }

    .crl-hero-cta-row {
        justify-content: center;
    }

    .crl-hero-trust {
        justify-content: center;
    }

    .crl-hero-visual {
        justify-content: center;
    }

    .crl-roi-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .crl-pain-grid,
    .crl-catches-grid,
    .crl-who-grid,
    .crl-faq-grid {
        grid-template-columns: 1fr;
    }

    .crl-steps {
        flex-direction: column;
        align-items: center;
    }

    .crl-step-connector {
        width: 2px;
        height: 32px;
        margin: 0;
        background: linear-gradient(180deg, #7C3AED, var(--border));
    }

    .crl-hero-visual {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ── radius-md fix ─────────────────────────────── */
:root {
    --radius-md: 14px;
}

[data-theme="dark"] {
    --radius-md: 14px;
}

/* ── Trust Badge Tooltips ──────────────────────── */
.trust-badge {
    position: relative;
    cursor: default;
}

.trust-badge-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--surface);
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    width: 220px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    pointer-events: none;
    text-align: left;
}

    .trust-badge-tooltip strong {
        display: block;
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
        color: var(--surface);
    }

    .trust-badge-tooltip::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: var(--text);
    }

.trust-badge:hover .trust-badge-tooltip,
.trust-badge:focus .trust-badge-tooltip {
    display: block;
    animation: tooltipIn 0.15s ease;
}

@keyframes tooltipIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.trust-badges .trust-badge:last-child .trust-badge-tooltip,
.trust-badges .trust-badge:nth-last-child(2) .trust-badge-tooltip {
    left: auto;
    right: 0;
    transform: none;
}

    .trust-badges .trust-badge:last-child .trust-badge-tooltip::after,
    .trust-badges .trust-badge:nth-last-child(2) .trust-badge-tooltip::after {
        left: auto;
        right: 20px;
        transform: none;
    }

/* ── Smooth scroll ─────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ══════════════════════════════════════════════════════════
   SHARED LANDING PAGE SYSTEM (lp-)
   Append to app.css — do NOT replace
══════════════════════════════════════════════════════════ */

.lp-page {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Badges ── */
.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.28rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

.lp-badge-blue {
    background: var(--primary-light);
    color: var(--primary);
}

.lp-badge-amber {
    background: #FEF3C7;
    color: #D97706;
}

.lp-badge-teal {
    background: #CCFBF1;
    color: #0D9488;
}

.lp-badge-green {
    background: #D1FAE5;
    color: #059669;
}

.lp-badge-purple {
    background: var(--accent-light);
    color: var(--accent);
}

.lp-badge-indigo {
    background: #EEF2FF;
    color: #4F46E5;
}

/* ── Headings ── */
.lp-h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.lp-h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 2rem;
}

.lp-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.lp-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 520px;
}

/* ── Buttons ── */
.lp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
    color: #fff;
}

    .lp-btn-primary:hover {
        transform: translateY(-2px);
        color: #fff;
        text-decoration: none;
    }

.lp-btn-lg {
    padding: 1.1rem 2.25rem;
    font-size: 1rem;
    border-radius: 14px;
}

.lp-btn-blue {
    background: linear-gradient(135deg,var(--primary),#4F46E5);
    box-shadow: 0 4px 16px rgba(34,80,244,0.32);
}

    .lp-btn-blue:hover {
        box-shadow: 0 6px 24px rgba(34,80,244,0.42);
    }

.lp-btn-amber {
    background: linear-gradient(135deg,#F59E0B,#D97706);
    box-shadow: 0 4px 16px rgba(217,119,6,0.32);
}

    .lp-btn-amber:hover {
        box-shadow: 0 6px 24px rgba(217,119,6,0.42);
    }

.lp-btn-teal {
    background: linear-gradient(135deg,#0D9488,#059669);
    box-shadow: 0 4px 16px rgba(13,148,136,0.32);
}

    .lp-btn-teal:hover {
        box-shadow: 0 6px 24px rgba(13,148,136,0.42);
    }

.lp-btn-green {
    background: linear-gradient(135deg,#059669,#047857);
    box-shadow: 0 4px 16px rgba(5,150,105,0.32);
}

    .lp-btn-green:hover {
        box-shadow: 0 6px 24px rgba(5,150,105,0.42);
    }

.lp-btn-purple {
    background: linear-gradient(135deg,#7C3AED,#4F46E5);
    box-shadow: 0 4px 16px rgba(124,58,237,0.32);
}

    .lp-btn-purple:hover {
        box-shadow: 0 6px 24px rgba(124,58,237,0.42);
    }

.lp-btn-indigo {
    background: linear-gradient(135deg,#4F46E5,#3730A3);
    box-shadow: 0 4px 16px rgba(79,70,229,0.32);
}

    .lp-btn-indigo:hover {
        box-shadow: 0 6px 24px rgba(79,70,229,0.42);
    }

.lp-btn-secondary-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid var(--border);
    transition: all 0.18s ease;
    white-space: nowrap;
}

    .lp-btn-secondary-dark:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
        text-decoration: none;
    }

/* ── CTA row ── */
.lp-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.lp-trust-inline {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lp-center-cta {
    text-align: center;
    margin-top: 2rem;
}

/* ── Hero layout ── */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
}

/* ── Sections ── */
.lp-section {
    padding: 5rem 1.5rem;
}

.lp-section-inner {
    max-width: 1080px;
    margin: 0 auto;
}

/* Pain cards */
.lp-cards-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.lp-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

[data-theme="dark"] .lp-card {
    background: rgba(34,31,53,0.82);
}

.lp-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.875rem;
}

.lp-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.lp-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* How it works steps */
.lp-steps-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 2.5rem 0;
}

.lp-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.875rem;
    padding: 0 1.5rem;
}

    .lp-step h3 {
        font-size: 1rem;
        font-weight: 800;
        color: var(--text);
        margin-bottom: 0.3rem;
        letter-spacing: -0.01em;
    }

    .lp-step p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        line-height: 1.55;
        margin: 0;
    }

.lp-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-num-blue {
    background: linear-gradient(135deg,var(--primary),#4F46E5);
    box-shadow: 0 4px 14px rgba(34,80,244,0.3);
}

.lp-num-amber {
    background: linear-gradient(135deg,#F59E0B,#D97706);
    box-shadow: 0 4px 14px rgba(217,119,6,0.3);
}

.lp-num-teal {
    background: linear-gradient(135deg,#0D9488,#059669);
    box-shadow: 0 4px 14px rgba(13,148,136,0.3);
}

.lp-num-green {
    background: linear-gradient(135deg,#059669,#047857);
    box-shadow: 0 4px 14px rgba(5,150,105,0.3);
}

.lp-num-purple {
    background: linear-gradient(135deg,#7C3AED,#4F46E5);
    box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}

.lp-num-indigo {
    background: linear-gradient(135deg,#4F46E5,#3730A3);
    box-shadow: 0 4px 14px rgba(79,70,229,0.3);
}

.lp-step-line {
    flex-shrink: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-mid), var(--border));
    margin-top: 24px;
    border-radius: 1px;
}

/* Pain section */
.lp-pain-section {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .lp-pain-section {
    background: rgba(26,23,41,0.5);
}

.lp-how-section {
    background: transparent;
}

/* Final CTA */
.lp-final-cta-section {
    padding: 5rem 1.5rem;
    text-align: center;
}

.lp-final-inner {
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 8px 40px rgba(34,80,244,0.10);
}

[data-theme="dark"] .lp-final-inner {
    background: rgba(26,23,41,0.88);
}

.lp-final-inner h2 {
    font-size: clamp(1.4rem,3vw,1.875rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.lp-final-inner > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.lp-fine {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

/* ══ COMPRESS — file size visual ══════════════════════════ */
.lp-compress-hero {
    align-items: center;
}

.lp-compress-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.lp-file-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    width: 240px;
    box-shadow: 0 4px 20px rgba(34,80,244,0.08);
    text-align: center;
}

[data-theme="dark"] .lp-file-card {
    background: rgba(26,23,41,0.9);
}

.lp-file-card-result {
    border-color: #6EE7B7;
    background: rgba(240,253,249,0.92);
}

[data-theme="dark"] .lp-file-card-result {
    background: rgba(4,47,46,0.5);
    border-color: #0D9488;
}

.lp-file-icon {
    margin-bottom: 0.5rem;
}

.lp-file-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.lp-file-size-display {
    margin-bottom: 0.875rem;
}

.lp-size-num {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: #DC2626;
    letter-spacing: -0.03em;
    line-height: 1;
}

.lp-size-result {
    color: #059669 !important;
}

.lp-size-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.lp-size-animating {
    animation: sizeCount 3s ease-in-out infinite;
}

@keyframes sizeCount {
    0% {
        content: "45.2 MB";
        color: #DC2626;
    }

    70% {
        color: #DC2626;
    }

    85% {
        color: #059669;
    }

    100% {
        color: #059669;
    }
}

.lp-compress-bar-wrap {
    position: relative;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.lp-compress-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #0D9488);
    border-radius: 4px;
    animation: compressFill 3s ease-in-out infinite;
}

@keyframes compressFill {
    0% {
        width: 0%;
    }

    80% {
        width: 100%;
    }

    100% {
        width: 100%;
    }
}

.lp-compress-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.lp-compress-pct {
    animation: compressStatus 3s ease-in-out infinite;
}

@keyframes compressStatus {
    0% {
        color: var(--text-muted);
    }

    80% {
        color: var(--success);
    }

    100% {
        color: var(--success);
    }
}

.lp-arrow-down {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.lp-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #D1FAE5;
    color: #059669;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.lp-savings-badge {
    display: inline-block;
    background: #EFF6FF;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

/* ══ SIGN PDF — signature visual ══════════════════════════ */
.lp-sign-hero {
    align-items: center;
}

.lp-sign-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.lp-accent-amber {
    color: #D97706;
}

.lp-sign-doc {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    width: 260px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
}

[data-theme="dark"] .lp-sign-doc {
    background: rgba(26,23,41,0.92);
}

.lp-doc-lines {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.lp-doc-line {
    height: 7px;
    border-radius: 3px;
    background: var(--border);
    opacity: 0.6;
}

.lp-dl-full {
    width: 100%;
}

.lp-dl-long {
    width: 80%;
}

.lp-dl-med {
    width: 60%;
}

.lp-doc-lines-bottom {
    margin-top: 1rem;
    margin-bottom: 0;
}

.lp-sign-area {
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    padding: 0.75rem 0.5rem 0.5rem;
    background: rgba(255,251,235,0.5);
}

.lp-sign-label-small {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.lp-sign-line-dotted {
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--border) 0px, var(--border) 4px, transparent 4px, transparent 8px);
    margin-bottom: 0.5rem;
}

.lp-sig-svg {
    width: 100%;
    height: 50px;
    display: block;
}

.lp-sig-path {
    stroke-dasharray: 350;
    stroke-dashoffset: 350;
    animation: drawSig 2s ease forwards infinite;
    animation-delay: 0.5s;
}

@keyframes drawSig {
    0% {
        stroke-dashoffset: 350;
    }

    60% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.lp-legal-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #D1FAE5;
    border: 1px solid #6EE7B7;
    color: #059669;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    animation: legalAppear 0.4s ease 2.2s both;
}

@keyframes legalAppear {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.lp-time-compare {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    width: 260px;
}

[data-theme="dark"] .lp-time-compare {
    background: rgba(26,23,41,0.88);
}

.lp-time-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}

.lp-time-val {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.lp-time-bad {
    color: #DC2626;
}

.lp-time-good {
    color: #059669;
}

.lp-time-steps {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.lp-time-vs {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ══ MERGE PDF — documents flying together ═══════════════ */
.lp-merge-hero {
    align-items: center;
}

.lp-merge-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.lp-accent-teal {
    color: #0D9488;
}

.lp-merge-docs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lp-merge-doc {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    width: 130px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

[data-theme="dark"] .lp-merge-doc {
    background: rgba(26,23,41,0.92);
}

.lp-merge-doc-1 {
    animation: mergeSlide1 3s ease-in-out infinite;
}

.lp-merge-doc-2 {
    animation: mergeSlide2 3s ease-in-out 0.1s infinite;
}

.lp-merge-doc-3 {
    animation: mergeSlide3 3s ease-in-out 0.2s infinite;
}

@keyframes mergeSlide1 {
    0%, 40% {
        transform: translateX(0);
        opacity: 1;
    }

    70%, 90% {
        transform: translateX(20px);
        opacity: 0.3;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes mergeSlide2 {
    0%, 40% {
        transform: translateX(0);
        opacity: 1;
    }

    70%, 90% {
        transform: translateX(15px);
        opacity: 0.3;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes mergeSlide3 {
    0%, 40% {
        transform: translateX(0);
        opacity: 1;
    }

    70%, 90% {
        transform: translateX(10px);
        opacity: 0.3;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.lp-mdoc-header {
    height: 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.lp-mdoc-line {
    height: 5px;
    border-radius: 3px;
    background: var(--border);
    margin-bottom: 0.3rem;
    opacity: 0.6;
}

.lp-ml-short {
    width: 65%;
}

.lp-mdoc-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.4rem;
}

.lp-merge-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.lp-merge-arrow-lines {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.lp-merge-line {
    height: 2px;
    background: var(--border);
    border-radius: 1px;
    animation: mergeLineGrow 3s ease-in-out infinite;
}

.lp-ml-1 {
    width: 20px;
    animation-delay: 0s;
}

.lp-ml-2 {
    width: 28px;
    animation-delay: 0.1s;
}

.lp-ml-3 {
    width: 20px;
    animation-delay: 0.2s;
}

@keyframes mergeLineGrow {
    0%,40% {
        opacity: 0.4;
    }

    60%,70% {
        opacity: 1;
        background: #0D9488;
    }

    100% {
        opacity: 0.4;
    }
}

.lp-merge-result-doc {
    background: rgba(255,255,255,0.92);
    border: 1.5px solid #6EE7B7;
    border-radius: 14px;
    padding: 1rem;
    width: 150px;
    box-shadow: 0 4px 16px rgba(13,148,136,0.12);
}

[data-theme="dark"] .lp-merge-result-doc {
    background: rgba(4,47,46,0.5);
}

.lp-merge-done-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #D1FAE5;
    color: #059669;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    animation: mergeDone 3s ease-in-out 0.6s infinite;
}

@keyframes mergeDone {
    0%, 60% {
        opacity: 0;
        transform: scale(0.8);
    }

    75%, 90% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
    }
}

/* ══ PDF TO EXCEL ══════════════════════════════════════════ */
.lp-excel-hero {
    align-items: center;
}

.lp-accent-green {
    color: #059669;
}

.lp-excel-visual {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.lp-pdf-preview, .lp-excel-preview {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    width: 170px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

[data-theme="dark"] .lp-pdf-preview,
[data-theme="dark"] .lp-excel-preview {
    background: rgba(26,23,41,0.92);
}

.lp-pdf-header, .lp-excel-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lp-pdf-header {
    background: #FEE2E2;
    color: #DC2626;
    border-bottom: 1px solid #FECACA;
}

.lp-excel-header {
    background: #D1FAE5;
    color: #059669;
    border-bottom: 1px solid #6EE7B7;
}

.lp-pdf-table, .lp-excel-table {
    padding: 0.25rem;
}

.lp-pdf-table-row, .lp-excel-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 2px;
    margin-bottom: 2px;
}

.lp-ptc, .lp-ec {
    padding: 0.25rem 0.3rem;
    font-size: 0.6rem;
    border-radius: 3px;
}

.lp-ptr-head {
    background: #F1F5F9;
}

    .lp-ptr-head .lp-ptc {
        font-weight: 700;
        color: var(--text-muted);
    }

.lp-ptc {
    background: rgba(0,0,0,0.02);
    color: var(--text-secondary);
}

.lp-er-head {
    background: #F0FDF4;
}

    .lp-er-head .lp-ec {
        font-weight: 700;
        color: #059669;
    }

.lp-er-1 {
    animation: rowAppear 2s ease 0.3s both infinite;
}

.lp-er-2 {
    animation: rowAppear 2s ease 0.6s both infinite;
}

.lp-er-3 {
    animation: rowAppear 2s ease 0.9s both infinite;
}

@keyframes rowAppear {
    0% {
        opacity: 0;
        background: rgba(5,150,105,0.1);
    }

    30% {
        opacity: 1;
        background: rgba(5,150,105,0.1);
    }

    60% {
        background: transparent;
    }

    100% {
        opacity: 1;
    }
}

.lp-ec {
    color: var(--text-secondary);
}

.lp-ec-num {
    color: #059669;
    font-weight: 700;
}

.lp-convert-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.lp-cdot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #059669;
    opacity: 0.5;
    animation: dotPulse 1s ease infinite;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ══ CHAT PDF ══════════════════════════════════════════════ */
.lp-chat-hero {
    align-items: center;
}

.lp-accent-purple {
    color: #7C3AED;
}

.lp-chat-container {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 280px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(124,58,237,0.10);
}

[data-theme="dark"] .lp-chat-container {
    background: rgba(26,23,41,0.92);
}

.lp-chat-doc-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.875rem;
    background: var(--accent-light);
    border-bottom: 1px solid var(--accent-mid);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
}

.lp-chat-messages {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lp-chat-msg {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.72rem;
    line-height: 1.4;
    animation: chatAppear 0.3s ease both;
}

@keyframes chatAppear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lp-chat-user {
    background: var(--accent);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.lp-chat-ai {
    background: var(--surface-2);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    border: 1px solid var(--border);
}

.lp-chat-typing {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    border-bottom-left-radius: 3px;
    align-self: flex-start;
    width: fit-content;
    animation: chatAppear 0.3s ease both;
}

.lp-typing-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingDot 1.2s ease-in-out infinite;
}

    .lp-typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .lp-typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* ══ BATCH PROCESS ════════════════════════════════════════ */
.lp-batch-hero {
    align-items: center;
}

.lp-accent-indigo {
    color: #4F46E5;
}

.lp-batch-visual {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    justify-content: center;
}

.lp-batch-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 200px;
}

.lp-batch-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.88);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

[data-theme="dark"] .lp-batch-file {
    background: rgba(26,23,41,0.88);
}

.lp-bf-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
}

.lp-bf-bar {
    background: linear-gradient(90deg, #4F46E5 100%, var(--border) 100%);
}

.lp-bf-bar-prog {
    background: linear-gradient(90deg, #4F46E5 60%, var(--border) 60%);
    animation: bfProgress 1.5s ease-in-out infinite;
}

.lp-bf-bar-wait {
    background: var(--border);
}

@keyframes bfProgress {
    0% {
        background: linear-gradient(90deg, #4F46E5 40%, var(--border) 40%);
    }

    100% {
        background: linear-gradient(90deg, #4F46E5 90%, var(--border) 90%);
    }
}

.lp-bf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lp-bfd-done {
    background: #10B981;
}

.lp-bfd-prog {
    background: #4F46E5;
    animation: dotBlink 1s ease infinite;
}

.lp-bfd-wait {
    background: var(--border);
}

@keyframes dotBlink {
    0%, 100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.lp-batch-more {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    padding: 0.3rem;
    border: 1px dashed var(--border);
    border-radius: 6px;
}

.lp-batch-stats {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    width: 180px;
    box-shadow: 0 4px 16px rgba(79,70,229,0.08);
}

[data-theme="dark"] .lp-batch-stats {
    background: rgba(26,23,41,0.9);
}

.lp-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
}

    .lp-stat-row:last-of-type {
        border: none;
    }

    .lp-stat-row strong {
        font-weight: 800;
        color: var(--text);
    }

.lp-stat-done {
    color: #10B981 !important;
}

.lp-stat-prog {
    color: #4F46E5 !important;
}

.lp-batch-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.75rem 0 0.4rem;
}

.lp-batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4F46E5, #0D9488);
    border-radius: 3px;
    animation: batchFill 4s ease-in-out infinite;
}

@keyframes batchFill {
    0% {
        width: 55%;
    }

    80% {
        width: 75%;
    }

    100% {
        width: 55%;
    }
}

.lp-batch-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .lp-hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .lp-sub {
        max-width: 100%;
    }

    .lp-cta-row {
        justify-content: center;
    }

    .lp-compress-visual,
    .lp-sign-visual,
    .lp-merge-visual,
    .lp-excel-visual,
    .lp-chat-hero .lp-chat-container,
    .lp-batch-visual {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .lp-cards-3 {
        grid-template-columns: 1fr;
    }

    .lp-steps-row {
        flex-direction: column;
        align-items: center;
    }

    .lp-step-line {
        width: 2px;
        height: 32px;
        margin: 0;
        background: linear-gradient(180deg, var(--primary-mid), var(--border));
    }

    .lp-excel-visual {
        flex-direction: column;
    }

    .lp-batch-visual {
        flex-direction: column;
    }

    .lp-merge-visual {
        flex-wrap: wrap;
    }
}

/* ══════════════════════════════════════════════════════════
   PDF ANNOTATOR LOADING STYLES
   Replace the entire "PDF annotate loading" section in app.css
══════════════════════════════════════════════════════════ */

/* ── Annotator shell fade-in ────────────────────────────── */
.annotator-shell {
    transition: opacity 180ms ease, transform 180ms ease;
}

    .annotator-shell.is-loading {
        opacity: 0;
        transform: translateY(4px);
    }

    .annotator-shell.is-ready {
        opacity: 1;
        transform: translateY(0);
    }

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pdf-loading-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    min-width: 260px;
    position: relative;
    animation: cardSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pdf-loading-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    position: relative;
}

    .pdf-loading-spinner svg {
    width: 56px;
    height: 56px;
    display: block;
    }

.pdf-loading-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.pdf-loading-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.pdf-loading-msg {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2a6b;
    line-height: 1.35;
}


.pdf-loading-sub {
    margin: 0;
    font-size: 0.96rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ── Annotator toolbar row ──────────────────────────────── */
.annotator-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.annotator-filename {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* ── SfPdfViewerShell area ──────────────────────────────────
   min-height keeps the overlay visible while _pdfData is null
   (base64 conversion phase). Without it, sf-viewer-area
   collapses to 0px and the absolute-positioned overlay
   disappears.                                                 */
.sf-viewer-area {
    position: relative;
    min-height: 500px;
    border-radius: var(--radius-lg);
}

.sf-viewer-area-hidden {
    display: none;
}

/* ── Viewer show/hide via opacity (not visibility) ──────────
   SF canvas must remain in layout flow to measure correctly  */
.sf-viewer-hidden {
    opacity: 0;
    pointer-events: none;
}

.sf-viewer-visible {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* ── Compare PDF upload cards ─────────────────────────── */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.compare-upload-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    border: 2px dashed var(--border);
    background: var(--surface-2);
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    min-height: 180px;
}

    .compare-upload-card:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

.compare-card-filled {
    border-color: #0D9488;
    border-style: solid;
    background: rgba(13,148,136,0.06);
}

.compare-card-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.compare-card-filename {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
}

.compare-card-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-input-hidden {
    display: none;
}

.compare-vs-divider {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.6rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }

    .compare-vs-divider {
        text-align: center;
    }
}
/* ── Nav AI Tools icon fix ────────────────────────────── */
.nav-link-ai {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

    .nav-link-ai:hover {
        color: var(--primary) !important;
    }

/* ── Cloud picker row (converter pages) ─────────────────────── */
.cloud-picker-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0.75rem 0 0.25rem;
}

.cloud-picker-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
    width: 100%;
    text-align: center;
    margin-bottom: 0.25rem;
}

.cloud-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

    .cloud-picker-btn:hover:not(:disabled) {
        border-color: var(--primary);
        background: var(--primary-light);
    }

    .cloud-picker-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.cloud-loading-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

.pricing-addons {
    margin-top: 4rem;
    padding: 2.5rem 0 1rem;
}

    .pricing-addons h2 {
        text-align: center;
        margin-bottom: 0.75rem;
    }

.pricing-addons-subtitle {
    text-align: center;
    color: var(--text-muted, #667085);
    max-width: 760px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.addon-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #E5E7EB);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.addon-badge {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2250F4;
    background: #EEF4FF;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.addon-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.addon-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--heading-color, #101828);
    margin-bottom: 0.85rem;
}

.addon-description {
    color: var(--text-muted, #667085);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.addon-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    color: var(--text-color, #344054);
    flex-grow: 1;
}

    .addon-features li::before {
        content: "✓";
        color: #12B76A;
        font-weight: 700;
        margin-right: 0.5rem;
    }

.pricing-btn-addon {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-weight: 700;
    cursor: pointer;
    background: #0F172A;
    color: white;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

    .pricing-btn-addon:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    }

    .pricing-btn-addon:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.pricing-addons-note {
    text-align: center;
    color: var(--text-muted, #667085);
    margin-top: 1rem;
    line-height: 1.6;
}

.pricing-addon-error {
    margin-top: 1rem;
    text-align: center;
    color: #B42318;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .addon-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Premium Pricing Polish ───────────────────────────────── */
.pricing-premium-page {
    width: min(1220px, calc(100% - 48px));
    max-width: 1220px;
    margin: 0 auto;
    padding: 48px 0 72px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.14), transparent 30%),
        linear-gradient(135deg, rgba(248, 247, 255, 0.96) 0%, rgba(238, 245, 255, 0.92) 100%);
}

.pricing-premium-page .pricing-hero {
    max-width: 860px;
    margin: 0 auto 32px;
    padding: 18px 0 8px;
    text-align: center;
}

.pricing-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 7px 14px;
    border: 1px solid rgba(109, 93, 252, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #4f46e5;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.08);
}

.pricing-premium-page .pricing-hero h1 {
    max-width: 820px;
    margin: 0 auto 18px;
    color: #0f172a;
    font-size: clamp(2.35rem, 4vw, 4.1rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.pricing-premium-page .pricing-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: #475569;
    font-size: 1.06rem;
    line-height: 1.75;
}

.pricing-premium-page .pricing-trust-row {
    gap: 10px;
    justify-content: center;
    margin: 22px auto 0;
}

.pricing-premium-page .pricing-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.pricing-premium-page .pricing-trust-row span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.pricing-premium-page .pricing-toggle-wrap {
    margin-top: 28px;
}

.pricing-premium-page .pricing-grid,
.pricing-premium-page .pricing-grid-3 {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0 0 48px;
}

.pricing-premium-page .pricing-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

.pricing-premium-page .pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
}

.pricing-premium-page .pricing-card-featured {
    border: 1px solid rgba(109, 93, 252, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98)),
        radial-gradient(circle at top right, rgba(109, 93, 252, 0.18), transparent 35%);
    box-shadow: 0 30px 80px rgba(79, 70, 229, 0.18);
    transform: translateY(-8px);
}

.pricing-premium-page .pricing-card-featured:hover {
    transform: translateY(-11px);
}

.pricing-premium-page .pricing-card-teams {
    border: 1px solid rgba(124, 58, 237, 0.22);
}

.pricing-card-kicker {
    margin-bottom: 10px;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-premium-page .pricing-popular-badge {
    top: -16px;
    padding: 7px 18px;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.pricing-premium-page .pricing-plan-name {
    color: #0f172a;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    text-transform: none;
}

.pricing-premium-page .pricing-price {
    color: #0f172a;
    font-size: clamp(2.4rem, 4vw, 3rem);
    margin-bottom: 0.65rem;
}

.pricing-premium-page .pricing-desc {
    min-height: 72px;
    color: #475569;
    line-height: 1.65;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.pricing-premium-page .pricing-features {
    min-height: 0;
    flex: 1;
    gap: 0.48rem;
    margin-bottom: 1.6rem;
}

.pricing-premium-page .pricing-features li {
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    color: #334155;
    line-height: 1.45;
}

.pricing-premium-page .feat-yes::before {
    color: #2563eb;
}

.pricing-premium-page .pricing-btn-pro,
.pricing-premium-page .pricing-btn-teams,
.pricing-premium-page .pricing-btn-addon {
    border-radius: 14px;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

.pricing-premium-page .pricing-btn-pro:hover:not(:disabled),
.pricing-premium-page .pricing-btn-teams:hover:not(:disabled),
.pricing-premium-page .pricing-btn-addon:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.3);
    opacity: 1;
}

.pricing-premium-page .pricing-btn-free {
    border-radius: 14px;
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: #1e293b;
}

.pricing-premium-page .pricing-btn-free:hover {
    background: #eef4ff;
    border-color: #2563eb;
}

.pricing-premium-page .pricing-addons,
.pricing-premium-page .pricing-compare,
.pricing-premium-page .pricing-audience,
.pricing-premium-page .pricing-faq {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.pricing-premium-page .pricing-addons {
    margin-top: 20px;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.pricing-premium-page .pricing-addons h2,
.pricing-premium-page .pricing-compare h2,
.pricing-premium-page .pricing-audience h2,
.pricing-premium-page .pricing-faq h2 {
    color: #0f172a;
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
    letter-spacing: -0.025em;
}

.pricing-premium-page .addon-grid {
    gap: 18px;
}

.pricing-premium-page .addon-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.pricing-premium-page .addon-badge {
    color: #4f46e5;
    background: #eef2ff;
}

.pricing-premium-page .pricing-compare {
    margin-top: 56px;
}

.pricing-premium-page .compare-table-wrap {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.pricing-premium-page .compare-table th {
    background: #f8fafc;
    color: #0f172a;
}

.pricing-premium-page .compare-table td {
    padding: 0.9rem 1rem;
}

.pricing-premium-page .compare-section-row td {
    background: #eef4ff !important;
    color: #2563eb !important;
}

.pricing-premium-page .pricing-audience {
    margin-top: 56px;
}

.pricing-premium-page .audience-card,
.pricing-premium-page .faq-item {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.pricing-premium-page .pricing-faq {
    margin-top: 56px;
    padding: 0;
}

.pricing-premium-page .faq-grid {
    max-width: none;
    gap: 18px;
}

.pricing-premium-page .faq-item {
    padding: 24px;
}

.pricing-premium-page .faq-item h3 {
    margin-bottom: 0.7rem;
    color: #0f172a;
}

.pricing-premium-page .faq-item p {
    color: #475569;
    line-height: 1.65;
}

@media (max-width: 980px) {
    .pricing-premium-page {
        width: min(100% - 28px, 760px);
        padding: 34px 0 56px;
    }

    .pricing-premium-page .pricing-grid,
    .pricing-premium-page .pricing-grid-3 {
        grid-template-columns: 1fr;
    }

    .pricing-premium-page .pricing-card-featured,
    .pricing-premium-page .pricing-card-featured:hover {
        transform: none;
    }

    .pricing-premium-page .addon-grid,
    .pricing-premium-page .audience-grid,
    .pricing-premium-page .faq-grid {
        grid-template-columns: 1fr;
    }

    .pricing-premium-page .pricing-addons {
        padding: 24px;
    }
}

@media (max-width: 560px) {
    .pricing-premium-page {
        width: min(100% - 20px, 100%);
    }

    .pricing-premium-page .pricing-hero h1 {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }

    .pricing-premium-page .pricing-card,
    .pricing-premium-page .pricing-addons {
        padding: 20px;
        border-radius: 20px;
    }
}

.viewer-scroll-anchor {
    scroll-margin-top: 90px;
}

.viewer-scroll-anchor {
    scroll-margin-top: 90px;
}

.pdf-loading-card {
    width: min(340px, calc(100% - 2rem));
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CROP PDF — append to app.css
   ═══════════════════════════════════════════════════════════════════════════ */

.crop-config-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}

/* File chip */
.crop-file-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.crop-file-icon {
    font-size: 1.1rem;
}

.crop-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crop-file-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

    .crop-file-remove:hover {
        color: var(--text-primary);
    }

/* Unit toggle */
.crop-unit-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crop-unit-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.crop-unit-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.crop-unit-btn {
    background: var(--surface);
    border: none;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

    .crop-unit-btn + .crop-unit-btn {
        border-left: 1px solid var(--border);
    }

    .crop-unit-btn.active {
        background: var(--primary);
        color: #fff;
        font-weight: 600;
    }

/* Margins grid — visual TRBL layout */
.crop-margins-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.crop-margin-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

    .crop-margin-group label {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

.crop-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

    .crop-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(34, 80, 244, 0.1);
    }

.crop-unit {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Page scope */
.crop-scope-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.crop-scope-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.crop-scope-options {
    display: flex;
    gap: 1.5rem;
}

.crop-radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
}

.crop-pages-input-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.crop-pages-input {
    max-width: 160px;
}

.crop-pages-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Submit button */
.crop-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 480px) {
    .crop-margins-grid {
        grid-template-columns: 1fr 1fr;
    }

    .crop-scope-options {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ── Fix: lock viewer area height during loading to prevent bounce ── */
.sf-viewer-area.is-loading {
    height: 85vh;
    overflow: hidden;
}

.sf-viewport-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 35%, rgba(109, 93, 252, 0.18), transparent 34%),
        rgba(248, 250, 252, 0.72);
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.sf-viewport-loading-card {
    width: min(430px, calc(100vw - 48px));
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.sf-viewport-loading-mark {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.14), rgba(6, 182, 212, 0.16));
}

.sf-viewport-loading-mark span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 3px solid rgba(37, 99, 235, 0.18);
    border-top-color: #6d5dfc;
    animation: pdf-spin 0.9s linear infinite;
}

.sf-viewport-loading-title {
    margin: 0 0 6px;
    color: #111827;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
}

.sf-viewport-loading-copy {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

[data-theme="dark"] .sf-viewport-loading-overlay {
    background:
        radial-gradient(circle at 50% 35%, rgba(109, 93, 252, 0.2), transparent 34%),
        rgba(15, 23, 42, 0.74);
}

[data-theme="dark"] .sf-viewport-loading-card {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .sf-viewport-loading-title {
    color: #f8fafc;
}

[data-theme="dark"] .sf-viewport-loading-copy {
    color: #cbd5e1;
}

.pdf-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    min-height: 400px;
}

.pdf-loading-card {
    animation: none; /* remove cardSlideUp — it causes the bounce */
}

/* ── Blog hero image ─────────────────────────────────────── */
.blog-hero-image {
    width: 100%;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .blog-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 12px;
    }

/* ── Blog card image thumbnail ───────────────────────────── */
.blog-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    margin-bottom: 1rem;
    background: var(--surface-alt, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .blog-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ── Blog hero image ─────────────────────────────────────── */
.blog-hero-image {
    width: 100%;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .blog-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 12px;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG IMPROVEMENTS — append to app.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Edge-to-edge card images ────────────────────────────────────────────── */
/* Override the existing blog-card padding so images bleed to the edges      */

.blog-card {
    padding: 0;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 0; /* remove inner radius — card clips it */
    margin-bottom: 0;
    flex-shrink: 0;
}

    .blog-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

.blog-card:hover .blog-card-image img {
    transform: scale(1.03); /* subtle zoom on hover */
}

/* Text content sits below the image with its own padding */
.blog-card-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

/* ── Featured first card — full width ────────────────────────────────────── */
.blog-grid .blog-card:first-child {
    grid-column: 1 / -1; /* span all columns */
    flex-direction: row; /* image left, content right */
    max-height: 280px;
}

    .blog-grid .blog-card:first-child .blog-card-image {
        width: 45%;
        height: 100%;
        flex-shrink: 0;
        border-radius: 0;
    }

    .blog-grid .blog-card:first-child .blog-card-content {
        justify-content: center;
        padding: 2rem;
    }

    .blog-grid .blog-card:first-child h2 {
        font-size: 1.25rem;
    }

    .blog-grid .blog-card:first-child p {
        font-size: 0.925rem;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

/* ── Read more link on cards ─────────────────────────────────────────────── */
.blog-card-read-more {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
    padding-top: 0.25rem;
}

/* ── Mobile: featured card goes back to column layout ────────────────────── */
@media (max-width: 640px) {
    .blog-grid .blog-card:first-child {
        flex-direction: column;
        max-height: none;
    }

        .blog-grid .blog-card:first-child .blog-card-image {
            width: 100%;
            height: 180px;
        }

        .blog-grid .blog-card:first-child .blog-card-content {
            padding: 1.25rem 1.5rem 1.5rem;
        }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT PAGE — append to app.css
   ═══════════════════════════════════════════════════════════════════════════ */

.about-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.about-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.about-hero {
    text-align: center;
}

.about-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.about-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

/* ── Story blocks ─────────────────────────────────────────── */
.about-story {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.about-story-block h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.about-story-block p {
    font-size: 0.975rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

    .about-story-block p:last-child {
        margin-bottom: 0;
    }

.about-story-block em {
    color: var(--text);
    font-style: italic;
}

/* ── Stats row ────────────────────────────────────────────── */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
}

.about-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.about-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Tech block ───────────────────────────────────────────── */
.about-tech {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

    .about-tech h2 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.75rem;
    }

    .about-tech p {
        font-size: 0.925rem;
        color: var(--text-secondary);
        line-height: 1.7;
        margin: 0;
    }

/* ── CTA ──────────────────────────────────────────────────── */
.about-cta {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
}

    .about-cta h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.5rem;
    }

    .about-cta p {
        font-size: 0.975rem;
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
    }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .about-hero h1 {
        font-size: 1.5rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-cta-buttons {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        align-items: center;
    }
}

/* ── Team Dashboard ──────────────────────────────────────────── */
.team-members-table {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.team-members-header {
    display: grid;
    grid-template-columns: 2fr 80px 100px 120px 40px;
    gap: .5rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 0 .5rem;
}

.team-member-row {
    display: grid;
    grid-template-columns: 2fr 80px 100px 120px 40px;
    gap: .5rem;
    align-items: center;
    padding: .6rem .5rem;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.team-member-info {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.team-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-member-name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
}

.team-member-email {
    font-size: .8rem;
    color: var(--text-muted);
}

.team-member-badge {
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 20px;
    text-align: center;
}

    .team-member-badge.admin {
        background: var(--primary-light);
        color: var(--primary);
    }

    .team-member-badge.member {
        background: var(--surface-2);
        color: var(--text-muted);
        border: 1px solid var(--border);
    }

    .team-member-badge.pending {
        background: #FEF3C7;
        color: #92400E;
    }

.team-stat {
    font-size: .875rem;
    color: var(--text);
    text-align: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: .25rem;
    border-radius: 4px;
    transition: background .15s;
    color: var(--text-muted);
}

    .icon-btn:hover {
        background: var(--surface-2);
    }

    .icon-btn.danger:hover {
        background: #FEE2E2;
        color: #DC2626;
    }

.success-msg {
    color: #059669;
    font-size: .875rem;
}

/* ── AI Limit Banner ─────────────────────────────────────────── */
.ai-limit-banner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 1px solid #F59E0B;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
}

[data-theme="dark"] .ai-limit-banner {
    background: linear-gradient(135deg, #451a03, #78350f);
    border-color: #92400e;
}

.ai-limit-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.ai-limit-title {
    font-size: 1rem;
    font-weight: 700;
    color: #92400E;
    margin: 0 0 .35rem;
}

[data-theme="dark"] .ai-limit-title {
    color: #FDE68A;
}

.ai-limit-sub {
    font-size: .875rem;
    color: #78350F;
    margin: 0 0 1rem;
    line-height: 1.5;
}

[data-theme="dark"] .ai-limit-sub {
    color: #FCD34D;
}

.ai-limit-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

/* ── Free uses banner ────────────────────────────────────────── */
.free-uses-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: .6rem 1rem;
    font-size: .875rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

    .free-uses-banner a {
        color: var(--primary);
        font-weight: 600;
        white-space: nowrap;
    }

/* ── Support Chat ─────────────────────────────────────────────── */
.support-chat-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .75rem;
}

.support-chat-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 58%, #06b6d4 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(34, 80, 244, 0.35);
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
    flex-shrink: 0;
}

    .support-chat-bubble:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(34, 80, 244, 0.45);
    }

    .support-chat-bubble.open {
        background: rgba(15, 23, 42, 0.92);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
    }

.support-chat-unread {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #DC2626;
    color: white;
    font-size: .65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Window ── */
.support-chat-window {
    width: 360px;
    height: min(640px, calc(100vh - 7rem));
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 7rem);
}

/* ── Header ── */
.support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem .95rem;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 36%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 44%, #2563eb 100%);
    color: white;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.support-chat-header-info {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.support-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.24);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-chat-name {
    font-size: .95rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.1px;
}

.support-chat-status {
    max-width: 230px;
    font-size: 11.5px;
    color: #dbeafe;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 2px;
    line-height: 1.35;
}

.support-chat-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.support-chat-close {
    background: rgba(255,255,255,.15);
    border: none;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background .15s;
    flex-shrink: 0;
    padding: 0;
}

    .support-chat-close:hover {
        background: rgba(255,255,255,.28);
    }

/* ── Messages ── */
.support-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem .95rem .65rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    min-height: 0;
    max-height: none;
    background:
        radial-gradient(circle at top right, rgba(109, 93, 252, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.88));
}

.support-msg {
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.support-msg-user {
    flex-direction: row-reverse;
}

.support-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2250F4;
    color: white;
    font-size: .6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-msg-bubble {
    max-width: 78%;
    padding: .78rem .98rem;
    font-size: .86rem;
    line-height: 1.58;
    white-space: pre-wrap;
}

.support-msg-ai .support-msg-bubble {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 242, 255, 0.92));
    color: #172033;
    border-radius: 20px 20px 20px 6px;
    border: 1px solid rgba(165, 180, 252, 0.36);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.support-msg-user .support-msg-bubble {
    background: linear-gradient(135deg, #2563eb 0%, #6d5dfc 100%);
    color: white;
    border-radius: 20px 20px 6px 20px;
}

.support-msg-thinking {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: .6rem .875rem;
    background: #ffffff;
    border-radius: 18px 18px 18px 4px;
    border: 0.5px solid #e8eaf0;
    max-width: 78%;
}

/* ── Suggestions ── */
.support-suggestions {
    padding: .65rem .95rem .8rem;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: rgba(239, 246, 255, 0.88);
    flex: 0 1 auto;
    max-height: 205px;
    overflow-y: auto;
}

.support-suggestions-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    margin-bottom: 1px;
}

.support-suggestions-row {
    display: flex;
    gap: 5px;
}

.support-suggestion-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.76);
    color: #1d4ed8;
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 999px;
    padding: 8px 11px;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    line-height: 1.3;
    font-family: inherit;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

    .support-suggestion-btn:hover {
        background: linear-gradient(135deg, rgba(109, 93, 252, 0.14), rgba(37, 99, 235, 0.12));
        color: #4338ca;
        border-color: rgba(109, 93, 252, 0.45);
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
        transform: translateY(-1px);
    }

.support-action-chip {
    width: 100%;
}

/* ── Input — Option C style (clean white) ── */
.support-chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: .75rem .85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.86);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.support-chat-input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    padding: .62rem .9rem;
    font-size: .84rem;
    font-family: inherit;
    background: #f8fafc;
    color: #172033;
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

    .support-chat-input:focus {
        border-color: #6d5dfc;
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.13);
    }

    .support-chat-input::placeholder {
        color: #a0aabf;
    }

.support-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s;
    padding: 0;
}

    .support-chat-send:disabled {
        opacity: .3;
        cursor: default;
    }

    .support-chat-send svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }

    .support-chat-send:not(:disabled):hover {
        opacity: 1;
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
    }
[data-theme="dark"] .support-chat-send svg {
    stroke: currentColor;
}

/* ── Footer ── */
.support-chat-footer {
    padding: .5rem 1rem .75rem;
    font-size: .72rem;
    color: #64748b;
    text-align: center;
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

    .support-chat-footer a {
        color: #2250F4;
        text-decoration: none;
        font-weight: 500;
    }

        .support-chat-footer a:hover {
            text-decoration: underline;
        }

/* ── Dark mode (Option B) ── */
[data-theme="dark"] .support-chat-window {
    background: #0f1117;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .support-chat-header {
    background: #1a1d2e;
    border-bottom: 0.5px solid #2a2d40;
}

[data-theme="dark"] .support-chat-avatar {
    background: #2250F4;
}

[data-theme="dark"] .support-chat-close {
    background: #2a2d40;
    color: #a0a8c0;
}

[data-theme="dark"] .support-chat-messages {
    background: #0f1117;
}

[data-theme="dark"] .support-msg-ai .support-msg-bubble {
    background: #1e2130;
    color: #e0e4f0;
    border-color: #2a2d40;
}

[data-theme="dark"] .support-msg-thinking {
    background: #1e2130;
    border-color: #2a2d40;
}

[data-theme="dark"] .support-suggestions {
    background: #0f1117;
}

[data-theme="dark"] .support-suggestions-label {
    color: #4a5060;
}

[data-theme="dark"] .support-suggestion-btn {
    background: #1e2130;
    color: #7899f4;
    border-color: #2a3a6a;
}

    [data-theme="dark"] .support-suggestion-btn:hover {
        background: #2250F4;
        color: white;
        border-color: #2250F4;
    }

[data-theme="dark"] .support-chat-input-row {
    background: #1a1d2e;
    border-top-color: #2a2d40;
}

[data-theme="dark"] .support-chat-input {
    background: #0f1117;
    border-color: #2a2d40;
    color: #e0e4f0;
}

    [data-theme="dark"] .support-chat-input::placeholder {
        color: #4a5060;
    }

    [data-theme="dark"] .support-chat-input:focus {
        border-color: #2250F4;
        background: #1e2130;
    }

[data-theme="dark"] .support-chat-footer {
    background: #1a1d2e;
    border-top-color: #2a2d40;
    color: #4a5060;
}

    [data-theme="dark"] .support-chat-footer a {
        color: #7899f4;
    }
.hero-illustration {
    width: 100%;
    max-width: 560px;
}

    /* Prevent layout shift while SVG loads */
    .hero-illustration svg {
        display: block;
        width: 100%;
        height: auto;
    }
/* ══════════════════════════════════════════════════════════
   MOBILE ACCORDION MENU
   Add to app.css — replace all existing .mobile-menu rules
   ══════════════════════════════════════════════════════════ */

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    flex-shrink: 0;
}

    .hamburger:hover {
        background: var(--surface-2);
    }

    .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.2s ease;
        transform-origin: center;
    }

    .hamburger.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.is-open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .hamburger.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

@media (max-width: 1100px) {
    .hamburger {
        display: flex !important;
    }

    .nav-link-tool {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .nav-search {
        display: none;
    }
}

/* ── Backdrop ── */
.mob-backdrop {
    position: fixed;
    inset: 0;
    top: 64px;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    animation: backdropFade 0.2s ease;
}

@keyframes backdropFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

[data-theme="dark"] .mob-backdrop {
    background: rgba(0,0,0,0.6);
}

/* ── Drawer ── */
.mob-drawer {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--surface);
    border-top: 1px solid var(--border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.mob-drawer--open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    animation: drawerSlide 0.22s ease forwards;
}

@keyframes drawerSlide {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

[data-theme="dark"] .mob-drawer {
    background: var(--surface);
}

/* ── Drawer header ── */
.mob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mob-header-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.mob-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--surface-2);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

    .mob-close:hover {
        background: var(--border);
        color: var(--text);
    }

/* ── Quick links row ── */
.mob-quick-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mob-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
    white-space: nowrap;
}

    .mob-quick-btn:hover {
        background: var(--primary-light);
        color: var(--primary);
        border-color: var(--primary-mid);
    }

.mob-quick-ai {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent-mid);
}

    .mob-quick-ai:hover {
        background: var(--accent-light);
        color: var(--accent);
        border-color: var(--accent);
    }

/* ── Divider ── */
.mob-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
    flex-shrink: 0;
}

/* ── Accordion section ── */
.mob-section {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.mob-section-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.925rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
    text-align: left;
}

    .mob-section-header:hover {
        background: var(--surface-2);
    }

.mob-section-header--open {
    background: var(--surface-2);
}

.mob-section-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mob-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mob-section-icon--ai {
    background: var(--accent-light);
    color: var(--accent);
}

.mob-section-icon--blue {
    background: var(--primary-light);
    color: var(--primary);
}

.mob-section-icon--violet {
    background: #EDE9FE;
    color: #7C3AED;
}

.mob-section-icon--teal {
    background: #CCFBF1;
    color: #0D9488;
}

.mob-section-icon--slate {
    background: #F1F5F9;
    color: #475569;
}

[data-theme="dark"] .mob-section-icon--violet {
    background: rgba(124,58,237,0.15);
    color: #A78BFA;
}

[data-theme="dark"] .mob-section-icon--teal {
    background: rgba(13,148,136,0.15);
    color: #2DD4BF;
}

[data-theme="dark"] .mob-section-icon--slate {
    background: rgba(71,85,105,0.2);
    color: #94A3B8;
}

.mob-section-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: var(--primary);
    color: white;
}

.mob-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.mob-chevron--open {
    transform: rotate(180deg);
}

/* ── Section body (links) ── */
.mob-section-body {
    background: var(--surface-2);
    padding: 0.375rem 0.75rem 0.75rem;
    animation: sectionOpen 0.18s ease;
}

@keyframes sectionOpen {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mob-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s, color 0.12s;
    margin-bottom: 0.1rem;
}

    .mob-link:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.mob-link-icon {
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.mob-link-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
}

.mob-link-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 0.1rem;
}

.mob-link--more .mob-link-name {
    color: var(--primary);
}

/* ── Bottom links ── */
.mob-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 1rem 1.25rem 2rem;
}

.mob-bottom-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.15s;
    background: var(--surface);
}

    .mob-bottom-link:hover {
        color: var(--primary);
        border-color: var(--primary-mid);
        background: var(--primary-light);
    }

/* ── Scrollbar ── */
.mob-drawer::-webkit-scrollbar {
    width: 3px;
}

.mob-drawer::-webkit-scrollbar-track {
    background: transparent;
}

.mob-drawer::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ── Typography normalization ─────────────────────────────── */
.hero-section h1,
.tool-hero h1,
.edit-hero h1,
.sign-hero h1,
.annotate-hero h1,
.np-title,
.rp-title,
.tp-title,
.bp-hero-title {
    font-family: var(--font-heading) !important;
    font-size: var(--heading-hero-size) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em !important;
    font-weight: 700 !important;
    margin-bottom: 1rem;
}

.hero-gradient-text {
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.tool-hero p,
.hero-section p {
    font-family: var(--font-body);
}

@media (max-width: 768px) {
    :root {
        --heading-hero-size: clamp(2rem, 8vw, 2.5rem);
    }
}

/* ── Edit PDF premium viewer page ─────────────────────────── */
.edit-tool-page {
    max-width: none;
    padding: 48px 0 72px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.14), transparent 30%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%);
}

.edit-tool-container {
    width: min(1240px, calc(100% - 48px));
    max-width: 1240px;
    margin: 0 auto 2rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
}

.edit-hero {
    margin-bottom: 0;
    padding: 44px 48px 30px;
}

.edit-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.edit-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.edit-trust-row span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
}

.edit-hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    color: #111827;
    font-size: var(--heading-hero-size);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.edit-hero p {
    max-width: 720px;
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.edit-stepper {
    width: calc(100% - 96px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 48px 28px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.edit-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
}

.edit-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
}

.edit-step.active {
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.edit-step.active span {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.edit-workflow-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.edit-workspace-card,
.edit-side-card,
.edit-side-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 32px;
}

.edit-workspace-card .file-upload-container,
.edit-workspace-card .upload-container {
    width: 100%;
    max-width: none;
}

.edit-panel-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.edit-side-card h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.15;
}

.edit-side-card p {
    margin: 0 0 18px;
    color: #64748b;
    line-height: 1.65;
}

.edit-value-list {
    display: grid;
    gap: 10px;
}

.edit-value-list span {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

.edit-value-list span::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
    flex: 0 0 auto;
}

.edit-viewer-stage {
    width: 100%;
    margin-top: 24px;
}

.edit-viewer-stage.is-active {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    min-height: calc(85vh + 92px);
}

.edit-viewer-helper {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.09), rgba(6, 182, 212, 0.1));
    color: #334155;
    font-size: 0.92rem;
    font-weight: 700;
}

.edit-viewer-stage .annotator-toolbar-row {
    margin-bottom: 14px;
}

.edit-viewer-stage .reset-button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.edit-viewer-stage .reset-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.edit-tool-page.viewer-active {
    padding-bottom: 32px;
}

.edit-tool-page.viewer-active .edit-tool-container {
    margin-bottom: 0;
}

.edit-tool-page.viewer-active > .faq-section {
    display: none;
}

.edit-tool-page.viewer-active .sf-viewer-area,
.edit-tool-page.viewer-active .sf-viewer-wrap {
    min-height: 85vh;
}

@media (max-width: 980px) {
    .edit-tool-page {
        padding: 32px 0 56px;
    }

    .edit-hero {
        padding: 32px 28px 24px;
    }

    .edit-tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .edit-workflow-grid {
        grid-template-columns: 1fr;
    }

    .edit-stepper {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
        overflow-x: auto;
        border-radius: 20px;
        width: calc(100% - 56px);
        margin: 0 28px 28px;
    }
}

@media (max-width: 640px) {
    .edit-workspace-card,
    .edit-side-card,
    .edit-side-panel {
        padding: 24px;
        border-radius: 20px;
    }

    .edit-viewer-stage.is-active {
        padding: 12px;
        border-radius: 20px;
    }
}

/* ── Annotate PDF premium viewer page ─────────────────────── */
.annotate-tool-page {
    max-width: none;
    padding: 48px 0 72px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.14), transparent 30%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%);
}

.annotate-tool-container {
    width: min(1240px, calc(100% - 48px));
    max-width: 1240px;
    margin: 0 auto 2rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
}

.annotate-hero {
    margin-bottom: 0;
    padding: 44px 48px 30px;
}

.annotate-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.annotate-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.annotate-trust-row span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
}

.annotate-hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    color: #111827;
    font-size: var(--heading-hero-size);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.annotate-hero p {
    max-width: 720px;
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.annotate-stepper {
    width: calc(100% - 96px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 48px 28px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.annotate-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
}

.annotate-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
}

.annotate-step.active {
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.annotate-step.active span {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.annotate-workflow-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.annotate-workspace-card,
.annotate-side-card,
.annotate-side-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 32px;
}

.annotate-workspace-card .file-upload-container,
.annotate-workspace-card .upload-container {
    width: 100%;
    max-width: none;
}

.annotate-panel-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.annotate-side-card h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.15;
}

.annotate-side-card p {
    margin: 0 0 18px;
    color: #64748b;
    line-height: 1.65;
}

.annotate-value-list {
    display: grid;
    gap: 10px;
}

.annotate-value-list span {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

.annotate-value-list span::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
    flex: 0 0 auto;
}

.annotate-viewer-stage {
    width: 100%;
    margin-top: 24px;
}

.annotate-viewer-stage.is-active {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    min-height: calc(85vh + 92px);
}

.annotate-viewer-helper {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.09), rgba(6, 182, 212, 0.1));
    color: #334155;
    font-size: 0.92rem;
    font-weight: 700;
}

.annotate-viewer-stage .annotator-toolbar-row {
    margin-bottom: 14px;
}

.annotate-viewer-stage .reset-button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.annotate-viewer-stage .reset-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.annotate-tool-page.viewer-active {
    padding-bottom: 32px;
}

.annotate-tool-page.viewer-active .annotate-tool-container {
    margin-bottom: 0;
}

.annotate-tool-page.viewer-active > .faq-section {
    display: none;
}

.annotate-tool-page.viewer-active .sf-viewer-area,
.annotate-tool-page.viewer-active .sf-viewer-wrap {
    min-height: 85vh;
}

@media (max-width: 980px) {
    .annotate-tool-page {
        padding: 32px 0 56px;
    }

    .annotate-hero {
        padding: 32px 28px 24px;
    }

    .annotate-tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .annotate-workflow-grid {
        grid-template-columns: 1fr;
    }

    .annotate-stepper {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
        overflow-x: auto;
        border-radius: 20px;
        width: calc(100% - 56px);
        margin: 0 28px 28px;
    }
}

@media (max-width: 640px) {
    .annotate-workspace-card,
    .annotate-side-card,
    .annotate-side-panel {
        padding: 24px;
        border-radius: 20px;
    }

    .annotate-viewer-stage.is-active {
        padding: 12px;
        border-radius: 20px;
    }
}

/* ── Sign PDF premium viewer page ─────────────────────────── */
.sign-tool-page {
    max-width: none;
    padding: 48px 0 72px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.14), transparent 30%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%);
}

.sign-tool-container {
    width: min(1240px, calc(100% - 48px));
    max-width: 1240px;
    margin: 0 auto 2rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
}

.sign-hero {
    margin-bottom: 0;
    padding: 44px 48px 30px;
}

.sign-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.sign-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.sign-trust-row span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
}

.sign-hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    color: #111827;
    font-size: var(--heading-hero-size);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.sign-hero p {
    max-width: 720px;
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.sign-stepper {
    width: calc(100% - 96px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 48px 28px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.sign-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
}

.sign-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
}

.sign-step.active {
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.sign-step.active span {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.sign-workflow-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.sign-workspace-card,
.sign-side-card,
.sign-side-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 32px;
}

.sign-workspace-card .file-upload-container,
.sign-workspace-card .upload-container {
    width: 100%;
    max-width: none;
}

.sign-panel-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sign-side-card h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.15;
}

.sign-side-card p {
    margin: 0 0 18px;
    color: #64748b;
    line-height: 1.65;
}

.sign-value-list {
    display: grid;
    gap: 10px;
}

.sign-value-list span {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

.sign-value-list span::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5dfc, #06b6d4);
    flex: 0 0 auto;
}

.sign-viewer-stage {
    width: 100%;
    margin-top: 24px;
}

.sign-viewer-stage.is-active {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    min-height: calc(85vh + 92px);
}

.sign-viewer-helper {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.09), rgba(6, 182, 212, 0.1));
    color: #334155;
    font-size: 0.92rem;
    font-weight: 700;
}

.sign-viewer-stage .annotator-toolbar-row {
    margin-bottom: 14px;
}

.sign-viewer-stage .reset-button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.sign-viewer-stage .reset-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.sign-tool-page.viewer-active {
    padding-bottom: 32px;
}

.sign-tool-page.viewer-active .sign-tool-container {
    margin-bottom: 0;
}

.sign-tool-page.viewer-active > .faq-section {
    display: none;
}

.sign-tool-page.viewer-active .sf-viewer-area,
.sign-tool-page.viewer-active .sf-viewer-wrap {
    min-height: 85vh;
}

@media (max-width: 980px) {
    .sign-tool-page {
        padding: 32px 0 56px;
    }

    .sign-hero {
        padding: 32px 28px 24px;
    }

    .sign-tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .sign-workflow-grid {
        grid-template-columns: 1fr;
    }

    .sign-stepper {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
        overflow-x: auto;
        border-radius: 20px;
        width: calc(100% - 56px);
        margin: 0 28px 28px;
    }
}

@media (max-width: 640px) {
    .sign-workspace-card,
    .sign-side-card,
    .sign-side-panel {
        padding: 24px;
        border-radius: 20px;
    }

    .sign-viewer-stage.is-active {
        padding: 12px;
        border-radius: 20px;
    }
}

/* ── FAQ spacing normalization ─────────────────────────────────────────── */
.faq-section {
    margin: 3rem auto 4rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.faq-section h2 {
    margin: 0 0 1.5rem;
}

.faq-item {
    padding: 1.1rem 0 1.25rem;
    margin-bottom: 1.1rem;
}

.faq-item h3 {
    margin: 0 0 .55rem;
}

.faq-item p {
    margin: 0;
}

.cp-faq-item,
.rp-faq-item,
.tp-faq-item,
.np-faq-item,
.bp-faq-item {
    margin-bottom: .85rem;
}

.cp-faq-item,
.rp-faq-item,
.tp-faq-item {
    padding: 1.1rem 1.25rem;
}

.bp-faq {
    margin-top: 2rem;
    padding: 1.5rem;
    padding-bottom: 1.75rem;
}

.bp-faq-item summary {
    padding: 1rem 1.15rem;
}

.bp-faq-item p {
    padding: 0 1.15rem 1.15rem;
}

.pricing-premium-page .pricing-faq {
    padding: 34px;
    border-radius: 28px;
    background: rgba(255,255,255,.68);
}

/* ── Global spacing normalization ─────────────────────────── */
.tool-container,
.bp-header,
.pricing-premium-page,
.hero-section.hero-split-layout {
    width: min(1320px, calc(100% - var(--page-gutter) - var(--page-gutter))) !important;
}

.tool-hero,
.edit-hero,
.sign-hero,
.annotate-hero,
.tp-hero {
    padding: 44px var(--page-gutter) 30px !important;
    box-sizing: border-box;
}

.stepper,
.edit-stepper,
.sign-stepper,
.annotate-stepper,
.tp-stepper {
    width: calc(100% - var(--page-gutter) - var(--page-gutter)) !important;
    margin: 0 auto 24px !important;
    box-sizing: border-box;
}

.workspace-card,
.settings-card,
.edit-workspace-card,
.sign-workspace-card,
.annotate-workspace-card,
.edit-side-card,
.sign-side-card,
.annotate-side-card,
.bp-card {
    padding: var(--panel-padding-lg) !important;
}

@media (max-width: 640px) {
    .tool-container,
    .bp-header,
    .pricing-premium-page,
    .hero-section.hero-split-layout {
        width: min(100%, calc(100% - var(--page-gutter-mobile) - var(--page-gutter-mobile))) !important;
    }

    .tool-hero,
    .edit-hero,
    .sign-hero,
    .annotate-hero,
    .tp-hero {
        padding: 28px var(--page-gutter-mobile) 24px !important;
    }

    .stepper,
    .edit-stepper,
    .sign-stepper,
    .annotate-stepper,
    .tp-stepper {
        width: 100% !important;
        margin: 0 0 20px !important;
    }

    .workspace-card,
    .settings-card,
    .edit-workspace-card,
    .sign-workspace-card,
    .annotate-workspace-card,
    .edit-side-card,
    .sign-side-card,
    .annotate-side-card,
    .bp-card {
        padding: var(--panel-padding-mobile) !important;
    }
}

@media (max-width: 560px) {
    .pricing-premium-page {
        width: min(100%, calc(100% - var(--page-gutter-mobile) - var(--page-gutter-mobile))) !important;
    }
}

/* ── Theme consistency overrides ──────────────────────────── */
.home-page .popular-workflow-card,
.home-page .tool-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .86)) !important;
    border-color: rgba(148, 163, 184, .2) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08) !important;
    color: var(--text) !important;
    backdrop-filter: blur(14px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
}

.home-page .popular-workflow-card:hover,
.home-page .tool-card:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 246, 255, .92)) !important;
    border-color: rgba(109, 93, 252, .36) !important;
    box-shadow: 0 24px 60px rgba(37, 99, 235, .14), 0 10px 30px rgba(15, 23, 42, .08) !important;
}

.home-page .tool-card-ai,
.home-page .ai-tools-grid .tool-card,
.home-page .featured-ai-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(245, 243, 255, .9)) !important;
    border-color: rgba(129, 140, 248, .24) !important;
}

.home-page .popular-workflow-card h3,
.home-page .tool-card h3 {
    color: var(--text) !important;
}

.home-page .popular-workflow-card p,
.home-page .tool-card p {
    color: var(--text-secondary) !important;
}

.home-page .popular-workflow-action {
    color: #2563eb !important;
    text-shadow: none !important;
}

.home-page .popular-workflow-card:hover .popular-workflow-action {
    color: #6d5dfc !important;
}

.home-page .popular-workflow-icon,
.home-page .tool-icon-tile {
    background: rgba(239, 246, 255, .86) !important;
    border-color: rgba(37, 99, 235, .14) !important;
    color: #2563eb !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 22px rgba(15, 23, 42, .08) !important;
}

.home-page .tool-card-badge {
    background: rgba(37, 99, 235, .1) !important;
    border-color: rgba(37, 99, 235, .18) !important;
    color: #1d4ed8 !important;
}

.home-page .tool-card-badge.ai {
    background: rgba(124, 58, 237, .12) !important;
    border-color: rgba(124, 58, 237, .22) !important;
    color: #6d28d9 !important;
}

.home-page .tool-card-badge.new {
    background: rgba(20, 184, 166, .12) !important;
    border-color: rgba(20, 184, 166, .24) !important;
    color: #0f766e !important;
}

.hero-search input,
.home-page .tools-search-wrap,
.home-page .tools-search-wrap input {
    background: rgba(255, 255, 255, .88) !important;
    color: var(--text) !important;
    border-color: rgba(148, 163, 184, .24) !important;
}

[data-theme="dark"] .home-page .popular-workflow-card,
[data-theme="dark"] .home-page .tool-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, .82), rgba(30, 41, 59, .68)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .home-page .popular-workflow-card:hover,
[data-theme="dark"] .home-page .tool-card:hover {
    background: linear-gradient(145deg, rgba(30, 41, 59, .92), rgba(15, 23, 42, .82)) !important;
    border-color: rgba(109, 93, 252, .62) !important;
    box-shadow: 0 24px 60px rgba(37, 99, 235, .24), 0 10px 30px rgba(15, 23, 42, .18) !important;
}

[data-theme="dark"] .home-page .tool-card-ai,
[data-theme="dark"] .home-page .ai-tools-grid .tool-card,
[data-theme="dark"] .home-page .featured-ai-card {
    background: linear-gradient(145deg, rgba(30, 27, 75, .86), rgba(15, 23, 42, .72)) !important;
    border-color: rgba(129, 140, 248, .3) !important;
}

[data-theme="dark"] .home-page .popular-workflow-card h3,
[data-theme="dark"] .home-page .tool-card h3 {
    color: #f8fafc !important;
}

[data-theme="dark"] .home-page .popular-workflow-card p,
[data-theme="dark"] .home-page .tool-card p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .home-page .popular-workflow-action {
    color: #93c5fd !important;
    text-shadow: 0 0 18px rgba(37, 99, 235, .28) !important;
}

[data-theme="dark"] .home-page .popular-workflow-card:hover .popular-workflow-action {
    color: #c4b5fd !important;
}

[data-theme="dark"] .home-page .popular-workflow-icon,
[data-theme="dark"] .home-page .tool-icon-tile {
    background: rgba(255, 255, 255, .11) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    color: #bfdbfe !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 22px rgba(15, 23, 42, .2) !important;
}

[data-theme="dark"] .home-page .tool-card-badge {
    background: rgba(37, 99, 235, .24) !important;
    border-color: rgba(147, 197, 253, .28) !important;
    color: #bfdbfe !important;
}

[data-theme="dark"] .home-page .tool-card-badge.ai {
    background: rgba(124, 58, 237, .28) !important;
    border-color: rgba(196, 181, 253, .32) !important;
    color: #ddd6fe !important;
}

[data-theme="dark"] .home-page .tool-card-badge.new {
    background: rgba(20, 184, 166, .22) !important;
    border-color: rgba(94, 234, 212, .3) !important;
    color: #99f6e4 !important;
}

[data-theme="dark"] .hero-search input,
[data-theme="dark"] .home-page .tools-search-wrap,
[data-theme="dark"] .home-page .tools-search-wrap input {
    background: rgba(28, 25, 41, .84) !important;
    color: var(--text) !important;
    border-color: rgba(255, 255, 255, .1) !important;
}

[data-theme="dark"] .acc-dashboard-hero,
[data-theme="dark"] .acc-card.acc-card,
[data-theme="dark"] .acc-profile-chip,
[data-theme="dark"] .acc-usage-stat,
[data-theme="dark"] .acc-history-row.acc-history-row,
[data-theme="dark"] .acc-workflow-card,
[data-theme="dark"] .acc-danger-details {
    background: linear-gradient(145deg, rgba(28, 25, 41, .9), rgba(19, 17, 31, .78)) !important;
    border-color: rgba(255, 255, 255, .09) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .26) !important;
}

[data-theme="dark"] .acc-dashboard-hero h1,
[data-theme="dark"] .acc-profile-chip strong,
[data-theme="dark"] .acc-plan-summary h2,
[data-theme="dark"] .acc-usage-stat strong,
[data-theme="dark"] .acc-section-heading h2,
[data-theme="dark"] .acc-workflow-card strong,
[data-theme="dark"] .acc-account-list strong {
    color: var(--text) !important;
}

[data-theme="dark"] .acc-dashboard-hero p,
[data-theme="dark"] .acc-profile-chip > div:last-child > span,
[data-theme="dark"] .acc-plan-summary p,
[data-theme="dark"] .acc-usage-stat span,
[data-theme="dark"] .acc-workflow-card small,
[data-theme="dark"] .acc-account-list span,
[data-theme="dark"] .acc-history-nudge.acc-history-nudge {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .acc-plan-benefits span,
[data-theme="dark"] .acc-history-action,
[data-theme="dark"] .acc-workflow-card span {
    background: rgba(79, 110, 247, .14) !important;
    border-color: rgba(129, 140, 248, .24) !important;
    color: #bfdbfe !important;
}

[data-theme="dark"] .acc-danger-details summary {
    color: #fca5a5 !important;
}

[data-theme="dark"] .pricing-premium-page {
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, .16), transparent 30%),
        linear-gradient(135deg, rgba(19, 17, 31, .82), rgba(28, 25, 41, .72)) !important;
}

[data-theme="dark"] .pricing-premium-page .pricing-card,
[data-theme="dark"] .pricing-premium-page .pricing-addons,
[data-theme="dark"] .pricing-premium-page .compare-table-wrap,
[data-theme="dark"] .pricing-premium-page .audience-card,
[data-theme="dark"] .pricing-premium-page .faq-item,
[data-theme="dark"] .pricing-premium-page .pricing-faq {
    background: linear-gradient(145deg, rgba(28, 25, 41, .9), rgba(19, 17, 31, .76)) !important;
    border-color: rgba(255, 255, 255, .09) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .24) !important;
}

[data-theme="dark"] .pricing-premium-page .pricing-card-featured {
    background:
        radial-gradient(circle at top right, rgba(109, 93, 252, .24), transparent 36%),
        linear-gradient(145deg, rgba(36, 32, 61, .96), rgba(24, 22, 43, .9)) !important;
    border-color: rgba(129, 140, 248, .48) !important;
    box-shadow: 0 30px 80px rgba(79, 70, 229, .24) !important;
}

[data-theme="dark"] .pricing-premium-page .pricing-hero h1,
[data-theme="dark"] .pricing-premium-page .pricing-plan-name,
[data-theme="dark"] .pricing-premium-page .pricing-price,
[data-theme="dark"] .pricing-premium-page .pricing-addons h2,
[data-theme="dark"] .pricing-premium-page .pricing-compare h2,
[data-theme="dark"] .pricing-premium-page .pricing-audience h2,
[data-theme="dark"] .pricing-premium-page .pricing-faq h2,
[data-theme="dark"] .pricing-premium-page .faq-item h3,
[data-theme="dark"] .pricing-premium-page .compare-table th {
    color: var(--text) !important;
}

[data-theme="dark"] .pricing-premium-page .pricing-hero p,
[data-theme="dark"] .pricing-premium-page .pricing-desc,
[data-theme="dark"] .pricing-premium-page .pricing-features li,
[data-theme="dark"] .pricing-premium-page .faq-item p,
[data-theme="dark"] .pricing-premium-page .pricing-trust-row span {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .pricing-premium-page .pricing-trust-row span,
[data-theme="dark"] .pricing-premium-page .pricing-btn-free,
[data-theme="dark"] .pricing-premium-page .addon-card {
    background: rgba(28, 25, 41, .82) !important;
    border-color: rgba(255, 255, 255, .1) !important;
}

[data-theme="dark"] .pricing-premium-page .compare-table th,
[data-theme="dark"] .pricing-premium-page .compare-section-row td {
    background: rgba(79, 110, 247, .14) !important;
}

[data-theme="dark"] .support-chat-window {
    background: linear-gradient(145deg, rgba(15, 17, 23, .96), rgba(28, 25, 41, .92)) !important;
    border-color: rgba(255, 255, 255, .09) !important;
}

[data-theme="dark"] .support-chat-header {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .14), transparent 36%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 44%, #2563eb 100%) !important;
    border-bottom-color: rgba(255, 255, 255, .08) !important;
}

[data-theme="dark"] .support-suggestions-label,
[data-theme="dark"] .support-chat-footer {
    color: #94a3b8 !important;
}

[data-theme="dark"] .support-chat-messages,
[data-theme="dark"] .support-suggestions {
    background: rgba(15, 17, 23, .88) !important;
}

[data-theme="dark"] .support-chat-input-row,
[data-theme="dark"] .support-chat-footer {
    background: rgba(28, 25, 41, .9) !important;
    border-color: rgba(255, 255, 255, .08) !important;
}

[data-theme="dark"] .support-chat-input {
    background: rgba(15, 17, 23, .86) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .support-chat-input::placeholder {
    color: #94a3b8 !important;
}

[data-theme="dark"] .profile-dropdown {
    background: rgba(28, 25, 41, .96) !important;
    border-color: rgba(255, 255, 255, .1) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .36) !important;
}

[data-theme="dark"] .profile-menu-item,
[data-theme="dark"] .profile-theme-btn {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .profile-menu-item:hover,
[data-theme="dark"] .profile-theme-btn:hover {
    background: rgba(79, 110, 247, .14) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .profile-theme-btn {
    background: rgba(19, 17, 31, .72) !important;
    border-color: rgba(255, 255, 255, .1) !important;
}

[data-theme="dark"] .profile-theme-btn.active {
    background: rgba(79, 110, 247, .18) !important;
    border-color: rgba(79, 110, 247, .52) !important;
    color: #bfdbfe !important;
}

[data-theme="dark"] .profile-menu-signout:hover {
    background: rgba(239, 68, 68, .12) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .tool-page .workspace-card,
[data-theme="dark"] .tool-page .settings-card,
[data-theme="dark"] .tool-page .upload-card,
[data-theme="dark"] .tool-page .result-container,
[data-theme="dark"] .tool-page .error-container {
    background: linear-gradient(145deg, rgba(28, 25, 41, .9), rgba(19, 17, 31, .78)) !important;
    border-color: rgba(255, 255, 255, .09) !important;
    color: var(--text) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .24) !important;
}

/* ── Tablet navigation polish ─────────────────────────────── */
@media (max-width: 960px) {
    .navbar {
        gap: .65rem !important;
        padding-inline: 1rem !important;
    }

    .nav-search {
        display: none !important;
    }

    .nav-user-chip {
        max-width: 118px !important;
    }

    .nav-user-name {
        max-width: 52px !important;
    }

    .auth-buttons {
        gap: .35rem !important;
    }

    .login-btn,
    .signup-btn {
        padding-inline: .72rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .hamburger {
        position: relative !important;
        z-index: 1210 !important;
    }

    .mob-backdrop {
        top: 64px !important;
        z-index: 1190 !important;
    }

    .mob-drawer {
        left: auto !important;
        right: 12px !important;
        top: 72px !important;
        bottom: auto !important;
        width: min(420px, calc(100vw - 32px)) !important;
        max-height: calc(100vh - 96px) !important;
        border: 1px solid var(--border) !important;
        border-radius: 24px !important;
        box-shadow: 0 28px 80px rgba(15, 23, 42, .24) !important;
        overflow-y: auto !important;
        z-index: 1200 !important;
    }

    .mob-close {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mob-backdrop {
        z-index: 1190 !important;
    }

    .mob-drawer {
        left: 0 !important;
        right: 0 !important;
        top: 64px !important;
        bottom: 0 !important;
        width: auto !important;
        max-height: none !important;
        border-radius: 0 !important;
        z-index: 1200 !important;
    }

    .hamburger {
        position: relative !important;
        z-index: 1210 !important;
    }
}

@media (max-width: 1100px) {
    .mob-header {
        padding: .72rem 1rem .62rem !important;
    }

    .mob-quick-row {
        flex-wrap: wrap !important;
        gap: .45rem !important;
        padding: .7rem 1rem !important;
    }

    .mob-quick-btn {
        padding: .45rem .72rem !important;
    }

    .mob-divider {
        margin: .12rem 0 !important;
    }

    .mob-section-header {
        padding: .68rem 1rem !important;
        font-size: .9rem !important;
    }

    .mob-section-header-left {
        gap: .62rem !important;
    }

    .mob-section-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .mob-section-body {
        padding: .3rem .65rem .6rem !important;
    }

    .mob-link {
        gap: .62rem !important;
        padding: .5rem .62rem !important;
    }

    .mob-link-icon {
        width: 24px !important;
        font-size: 1rem !important;
    }

    .mob-link-name {
        font-size: .84rem !important;
    }

    .mob-link-desc {
        font-size: .72rem !important;
    }

    .mob-bottom-links {
        gap: .35rem !important;
        padding: .72rem 1rem 1rem !important;
    }
}

/* ── Enterprise homepage refresh ──────────────────────────── */
.home-page {
    --home-max: 1240px;
    --home-card-border: rgba(148, 163, 184, .18);
    --home-card-bg: rgba(255, 255, 255, .82);
    --home-card-bg-strong: rgba(255, 255, 255, .94);
    --home-shadow: 0 24px 70px rgba(15, 23, 42, .1);
    color: var(--text);
}

.hero-section.hero-split-layout {
    width: min(var(--home-max), calc(100% - 64px)) !important;
    max-width: var(--home-max) !important;
    margin: 34px auto 28px !important;
    padding: clamp(42px, 6vw, 76px) clamp(28px, 4vw, 58px) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 34px !important;
    background:
        radial-gradient(circle at 18% 10%, rgba(109, 93, 252, .16), transparent 32%),
        radial-gradient(circle at 95% 20%, rgba(6, 182, 212, .15), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(248, 250, 252, .72)) !important;
    box-shadow: var(--home-shadow) !important;
    backdrop-filter: blur(18px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
}

.hero-split-text h1 {
    max-width: 650px !important;
    margin-bottom: 20px !important;
    font-size: clamp(3.05rem, 6vw, 5.8rem) !important;
    line-height: .94 !important;
    letter-spacing: -.065em !important;
}

.hero-split-text p {
    max-width: 560px !important;
    color: var(--text-secondary) !important;
    font-size: clamp(1rem, 1.4vw, 1.16rem) !important;
    line-height: 1.75 !important;
}

.hero-no-trials-badge {
    width: fit-content !important;
    margin-bottom: 18px !important;
    border: 1px solid rgba(109, 93, 252, .2) !important;
    background: rgba(255, 255, 255, .76) !important;
    color: #4f46e5 !important;
    box-shadow: 0 12px 34px rgba(37, 99, 235, .08) !important;
}

.hero-split-illustration {
    align-self: center !important;
    max-width: 620px !important;
    padding: 10px !important;
}

.hero-split-illustration svg {
    filter: drop-shadow(0 28px 50px rgba(15, 23, 42, .12));
}

.hero-split-layout .hero-stats-row {
    width: fit-content !important;
    margin-top: 28px !important;
    border-color: rgba(148, 163, 184, .18) !important;
    background: rgba(255, 255, 255, .72) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .07) !important;
}

.hero-cta-primary,
.hero-cta-secondary {
    min-height: 48px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
}

.hero-cta-primary {
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%) !important;
    box-shadow: 0 18px 34px rgba(37, 99, 235, .24) !important;
}

.hero-cta-secondary {
    border: 1px solid rgba(148, 163, 184, .24) !important;
    background: rgba(255, 255, 255, .74) !important;
    color: var(--text) !important;
}

.home-command-center,
.tools-section,
.founder-statement,
.home-mid-cta,
.home-trust-block {
    width: min(var(--home-max), calc(100% - 64px)) !important;
    max-width: var(--home-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.home-command-center {
    margin-top: 28px !important;
    margin-bottom: 26px !important;
    padding: 34px !important;
    border: 1px solid var(--home-card-border) !important;
    border-radius: 30px !important;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .1), transparent 34%),
        var(--home-card-bg) !important;
    box-shadow: 0 20px 54px rgba(15, 23, 42, .08) !important;
    backdrop-filter: blur(16px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(130%) !important;
}

.home-section-heading {
    max-width: 780px;
    margin-bottom: 22px;
}

.home-section-heading--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.home-section-heading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: #2563eb;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.home-section-heading span strong {
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(109, 93, 252, .12);
    color: #6d28d9;
    font-size: .68rem;
}

.home-section-heading h2 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3vw, 3rem);
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.home-section-heading p {
    max-width: 690px;
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.home-section-heading--center p {
    margin-left: auto;
    margin-right: auto;
}

.home-command-search.tools-search-wrap {
    max-width: 900px !important;
    margin: 0 auto !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 18px 46px rgba(37, 99, 235, .12) !important;
}

.home-command-search input {
    min-height: 60px !important;
    font-size: 1rem !important;
    font-weight: 650 !important;
}

.home-command-hints {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.home-command-hints span {
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, .62);
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 800;
}

.trust-bar {
    width: min(var(--home-max), calc(100% - 64px)) !important;
    max-width: var(--home-max) !important;
    margin: 0 auto 28px !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .62) !important;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .06) !important;
}

.tools-section {
    display: grid !important;
    gap: 54px !important;
    padding: 12px 0 78px !important;
}

.tools-category {
    margin-bottom: 0 !important;
}

.popular-workflows-section,
.home-ai-section,
.popular-fixes-section,
.home-library-category {
    padding: 0 !important;
}

.popular-workflows-header {
    display: block !important;
    margin-bottom: 22px !important;
}

.popular-workflows-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.popular-workflow-card {
    min-height: 238px !important;
    padding: 24px !important;
    border-radius: 24px !important;
    gap: 13px !important;
}

.popular-workflow-card h3 {
    font-size: 1.08rem !important;
    line-height: 1.18 !important;
}

.popular-workflow-card p {
    line-height: 1.6 !important;
}

.popular-workflow-action {
    margin-top: auto !important;
    font-size: .88rem !important;
}

.ai-tools-grid {
    opacity: .94;
}

.home-ai-section .tool-card {
    min-height: 176px !important;
}

.popular-fixes-section {
    margin-top: 48px !important;
}

.popular-fixes-grid {
    gap: 18px !important;
}

.popular-fixes-grid .tool-card {
    min-height: 174px !important;
}

.home-mid-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, .18), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .82));
    box-shadow: 0 24px 64px rgba(37, 99, 235, .12);
}

.home-mid-cta span {
    color: #2563eb;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.home-mid-cta h2 {
    margin: 7px 0 8px;
    color: var(--text);
    font-size: clamp(1.75rem, 2.6vw, 2.6rem);
    letter-spacing: -.04em;
}

.home-mid-cta p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.home-mid-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.home-trust-block {
    padding: 38px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 32px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 20px 54px rgba(15, 23, 42, .08);
}

.home-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-trust-card {
    min-height: 178px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    background: rgba(255, 255, 255, .78);
}

.home-trust-card span {
    display: inline-flex;
    margin-bottom: 28px;
    color: #2563eb;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.home-trust-card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1rem;
    letter-spacing: -.02em;
}

.home-trust-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.6;
}

.home-library-heading {
    margin-bottom: -28px;
}

.home-library-category .tools-category-title,
.tools-category > .tools-category-title {
    margin-bottom: 14px !important;
    color: var(--text) !important;
    font-size: .92rem !important;
    font-weight: 900 !important;
    letter-spacing: -.01em !important;
    text-transform: none !important;
}

.tools-grid {
    gap: 16px !important;
}

.home-page .tool-card {
    min-height: 156px;
    border-radius: 20px !important;
}

[data-theme="dark"] .hero-section.hero-split-layout {
    background:
        radial-gradient(circle at 18% 10%, rgba(109, 93, 252, .24), transparent 32%),
        radial-gradient(circle at 95% 20%, rgba(6, 182, 212, .18), transparent 34%),
        linear-gradient(135deg, rgba(28, 25, 41, .9), rgba(19, 17, 31, .74)) !important;
    border-color: rgba(255, 255, 255, .09) !important;
}

[data-theme="dark"] .hero-no-trials-badge,
[data-theme="dark"] .hero-split-layout .hero-stats-row,
[data-theme="dark"] .hero-cta-secondary,
[data-theme="dark"] .home-command-center,
[data-theme="dark"] .home-mid-cta,
[data-theme="dark"] .home-trust-block,
[data-theme="dark"] .trust-bar {
    background: linear-gradient(145deg, rgba(28, 25, 41, .88), rgba(19, 17, 31, .72)) !important;
    border-color: rgba(255, 255, 255, .09) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .24) !important;
}

[data-theme="dark"] .home-command-search.tools-search-wrap,
[data-theme="dark"] .home-command-hints span,
[data-theme="dark"] .home-trust-card {
    background: rgba(28, 25, 41, .78) !important;
    border-color: rgba(255, 255, 255, .1) !important;
}

[data-theme="dark"] .home-command-hints span,
[data-theme="dark"] .home-trust-card p {
    color: var(--text-secondary) !important;
}

@media (max-width: 1100px) {
    .hero-section.hero-split-layout {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    .hero-split-text,
    .hero-split-text p,
    .hero-split-layout .hero-stats-row,
    .hero-no-trials-badge {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-split-text .hero-cta-row {
        justify-content: center !important;
    }

    .popular-workflows-grid,
    .home-trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-mid-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-mid-cta-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .hero-section.hero-split-layout,
    .home-command-center,
    .tools-section,
    .founder-statement,
    .home-mid-cta,
    .home-trust-block,
    .trust-bar {
        width: min(100%, calc(100% - 28px)) !important;
    }

    .hero-section.hero-split-layout {
        margin-top: 18px !important;
        padding: 30px 18px !important;
        border-radius: 26px !important;
    }

    .hero-split-text h1 {
        font-size: clamp(2.6rem, 15vw, 4rem) !important;
    }

    .hero-split-layout .hero-stats-row {
        width: 100% !important;
    }

    .home-command-center,
    .home-mid-cta,
    .home-trust-block {
        padding: 22px !important;
        border-radius: 24px !important;
    }

    .home-command-search input {
        min-height: 54px !important;
        font-size: .92rem !important;
    }

    .popular-workflows-grid,
    .home-trust-grid {
        grid-template-columns: 1fr !important;
    }

    .popular-workflow-card {
        min-height: 190px !important;
    }

    .trust-bar {
        border-radius: 24px !important;
    }

    .home-mid-cta-actions,
    .home-mid-cta-actions a {
        width: 100%;
    }

    .home-mid-cta-actions a {
        justify-content: center;
    }
}

/* Modern SaaS footer */
.site-footer {
    margin-top: 0 !important;
    padding: 56px 0 0 !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(248,250,252,0.9)) !important;
    border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
    color: var(--text);
}

[data-theme="dark"] .site-footer {
    background: linear-gradient(180deg, rgba(15,23,42,0.72), rgba(2,6,23,0.92)) !important;
    border-top-color: rgba(148, 163, 184, 0.16) !important;
}

.site-footer .footer-container {
    width: min(1180px, calc(100% - (var(--page-gutter, 32px) * 2)));
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 0 42px !important;
    display: grid !important;
    grid-template-columns: minmax(240px, 0.95fr) minmax(0, 1.65fr) !important;
    gap: clamp(36px, 6vw, 72px) !important;
    align-items: start;
}

.site-footer .footer-brand {
    min-width: 0;
}

.site-footer .footer-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px !important;
    text-decoration: none;
}

.site-footer .nav-logo-wrap {
    gap: 10px !important;
}

.site-footer .nav-logo-tagline {
    display: none !important;
}

.site-footer .footer-tagline {
    max-width: 280px;
    margin: 0 0 16px !important;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.65;
}

.site-footer .footer-signin {
    margin: 0 0 18px;
}

.site-footer .footer-signin-label {
    margin: 0 0 8px !important;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.site-footer .footer-signin-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer .footer-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.site-footer .footer-signin-btn:hover {
    background: rgba(255,255,255,0.95);
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
}

[data-theme="dark"] .site-footer .footer-signin-btn {
    background: rgba(15, 23, 42, 0.74);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .site-footer .footer-signin-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(147, 197, 253, 0.4);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.18);
}

.footer-trust-line {
    max-width: 320px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.7;
}

.site-footer .footer-links {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(24px, 4vw, 48px) !important;
}

.site-footer .footer-col h4 {
    margin: 0 0 14px !important;
    color: var(--text);
    font-family: var(--font-heading, inherit);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer .footer-col a {
    display: block;
    width: fit-content;
    margin: 0 0 10px !important;
    color: var(--text-secondary);
    font-size: 0.91rem;
    line-height: 1.45;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.site-footer .footer-col a:hover {
    color: #2563eb;
    transform: translateX(2px);
}

[data-theme="dark"] .site-footer .footer-col a:hover {
    color: #93c5fd;
}

.site-footer .footer-bottom {
    width: min(1180px, calc(100% - (var(--page-gutter, 32px) * 2)));
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 0 28px !important;
    border-top: 1px solid rgba(148, 163, 184, 0.2) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

[data-theme="dark"] .site-footer .footer-bottom {
    border-top-color: rgba(148, 163, 184, 0.14) !important;
}

.site-footer .footer-bottom p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.site-footer .footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.site-footer .footer-bottom a:hover {
    color: #2563eb;
}

[data-theme="dark"] .site-footer .footer-bottom a:hover {
    color: #93c5fd;
}

@media (max-width: 860px) {
    .site-footer {
        padding-top: 42px !important;
    }

    .site-footer .footer-container {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .site-footer .footer-tagline,
    .footer-trust-line {
        max-width: 520px;
    }
}

@media (max-width: 640px) {
    .site-footer .footer-container,
    .site-footer .footer-bottom {
        width: min(100%, calc(100% - (var(--page-gutter-mobile, 16px) * 2)));
    }

    .site-footer .footer-links {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .site-footer .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Brand system */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

img.brand-logo {
    height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    img.brand-logo {
        height: 42px;
    }
}

.brand-mark {
    display: block;
    flex: 0 0 auto;
    filter: drop-shadow(0 8px 18px rgba(37, 99, 235, 0.18));
}

.brand-text {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1;
    white-space: nowrap;
}

.brand-text span {
    color: var(--brand-primary);
}

.brand-subtext {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

[data-theme="dark"] .brand-mark {
    filter: drop-shadow(0 8px 18px rgba(96, 165, 250, 0.18));
}

[data-theme="dark"] .brand-text span {
    color: #93C5FD;
}

.nav-brand {
    letter-spacing: 0;
}

.nav-brand .brand-logo {
    min-height: 40px;
}

.nav-brand .brand-text {
    font-size: 1.12rem;
}

.brand-logo-mobile .brand-text {
    font-size: 1rem;
}

.site-footer .footer-logo-wrap {
    display: inline-flex;
    margin: 0 0 18px !important;
}

.site-footer .brand-logo {
    gap: 11px;
    height: auto;
    width: auto;
    display: inline-flex;
    object-fit: initial;
}

.site-footer .brand-text {
    font-size: 1.14rem;
}

/* Brand-critical polish: logo, nav, account menu, footer */

.brand-mark {
    align-self: center;
    filter: drop-shadow(0 7px 16px rgba(37, 99, 235, 0.14));
}

.brand-text {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-accent,
.brand-text span {
    color: var(--brand-primary);
}

.navbar {
    min-height: 72px;
    height: 72px;
    gap: 0.72rem;
    padding: 0 clamp(1rem, 2.4vw, 2rem);
    background: color-mix(in srgb, var(--navbar-bg) 92%, transparent);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    min-height: 72px;
    height: 72px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.nav-brand img.brand-logo {
    height: 58px;
    width: auto;
    object-fit: contain;
    display: block;
    min-height: 0;
}

@media (max-width: 768px) {
    .nav-brand img.brand-logo,
    .mob-header img.brand-logo {
        height: 42px;
        width: auto;
        object-fit: contain;
        display: block;
        min-height: 0;
    }
}

.nav-brand .brand-text {
    font-size: 1.11rem;
}

.nav-link {
    padding: 0.46rem 0.72rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
    color: var(--brand-primary);
}

.nav-search {
    max-width: 310px;
}

.nav-search input {
    height: 38px !important;
    padding-left: 2.35rem !important;
    background: color-mix(in srgb, var(--surface-2) 78%, transparent) !important;
    border-color: color-mix(in srgb, var(--border) 78%, transparent) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}

.nav-search input:focus {
    background: var(--surface) !important;
    border-color: color-mix(in srgb, var(--brand-primary) 46%, var(--border)) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 13%, transparent) !important;
}

.nav-search-icon {
    left: 0.9rem;
}

.nav-user-chip {
    min-height: 42px;
    padding: 0.32rem 0.46rem 0.32rem 0.38rem;
    gap: 0.58rem;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.nav-user-chip:hover {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--brand-primary) 28%, var(--border));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
}

.nav-user-avatar,
.nav-user-chip img,
.nav-user-chip .nav-user-avatar-img {
    width: 30px !important;
    height: 30px !important;
}

.nav-user-name {
    max-width: 118px;
    color: var(--text);
    font-weight: 650;
    letter-spacing: -0.01em;
}

.profile-dropdown {
    width: 292px;
    top: calc(100% + 12px);
    padding: 8px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 20px;
    box-shadow: var(--shadow-soft), 0 18px 54px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
}

.profile-dropdown-header {
    gap: 0.82rem;
    padding: 0.9rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-2) 54%, transparent);
}

.profile-dropdown-avatar,
.profile-dropdown-initials {
    width: 42px;
    height: 42px;
}

.profile-dropdown-initials {
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
}

.profile-dropdown-name {
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.profile-dropdown-email {
    margin-top: 2px;
    color: var(--text-secondary);
}

.profile-dropdown-divider {
    margin: 8px 4px;
    background: color-mix(in srgb, var(--border) 74%, transparent);
}

.profile-menu-item {
    min-height: 42px;
    gap: 0.72rem;
    padding: 0.68rem 0.82rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 560;
}

.profile-menu-item:hover {
    background: color-mix(in srgb, var(--brand-primary) 8%, transparent);
    color: var(--text);
}

.profile-menu-icon {
    color: color-mix(in srgb, var(--brand-primary) 72%, var(--text-muted));
}

.profile-menu-section-label {
    padding: 0.55rem 0.82rem 0.35rem;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.profile-theme-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0.25rem 0.45rem;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-2) 58%, transparent);
}

.profile-theme-btn {
    min-height: 54px;
    padding: 0.48rem 0.2rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 0.7rem;
}

.profile-theme-btn:hover {
    background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.profile-theme-btn.active {
    background: var(--surface);
    color: var(--brand-primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.profile-menu-signout {
    color: #DC2626;
}

.profile-menu-signout:hover,
[data-theme="dark"] .profile-menu-signout:hover {
    background: rgba(239,68,68,.12) !important;
    color: #DC2626;
}

.site-footer {
    padding-top: 60px !important;
}

.site-footer .footer-container {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.7fr) !important;
    gap: clamp(40px, 7vw, 84px) !important;
}

.site-footer .footer-brand-line {
    max-width: 320px;
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.site-footer .footer-tagline {
    max-width: 330px;
    margin-bottom: 18px !important;
}

.site-footer .footer-signin {
    margin-bottom: 20px;
}

.site-footer .footer-signin-icons {
    gap: 7px;
}

.site-footer .footer-signin-btn {
    width: 34px;
    height: 34px;
}

.footer-trust-line {
    max-width: 360px;
}

.site-footer .footer-links {
    align-items: start;
}

.site-footer .footer-col h4 {
    margin-bottom: 16px !important;
}

.site-footer .footer-col a {
    margin-bottom: 11px !important;
}

.site-footer .footer-bottom {
    padding-top: 24px !important;
}

[data-theme="dark"] .navbar {
    background: color-mix(in srgb, var(--navbar-bg) 88%, transparent);
}

[data-theme="dark"] .nav-search input {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

[data-theme="dark"] .nav-user-chip {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .profile-dropdown {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .profile-theme-btn.active {
    background: color-mix(in srgb, var(--surface) 84%, #ffffff 4%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

@media (max-width: 1100px) {
    .navbar {
        gap: 0.55rem;
    }

    .nav-link {
        padding-inline: 0.56rem;
    }
}

@media (max-width: 860px) {
    .site-footer .footer-container {
        grid-template-columns: 1fr !important;
    }
}

/* Logo system refinement */

.brand-mark {
    overflow: visible;
    transform: translateY(0);
}

.brand-text {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-accent {
    color: var(--brand-primary);
}

.nav-brand .brand-mark,
.site-footer .brand-mark {
    width: 32px;
    height: 32px;
}

.nav-brand .brand-text {
    font-size: 1.12rem;
}

.brand-logo-mobile .brand-mark {
    width: 28px;
    height: 28px;
}

.brand-logo-mobile .brand-text {
    font-size: 1rem;
}

.site-footer .brand-logo {
    gap: 12px;
}

.site-footer .brand-text {
    font-size: 1.15rem;
}

[data-theme="dark"] .brand-accent {
    color: #93C5FD;
}

/* About and Contact pages */
.about-page,
.contact-page {
    width: min(1180px, calc(100% - (var(--page-gutter, 32px) * 2)));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.about-hero,
.contact-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    margin-bottom: 32px;
    padding: clamp(32px, 5vw, 56px);
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    border-radius: var(--radius-panel, 24px);
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-secondary) 16%, transparent), transparent 36%),
        color-mix(in srgb, var(--surface) 84%, transparent);
    box-shadow: var(--shadow-soft);
}

.about-eyebrow,
.contact-eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--brand-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.about-hero h1,
.contact-hero h1 {
    max-width: 760px;
    margin: 0 0 16px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(2.65rem, 5vw, 4.85rem);
    font-weight: 750;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.about-hero p,
.contact-hero p,
.about-section-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.75;
}

.about-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.about-btn,
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 1.15rem;
    border-radius: 999px;
    font-weight: 750;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.about-btn-primary,
.contact-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    box-shadow: 0 16px 32px color-mix(in srgb, var(--brand-primary) 26%, transparent);
}

.about-btn-secondary,
.contact-btn-secondary {
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
}

.about-btn:hover,
.contact-btn:hover {
    transform: translateY(-2px);
}

.about-hero-card {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.about-flow-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.about-flow-card span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-flow-card strong {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.about-flow-card-accent {
    border-color: color-mix(in srgb, var(--brand-primary) 34%, var(--border));
    background: color-mix(in srgb, var(--brand-primary) 9%, var(--surface));
}

.about-flow-card-done {
    border-color: color-mix(in srgb, var(--brand-success) 34%, var(--border));
    background: color-mix(in srgb, var(--brand-success) 9%, var(--surface));
}

.about-flow-line {
    width: 2px;
    height: 22px;
    margin-left: 28px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
    border-radius: 999px;
}

.about-trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 34px;
}

.about-trust-strip div,
.contact-response-card,
.about-story-card,
.about-audience-card,
.about-principle-list > div,
.contact-intent-card,
.contact-guidance-card,
.about-final-cta,
.contact-final-cta {
    border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    border-radius: var(--radius-card, 20px);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.about-trust-strip div {
    padding: 18px;
}

.about-trust-strip strong,
.about-audience-card strong,
.about-principle-list strong {
    display: block;
    color: var(--text);
    font-weight: 800;
}

.about-trust-strip span,
.about-audience-card span {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.about-section {
    margin-top: 34px;
    padding: clamp(28px, 4vw, 42px);
    border-radius: var(--radius-panel, 24px);
}

.about-section-heading {
    margin-bottom: 22px;
}

.about-section-heading h2,
.contact-guidance-card h2,
.about-final-cta h2,
.contact-final-cta h2 {
    max-width: 760px;
    margin: 0 0 12px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: var(--heading-section-size, clamp(1.65rem, 2.2vw, 2.35rem));
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.about-story-grid,
.about-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.about-audience-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.about-story-card,
.about-audience-card,
.about-principle-list > div {
    padding: 22px;
}

.about-story-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.about-story-card p,
.about-principle-list p,
.contact-guidance-card p,
.contact-intent-card p,
.contact-final-cta p,
.about-final-cta p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-principle-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.about-principle-list span {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 900;
}

.about-principle-list strong {
    margin-bottom: 8px;
}

.about-final-cta,
.contact-final-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 40px;
    padding: clamp(28px, 4vw, 42px);
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-primary) 14%, transparent), transparent 34%),
        color-mix(in srgb, var(--surface) 86%, transparent);
}

.about-final-cta .about-actions,
.contact-final-cta .contact-actions {
    margin-top: 0;
}

.contact-response-card {
    padding: 24px;
}

.contact-response-card span {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-response-card strong {
    display: block;
    margin: 10px 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.65rem;
    letter-spacing: -0.04em;
}

.contact-intent-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.contact-intent-card {
    padding: 22px;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    font-weight: 900;
}

.contact-intent-card h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.contact-intent-card a,
.contact-inline-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--brand-primary);
    font-weight: 800;
    text-decoration: none;
}

.contact-intent-card a:hover,
.contact-inline-link:hover {
    text-decoration: underline;
}

.contact-guidance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 18px;
}

.contact-guidance-card {
    padding: clamp(24px, 4vw, 34px);
}

.contact-guidance-card ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.contact-guidance-card li {
    position: relative;
    padding-left: 24px;
    color: var(--text-secondary);
}

.contact-guidance-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--brand-success);
}

.contact-privacy-card {
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-success) 13%, transparent), transparent 36%),
        color-mix(in srgb, var(--surface) 86%, transparent);
}

[data-theme="dark"] .about-hero,
[data-theme="dark"] .contact-hero,
[data-theme="dark"] .about-hero-card,
[data-theme="dark"] .about-flow-card,
[data-theme="dark"] .about-trust-strip div,
[data-theme="dark"] .contact-response-card,
[data-theme="dark"] .about-story-card,
[data-theme="dark"] .about-audience-card,
[data-theme="dark"] .about-principle-list > div,
[data-theme="dark"] .contact-intent-card,
[data-theme="dark"] .contact-guidance-card,
[data-theme="dark"] .about-final-cta,
[data-theme="dark"] .contact-final-cta {
    background-color: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

@media (max-width: 980px) {
    .about-hero,
    .contact-hero,
    .contact-guidance-grid {
        grid-template-columns: 1fr;
    }

    .about-trust-strip,
    .about-audience-grid,
    .contact-intent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-story-grid,
    .about-principle-list {
        grid-template-columns: 1fr;
    }

    .about-final-cta,
    .contact-final-cta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .about-page,
    .contact-page {
        width: min(100%, calc(100% - (var(--page-gutter-mobile, 16px) * 2)));
        padding: 28px 0 56px;
    }

    .about-hero,
    .contact-hero,
    .about-final-cta,
    .contact-final-cta {
        padding: 24px;
        border-radius: 24px;
    }

    .about-hero h1,
    .contact-hero h1 {
        font-size: clamp(2.35rem, 13vw, 3.5rem);
    }

    .about-trust-strip,
    .about-audience-grid,
    .contact-intent-grid {
        grid-template-columns: 1fr;
    }

    .about-section {
        padding: 20px 0;
    }
}

/* Fill PDF Form premium workflow */
.fill-tool-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.fill-tool-page .tool-container {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
    margin: 0 auto;
}

.fill-hero {
    width: 100%;
    max-width: none;
    margin-bottom: 24px;
    text-align: left;
}

.fill-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    color: var(--text, #111827);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.fill-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary, #526173);
    font-size: 1rem;
    line-height: 1.7;
}

.fill-stepper {
    width: 100% !important;
    max-width: none;
    margin: 0 0 24px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fill-workflow-grid {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
    gap: 28px;
    align-items: start;
}

.fill-workspace-card,
.fill-settings-card {
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

.fill-settings-card {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fill-tool-page .panel-header {
    margin-bottom: 24px;
}

.fill-tool-page .panel-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: #6d5dfc;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.fill-tool-page .panel-header h2 {
    margin: 0 0 8px;
    color: var(--text, #111827);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.fill-tool-page .panel-header p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    line-height: 1.65;
}

.fill-workspace-card .file-upload-container,
.fill-workspace-card .upload-container,
.fill-workspace-card .upload-card,
.fill-workspace-card .upload-zone {
    width: 100%;
    max-width: none;
}

.fill-file-ready {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(109, 93, 252, .08), rgba(6, 182, 212, .08));
}

.fill-file-ready div {
    min-width: 0;
}

.fill-file-ready strong,
.fill-file-ready span {
    display: block;
}

.fill-file-ready strong {
    overflow: hidden;
    color: var(--text, #0f172a);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fill-file-ready span {
    margin-top: 4px;
    color: var(--text-secondary, #64748b);
    font-size: .9rem;
}

.fill-document-card {
    display: grid;
    gap: 22px;
    align-content: start;
    min-height: 100%;
    padding: 4px;
}

.fill-document-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(109, 93, 252, .18), rgba(6, 182, 212, .16)),
        rgba(255, 255, 255, .76);
    color: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .16);
}

.fill-document-icon span {
    font-size: .88rem;
    font-weight: 950;
    letter-spacing: .08em;
}

.fill-document-copy h2 {
    margin: 0 0 10px;
    color: var(--text, #0f172a);
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 2vw, 2.35rem);
    letter-spacing: -0.03em;
}

.fill-document-copy p {
    max-width: 580px;
    margin: 0;
    color: var(--text-secondary, #64748b);
    line-height: 1.7;
}

.fill-document-stats {
    display: grid;
    gap: 12px;
}

.fill-document-stats div {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: rgba(248, 250, 252, .78);
}

.fill-document-stats span,
.fill-document-stats strong {
    display: block;
}

.fill-document-stats span {
    margin-bottom: 6px;
    color: #6d5dfc;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.fill-document-stats strong {
    overflow-wrap: anywhere;
    color: var(--text, #0f172a);
    font-size: .98rem;
}

.fill-placement-note {
    padding: 16px 18px;
    border: 1px solid rgba(14, 165, 233, .2);
    border-radius: 18px;
    background: rgba(240, 249, 255, .82);
    color: var(--text-secondary, #64748b);
    line-height: 1.6;
}

.fill-fields-list {
    min-height: 0;
    max-height: min(560px, calc(100vh - 360px));
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
    padding: 0 6px 4px 0;
}

.fill-field-item {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    background: rgba(248, 250, 252, .78);
}

.fill-field-item .field-label {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    color: var(--text, #0f172a);
    font-weight: 800;
}

.fill-field-item .field-technical-name {
    color: var(--text-secondary, #64748b);
    font-size: .76rem;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.fill-field-item .field-input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 12px;
    background: rgba(255, 255, 255, .95);
    color: var(--text, #0f172a);
    padding: 10px 12px;
}

.fill-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary, #64748b);
}

.fill-primary-button,
.fill-secondary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.fill-primary-button {
    border: 0;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(37, 99, 235, .24);
}

.fill-primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, .32);
}

.fill-secondary-button {
    border: 1px solid rgba(148, 163, 184, .3);
    background: rgba(255, 255, 255, .82);
    color: var(--text, #0f172a);
}

.fill-secondary-button:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .34);
}

.fill-full-button {
    width: 100%;
    margin-top: 12px;
}

.fill-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.fill-state-card {
    display: grid;
    min-height: 360px;
    align-content: center;
    justify-items: center;
    gap: 12px;
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(248, 250, 252, .92), rgba(239, 246, 255, .78));
    text-align: center;
}

.fill-state-card h2,
.fill-state-card h3 {
    margin: 0;
    color: var(--text, #0f172a);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.fill-state-card p {
    max-width: 520px;
    margin: 0;
    color: var(--text-secondary, #64748b);
    line-height: 1.65;
}

.fill-state-icon {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #6d5dfc, #2563eb);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
}

.fill-success-card .fill-state-icon {
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

.fill-warning-card .fill-state-icon,
.fill-error-card .fill-state-icon {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.fill-value-list {
    display: grid;
    gap: 14px;
}

.fill-value-list div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    row-gap: 4px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    background: rgba(248, 250, 252, .78);
}

.fill-value-list span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    grid-row: span 2;
    border-radius: 10px;
    background: rgba(109, 93, 252, .1);
    color: #6d5dfc;
    font-weight: 900;
}

.fill-value-list strong {
    color: var(--text, #0f172a);
}

.fill-value-list p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    line-height: 1.55;
}

[data-theme="dark"] .fill-field-item,
[data-theme="dark"] .fill-document-stats div,
[data-theme="dark"] .fill-value-list div,
[data-theme="dark"] .fill-secondary-button {
    background: rgba(15, 23, 42, .72);
    border-color: rgba(148, 163, 184, .22);
}

[data-theme="dark"] .fill-state-card {
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, .18), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(30, 41, 59, .74));
    border-color: rgba(148, 163, 184, .22);
}

[data-theme="dark"] .fill-file-ready,
[data-theme="dark"] .fill-document-icon,
[data-theme="dark"] .fill-placement-note {
    background: rgba(15, 23, 42, .86);
    border-color: rgba(148, 163, 184, .24);
}

[data-theme="dark"] .fill-field-item .field-input {
    background: rgba(2, 6, 23, .72);
    border-color: rgba(148, 163, 184, .28);
    color: var(--text, #f8fafc);
}

@media (max-width: 980px) {
    .fill-tool-page .tool-container {
        width: min(100%, calc(100% - 24px));
    }

    .fill-workflow-grid {
        grid-template-columns: 1fr;
    }

    .fill-settings-card {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .fill-stepper {
        overflow-x: auto;
        border-radius: 20px;
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
}

@media (max-width: 640px) {
    .fill-file-ready,
    .fill-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .fill-document-card {
        gap: 18px;
    }

    .fill-fields-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

/* Global primary action buttons */
:root {
    --button-primary-gradient: linear-gradient(135deg, #6D5DFC 0%, #2563EB 55%, #06B6D4 100%);
    --button-primary-gradient-hover: linear-gradient(135deg, #5B4BEA 0%, #1D4ED8 55%, #0891B2 100%);
    --button-primary-gradient-active: linear-gradient(135deg, #4C3FD2 0%, #1E40AF 55%, #0E7490 100%);
    --button-primary-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
    --button-primary-shadow-hover: 0 18px 38px rgba(37, 99, 235, 0.32);
    --button-action-padding: 0.82rem 1.75rem;
    --button-action-radius: 12px;
}

.upload-button,
.process-button,
.download-button,
.bp-proc-btn,
.bp-dl-btn,
.cp-apply-btn,
.cp-download-btn,
.tp-translate-btn,
.tp-download-btn,
.fill-primary-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem !important;
    min-height: 48px !important;
    padding: var(--button-action-padding) !important;
    border: 0 !important;
    border-radius: var(--button-action-radius) !important;
    background: var(--button-primary-gradient) !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: var(--button-primary-shadow) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease !important;
}

.upload-button:hover,
.process-button:hover:not(:disabled),
.download-button:hover,
.bp-proc-btn:hover:not(:disabled),
.bp-dl-btn:hover,
.cp-apply-btn:hover:not(:disabled),
.cp-download-btn:hover,
.tp-translate-btn:hover:not(:disabled),
.tp-download-btn:hover,
.fill-primary-button:hover {
    background: var(--button-primary-gradient-hover) !important;
    box-shadow: var(--button-primary-shadow-hover) !important;
    transform: translateY(-1px) !important;
}

.upload-button:active,
.process-button:active:not(:disabled),
.download-button:active,
.bp-proc-btn:active:not(:disabled),
.bp-dl-btn:active,
.cp-apply-btn:active:not(:disabled),
.cp-download-btn:active,
.tp-translate-btn:active:not(:disabled),
.tp-download-btn:active,
.fill-primary-button:active {
    background: var(--button-primary-gradient-active) !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22) !important;
    transform: translateY(0) scale(0.99) !important;
}

.upload-button:focus-visible,
.process-button:focus-visible,
.download-button:focus-visible,
.bp-proc-btn:focus-visible,
.bp-dl-btn:focus-visible,
.cp-apply-btn:focus-visible,
.cp-download-btn:focus-visible,
.tp-translate-btn:focus-visible,
.tp-download-btn:focus-visible,
.fill-primary-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 32%, transparent) !important;
    outline-offset: 3px !important;
}

.process-button:disabled,
.process-button.disabled,
.bp-proc-btn:disabled,
.cp-apply-btn:disabled,
.tp-translate-btn:disabled,
.fill-primary-button:disabled {
    opacity: 0.52 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Tool page typography hierarchy */
:root {
    --tool-title-size: clamp(2.35rem, 4.2vw, 3.55rem);
    --tool-title-weight: 850;
    --tool-title-leading: 1.04;
    --tool-subtitle-color: #475569;
    --tool-body-color: #64748B;
    --tool-card-title-weight: 600;
    --tool-section-gap: 2rem;
}

[data-theme="dark"] {
    --tool-subtitle-color: #CBD5E1;
    --tool-body-color: #94A3B8;
}

.tool-container h1,
.tool-hero h1,
.ai-tool-hero h1,
.extract-invoice-hero h1,
.ocr-tool-hero h1,
.compare-tool-hero h1,
.edit-hero h1,
.annotate-hero h1,
.sign-hero h1,
.bp-hero-title,
.tp-title,
.cp-title,
.np-title,
.rp-title {
    font-size: var(--tool-title-size) !important;
    font-weight: var(--tool-title-weight) !important;
    line-height: var(--tool-title-leading) !important;
    letter-spacing: -0.035em !important;
    color: var(--text) !important;
    margin-bottom: 0.85rem !important;
}

.tool-subtitle,
.tool-hero p,
.ai-tool-hero p,
.ai-tool-card-header p,
.extract-invoice-hero p,
.ocr-tool-hero p,
.compare-tool-hero p,
.bp-header-left p,
.tp-subtitle,
.cp-subtitle,
.np-subtitle,
.rp-subtitle {
    color: var(--tool-subtitle-color) !important;
    font-size: clamp(1rem, 1.2vw, 1.08rem) !important;
    line-height: 1.68 !important;
    font-weight: 450 !important;
}

.tool-page p,
.tool-container p,
.ai-tool-container p,
.ocr-tool-container p,
.compare-tool-container p,
.edit-tool-container p,
.annotate-tool-container p,
.sign-tool-container p,
.bp-wrap p,
.tp-page p,
.cp-page p,
.np-shell p,
.rp-page p {
    color: var(--tool-body-color);
}

.tool-card h3,
.popular-fixes-grid .tool-card h3,
.ai-tool-card-header h2,
.review-section h3,
.bp-dz-title,
.bp-pl-title,
.bp-workflow-title,
.bp-preview-title,
.bp-prog-title,
.bp-activity-title,
.bp-insight-title,
.bp-result-title,
.tp-upload-title,
.tp-section-label,
.tp-result-title,
.cp-upload-title,
.cp-settings-title,
.np-upload-title,
.np-settings-title,
.rp-upload-title,
.rp-panel-title {
    font-weight: var(--tool-card-title-weight) !important;
    letter-spacing: -0.01em !important;
    color: var(--text) !important;
}

.tool-card p,
.popular-fixes-grid .tool-card p,
.upload-prompt p,
.upload-hint,
.file-size,
.bp-wrap small,
.tp-page small,
.cp-page small,
.np-shell small,
.rp-page small {
    color: var(--tool-body-color) !important;
}

.tool-container > section + section,
.tool-container > .workflow-grid + .faq-section,
.tool-page > .faq-section,
.ai-tool-container > section + section,
.ai-tool-container + .faq-section,
.ocr-tool-container + .faq-section,
.compare-tool-container + .faq-section,
.edit-tool-container + .faq-section,
.annotate-tool-container + .faq-section,
.sign-tool-container + .faq-section,
.bp-main + .bp-progress-section,
.bp-progress-section + .bp-insights-grid,
.tp-shell > section + section,
.cp-shell > section + section,
.np-shell > section + section,
.rp-shell > section + section {
    margin-top: var(--tool-section-gap) !important;
}

@media (max-width: 768px) {
    :root {
        --tool-title-size: clamp(2rem, 9vw, 2.7rem);
        --tool-section-gap: 1.5rem;
    }
}

/* Contextual post-success upsell benefits */
.post-success-upsell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
    border: 1px solid rgba(109, 93, 252, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.86));
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
    padding: 1rem 1rem 1rem 1.15rem;
    text-align: left;
}

.post-success-accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #6D5DFC 0%, #2563EB 58%, #06B6D4 100%);
}

.post-success-copy {
    position: relative;
    min-width: 0;
}

.post-success-copy strong {
    display: block;
    color: var(--text);
    font-size: 1.02rem;
    font-weight: 850;
    letter-spacing: -0.015em;
    margin-bottom: 0.3rem;
}

.post-success-copy p {
    margin: 0 0 0.75rem;
    color: var(--tool-body-color, #64748B);
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-success-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--button-primary-gradient, linear-gradient(135deg, #6D5DFC 0%, #2563EB 65%, #06B6D4 100%));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
    color: #fff !important;
    font-size: 0.84rem;
    font-weight: 850;
    line-height: 1.1;
    padding: 0.78rem 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-success-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.post-success-benefits {
    display: grid !important;
    gap: 0.45rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.post-success-benefits li {
    position: relative !important;
    padding-left: 1.15rem !important;
    color: #334155 !important;
    font-size: 0.82rem !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}

.post-success-benefits li::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.48em !important;
    width: 0.42rem !important;
    height: 0.42rem !important;
    border-radius: 999px !important;
    background: var(--brand-success) !important;
}

[data-theme="dark"] .post-success-benefits li {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .post-success-upsell {
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
    border-color: rgba(148, 163, 184, 0.22);
}

@media (max-width: 700px) {
    .post-success-upsell {
        grid-template-columns: 1fr;
    }

    .post-success-link {
        width: 100%;
        white-space: normal;
        text-align: center;
    }
}

/* Global processing state: staged, non-blocking frontend polish */
.processing-container,
.ai-processing-container,
.tp-processing-card,
.pdf-loading-card,
.sf-viewport-loading-card {
    position: relative;
    overflow: hidden;
}

.processing-container .spinner,
.acc-loading .spinner,
.pdf-loading-spinner,
.tp-proc-spinner {
    width: min(100%, 320px) !important;
    height: 8px !important;
    margin: 0 auto 0.75rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.72) 48%, transparent 100%),
        linear-gradient(90deg, #6D5DFC 0%, #2563EB 55%, #06B6D4 100%) !important;
    background-size: 80px 100%, 100% 100% !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22) !important;
    animation: processing-bar-sheen 1.25s ease-in-out infinite !important;
}

.processing-container::before,
.ai-processing-container::before,
.tp-processing-card::before,
.pdf-loading-card::before,
.sf-viewport-loading-card::before {
    content: "";
    display: block;
    width: min(100%, 320px);
    height: 8px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.72) 48%, transparent 100%),
        linear-gradient(90deg, #6D5DFC 0%, #2563EB 55%, #06B6D4 100%);
    background-size: 80px 100%, 100% 100%;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
    animation: processing-bar-sheen 1.25s ease-in-out infinite;
}

.processing-container:has(.spinner)::before,
.pdf-loading-card:has(.pdf-loading-spinner)::before,
.tp-processing-card:has(.tp-proc-spinner)::before {
    display: none;
}

.processing-container::after,
.ai-processing-container::after,
.tp-processing-card::after,
.pdf-loading-card::after,
.sf-viewport-loading-card::after {
    content: "Uploading...   Processing document...   Finalizing output...";
    display: block;
    max-width: 520px;
    margin: 0.35rem auto 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.45;
    letter-spacing: 0.01em;
    text-align: center;
    animation: processing-stage-pulse 2.4s ease-in-out infinite;
}

.processing-container.compact::after {
    content: "Reading document...   Checking pages...   Preparing controls...";
}

.processing-container h2,
.ai-processing-container h3,
.tp-processing-card h2,
.pdf-loading-msg,
.sf-viewport-loading-title {
    animation: processing-title-lift 2.4s ease-in-out infinite;
}

.ai-processing-steps,
.tp-processing-steps {
    position: relative;
}

.ai-processing-step,
.tp-processing-step {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ai-processing-step.done,
.tp-processing-step.done {
    transform: translateX(2px);
}

@keyframes processing-bar-sheen {
    0% {
        background-position: -90px 0, 0 0;
        opacity: 0.78;
    }

    50% {
        opacity: 1;
    }

    100% {
        background-position: calc(100% + 90px) 0, 0 0;
        opacity: 0.78;
    }
}

@keyframes processing-stage-pulse {
    0%, 100% {
        opacity: 0.68;
    }

    45% {
        opacity: 1;
    }
}

@keyframes processing-title-lift {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .processing-container .spinner,
    .acc-loading .spinner,
    .pdf-loading-spinner,
    .tp-proc-spinner,
    .processing-container::before,
    .ai-processing-container::before,
    .tp-processing-card::before,
    .pdf-loading-card::before,
    .sf-viewport-loading-card::before,
    .processing-container::after,
    .ai-processing-container::after,
    .tp-processing-card::after,
    .pdf-loading-card::after,
    .sf-viewport-loading-card::after,
    .processing-container h2,
    .ai-processing-container h3,
    .tp-processing-card h2,
    .pdf-loading-msg,
    .sf-viewport-loading-title {
        animation: none !important;
    }
}

/* Standard trust signals across tool workflows */
.trust-signals,
.upload-container:not(:has(.trust-signals))::after,
.compare-upload-card::after,
.reader-file-upload:not(:has(.trust-signals))::after,
.tp-upload-panel:not(:has(.trust-signals))::after,
.result-container::after,
.ai-result-card::after,
.tp-result::after,
.bp-result::after,
.fill-success-card::after {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
}

.upload-container:not(:has(.trust-signals))::after,
.compare-upload-card::after,
.reader-file-upload:not(:has(.trust-signals))::after,
.tp-upload-panel:not(:has(.trust-signals))::after,
.result-container::after,
.ai-result-card::after,
.tp-result::after,
.bp-result::after,
.fill-success-card::after {
    content: "Files deleted in 1 hour  |  Encrypted processing  |  No data stored";
}

.trust-signals span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    white-space: nowrap;
}

.trust-signals span::before {
    content: "";
    width: 0.42rem;
    height: 0.42rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--brand-success);
}

.upload-container:not(:has(.trust-signals))::after,
.reader-file-upload:not(:has(.trust-signals))::after,
.tp-upload-panel:not(:has(.trust-signals))::after {
    padding-top: 0.85rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.result-container::after,
.ai-result-card::after,
.tp-result::after,
.bp-result::after,
.fill-success-card::after {
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

[data-theme="dark"] .trust-signals,
[data-theme="dark"] .upload-container:not(:has(.trust-signals))::after,
[data-theme="dark"] .compare-upload-card::after,
[data-theme="dark"] .reader-file-upload:not(:has(.trust-signals))::after,
[data-theme="dark"] .tp-upload-panel:not(:has(.trust-signals))::after,
[data-theme="dark"] .result-container::after,
[data-theme="dark"] .ai-result-card::after,
[data-theme="dark"] .tp-result::after,
[data-theme="dark"] .bp-result::after,
[data-theme="dark"] .fill-success-card::after {
    color: #CBD5E1;
}

/* Modern full-width tool shell: the page itself is not a card. */
.tool-page {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 72px);
    margin: 0 !important;
    padding: 48px 0 72px !important;
    box-sizing: border-box;
    background:
        radial-gradient(circle at top left, rgba(109, 40, 217, 0.12), transparent 32%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%) !important;
}

.tool-page:has(.workflow-grid) > .tool-container,
.tool-page:has(.stepper) > .tool-container {
    width: min(1320px, calc(100% - 64px)) !important;
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    box-sizing: border-box;
}

.tool-page:has(.workflow-grid) .tool-hero,
.tool-page:has(.stepper) .tool-hero {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    text-align: left !important;
    box-sizing: border-box;
}

.tool-page:has(.workflow-grid) .tool-hero h1,
.tool-page:has(.stepper) .tool-hero h1 {
    max-width: 920px;
}

.tool-page:has(.workflow-grid) .tool-hero p,
.tool-page:has(.stepper) .tool-hero p,
.tool-page:has(.workflow-grid) .tool-subtitle,
.tool-page:has(.stepper) .tool-subtitle {
    max-width: 760px;
}

.tool-page:has(.workflow-grid) .stepper,
.tool-page:has(.stepper) .stepper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 24px !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    box-sizing: border-box;
}

.tool-page:has(.workflow-grid) .workflow-grid,
.tool-page:has(.stepper) .workflow-grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.75fr);
    gap: 28px;
    align-items: start;
    box-sizing: border-box;
}

.tool-page:has(.workflow-grid) .workspace-card,
.tool-page:has(.stepper) .workspace-card,
.tool-page:has(.workflow-grid) .settings-card,
.tool-page:has(.stepper) .settings-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tool-page:has(.workflow-grid) .settings-card,
.tool-page:has(.stepper) .settings-card {
    position: sticky;
    top: 24px;
}

@media (max-width: 980px) {
    .tool-page:has(.workflow-grid) > .tool-container,
    .tool-page:has(.stepper) > .tool-container {
        width: min(100%, calc(100% - 32px)) !important;
    }

    .tool-page:has(.workflow-grid) .workflow-grid,
    .tool-page:has(.stepper) .workflow-grid {
        grid-template-columns: 1fr !important;
    }

    .tool-page:has(.workflow-grid) .settings-card,
    .tool-page:has(.stepper) .settings-card {
        position: static !important;
    }

    .tool-page:has(.workflow-grid) .stepper,
    .tool-page:has(.stepper) .stepper {
        overflow-x: auto;
        border-radius: 20px;
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
}

/* Full browser shell for all tool workflow pages */
body:has(.tool-page) {
    background:
        radial-gradient(circle at top left, rgba(109, 40, 217, 0.12), transparent 32%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%);
}

.tool-page:has(.workflow-grid),
.tool-page:has(.fill-workflow-grid),
.tool-page:has(.reader-canvas-wrapper),
.tool-page:has(.organize-container),
.tool-page:has(.stepper) {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 72px) !important;
    margin: 0 !important;
    padding: 48px 0 72px !important;
    box-sizing: border-box !important;
    background:
        radial-gradient(circle at top left, rgba(109, 40, 217, 0.12), transparent 32%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%) !important;
}

/* The page container must NOT be the card */
.tool-page:has(.workflow-grid) > .tool-container,
.tool-page:has(.fill-workflow-grid) > .tool-container,
.tool-page:has(.reader-canvas-wrapper) > .tool-container,
.tool-page:has(.organize-container) > .tool-container,
.tool-page:has(.stepper) > .tool-container {
    width: min(1320px, calc(100% - 64px)) !important;
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

/* Hero alignment */
.tool-page:has(.workflow-grid) .tool-hero,
.tool-page:has(.fill-workflow-grid) .tool-hero,
.tool-page:has(.reader-canvas-wrapper) .tool-hero,
.tool-page:has(.organize-container) .tool-hero,
.tool-page:has(.stepper) .tool-hero {
    width: 100% !important;
    max-width: 760px !important;
    margin: 0 0 56px !important;
    text-align: left !important;
}

.tool-page:has(.workflow-grid) .tool-hero h1,
.tool-page:has(.fill-workflow-grid) .tool-hero h1,
.tool-page:has(.reader-canvas-wrapper) .tool-hero h1,
.tool-page:has(.organize-container) .tool-hero h1,
.tool-page:has(.stepper) .tool-hero h1 {
    font-size: clamp(3rem, 5vw, 5rem) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.06em !important;
    margin: 0 0 18px !important;
    color: var(--text, #0f172a) !important;
}

.tool-page:has(.workflow-grid) .tool-hero p,
.tool-page:has(.fill-workflow-grid) .tool-hero p,
.tool-page:has(.reader-canvas-wrapper) .tool-hero p,
.tool-page:has(.organize-container) .tool-hero p,
.tool-page:has(.stepper) .tool-hero p {
    max-width: 720px !important;
    margin: 0 !important;
    color: var(--text-secondary, #64748b) !important;
    font-size: 1.08rem !important;
    line-height: 1.7 !important;
}

/* Fallback for old pages that still use plain h1/subtitle instead of .tool-hero */
.tool-page:has(.organize-container) > .tool-container > h1,
.tool-page:has(.reader-canvas-wrapper) > .tool-container > h1 {
    max-width: 760px !important;
    margin: 0 0 14px !important;
    text-align: left !important;
    font-size: clamp(3rem, 5vw, 5rem) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.06em !important;
    color: var(--text, #0f172a) !important;
}

.tool-page:has(.organize-container) > .tool-container > .tool-subtitle,
.tool-page:has(.reader-canvas-wrapper) > .tool-container > .tool-subtitle {
    max-width: 720px !important;
    margin: 0 0 40px !important;
    text-align: left !important;
    color: var(--text-secondary, #64748b) !important;
    font-size: 1.08rem !important;
    line-height: 1.7 !important;
}

.hero-gradient-text,
.tool-page .hero-gradient-text {
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Horizontal stepper */
.tool-page .stepper,
.tool-page .fill-stepper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 24px !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08) !important;
    text-align: left !important;
}

.tool-page .step,
.tool-page .fill-stepper .step {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.55rem !important;
    padding: 0.58rem 0.8rem 0.58rem 0.58rem !important;
    border-radius: 999px !important;
    color: var(--text-secondary, #64748b) !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.tool-page .step span,
.tool-page .fill-stepper .step span {
    flex: 0 0 auto !important;
    display: grid !important;
    place-items: center !important;
    width: 1.7rem !important;
    height: 1.7rem !important;
    border-radius: 50% !important;
    background: #eef2ff !important;
    color: #4f46e5 !important;
    font-size: .82rem !important;
    font-weight: 900 !important;
}

.tool-page .step strong,
.tool-page .fill-stepper .step strong {
    font-size: .9rem !important;
    line-height: 1 !important;
}

.tool-page .step.active,
.tool-page .fill-stepper .step.active {
    color: #1e293b !important;
    background: rgba(79, 70, 229, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.16) !important;
}

.tool-page .step.complete,
.tool-page .fill-stepper .step.complete {
    color: #fff !important;
    background: linear-gradient(135deg, #6d5dfc 0%, #2563eb 55%, #06b6d4 100%) !important;
}

.tool-page .step.complete span,
.tool-page .fill-stepper .step.complete span {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}

/* Two-column workflow */
.tool-page .workflow-grid,
.tool-page .fill-workflow-grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.75fr) !important;
    gap: 28px !important;
    align-items: start !important;
}

.tool-page .workspace-card,
.tool-page .settings-card,
.tool-page .fill-workspace-card,
.tool-page .fill-settings-card {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08) !important;
}

.tool-page .settings-card,
.tool-page .fill-settings-card {
    position: sticky !important;
    top: 24px !important;
}

/* Organize PDF fallback: make old organize UI wide and card-based */
.tool-page:has(.organize-container) .organize-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 28px !important;
    border-radius: 24px !important;
    background: rgba(255,255,255,.92) !important;
    border: 1px solid rgba(148,163,184,.16) !important;
    box-shadow: 0 18px 55px rgba(15,23,42,.08) !important;
    text-align: left !important;
}

.tool-page:has(.organize-container) .organize-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
}

/* PDF Reader fallback: make old viewer use a wide workspace */
.tool-page:has(.reader-canvas-wrapper) .upload-container,
.tool-page:has(.reader-canvas-wrapper) .reader-toolbar,
.tool-page:has(.reader-canvas-wrapper) .reader-canvas-wrapper,
.tool-page:has(.reader-canvas-wrapper) .reader-file-info {
    width: 100% !important;
    max-width: none !important;
}

.tool-page:has(.reader-canvas-wrapper) .upload-container,
.tool-page:has(.reader-canvas-wrapper) .reader-toolbar,
.tool-page:has(.reader-canvas-wrapper) .reader-canvas-wrapper {
    border-radius: 24px !important;
    background: rgba(255,255,255,.92) !important;
    border: 1px solid rgba(148,163,184,.16) !important;
    box-shadow: 0 18px 55px rgba(15,23,42,.08) !important;
}

.tool-page:has(.reader-canvas-wrapper) .reader-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 16px !important;
    margin-bottom: 18px !important;
}

.tool-page:has(.reader-canvas-wrapper) .reader-canvas-wrapper {
    min-height: 640px !important;
    padding: 24px !important;
    overflow: auto !important;
}

/* FAQ width alignment */
.tool-page > .faq-section,
.tool-page .faq-section {
    width: min(1320px, calc(100% - 64px)) !important;
    max-width: 1320px !important;
    margin: 3rem auto 4rem !important;
}

/* Cloud picker consistency */
.cloud-picker-row,
.cloud-row {
    margin-top: 16px !important;
    text-align: center !important;
}

.cloud-picker-buttons,
.cloud-row-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.cloud-picker-label,
.cloud-row-label {
    display: block !important;
    margin-bottom: 10px !important;
    color: var(--text-muted, #94a3b8) !important;
    font-size: .72rem !important;
    font-weight: 900 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
}

.cloud-picker-btn,
.cloud-import-btn {
    min-height: 44px !important;
    border-radius: 14px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(148, 163, 184, .18) !important;
    background: rgba(255, 255, 255, .92) !important;
    color: var(--text, #0f172a) !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06) !important;
}

/* Navbar right-side alignment */
.site-header,
.top-nav,
.navbar {
    display: flex !important;
    align-items: center !important;
    min-height: 72px !important;
}

.header-logo,
.nav-logo,
.brand-logo img,
img.brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .header-logo,
    .nav-logo,
    .brand-logo img,
    img.brand-logo {
        height: 42px;
    }
}

.nav-search {
    margin-left: auto !important;
    flex: 0 1 310px !important;
}

.navbar-right {
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 0 0 auto !important;
}

.hamburger {
    flex: 0 0 auto !important;
    margin-left: 4px !important;
}

/* When search is hidden, right controls still stay at the right edge */
@media (max-width: 980px) {
    .nav-search {
        display: none !important;
    }

    .navbar-right {
        margin-left: auto !important;
    }
}

/* Responsive tool layout */
@media (max-width: 980px) {
    .tool-page:has(.workflow-grid),
    .tool-page:has(.fill-workflow-grid),
    .tool-page:has(.reader-canvas-wrapper),
    .tool-page:has(.organize-container),
    .tool-page:has(.stepper) {
        padding: 32px 0 56px !important;
    }

    .tool-page:has(.workflow-grid) > .tool-container,
    .tool-page:has(.fill-workflow-grid) > .tool-container,
    .tool-page:has(.reader-canvas-wrapper) > .tool-container,
    .tool-page:has(.organize-container) > .tool-container,
    .tool-page:has(.stepper) > .tool-container,
    .tool-page > .faq-section,
    .tool-page .faq-section {
        width: min(100%, calc(100% - 32px)) !important;
    }

    .tool-page .workflow-grid,
    .tool-page .fill-workflow-grid {
        grid-template-columns: 1fr !important;
    }

    .tool-page .settings-card,
    .tool-page .fill-settings-card {
        position: static !important;
    }

    .tool-page .stepper,
    .tool-page .fill-stepper {
        overflow-x: auto !important;
        border-radius: 20px !important;
        grid-template-columns: repeat(4, minmax(130px, 1fr)) !important;
    }

    .tool-page:has(.reader-canvas-wrapper) .reader-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

[data-theme="dark"] .tool-page:has(.workflow-grid),
[data-theme="dark"] .tool-page:has(.fill-workflow-grid),
[data-theme="dark"] .tool-page:has(.reader-canvas-wrapper),
[data-theme="dark"] .tool-page:has(.organize-container),
[data-theme="dark"] .tool-page:has(.stepper) {
    background:
        radial-gradient(circle at top left, rgba(109, 40, 217, 0.12), transparent 32%),
        linear-gradient(135deg, #0f0e17 0%, #13111f 100%) !important;
}

[data-theme="dark"] .tool-page .workspace-card,
[data-theme="dark"] .tool-page .settings-card,
[data-theme="dark"] .tool-page .fill-workspace-card,
[data-theme="dark"] .tool-page .fill-settings-card,
[data-theme="dark"] .tool-page:has(.organize-container) .organize-container,
[data-theme="dark"] .tool-page:has(.reader-canvas-wrapper) .upload-container,
[data-theme="dark"] .tool-page:has(.reader-canvas-wrapper) .reader-toolbar,
[data-theme="dark"] .tool-page:has(.reader-canvas-wrapper) .reader-canvas-wrapper {
    background: rgba(15, 23, 42, .86) !important;
    border-color: rgba(148, 163, 184, .22) !important;
}

/* FAQ card readability normalization */
.faq-section,
.cp-faq,
.rp-faq,
.tp-faq,
.np-faq,
.bp-faq {
    width: min(1320px, calc(100% - 64px)) !important;
    max-width: none !important;
    margin: 3rem auto 4rem !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.faq-section .faq-item,
.cp-faq-item,
.rp-faq-item,
.tp-faq-item,
.np-faq-item,
.bp-faq-item {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 0 1rem !important;
    padding: 1.35rem 1.45rem 1.45rem !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.92) !important;
    border: 1px solid rgba(148,163,184,.18) !important;
    box-shadow: 0 10px 28px rgba(15,23,42,.05) !important;
}

.faq-section .faq-item:last-child,
.cp-faq-item:last-child,
.rp-faq-item:last-child,
.tp-faq-item:last-child,
.np-faq-item:last-child,
.bp-faq-item:last-child {
    margin-bottom: 0 !important;
    padding: 1.35rem 1.45rem 1.45rem !important;
    border-bottom: 1px solid rgba(148,163,184,.18) !important;
}

.faq-section .faq-item h3,
.cp-faq-item summary,
.rp-faq-item summary,
.tp-faq-item summary,
.np-faq-item summary,
.bp-faq-item summary {
    margin: 0 0 .55rem !important;
    padding: 0 !important;
    line-height: 1.35 !important;
}

.faq-section .faq-item p,
.cp-faq-item p,
.rp-faq-item p,
.tp-faq-item p,
.np-faq-item p,
.bp-faq-item p {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.65 !important;
}

@media (max-width: 768px) {
    .faq-section,
    .cp-faq,
    .rp-faq,
    .tp-faq,
    .np-faq,
    .bp-faq {
        width: calc(100% - 32px) !important;
    }

    .faq-section .faq-item,
    .faq-section .faq-item:last-child,
    .cp-faq-item,
    .cp-faq-item:last-child,
    .rp-faq-item,
    .rp-faq-item:last-child,
    .tp-faq-item,
    .tp-faq-item:last-child,
    .np-faq-item,
    .np-faq-item:last-child,
    .bp-faq-item,
    .bp-faq-item:last-child {
        padding: 1.15rem !important;
    }
}


/* Production legal and trust pages */
.trust-page {
    min-height: calc(100vh - 72px);
    padding: 56px 24px 80px;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.12), transparent 30%),
        linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%);
    color: #172033;
}

.trust-hero,
.trust-grid {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.trust-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
}

.trust-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trust-hero h1 {
    max-width: 760px;
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(2.35rem, 5vw, 4rem);
    line-height: 1.02;
}

.trust-hero p,
.trust-card p,
.trust-card li {
    color: #5b6475;
    line-height: 1.7;
}

.trust-summary-card,
.trust-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.trust-summary-card {
    display: grid;
    gap: 8px;
    padding: 22px;
}

.trust-summary-card span,
.trust-summary-card small {
    color: #64748b;
    font-weight: 800;
}

.trust-summary-card strong {
    color: #111827;
    line-height: 1.45;
}

.trust-summary-card a,
.trust-inline-link {
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.trust-card {
    padding: 24px;
}

.trust-card h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 1.25rem;
}

.trust-card ul {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
}

.trust-placeholder {
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    background: #eef2ff;
    padding: 0.9rem 1rem;
}

@media (max-width: 860px) {
    .trust-hero,
    .trust-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Ad Placeholders ─────────────────────────────────────────── */
.ad-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px dashed rgba(100, 116, 139, 0.34);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.9)),
        repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.08) 0 8px, transparent 8px 16px);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ad-placeholder--banner {
    height: 96px;
    max-width: 1320px;
    margin: 0 auto 28px;
}

.ad-placeholder--sidebar {
    height: 280px;
}

.ad-placeholder--result {
    height: 120px;
    margin-top: 1rem;
}

.result-ad-placeholder {
    width: 100%;
}

.sidebar-ad-placeholder {
    margin-top: 1rem;
}

@media (max-width: 980px) {
    .sidebar-ad-placeholder {
        display: none;
    }
}

@media (max-width: 640px) {
    .ad-placeholder {
        border-radius: 16px;
    }

    .ad-placeholder--banner,
    .ad-placeholder--result {
        height: 88px;
    }
}

/* ════════════════════════════════════════════════════════
   MOBILE VIEWPORT OVERFLOW FIX
   Prevents horizontal scroll on iOS/Android at 320–768 px.
   Must stay at the END of this file so cascade wins.
════════════════════════════════════════════════════════ */

/* 1. Global root guard — no child can push the viewport wider than 100 %. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

#app {
    max-width: 100%;
    overflow-x: hidden;
}

/* 2. CTA text variants — .cta-short is hidden by default; shown only at ≤480 px. */
.cta-short { display: none; }

/* 3. Mobile ≤768 px — hide every desktop nav link so the navbar fits in 100 vw.
      The hamburger drawer provides full navigation at these sizes. */
@media (max-width: 768px) {
    /* Hide ALL inline nav links — ai, tool, and plain variants */
    .nav-link,
    .nav-link-ai,
    .nav-link-tool {
        display: none !important;
    }

    /* Tighten navbar so logo + controls share 100 vw cleanly */
    .navbar {
        padding-inline: 0.75rem !important;
        gap: 0.375rem !important;
    }

    /* Logo: shrink only as a last resort; never below 90 px wide */
    .nav-brand {
        flex-shrink: 1 !important;
        min-width: 90px !important;
    }

    /* Let logo image scale down within the nav-brand container */
    .nav-brand img.brand-logo {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 40px !important;
        object-fit: contain !important;
    }

    /* Push login / hamburger cluster to the far right */
    .navbar-right {
        margin-left: auto !important;
        flex-shrink: 0;
    }

    /* Hide the dark-mode toggle on mobile to reclaim ~44 px of width.
       Authenticated users can access theme via the hamburger profile menu. */
    .theme-toggle-switch {
        display: none !important;
    }

    /* Compact auth buttons: tighter gap and reduced CTA size */
    .auth-buttons {
        gap: 0.2rem !important;
    }

    .login-btn {
        padding: 0.38rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .signup-btn {
        padding: 0.38rem 0.65rem !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }

    /* Align drawer top with the actual 72 px navbar (was 64 px) */
    .mob-drawer {
        top: 72px !important;
    }

    .mob-backdrop {
        top: 72px !important;
    }
}

/* 4. At ≤480 px, swap "Get started free" → "Start free" to save ~35 px. */
@media (max-width: 480px) {
    .cta-full { display: none !important; }
    .cta-short { display: inline !important; }
}

/* 5. Stepper columns — minmax(130px,1fr) × 4 = 520 px minimum, too wide for
      ≤480 px viewports. Allow columns to shrink to zero so they scale with vw. */
@media (max-width: 480px) {
    .tool-page .stepper,
    .tool-page .fill-stepper {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px !important;
        padding: 6px !important;
    }

    /* Keep step label text readable at smaller column widths */
    .tool-page .step strong,
    .tool-page .fill-stepper .step p {
        font-size: 0.65rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
}
