/* ==========================================================================
   KrakenCrypt v3 - Ultra-Premium Cyber Defense & Encryption Console
   Design System: Deep Obsidian, Matte Slate, Electric Emerald & Neon Cyan
   ========================================================================== */

:root {
    --bg-main: #06090e;
    --bg-card: rgba(13, 19, 31, 0.75);
    --bg-card-hover: rgba(20, 30, 48, 0.85);
    --bg-input: #0b111e;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(6, 182, 212, 0.3);
    --border-accent: rgba(16, 185, 129, 0.4);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-sapphire: #3b82f6;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;

    --glass-blur: blur(16px);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;

    --shadow-neon: 0 0 25px rgba(6, 182, 212, 0.15);
    --shadow-emerald: 0 0 25px rgba(16, 185, 129, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-heading);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars -- dark track, glowing cyan thumb, matches the rest of the UI.
   Applies site-wide: the page itself and every inner overflow container (output
   boxes, code snippets, the mock DB table wrap) inherit the same look. */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 999px;
    border: 2px solid var(--bg-main);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-sapphire);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Cyber Canvas Overlays */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.orb-1 {
    top: -10%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
}

.orb-2 {
    top: 40%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-sapphire), transparent 70%);
}

.orb-3 {
    bottom: -10%;
    left: -5%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--accent-emerald), transparent 70%);
}

/* App Wrapper - Full Monitor Width */
.demo-canvas {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 2rem 4rem 2rem;
}

/* Navbar Header */
.demo-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
    width: 100%;
}

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

.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo-brand img,
.brand-logo-img {
    width: 42px !important;
    height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-cyber-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-cyber-sm:hover {
    background: var(--accent-emerald);
    color: #06090e;
    box-shadow: var(--shadow-emerald);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    /* .header-container never wrapped, so the logo + both action buttons
       ran off the right edge of the viewport on any phone-width screen. */
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   HERO SECTION - Animated Logo Encryption Halo Ring
   ========================================================================== */

.hero-section {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 3rem 1rem 4rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.hero-crypto-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 38%, transparent 58%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 38%, transparent 58%);
}

.hero-logo-stage {
    position: relative;
    z-index: 10;
    margin: 0 auto 2.5rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 340px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.hero-logo-img {
    width: 340px !important;
    height: 340px !important;
    max-width: 340px !important;
    max-height: 340px !important;
    min-width: 340px !important;
    min-height: 340px !important;
    object-fit: contain !important;
    background: transparent;
    border: none;
    box-shadow: none;
    filter: drop-shadow(0 0 24px rgba(6, 182, 212, 0.65));
}

@media (max-width: 640px) {
    /* The 340px min-width/min-height above never let the logo shrink, so on
       any phone narrower than ~340px plus its surrounding padding, the image
       just got clipped by the viewport instead of scaling down. */
    .hero-logo-stage {
        min-height: 0;
    }

    .hero-logo-img {
        width: 92vw !important;
        height: 92vw !important;
        max-width: 480px !important;
        max-height: 480px !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }
}

.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.5rem;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.5rem;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.04em;
}

.terminal-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.terminal-content {
    overflow-x: auto;
}

/* FIXED TABLE LAYOUT PREVENTS LAYOUT JUMPING PERMANENTLY */
.terminal-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.terminal-table th {
    padding: 0.75rem 0.5rem;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
}

.terminal-table td {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.acc-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.pill-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Hardware Signature Telemetry Box */
.hardware-telemetry-box {
    background: rgba(11, 17, 30, 0.85);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.telemetry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.telemetry-label {
    color: var(--text-muted);
    font-weight: 600;
}

.telemetry-value {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.telemetry-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.telemetry-badge.active {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.hero-content {
    max-width: 820px;
    position: relative;
    z-index: 5;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.hero-title {
    font-size: 3.1rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 70%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.9));
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #e2e8f0;
    line-height: 1.65;
    margin-bottom: 2.25rem;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 0 24px rgba(6, 9, 14, 0.95);
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.btn-primary-cyber {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-sapphire));
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.btn-primary-cyber:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.45);
}

.btn-secondary-cyber {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-cyber:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Section Titles */
.section-header {
    text-align: center;
    margin: 4rem 0 2.5rem 0;
}

.section-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 650px;
    margin: 0.5rem auto 0 auto;
}

/* ==========================================================================
   INTERACTIVE PLAYGROUND - Bento Grid Architecture
   ========================================================================== */

.playground-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* On a phone, the live console (multi-field forms, a 5-column table, side-by-
   side token comparisons) stays usable after stacking, but it's still a
   dense power-user surface built for a mouse and a wide screen. Rather than
   force it into a cramped mobile shape, swap it for an honest message and
   point people at a bigger screen -- the real audience for hands-on testing
   is doing that anyway, not driving forms with a thumb mid-scroll. */
.mobile-playground-notice {
    display: none;
}

@media (max-width: 640px) {
    .playground-grid {
        display: none;
    }

    .mobile-playground-notice {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: 2.5rem 1.5rem;
        margin-bottom: 4rem;
        color: var(--text-muted);
    }

    .mobile-playground-notice svg {
        width: 32px;
        height: 32px;
        color: var(--accent-cyan);
    }

    .mobile-playground-notice h3 {
        color: var(--text-main);
        font-size: 1.1rem;
    }

    .mobile-playground-notice p {
        font-size: 0.9rem;
        line-height: 1.5;
        max-width: 380px;
    }
}

.cyber-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cyber-card:hover {
    border-color: rgba(6, 182, 212, 0.25);
    background: var(--bg-card-hover);
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }

@media (max-width: 992px) {
    .col-8, .col-6, .col-4 { grid-column: span 12; }
}

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

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.tag-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.tag-cyan    { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.tag-amber   { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

/* Full-width Stat Banner (sits above Module 3) */
.stat-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-banner-icon {
    width: 3.25rem;
    height: 3.25rem;
    color: var(--accent-amber);
    opacity: 0.7;
    flex-shrink: 0;
}

.stat-banner-number {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-amber);
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-banner-unit {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent-amber);
    opacity: 0.9;
}

.stat-banner-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    border-left: 1px solid var(--border-subtle);
    padding-left: 1.5rem;
}

@media (max-width: 768px) {
    .stat-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .stat-banner-caption {
        border-left: none;
        padding-left: 0;
    }
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cyber-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

/* Attacker Simulation Switch */
.host-switch-box {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.host-switch-btn {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.host-switch-btn.active.secure {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.host-switch-btn.active.attacker {
    background: rgba(244, 63, 94, 0.2);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.4);
}

/* Code & Output Blocks */
.output-code-box {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    word-break: break-all;
    max-height: 160px;
    overflow-y: auto;
}

.output-code-box.success-text { color: var(--accent-emerald); }
.output-code-box.error-text   { color: var(--accent-rose); }

/* Icon system: replaces emoji everywhere -- sized relative to surrounding text so
   it scales naturally across headings, buttons, badges, and inline messages. */
.icon-inline {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    margin-right: 0.35em;
    flex-shrink: 0;
}

.bento-icon .icon-inline {
    margin-right: 0;
}

/* Per-language integration code cards (DEVELOPER INTEGRATION CODE section) --
   every instance of this repeated the same four declarations as an inline
   style instead of using a class; consolidated here instead. */
.code-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.code-feature-card + .code-feature-card {
    margin-top: 1.5rem;
}

.code-feature-card h3 {
    color: var(--accent-cyan);
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.code-feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Interactive Table for Mock Database Users */
.mock-db-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.mock-db-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.mock-db-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}

.mock-db-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

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

.token-cell {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--accent-cyan);
}

/* Playground module action rows -- these were hardcoded inline grid/flex
   layouts with no mobile fallback, forcing long labels (button text, form
   fields) into columns too narrow to hold them on a phone screen. */
.db-action-row {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
}

.login-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.token-live-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.token-compare-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .db-action-row {
        flex-direction: column;
    }

    .login-form-row,
    .token-live-row,
    .token-compare-row {
        grid-template-columns: 1fr;
    }
}

/* Action Buttons */
.btn-action-glow {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.btn-action-glow:hover {
    background: var(--accent-cyan);
    color: #06090e;
    box-shadow: var(--shadow-neon);
}

/* ==========================================================================
   SQL DOWNLOAD SECTION
   ========================================================================== */

.sql-download-banner {
    margin-top: 4rem;
    background: linear-gradient(135deg, rgba(13, 19, 31, 0.9), rgba(16, 185, 129, 0.08));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-emerald);
    backdrop-filter: var(--glass-blur);
}

@media (max-width: 768px) {
    .sql-download-banner {
        flex-direction: column;
        text-align: center;
    }
}

.sql-banner-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.sql-banner-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
}

.btn-download-sql {
    padding: 1rem 2.25rem;
    background: var(--accent-emerald);
    color: #06090e;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-emerald);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-download-sql:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.4);
}

.partner-cta-banner {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(13, 19, 31, 0.9), rgba(6, 182, 212, 0.08));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-neon);
    backdrop-filter: var(--glass-blur);
}

@media (max-width: 768px) {
    .partner-cta-banner {
        flex-direction: column;
        text-align: center;
    }
}

.partner-cta-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.partner-cta-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 640px;
}

.partner-cta-info a {
    color: var(--accent-cyan);
}

.btn-partner-contact {
    padding: 1rem 2.25rem;
    background: var(--accent-cyan);
    color: #06090e;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-partner-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.4);
}

@media (max-width: 768px) {
    /* Both buttons keep white-space: nowrap for their normal side-by-side
       layout, but once the banner stacks to a column on mobile there's no
       room left for that -- the button just pushed past the card's edge
       instead of wrapping or shrinking. */
    .sql-download-banner,
    .partner-cta-banner {
        padding: 1.75rem 1.25rem;
    }

    .btn-download-sql,
    .btn-partner-contact {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

/* ==========================================================================
   DEVELOPER DOCUMENTATION & ARCHITECTURAL SPECS SECTION
   ========================================================================== */
.docs-section {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.threats-section {
    margin-bottom: 4rem;
}

/* ─── Reading-Level Toggle ────────────────────────────────────────────────── */

.depth-toggle-bar {
    position: sticky;
    top: 12px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(6, 9, 14, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0.5rem 0.5rem 0.5rem 1.1rem;
    width: fit-content;
    margin: 0 auto 3rem auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
    /* width: fit-content sizes this to its unwrapped content ("READING
       LEVEL:" + both buttons on one line) no matter how narrow the screen
       is, so it just overflowed off the edge instead of shrinking. */
    .depth-toggle-bar {
        width: calc(100% - 2rem);
        max-width: 360px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.5rem 0.6rem 0.5rem 0.9rem;
    }

    .depth-toggle-label {
        font-size: 0.7rem;
    }

    .depth-toggle-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.78rem;
    }
}

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

.depth-toggle-btn {
    display: inline-flex;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 200ms ease;
}

.depth-toggle-btn:hover {
    color: var(--text-main);
}

.depth-toggle-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), #0072ff);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

/* Same facts at two depths -- only vocabulary changes, never what's claimed */
body.depth-technical .depth-eli5 { display: none; }
body:not(.depth-technical) .depth-technical { display: none; }

.docs-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.bento-card-wide {
    grid-column: span 2;
}

.tech-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-subtle);
}

/* Grid items default to min-width: auto, meaning a column won't shrink below
   the natural width of whatever's inside it -- so even at a single-column
   layout on mobile, unbreakable/wide content in either section could still
   force this column (and the page) wider than the viewport. min-width: 0
   lets the column actually respect the track size instead of its content. */
.tech-columns-grid > section {
    min-width: 0;
}

@media (max-width: 960px) {
    .tech-columns-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

@media (max-width: 1024px) {
    .docs-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    /* A 1-column grid still has to be told to collapse cards that were
       spanning 2 columns at wider breakpoints -- otherwise grid-column: span 2
       forces the browser to add an implicit second track to satisfy the span,
       breaking the single-column layout this rule is trying to create. */
    .bento-card-wide {
        grid-column: 1 / -1;
    }
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bento-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.15);
}

.bento-icon {
    font-size: 1.8rem;
}

.bento-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.bento-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.bento-card code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* Code Snippet Box */
.code-docs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

/* ==========================================================================
   LIVE SECURITY PIPELINE VISUALIZER STYLES
   ========================================================================== */
.pipeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Shared by the pipeline visualizer and dev-integration headings -- both are
   long, non-breaking-looking uppercase titles. On their own they'd wrap fine,
   but the pipeline one sits inside a flex row, and flex items default to
   min-width: auto, which blocks wrapping and forces the whole row (and with
   it, the whole page) wider than the viewport on a phone. min-width: 0
   overrides that; the mobile font-size step-down just keeps it proportional. */
.mono-section-title {
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: none;
    -webkit-text-fill-color: var(--accent-cyan);
    margin: 0;
    min-width: 0;
}

.pipeline-mode-switch {
    display: flex;
    background: rgba(11, 17, 30, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.pipe-mode-btn {
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s ease;
    padding: 0.4rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pipe-mode-btn:hover {
    color: var(--text-main);
}

.pipe-mode-btn.active {
    background: #06b6d4 !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

@media (max-width: 640px) {
    .mono-section-title {
        font-size: 1.15rem !important;
    }
}

.pipeline-stepper-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
}

.pipeline-step-row {
    display: flex;
    gap: 1.5rem;
    position: relative;
    cursor: pointer;
}

.step-indicator-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-node-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-subtle);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.pipeline-step-row.active .step-node-dot {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #000000;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.8);
}

.step-line-connector {
    width: 2px;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 0.5rem;
}

.step-content-col {
    flex-grow: 1;
    padding-bottom: 0.5rem;
}

.step-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.step-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.6rem;
}

.step-status-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.step-status-pill.status-cleared {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Expanded Detail Card */
.step-detail-card {
    background: rgba(11, 17, 30, 0.9);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.stage-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.detail-header h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.04em;
}

.detail-section {
    margin-bottom: 1.25rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-subtitle {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.detail-section p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.lang-tab-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.lang-tab-btn {
    background: rgba(11, 17, 30, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-tab-btn:hover {
    color: var(--text-main);
    border-color: var(--border-glow);
}

.lang-tab-btn.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

.code-docs-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
}

.code-snippet-box {
    background: #090e17;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
}

.code-snippet-box pre {
    margin: 0;
}

.code-snippet-box code {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.65;
    color: #e2e8f0;
}

.code-keyword { color: #f43f5e; font-weight: 700; }
.code-func { color: #38bdf8; font-weight: 700; }
.code-variable { color: #f59e0b; }
.code-string { color: #34d399; }
.code-comment { color: #64748b; font-style: italic; }

/* Footer */
.demo-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-dim);
    font-size: 0.85rem;
}
