/* ==========================================================================
   hAIve Landing Page - Premium Stylesheet
   ========================================================================== */

/* 1. Reset & Base Settings */
:root {
    --bg-darker: #05070c;
    --bg-dark: #0b0f19;
    --bg-card: rgba(15, 23, 42, 0.65);
    --border-color: rgba(51, 65, 85, 0.5);
    --border-glow: rgba(139, 92, 246, 0.2);
    
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.45);
    --primary-hover: #a78bfa;
    
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.3);
    --secondary-hover: #22d3ee;
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.3);
    
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-dark: #4b5563;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* offset anchor scrolling so targets don't end up under the fixed header */
    scroll-padding-top: 40px;
    /* allow height:auto transitions (smooth FAQ open); ignored where unsupported */
    interpolate-size: allow-keywords;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Faint animated neural-network watermark, fixed behind all content */
#neural-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* Keep every content section above the canvas */
.header,
.hero,
.demo-section,
.how-it-works,
.features-section,
.faq-section,
.cta-final,
.waitlist-section,
.footer {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 2. Typography & Custom Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.text-gradient {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, #c44ce0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Brand name highlighted (white) inside muted body copy */
.brand-name {
    color: var(--text-main);
    font-weight: 700;
}

/* Store download buttons (App Store / Google Play) */
.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: #fff;
    transition: var(--transition);
}

.store-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.store-btn i {
    font-size: 1.9rem;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.store-btn-text small {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.store-btn-text strong {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
}

.hero-demo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero-demo-link:hover { color: var(--secondary-hover); }
.hero-demo-link i { font-size: 0.8rem; }

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin-top: 22px;
}

.beta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-hover);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 999px;
    padding: 5px 13px;
}

/* Language switcher in the header */
/* Header CTA — la web app e' l'unica cosa provabile SUBITO, senza store ne
   installazione, quindi merita il posto piu' visibile dopo il logo. Nascosta
   sotto i 768px dalla media query in fondo: su un telefono l'azione utile e'
   lo store, non il browser. */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.header-cta i { font-size: 0.8rem; }

.header-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.38);
}

@media (prefers-reduced-motion: reduce) {
    .header-cta { transition: none; }
    .header-cta:hover { transform: none; }
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    margin-left: 18px;
}

.lang-switch i { font-size: 0.85rem; }

.lang-switch select {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.lang-switch select:focus { outline: none; border-color: var(--secondary); }

/* Demo disclaimer — these example answers are simulated, not real advice */
.demo-disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    max-width: 660px;
    margin: -16px auto 40px;
    opacity: 0.9;
}

.demo-disclaimer i { color: var(--warning); margin-right: 6px; }

/* Official provider logos (SVG) used in the demo + phone instead of generic icons */
.provider-logo {
    width: 17px;
    height: 17px;
    vertical-align: -3px;
    margin-right: 7px;
}

.provider-logo-sm {
    width: 11px;
    height: 11px;
    vertical-align: -1px;
    margin-right: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--primary);
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.btn-secondary:hover {
    border-color: var(--secondary);
    color: #fff;
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

.btn-spinner {
    display: none;
}

/* 3. Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
    transition: var(--transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.logo-text span {
    background: linear-gradient(135deg, #4363d6 0%, #9182f5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-main);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 4. Hero Section */
.hero {
    position: relative;
    /* 180px top read as a dead band under the fixed header on open
       (user 2026-08-09) — 120px clears the ~70px header with a beat of air */
    padding: 120px 0 100px 0;
    /* transparent so the neural-network canvas shows through behind the hero */
    background-color: transparent;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -10%;
    right: 5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 100%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-container {
    margin-bottom: 24px;
}

.hero-badge {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-glow);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--primary-hover);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-title {
    font-size: 3.1rem;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.trust-icons {
    display: flex;
    gap: 12px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.trust-icons i:hover {
    color: var(--text-main);
}

/* 5. CSS Smartphone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    z-index: 2;
}

/* Desktop: the phone DEMO at 0.90 (user 2026-08-11, third calibration:
   0.8 too small, 1.15 too big) — transform keeps the inner chat layout
   intact; the negative margin reclaims the freed layout height (778px frame
   incl. borders × 0.10). */
@media (min-width: 981px) {
    .hero-visual .phone-frame {
        transform: scale(0.90);
        transform-origin: top center;
        margin-bottom: -78px;
    }
}

.phone-frame {
    width: 365px;
    height: 760px;
    background-color: #1e293b;
    border: 9px solid #2c3a55;
    border-radius: 44px;
    position: relative;
    /* crisp light hairline + soft violet glow so the edges pop against the near-black bg */
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.45),
        0 0 0 11px rgba(15, 23, 42, 0.9),
        0 25px 60px -12px rgba(0, 0, 0, 0.85),
        0 0 70px rgba(139, 92, 246, 0.35);
    overflow: hidden;
}

.phone-notch {
    width: 140px;
    height: 24px;
    background-color: #0f172a;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background-color: #080c14;
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    position: relative;
}

.app-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.app-logo img {
    width: 20px;
    height: 20px;
}

.app-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.app-chat-body {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.chat-message {
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    max-width: 85%;
}

.chat-message.user {
    background-color: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.system {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    align-self: stretch;
    border-bottom-left-radius: 4px;
    width: 100%;
    max-width: 100%;
}

.message-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.provider-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 100px;
    font-weight: 600;
}

.badge-gpt { background: rgba(16, 163, 127, 0.15); color: #10a37f; }
.badge-claude { background: rgba(243, 115, 60, 0.15); color: #f3733c; }
.badge-gemini { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-ai4 { background: rgba(145, 130, 245, 0.15); color: #9182f5; }
.badge-ai5 { background: rgba(34, 184, 207, 0.15); color: #22b8cf; }

.mixer-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: var(--text-muted);
}

.pulse-ring {
    width: 12px;
    height: 12px;
    background-color: var(--secondary);
    border-radius: 50%;
    position: relative;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Animated delvi mark used as the "thinking" loader inside the phone mock */
.mixer-loader-gif {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18), 0 0 18px rgba(139, 92, 246, 0.35);
}

/* Synthesised answer with a highlighted divergence, shown in the hero phone */
.phone-synthesis { margin-top: 10px; }

.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 9px;
}

.phone-badge.partial {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

/* Post web-verification state: the divergence resolved (amber → green),
   mirroring the app's resolve flow. */
.phone-badge.verified {
    background: rgba(62, 207, 142, 0.12);
    color: #3ECF8E;
    border: 1px solid rgba(62, 207, 142, 0.4);
}

.phone-mark-verified {
    color: #3ECF8E;
    font-weight: 600;
    border-bottom: 1px solid rgba(62, 207, 142, 0.6);
}
.phone-mark-verified i { font-size: 0.8em; }

/* Soft in-place morph to the verified state (no wipe): the prose fades
   while it swaps, rows tint as they gain their ✓/✗. */
.phone-answer { transition: opacity 0.26s ease; }
.phone-answer.phone-fade { opacity: 0; }
.phone-badge { transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.phone-detail-row { transition: background 0.35s ease; border-radius: 6px; }
.phone-detail-row.win { background: rgba(62, 207, 142, 0.10); }
.phone-detail-row.win b { color: #3ECF8E; }
.phone-detail-row.lose b { opacity: 0.75; }
.row-mark-win { color: #3ECF8E; font-size: 0.85em; margin-left: 3px; }
.row-mark-lose { color: #E5484D; font-size: 0.85em; margin-left: 3px; }

.phone-answer {
    font-size: 0.78rem;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0;
}

.phone-diverge {
    color: var(--warning);
    font-weight: 600;
    border-bottom: 1px dashed rgba(245, 158, 11, 0.6);
}

.phone-diverge-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 0.66rem;
    line-height: 1.45;
    color: var(--text-muted);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 10px;
}

.phone-diverge-note i {
    color: var(--warning);
    margin-top: 2px;
}

/* Divergence detail + web-verification panel that opens as the final demo step */
.phone-detail {
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: phoneDetailOpen 0.5s ease both;
}

@keyframes phoneDetailOpen {
    from { opacity: 0; transform: translateY(-6px); max-height: 0; }
    to { opacity: 1; transform: translateY(0); max-height: 260px; }
}

.phone-detail-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 8px;
}

.phone-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.69rem;
    color: #cbd5e1;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-detail-row b { color: #fff; }

.phone-detail-web {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 9px;
    padding: 7px 9px;
    font-size: 0.65rem;
    line-height: 1.45;
    color: var(--text-muted);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 8px;
}

.phone-detail-web i { color: var(--secondary); margin-top: 2px; }

/* Replay control + input row pinned at the bottom of the phone */
.phone-replay-bar {
    display: flex;
    justify-content: center;
    padding: 6px 16px 0;
}

.phone-replay {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-hover);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 999px;
    padding: 7px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.phone-replay:hover { background: rgba(139, 92, 246, 0.22); }

.app-input-bar {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
}

.input-placeholder {
    color: var(--text-dark);
    font-size: 0.8rem;
}

.send-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Keyframes */
@keyframes pulse {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(6, 182, 212, 0);
    }
    100% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

/* 6. Section: Live Demo */
.demo-section {
    padding: 56px 0;
    position: relative;
    /* transparent so the fixed neural canvas stays visible while scrolling */
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.demo-chips {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.chip {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chip:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.06);
}

.chip.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border-color: var(--secondary);
    color: var(--secondary-hover);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.demo-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 32px;
}

.demo-sources {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.source-card {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.source-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(15, 23, 42, 0.8);
}

/* Per-provider brand accent bar + title colour (matches the app's model colours) */
.source-card { position: relative; overflow: hidden; }
.source-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent, transparent);
}
#source-openai { --accent: #10a37f; }
#source-anthropic { --accent: #f3733c; }
#source-google { --accent: #3b82f6; }
#source-openai .source-title { color: #10a37f; }
#source-anthropic .source-title { color: #f3733c; }
#source-google .source-title { color: #3b82f6; }

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.source-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.source-title i {
    margin-right: 6px;
}

.source-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.source-content {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-height: 130px;
    overflow-y: auto;
    font-family: var(--font-body);
    white-space: pre-wrap;
    line-height: 1.6;
    padding-right: 6px;
}

/* Thin, app-style scrollbar instead of the default chunky one */
.source-content,
.app-chat-body {
    scrollbar-width: thin;                                  /* Firefox */
    scrollbar-color: rgba(139, 92, 246, 0.5) transparent;   /* Firefox: thumb / track */
}
.source-content::-webkit-scrollbar,
.app-chat-body::-webkit-scrollbar { width: 9px; }
.source-content::-webkit-scrollbar-track,
.app-chat-body::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.source-content::-webkit-scrollbar-thumb,
.app-chat-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(6, 182, 212, 0.6));
    border-radius: 20px;
    border: 3px solid transparent;      /* transparent border + padding-box = slim inset thumb */
    background-clip: padding-box;
}
.source-content::-webkit-scrollbar-thumb:hover,
.app-chat-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.9), rgba(6, 182, 212, 0.9));
    background-clip: padding-box;
}

.source-card.streaming {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.08);
}

.source-card.streaming .source-status {
    color: var(--primary-hover);
    font-weight: bold;
}

/* Synthesis Card Styling */
.demo-synthesis {
    display: flex;
}

.synthesis-card {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.05);
    position: relative;
    overflow: hidden;
}

/* Brand gradient accent along the top of the synthesis card */
.synthesis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), #c44ce0);
}

.synthesis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.synthesis-title {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.synthesis-title i {
    margin-right: 8px;
    color: var(--secondary);
}

.confidence-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.confidence-badge.attesa { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.confidence-badge.high { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.confidence-badge.partial { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.confidence-badge.low { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.synthesis-progress {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.synthesis-progress.visible {
    display: flex;
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 50%, var(--secondary) 100%);
    background-size: 200% 100%;
    animation: shrinkGlow 1.5s infinite linear;
    border-radius: 100px;
}

@keyframes shrinkGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

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

.synthesis-content {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.7;
    flex-grow: 0;
}

/* Highlighted divergences in synthesis text */
.divergence-highlight {
    background: var(--warning-bg);
    border-bottom: 2px dashed var(--warning);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    padding: 0 4px;
    border-radius: 2px;
    transition: var(--transition);
}

.divergence-highlight:hover {
    background: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

/* Tooltip/Detail Box for divergences */
.divergence-details-box {
    margin-top: 20px;
    border: 1px solid var(--warning-border);
    background-color: rgba(245, 158, 11, 0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.divergence-details-box.active {
    display: block;
}

.divergence-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--warning);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.divergence-details-header i {
    margin-right: 6px;
}

.close-details-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.close-details-btn:hover {
    color: #fff;
}

.divergence-details-body {
    font-size: 0.875rem;
    color: var(--text-main);
    line-height: 1.5;
}

.divergence-model-diff {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(245, 158, 11, 0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.model-diff-row {
    font-size: 0.8rem;
}

.model-diff-row strong {
    color: var(--text-muted);
}

.model-diff-row > div {
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.45;
}

/* Divergence alert: clickable chips for each diverging point */
.diverg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.diverg-chip {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--warning-border);
    color: var(--warning);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.diverg-chip:hover { background: rgba(245, 158, 11, 0.2); }
.diverg-chip.active { background: rgba(245, 158, 11, 0.3); color: #fff; }

.diverg-consensus {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 0.9rem;
    margin: 0;
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 7. Section: Timeline / How it works */
.how-it-works {
    padding: 56px 0;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 50px auto 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 55%, transparent 100%);
    opacity: 0.4;
    top: 8px;
    bottom: 60px;
    left: 40px;
}

.timeline-item {
    padding: 0 0 24px 100px;
    position: relative;
}

.timeline-icon {
    position: absolute;
    width: 52px;
    height: 52px;
    /* rounded-square gradient tile, echoing the app icon */
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 16px;
    top: 6px;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
    font-size: 1.2rem;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin: 0;
}

/* Step 4 — web verification: the differentiator, highlighted in cyan */
.timeline-item:last-child .timeline-icon {
    background: linear-gradient(135deg, var(--secondary), #22d3ee);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.35);
}

.timeline-item:last-child .timeline-content {
    border-color: rgba(6, 182, 212, 0.4);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.07), rgba(15, 23, 42, 0.5));
}

/* 7b. Section: Documents & Images */
.docs-section {
    padding: 56px 0;
    position: relative;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.docs-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, rgba(6, 182, 212, 0.02) 60%, transparent 100%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.docs-badge {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--secondary-hover);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Docs section intro split into two labelled categories (Documenti / Immagini)
   with a soft gradient divider between them. */
.docs-cats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 6px;
}

/* Desktop: the two category blurbs are side-by-side CARDS (user 2026-08-12)
   in the site's card grammar — translucent surface, NO blur — with a
   per-category accent: gradient seam on the top edge + a faint corner glow
   in the badge's own color (cyan docs / violet images). */
@media (min-width: 981px) {
    .docs-cats {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 22px;
        text-align: left;
    }

    .docs-cats .docs-cat {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        max-width: 520px;
        align-items: flex-start;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 22px 24px 24px;
        overflow: hidden;
        transition: var(--transition);
    }

    .docs-cats .docs-cat::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.75), transparent);
    }

    .docs-cats .docs-cat::after {
        content: '';
        position: absolute;
        top: -60px;
        right: -60px;
        width: 190px;
        height: 190px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(6, 182, 212, 0.10), transparent 70%);
        pointer-events: none;
    }

    .docs-cats .docs-cat:has(.docs-cat-chip.imgs)::before {
        background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.8), transparent);
    }

    .docs-cats .docs-cat:has(.docs-cat-chip.imgs)::after {
        background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
    }

    .docs-cats .docs-cat:hover {
        border-color: rgba(255, 255, 255, 0.16);
        transform: translateY(-2px);
    }

    .docs-cats .docs-cat .section-subtitle {
        text-align: left;
        margin: 0;
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .docs-cat-divider { display: none; }
}

.docs-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.docs-cat-chip {
    background: rgba(6, 182, 212, 0.10);
    border: 1px solid rgba(6, 182, 212, 0.30);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--secondary-hover);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.docs-cat-chip.imgs {
    background: rgba(139, 92, 246, 0.10);
    border-color: rgba(139, 92, 246, 0.30);
    color: var(--primary-hover);
}

.docs-cat-divider {
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.studio-mockup-window {
    background-color: rgba(11, 15, 25, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.65), 
        0 0 40px rgba(139, 92, 246, 0.1);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.studio-mockup-window:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.75), 
        0 0 50px rgba(139, 92, 246, 0.15);
}

.studio-header {
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 20px;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tabs switcher in header */
.studio-tabs {
    display: flex;
    gap: 8px;
    height: 100%;
    align-items: flex-end;
}

.studio-tab {
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 16px;
    height: 42px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.studio-tab:hover {
    color: var(--text-main);
}

.studio-tab.active {
    color: var(--primary-hover);
    border-bottom-color: var(--primary);
}

.studio-tab i {
    font-size: 0.95rem;
}

.studio-workspace {
    position: relative;
    min-height: auto;
}

.workspace-tab-content {
    animation: fadeInTab 0.35s ease-out;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Both workspaces are shown together now (no tabs) */
.studio-window-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.studio-window-title i { color: var(--primary-hover); }

.studio-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    padding: 18px 22px 6px;
}

.studio-section-label i { color: var(--primary-hover); }

/* Divider between the two stacked workspaces */
#workspace-images {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 6px;
}

.studio-workspace-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 420px;
}

/* Prompt-style (chat) demos: user request bubble → generated answer */
.docs-demos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.prompt-demo { display: flex; flex-direction: column; }

.prompt-demo-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 16px;
}
.prompt-demo-eyebrow i { color: var(--primary-hover); }

.prompt-demo-user { display: flex; justify-content: flex-end; margin-bottom: 14px; }

.prompt-demo-bubble {
    max-width: 88%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff;
    padding: 12px 15px;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.prompt-demo-attach { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.prompt-demo-attach .doc-chip {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}
.prompt-demo-text { margin: 0; font-size: 0.92rem; line-height: 1.45; }

.prompt-demo-answer {
    background-color: rgba(11, 15, 25, 0.82);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.06);
}

.prompt-demo-answer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.prompt-demo-answer-head img { width: 20px; height: 20px; border-radius: 6px; }

@media (max-width: 980px) {
    .docs-demos { grid-template-columns: 1fr; gap: 36px; }
}

/* ===== Prompt-style (chat) demos — self-contained (pd-) ===== */
.pd-demos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}
.pd-demo { display: flex; flex-direction: column; min-width: 0; }
.pd-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
    color: var(--text-main); margin-bottom: 16px;
}
.pd-eyebrow i { color: var(--primary-hover); }

.pd-user { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.pd-bubble {
    max-width: 90%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff; padding: 12px 15px;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}
.pd-attach { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
/* Attached-file chips: solid white "file" cards with a colour-coded format icon
   so they stand out clearly on the gradient prompt bubble. */
.pd-chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 700;
    background: #fff; border: 1px solid rgba(255, 255, 255, 0.75);
    color: #1e2430; padding: 7px 12px; border-radius: 9px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.pd-chip i { font-size: 0.98rem; }
.pd-chip .fa-file-pdf { color: #e5484d; }
.pd-chip .fa-file-word { color: #3d7be0; }
.pd-chip .fa-file-image { color: #2d9b6b; }
.pd-prompt-text { margin: 0; font-size: 0.92rem; line-height: 1.45; }

.pd-answer {
    background-color: rgba(11, 15, 25, 0.82);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.06);
}
.pd-answer-head {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-heading); font-weight: 600; font-size: 0.85rem;
    color: var(--text-muted); margin-bottom: 12px;
}
.pd-answer-head img { width: 20px; height: 20px; border-radius: 6px; }
.pd-status { margin-left: auto; font-size: 0.75rem; font-weight: 600; color: var(--primary-hover); }
.pd-status.done { color: #10b981; }

.pd-skel { padding: 4px 2px; }
.pd-skel-bar {
    height: 9px; border-radius: 5px; margin-bottom: 10px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.05) 80%);
    background-size: 200% 100%; animation: pdShimmer 1.3s linear infinite;
}

.pd-doc {
    background: #f7f8fb; color: #1e293b; border-radius: 8px;
    padding: 20px 22px; animation: pdFade 0.5s ease both;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.pd-doc-h { text-align: center; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: #0f172a; letter-spacing: 0.02em; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; }
.pd-doc-p { font-size: 0.82rem; line-height: 1.55; color: #334155; margin: 0 0 9px; }
.pd-doc-p b { color: #0f172a; }
.pd-doc-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.78rem; }
.pd-doc-table th, .pd-doc-table td { border: 1px solid #e2e8f0; padding: 6px 9px; text-align: left; color: #334155; }
.pd-doc-table th { background: #eef1f6; color: #0f172a; font-weight: 700; }
.pd-doc-sign { font-size: 0.8rem; color: #64748b; margin-top: 14px; }

/* Placeholder document template (matches the onboarding slide) */
.pd-doc-cover {
    position: relative; height: 46px; border-radius: 6px; margin-bottom: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0a1c3a 0%, #4c1d95 72%, #0891b2 100%);
}
.pd-doc-cover-cap {
    position: absolute; top: 5px; left: 7px; font-size: 0.55rem; font-weight: 600;
    color: rgba(255, 255, 255, 0.85); display: inline-flex; align-items: center; gap: 4px;
}
.pd-doc-cover-cap i { color: #7dd3fc; }
.pd-doc-cover-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.pd-doc-line { height: 6px; border-radius: 3px; background: #cbd5e1; margin-bottom: 8px; display: block; }
.pd-doc-edit { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pd-doc-edit .pd-doc-line.accent { flex: 1; margin: 0; background: rgba(139, 92, 246, 0.55); }
.pd-doc-ai { display: inline-flex; align-items: center; gap: 3px; font-size: 0.58rem; font-weight: 800; color: var(--primary); background: rgba(139, 92, 246, 0.16); border: 1px solid rgba(139, 92, 246, 0.5); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.pd-doc-bullets { margin: 4px 0 10px; }
.pd-doc-bullet { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pd-doc-dot { width: 3px; height: 3px; border-radius: 50%; background: #64748b; flex-shrink: 0; margin-left: 3px; }
.pd-doc-bullet .pd-doc-line { margin: 0; height: 5px; }
.pd-doc-table2 { border: 1px solid #e2e8f0; border-radius: 4px; overflow: hidden; }
.pd-doc-trow { display: flex; }
.pd-doc-trow:not(:last-child) { border-bottom: 1px solid #e2e8f0; }
.pd-doc-tcell { flex: 1; padding: 6px 8px; }
.pd-doc-tcell:not(:last-child) { border-right: 1px solid #e2e8f0; }
.pd-doc-tcell.head { background: #eef1f6; }
.pd-doc-cbar { display: block; height: 4px; border-radius: 2px; background: #cbd5e1; }
.pd-doc-tcell.head .pd-doc-cbar { background: #94a3b8; }

/* Analysis: synthesis card with flagged divergences (like the hero) */
.pd-synthcard-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 700; color: var(--warning); background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.35); border-radius: 999px; padding: 3px 10px; margin-bottom: 9px; }
.pd-synthcard-prose { margin: 0 0 10px; font-size: 0.82rem; line-height: 1.5; color: var(--text-main); }
.pd-div { color: var(--warning); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 2px; }
.pd-detail { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 10px; padding: 10px 11px; }
.pd-detail-head { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 700; color: var(--warning); margin-bottom: 8px; }
.pd-detail-rows { display: flex; flex-direction: column; gap: 6px; }
.pd-detail-row { display: flex; align-items: center; gap: 7px; font-size: 0.74rem; }
.pd-detail-logo { width: 14px; height: 14px; flex-shrink: 0; }
.pd-detail-row b { color: var(--text-main); font-weight: 700; }
.pd-detail-row span { color: var(--text-muted); }
.pd-detail-web { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.74rem; color: #86efac; animation: pdFade 0.4s ease both; }
.pd-detail-web img { width: 15px; height: 15px; }

/* Analysed document handed back WITH inline comments (like the app: amber card,
   only the file name + icon coloured by format — here PDF red). */
.pd-commented { margin-top: 10px; padding: 10px 11px; border-radius: 11px; background: rgba(201, 138, 22, 0.09); border: 1px solid rgba(201, 138, 22, 0.32); animation: pdFade 0.45s ease both; }
.pd-commented-row { display: flex; align-items: center; gap: 10px; }
.pd-commented-ico { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(229, 72, 77, 0.16); color: #e5484d; font-size: 0.9rem; }
.pd-commented-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pd-commented-txt b { color: #e5484d; font-size: 0.78rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-commented-txt span { color: var(--text-muted); font-size: 0.68rem; }
.pd-commented-dl { color: #c98a16; font-size: 0.95rem; flex-shrink: 0; }

/* Phones enter one after another, left → right.
   Hidden by default (no flash) until the JS adds .pd-anim on scroll-in. */
.pd-phones .pd-phone-col { opacity: 0; }
.pd-phones.pd-anim .pd-phone-col { animation: pdPhoneIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.pd-phones.pd-anim .pd-phone-col:nth-child(1) { animation-delay: 0.15s; }
.pd-phones.pd-anim .pd-phone-col:nth-child(2) { animation-delay: 0.6s; }
.pd-phones.pd-anim .pd-phone-col:nth-child(3) { animation-delay: 1.05s; }
@keyframes pdPhoneIn { from { opacity: 0; transform: translateY(28px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .pd-phones .pd-phone-col { opacity: 1; }
    .pd-phones.pd-anim .pd-phone-col { animation: none; }
}

.pd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer; }
.pd-tile.s0 { background: #3a2e6b url('assets/swarm-s0.svg') center / cover no-repeat; }
.pd-tile.s1 { background: #ffe29f url('assets/swarm-s1.svg') center / cover no-repeat; }
.pd-tile.s2 { background: #0f2027 url('assets/swarm-s2.svg') center / cover no-repeat; }
.pd-tile.s3 { background: #c471f5 url('assets/swarm-s3.svg') center / cover no-repeat; }
.pd-tile::after { content: ''; position: absolute; inset: 0; background: #0b0f19; transition: opacity 0.5s ease; }
.pd-tile.ready::after { opacity: 0; }
.pd-tile-badge { position: absolute; top: 7px; right: 8px; z-index: 3; font-size: 0.62rem; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.pd-tile-spin { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px; z-index: 2; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: pdSpin 0.8s linear infinite; }
.pd-tile.ready .pd-tile-spin { display: none; }
.pd-tile-check { position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px; z-index: 4; display: none; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.pd-tile.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.pd-tile.selected .pd-tile-check { display: flex; }

.pd-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pd-export { display: flex; align-items: center; gap: 8px; }
.pd-export-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.pd-export-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; padding: 5px 11px; border-radius: 7px; }
.pd-export-btn.word { background: rgba(43, 87, 154, 0.18); border: 1px solid rgba(43, 87, 154, 0.4); color: #7ba3ee; }
.pd-export-btn.pdf { background: rgba(224, 87, 87, 0.16); border: 1px solid rgba(224, 87, 87, 0.4); color: #ef7a7a; }
.pd-export-btn.img { background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.35); color: #a78bfa; }
.pd-replay { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-size: 0.74rem; font-weight: 600; color: var(--primary-hover); background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.4); border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: var(--transition); }
.pd-replay:hover { background: rgba(139, 92, 246, 0.22); }

@keyframes pdShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pdSpin { to { transform: rotate(360deg); } }
@keyframes pdFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
    .pd-demos { grid-template-columns: 1fr; gap: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .pd-skel-bar, .pd-tile-spin { animation: none; }
    .pd-tile::after { opacity: 0; }
}

/* Prompt demos hosted inside fake phones (like the hero mockup) */
.pd-phones {
    display: flex;
    justify-content: center;
    gap: 44px;
    flex-wrap: wrap;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}
.pd-phone-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--primary-hover);
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 999px;
    padding: 4px 10px;
}
/* The app logo may shrink (truncate) so the longer demo tag always fits. */
.pd-phones .app-header { gap: 8px; }
.pd-phones .app-logo { min-width: 0; }
.pd-phones .app-logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-phones .app-chat-body { gap: 12px; }
.pd-phones .pd-user { margin-bottom: 0; }
.pd-phones .pd-bubble { max-width: 100%; padding: 10px 13px; }
.pd-phones .pd-prompt-text { font-size: 0.85rem; }
.pd-ai { display: flex; flex-direction: column; }
.pd-ai-head {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--font-heading); font-weight: 600;
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 9px;
}
.pd-ai-head img { width: 18px; height: 18px; border-radius: 5px; }
.pd-ai .pd-status { margin-left: auto; }
.pd-phones .pd-doc { padding: 14px 15px; }
.pd-phones .pd-doc-h { font-size: 0.85rem; }
.pd-phones .pd-doc-p { font-size: 0.72rem; }
.pd-phones .pd-doc-table { font-size: 0.64rem; }
.pd-phones .pd-doc-table th, .pd-phones .pd-doc-table td { padding: 4px 6px; }
.pd-phones .pd-tiles { gap: 8px; }
.pd-phones .pd-footer { margin-top: 10px; }
/* Reserve room at the bottom so the pinned replay never overlaps the content. */
.pd-phones .app-chat-body { padding-bottom: 46px; }
/* Replay button pinned to the phone screen's bottom-right corner (it escapes the
   scrolling chat body because its containing block is .phone-screen). */
.pd-phones .pd-replay {
    position: absolute; right: 16px; bottom: 16px; z-index: 5;
    padding: 6px 14px;
}
/* three phones fit side by side */
.pd-phones { gap: 34px; }
.pd-phones .phone-frame { width: 340px; height: 720px; }

/* Analysis demo: per-model findings + mixer synthesis */
.pd-finds { display: flex; flex-direction: column; gap: 7px; }
.pd-find { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); border-radius: 9px; font-size: 0.76rem; }
.pd-find-logo { width: 15px; height: 15px; flex-shrink: 0; }
.pd-find b { color: var(--text-main); font-weight: 700; }
.pd-find span { color: var(--text-muted); }
.pd-anim { animation: pdFade 0.4s ease both; }
.pd-synth { margin-top: 10px; padding: 11px 12px; background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.12)); border: 1px solid rgba(139, 92, 246, 0.3); border-radius: 10px; animation: pdFade 0.45s ease both; }
.pd-synth-head { display: flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-weight: 700; font-size: 0.82rem; color: var(--text-main); margin-bottom: 6px; }
.pd-synth-head img { width: 18px; height: 18px; border-radius: 5px; }
.pd-synth p { margin: 0; font-size: 0.77rem; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.pd-find-count { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; color: var(--warning); }

@media (max-width: 1100px) {
    .pd-phones { gap: 24px; }
    .pd-phones .phone-frame { width: 320px; height: 700px; }
}
@media (max-width: 820px) {
    .pd-phones { gap: 30px; }
    .pd-phones .phone-frame { width: 340px; height: 720px; }
}

/* ══════════ "Anche da PC" — laptop mockup of ask.haivemix.app ══════════ */
.desktop-section {
    /* top aligned with the other sections for even snap stops */
    padding: 56px 0 100px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}
.desktop-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 460px;
    background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.16), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.desktop-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-hover);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 999px;
    padding: 6px 14px;
}
/* Desktop demo at 0.70 so the whole section fits the view (user
   2026-08-12). zoom, not transform: it scales layout height too, so the
   section offsets stay truthful for the snap. */
@media (min-width: 981px) {
    .desktop-section .laptop { zoom: 0.70; }
}

/* Wide screens: the section goes TWO-COLUMN like the hero (user 2026-08-12,
   "vorrei rimanesse tutto nella view") — title + subtitle + CTA on the
   left, the laptop demo on the right, so the section's height is
   max(text, demo) instead of their sum. Grid areas re-place the three
   existing siblings, no markup change. */
@media (min-width: 1101px) {
    .desktop-section .container {
        display: grid;
        grid-template-columns: 0.85fr 1.15fr;
        grid-template-areas:
            'title title'
            'copy  laptop'
            'cta   laptop';
        column-gap: 48px;
        align-items: center;
    }

    /* the SECTION title stays centered on top (user 2026-08-12); the side
       column carries its own heading instead */
    .desktop-section .section-header {
        grid-area: title;
        margin-bottom: 38px;
    }

    .desktop-section .desktop-copy {
        grid-area: copy;
        align-self: end;
        text-align: left;
    }

    .desktop-section .desktop-copy .desktop-copy-title {
        font-size: 1.7rem;
    }

    .desktop-section .desktop-copy .section-subtitle {
        margin: 0;
        text-align: left;
        font-size: 1.25rem;
        line-height: 1.65;
    }

    .desktop-section .laptop {
        grid-area: laptop;
        margin: 0;
        min-width: 0;
    }

    .desktop-section .desktop-copy {
    text-align: center;
    margin-bottom: 34px;
    position: relative;
    z-index: 2;
}

.desktop-copy-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0 0 14px;
}

.desktop-cta {
        grid-area: cta;
        align-self: start;
        align-items: flex-start;
        margin-top: 26px;
    }
}

.laptop {
    max-width: 940px;
    margin: 54px auto 0;
    position: relative;
    z-index: 2;
}
.laptop-screen {
    background: #1e293b;
    border: 10px solid #2c3a55;
    border-radius: 18px 18px 6px 6px;
    padding: 10px;
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.4),
        0 30px 70px -18px rgba(0, 0, 0, 0.85),
        0 0 90px rgba(6, 182, 212, 0.22);
}
.laptop-bezel {
    background: #080c14;
    border-radius: 8px;
    overflow: hidden;
    /* back to 4:3 (user 2026-08-12): with the two-column layout the height
       is no longer the constraint, and the taller screen shows more demo */
    aspect-ratio: 16 / 12;
}
/* laptop base (keyboard deck) via a trapezoid */
.laptop-base {
    position: relative;
    width: 112%;
    left: -6%;
    height: 22px;
    background: linear-gradient(#2c3a55, #1a2334);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 26px -10px rgba(0, 0, 0, 0.8);
    clip-path: polygon(1.5% 0, 98.5% 0, 100% 100%, 0 100%);
}
.laptop-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 8px;
    background: #0f172a;
    border-radius: 0 0 8px 8px;
}
/* ── simulated web app ── */
.wd {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #080c14;
    font-size: 0.8rem;
}
.wd-chrome {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: #0e1420;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.wd-dot { width: 10px; height: 10px; border-radius: 50%; }
.wd-dot.r { background: #ef4444; }
.wd-dot.y { background: #f59e0b; }
.wd-dot.g { background: #10b981; }
.wd-url {
    margin-left: 10px;
    flex: 1;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.wd-url i { font-size: 0.62rem; color: #10b981; }
.wd-app { flex: 1; display: flex; min-height: 0; }
/* sidebar */
.wd-side {
    /* wide enough for the full history titles (user 2026-08-11) */
    width: 34%;
    max-width: 252px;
    background: #0b101b;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wd-side-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
}
.wd-side-brand img { width: 20px; height: 20px; }
.wd-new {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}
.wd-hist { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wd-hist-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wd-hist-item i { font-size: 0.7rem; opacity: 0.7; flex-shrink: 0; }
/* the label is a flex CHILD: ellipsis must live on it, not on the parent
   (text-overflow on a flex container never elides its children — the titles
   were hard-clipped) */
.wd-hist-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wd-hist-item.active { background: rgba(139, 92, 246, 0.14); color: var(--text-main); }
.wd-side-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wd-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}
.wd-plan {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--warning);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 999px;
    padding: 2px 9px;
}
/* main chat */
.wd-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wd-chat {
    flex: 1;
    min-height: 0;
    padding: 18px 22px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.wd-chat::-webkit-scrollbar { display: none; }
.wd-user { display: flex; justify-content: flex-end; }
.wd-user-bubble {
    background: var(--primary);
    color: #fff;
    padding: 9px 14px;
    border-radius: 14px 14px 4px 14px;
    font-size: 0.8rem;
    max-width: 75%;
}
.wd-ai {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    max-width: 90%;
}
.wd-ai-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 11px;
}
.wd-ai-head img { width: 18px; height: 18px; border-radius: 5px; }
.wd-conf {
    margin-left: auto;
    font-size: 0.66rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    padding: 2px 9px;
}
.wd-models { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.wd-model {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 3px 9px;
}
.wd-model img { width: 12px; height: 12px; }
.wd-prose { font-size: 0.8rem; line-height: 1.55; color: rgba(255, 255, 255, 0.85); margin: 0; }
.wd-prose b { color: var(--secondary-hover); }
.wd-verify {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--secondary-hover);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 8px;
    padding: 6px 11px;
}
.wd-input {
    margin: 0 22px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}
.wd-input-txt { flex: 1; font-size: 0.78rem; color: var(--text-dark); }
.wd-attach { color: var(--text-muted); font-size: 0.82rem; }
.wd-send {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.72rem;
    background: var(--primary);
}
/* clickable ask.haivemix.app link in the subtitle */
.pc-link {
    color: var(--secondary-hover);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(6, 182, 212, 0.4);
    transition: var(--transition);
}
.pc-link:hover { color: #67e8f9; border-bottom-color: #67e8f9; }
/* the fake browser URL bar is a real link */
a.wd-url { text-decoration: none; color: var(--text-muted); transition: var(--transition); cursor: pointer; }
a.wd-url:hover { background: rgba(6, 182, 212, 0.12); color: var(--secondary-hover); }
.wd-url-ext { margin-left: auto; font-size: 0.58rem; opacity: 0.7; }
/* history items + new-chat + send are interactive buttons — reset native chrome */
.wd-hist-item, .wd-new, .wd-send {
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.wd-new { justify-content: flex-start; }
.wd-send { width: 26px; border: none; }
.wd-hist-item { background: transparent; transition: var(--transition); }
.wd-hist-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-main); }
.wd-hist-item.active { background: rgba(139, 92, 246, 0.14); color: var(--text-main); }
/* attachment chip(s) on a user bubble (some scenarios) */
.wd-uchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wd-uchips .wd-uchip { margin-bottom: 0; }
.wd-uchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    padding: 5px 10px;
    margin-bottom: 7px;
}
/* format-coloured file cards (PDF red, Word blue) on a white card, like the app */
.wd-uchip.pdf { background: #fff; color: #e5484d; }
.wd-uchip.word { background: #fff; color: #3d7be0; }
.wd-uchip.pdf i, .wd-uchip.word i { color: inherit; }
/* comparison rows without a model logo use a small amber marker */
.wd-div-dot { font-size: 0.5rem; width: 13px; text-align: center; color: var(--warning); flex-shrink: 0; }
/* confidence + verify variants (partial / divergence) */
.wd-conf.partial { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.wd-verify.div { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
/* per-model divergence rows (analysis scenario) */
.wd-div-box {
    margin-top: 11px;
    border: 1px solid var(--warning-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.06);
}
.wd-div-head { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; color: var(--warning); margin-bottom: 8px; }
.wd-div-row { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; padding: 3px 0; }
.wd-div-row img { width: 13px; height: 13px; }
.wd-div-row b { color: var(--text-main); font-weight: 700; }
.wd-div-row span { color: var(--text-muted); }
.wd-div-row b { min-width: 74px; }
.wd-div-badge { margin-left: auto; padding-left: 10px; flex-shrink: 0; }
/* annotated-document download card (doc-analysis scenario) */
.wd-dl {
    margin-top: 11px;
    border: 1px solid var(--warning-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wd-dl-lead { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; color: var(--warning); }
.wd-dl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-dl-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #fff;
    color: #e5484d;
    border-radius: 8px;
    padding: 6px 11px;
    cursor: pointer;
    transition: var(--transition);
}
.wd-dl-chip:hover { box-shadow: 0 0 0 2px rgba(201, 138, 22, 0.5); }
.wd-dl-chip.word { color: #3d7be0; }
.wd-dl-chip .wd-dl-go { color: #c98a16; font-size: 0.85em; margin-left: 3px; }
/* generated-document card (doc-generation scenario) */
.wd-gen {
    margin-top: 11px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wd-gen-lead { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; color: var(--primary-hover); }
/* mini document preview (paper) */
.wd-gp { background: #f6f7fb; border-radius: 7px; padding: 12px 13px; display: flex; flex-direction: column; gap: 6px; }
.wd-gp-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.72rem; color: #1f2937; margin-bottom: 3px; }
.wd-gp-line { height: 4px; border-radius: 2px; background: #d3d8e2; }
.wd-gp-tbl { margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.wd-gp-trow { display: flex; gap: 4px; }
.wd-gp-trow span { flex: 1; height: 7px; border-radius: 2px; background: #e2e6ee; }
.wd-gp-trow.head span { background: #c3cad8; }
/* divergence card — winner + minority alternatives + web arbiter (like the app) */
.wd-vcard {
    margin-top: 11px;
    border: 1px solid var(--warning-border);
    border-radius: 10px;
    padding: 11px 12px;
    background: rgba(245, 158, 11, 0.06);
}
.wd-vhead { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; color: var(--warning); margin-bottom: 10px; }
/* per-model badges (glyph + name), coloured per provider — like the app's source chip */
.wd-vbadges { display: inline-flex; flex-wrap: wrap; gap: 5px; }
/* Colored dot standing in for the brand icon on anonymous AI chips (the
   planet demo shows wrong answers — no-brand rule). */
.wd-mdot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wd-mbadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1;
    color: var(--pc);
    background: color-mix(in srgb, var(--pc) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--pc) 38%, transparent);
    border-radius: 999px;
    padding: 3px 8px 3px 6px;
}
.wd-mbadge img { width: 12px; height: 12px; border-radius: 3px; }
/* winner block — green, with the "coccarda" web-verified ribbon */
.wd-vwin {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 9px;
    padding: 8px 10px;
}
.wd-vwin-rib { display: flex; align-items: center; gap: 6px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: #34d399; margin-bottom: 6px; }
.wd-vwin-rib i { font-size: 0.9em; }
.wd-vwin-row { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; margin-bottom: 8px; }
.wd-vwin-row b { color: #34d399; font-weight: 700; }
.wd-vcheck { color: #10b981; font-size: 0.9em; }
.wd-vnote { margin-left: auto; font-size: 0.68rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
/* minority alternatives */
.wd-valts { display: flex; flex-direction: column; gap: 4px; margin-top: 7px; }
.wd-valt { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; padding: 3px 2px; }
.wd-valt b { color: var(--text-secondary, #cbd5e1); font-weight: 700; min-width: 78px; }
.wd-valt-dot { color: var(--text-dark); font-size: 0.7em; }
/* web arbiter box (cyan) */
.wd-webbox {
    display: flex;
    gap: 9px;
    margin-top: 10px;
    padding: 9px 11px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 9px;
}
.wd-webbox > i { color: var(--secondary-hover); font-size: 0.85rem; margin-top: 2px; }
.wd-webbox-label { display: block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--secondary-hover); margin-bottom: 2px; }
.wd-webbox-txt p { margin: 0; font-size: 0.74rem; line-height: 1.45; color: rgba(255, 255, 255, 0.82); }
/* animated status pill in the AI head */
.wd-status { margin-left: auto; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.wd-status.done { color: #10b981; }
.wd-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(148, 163, 184, 0.35); border-top-color: var(--secondary-hover); animation: wdSpin 0.7s linear infinite; }
@keyframes wdSpin { to { transform: rotate(360deg); } }
/* staged reveals */
.wd-pop { animation: wdPop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes wdPop { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
.wd-fade { animation: wdFade 0.4s ease both; }
@keyframes wdFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
/* streaming caret on the prose */
.wd-caret {
    display: inline-block;
    width: 7px;
    height: 1em;
    margin-left: 1px;
    vertical-align: -2px;
    background: var(--secondary-hover);
    animation: wdBlink 0.9s steps(1) infinite;
}
@keyframes wdBlink { 50% { opacity: 0; } }
/* typing caret in the input bar while a question is being "typed" */
.wd-input.typing .wd-input-txt { color: var(--text-main); }
.wd-input.typing .wd-input-txt::after {
    content: '';
    display: inline-block;
    width: 2px; height: 0.95em;
    margin-left: 1px;
    vertical-align: -2px;
    background: var(--primary-hover);
    animation: wdBlink 0.9s steps(1) infinite;
}
.wd-send.hot { animation: wdHot 0.5s ease; }
@keyframes wdHot { 0%, 100% { transform: none; } 40% { transform: scale(1.18); box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.18); } }
/* replay button pinned bottom-right of the chat */
.wd-replay {
    position: absolute;
    right: 20px;
    bottom: 84px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    transition: var(--transition);
}
.wd-replay:hover { color: var(--text-main); border-color: var(--primary); }
.wd-main { position: relative; }
/* CTA under the laptop */
.desktop-cta {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}
.desktop-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    box-shadow: 0 10px 30px -8px var(--primary-glow), 0 0 0 1px rgba(139, 92, 246, 0.4) inset;
    transition: var(--transition);
}
.desktop-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -10px rgba(139, 92, 246, 0.65), 0 0 0 1px rgba(167, 139, 250, 0.6) inset;
}
.desktop-cta-btn i { font-size: 0.9em; }
.desktop-cta-note { font-size: 0.82rem; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) {
    .wd-pop, .wd-fade, .wd-spin, .wd-caret, .wd-send.hot { animation: none; }
}

@media (max-width: 720px) {
    .desktop-section { padding: 70px 0; }
    .wd { font-size: 0.72rem; }
    .wd-side { display: none; }
    .wd-chat { padding: 14px; gap: 12px; }
    .wd-input { margin: 0 14px 14px; }
    .laptop-bezel { aspect-ratio: 4 / 3; }
    .wd-replay { bottom: 70px; right: 14px; }
}

/* ──────── Tab 1: Documents panel ──────── */
.studio-doc-panel {
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.doc-mockup-header {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
}

.doc-mockup-file-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-mockup-body {
    background-color: rgba(15, 23, 42, 0.35);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ──────── Tab 2: Images panel ──────── */
.studio-image-viewer-panel {
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.image-viewer-header {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
}

.image-viewer-file-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-viewer-body {
    background-color: rgba(15, 23, 42, 0.35);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.image-viewer-canvas {
    width: 100%;
    height: 310px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.image-viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.image-viewer-placeholder i {
    font-size: 2.2rem;
    color: rgba(139, 92, 246, 0.45);
    animation: rotatePulse 4s linear infinite;
}

/* ──────── Shared Workspace Side Panels ──────── */
.studio-assistant-panel, .studio-swarm-panel {
    background-color: rgba(5, 7, 12, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.doc-mockup-attachments {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
}

.doc-chip {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-chip.word { background: rgba(43, 87, 154, 0.15); border: 1px solid rgba(43, 87, 154, 0.35); color: #5c8ae6; }
.doc-chip.pdf { background: rgba(224, 87, 87, 0.15); border: 1px solid rgba(224, 87, 87, 0.35); color: #e05757; }
.doc-chip.image { background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.35); color: #a78bfa; }

.doc-demo-prompt, .swarm-prompt-box {
    padding: 16px 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.doc-demo-prompt-text {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-main);
    font-style: italic;
    margin: 0;
    padding-left: 12px;
    border-left: 2px solid rgba(139, 92, 246, 0.5);
    min-height: 38px;
}

.assistant-swarm-section {
    padding: 18px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.swarm-prompt {
    display: flex;
    align-items: center;
    gap: 9px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.swarm-prompt i { color: var(--text-muted); font-size: 0.8rem; }
.swarm-prompt span { flex-grow: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.swarm-prompt-check {
    color: #10b981;
    font-size: 0.9rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.swarm-prompt-check.active {
    opacity: 1;
    transform: scale(1);
}

.swarm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.swarm-tile {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.swarm-tile.generating {
    opacity: 0.5;
    transform: scale(0.98);
    animation: tileGenerateShimmer 1.8s ease-in-out infinite;
}

@keyframes tileGenerateShimmer {
    0%, 100% { opacity: 0.4; border-color: rgba(255, 255, 255, 0.05); }
    50% { opacity: 0.75; border-color: rgba(139, 92, 246, 0.25); }
}

.swarm-tile.ready {
    opacity: 1;
    transform: scale(1);
}

.swarm-tile.s0 { background: radial-gradient(circle at 50% 60%, #ffd98a 0 8%, transparent 9%), linear-gradient(180deg, #3a2e6b 0%, #ff8c6b 100%); }
.swarm-tile.s1 { background: radial-gradient(circle at 50% 40%, #fff3d6 0 7%, transparent 8%), linear-gradient(180deg, #ffe29f 0 62%, #2e86ab 62%, #1b4965 100%); }
.swarm-tile.s2 { background: radial-gradient(circle at 72% 28%, #eaf6ff 0 6%, transparent 7%), linear-gradient(180deg, #0f2027 0%, #2c5364 100%); }
.swarm-tile.s3 { background: radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.6) 0 8%, transparent 9%), linear-gradient(135deg, #c471f5 0%, #fad0c4 100%); }

.swarm-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(5, 7, 12, 0.65);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.58rem;
    font-weight: 600;
    z-index: 2;
}

.swarm-tile-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(139, 92, 246, 0.45);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.35s ease;
    z-index: 2;
}

.swarm-tile-overlay i {
    color: #fff;
    font-size: 1.4rem;
    transform: scale(0.6);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.swarm-tile.selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    transform: scale(1.02);
    z-index: 3;
}

.swarm-tile.selected .swarm-tile-overlay {
    opacity: 1;
}

.swarm-tile.selected .swarm-tile-overlay i {
    transform: scale(1);
}

.doc-demo-status-container {
    padding: 12px 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 52px;
    display: flex;
    align-items: center;
}

.doc-demo-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.doc-demo-loading .mixer-loader-gif {
    width: 24px;
    height: 24px;
}

@keyframes docAnimIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.doc-anim-in {
    animation: docAnimIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.doc-paper {
    background: #fbfbfd;
    color: #1e293b;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.doc-h {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
    letter-spacing: 0.02em;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.doc-p {
    font-size: 0.7rem;
    line-height: 1.6;
    color: #334155;
    margin: 0 0 8px;
}

.doc-p b { color: #0f172a; }

.doc-sign {
    font-size: 0.68rem;
    color: #64748b;
    margin: 14px 0 0;
}

.doc-cover {
    margin-bottom: 14px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-cover.active {
    height: 110px;
    opacity: 1;
}

.doc-cover-art {
    position: relative;
    height: 100%;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    background-size: cover;
    background-position: center;
}

.doc-cover-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(3, 7, 18, 0.1) 0%, rgba(3, 7, 18, 0.5) 100%);
}

.doc-cover-caption {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.doc-cover-caption i { color: var(--secondary-hover); }

.doc-cover-titles {
    position: relative;
    z-index: 2;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    padding: 0 12px;
}

.doc-cover-kicker {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4px;
}

.doc-cover-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.doc-edit-p {
    position: relative;
    background: rgba(139, 92, 246, 0.09);
    border: 1px dashed rgba(139, 92, 246, 0.55);
    border-radius: 6px;
    padding: 10px 12px;
    margin: 10px 0;
}

.doc-edit-p .doc-p { margin: 0; }
.doc-edit-p .doc-p.highlight { color: #1e1b4b; font-weight: 500; }
.doc-edit-p .doc-p.highlight b { color: #4c1d95; }

.doc-edit-p .doc-edit-desc {
    display: block;
    font-size: 0.6rem;
    color: #7c3aed;
    margin-top: 6px;
    font-style: italic;
}

.doc-demo-summary {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    animation: docAnimIn 0.4s ease;
}

.doc-demo-summary i {
    color: #10b981;
    margin-top: 2px;
    flex-shrink: 0;
}

.doc-demo-summary strong { color: #fff; }

.doc-demo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background-color: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 52px;
}

.doc-export-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-export-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.doc-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.doc-export-btn.word {
    background: rgba(43, 87, 154, 0.18);
    border: 1px solid rgba(43, 87, 154, 0.4);
    color: #7ba3ee;
}

.doc-export-btn.pdf {
    background: rgba(224, 87, 87, 0.16);
    border: 1px solid rgba(224, 87, 87, 0.4);
    color: #ef7a7a;
}

.doc-demo-replay {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-hover);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.doc-demo-replay:hover { background: rgba(139, 92, 246, 0.22); }

/* Grid of features below the mockup */
.doc-features-container {
    margin-top: 48px;
}

.doc-features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.doc-features-grid .doc-feature-card {
    flex: 0 1 calc((100% - 40px) / 3);
    min-width: 300px;
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.doc-features-grid .doc-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.35);
    background-color: rgba(15, 23, 42, 0.65);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.4), 
        0 0 25px rgba(139, 92, 246, 0.08);
}

.doc-features-grid .doc-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.doc-features-grid .doc-feature-icon.violet {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 6px 14px rgba(139, 92, 246, 0.2);
}

.doc-features-grid .doc-feature-icon.cyan {
    background: linear-gradient(135deg, #06b6d4, #0e7490);
    box-shadow: 0 6px 14px rgba(6, 182, 212, 0.25);
}

.doc-features-grid .doc-feature-icon.gold {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.2);
}

.doc-features-grid .doc-feature-text h3 {
    font-size: 1.08rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.doc-features-grid .doc-feature-text p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 980px) {
    .studio-workspace-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .studio-doc-panel, .studio-image-viewer-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 16px;
    }
    
    .doc-mockup-body, .image-viewer-body {
        min-height: 350px;
    }
    
    .doc-features-grid .doc-feature-card {
        flex: 0 1 calc((100% - 20px) / 2);
    }
}

@media (max-width: 650px) {
    .doc-features-grid .doc-feature-card {
        flex: 0 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .swarm-tile { transform: none; opacity: 1; }
    .swarm-tile.generating { animation: none; opacity: 1; }
    .studio-tabs button { transition: none; }
}

/* 8. Section: Features */
.features-section {
    padding: 56px 0;
    position: relative;
    background-color: transparent;
}

.features-glow {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, rgba(139, 92, 246, 0.02) 60%, transparent 100%);
    filter: blur(80px);
    pointer-events: none;
}

/* flex (not grid) so a lone last card centers instead of sitting orphaned left */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 50px;
}

.feature-card {
    position: relative;
    /* fixed equal basis (no grow) → the lone last card matches the others, just centered */
    flex: 0 1 calc((100% - 48px) / 3);
    min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    transition: var(--transition);
    overflow: hidden;
}

/* faint gradient line that lights up on hover */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(139, 92, 246, 0.08);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 22px;
    color: #fff;
}

/* gradient tiles with a coloured glow, echoing the app icon + timeline icons */
.feature-icon.violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 8px 18px rgba(139, 92, 246, 0.3); }
.feature-icon.cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); box-shadow: 0 8px 18px rgba(6, 182, 212, 0.3); }
.feature-icon.gold { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 8px 18px rgba(245, 158, 11, 0.3); }

/* feature cards: 3 per row → 2 → 1, always equal width */
@media (max-width: 980px) {
    .feature-card { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 600px) {
    .feature-card { flex-basis: 100%; }
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 9. Section: Waitlist */
.waitlist-section {
    padding: 56px 0;
    background-color: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.waitlist-container {
    display: flex;
    justify-content: center;
}

.waitlist-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    max-width: 800px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(139, 92, 246, 0.08);
}

.waitlist-content h2 {
    font-size: 2.25rem;
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.waitlist-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 32px auto;
}

.waitlist-form {
    display: flex;
    gap: 16px;
    max-width: 580px;
    margin: 0 auto 16px auto;
}

.input-group {
    position: relative;
    flex-grow: 1;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.waitlist-form input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: var(--radius-sm);
    background-color: rgba(5, 7, 12, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.waitlist-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.form-disclaimer {
    font-size: 0.8rem !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
}

/* Form submission spinner state */
.waitlist-form.submitting button .btn-text {
    display: none;
}
.waitlist-form.submitting button .btn-spinner {
    display: inline-block;
}
.waitlist-form.submitting button {
    pointer-events: none;
    opacity: 0.8;
}

/* 10. Footer */
.footer {
    background: rgba(5, 7, 12, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 60px 0 24px 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
    max-width: 320px;
}

.footer-links h3, .footer-socials h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links ul a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links ul a:hover {
    color: var(--text-main);
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.social-icon:hover {
    color: #fff;
    border-color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Legal identification (D.Lgs. 70/2003 art. 7). Quiet but readable: the law
   asks for "facile e diretto", so it must not be dimmed into invisibility. */
.footer-legal {
    margin: 0 0 8px 0;
    line-height: 1.7;
    color: var(--text-muted);
}

.footer-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-legal a:hover {
    color: var(--text-main);
}

/* 11. Modal Overlay & Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 20px;
}

.modal h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.modal-tip {
    font-size: 0.85rem !important;
    background-color: rgba(139, 92, 246, 0.08);
    border: 1px solid var(--border-glow);
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--primary-hover) !important;
}

.referral-box {
    display: flex;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.referral-box input {
    flex-grow: 1;
    background-color: var(--bg-darker);
    border: none;
    color: var(--text-main);
    padding: 10px 14px;
    font-family: monospace;
    font-size: 0.85rem;
}

.referral-box input:focus {
    outline: none;
}

.copy-ref-btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-ref-btn:hover {
    background-color: var(--primary-hover);
}

/* 11. FAQ + final CTA */
/* ── Plan comparison (mirrors the in-app paywall matrix) ── */
.compare-section {
    position: relative;
    z-index: 1;
    padding: 56px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.cmp-card {
    position: relative;
    max-width: 780px;
    margin: 44px auto 0;
    background: linear-gradient(180deg, rgba(17, 26, 54, 0.72), rgba(10, 15, 33, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 26px 26px 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

/* Brand hairline across the top of the card. */
.cmp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #5B7CFA, #8B5CF6, transparent);
    opacity: 0.75;
}

.cmp-scroll { overflow-x: auto; }

.cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.cmp-table th { padding: 0 6px 14px; }
.cmp-table th:first-child { width: 44%; }

.cmp-table td {
    padding: 12px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    color: var(--text-muted);
    vertical-align: middle;
    transition: background 0.15s ease;
}

.cmp-table tbody tr:hover td { background: rgba(91, 124, 250, 0.05); }
/* Column identity on hover, per tier (paywall accents) — tbody only. */
.cmp-table tbody tr:hover td:nth-child(2) { background: rgba(122, 184, 255, 0.07); }
.cmp-table tbody tr:hover td:nth-child(3) { background: rgba(122, 155, 232, 0.08); }
.cmp-table tbody tr:hover td:nth-child(4) { background: rgba(155, 140, 255, 0.08); }

.cmp-table td:first-child {
    text-align: left;
    color: #dbe3f2;
    font-weight: 500;
    line-height: 1.35;
    padding-right: 12px;
}

/* Amber band + hairline caps on the Max column (the plan being sold). */
.cmp-table .cmp-max {
    background: linear-gradient(180deg, rgba(232, 176, 87, 0.10), rgba(232, 176, 87, 0.05));
    border-left: 1px solid rgba(232, 176, 87, 0.16);
    border-right: 1px solid rgba(232, 176, 87, 0.16);
}
.cmp-table tbody tr:hover td.cmp-max { background: rgba(232, 176, 87, 0.13); }

/* ── Paywall-card language in the compare table (user 2026-08-12): the
   app's plan cards carry a circular accent emblem, a tier accent colour and
   a big-price/small-suffix lockup — mirrored here so LP and paywall read as
   one family. Accents: Free #7AB8FF · Go #7A9BE8 · Pro #9B8CFF · Max #E8B057. */
/* Tier icon lives INSIDE the pill (user 2026-08-12), same glyphs as the
   app's plan cards: sparkles / rocket / medal / gem. */
.cmp-pill i {
    font-size: 0.72em;
    margin-right: 5px;
}

/* Price row (tfoot): the paywall's big-value + small-suffix lockup, one per
   tier accent. The row separates from the features with a stronger rule. */
.cmp-price-row td {
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    padding-top: 14px;
    padding-bottom: 4px;
}

.cmp-price-row td:first-child {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.cmp-price {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cmp-price small {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 1px;
}

.cmp-price.free { color: #7AB8FF; }
.cmp-price.go   { color: #7A9BE8; }
.cmp-price.pro  { color: #9B8CFF; }
.cmp-price.max  { color: #E8B057; }

.cmp-pill {
    display: inline-block;
    min-width: 52px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.cmp-pill.free { background: rgba(156, 163, 175, 0.10); color: #9ca3af; border-color: rgba(156, 163, 175, 0.25); }
.cmp-pill.go   { background: rgba(78, 115, 214, 0.12);  color: #7A9BE8; border-color: rgba(122, 155, 232, 0.35); }
.cmp-pill.pro  { background: rgba(155, 140, 255, 0.12); color: #9B8CFF; border-color: rgba(155, 140, 255, 0.35); }
.cmp-pill.max  {
    background: linear-gradient(135deg, rgba(232, 176, 87, 0.26), rgba(232, 140, 60, 0.16));
    color: #F2C077;
    border-color: rgba(232, 176, 87, 0.5);
    box-shadow: 0 0 18px rgba(232, 176, 87, 0.18);
}

.cmp-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(62, 207, 142, 0.28), rgba(52, 199, 89, 0.12));
    border: 1px solid rgba(62, 207, 142, 0.35);
    color: #3ECF8E;
    font-size: 0.7rem;
    box-shadow: 0 0 10px rgba(62, 207, 142, 0.12);
}

.cmp-no { color: rgba(156, 163, 175, 0.4); }
.cmp-num { font-weight: 800; color: #E2E9F7; font-size: 1rem; }

/* Comparison table: the AI count opens a hover popup listing the models
   (icon + label stacked — a one-line tooltip clipped on the last column). */
.cmp-ai { position: relative; cursor: help; border-bottom: 1px dashed rgba(226, 233, 247, 0.35); padding-bottom: 1px; }
.ai-pop { position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-2px); display: flex; flex-direction: column;
  gap: 6px; align-items: flex-start; text-align: left; background: #1B2232;
  padding: 9px 13px; border-radius: 10px; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  font-size: 0.72rem; font-weight: 600; color: #E2E9F7;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; z-index: 6; }
.ai-pop span { display: inline-flex; align-items: center; gap: 7px; }
.ai-pop img { width: 14px; height: 14px; display: block; }
.cmp-ai:hover .ai-pop { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Max (last column): right-anchored — a centered popup sticks out past the
   table edge and, even at opacity 0, widens the scroll area (the phantom
   horizontal scrollbar). */
.cmp-max .ai-pop { left: auto; right: 2px; transform: translateY(-2px); }
.cmp-max .cmp-ai:hover .ai-pop { transform: translateY(0); }

/* Usage volume: 4-notch meter instead of dots. */
.cmp-meter { display: inline-flex; gap: 3px; align-items: flex-end; }
.cmp-meter i {
    width: 6px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.10);
    height: 14px;
}
.cmp-meter i:nth-child(1) { height: 8px; }
.cmp-meter i:nth-child(2) { height: 11px; }
.cmp-meter i:nth-child(3) { height: 14px; }
.cmp-meter i:nth-child(4) { height: 17px; }
.cmp-meter i.on { background: linear-gradient(180deg, #8B5CF6, #5B7CFA); }

.cmp-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    color: #A99DFF;
    border: 1px solid rgba(155, 140, 255, 0.4);
    background: rgba(155, 140, 255, 0.08);
    padding: 2px 9px;
    border-radius: 999px;
    text-transform: lowercase;
    letter-spacing: 0.03em;
}

/* Footnote as a callout — the price reference lives in the app. */
.cmp-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 2px 2px;
    padding: 12px 14px;
    border: 1px solid rgba(91, 124, 250, 0.22);
    background: rgba(91, 124, 250, 0.06);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}
.cmp-note i { color: #7A9BE8; margin-top: 2px; }
.cmp-note strong { color: #C7D4F5; }

@media (max-width: 560px) {
    .cmp-card { padding: 16px 12px 12px; }
    .cmp-table { font-size: 0.8rem; min-width: 480px; }
}

.faq-section {
    padding: 56px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.faq-list {
    max-width: 760px;
    margin: 50px auto 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px 24px;
    transition: var(--transition);
}

.faq-item[open] { border-color: rgba(139, 92, 246, 0.3); }

/* smooth expand/collapse (modern browsers; degrades to instant elsewhere) */
.faq-item::details-content {
    block-size: 0;
    opacity: 0;
    overflow: hidden;
    transition: block-size 0.35s ease, opacity 0.3s ease, content-visibility 0.35s allow-discrete;
}

.faq-item[open]::details-content {
    block-size: auto;
    opacity: 1;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    line-height: 1;
    color: var(--secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item[open] summary::after { content: '\2013'; }

.faq-item p {
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.6;
    padding: 0 0 18px;
    margin: 0;
}

.cta-final {
    padding: 40px 0 110px;
}

.cta-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.cta-card h2 {
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 28px;
}

.cta-card .hero-actions {
    justify-content: center;
}

/* 12. Responsiveness Styles */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-sources {
        order: 2;
    }
    
    .demo-synthesis {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-cta {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav {
        position: fixed;
        top: 69px;
        left: 0;
        width: 100%;
        height: calc(100vh - 69px);
        background-color: var(--bg-darker);
        padding: 40px 24px;
        transform: translateX(-100%);
        transition: var(--transition);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    
    .nav-link {
        font-size: 1.25rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::after {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
        padding-right: 0;
    }
    
    .timeline-icon {
        left: -2px;
        width: 40px;
        height: 40px;
    }
    
    .waitlist-form {
        flex-direction: column;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.15rem;
    }

    /* shrink the phone mock so it never overflows narrow viewports */
    .phone-frame {
        width: 300px;
        height: 624px;
    }

    /* stack the beta buttons full-width */
    .store-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }

    .cta-card {
        padding: 40px 24px;
    }

    .cta-card h2 {
        font-size: 1.7rem;
    }
}


/* ── "Come funziona" — rev 4 (2026-08-06): CONNECTED vertical timeline
   (numbered circles joined by a line, one card per step) + ONE flat
   phone screenshot in a CSS device frame. Mirrors the user's mockup with
   the site's own palette. */
.flow-wrap { display: flex; align-items: center; gap: 56px; margin-bottom: 36px; }
.flow-timeline { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; gap: 22px; }
.flow-timeline::before {
    content: "";
    position: absolute;
    left: 17px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(145,130,245,0.45) 14%, rgba(67,99,214,0.45) 86%, transparent);
}
.flow-step { display: flex; align-items: center; gap: 20px; position: relative; }
/* Staggered reveal when the timeline enters the viewport (script.js adds
   .inview on the container; each step follows with a growing delay). */
@media (prefers-reduced-motion: no-preference) {
    .flow-timeline .flow-step {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.55s ease, transform 0.55s ease;
    }
    .flow-timeline .flow-step:nth-child(2) { transition-delay: 0.15s; }
    .flow-timeline .flow-step:nth-child(3) { transition-delay: 0.3s; }
    .flow-timeline .flow-step:nth-child(4) { transition-delay: 0.45s; }
    .flow-timeline.inview .flow-step { opacity: 1; transform: none; }
}
.flow-n {
    display: inline-flex;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4363d6, #9182f5);
    color: #fff;
    font-weight: 800;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 5px rgba(145, 130, 245, 0.12), 0 6px 16px rgba(0, 0, 0, 0.4);
    z-index: 1;
    font-size: 0.95rem;
}
.flow-card {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 14px;
    padding: 16px 22px;
}
.flow-card h3 { font-size: 1.15rem; margin: 0 0 6px; }
.flow-card p { margin: 0; color: var(--text-secondary, #98a2b8); line-height: 1.55; font-size: 0.92rem; }
.flow-fan {
    position: relative;
    width: min(430px, 40%);
    aspect-ratio: 1 / 1.34;
    flex-shrink: 0;
    order: -1; /* fan LEFT, timeline right */
}
/* Flat captures + CSS device frame; the tilt is pure CSS rotation. */
.flow-fan img {
    position: absolute;
    height: auto;
    border-radius: 24px;
    border: 6px solid #1a2337;
    background: #1a2337;
}
.fan-l, .fan-r {
    width: 55%;
    top: 9%;
    filter: brightness(0.72);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.fan-l { left: 0; transform: rotate(-9deg); }
.fan-r { right: 0; transform: rotate(9deg); }
.fan-c {
    width: 60%;
    left: 50%; top: 0;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(145, 130, 245, 0.75), 0 24px 55px rgba(0, 0, 0, 0.6), 0 0 46px rgba(145, 130, 245, 0.22);
}
@media (min-width: 981px) {
    .how-it-works > .container {
        /* whole section at 0.90 (user 2026-08-11). zoom, not transform:
           zoom scales LAYOUT height too, so section offsets stay truthful
           for the snap with no negative-margin bookkeeping. */
        zoom: 0.90;
    }
}

.how-it-works .section-subtitle {
    /* one line at full text size (user 2026-08-11) — the generic 700px cap
       forced a wrap */
    max-width: none;
}

.flow-strip {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
    padding-top: 26px;
}
.flow-chip {
    display: inline-flex; align-items: center; gap: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary, #98a2b8);
}
.flow-chip i { color: #9182f5; }
@media (max-width: 900px) {
    .flow-wrap { flex-direction: column; gap: 34px; }
    .flow-fan { width: min(360px, 88%); }
}

/* Minority/unique-claim line in the hero demo (app-style trust mark). */
.phone-minor { margin-top: 8px; }
.phone-mark-minor {
    color: #BCD4F2;
    font-weight: 600;
    border-bottom: 1px dotted rgba(188, 212, 242, 0.7);
}
.phone-minor-check { color: #3ECF8E; font-size: 0.85em; }

/* Verified unique claim row (AI 3): green check, neutral text — distinct
   from the .win answer row. */
.phone-detail-row.ok b { color: #cfd8ea; }
