:root {
    --black: #050507;
    --surface: #0c0c10;
    --surface-2: #111116;
    --surface-3: #18181e;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --text: #e8e8ec;
    --text-2: #a0a0ab;
    --text-3: #5c5c66;
    --white: #f4f4f6;
    --indigo: #6366f1;
    --indigo-dim: rgba(99, 102, 241, 0.12);
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.12);
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.12);
    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.12);
    --cyan: #06b6d4;
    --cyan-dim: rgba(6, 182, 212, 0.12);
    --glow: rgba(99, 102, 241, 0.15);
    --glow-green: rgba(16, 185, 129, 0.15);
    --glow-red: rgba(239, 68, 68, 0.15);
    --glow-cyan: rgba(6, 182, 212, 0.15);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    background: var(--black);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 999;
}

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

a {
    color: inherit;
    text-decoration: none;
}

/* BG ORBS */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.38;
    animation: float-orb 20s ease-in-out infinite;
    will-change: transform;
}

.bg-animation .orb:nth-child(1) {
    width: 640px;
    height: 640px;
    background: radial-gradient(circle, var(--indigo-dim) 0%, transparent 70%);
    top: -240px;
    right: -140px;
}

.bg-animation .orb:nth-child(2) {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, var(--cyan-dim) 0%, transparent 70%);
    bottom: -140px;
    left: -140px;
    animation-delay: -7s;
}

.bg-animation .orb:nth-child(3) {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--green-dim) 0%, transparent 70%);
    top: 50%;
    left: 28%;
    animation-delay: -14s;
}

@keyframes float-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.08);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.92);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.04);
    }
}

/* SCROLL PROGRESS */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--indigo), var(--cyan), var(--indigo));
    background-size: 200% 100%;
    animation: shimmer-progress 3s ease-in-out infinite;
    z-index: 1200;
    transition: width 0.12s ease;
    box-shadow: 0 0 18px var(--indigo-dim);
}

@keyframes shimmer-progress {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(5, 5, 7, 0.75);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar.scrolled {
    border-bottom: 1px solid var(--border-strong);
}

.topbar.scrolled::before {
    background: rgba(5, 5, 7, 0.92);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.topbar-logo .code {
    color: var(--white);
}

.topbar-logo .trust {
    color: #3b82f6;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: fixed;
    top: 0;
    right: clamp(1rem, 4vw, 3rem);
    height: 56px;
    z-index: 1001;
}

.topbar-nav a {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.topbar-install {
    margin-left: 0.5rem;
    padding: 0.4rem 1rem !important;
    background: var(--indigo) !important;
    color: var(--white) !important;
    border-radius: 6px;
    font-weight: 600 !important;
}

.topbar-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.mobile-toggle {
    display: none;
}

/* SECTION TAB NAV */
.section-tabs {
    position: sticky;
    top: 56px;
    z-index: 98;
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.6rem 1rem;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.tab-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-3);
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}

.tab-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.tab-link.active {
    color: var(--green);
    background: var(--green-dim);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.btn-primary {
    background: var(--indigo);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* SCROLL REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ====================== SCREEN 1: HERO ====================== */
.hero-headline {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.25;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-welcome {
    font-size: clamp(1.4rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    text-align: center;
    margin-bottom: 1rem;
}

.hero-intro {
    font-size: 0.85rem;
    color: var(--text-3);
    text-align: center;
    line-height: 1.7;
    margin: 0 auto 2.5rem;
    max-width: 600px;
    letter-spacing: 0.02em;
}

.hw-trust {
    color: #3b82f6;
}

.hw-gov {
    color: #6366f1;
}

.hero-hl-blue {
    color: #3b82f6;
}

.hero-hl-green {
    color: #10b981;
}

.hl-green {
    color: #10b981;
    font-weight: 600;
}

.hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 7rem clamp(1.5rem, 6vw, 6rem) 2rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--indigo-dim) 0%, transparent 70%);
    pointer-events: none;
}

.hero-terminal {
    position: relative;
    z-index: 1;
    max-width: 700px;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'IBM Plex Mono', monospace;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--indigo-dim);
    opacity: 0;
    transform: translateY(30px);
}

body.loaded .hero-terminal {
    animation: hero-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.7rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.hero-terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero-terminal-title {
    margin-left: 0.6rem;
    font-size: 0.72rem;
    color: var(--text-3);
}

.hero-terminal-body {
    padding: 1.5rem 1.8rem;
    font-size: 0.88rem;
    line-height: 2;
    min-height: 220px;
}

#typewriter-output {
    white-space: pre-wrap;
}

.t-green {
    color: var(--green);
}

.t-red {
    color: var(--red);
    font-weight: 600;
}

.t-dim {
    color: var(--text-3);
}

.t-white {
    color: var(--white);
}

.t-amber {
    color: var(--amber);
}

.t-cyan {
    color: var(--cyan);
}

.cursor-blink {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--green);
    vertical-align: text-bottom;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-below {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
}

body.loaded .hero-below {
    animation: hero-reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) 6.5s forwards;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.hero-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-3);
}

@keyframes hero-reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: none;
    }
}

/* ====================== CONTAINER ====================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem clamp(1.5rem, 6vw, 6rem);
    border-top: 1px solid var(--border);
}

.container h2 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    margin-bottom: 0.8rem;
    text-align: center;
}

.section-sub {
    color: var(--text-2);
    max-width: 680px;
    font-size: 1rem;
    margin: 0 auto 3.5rem;
    text-align: center;
    line-height: 1.75;
}

/* ====================== SCREEN 2: THREE CARDS ====================== */
.three-cards {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.demo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    min-width: 0;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.demo-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 0 20px -5px var(--glow), 0 20px 40px rgba(0, 0, 0, 0.2);
}

.demo-card-header {
    padding: 1.8rem 1.8rem 0;
}

.demo-card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.demo-card-header p {
    font-size: 0.78rem;
    color: var(--text-3);
    line-height: 1.6;
}

.demo-card-body {
    padding: 1rem 1.5rem 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    line-height: 1.7;
}

.demo-card-body .mini-terminal {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
}

.demo-card-sub {
    padding: 0 1.8rem 1.8rem;
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.65;
}

/* Taint flow */
.taint-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.taint-line {
    padding: 0.5rem 0.8rem;
    position: relative;
}

.taint-source {
    border-left: 3px solid var(--amber);
}

.taint-through {
    border-left: 3px solid var(--red);
    opacity: 0.7;
}

.taint-sink {
    border-left: 3px solid var(--red);
    background: var(--red-dim);
    border-radius: 0 6px 6px 0;
}

.taint-arrow {
    color: var(--red);
    font-size: 0.72rem;
    padding: 0.2rem 0.8rem;
    padding-left: calc(0.8rem + 3px);
}

.taint-tag {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
}

.taint-tag-source {
    background: var(--amber-dim);
    color: var(--amber);
}

.taint-tag-sink {
    background: var(--red-dim);
    color: var(--red);
}

/* Gateway anim */
.gateway-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.2rem;
    opacity: 0;
    transform: translateX(-20px);
}

.gateway-line.show {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gateway-line.blocked {
    background: rgba(239, 68, 68, 0.06);
}

.gateway-line.allowed {
    background: rgba(16, 185, 129, 0.06);
}

.gw-source {
    color: var(--text-3);
    font-size: 0.62rem;
    white-space: nowrap;
}

.gw-cmd {
    color: var(--white);
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.72rem;
}

.gw-verdict {
    text-align: right;
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    padding-left: 0.3rem;
}

.gw-verdict.red {
    color: var(--red);
}

.gw-verdict.green {
    color: var(--green);
}

/* ====================== SCREEN 3: LIVE TELEMETRY ====================== */
#telemetry {
    padding-top: 3rem;
}

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 2px;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.6rem 1.4rem 1.2rem;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.dash-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-5px);
    box-shadow: 0 0 20px -5px var(--glow-green), 0 15px 35px rgba(0, 0, 0, 0.2);
}

.dash-card-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-hero-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: 0.15rem;
}

.dash-hero-num.dash-red {
    color: var(--red);
}

.dash-hero-num.dash-cyan {
    color: var(--cyan);
}

.dash-hero-num.dash-amber {
    color: var(--amber);
}

.dash-hero-label {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-bottom: 1rem;
}

.dash-detail-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.dash-detail {
    font-size: 0.72rem;
    color: var(--text-3);
    white-space: nowrap;
}

.dash-detail strong {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    color: var(--text);
    font-size: 0.82rem;
}

.dash-detail strong.dash-val-cyan {
    color: var(--cyan);
}

.dash-detail strong.dash-val-red {
    color: var(--red);
}

.dash-source-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.2rem 1rem;
    margin-top: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.dash-source-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-3);
}

.dash-source-chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dash-source-chip strong {
    color: var(--white);
    font-weight: 600;
}

.dash-src-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* IMPACT GRID */
.impact-threats {
    margin-top: 2.2rem;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.impact-card {
    background: linear-gradient(150deg, var(--surface), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.95rem;
    min-height: 124px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
}

.impact-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.impact-icon {
    font-size: 1rem;
    line-height: 1;
}

.impact-label {
    font-size: 0.86rem;
    color: var(--text);
    font-weight: 600;
}

.impact-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.55rem;
    color: var(--cyan);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.impact-last-seen {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-3);
}

.telemetry-context {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 1.5rem;
    font-style: italic;
}

.telemetry-note {
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-3);
    padding: 0.6rem 1rem 0;
    letter-spacing: 0.02em;
}

/* ====================== SCREEN 4: COMPETITIVE ====================== */
.compare-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.compare-side {
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.compare-side-old {
    background: var(--surface);
}

.compare-side-new {
    background: linear-gradient(135deg, var(--surface), rgba(99, 102, 241, 0.06));
    border-color: rgba(99, 102, 241, 0.2);
}

.compare-side h3 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-2);
}

.compare-side-new h3 {
    color: var(--indigo);
}

.compare-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-2);
}

.compare-item-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.compare-item-dot.dim {
    background: var(--text-3);
}

.compare-item-dot.bright {
    background: var(--indigo);
}

.compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.compare-table th,
.compare-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.compare-table th {
    font-weight: 600;
    color: var(--text-3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compare-table td {
    color: var(--text-2);
}

.compare-table td:first-child {
    color: var(--text);
    font-weight: 500;
}

.ct-col {
    background: rgba(99, 102, 241, 0.06);
    color: var(--white) !important;
    font-weight: 600 !important;
    position: relative;
}

.ct-col::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: var(--indigo);
}

.ct-header {
    color: var(--indigo) !important;
    background: rgba(99, 102, 241, 0.08) !important;
}

.check {
    color: var(--green);
}

.dash-mark {
    color: var(--text-3);
}

/* ====================== SCREEN 5: GET IN ====================== */
.install-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.install-card {
    padding: 1.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.install-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 0 20px -5px var(--glow), 0 15px 30px rgba(0, 0, 0, 0.2);
}

.install-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.6rem;
}

.install-card code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--green);
    background: var(--green-dim);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    display: block;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.lang-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 4rem;
}

.lang-chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    transition: all 0.3s ease;
}

.lang-chip:hover {
    color: var(--white);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.bottom-cta {
    text-align: center;
    padding-top: 2rem;
}

.bottom-cta h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.bottom-cta .hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* FOOTER */
footer {
    padding: 2.5rem clamp(1.5rem, 6vw, 6rem);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-3);
    flex-wrap: wrap;
}

footer a:hover {
    color: var(--text-2);
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 850px) {
    .three-cards {
        grid-template-columns: 1fr;
    }

    .compare-split {
        grid-template-columns: 1fr;
    }

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

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

    .install-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .container h2 {
        font-size: 1.8rem;
    }

    .container {
        padding: 5rem clamp(1.2rem, 4vw, 3rem);
    }
}

/* ====================== MOBILE (<640px) ====================== */
@media (max-width: 640px) {
    body.mobile-menu-open {
        position: fixed;
        overflow: hidden;
        width: 100%;
        left: 0;
        right: 0;
    }

    /* --- Hamburger button --- */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-2);
        cursor: pointer;
        width: 44px;
        height: 44px;
        position: relative;
        transition: color 0.3s ease;
    }
    .mobile-toggle:active { transform: scale(0.9); }
    .mobile-toggle .mobile-icon {
        transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .mobile-toggle .mobile-icon--close {
        position: absolute;
        opacity: 0;
        transform: rotate(-90deg) scale(0.6);
    }
    .mobile-toggle[aria-expanded="true"] {
        color: var(--white);
    }
    .mobile-toggle[aria-expanded="true"] .mobile-icon--menu {
        opacity: 0;
        transform: rotate(90deg) scale(0.6);
    }
    .mobile-toggle[aria-expanded="true"] .mobile-icon--close {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }

    /* --- Nav: hidden by default --- */
    .topbar-nav {
        display: none;
        position: static;
        height: auto;
        width: 100%;
        right: auto;
        flex-direction: column;
        background: var(--black);
        padding: 1rem 1.5rem 2rem;
        gap: 0.15rem;
    }

    /* --- Nav: open state --- */
    .topbar-nav.open {
        display: flex;
        animation: menuFadeIn 0.3s ease forwards;
    }

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

    /* --- Staggered link entrance --- */
    .topbar-nav.open a {
        opacity: 0;
        animation: linkSlideIn 0.35s ease forwards;
    }
    .topbar-nav.open a:nth-child(1) { animation-delay: 0.04s; }
    .topbar-nav.open a:nth-child(2) { animation-delay: 0.08s; }
    .topbar-nav.open a:nth-child(3) { animation-delay: 0.12s; }
    .topbar-nav.open a:nth-child(4) { animation-delay: 0.16s; }
    .topbar-nav.open a:nth-child(5) { animation-delay: 0.20s; }
    .topbar-nav.open a:nth-child(6) { animation-delay: 0.24s; }

    @keyframes linkSlideIn {
        from { opacity: 0; transform: translateX(-12px); }
        to { opacity: 1; transform: translateX(0); }
    }

    /* --- When menu open: hide everything else --- */
    body.mobile-menu-open::before,
    body.mobile-menu-open .bg-animation,
    body.mobile-menu-open .scroll-progress,
    body.mobile-menu-open .section-tabs,
    body.mobile-menu-open .hero,
    body.mobile-menu-open section,
    body.mobile-menu-open footer {
        display: none !important;
    }

    /* --- Nav links --- */
    .topbar-nav a {
        padding: 0.9rem 1rem;
        font-size: 1.05rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        border-radius: 10px;
        color: var(--text-2);
        transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    }
    .topbar-nav a:active {
        background: rgba(255, 255, 255, 0.06);
        transform: scale(0.98);
    }
    .topbar-nav a:hover {
        color: var(--white);
        background: rgba(255, 255, 255, 0.04);
    }

    .topbar-install {
        margin-left: 0 !important;
        margin-top: 0.75rem;
        text-align: center;
        justify-content: center;
        background: var(--indigo) !important;
        color: var(--white) !important;
    }

    /* --- Hide desktop-only elements --- */
    .section-tabs {
        display: none;
    }

    /* --- Topbar --- */
    .topbar {
        padding: 0 1rem;
    }

    /* --- Layout adjustments --- */
    .hero {
        padding: 5.5rem 1.2rem 3rem;
        min-height: auto;
    }

    .hero-welcome {
        font-size: 1.3rem;
    }

    .hero-intro {
        font-size: 0.78rem;
    }

    .hero-terminal-body {
        font-size: 0.72rem;
        padding: 1rem;
    }

    .hero-below {
        margin-top: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    .container h2 {
        font-size: 1.55rem;
    }

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

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

    .dash-hero-num {
        font-size: 2rem;
    }

    .dash-source-bar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .gateway-line {
        grid-template-columns: auto 1fr auto;
        font-size: 0.68rem;
    }

    .compare-table {
        font-size: 0.75rem;
    }

    .compare-table td,
    .compare-table th {
        padding: 0.55rem 0.5rem;
    }
}

@media (max-width: 400px) {
    .hero-terminal-body {
        font-size: 0.65rem;
    }

    .container h2 {
        font-size: 1.35rem;
    }

    .dash-hero-num {
        font-size: 1.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-animation {
        display: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

.layers-bridge {
    font-size: 0.85rem;
    color: var(--text-2);
    text-align: center;
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}

/* ====================== v4.0.2: LAYERS GRID ====================== */
.layers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.layer-card {
    position: relative;
    padding: 1.6rem 1.4rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.layer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--glow-color, var(--indigo));
    opacity: 0.7;
    transition: opacity 0.4s;
}

.layer-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--glow-color, var(--indigo));
}

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

.layer-card-hero {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), var(--surface) 60%);
}

.layer-card-final {
    grid-column: span 4;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), var(--surface) 60%);
    padding: 1.2rem 2rem;
}

.layer-card-final h3 {
    margin-bottom: 0;
}

.layer-card-final p {
    margin-bottom: 0;
    flex: 1;
}

.layer-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.layer-icon {
    margin-bottom: 0.8rem;
}

.layer-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.layer-card p {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 0.8rem;
}

.layer-card code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}

.layer-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: inline-block;
}

.layer-tag-red {
    background: var(--red-dim);
    color: var(--red);
}

.layer-tag-green {
    background: var(--green-dim);
    color: var(--green);
}

.layer-tag-amber {
    background: var(--amber-dim);
    color: var(--amber);
}

.layer-tag-indigo {
    background: var(--indigo-dim);
    color: var(--indigo);
}

.layer-tag-cyan {
    background: var(--cyan-dim);
    color: var(--cyan);
}

/* ====================== v4.0.2: PERSONA SELECTOR ====================== */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.persona-card {
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.4rem 1.4rem;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.persona-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0.5;
    transition: opacity 0.4s;
    pointer-events: none;
}

.persona-founder::before {
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.08), transparent 70%);
}

.persona-dev::before {
    background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.08), transparent 70%);
}

.persona-teach::before {
    background: radial-gradient(ellipse at top, rgba(245, 158, 11, 0.08), transparent 70%);
}

.persona-vibe::before {
    background: radial-gradient(ellipse at top, rgba(6, 182, 212, 0.08), transparent 70%);
}

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

.persona-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.persona-emoji {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    line-height: 1;
}

.persona-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.persona-card p {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 0.8rem;
}

.persona-feature {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-3);
    letter-spacing: 0.02em;
}

/* ====================== v4.0.2: PERSONA SECTIONS ====================== */
.persona-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.persona-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.persona-section-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
    margin-bottom: 1rem;
}

.persona-tag-founder {
    background: var(--indigo-dim);
    color: var(--indigo);
}

.persona-tag-dev {
    background: var(--green-dim);
    color: var(--green);
}

.persona-tag-teach {
    background: var(--amber-dim);
    color: var(--amber);
}

.persona-tag-vibe {
    background: var(--cyan-dim);
    color: var(--cyan);
}

.persona-demo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.persona-demo-wide {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
}

.persona-demo-card {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 1.4rem;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.persona-demo-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.persona-demo-card h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}

.persona-demo-card .mini-terminal {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    line-height: 1.7;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
}

/* ====================== v4.0.2: BATTLE COMPARISON ====================== */
.compare-battle {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto 3rem;
    align-items: stretch;
}

.battle-side {
    padding: 2rem 2.2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    position: relative;
}

.battle-old {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), var(--surface));
    opacity: 0.7;
}

.battle-old .battle-header h3 {
    color: var(--text-3);
}

.battle-new {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), var(--surface));
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.08);
}

.battle-header {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.battle-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.battle-era {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.battle-verdict-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-block;
    width: fit-content;
}

.battle-verdict-outdated {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-3);
}

.battle-verdict-live {
    background: var(--green-dim);
    color: var(--green);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.battle-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.battle-item {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.4;
}

.battle-item-dim {
    color: var(--text-3);
}

.battle-item-glow {
    color: var(--text);
}

.battle-x {
    color: var(--text-3);
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.battle-check {
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 700;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.battle-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-3);
    padding: 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.battle-footnote {
    font-size: 0.72rem;
    color: var(--text-3);
    font-style: italic;
    line-height: 1.5;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ====================== v4.0.2: FIVE CARDS GRID ====================== */
.five-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.demo-card-half {
    grid-column: span 1;
}

.demo-card-full {
    grid-column: span 2;
}

/* Card badges */
.card-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-left: auto;
    white-space: nowrap;
}

.card-badge-red {
    background: var(--red-dim);
    color: var(--red);
}

.card-badge-amber {
    background: var(--amber-dim);
    color: var(--amber);
}

.card-badge-indigo {
    background: var(--indigo-dim);
    color: var(--indigo);
}

.card-badge-green {
    background: var(--green-dim);
    color: var(--green);
}

.card-badge-cyan {
    background: var(--cyan-dim);
    color: var(--cyan);
}

.demo-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* ====================== v4.0.2: DOCTOR TERMINAL ====================== */
.doctor-terminal {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--glow-green);
}

.doctor-terminal-body {
    padding: 1.5rem 1.8rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    line-height: 2.2;
}

.doctor-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.doctor-check {
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.doctor-summary {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    font-weight: 600;
}

/* ====================== v4.0.2: INSTALL HERO ====================== */
.install-hero {
    max-width: 560px;
    margin: 0 auto 3rem;
}

.install-hero-terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-green);
}

.install-terminal-body {
    padding: 1.2rem 1.6rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    line-height: 2;
}

.install-line {
    white-space: nowrap;
}

/* Install surfaces (VS Code, GH Action, Chrome) */
.install-surfaces {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.install-surface-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.install-surface-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 0 20px -5px var(--glow), 0 15px 30px rgba(0, 0, 0, 0.2);
}

.install-surface-icon {
    margin-bottom: 0.8rem;
}

.install-surface-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.6rem;
}

.install-surface-card code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--green);
    background: var(--green-dim);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    display: block;
    text-align: center;
    margin-bottom: 0.6rem;
}

.install-surface-desc {
    font-size: 0.75rem;
    color: var(--text-3);
    line-height: 1.5;
}

/* ====================== v4.0.2: PULSE ANIMATION ====================== */
@keyframes dash-pulse-anim {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.dash-pulse {
    animation: dash-pulse-anim 0.6s ease-out;
}

/* ====================== v4.0.2: RESPONSIVE ADDITIONS ====================== */
@media (max-width: 1000px) {
    .persona-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .persona-demo-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .persona-demo-wide {
        max-width: 600px;
    }

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

    .layer-card-hero {
        grid-column: span 2;
    }

    .layer-card-final {
        grid-column: span 2;
    }

    .compare-battle {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .battle-vs {
        padding: 0.5rem 0;
    }
}

@media (max-width: 850px) {
    .five-cards {
        grid-template-columns: 1fr;
    }

    .demo-card-full {
        grid-column: span 1;
    }

    .persona-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

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

    .layer-card-hero {
        grid-column: span 1;
    }

    .layer-card-final {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
    }

    .install-surfaces {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .layer-card {
        padding: 1.2rem 1rem;
    }

    .doctor-terminal-body {
        padding: 1rem;
        font-size: 0.72rem;
    }

    .doctor-line {
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .install-terminal-body {
        padding: 1rem;
        font-size: 0.72rem;
    }

    .card-badge {
        display: none;
    }
}