/* ═══════════════════════════════════════════════
   IRONCLAW DESIGN SYSTEM — Enterprise Production
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-0: #07070c;
    --bg-1: #0c0c14;
    --bg-2: #12121e;
    --bg-3: #191928;
    --bg-card: rgba(16, 16, 28, 0.65);
    --accent: #6366f1;
    --accent-h: #818cf8;
    --violet: #8b5cf6;
    --cyan: #06b6d4;
    --green: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --rose: #f43f5e;
    --text-1: #ffffff;
    --text-2: #e8ecf4;
    --text-3: #c4cce0;
    --border: rgba(99, 102, 241, 0.1);
    --border-h: rgba(99, 102, 241, 0.3);
    --glass: rgba(12, 12, 22, 0.7);
    --blur: 24px;
    --r: 16px;
    --r-sm: 10px;
    --r-xs: 6px;
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
    --glow: 0 0 48px rgba(99, 102, 241, 0.12);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-0);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 85%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    animation: meshDrift 25s ease-in-out infinite alternate;
}

@keyframes meshDrift {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.08) translate(-15px, 8px);
    }
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image: radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.05) 1px, transparent 0);
    background-size: 48px 48px;
}

.app {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* ── Navigation ── */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 56px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: var(--r-xs);
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
    position: relative;
    overflow: hidden;
}

.brand-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15));
}

.brand-mark svg {
    width: 16px;
    height: 16px;
    fill: white;
    position: relative;
    z-index: 1;
}

.brand-name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.brand-name span {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    gap: 2px;
}

.nav-links button {
    background: none;
    border: none;
    color: var(--text-2);
    font: 500 12px/1 'Inter', sans-serif;
    padding: 8px 16px;
    border-radius: var(--r-xs);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links button svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.nav-links button:hover {
    color: var(--text-1);
    background: rgba(99, 102, 241, 0.08);
}

.nav-links button.active {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: statusPulse 3s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-label {
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
}

/* ── Main Layout ── */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

.page {
    display: none;
}

.page.visible {
    display: block;
    animation: pageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Grid System ── */
.grid {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeSlideIn 0.5s ease-out;
}

.card:hover {
    border-color: var(--border-h);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

/* ── Zen Mode Styles ── */
:root.zen-mode .topnav {
    display: none;
}

:root.zen-mode .footer {
    display: none;
}

:root.zen-mode .hero {
    opacity: 0.1;
    pointer-events: none;
}

:root.zen-mode .stat-card {
    border-style: dashed;
    opacity: 0.6;
}

/* Life Signs Visualization */
.life-signs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.life-sign-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.life-sign-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-1);
}

/* Per-item colored neon glows */
.life-sign-item:nth-child(1) .life-sign-val {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.6), 0 0 28px rgba(6, 182, 212, 0.25);
}

.life-sign-item:nth-child(2) .life-sign-val {
    color: var(--green);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.6), 0 0 28px rgba(16, 185, 129, 0.25);
}

.life-sign-item:nth-child(3) .life-sign-val {
    color: var(--amber);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6), 0 0 28px rgba(245, 158, 11, 0.25);
}

.life-sign-lbl {
    font-size: 9px;
    color: var(--text-2);
    text-transform: uppercase;
    margin-top: 4px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* ═══ Lumina AI Companion Styles ═══ */
.companion-chat-frame {
    display: flex;
    flex-direction: column;
    height: 500px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.lumina-status-banner {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
}

.lumina-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #555;
}

.lumina-status-dot.online {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.lumina-status-dot.error {
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
}

.companion-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.msg {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeSlide 0.3s ease-out;
}

.msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg.bot {
    align-self: flex-start;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.msg.bot .msg-avatar {
    background: linear-gradient(135deg, var(--accent), var(--violet));
    color: white;
}

.msg.user .msg-avatar {
    background: var(--bg-3);
    color: var(--text-2);
}

.msg-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.msg.bot .msg-bubble {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
}

.msg.user .msg-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 2px;
}

.companion-input-row {
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.companion-input-row input {
    flex: 1;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 16px;
    color: var(--text-1);
    font-size: 14px;
    outline: none;
}

.companion-input-row button {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: none;
    background: var(--bg-3);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.companion-input-row button:hover {
    background: var(--accent);
    color: white;
}

.companion-input-row button.active {
    background: var(--green);
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.companion-input-row button svg {
    fill: currentColor;
}

/* ═══ Companion Layout & Notebook ═══ */
.companion-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    height: 600px;
}

.notebook-sidebar {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--border);
    border-radius: var(--r-sm);
}

.notebook-content {
    flex: 1;
    padding: 20px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

.notebook-empty {
    opacity: 0.4;
    text-align: center;
    margin-top: 40px;
    font-style: italic;
}

/* Clickable Terminal Enhancement */
.term-line.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.term-line.clickable:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-1);
}

.companion-input-row button#luminaVoiceBtn.active {
    color: var(--green);
    background: rgba(16, 185, 129, 0.1);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-1);
}

.section-title svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
}

.section-sub {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 400;
}

/* ── Hero Banner ── */
.hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(6, 182, 212, 0.03) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

/* Score Ring */
.score-ring-wrap {
    position: relative;
    z-index: 1;
}

.score-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(var(--green) 0deg, var(--green) 360deg, rgba(255, 255, 255, 0.03) 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.15);
    animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
    }

    50% {
        box-shadow: 0 0 60px rgba(16, 185, 129, 0.3);
    }
}

.score-inner {
    width: 106px;
    height: 106px;
    border-radius: 50%;
    background: var(--bg-0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-num {
    font-size: 36px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.03em;
}

.score-label {
    font-size: 9px;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 24px rgba(255, 255, 255, 0.1);
}

/* ── Stat Cards ── */
.stat-card .stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.stat-icon.i1 {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
}

.stat-icon.i2 {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}

.stat-icon.i3 {
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan);
}

.stat-icon.i4 {
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber);
}

.stat-trend {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}

.stat-val {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 0 12px rgba(99, 102, 241, 0.5), 0 0 32px rgba(99, 102, 241, 0.2);
}

.stat-lbl {
    font-size: 11px;
    color: var(--text-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.25), 0 0 24px rgba(255, 255, 255, 0.08);
    transition: color 0.2s;
}

.stat-card:hover .stat-lbl {
    color: var(--accent);
}

/* ── Module List ── */
.mod-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    transition: background 0.15s;
    animation: fadeSlideIn 0.5s ease-out;
}

.mod-row:hover {
    background: rgba(99, 102, 241, 0.03);
}

.mod-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mod-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.mod-icon.c1 {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.mod-icon.c2 {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
}

.mod-icon.c3 {
    background: rgba(139, 92, 246, 0.1);
    color: var(--violet);
}

.mod-icon.c4 {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}

.mod-icon.c5 {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}

.mod-body {
    flex: 1;
    min-width: 0;
}

.mod-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    color: var(--text-1);
    transition: color 0.2s;
}

.mod-row:hover .mod-name {
    color: var(--accent);
}

.mod-desc {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 1px;
}

.mod-tags {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.msg-bubble {
    padding: 12px 16px;
    border-radius: var(--r-sm);
    line-height: 1.6;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.msg.bot .msg-bubble {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--text-1);
}

.msg.user .msg-bubble {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--text-1);
}

.tag {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}

.tag-be {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.tag-fe {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
}

/* ── Memory Layers ── */
.mem-card {
    text-align: center;
    position: relative;
}

.mem-card.l1 {
    border-top: 2px solid var(--cyan);
}

.mem-card.l2 {
    border-top: 2px solid var(--violet);
}

.mem-card.l3 {
    border-top: 2px solid var(--accent);
}

.mem-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.mem-val {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.mem-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

.mem-card.l1 .mem-val {
    color: var(--cyan);
}

.mem-card.l2 .mem-val {
    color: var(--violet);
}

.mem-card.l3 .mem-val {
    color: var(--accent);
}

/* ── Kali Tools Grid ── */
.kali-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.kali-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 18px;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.kali-card:hover {
    border-color: var(--border-h);
    transform: translateY(-1px);
    box-shadow: var(--glow);
}

.kali-card.running {
    border-color: rgba(16, 185, 129, 0.35);
}

.kali-card.running::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green), var(--cyan));
    animation: scanline 2s linear infinite;
}

@keyframes scanline {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.kali-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.kali-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--r-xs);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kali-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
}

.kali-name {
    font-size: 13px;
    font-weight: 700;
}

.kali-cat {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.4;
    margin-bottom: 12px;
}

.kali-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: var(--r-xs);
    font: 600 11px/1 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kali-btn.install {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
}

.kali-btn.install:hover {
    background: rgba(99, 102, 241, 0.22);
}

.kali-btn.run {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}

.kali-btn.run:hover {
    background: rgba(16, 185, 129, 0.22);
}

.kali-btn.stop {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
}

/* ── Terminal ── */
.terminal {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 16px;
    font: 12px/1.7 'JetBrains Mono', monospace;
    color: var(--green);
    max-height: 220px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.terminal .p {
    color: var(--cyan);
}

.terminal .e {
    color: var(--red);
}

.terminal .i {
    color: var(--text-3);
}

/* ── MCP Rows ── */
.mcp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.015);
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.025);
    transition: background 0.2s;
}

.mcp-row:hover {
    background: rgba(99, 102, 241, 0.03);
}

.mcp-row:last-child {
    margin-bottom: 0;
}

.mcp-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mcp-label {
    font-size: 13px;
    font-weight: 600;
}

.mcp-sub {
    font-size: 10px;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
}

/* ── Setup Wizard ── */
.wizard {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 48px;
    text-align: center;
    max-width: 520px;
    margin: 48px auto;
}

.wizard-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
}

.wizard-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.wizard h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.wizard p {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 28px;
    line-height: 1.5;
}

.wizard-steps {
    text-align: left;
    margin-bottom: 28px;
}

.wiz-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-2);
}

.wiz-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s;
}

.wiz-step.done .wiz-check {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.wiz-step.active .wiz-check {
    border-color: var(--accent);
    animation: wizPulse 1.5s infinite;
}

@keyframes wizPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
    }
}

.wizard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 36px;
    border: none;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--accent), var(--violet));
    color: white;
    font: 600 14px/1 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
    transition: all 0.25s;
}

.wizard-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.wizard-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ── Comparison Banner ── */
.compare {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(244, 63, 94, 0.03));
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: var(--r);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-nums {
    display: flex;
    gap: 24px;
    text-align: center;
    align-items: center;
    flex-shrink: 0;
}

.compare-v {
    font-size: 36px;
    font-weight: 800;
}

.compare-l {
    font-size: 11px;
    color: var(--text-3);
}

.compare-vs {
    font-size: 18px;
    color: var(--text-3);
    font-weight: 300;
}

/* ── Channels ── */
.channel-card {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 16px;
    transition: all 0.2s;
}

.channel-card:hover {
    border-color: var(--border-h);
}

.ch-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-xs);
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 48px 32px;
    color: var(--text-3);
    font-size: 11px;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
}

/* ── Animate In ── */
.ani {
    opacity: 0;
    animation: fadeSlide 0.5s ease-out forwards;
}

.d1 {
    animation-delay: 0.05s;
}

.d2 {
    animation-delay: 0.1s;
}

.d3 {
    animation-delay: 0.15s;
}

.d4 {
    animation-delay: 0.2s;
}

.d5 {
    animation-delay: 0.25s;
}

.d6 {
    animation-delay: 0.3s;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .compare {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}

@media (max-width: 640px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 16px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 28px;
    }

    .hero h1 {
        font-size: 24px;
    }
}


/* Accessibility Enhancements */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-0: #f8f9fc;
        --bg-1: #eef0f5;
        --bg-2: #e2e5ed;
        --text-1: #1a1d2b;
        --text-2: #4a5068;
        --text-3: #7a8098;
    }
}

/* UPGRADE_A11Y */


/* Performance: GPU-accelerated transforms */
.card,
.kali-card,
.mod-row,
.stat-card {
    will-change: transform;
    contain: layout style;
}

.topnav {
    contain: layout style paint;
}

/* Critical rendering: preload fonts */
@media print {

    .bg-mesh,
    .bg-grid,
    .topnav {
        display: none;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* UPGRADE_PERF_CSS */


/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--r-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-box {
    height: 80px;
}

/* UPGRADE_SKELETON */


/* Enhanced responsive behavior */
@media (max-width: 480px) {
    .hero {
        padding: 20px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .score-ring {
        width: 90px;
        height: 90px;
    }

    .score-inner {
        width: 72px;
        height: 72px;
    }

    .score-num {
        font-size: 24px;
    }

    .stat-val {
        font-size: 22px;
    }

    .kali-grid {
        grid-template-columns: 1fr;
    }

    .topnav {
        padding: 0 12px;
        height: 48px;
    }

    .brand-name {
        font-size: 13px;
    }
}

/* UPGRADE_RESPONSIVE */


/* IronClaw Themes */
:root.theme-aurora {
    --bg-0: #0f172a;
    --bg-1: #1e293b;
    --accent: #38bdf8;
    --glass: rgba(56, 189, 248, 0.1);
}

:root.theme-obsidian {
    --bg-0: #020617;
    --bg-1: #0f172a;
    --accent: #f8fafc;
    --glass: rgba(248, 250, 252, 0.05);
}

:root.theme-bold {
    --bg-0: #000000;
    --bg-1: #111111;
    --bg-2: #222222;
    --bg-3: #333333;
    --bg-card: #000000;
    --accent: #ffff00;
    /* Stark Yellow */
    --accent-h: #ffffff;
    --text-1: #ffffff;
    --text-2: #ffffff;
    --text-3: #ffff00;
    --border: #ffff00;
    --border-h: #ffffff;
    --glass: #000000;
    --blur: 0px;
    --r: 0px;
    /* Sharp corners for contrast */
    --r-sm: 0px;
    --r-xs: 0px;
}

:root.theme-bold .card,
:root.theme-bold .kali-card,
:root.theme-bold .mod-row,
:root.theme-bold .topnav,
:root.theme-bold .term-chrome {
    border-width: 3px !important;
    border-style: solid !important;
}

:root.theme-bold .hero {
    background: #000;
    border: 3px solid #ff00ff !important;
}

:root.theme-bold body {
    font-weight: 800;
}

.theme-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    padding: 10px;
    border-radius: 50%;
    background: var(--bg-1);
    border: 1px solid var(--border);
    cursor: pointer;
}

/* UPGRADE_THEME */

/* ═══ Gorgeous Terminal Chrome ═══ */
.term-chrome {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 8px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border), 0 0 80px rgba(99, 102, 241, 0.06);
    position: relative;
}

.term-chrome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--cyan), var(--violet), var(--accent));
    background-size: 200% 100%;
    animation: termGradient 4s linear infinite;
}

@keyframes termGradient {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.term-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
}

.term-dots {
    display: flex;
    gap: 7px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    position: relative;
    transition: filter 0.2s;
}

.dot:hover {
    filter: brightness(1.3);
}

.dot-red {
    background: #ff5f57;
    box-shadow: 0 0 6px rgba(255, 95, 87, 0.25);
}

.dot-yellow {
    background: #febc2e;
    box-shadow: 0 0 6px rgba(254, 188, 46, 0.25);
}

.dot-green {
    background: #28c840;
    box-shadow: 0 0 6px rgba(40, 200, 64, 0.25);
}

.term-title {
    font: 600 11px/1 'JetBrains Mono', monospace;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.term-actions {
    display: flex;
    gap: 6px;
}

.term-action-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.term-action-btn svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.term-action-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.2);
}

.term-body {
    min-height: 360px;
    max-height: 480px;
    overflow-y: auto;
    padding: 20px 22px;
    font: 13px/1.8 'JetBrains Mono', monospace;
    color: var(--green);
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.02) 0%, transparent 60%);
    scroll-behavior: smooth;
}

.term-body::-webkit-scrollbar {
    width: 4px;
}

.term-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.15);
    border-radius: 2px;
}

.term-welcome {
    text-align: center;
    padding: 20px 0 10px;
}

.term-ascii {
    font: 10px/1.2 'JetBrains Mono', monospace;
    color: var(--accent);
    opacity: 0.6;
    margin-bottom: 12px;
    text-align: left;
    display: inline-block;
}

.term-info {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 8px;
}

.term-hl {
    color: var(--cyan);
    font-weight: 600;
}

.term-line {
    padding: 2px 0;
    animation: termLine 0.2s ease-out;
    word-break: break-all;
}

@keyframes termLine {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.term-line.cmd {
    color: var(--cyan);
}

.term-line.cmd::before {
    content: '❯ ';
    color: var(--accent);
    font-weight: 700;
}

.term-line.out {
    color: var(--text-2);
}

.term-line.success {
    color: var(--green);
}

.term-line.warn {
    color: var(--amber);
}

.term-line.err {
    color: var(--red);
}

.term-line.info {
    color: var(--violet);
    font-style: italic;
}

.term-line.sep {
    border-top: 1px solid rgba(99, 102, 241, 0.08);
    margin: 6px 0;
    padding: 0;
    height: 0;
}

.term-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
}

.term-prompt {
    font: 600 12px/1 'JetBrains Mono', monospace;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
    white-space: nowrap;
}

.term-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font: 13px/1 'JetBrains Mono', monospace;
    color: var(--text-1);
    caret-color: var(--cyan);
}

.term-input::placeholder {
    color: var(--text-3);
}

/* Terminal Quick Actions */
.term-quick-actions {
    margin-top: 24px;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.qa-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 14px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    color: var(--text-2);
    font: 600 11px/1 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qa-btn svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
}

.qa-btn:hover {
    border-color: var(--border-h);
    color: var(--text-1);
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
    background: rgba(99, 102, 241, 0.06);
}

.qa-btn:active {
    transform: translateY(0);
}

/* 
   RESPONSIVE DESIGN - Mobile & Tablet
    */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .main {
        padding: 24px;
    }

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

    .companion-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .notebook-sidebar {
        display: none;
    }

    .hero h1 {
        font-size: 28px;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .topnav {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links button {
        font-size: 11px;
        padding: 6px 12px;
    }

    .main {
        padding: 16px;
    }

    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .score-ring {
        width: 100px;
        height: 100px;
    }

    .score-inner {
        width: 82px;
        height: 82px;
    }

    .score-num {
        font-size: 28px;
    }

    .card {
        padding: 16px;
    }

    .stat-val {
        font-size: 24px;
    }

    .companion-chat-frame {
        height: 400px;
    }

    .term-chrome {
        font-size: 12px;
    }

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

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .nav-brand {
        flex-direction: column;
        gap: 8px;
    }

    .nav-links button {
        font-size: 10px;
        padding: 5px 10px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .stat-val {
        font-size: 20px;
    }

    .section-title {
        font-size: 14px;
    }

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

    .companion-input-row button {
        width: 36px;
        height: 36px;
    }
}
