/* =============================================
   DAXLYZE Demo Dashboard CSS
   Standalone design — sjednoceno s app dashboardem
   (cobalt/indigo/mint/coral paleta, premium redesign)
   ============================================= */

/* V3.4.15.46: self-hosted Space Grotesk (Google Fonts dependency odstraněna).
   @font-face deklarace v /landing/assets/fonts.css se načítá v demo.html hlavičce. */

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

::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; }

:root {
    --primary: #215cff;
    --primary-hover: #1747d9;
    --indigo: #6057ff;
    --bg: #f4f7fc;
    --bg-gradient:
        radial-gradient(circle at 15% 6%, rgba(33,92,255,0.07), transparent 34%),
        radial-gradient(circle at 85% 88%, rgba(24,185,125,0.06), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fc 100%);
    --sidebar-bg: linear-gradient(180deg, #0b1120 0%, #121a2e 100%);
    --card-bg: rgba(255,255,255,0.86);
    --text: #121827;
    --text-secondary: #475569;
    --text-muted: #667085;
    --text-faint: #8a94a7;
    --border: rgba(16,24,40,0.08);
    --success: #18b97d;
    --error: #f66d4b;
    --warning: #e7a73b;
    --sidebar-w: 216px;
    --radius: 20px;
    --radius-xl: 28px;
    --shadow-card: 0 18px 44px rgba(18,24,39,0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
}

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

/* ─── Layout ─── */
.demo-app {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar (dark premium cockpit) ─── */
.demo-sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-sidebar-top {
    margin-bottom: 22px;
}

.demo-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    display: block;
    padding: 0 8px;
    margin-bottom: 14px;
}

.demo-site-badge {
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.demo-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font);
}

.demo-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    transform: translateX(3px);
}

.demo-nav-item.active {
    background: linear-gradient(135deg, rgba(33, 92, 255, 0.22), rgba(96, 87, 255, 0.16));
    color: #fff;
    font-weight: 700;
    box-shadow:
        inset 0 0 0 1px rgba(135, 156, 255, 0.32),
        0 8px 20px -8px rgba(33, 92, 255, 0.4);
}

.demo-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
    opacity: 0.8;
}
.demo-nav-item.active svg { opacity: 1; }

.demo-nav-category {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.48);
    padding: 14px 14px 6px;
    margin-top: 4px;
}

.demo-nav-category:first-child {
    margin-top: 0;
    padding-top: 4px;
}

.demo-nav-spacer {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 14px 14px 10px;
}

/* ─── Content ─── */
.demo-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 32px 34px 90px;
    min-height: 100vh;
}

/* ─── Page transitions ─── */
.demo-page {
    animation: demoFadeIn 0.3s ease;
}

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

/* ─── Page header ─── */
.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 14px;
    flex-wrap: wrap;
}

.demo-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.demo-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.demo-period {
    display: inline-flex;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    box-shadow: 0 6px 16px rgba(16,24,40,0.06);
}

.demo-realtime {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 10px;
    background: rgba(24, 185, 125, 0.12);
    color: var(--success);
    box-shadow: inset 0 0 0 1px rgba(24, 185, 125, 0.22);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.demo-realtime::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: demoPulse 2s ease infinite;
}

@keyframes demoPulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ─── Metrics grid ─── */
.demo-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.demo-metric {
    padding: 22px 22px 18px;
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 60px rgba(18,24,39,0.08);
}

.demo-metric-value {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 6px;
}

.demo-metric-value.positive { color: var(--success); }
.demo-metric-value.negative { color: var(--error); }

.demo-metric-unit {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-faint);
    margin-left: 4px;
}

.demo-metric-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-faint);
}

.demo-metric-trend {
    font-size: 12px;
    font-weight: 800;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 999px;
}

.demo-metric-trend.up   { color: var(--success); background: rgba(24, 185, 125, 0.12); }
.demo-metric-trend.down { color: var(--error);   background: rgba(246, 109, 75, 0.12); }

/* ─── Card ─── */
.demo-card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow-card);
    margin-bottom: 18px;
}

.demo-card-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

/* ─── Table ─── */
.demo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.demo-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.demo-table td {
    padding: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    vertical-align: middle;
}

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

.demo-table th.r, .demo-table td.r { text-align: right; }

.demo-table-name {
    font-weight: 600;
    color: var(--text);
}

.demo-table-url {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ─── Chart ─── */
.demo-chart-wrap {
    height: 220px;
    position: relative;
}

/* ─── Status badge ─── */
.demo-status {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.demo-status-healthy { background: rgba(24, 185, 125,0.08); color: var(--success); }
.demo-status-warning { background: rgba(231, 167, 59,0.1); color: var(--warning); }
.demo-status-loss    { background: rgba(246, 109, 75,0.08); color: var(--error); }

/* ─── Funnel ─── */
.demo-funnel-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.demo-funnel-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(33, 92, 255, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.demo-funnel-info { flex: 1; }

.demo-funnel-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.demo-funnel-bar {
    height: 8px;
    border-radius: 99px;
    background: rgba(33, 92, 255,0.08);
    overflow: hidden;
}

.demo-funnel-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #215cff, #6057ff);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-funnel-stats {
    text-align: right;
    min-width: 80px;
}

.demo-funnel-visitors {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
}

.demo-funnel-pct {
    font-size: 11px;
    color: var(--text-muted);
}

.demo-funnel-leak {
    padding: 12px 16px;
    background: rgba(246, 109, 75,0.04);
    border: 1px solid rgba(246, 109, 75,0.08);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-funnel-leak svg { color: var(--error); flex-shrink: 0; }

/* ─── Security info banner ─── */
.demo-security-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: linear-gradient(180deg, rgba(33, 92, 255,0.06) 0%, rgba(33, 92, 255,0.02) 100%);
    border: 1px solid rgba(33, 92, 255,0.15);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text, #0f172a);
}

.demo-security-banner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #215cff;
    margin-top: 1px;
}

/* ─── Scroll donut ve Stránky tabulce ─── */
.demo-scroll-donut {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.demo-scroll-donut-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--text, #0f172a);
    font-variant-numeric: tabular-nums;
}

/* ─── Funnel drop-off mezi kroky ─── */
.demo-funnel-dropoff {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 6px 16px;
    margin: -2px 0 -2px 22px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    position: relative;
}

.demo-funnel-dropoff-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

.demo-funnel-dropoff-text {
    letter-spacing: 0.01em;
}

.demo-funnel-dropoff-bad {
    color: var(--error);
}

.demo-funnel-dropoff-bad .demo-funnel-dropoff-arrow {
    opacity: 0.9;
}

/* ─── Funnel dropout detail panel (pod kroky) ─── */
.demo-funnel-dropout-detail {
    margin: 6px 0 12px 64px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(246, 109, 75,0.04) 0%, rgba(246, 109, 75,0.015) 100%);
    border: 1px solid rgba(246, 109, 75,0.1);
    border-radius: 12px;
}

.demo-funnel-dropout-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--error);
    margin-bottom: 10px;
}

.demo-funnel-dropout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.demo-funnel-dropout-stat {
    background: #fff;
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: 8px;
    padding: 10px 12px;
}

.demo-funnel-dropout-stat-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 4px;
}

.demo-funnel-dropout-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #0f172a);
    font-variant-numeric: tabular-nums;
}

.demo-funnel-dropout-field {
    color: var(--error);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    font-weight: 600;
}

@media (max-width: 560px) {
    .demo-funnel-dropout-detail { margin-left: 0; }
    .demo-funnel-dropoff { margin-left: 0; padding-left: 0; }
}

/* ─── Profit calc breakdown ─── */
.demo-calc-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
}

.demo-calc-row + .demo-calc-row { border-top: 1px solid var(--border); }

.demo-calc-label { color: var(--text-muted); font-weight: 500; }
.demo-calc-value { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.demo-calc-value.positive { color: var(--success); }
.demo-calc-value.negative { color: var(--error); }

.demo-calc-result {
    border-top: 2px solid rgba(0,0,0,0.08) !important;
    padding-top: 14px;
    margin-top: 4px;
}

.demo-calc-result .demo-calc-label { font-weight: 700; color: var(--text); font-size: 14px; }
.demo-calc-result .demo-calc-value { font-size: 16px; }

/* ─── Recommendation cards ─── */
.demo-rec {
    padding: 16px 18px;
    border-radius: 12px;
    border-left: 4px solid;
    margin-bottom: 10px;
}

.demo-rec:last-child { margin-bottom: 0; }

.demo-rec-opportunity { background: rgba(24, 185, 125,0.04); border-left-color: var(--success); }
.demo-rec-warning     { background: rgba(231, 167, 59,0.04); border-left-color: var(--warning); }

.demo-rec-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.demo-rec-body  { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* ─── A/B Test variants ─── */
.demo-variant {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    position: relative;
}

.demo-variant.winner {
    border-color: rgba(24, 185, 125,0.25);
    background: rgba(24, 185, 125,0.02);
}

.demo-variant-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.demo-variant-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.demo-variant-stats {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.demo-variant-stats strong { color: var(--text); font-weight: 700; }

.demo-variant-change {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 18px;
    font-weight: 800;
    color: var(--success);
}

.demo-winner-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(24, 185, 125,0.1);
    color: var(--success);
    margin-left: 8px;
}

.demo-confidence-bar {
    height: 8px;
    border-radius: 99px;
    background: rgba(33, 92, 255,0.1);
    overflow: hidden;
    margin: 12px 0 4px;
}

.demo-confidence-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #215cff, #18b97d);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── AI Audit score circle ─── */
.demo-score-wrap {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
}

.demo-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 6px solid rgba(33, 92, 255,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.demo-score-circle::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    border-bottom-color: var(--primary);
    transform: rotate(-30deg);
}

.demo-score-number {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.035em;
}

.demo-score-max {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.demo-score-categories { flex: 1; }

.demo-score-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
}

.demo-score-cat-name { width: 90px; font-weight: 600; color: var(--text-secondary); }

.demo-score-cat-bar {
    flex: 1;
    height: 6px;
    border-radius: 99px;
    background: rgba(0,0,0,0.04);
    overflow: hidden;
}

.demo-score-cat-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-score-cat-value {
    width: 30px;
    text-align: right;
    font-weight: 700;
    color: var(--text);
}

/* ─── Priority badge ─── */
.demo-priority {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 8px;
}

.demo-priority-high   { background: rgba(246, 109, 75,0.08); color: var(--error); }
.demo-priority-medium { background: rgba(231, 167, 59,0.08); color: var(--warning); }
.demo-priority-low    { background: rgba(100,116,139,0.08); color: var(--text-muted); }

.demo-rec-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.demo-rec-item:last-child { border-bottom: none; }

/* ─── Security metrics ─── */
.demo-security-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.demo-security-metric {
    text-align: center;
    padding: 20px 12px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.demo-security-value {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.demo-security-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ─── CTA bar ─── */
.demo-cta {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    background: linear-gradient(180deg, transparent, rgba(244,247,252,0.96) 30%);
    padding: 22px 34px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 50;
}

.demo-cta-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.demo-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, #215cff 0%, #6057ff 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    text-decoration: none;
    box-shadow: 0 10px 24px -6px rgba(33, 92, 255, 0.42);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-cta-btn:hover {
    box-shadow: 0 14px 32px -6px rgba(33, 92, 255, 0.56);
    transform: translateY(-1px);
}

/* ─── Hamburger ─── */
.demo-hamburger {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(16,24,40,0.12);
    color: var(--text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.demo-hamburger:active { transform: scale(0.94); }

.demo-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 32, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-sidebar.open ~ .demo-sidebar-backdrop,
.demo-sidebar-backdrop.open {
    display: block;
    opacity: 1;
    color: var(--text);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .demo-metrics,
    .demo-security-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .demo-sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .demo-sidebar.open {
        transform: translateX(0);
        box-shadow: 6px 0 32px rgba(0,0,0,0.2);
    }

    .demo-hamburger { display: flex; }

    .demo-content {
        margin-left: 0;
        padding: 74px 16px 100px;
    }

    .demo-cta {
        left: 0;
        padding: 14px 16px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .demo-metrics,
    .demo-security-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .demo-content { padding: 70px 14px 110px; }
    .demo-metrics,
    .demo-security-metrics { grid-template-columns: 1fr; }

    .demo-metric-value { font-size: 22px; }
    .demo-title { font-size: 20px; line-height: 1.22; }
    .demo-score-wrap { flex-direction: column; gap: 20px; }
    .demo-variant-stats { flex-wrap: wrap; gap: 12px; }
    .demo-cta { flex-direction: column; align-items: stretch; }
    .demo-cta-text { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .demo-page { animation: none; }
    .demo-funnel-bar-fill { transition: none; }
    .demo-confidence-fill { transition: none; }
    .demo-score-cat-fill { transition: none; }
    .demo-realtime::before { animation: none; }
}
