@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Screen-reader only (SEO-visible, visually hidden) ───────────────────── */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* ── Design Tokens v2 ────────────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg:           #08090c;
    --bg-card:      #111318;
    --bg-surface:   #181b22;
    --bg-input:     #0c0d12;
    --nav-bg:       rgba(8,9,12,0.82);
    /* Accent system */
    --accent:       #00e6b8;
    --accent2:      #6366f1;
    --accent-hover: #00cca3;
    --accent-glow:  rgba(0,230,184,0.14);
    /* Text hierarchy */
    --text:         #edf2f7;
    --text-2:       #8b95a5;
    --text-3:       #4a5568;
    --text-muted:   #5a6577;
    /* Borders & shadows */
    --border:       rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.14);
    --shadow:       0 2px 16px rgba(0,0,0,0.45);
    --shadow-lg:    0 8px 48px rgba(0,0,0,0.55);
    --radius:       12px;
    --radius-lg:    20px;
    /* Severity */
    --critical:     #f43f5e;
    --high:         #fb923c;
    --medium:       #facc15;
    --low:          #34d399;
    --info:         #6366f1;
    --critical-glow: rgba(244,63,94,0.2);
    --high-glow:     rgba(251,146,60,0.2);
    --medium-glow:   rgba(250,204,21,0.2);
    --low-glow:      rgba(52,211,153,0.2);
    /* shadcn aliases */
    --card:                  var(--bg-card);
    --ring:                  rgba(0,230,184,0.35);
    --input:                 var(--bg-input);
    --muted:                 var(--bg-surface);
    --background:            var(--bg);
    --foreground:            var(--text);
    --primary:               var(--accent);
    --primary-foreground:    #08090c;
    --secondary:             var(--bg-surface);
    --secondary-foreground:  var(--text);
    --destructive:           var(--critical);
    --destructive-foreground:#ffffff;
    --muted-foreground:      var(--text-2);
    --accent-foreground:     var(--text);
    --popover:               var(--bg-card);
    --popover-foreground:    var(--text);
    --card-foreground:       var(--text);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Selection */
::selection { background: rgba(0,230,184,0.2); color: var(--text); }

/* Section utilities */
.section-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 0.6rem;
}
.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.15;
}

/* ── Navbar — glassmorphism ─────────────────────────────────────────────── */
.navbar {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.brand-icon { color: var(--accent); }

.brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}


.nav-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* ── Lang dropdown ────────────────────────────────────────────────────────── */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: transparent;
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    line-height: 1;
}
.lang-dropdown-trigger:hover { border-color: var(--accent); color: var(--text); background: rgba(0,230,184,0.04); }
.lang-dropdown-trigger svg { width: 14px; height: 14px; color: var(--text-3); }
.lang-dropdown.open .lang-dropdown-trigger { border-color: var(--accent); color: var(--text); }

.lang-dropdown-chevron {
    transition: transform 0.25s cubic-bezier(.16,1,.3,1);
}
.lang-dropdown.open .lang-dropdown-chevron { transform: rotate(180deg); }

.lang-dropdown-flag { font-size: 0.9rem; line-height: 1; }

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.95) translateY(-8px);
    min-width: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s cubic-bezier(.16,1,.3,1);
}
.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1) translateY(0);
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
}
.lang-dropdown-item:last-child { border-bottom: none; }
.lang-dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.lang-dropdown-item.active { color: var(--accent); }
.lang-dropdown-item .lang-item-flag { font-size: 1rem; }
.lang-dropdown-item .lang-item-check {
    margin-left: auto;
    width: 14px;
    height: 14px;
    color: var(--accent);
    opacity: 0;
}
.lang-dropdown-item.active .lang-item-check { opacity: 1; }

/* ── Auth nav buttons ────────────────────────────────────────────────────── */
.nav-auth-btns { display: flex; gap: 0.4rem; }

.btn-nav-ghost {
    padding: 0.4rem 1rem;
    background: transparent;
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-nav-ghost:hover { border-color: var(--accent); color: var(--text); background: rgba(0,230,184,0.04); }

.btn-nav-primary {
    padding: 0.4rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #08090c;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(0,230,184,0.15);
    text-decoration: none;
}
.btn-nav-primary:hover { background: var(--accent-hover); box-shadow: 0 0 28px rgba(0,230,184,0.25); transform: translateY(-1px); }

/* ── User avatar menu ────────────────────────────────────────────────────── */
.user-menu { position: relative; }

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.3rem 0.7rem 0.3rem 0.3rem;
    cursor: pointer;
    transition: border-color 0.15s;
    color: var(--text);
    font-family: inherit;
}
.user-avatar-btn:hover { border-color: var(--border-hover); }

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.user-name-nav {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chevron-down {
    color: var(--text-3);
    font-size: 0.65rem;
    transition: transform 0.2s;
}
.user-menu.open .chevron-down { transform: rotate(180deg); }

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
    animation: dropdown-in 0.15s ease;
}
.user-menu.open .user-dropdown { display: block; }

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

.dropdown-header {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
}
.dropdown-username { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.dropdown-email { font-size: 0.75rem; color: var(--text-3); margin-top: 0.1rem; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.83rem;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.dropdown-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.dropdown-item.danger { color: var(--critical); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.08); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* ── Landing Splash ──────────────────────────────────────────────────────── */
.landing-splash {
    background: linear-gradient(135deg, #060a10 0%, #0a0f1f 50%, #060c18 100%);
    border-bottom: 1px solid var(--border);
    padding: 4rem 2rem 3rem;
    overflow: hidden;
    position: relative;
}
.landing-splash::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 600px; height: 600px;
    background: radial-gradient(ellipse, rgba(0,194,255,0.06) 0%, transparent 65%);
    pointer-events: none;
}
.landing-splash::after {
    content: '';
    position: absolute;
    bottom: -80px; left: 10%;
    width: 400px; height: 400px;
    background: radial-gradient(ellipse, rgba(124,58,237,0.05) 0%, transparent 65%);
    pointer-events: none;
}

.landing-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0,194,255,0.08);
    border: 1px solid rgba(0,194,255,0.2);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    margin-bottom: 1.2rem;
}
.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.landing-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}
.landing-title-accent {
    background: linear-gradient(90deg, var(--accent) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-desc {
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 2rem;
    max-width: 480px;
}

.landing-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}
.lf-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.lf-item:hover {
    border-color: var(--border-hover);
    background: rgba(0,194,255,0.03);
}
.lf-icon { font-size: 1.3rem; margin-top: 0.1rem; flex-shrink: 0; }
.lf-title { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.1rem; }
.lf-sub { font-size: 0.73rem; color: var(--text-2); line-height: 1.4; }

.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #0099cc 100%);
    color: #000;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.8rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0,194,255,0.3);
}
.landing-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,194,255,0.45);
}
.landing-cta:active { transform: translateY(0); }

.landing-illustration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.landing-illustration img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(0,194,255,0.12);
    box-shadow: 0 8px 60px rgba(0,0,0,0.5), 0 0 80px rgba(0,194,255,0.06);
    display: block;
}

@media (max-width: 768px) {
    .landing-inner { grid-template-columns: 1fr; }
    .landing-illustration { display: none; }
    .landing-features { grid-template-columns: 1fr; }
    .landing-title { font-size: 1.9rem; }
}

/* ── Markdown body ────────────────────────────────────────────────────────── */
.md-body {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text);
    padding: 1.2rem 1.4rem;
}
.md-body .md-p {
    margin: 0 0 0.8rem;
    color: var(--text-2);
}
.md-body .md-h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    margin: 1.4rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(0,194,255,0.15);
}
.md-body .md-h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.2rem 0 0.4rem;
}
.md-body .md-h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin: 1rem 0 0.3rem;
}
.md-body .md-h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    margin: 0.8rem 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.md-body .md-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.2rem 0;
}
.md-body .md-ol,
.md-body .md-ul {
    padding-left: 1.4rem;
    margin: 0.4rem 0 0.8rem;
}
.md-body .md-li {
    color: var(--text-2);
    margin-bottom: 0.3rem;
    line-height: 1.6;
}
.md-body .md-blockquote {
    border-left: 3px solid var(--accent2);
    padding: 0.4rem 1rem;
    margin: 0.8rem 0;
    color: var(--text-2);
    background: rgba(124,58,237,0.05);
    border-radius: 0 6px 6px 0;
}
.md-body .md-inline-code {
    background: rgba(0,194,255,0.1);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82em;
    padding: 0.1em 0.4em;
    border-radius: 4px;
}
.md-body strong {
    color: var(--text);
    font-weight: 600;
}

/* Code block inside md-body */
.md-code-block {
    background: #080c14;
    border: 1px solid rgba(0,194,255,0.12);
    border-radius: 8px;
    overflow: hidden;
    margin: 0.8rem 0;
    font-family: 'JetBrains Mono', monospace;
}
.md-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: rgba(0,194,255,0.05);
    border-bottom: 1px solid rgba(0,194,255,0.1);
}
.md-code-lang {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.md-copy-btn {
    background: none;
    border: 1px solid rgba(0,194,255,0.2);
    color: var(--text-2);
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: 'Inter', sans-serif;
}
.md-copy-btn:hover {
    background: rgba(0,194,255,0.1);
    color: var(--accent);
}
.md-code-block pre {
    margin: 0;
    padding: 0.8rem 1rem;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.6;
}
.md-code-block code {
    color: #a8d8a8;
    font-family: inherit;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, #0a0f1f 0%, #080c14 60%);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 1.5rem 3rem;
}

.hero-inner--centered {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

/* ── Illustration block (Grok-style: centered in scroll area) ─────────── */
.illus-block {
    position: relative;
    margin: 2rem auto 1.5rem;
    border-radius: 16px;
    overflow: visible;
    max-width: 800px;
}

/* accent glow layer — renders behind the card */
.illus-glow {
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(0, 212, 170, 0.22) 0%,
        rgba(59, 130, 246, 0.14) 50%,
        rgba(0, 212, 170, 0.08) 100%
    );
    filter: blur(18px);
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.illus-block:hover .illus-glow {
    opacity: 1.4;
}

/* card frame */
.illus-inner {
    position: relative;
    z-index: 1;
    background: #0d1420;
    border: 1px solid rgba(0, 212, 170, 0.18);
    border-radius: 16px;
    padding: 8px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 4px 24px rgba(0, 0, 0, 0.5),
        0 16px 64px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.illus-block:hover .illus-inner {
    border-color: rgba(0, 212, 170, 0.32);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 8px 40px rgba(0, 0, 0, 0.55),
        0 24px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.illus-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    /* slight brightness lift so SVG reads well on dark bg */
    filter: brightness(1.05) saturate(1.08);
    transition: filter 0.3s, transform 0.4s;
}
.illus-block:hover .illus-img {
    filter: brightness(1.1) saturate(1.12);
    transform: scale(1.005);
}

@media (max-width: 768px) {
    .illus-block {
        margin: 2rem 0 1.5rem;
        border-radius: 12px;
    }
    .illus-inner {
        border-radius: 12px;
        padding: 6px;
    }
    .illus-img {
        border-radius: 8px;
    }
    .hero-inner--centered {
        text-align: center;
    }
}

/* ── Check card illustration ─────────────────────────────────────────────── */
.check-illustration {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(0,194,255,0.04) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.check-illustration img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
    opacity: 0.82;
    transition: opacity 0.3s, transform 0.4s;
    transform-origin: center;
}
.check-illustration:hover img {
    opacity: 1;
    transform: scale(1.02);
}
.check-illustration::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, var(--bg-card) 100%);
    pointer-events: none;
}

.hero-inner { max-width: 1100px; margin: 0 auto; }

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 0.6rem;
}

.hero-ai {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub { color: var(--text-2); font-size: 0.98rem; }

/* ── Scan Layout (Grok-style: sidebar + main) ──────────────────────────── */
.scan-layout {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Sidebar */
.scan-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: #0a0b0e;
    transition: width 0.25s ease, opacity 0.2s;
    overflow: hidden;
}
.scan-sidebar.collapsed { width: 0; border-right: none; }
.scan-sidebar.collapsed * { opacity: 0; pointer-events: none; }

.scan-sb-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    flex-shrink: 0;
}
.scan-sb-toggle, .scan-sb-new {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; border: none;
    background: transparent; color: var(--text-3);
    cursor: pointer; transition: all 0.15s;
}
.scan-sb-toggle:hover, .scan-sb-new:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.scan-sb-label {
    padding: 0 0.75rem 0.5rem;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-3);
    flex-shrink: 0;
}

.scan-sb-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.4rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.scan-sb-empty {
    text-align: center; padding: 2rem 0.5rem;
    font-size: 0.75rem; color: var(--text-3);
}

.scan-sb-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px; cursor: pointer;
    transition: background 0.12s;
    margin-bottom: 1px;
}
.scan-sb-item:hover { background: rgba(255,255,255,0.04); }
.scan-sb-item.active { background: rgba(0,230,184,0.06); }

.scan-sb-dot {
    width: 6px; height: 6px;
    border-radius: 50%; flex-shrink: 0;
}
.scan-sb-dot.clean { background: var(--low); }
.scan-sb-dot.warn { background: var(--medium); }
.scan-sb-dot.danger { background: var(--critical); box-shadow: 0 0 6px rgba(244,63,94,0.4); }

.scan-sb-info { min-width: 0; flex: 1; }
.scan-sb-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; font-weight: 500;
    color: var(--text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.scan-sb-item:hover .scan-sb-url { color: var(--text); }
.scan-sb-meta {
    font-size: 0.6rem; color: var(--text-3);
    margin-top: 1px;
}

/* Main area */
.scan-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.scan-topbar {
    display: none;
    align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}
.scan-topbar-label {
    font-size: 0.8rem; font-weight: 600; color: var(--text-2);
}

/* Mobile: sidebar hidden, toggle in topbar */
@media (max-width: 768px) {
    .scan-sidebar { width: 0; border-right: none; }
    .scan-sidebar * { opacity: 0; pointer-events: none; }
    .scan-sidebar.mobile-open {
        width: 280px; position: fixed;
        top: 60px; left: 0; bottom: 0; z-index: 100;
        border-right: 1px solid rgba(255,255,255,0.06);
        background: #0a0b0e;
    }
    .scan-sidebar.mobile-open * { opacity: 1; pointer-events: auto; }
    .scan-topbar { display: flex; }
}

/* ── Container (Grok-style: free-flowing, no fixed height) ─────────────── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

/* Scroll area — no scroll constraints, free flow */
.scan-scroll-area {
    padding: 0;
}

/* Form wrap — stays in flow, not fixed */
.scan-form-wrap {
    padding: 0.5rem 0 0.75rem;
    position: sticky;
    bottom: 0;
    background: var(--bg);
    z-index: 10;
}
.scan-form-wrap::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -2rem;
    right: -2rem;
    height: 30px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
    z-index: 2;
}

/* ── Warning (Grok-style: subtle inline) ─────────────────────────────────── */
.warning {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0;
    font-size: 0.72rem;
    color: rgba(234,179,8,0.5);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 500;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Scan Prompt Box (ChatGPT-style) ─────────────────────────────────────── */
.scan-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
    transition: border-color 0.25s, box-shadow 0.25s;
    cursor: text;
}
.scan-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow);
}

.scan-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.93rem;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    min-height: 48px;
    resize: none;
    line-height: 1.5;
}
.scan-form input::placeholder { color: var(--text-3); font-family: inherit; }

/* Prompt toolbar row */
.prompt-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
}

.prompt-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0 0.6rem;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.prompt-tool-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.prompt-tool-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.prompt-tool-btn.active {
    background: rgba(0,212,170,0.1);
    color: var(--accent);
}
.prompt-tool-btn.active:hover { background: rgba(0,212,170,0.15); }

.prompt-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    flex-shrink: 0;
}

.prompt-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #0a0d14;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    margin-left: auto;
    flex-shrink: 0;
}
.prompt-send-btn:hover { background: var(--accent-hover); box-shadow: 0 0 16px rgba(0,212,170,0.35); transform: translateY(-1px); }
.prompt-send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }
.prompt-send-btn svg { width: 18px; height: 18px; }

/* Tool popover */
.prompt-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    display: none;
}
.prompt-popover.open { display: block; }

.prompt-popover-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: none;
    background: none;
    border-radius: 10px;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
}
.prompt-popover-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.prompt-popover-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-3); }
.prompt-popover-item .tool-extra { margin-left: auto; font-size: 0.7rem; color: var(--text-3); }

/* ── Scan quota badge ── */
.scan-quota {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}
.scan-quota-ok { color: var(--accent); }
.scan-quota-warn { color: #f59e0b; }
.scan-quota-empty { color: #ef4444; }
.scan-quota a {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
}

/* ── Locked remediation (blurred) ── */
.finding-fix-blurred {
    position: relative;
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px dashed rgba(0,212,170,0.3);
    transition: border-color 0.2s;
}
.finding-fix-blurred:hover {
    border-color: var(--accent);
}
.fix-blurred-text {
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    color: var(--text-2);
    filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    line-height: 1.5;
}
.fix-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(13,17,23,0.55);
    backdrop-filter: blur(1px);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.fix-lock-icon {
    font-size: 1rem;
}

/* ── AI locked teaser ── */
.ai-locked-teaser {
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(0,212,170,0.04), rgba(59,130,246,0.03));
    border: 1px solid rgba(0,212,170,0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-locked-teaser:hover {
    border-color: rgba(0,212,170,0.4);
    box-shadow: 0 0 30px rgba(0,212,170,0.1);
}
.ai-locked-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}
.ai-locked-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 0.5rem;
}
.ai-locked-desc {
    font-size: 0.88rem;
    color: var(--text-2);
    max-width: 420px;
    margin: 0 auto 1.2rem;
    line-height: 1.6;
}
.ai-locked-experts {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.ai-locked-experts span {
    padding: 0.35rem 0.8rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
}
.ai-locked-btn {
    background: linear-gradient(135deg, #00e6b8, #3b82f6);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0,212,170,0.2);
    transition: box-shadow 0.2s;
}
.ai-locked-btn:hover {
    box-shadow: 0 0 30px rgba(0,212,170,0.35);
}

.ai-status-badge.locked {
    background: rgba(255,255,255,0.06);
    color: var(--text-3);
}

.btn {
    padding: 0.75rem 1.9rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 0 16px rgba(0,194,255,0.25);
    letter-spacing: 0.3px;
}
.btn:hover { background: var(--accent-hover); box-shadow: 0 0 24px rgba(0,194,255,0.4); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── AI key row ──────────────────────────────────────────────────────────── */
.ai-key-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.65rem 1rem;
    background: rgba(0,194,255,0.05);
    border: 1px solid rgba(0,194,255,0.15);
    border-radius: 8px;
    flex-wrap: wrap;
}
.ai-key-label { font-size: 0.8rem; color: var(--accent); font-weight: 500; }

/* ── Progress (Grok-style: subtle, clean) ────────────────────────────────── */
.progress-section {
    display: none;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 1.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.progress-section.active { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }

/* Morphing square spinner */
.morphing-square {
    width: 36px;
    height: 36px;
    background: var(--accent);
    animation: morphSpin 2s ease-in-out infinite;
}

@keyframes morphSpin {
    0%   { border-radius: 6%; transform: rotate(0deg); }
    50%  { border-radius: 50%; transform: rotate(180deg); }
    100% { border-radius: 6%; transform: rotate(360deg); }
}

/* AI variant */
.morphing-square.ai { background: linear-gradient(135deg, var(--accent2), #8b5cf6); }

.progress-label {
    font-size: 0.8rem;
    color: var(--text-2);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.progress-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 99px;
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px var(--accent);
}
.progress-bar-fill.ai-fill { background: linear-gradient(90deg, var(--accent2), var(--accent)); }

/* ── Scan info ───────────────────────────────────────────────────────────── */
.scan-info { display: none; font-size: 0.75rem; color: var(--text-3); margin-bottom: 1rem; text-align: center; font-family: 'JetBrains Mono', monospace; }
.scan-info.active { display: block; }

/* ── Summary: pie + legend + stats (Grok-style: clean, no border) ──────── */
.summary {
    display: none;
    margin-bottom: 1.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.summary.active { display: block; }

.summary-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius);
    padding: 2rem 2.25rem 1.25rem;
    box-shadow: var(--shadow);
    align-items: center;
    position: relative;
    overflow: hidden;
}
/* Subtle grid-dot background pattern */
.summary-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* ── Canvas chart ── */
.chart-wrap {
    flex-shrink: 0;
    position: relative;
    width: 200px;
    height: 200px;
}

.chart-canvas {
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 2;
}

.chart-orbit-ring {
    position: absolute;
    inset: 0;
    width: 200px;
    height: 200px;
    z-index: 1;
    pointer-events: none;
}

.chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 3;
}

.chart-score {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    display: block;
    transition: color .5s ease;
}

.chart-score-label {
    font-size: 0.55rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-top: 4px;
}

/* ── Legend ── */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.legend-row {
    display: grid;
    grid-template-columns: 20px 70px 34px 1fr 42px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background .2s;
}
.legend-row:hover {
    background: rgba(255,255,255,.03);
}

.legend-dot {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}
.legend-row.critical .legend-dot { color: var(--critical); background: rgba(239,68,68,.12); }
.legend-row.high     .legend-dot { color: var(--high);     background: rgba(249,115,22,.12); }
.legend-row.medium   .legend-dot { color: var(--medium);   background: rgba(245,158,11,.12); }
.legend-row.low      .legend-dot { color: var(--low);      background: rgba(34,197,94,.12); }
.legend-row.info     .legend-dot { color: var(--info);     background: rgba(59,130,246,.12); }

.legend-lbl { color: var(--text-2); font-weight: 500; }

.legend-cnt {
    font-weight: 700;
    font-size: 1rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.legend-bar-wrap {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,.04);
    overflow: hidden;
    min-width: 60px;
}
.legend-bar {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width .7s cubic-bezier(.4,0,.2,1);
}
.legend-row.critical .legend-bar { background: linear-gradient(90deg, var(--critical), #ff6b6b); box-shadow: 0 0 8px var(--critical-glow); }
.legend-row.high     .legend-bar { background: linear-gradient(90deg, var(--high), #fb923c);     box-shadow: 0 0 8px var(--high-glow); }
.legend-row.medium   .legend-bar { background: linear-gradient(90deg, var(--medium), #fbbf24);   box-shadow: 0 0 6px var(--medium-glow); }
.legend-row.low      .legend-bar { background: linear-gradient(90deg, var(--low), #4ade80); }
.legend-row.info     .legend-bar { background: linear-gradient(90deg, var(--info), #60a5fa); }

.legend-pct {
    font-size: 0.72rem;
    color: var(--text-3);
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
}

.legend-row.critical .legend-cnt { color: var(--critical); }
.legend-row.high     .legend-cnt { color: var(--high); }
.legend-row.medium   .legend-cnt { color: var(--medium); }
.legend-row.low      .legend-cnt { color: var(--low); }
.legend-row.info     .legend-cnt { color: var(--info); }

/* ── Risk stat cards ── */
.risk-stats {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.risk-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    min-width: 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
}
.risk-stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(0,0,0,.3);
}

.rsc-icon {
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    opacity: .85;
}

.risk-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    display: block;
    line-height: 1;
}
.risk-stat-value.critical {
    color: var(--critical);
    text-shadow: 0 0 14px var(--critical-glow);
}
.risk-stat-value.score {
    color: var(--accent);
    text-shadow: 0 0 14px var(--accent-glow);
}
.risk-stat-value.threat-level {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.threat-safe     { color: var(--low);      text-shadow: 0 0 10px rgba(34,197,94,.3); }
.threat-moderate { color: var(--medium);   text-shadow: 0 0 10px rgba(245,158,11,.3); }
.threat-high     { color: var(--high);     text-shadow: 0 0 10px rgba(249,115,22,.3); }
.threat-critical { color: var(--critical); text-shadow: 0 0 10px var(--critical-glow); }

.risk-stat-label {
    font-size: 0.62rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 4px;
    display: block;
}

/* Animated pulse ring behind critical card */
.rsc-pulse {
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    border: 2px solid transparent;
    pointer-events: none;
    opacity: 0;
}
.rsc-critical.has-critical .rsc-pulse {
    opacity: 1;
    border-color: var(--critical);
    animation: rscPulse 2s ease-in-out infinite;
}
@keyframes rscPulse {
    0%, 100% { opacity: .15; transform: scale(1); }
    50%      { opacity: .4;  transform: scale(1.03); }
}

/* Glow accent line on top of cards */
.rsc-critical::before,
.rsc-total::before,
.rsc-shield::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 2px;
    border-radius: 0 0 2px 2px;
}
.rsc-critical::before { background: linear-gradient(90deg, transparent, var(--critical), transparent); }
.rsc-total::before    { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.rsc-shield::before   { background: linear-gradient(90deg, transparent, var(--low), transparent); }

/* ── Severity breakdown bar ── */
.severity-breakdown {
    margin-top: .75rem;
    padding: 0 .25rem;
}
.sb-track {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,.03);
    gap: 2px;
}
.sb-seg {
    height: 100%;
    border-radius: 3px;
    transition: width .8s cubic-bezier(.4,0,.2,1), opacity .4s;
    min-width: 0;
    width: 0%;
}
.sb-critical { background: linear-gradient(90deg, var(--critical), #f87171); }
.sb-high     { background: linear-gradient(90deg, var(--high), #fb923c); }
.sb-medium   { background: linear-gradient(90deg, var(--medium), #fbbf24); }
.sb-low      { background: linear-gradient(90deg, var(--low), #4ade80); }
.sb-info     { background: linear-gradient(90deg, var(--info), #60a5fa); }
.sb-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}
.sb-label {
    font-size: .65rem;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

/* ── Export (Grok-style: centered) ──────────────────────────────────────── */
.export-bar { display: none; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; max-width: 800px; margin-left: auto; margin-right: auto; }
.export-bar.active { display: flex; }

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid rgba(0,194,255,0.25);
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-sm:hover { background: rgba(0,194,255,0.08); border-color: var(--accent); }

/* ── Export Dropdown ─────────────────────────────────────────────────────── */
.export-dropdown {
    position: relative;
}
.export-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid rgba(0,194,255,0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.export-dropdown-btn:hover {
    background: rgba(0,194,255,0.08);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0,194,255,0.1);
}
.export-dropdown.open .export-dropdown-btn {
    border-color: var(--accent);
    background: rgba(0,194,255,0.06);
}
.export-chevron {
    font-size: 0.55rem;
    opacity: 0.6;
    transition: transform 0.2s;
}
.export-dropdown.open .export-chevron {
    transform: rotate(180deg);
}
.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.export-dropdown.open .export-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.export-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: none;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--text);
    transition: background 0.15s;
}
.export-menu-item:hover {
    background: var(--bg-surface);
}
.export-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 1.6rem;
    text-align: center;
}
.export-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    flex: 1;
}
.export-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
}
.export-item-desc {
    font-size: 0.65rem;
    color: var(--text-2);
}
.export-pro-badge {
    font-size: 0.58rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(0,212,170,0.2), rgba(0,194,255,0.2));
    color: var(--accent);
    border: 1px solid rgba(0,212,170,0.3);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.export-menu-item--pro {
    position: relative;
}

/* ── Payment method selector ─────────────────────────────────────────────── */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}
.payment-method-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.payment-method-btn:hover {
    border-color: var(--accent);
    background: rgba(0,212,170,0.06);
    transform: translateX(4px);
}
.payment-method-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}
.payment-method-btn.pm-loading {
    border-color: var(--accent);
    animation: pm-pulse 1s ease-in-out infinite;
}
@keyframes pm-pulse {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.6; }
}
.pm-icon {
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.pm-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.pm-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.pm-desc {
    font-size: 0.72rem;
    color: var(--text-2);
}
.modal-subtitle {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin: 0.25rem 0 0;
}

/* ── Scan terminal (Grok-style: minimal, clean) ─────────────────────────── */
.scan-terminal-wrap {
    display: none;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.scan-terminal-wrap.active { display: block; }

.scan-terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #060a10;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
}

.scan-terminal-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1s ease-in-out infinite;
}

.scan-terminal {
    background: #040812;
    padding: 0.65rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    line-height: 1.9;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.scan-terminal::-webkit-scrollbar { width: 4px; }
.scan-terminal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.log-line { display: flex; align-items: baseline; gap: 0.45rem; animation: log-in 0.15s ease; color: var(--text-3); }
.log-icon { flex-shrink: 0; width: 1rem; text-align: center; }
.log-step  { color: rgba(255,255,255,0.12); flex-shrink: 0; }
.log-name  { color: var(--text-3); }

.log-line.running .log-icon { color: var(--accent); animation: pulse 0.7s ease-in-out infinite; }
.log-line.running .log-name { color: rgba(0,194,255,0.8); }
.log-line.log-ok      .log-icon { color: var(--low); }
.log-line.log-ok      .log-name { color: rgba(34,197,94,0.6); }
.log-line.log-warn    .log-icon { color: var(--medium); }
.log-line.log-warn    .log-name { color: rgba(234,179,8,0.7); }
.log-line.log-danger  .log-icon { color: var(--critical); }
.log-line.log-danger  .log-name { color: rgba(239,68,68,0.8); }
.log-line.log-err     .log-icon { color: var(--critical); }

.log-counts { display: inline-flex; gap: 0.3rem; margin-left: 0.3rem; }
.lc { font-size: 0.66rem; padding: 0 0.3rem; border-radius: 3px; font-weight: 700; }
.lc.critical { color: var(--critical); }
.lc.high     { color: var(--high); }
.lc.medium   { color: var(--medium); }
.lc.low      { color: var(--low); }
.lc.info     { color: var(--info); }

.scan-terminal-wrap.done .scan-terminal-dot { animation: none; background: var(--low); }

/* ── Results (Grok-style: clean, borderless, spacious) ──────────────────── */
.results { display: flex; flex-direction: column; gap: 0.25rem; max-width: 800px; margin: 0 auto; }

.results-group-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    padding: 1.2rem 0 0.4rem;
    border: none;
}

.check-group {
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.15s;
}
.check-group:hover { background: rgba(255,255,255,0.02); }
.check-group.new { animation: card-in 0.22s ease; }

.check-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.check-header:hover { background: rgba(255,255,255,0.03); }
.check-header .name { font-weight: 600; font-size: 0.88rem; color: var(--text); letter-spacing: -0.01em; }
.check-header .badges { display: flex; gap: 0.3rem; }

.badge {
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge.critical { background: rgba(239,68,68,0.15);  color: var(--critical); }
.badge.high     { background: rgba(249,115,22,0.15); color: var(--high); }
.badge.medium   { background: rgba(234,179,8,0.15);  color: var(--medium); }
.badge.low      { background: rgba(34,197,94,0.15);  color: var(--low); }
.badge.info     { background: rgba(59,130,246,0.15); color: var(--info); }

.sev-pill {
    display: inline-block;
    padding: 0.08rem 0.45rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    min-width: 3.5rem;
    text-align: center;
    flex-shrink: 0;
}
.sev-pill.sev-critical { background: rgba(239,68,68,0.12); color: var(--critical); border: 1px solid rgba(239,68,68,0.25); }
.sev-pill.sev-high     { background: rgba(249,115,22,0.12); color: var(--high);     border: 1px solid rgba(249,115,22,0.25); }
.sev-pill.sev-medium   { background: rgba(234,179,8,0.12);  color: var(--medium);   border: 1px solid rgba(234,179,8,0.25); }
.sev-pill.sev-low      { background: rgba(34,197,94,0.12);  color: var(--low);      border: 1px solid rgba(34,197,94,0.25); }
.sev-pill.sev-info     { background: rgba(59,130,246,0.12); color: var(--info);     border: 1px solid rgba(59,130,246,0.25); }

.check-body { display: none; border-top: 1px solid rgba(255,255,255,0.04); }
.check-body.open { display: block; }

.finding { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.finding:last-child { border-bottom: none; }

.finding-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.finding-desc { font-size: 0.82rem; color: var(--text-2); margin-bottom: 0.4rem; line-height: 1.6; }

.finding-evidence {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    color: var(--accent);
    margin-bottom: 0.3rem;
    word-break: break-all;
}

.finding-fix { font-size: 0.78rem; color: var(--low); font-weight: 500; }
.error-msg { padding: 0.8rem 1.1rem; color: var(--critical); font-size: 0.83rem; }

.arrow { transition: transform 0.2s; color: var(--text-3); font-size: 0.7rem; margin-left: 0.5rem; }
.arrow.open { transform: rotate(90deg); }

/* ── AI Section (Grok-style: centered, clean) ───────────────────────────── */
#aiSection { max-width: 800px; margin-left: auto; margin-right: auto; }
.ai-section-header { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 0.75rem; }
.ai-section-header h2 { color: var(--text); font-size: 1rem; font-weight: 700; margin: 0; }

.ai-status-badge { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.65rem; border-radius: 20px; }
.ai-status-badge.running { background: rgba(0,194,255,0.1); color: var(--accent); border: 1px solid rgba(0,194,255,0.2); animation: pulse 1.5s infinite; }
.ai-status-badge.done    { background: rgba(34,197,94,0.1); color: var(--low);    border: 1px solid rgba(34,197,94,0.2); }
.ai-status-badge.error   { background: rgba(239,68,68,0.08); color: var(--critical); border: 1px solid rgba(239,68,68,0.2); }

.ai-badge-title {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-summary-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.ai-summary-block h3 { color: var(--text); margin: 0 0 0.75rem; font-size: 0.95rem; font-weight: 700; }
.ai-summary-block h4 { color: var(--text-3); margin: 1rem 0 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.ai-summary-block p { color: var(--text-2); line-height: 1.6; margin: 0; font-size: 0.88rem; }

.ai-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.ai-list { margin: 0; padding-left: 1.25rem; color: var(--text-2); font-size: 0.85rem; line-height: 1.7; }
.ai-list li { margin-bottom: 0.2rem; }

/* ── Exploit & Defense ───────────────────────────────────────────────────── */
.exploit-section-header { display: flex; align-items: baseline; gap: 0.75rem; margin: 1.5rem 0 0.75rem; font-size: 0.92rem; font-weight: 700; color: var(--text); }
.exploit-subtitle { font-size: 0.7rem; color: var(--text-3); font-weight: 400; }

.exploit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    overflow: hidden;
    animation: card-in 0.22s ease;
}

.exploit-header { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1.1rem; cursor: pointer; user-select: none; transition: background 0.15s; }
.exploit-header:hover { background: rgba(255,255,255,0.02); }
.exploit-title { font-weight: 600; font-size: 0.87rem; color: var(--text); }
.exploit-body { display: none; border-top: 1px solid var(--border); }
.exploit-body.open { display: block; }

.attack-section  { padding: 1rem 1.1rem; background: rgba(239,68,68,0.04); border-left: 2px solid var(--critical); }
.defense-section { padding: 1rem 1.1rem; background: rgba(34,197,94,0.04); border-left: 2px solid var(--low); border-top: 1px solid var(--border); }

.exploit-section-title { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.attack-section  .exploit-section-title { color: var(--critical); }
.defense-section .exploit-section-title { color: var(--low); }

.exploit-context { font-size: 0.8rem; color: var(--text-2); margin: 0 0 0.6rem; line-height: 1.5; }
.exploit-steps { margin: 0; padding-left: 1.4rem; font-size: 0.81rem; line-height: 1.75; color: var(--text-2); }
.exploit-steps li { margin-bottom: 0.2rem; }
.exploit-empty { color: var(--text-3); font-size: 0.8rem; margin: 0; }

/* ── Expert cards ────────────────────────────────────────────────────────── */
.expert-card { margin-bottom: 0.4rem; }
.expert-header { padding-left: 1rem !important; }
.expert-body.open { display: block !important; }

.expert-analysis {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.77rem;
    line-height: 1.7;
    color: var(--text-2);
    margin: 0;
    background: rgba(0,0,0,0.2);
    border: none;
    padding: 1rem 1.1rem;
    max-height: 500px;
    overflow-y: auto;
}

/* ── Auth Modals ─────────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
    animation: modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(-16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }

.modal-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.5px; }

.form-input-wrap {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    position: relative;
    z-index: 1;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--bg); }
.form-input::placeholder { color: var(--text-3); }

/* Hover glow border on inputs */
.form-input-glow {
    position: absolute;
    pointer-events: none;
    left: 0; right: 0;
    height: 2px;
    z-index: 2;
    border-radius: inherit;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s;
}
.form-input-glow--top { top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.form-input-glow--bottom { bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.form-input-wrap:hover .form-input-glow { opacity: 1; }

.form-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 7px;
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
    color: var(--critical);
    margin-bottom: 1rem;
    display: none;
}
.form-error.visible { display: block; }

.btn-full {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent);
    color: #08090c;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 0 20px rgba(0,230,184,0.15);
    margin-bottom: 1rem;
}
.btn-full:hover { background: var(--accent-hover); box-shadow: 0 0 32px rgba(0,230,184,0.25); transform: translateY(-1px); }
.btn-full:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.modal-switch {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-3);
}
.modal-switch a { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; }
.modal-switch a:hover { text-decoration: underline; }

.modal-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: #475569; font-size: 12px; }
.modal-divider::before, .modal-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
/* Social login row */
.social-login-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.social-login-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    text-decoration: none;
    color: var(--text-2);
    position: relative;
    overflow: hidden;
}

.social-login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: inherit;
}

.social-login-btn:hover::before { transform: scaleY(1); }
.social-login-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.social-login-btn:hover svg { color: #0a0d14; }

.social-login-btn svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
    transition: color 0.25s;
}

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 11px 16px; border-radius: 10px;
    background: #fff; color: #1a1a1a; font-weight: 600; font-size: 14px;
    border: 1px solid rgba(255,255,255,0.15); text-decoration: none;
    margin-bottom: 16px; transition: background 0.15s; box-sizing: border-box;
}
.btn-google:hover { background: #f1f3f4; }

/* Modal glow effect */
.modal-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,170,0.08) 0%, rgba(124,58,237,0.05) 40%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(40px);
    z-index: 0;
}
.modal:hover .modal-glow { opacity: 1; }
.modal { position: relative; overflow: hidden; }
.modal > *:not(.modal-glow) { position: relative; z-index: 1; }

/* Shimmer button effect */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}
.btn-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: skewX(-13deg) translateX(-200%);
    transition: none;
}
.btn-shimmer:hover::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-13deg) translateX(200%);
    transition: transform 0.8s ease;
}

/* Forgot password link */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-3);
    text-decoration: none;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    transition: color 0.15s;
}
.forgot-link:hover { color: var(--accent); }

/* ── Profile modal ───────────────────────────────────────────────────────── */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.profile-avatar-big {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    border: 2px solid rgba(0,194,255,0.3);
}
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }

/* ── History ─────────────────────────────────────────────────────────────── */
.history-list { max-height: 55vh; overflow-y: auto; }

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}
.history-item:hover { background: rgba(255,255,255,0.03); }
.history-item:last-child { border-bottom: none; }

.history-url { font-size: 0.8rem; color: var(--text-2); font-family: 'JetBrains Mono', monospace; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-counts { display: flex; gap: 0.35rem; flex-shrink: 0; }
.history-badge { font-size: 0.65rem; padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 700; }
.history-badge.critical { background: rgba(239,68,68,0.15); color: var(--critical); }
.history-badge.high     { background: rgba(249,115,22,0.15); color: var(--high); }
.history-badge.medium   { background: rgba(245,158,11,0.15); color: var(--medium); }
.history-badge.low      { background: rgba(34,197,94,0.15);  color: var(--low); }
.history-date { font-size: 0.72rem; color: var(--text-3); flex-shrink: 0; }

.history-modal { max-width: 540px; transition: max-width 0.25s ease; }
.history-modal.expanded { max-width: 860px; }

/* History Detail View */
.history-back-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: none; border: none; color: var(--text-2);
    cursor: pointer; font-size: 0.78rem; padding: 0.2rem; transition: color 0.15s;
}
.history-back-btn:hover { color: var(--accent); }

.history-detail-summary {
    padding: 0 0 0.75rem 0; border-bottom: 1px solid var(--border); margin-bottom: 0.75rem;
}
.history-detail-url {
    font-size: 0.82rem; color: var(--accent); font-family: 'JetBrains Mono', monospace;
    word-break: break-all; margin-bottom: 0.5rem;
}
.history-detail-meta {
    display: flex; gap: 1rem; font-size: 0.7rem; color: var(--text-3); flex-wrap: wrap;
}
.history-severity-bar {
    display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap;
}
.history-sev-pill {
    font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem;
    border-radius: 4px; text-transform: uppercase;
}
.history-sev-pill.critical { background: rgba(239,68,68,0.15); color: var(--critical); }
.history-sev-pill.high     { background: rgba(249,115,22,0.15); color: var(--high); }
.history-sev-pill.medium   { background: rgba(255,165,2,0.15);  color: var(--medium); }
.history-sev-pill.low      { background: rgba(46,213,115,0.15); color: var(--low); }
.history-sev-pill.info     { background: rgba(30,144,255,0.15); color: var(--info); }

.history-check-group {
    border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 0.5rem; overflow: hidden;
}
.history-check-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.55rem 0.75rem; cursor: pointer; background: rgba(255,255,255,0.02);
    transition: background 0.15s; gap: 0.5rem;
}
.history-check-header:hover { background: rgba(255,255,255,0.04); }
.history-check-name {
    font-size: 0.78rem; font-weight: 600; color: var(--text-1);
    display: flex; align-items: center; gap: 0.35rem;
}
.history-check-badges { display: flex; gap: 0.2rem; flex-shrink: 0; }
.history-check-badge {
    font-size: 0.58rem; padding: 0.08rem 0.3rem; border-radius: 3px; font-weight: 700;
}
.history-check-badge.critical { background: rgba(239,68,68,0.2); color: var(--critical); }
.history-check-badge.high     { background: rgba(249,115,22,0.2); color: var(--high); }
.history-check-badge.medium   { background: rgba(255,165,2,0.2);  color: var(--medium); }
.history-check-badge.low      { background: rgba(46,213,115,0.2); color: var(--low); }
.history-check-badge.info     { background: rgba(30,144,255,0.2); color: var(--info); }
.history-check-arrow {
    font-size: 0.6rem; color: var(--text-3); transition: transform 0.2s; flex-shrink: 0;
}
.history-check-arrow.open { transform: rotate(90deg); }
.history-check-body { display: none; border-top: 1px solid var(--border); }
.history-check-body.open { display: block; }

.history-finding {
    padding: 0.55rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.history-finding:last-child { border-bottom: none; }
.history-finding-row {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.76rem; font-weight: 600; color: var(--text-1); margin-bottom: 0.25rem;
}
.history-finding-sev {
    font-size: 0.58rem; padding: 0.08rem 0.28rem; border-radius: 3px;
    font-weight: 700; text-transform: uppercase; flex-shrink: 0;
}
.history-finding-desc {
    font-size: 0.73rem; color: var(--text-2); line-height: 1.5; margin-bottom: 0.25rem;
}
.history-finding-evidence {
    font-size: 0.68rem; color: var(--text-3); background: rgba(0,0,0,0.3);
    padding: 0.3rem 0.5rem; border-radius: 4px; font-family: 'JetBrains Mono', monospace;
    word-break: break-all; white-space: pre-wrap; max-height: 100px; overflow-y: auto;
    margin-bottom: 0.25rem;
}
.history-finding-remediation {
    font-size: 0.7rem; color: var(--accent); padding: 0.25rem 0.5rem;
    border-left: 2px solid var(--accent); margin-top: 0.2rem;
}

/* AI section in history */
.history-ai-section {
    margin-top: 0.75rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.history-ai-header {
    padding: 0.55rem 0.75rem; background: rgba(139,92,246,0.08);
    font-size: 0.8rem; font-weight: 600; color: #a78bfa;
    display: flex; align-items: center; gap: 0.35rem; cursor: pointer;
}
.history-ai-body { padding: 0.65rem 0.75rem; display: none; }
.history-ai-body.open { display: block; }
.history-ai-label {
    font-size: 0.72rem; font-weight: 600; color: var(--text-2);
    margin: 0.5rem 0 0.25rem 0;
}
.history-ai-label:first-child { margin-top: 0; }
.history-ai-text {
    font-size: 0.73rem; color: var(--text-2); line-height: 1.6;
    white-space: pre-wrap;
}
.history-ai-list { list-style: none; padding: 0; margin: 0; }
.history-ai-list li {
    font-size: 0.72rem; color: var(--text-2); padding: 0.2rem 0 0.2rem 1rem; position: relative;
}
.history-ai-list li::before {
    content: ''; position: absolute; left: 0; top: 0.5rem;
    width: 5px; height: 5px; border-radius: 50%;
}
.history-ai-list.risks li::before { background: var(--critical); }
.history-ai-list.actions li::before { background: var(--accent); }

.history-no-data {
    text-align: center; padding: 2rem; color: var(--text-3); font-size: 0.8rem;
}

/* ── History detail (wide modal view) ───────────────────────────────────── */
.history-modal--wide { max-width: 900px; }

.history-item--clickable { cursor: pointer; border-radius: 8px; padding: 0.7rem 0.5rem; margin: 0 -0.5rem; transition: background 0.15s; }
.history-item--clickable:hover { background: rgba(255,255,255,0.03); }
.history-arrow { color: var(--text-3); font-size: 0.6rem; flex-shrink: 0; transition: transform 0.15s, color 0.15s; margin-left: 0.25rem; }
.history-item--clickable:hover .history-arrow { color: var(--accent); transform: translateX(2px); }

.hd-summary-row {
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.hd-summary-stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.hd-summary-num { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.hd-summary-lbl { font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.hd-summary-date { margin-left: auto; }

.hd-sev-critical { color: var(--critical); }
.hd-sev-high     { color: var(--high); }
.hd-sev-medium   { color: var(--medium); }
.hd-sev-low      { color: var(--low); }
.hd-sev-info     { color: var(--info); }

.history-detail-body {
    max-height: 55vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 4px;
}
.history-detail-body::-webkit-scrollbar { width: 4px; }
.history-detail-body::-webkit-scrollbar-track { background: transparent; }
.history-detail-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.history-detail-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

@media (max-width: 640px) {
    .history-modal--wide { max-width: 100%; margin: 0 8px; }
    .hd-summary-row { gap: 1rem; }
    .hd-summary-date { margin-left: 0; }
    .history-detail-body { max-height: 50vh; }
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes log-in {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .summary-grid { grid-template-columns: 1fr; justify-items: center; gap: 1.5rem; padding: 1.5rem 1rem 1rem; }
    .chart-legend { width: 100%; }
    .legend-row { grid-template-columns: 20px 60px 30px 1fr 36px; gap: .4rem; padding: 5px 6px; }
    .risk-stats { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .5rem; }
    .risk-stat-card { min-width: 90px; flex: 1; }
    .severity-breakdown { margin-top: .5rem; }
}

@media (max-width: 640px) {
    .hero-title { font-size: 1.8rem; }
    .scan-form  { border-radius: 20px; }
    .prompt-toolbar { flex-wrap: wrap; }
    .prompt-tool-btn span.tool-label { display: none; }
    .ai-two-col { grid-template-columns: 1fr; }
    .ai-key-row { flex-direction: column; }
    .user-name-nav { display: none; }
    .landing-features { grid-template-columns: 1fr; }
    .badges { flex-wrap: wrap; gap: 0.25rem; }
    .hiw-steps { flex-direction: column; align-items: center; }
    .hiw-connector { transform: rotate(90deg); }
    .stats-inner { grid-template-columns: 1fr 1fr; }
    .stat-divider:nth-child(4) { display: none; }
}

/* ── Stats Strip ─────────────────────────────────────────────────────────── */
.stats-strip {
    background: rgba(0,194,255,0.03);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 2rem;
}
.stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 0;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 1rem;
}
.stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}
.stat-lbl {
    font-size: 0.72rem;
    color: var(--text-2);
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stats-inner--5 {
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
}
.stat-num--danger {
    color: #ef4444;
}
.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ── Recent Scans Ticker ─────────────────────────────────────────────────── */
.recent-scans-ticker {
    padding: 2.5rem 2rem;
    overflow: hidden;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}
/* Subtle top/bottom inner glow for depth separation */
.recent-scans-ticker::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,212,170,0.02) 0%, transparent 40%),
        linear-gradient(0deg,   rgba(0,212,170,0.02) 0%, transparent 40%);
    pointer-events: none;
}
.ticker-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 1100px;
    margin: 0 auto 1rem;
    padding: 0 0.25rem;
}
.ticker-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 6px rgba(0,255,136,0.4), 0 0 12px rgba(0,255,136,0.15);
    animation: tickerPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes tickerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}
.ticker-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
}
.ticker-viewport {
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
}
.ticker-track {
    display: flex;
    gap: 0.875rem;
    animation: tickerScroll 30s linear infinite;
    width: max-content;
    will-change: transform;
}
.ticker-track:hover {
    animation-play-state: paused;
}
@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Ticker Cards ── */
.ticker-card {
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    min-width: 200px;
    max-width: 260px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    cursor: default;
}
.ticker-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.ticker-card--critical { border-left: 3px solid #ef4444; }
.ticker-card--high     { border-left: 3px solid #f97316; }
.ticker-card--medium   { border-left: 3px solid #f59e0b; }
.ticker-card--low      { border-left: 3px solid #3b82f6; }
.ticker-card--clean    { border-left: 3px solid #00e6b8; }
.ticker-url {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    line-height: 1.4;
}
.ticker-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    color: var(--text-2);
    line-height: 1;
}
.ticker-sev {
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.ticker-sev--critical { background: rgba(239,68,68,0.15); color: #ef4444; }
.ticker-sev--high     { background: rgba(249,115,22,0.15); color: #f97316; }
.ticker-sev--medium   { background: rgba(245,158,11,0.15); color: #f59e0b; }
.ticker-sev--low      { background: rgba(59,130,246,0.15); color: #3b82f6; }
.ticker-sev--clean    { background: rgba(0,212,170,0.15); color: #00e6b8; }
.ticker-dur {
    opacity: 0.7;
    white-space: nowrap;
}
.ticker-ago {
    opacity: 0.5;
    white-space: nowrap;
}

/* ── Ticker responsive ── */
@media (max-width: 768px) {
    .recent-scans-ticker {
        padding: 2rem 1rem;
    }
    .ticker-header {
        margin-bottom: 0.75rem;
    }
    .ticker-card {
        min-width: 170px;
        max-width: 220px;
        padding: 0.5rem 0.75rem;
    }
    .ticker-url {
        font-size: 0.72rem;
        max-width: 170px;
    }
    .ticker-meta {
        font-size: 0.62rem;
        gap: 0.35rem;
    }
}

/* ── Stats responsive (preserved) ── */
@media (max-width: 768px) {
    .stats-inner--5 {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .stats-inner--5 .stat-divider { display: none; }
}

/* ── How It Works ────────────────────────────────────────────────────────── */
.how-it-works {
    padding: 4rem 2rem;
    background: var(--bg);
}
.hiw-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.section-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 2.5rem;
    letter-spacing: -0.02em;
}
.hiw-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.hiw-step {
    flex: 1;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
}
.hiw-num {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}
.hiw-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0,194,255,0.07);
    border: 1px solid rgba(0,194,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    transition: background 0.2s, transform 0.2s;
}
.hiw-step:hover .hiw-icon-wrap {
    background: rgba(0,194,255,0.12);
    transform: translateY(-3px);
}
.hiw-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}
.hiw-step-desc {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0;
}
.hiw-connector {
    display: flex;
    align-items: center;
    padding-top: 2rem;
    flex-shrink: 0;
}
.hiw-arrow {
    font-size: 1.2rem;
    color: rgba(0,194,255,0.3);
    padding: 0 0.5rem;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem 2rem;
    margin-top: 1rem;
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.3);
}
.empty-state-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4rem;
}
.empty-state-desc {
    font-size: 0.85rem;
    color: var(--text-2);
    margin: 0 0 1.5rem;
    max-width: 380px;
}
.empty-checks-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    max-width: 500px;
}
.ecp-tag {
    background: rgba(0,194,255,0.06);
    border: 1px solid rgba(0,194,255,0.14);
    color: var(--text-2);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    transition: background 0.15s, color 0.15s;
}
.ecp-tag:hover {
    background: rgba(0,194,255,0.12);
    color: var(--accent);
}

/* ── Severity group headers ──────────────────────────────────────────────── */
.results-group-header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.6rem 0 0.5rem;
    margin: 1.2rem 0 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sev-group-danger { color: var(--critical); border-color: rgba(239,68,68,0.2); }
.sev-group-medium { color: var(--medium);   border-color: rgba(234,179,8,0.2); }
.sev-group-low    { color: var(--text-2);   border-color: var(--border); }

/* ── Toast notifications ─────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: #161b27;
    border: 1px solid rgba(0,212,170,0.2);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    max-width: 280px;
}
.toast.visible {
    opacity: 1;
    transform: translateY(0);
}
.toast-success { border-color: rgba(34,197,94,0.3); }
.toast-error   { border-color: rgba(239,68,68,0.3); color: #f87171; }

/* ── Sticky scan bar ─────────────────────────────────────────────────────── */
.sticky-scan-bar {
    position: fixed;
    top: 0;
    left: 0; right: 0;
    z-index: 800;
    background: rgba(6,10,16,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.55rem 1.5rem;
}
.sticky-scan-bar.visible {
    transform: translateY(0);
}
.sticky-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sticky-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.sticky-form {
    flex: 1;
    display: flex;
    gap: 0.5rem;
}
.sticky-form input {
    flex: 1;
    padding: 0.45rem 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    font-size: 0.83rem;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color 0.2s;
}
.sticky-form input:focus { border-color: var(--accent); }
.sticky-form input::placeholder { color: var(--text-3); font-family: inherit; }
.sticky-form button {
    padding: 0.45rem 1.1rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
}
.sticky-form button:hover { background: var(--accent-hover); }
.sticky-form button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Nav links ───────────────────────────────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.nav-link {
    color: var(--text-3);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    letter-spacing: -0.01em;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); background: rgba(0,230,184,0.06); }

/* ── Features Section (pentest-tools style) ──────────────────────────────── */
.features-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4rem 2rem;
}
.feat-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    text-align: left;
}
.feat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.2rem;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
.feat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--fi-color, var(--accent));
    opacity: 0;
    transition: opacity 0.2s;
}
.feat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.feat-card:hover::before { opacity: 1; }

.feat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--fi-color, var(--accent)) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--fi-color, var(--accent)) 25%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
}
.feat-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.feat-card p {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.6;
}
@media (max-width: 768px) {
    .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .feat-grid { grid-template-columns: 1fr; }
}

/* ── Feature Tier Labels ────────────────────────────────────────────────── */
.feat-tier-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    margin-bottom: -0.5rem;
    padding-bottom: 0.5rem;
}
.feat-tier-label + .feat-grid { margin-top: 1rem; }
.feat-tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.feat-tier-badge--free {
    color: #0a0d14;
    background: linear-gradient(135deg, #00e6b8, #34d399);
}
.feat-tier-badge--basic {
    color: #0a0d14;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}
.feat-tier-text {
    font-size: 0.78rem;
    color: var(--text-2);
    font-weight: 500;
}
.feat-tier-basic {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* ── Pricing Section ─────────────────────────────────────────────────────── */
.pricing-section {
    background: var(--bg);
    padding: 4rem 2rem 5rem;
    border-bottom: 1px solid var(--border);
}
.pricing-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    align-items: start;
}
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem 1.6rem;
    text-align: left;
    position: relative;
    transition: border-color 0.2s;
}
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(0,212,170,0.08);
}
.pricing-badge {
    position: absolute;
    top: -0.65rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.8rem;
    border-radius: 100px;
    white-space: nowrap;
}
.pricing-tier {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}
.pricing-card.featured .pricing-tier { color: var(--accent); }
.pricing-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 1.2rem;
}
.pricing-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    letter-spacing: 0;
}
.pricing-features {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pricing-features li {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.4;
}
.pricing-cta-primary {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s;
}
.pricing-cta-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(0,212,170,0.3);
}
.pricing-cta-outline {
    width: 100%;
    padding: 0.65rem 1rem;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}
.pricing-cta-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
@media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.footer-logo svg { color: var(--accent); }
.footer-tagline {
    font-size: 0.78rem;
    color: var(--text-3);
    line-height: 1.5;
}
.footer-links {
    display: flex;
    gap: 3rem;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}
.footer-col a {
    font-size: 0.8rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-3);
}
@media (max-width: 640px) {
    .footer-inner { flex-direction: column; }
    .footer-links { gap: 1.5rem; }
}

/* ── Mobile hamburger menu ─────────────────────────────────────────────── */
.nav-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    color: var(--text-2);
    transition: color 0.2s;
    flex-shrink: 0;
}
.nav-burger:hover { color: var(--text); }
.nav-burger svg { display: block; }

@media (max-width: 768px) {
    .nav-burger { display: flex; }
    .nav-links { display: none; }
    .nav-auth-btns { display: none; }
    .user-menu .user-name-nav { display: none; }
    .user-menu .plan-badge { display: none; }
    .user-menu .chevron-down { display: none; }
    .nav-inner { padding: 0 1rem; }
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 500;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mobile-menu.open {
    display: flex;
    opacity: 1;
}
.mobile-menu-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.16,1,.3,1);
    overflow-y: auto;
}
.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}
.mobile-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 0.4rem;
    margin-bottom: 0.5rem;
}
.mobile-menu-close:hover { color: var(--text); }
.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: rgba(0,230,184,0.06);
    color: var(--text);
}
.mobile-menu-links a.active {
    color: var(--accent);
}
.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}
.mobile-menu-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.mobile-menu-auth a {
    display: block;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}
.mobile-menu-auth .mobile-btn-ghost {
    color: var(--text-2);
    border: 1px solid var(--border-hover);
}
.mobile-menu-auth .mobile-btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.mobile-menu-auth .mobile-btn-primary {
    background: var(--accent);
    color: #08090c;
}
.mobile-menu-auth .mobile-btn-primary:hover { background: #00ffcc; }

/* ── Focus-visible accessibility ─────────────────────────────────────────── */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Dashboard page (/scan) ──────────────────────────────────────────────── */
.dashboard-section {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,170,0.06) 0%, transparent 70%);
}
.dashboard-inner {
    max-width: 720px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,212,170,0.08);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: 100px;
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.dashboard-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}
.dashboard-desc {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.6;
    max-width: 520px;
    margin: 0;
}
.dashboard-cta-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.dashboard-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: #0d1117;
    border: none;
    border-radius: var(--radius);
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
    box-shadow: 0 0 20px rgba(0,212,170,0.3);
}
.dashboard-start-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(0,212,170,0.45);
}
.dashboard-start-btn svg { flex-shrink: 0; }
.dashboard-history-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.dashboard-history-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,212,170,0.05);
}
.dashboard-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.dash-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.dash-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}
.dash-stat-lbl {
    font-size: 0.72rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.dash-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}
.dashboard-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}
.dash-module-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    color: var(--text-2);
    transition: border-color 0.15s, color 0.15s;
}
.dash-module-card:hover {
    border-color: var(--border-hover);
    color: var(--text);
}
.dash-module-icon { font-size: 1rem; }
.dash-module-name { font-weight: 500; }
@media (max-width: 540px) {
    .dashboard-stats { padding: 1rem; gap: 1rem; }
    .dash-stat-divider { display: none; }
}

/* ── Plan badge ──────────────────────────────────────────────────────────── */
.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-family: 'JetBrains Mono', monospace;
}
.plan-badge--free    { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.plan-badge--pro     { background: rgba(0,212,170,0.15);  color: var(--accent); border: 1px solid rgba(0,212,170,0.3); }
.plan-badge--agency  { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }

.dropdown-scan-counter {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 0.2rem;
}

/* ── Locked check card ───────────────────────────────────────────────────── */
.check-card--locked {
    opacity: 0.55;
    border: 1px dashed rgba(255,255,255,0.08) !important;
    background: var(--bg) !important;
    cursor: default;
}
.locked-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    gap: 1rem;
}
.locked-badge {
    font-size: 0.72rem;
    color: var(--accent);
    background: rgba(0,212,170,0.08);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}
.locked-badge:hover { background: rgba(0,212,170,0.15); }

.log-locked { opacity: 0.5; }

/* ── Upgrade Modal ───────────────────────────────────────────────────────── */
.modal--upgrade {
    max-width: 620px;
    width: 100%;
}
.upgrade-desc {
    color: var(--text-2);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}
.upgrade-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 520px) {
    .upgrade-plans { grid-template-columns: 1fr; }
}
.upgrade-card {
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--bg-card);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.upgrade-card--agency {
    border-color: rgba(139,92,246,0.35);
    background: linear-gradient(160deg, rgba(139,92,246,0.05) 0%, var(--bg-card) 100%);
}
.upgrade-card-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #8b5cf6;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.7rem;
    border-radius: 100px;
    white-space: nowrap;
}
.upgrade-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.upgrade-tier {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.upgrade-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}
.upgrade-price span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-3);
}
.upgrade-card--agency .upgrade-price { color: #a78bfa; }
.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-2);
    flex: 1;
}
.upgrade-btn {
    width: 100%;
    padding: 0.65rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.upgrade-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.upgrade-btn--pro    { background: var(--accent); color: #0d1117; }
.upgrade-btn--agency { background: #8b5cf6; color: #fff; }

/* ── Profile plan section ────────────────────────────────────────────────── */
.modal--profile { max-width: 480px; }

.profile-plan-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.profile-plan-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}
.profile-plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.profile-plan-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.profile-plan-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
}
.profile-plan-scans {
    font-size: 0.8rem;
    color: var(--text-2);
}
.profile-plan-reset {
    font-size: 0.72rem;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
}

/* Plan cards inside profile */
.profile-plan-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 440px) {
    .profile-plan-cards { grid-template-columns: 1fr; }
}
.profile-plan-card {
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.2s;
}
.profile-plan-card.is-current {
    border-color: var(--accent);
    background: rgba(0,212,170,0.04);
}
.ppc-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.ppc-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}
.ppc-price {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}
.ppc-price span {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-3);
}
.ppc-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-2);
}
.ppc-btn {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0d1117;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.ppc-btn:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); }
.ppc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ppc-btn--downgrade {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text-3);
    font-weight: 500;
}
.ppc-btn--downgrade:hover { color: var(--text-2); border-color: var(--accent); }
.ppc-current-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    padding: 0.4rem 0;
}

/* ── Glowing Border Effect ──────────────────────────────────────────────── */
.glow-container {
    --glow-start: 0;
    --glow-active: 0;
    --glow-spread: 20;
    --glow-blur: 0;
    --glow-border-width: 1px;
}

.glow-container .glow-border {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 1;
    z-index: 1;
    transition: opacity 0.3s;
}

.glow-container .glow-border::after {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--glow-border-width));
    border-radius: inherit;
    border: var(--glow-border-width) solid transparent;
    background:
        radial-gradient(circle, #00e6b8 10%, transparent 20%),
        radial-gradient(circle at 40% 40%, #3b82f6 5%, transparent 15%),
        radial-gradient(circle at 60% 60%, #8b5cf6 10%, transparent 20%),
        radial-gradient(circle at 40% 60%, #00b894 10%, transparent 20%),
        repeating-conic-gradient(
            from 236.84deg at 50% 50%,
            #00e6b8 0%,
            #3b82f6 5%,
            #8b5cf6 10%,
            #00b894 15%,
            #00e6b8 20%
        );
    background-attachment: fixed;
    opacity: var(--glow-active);
    transition: opacity 0.3s;
    mask-clip: padding-box, border-box;
    -webkit-mask-clip: padding-box, border-box;
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--glow-start) - var(--glow-spread)) * 1deg),
            transparent 0deg,
            #fff,
            transparent calc(var(--glow-spread) * 2deg)
        );
    -webkit-mask-image:
        linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--glow-start) - var(--glow-spread)) * 1deg),
            transparent 0deg,
            #fff,
            transparent calc(var(--glow-spread) * 2deg)
        );
}

.glow-container .glow-border-static {
    pointer-events: none;
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid transparent;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.glow-container:hover .glow-border-static {
    border-color: rgba(0, 212, 170, 0.15);
    opacity: 1;
}

/* ── Database / REST API Visualization ──────────────────────────────────── */
.db-api-section {
    padding: 2rem 2rem 3rem;
    background: var(--bg);
    overflow: hidden;
}

.db-api-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.db-api-widget {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 310px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.db-api-widget svg.db-paths-svg {
    width: 100%;
    height: 100%;
    color: var(--text-3);
}

.db-api-main-box {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.db-api-shadow {
    position: absolute;
    bottom: -16px;
    height: 100px;
    width: 62%;
    border-radius: 8px;
    background: rgba(0, 212, 170, 0.12);
}

.db-api-title-badge {
    position: absolute;
    top: -14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #101112;
    padding: 4px 10px;
    gap: 6px;
    white-space: nowrap;
}

.db-api-title-badge svg {
    width: 12px;
    height: 12px;
    color: var(--accent);
    flex-shrink: 0;
}

.db-api-title-badge span {
    font-size: 10px;
    color: var(--text);
    font-weight: 500;
}

.db-api-circle {
    position: absolute;
    bottom: -32px;
    z-index: 30;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border-top: 1px solid var(--border);
    background: #141516;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.05em;
}

.db-api-content {
    position: relative;
    z-index: 10;
    display: flex;
    height: 150px;
    width: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
}

.db-api-badge {
    position: absolute;
    z-index: 10;
    height: 28px;
    border-radius: 100px;
    background: #101112;
    padding: 0 12px;
    font-size: 11px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    white-space: nowrap;
}

.db-api-badge svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.db-api-badge-1 {
    bottom: 32px;
    left: 48px;
}

.db-api-badge-2 {
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
}

.db-api-ring {
    position: absolute;
    border-radius: 50%;
    border-top: 1px solid var(--border);
    background: rgba(0, 212, 170, 0.03);
}

.db-api-ring-1 { width: 100px; height: 100px; bottom: -56px; }
.db-api-ring-2 { width: 145px; height: 145px; bottom: -80px; }
.db-api-ring-3 { width: 190px; height: 190px; bottom: -100px; }
.db-api-ring-4 { width: 235px; height: 235px; bottom: -120px; }

.db-api-ring {
    animation: db-ring-pulse 2s ease-in-out infinite;
}
.db-api-ring-1 { animation-delay: 0s; }
.db-api-ring-2 { animation-delay: 0.3s; }
.db-api-ring-3 { animation-delay: 0.6s; }
.db-api-ring-4 { animation-delay: 0.9s; }

@keyframes db-ring-pulse {
    0%, 100% { transform: scale(1); }
    30%      { transform: scale(0.98); }
    50%      { transform: scale(1.02); }
    70%      { transform: scale(0.98); }
}

/* SVG path light animations */
.database {
    offset-anchor: 10px 0px;
    animation: database-animation-path 4s cubic-bezier(0, 0, 0.2, 1) 1s infinite;
}

.db-light-1 {
    offset-path: path("M 31 10 v 15 q 0 5 5 5 h 59 q 5 0 5 5 v 25");
}
.db-light-2 {
    offset-path: path("M 77 10 v 10 q 0 5 5 5 h 13 q 5 0 5 5 v 25");
}
.db-light-3 {
    offset-path: path("M 124 10 v 10 q 0 5 -5 5 h -14 q -5 0 -5 5 v 25");
}
.db-light-4 {
    offset-path: path("M 170 10 v 15 q 0 5 -5 5 h -60 q -5 0 -5 5 v 25");
}

@keyframes database-animation-path {
    0%   { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

@media (max-width: 640px) {
    .db-api-widget { height: 300px; }
    .db-api-badge-2 { display: none; }
    .db-api-title-badge { top: -10px; padding: 3px 8px; }
    .db-api-title-badge span { font-size: 9px; }
    .db-api-badge-1 { left: 20px; bottom: 24px; }
}
