/* ============================================================
   XFlow — dark enterprise (Stripe / Linear energy).
   Cool near-black, steel-blue accent, Geist throughout.
   The product mockups inside keep their real-app violet chrome.
   ============================================================ */

:root {
    /* Backdrop — cool near-black */
    --bg-0:        #0A0C12;
    --bg-1:        #0E1119;
    --bg-2:        #131623;
    --bg-3:        #1A1E2E;
    --panel:       #14172A;
    --panel-2:     #1A1E2E;

    /* Text */
    --fg-0:        #FFFFFF;
    --fg-1:        #E6EAF2;
    --fg-2:        #ADB5C2;
    --fg-3:        #7B8493;
    --fg-4:        #4C5564;

    /* Lines & dividers */
    --line:        rgba(255, 255, 255, 0.07);
    --line-2:      rgba(255, 255, 255, 0.13);
    --line-strong: rgba(255, 255, 255, 0.20);

    /* Brand — steel blue */
    --accent-300: #93C5FD;
    --accent-400: #60A5FA;
    --accent-500: #3B82F6;
    --accent-600: #2563EB;
    --accent-700: #1D4ED8;
    --accent-800: #1E40AF;
    --glow:       rgba(59, 130, 246, 0.42);
    --glow-soft:  rgba(59, 130, 246, 0.16);

    /* Signals */
    --go:          #10B981;
    --go-bg:       rgba(16, 185, 129, 0.10);
    --warn:        #F59E0B;
    --warn-bg:     rgba(245, 158, 11, 0.10);
    --crit:        #EF4444;
    --crit-bg:     rgba(239, 68, 68, 0.10);
    --info:        #3B82F6;

    /* Type — Geist throughout */
    --font-sans:    'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-display: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Scale */
    --container: 1400px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(5rem, 10vw, 8rem);

    /* Motion */
    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Product-mockup tokens — these screenshots keep the real app's violet. */
    --violet-300:  #C4B5FD;
    --violet-400:  #A78BFA;
    --violet-500:  #8B5CF6;
    --violet-600:  #7C3AED;
    --violet-700:  #6D28D9;
    --violet-800:  #5B21B6;
}

/* ============================================================
   Reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--fg-1);
    background: var(--bg-0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
h1, h2, h3, h4 {
    margin: 0;
    font-weight: 500;
    letter-spacing: -0.028em;
    line-height: 1.05;
    color: var(--fg-0);
}
p { margin: 0; }
em {
    font-style: normal;
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--accent-400);
    letter-spacing: -0.018em;
}

::selection { background: var(--accent-600); color: white; }

/* Ambient page glow — fixed behind everything */
body::before {
    content: "";
    position: fixed;
    inset: -10vw;
    background:
        radial-gradient(800px 600px at 12% 8%, rgba(59, 130, 246, 0.18), transparent 60%),
        radial-gradient(700px 500px at 88% 20%, rgba(96, 165, 250, 0.11), transparent 60%),
        radial-gradient(900px 700px at 50% 95%, rgba(59, 130, 246, 0.09), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-3);
    margin: 0 0 1.25rem 0;
}
.eyebrow::before {
    content: "";
    width: 18px; height: 1px;
    background: var(--accent-500);
}
.eyebrow.no-line::before { display: none; }
.eyebrow .num {
    font-family: var(--font-mono);
    color: var(--accent-400);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--fg-0);
    max-width: 22ch;
}
.section-title em {
    color: var(--accent-400);
    font-weight: 600;
}

.section-lede {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--fg-2);
    max-width: 62ch;
    margin-top: 1.5rem;
}

.kicker {
    color: var(--accent-400);
    font-weight: 500;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.93rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: all 220ms var(--ease);
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
}
.btn-primary {
    background: linear-gradient(180deg, var(--accent-500), var(--accent-700));
    color: white;
    box-shadow:
        0 8px 24px -10px var(--glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border-color: var(--accent-700);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 32px -10px var(--glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-ghost {
    color: var(--fg-1);
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
}
.btn-lg { padding: 0.85rem 1.5rem; font-size: 0.98rem; }
.btn .arrow {
    display: inline-block;
    transition: transform 220ms var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 18, 0.72);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fg-0);
    font-weight: 600;
}
.brand-mark {
    width: 22px; height: 22px;
    color: var(--accent-400);
}
.brand-word { font-size: 1.05rem; letter-spacing: -0.02em; font-weight: 600; }
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    font-size: 0.9rem;
    color: var(--fg-2);
    transition: color 150ms var(--ease);
}
.nav-links a:hover { color: var(--fg-0); }
.nav-actions { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav-cta { padding: 0.55rem 1.05rem; font-size: 0.88rem; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; padding: 6px; }
.nav-toggle span { width: 20px; height: 1.5px; background: var(--fg-1); border-radius: 1px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    padding-top: clamp(4rem, 8vw, 6rem);
    padding-bottom: clamp(4rem, 8vw, 6rem);
    text-align: center;
    overflow: visible;
}
.hero-inner { max-width: 1000px; margin: 0 auto; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--fg-2);
    margin-bottom: 2.2rem;
}
.hero-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-400);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22);
    animation: hero-pulse 2.4s ease-in-out infinite;
}
@keyframes hero-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22); }
    50%      { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.06); }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.8rem, 7.5vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--fg-0);
    margin-bottom: 1.75rem;
}
.hero-title em {
    color: var(--accent-400);
    font-weight: 600;
}
.hero-sub {
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.55;
    color: var(--fg-2);
    max-width: 64ch;
    margin: 0 auto 2.5rem;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3.5rem;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--fg-3);
    flex-wrap: wrap;
}
.hero-stats span strong {
    color: var(--fg-0);
    font-weight: 600;
    margin-right: 0.4rem;
}

/* Hero AI live console */
.hero-console {
    margin-top: 4rem;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--line-2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.6),
        0 20px 40px -20px var(--glow-soft);
    backdrop-filter: blur(8px);
    text-align: left;
}
.console-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--fg-3);
}
.console-head .live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--go);
}
.console-head .live .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--go);
    animation: hero-pulse 1.8s ease-in-out infinite;
}
.console-rows { padding: 0.5rem 0; }
.console-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    color: var(--fg-1);
    border-left: 2px solid transparent;
    opacity: 0;
    transform: translateX(-6px);
    animation: row-in 600ms var(--ease-out) forwards;
}
.console-row.a { border-left-color: var(--accent-400); }
.console-row.b { border-left-color: var(--accent-600); }
.console-row .t {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--fg-3);
}
.console-row .d { font-size: 0.88rem; color: var(--fg-1); }
.console-row .d b { color: var(--fg-0); font-weight: 600; }
.console-row .ms {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--fg-3);
}
.console-row:nth-child(1) { animation-delay: 0.3s; }
.console-row:nth-child(2) { animation-delay: 0.7s; }
.console-row:nth-child(3) { animation-delay: 1.1s; }
.console-row:nth-child(4) { animation-delay: 1.5s; }
.console-row:nth-child(5) { animation-delay: 1.9s; }
@keyframes row-in { to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   Trust bar
   ============================================================ */
.trust-bar {
    padding: 3rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}
.trust-bar .label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-3);
    margin-bottom: 1.75rem;
}
.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
}
.trust-row span {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--fg-2);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}
.trust-row span:hover {
    border-color: var(--accent-700);
    color: var(--fg-0);
    background: rgba(59, 130, 246, 0.08);
}
.trust-row span:last-child {
    background: transparent;
    border-color: transparent;
    color: var(--fg-3);
    font-style: italic;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}
.trust-row span:last-child:hover {
    border-color: transparent;
    background: transparent;
    color: var(--fg-1);
}

/* ============================================================
   The four cells (positive XFlow capabilities)
   ============================================================ */
.pain-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 3.5rem;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
.pain-cell {
    padding: 2.25rem 2rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.01);
    transition: background 240ms var(--ease);
}
.pain-cell:hover { background: rgba(255, 255, 255, 0.025); }
.pain-cell .num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--accent-400);
    margin-bottom: 1.25rem;
}
.pain-cell h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--fg-0);
    margin-bottom: 0.7rem;
    line-height: 1.18;
    letter-spacing: -0.025em;
}
.pain-cell p {
    color: var(--fg-2);
    font-size: 0.96rem;
    line-height: 1.6;
}

/* ============================================================
   Journey
   ============================================================ */
.journey-intro { text-align: center; }
.journey-intro .section-title { margin-left: auto; margin-right: auto; }
.journey-intro .section-lede { margin-left: auto; margin-right: auto; }

.journey-tabs {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 2rem;
}
.j-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--fg-2);
    letter-spacing: 0.02em;
}
.j-tab .n {
    color: var(--accent-300);
    font-weight: 600;
}

.stage {
    padding: 5rem 0;
    border-top: 1px solid var(--line);
    position: relative;
}
.stage:last-of-type { border-bottom: 1px solid var(--line); }
.stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 5rem;
    align-items: start;
}
/* When a stage's right side is a real product screenshot, keep it the same
   height as the left copy so the two columns balance cleanly. */
.stage-grid:has(.monitor-screenshot) { align-items: stretch; }
.stage-grid:has(.monitor-screenshot) .monitor {
    height: 100%;
    max-height: 640px;
    display: flex;
    flex-direction: column;
}
.stage-grid:has(.monitor-screenshot) .monitor-screenshot {
    flex: 1;
    min-height: 0;
    object-fit: cover;
    object-position: top center;
}
.stage-grid.reverse { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.stage-grid.reverse .stage-copy { order: 2; }
.stage-grid.reverse .stage-visual { order: 1; }

.stage-copy .stage-num {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-300);
    margin-bottom: 1.5rem;
}
.stage-copy .stage-num .step {
    padding: 0.18rem 0.6rem;
    border: 1px solid var(--accent-700);
    background: rgba(59, 130, 246, 0.12);
    border-radius: 999px;
    color: var(--accent-300);
}
.stage-copy h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--fg-0);
    margin-bottom: 1.25rem;
}
.stage-copy h2 em {
    color: var(--accent-400);
    font-weight: 600;
}
.stage-copy p.lede {
    color: var(--fg-2);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 52ch;
}
.stage-copy .feats {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.stage-copy .feats li {
    position: relative;
    padding: 0.85rem 0 0.85rem 1.7rem;
    border-bottom: 1px solid var(--line);
    color: var(--fg-1);
    font-size: 0.94rem;
    line-height: 1.55;
}
.stage-copy .feats li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0.85rem;
    color: var(--accent-400);
    font-weight: 500;
    line-height: 1.55;
}
.stage-copy .ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    margin-left: 0.5rem;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-300);
    border: 1px solid rgba(59, 130, 246, 0.35);
    vertical-align: middle;
}

/* ============================================================
   Monitor — outer frame around each product mockup
   ============================================================ */
.monitor {
    position: relative;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-2);
    box-shadow:
        0 40px 80px -30px rgba(0, 0, 0, 0.7),
        0 30px 60px -30px var(--glow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out);
}
.monitor:hover {
    transform: translateY(-4px);
    box-shadow:
        0 50px 90px -30px rgba(0, 0, 0, 0.8),
        0 40px 80px -30px var(--glow);
}
.monitor::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: inset 0 0 60px rgba(59, 130, 246, 0.06);
    pointer-events: none;
}
.monitor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border-bottom: 1px solid var(--line-2);
}
.monitor-bar .dots { display: inline-flex; gap: 6px; }
.monitor-bar .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
.monitor-bar .url {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--fg-3);
    padding: 0.18rem 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.monitor-bar .badge {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: var(--accent-300);
}
.monitor-body {
    background: #FFFFFF;
    color: #1F2937;
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.45;
    min-height: 360px;
}

/* Real product screenshots embedded in the monitor frame */
.monitor-screenshot {
    display: block;
    width: 100%;
    height: auto;
    background: #F9FAFB;
}

/* ============================================================
   Mockup utilities — light app interior (unchanged: these
   intentionally mirror the real app's Tailwind classes).
   ============================================================ */
.mk { color: #1F2937; }
.mk-app-head {
    padding: 0.55rem 1rem;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    display: flex; align-items: center; justify-content: space-between;
}
.mk-app-title {
    color: #5B21B6;
    font-weight: 700;
    font-size: 0.95rem;
}
.mk-app-meta { font-size: 0.7rem; color: #6B7280; }
.mk-tabs {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0 0.5rem;
}
.mk-tab {
    padding: 0.55rem 0.7rem;
    font-size: 0.72rem;
    color: #6B7280;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-weight: 500;
}
.mk-tab.active {
    color: #7C3AED;
    border-bottom-color: #8B5CF6;
    background: #F5F3FF;
}
.mk-body { padding: 1rem; background: #F9FAFB; }
.mk-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}
.mk-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.65rem; padding-bottom: 0.6rem;
    border-bottom: 1px solid #F3F4F6;
}
.mk-card-head h3 {
    font-size: 0.88rem; font-weight: 700; color: #1F2937;
    letter-spacing: 0;
    font-family: var(--font-sans);
}
.mk-card-head .meta { font-size: 0.7rem; color: #6B7280; }

.mk-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.mk-kpi {
    padding: 0.7rem 0.85rem;
    border-right: 1px solid #E5E7EB;
    background: #FFFFFF;
}
.mk-kpi:last-child { border-right: none; }
.mk-kpi .lbl {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-family: var(--font-mono);
}
.mk-kpi .val {
    font-size: 1rem;
    font-weight: 700;
    color: #1F2937;
    letter-spacing: -0.01em;
    font-family: var(--font-sans);
}
.mk-kpi .val.go { color: #047857; }
.mk-kpi .val.crit { color: #B91C1C; }
.mk-kpi .val.violet { color: #6D28D9; }

.mk-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: #7C3AED;
    color: white;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.2);
    border: none;
    font-family: var(--font-sans);
}
.mk-btn.ghost {
    background: white; color: #374151;
    border: 1px solid #D1D5DB;
    box-shadow: none;
}
.mk-btn.sm { padding: 0.3rem 0.65rem; font-size: 0.7rem; }
.mk-btn.glow { animation: btn-glow 2.4s ease-in-out infinite; }
@keyframes btn-glow {
    0%, 100% { box-shadow: 0 1px 2px rgba(124, 58, 237, 0.2), 0 0 0 0 rgba(124, 58, 237, 0); }
    50% { box-shadow: 0 1px 2px rgba(124, 58, 237, 0.3), 0 0 0 6px rgba(124, 58, 237, 0.15); }
}

.mk-decision {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 0.85rem;
    border: 1px solid;
}
.mk-decision.go { background: #ECFDF5; border-color: #6EE7B7; }
.mk-decision.cond { background: #FEF3C7; border-color: #FCD34D; }
.mk-decision.nogo { background: #FEE2E2; border-color: #FCA5A5; }
.mk-decision .lbl {
    font-size: 0.72rem; font-weight: 600;
    color: #4B5563; letter-spacing: 0.04em;
}
.mk-decision .val {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; font-weight: 700;
}
.mk-decision.go .val { color: #065F46; }
.mk-decision.cond .val { color: #92400E; }
.mk-decision.nogo .val { color: #991B1B; }
.mk-decision .pill {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: white;
    border: 1px solid;
}
.mk-decision.go .pill { border-color: #6EE7B7; color: #065F46; }
.mk-decision.cond .pill { border-color: #FCD34D; color: #92400E; }
.mk-decision.nogo .pill { border-color: #FCA5A5; color: #991B1B; }

.mk-rowlist { display: grid; gap: 0.4rem; }
.mk-srow {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    background: #F9FAFB;
    border-left: 3px solid #8B5CF6;
    font-size: 0.78rem;
}
.mk-srow .n {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: #6B7280;
    flex-shrink: 0;
}
.mk-srow .t { color: #374151; flex: 1; font-weight: 500; }
.mk-srow .s {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #6B7280;
    flex-shrink: 0;
}
.mk-srow.b1 { border-left-color: #3B82F6; }
.mk-srow.b2 { border-left-color: #8B5CF6; }
.mk-srow.b3 { border-left-color: #6366F1; }
.mk-srow.b4 { border-left-color: #10B981; }
.mk-srow.b5 { border-left-color: #F59E0B; }
.mk-srow.b6 { border-left-color: #F97316; }
.mk-srow.b7 { border-left-color: #EF4444; }

.mk-upload {
    border: 2px dashed #C4B5FD;
    background: #F5F3FF;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-bottom: 0.8rem;
}
.mk-upload .icon {
    width: 36px; height: 36px;
    margin: 0 auto 0.5rem;
    background: #7C3AED;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.2rem;
}
.mk-upload .t1 { font-size: 0.85rem; font-weight: 600; color: #5B21B6; margin-bottom: 0.2rem; }
.mk-upload .t2 { font-size: 0.7rem; color: #6B7280; }
.mk-files { display: grid; gap: 0.35rem; }
.mk-file {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 0.75rem;
}
.mk-file .ic {
    width: 22px; height: 22px;
    background: #EDE9FE; color: #5B21B6;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    flex-shrink: 0;
}
.mk-file .nm { color: #1F2937; font-weight: 500; flex: 1; }
.mk-file .st {
    font-family: var(--font-mono);
    font-size: 0.66rem; color: #047857;
    background: #D1FAE5; padding: 0.1rem 0.4rem; border-radius: 4px;
}

.mk-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.72rem;
}
.mk-table th {
    text-align: left; padding: 0.4rem 0.55rem;
    background: #F3F4F6; color: #374151;
    font-weight: 600; border-bottom: 1px solid #E5E7EB;
    font-family: var(--font-mono); font-size: 0.6rem;
    letter-spacing: 0.06em; text-transform: uppercase;
}
.mk-table td {
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #F3F4F6;
    color: #1F2937;
}
.mk-table tr:nth-child(even) td { background: #FAFAFA; }

.mk-clause {
    border-radius: 7px;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.5rem;
    border: 1px solid;
}
.mk-clause.crit { background: #FEE2E2; border-color: #FCA5A5; }
.mk-clause.watch { background: #FEF3C7; border-color: #FCD34D; }
.mk-clause.ok { background: #ECFDF5; border-color: #A7F3D0; }
.mk-clause-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.3rem;
}
.mk-clause-title { font-size: 0.78rem; font-weight: 700; color: #1F2937; }
.mk-clause-flag {
    font-family: var(--font-mono);
    font-size: 0.6rem; letter-spacing: 0.06em;
    padding: 0.1rem 0.4rem; border-radius: 4px;
    text-transform: uppercase; color: white; font-weight: 600;
}
.mk-clause.crit .mk-clause-flag { background: #DC2626; }
.mk-clause.watch .mk-clause-flag { background: #D97706; }
.mk-clause.ok .mk-clause-flag { background: #059669; }
.mk-clause-body { font-size: 0.72rem; color: #4B5563; line-height: 1.45; }
.mk-clause-rec { font-size: 0.72rem; color: #1F2937; margin-top: 0.3rem; padding-top: 0.3rem; border-top: 1px dashed rgba(0,0,0,0.1); font-style: italic; }

.mk-gantt { display: grid; gap: 0.35rem; margin: 0.5rem 0 0.6rem; }
.mk-gantt-row {
    display: grid; grid-template-columns: 110px 1fr;
    gap: 0.5rem; align-items: center;
}
.mk-gantt-label { font-size: 0.72rem; color: #1F2937; font-weight: 500; }
.mk-gantt-track {
    position: relative;
    height: 16px;
    background: #F3F4F6;
    border-radius: 3px; overflow: hidden;
}
.mk-gantt-bar {
    position: absolute; top: 0; bottom: 0;
    border-radius: 2px;
}
.mk-gantt-bar.proc { background: #3B82F6; opacity: 0.85; }
.mk-gantt-bar.mfg { background: #10B981; opacity: 0.85; }
.mk-gantt-bar.del { background: #F97316; opacity: 0.85; }
.mk-gantt-bar.crit { background: #7C3AED; opacity: 0.95; }
.mk-gantt-scale {
    display: flex; justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6rem; color: #6B7280;
    padding-left: 118px;
}
.mk-gantt-crit {
    margin-top: 0.5rem; padding: 0.45rem 0.65rem;
    background: #F5F3FF; border-left: 3px solid #7C3AED;
    border-radius: 4px;
    font-size: 0.7rem; color: #4B5563;
}
.mk-gantt-crit strong { color: #5B21B6; }

.mk-reason {
    background: linear-gradient(180deg, #F5F3FF, #FFFFFF);
    border: 1px solid #C4B5FD;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #4B5563;
    line-height: 1.55;
}
.mk-reason .line {
    display: block;
    margin-bottom: 0.2rem;
    overflow: hidden;
    white-space: nowrap;
}
.mk-reason .line b { color: #5B21B6; }
.mk-reason .line .out {
    float: right;
    color: #1F2937;
    font-weight: 600;
}
.mk-reason .final {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #C4B5FD;
    color: #5B21B6;
    font-size: 0.84rem;
    font-weight: 700;
    font-family: var(--font-sans);
}

.mk-input-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.mk-input {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
}
.mk-input .lbl {
    font-size: 0.6rem;
    color: #6B7280;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}
.mk-input .val {
    font-size: 0.85rem;
    color: #1F2937;
    font-weight: 600;
    font-family: var(--font-sans);
}
.mk-input.r { background: #F5F3FF; border-color: #C4B5FD; }
.mk-input.r .val { color: #5B21B6; }

.mk-cashflow {
    margin: 0.5rem 0 0.8rem;
}
.mk-cf-bars {
    display: flex; align-items: flex-end;
    justify-content: space-between;
    height: 80px;
    padding: 0 4px;
    border-bottom: 1px dashed #E5E7EB;
    margin-bottom: 0.4rem;
}
.mk-cf-bar {
    flex: 1;
    margin: 0 1.5px;
    border-radius: 2px;
    min-height: 4px;
}
.mk-cf-axis {
    display: flex; justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6rem; color: #6B7280;
    padding: 0 4px;
}

/* ============================================================
   Why XFlow — pillars
   ============================================================ */
.pillars {
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.pillar {
    padding: 2rem 1.75rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line-2);
    border-radius: 12px;
    transition: transform 280ms var(--ease), border-color 280ms var(--ease);
}
.pillar:hover {
    transform: translateY(-3px);
    border-color: var(--accent-700);
}
.pillar-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--accent-400);
    margin-bottom: 1.25rem;
}
.pillar h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.45rem;
    letter-spacing: -0.025em;
    color: var(--fg-0);
    margin-bottom: 0.7rem;
    line-height: 1.18;
}
.pillar p { color: var(--fg-2); font-size: 0.96rem; line-height: 1.6; }

/* ============================================================
   Evidence (kept for compatibility)
   ============================================================ */
.evidence-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
.ev {
    padding: 2rem 1.75rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.ev-num {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.4rem, 4.5vw, 3.5rem);
    line-height: 1;
    color: var(--accent-400);
    letter-spacing: -0.035em;
    margin-bottom: 0.5rem;
}
.ev-num small {
    font-size: 1rem; color: var(--fg-3); margin-left: 0.25rem;
    font-weight: 400;
}
.ev-label { color: var(--fg-2); font-size: 0.88rem; line-height: 1.5; }

/* ============================================================
   Manifesto
   ============================================================ */
.manifesto {
    text-align: center;
    border-top: 1px solid var(--line);
    position: relative;
}
.manifesto::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 300px at 50% 0%, rgba(59, 130, 246, 0.10), transparent 70%);
    pointer-events: none;
}
.manifesto-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}
.manifesto-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--fg-0);
    margin-bottom: 1.75rem;
}
.manifesto-title em {
    color: var(--accent-400);
    font-weight: 600;
}
.manifesto-body {
    font-size: 1.15rem;
    color: var(--fg-2);
    line-height: 1.65;
    max-width: 58ch;
    margin: 0 auto;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
    text-align: center;
    padding: var(--section-y) 0;
}
.cta-card {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 4.5rem) 2rem;
    background:
        radial-gradient(600px 300px at 50% -10%, rgba(59, 130, 246, 0.25), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line-2);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.4), transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.cta-card h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
    color: var(--fg-0);
}
.cta-card h2 em {
    color: var(--accent-400);
    font-weight: 600;
}
.cta-card p {
    color: var(--fg-2);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 55ch;
    margin-left: auto; margin-right: auto;
}
.cta-actions {
    display: inline-flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 4rem 0 2rem;
    color: var(--fg-3);
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-tag {
    font-size: 0.92rem;
    color: var(--fg-2);
    max-width: 36ch;
    line-height: 1.55;
}
.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-4);
    margin-bottom: 1rem;
    font-weight: 500;
}
.footer-col ul li { padding: 0.25rem 0; }
.footer-col ul a {
    font-size: 0.92rem;
    color: var(--fg-2);
    transition: color 150ms var(--ease);
}
.footer-col ul a:hover { color: var(--fg-0); }
.footer-meta {
    grid-column: 1 / -1;
    padding-top: 2rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--fg-4);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}

/* ============================================================
   Reveal & motion utilities
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.r-fast { transition-duration: 500ms; }
.reveal.r-slow { transition-duration: 1100ms; }

[data-counter] { display: inline-block; min-width: 1ch; }

.float-soft { animation: float 6s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.cursor::after {
    content: "▍";
    color: var(--accent-400);
    animation: blink 1s steps(2) infinite;
    margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem var(--gutter);
        background: var(--bg-1);
        border-bottom: 1px solid var(--line);
        gap: 1rem;
    }
    .nav-toggle { display: flex; }
    .nav-cta, .nav-actions { display: none; }

    .stage-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .stage-grid.reverse .stage-copy { order: 1; }
    .stage-grid.reverse .stage-visual { order: 2; }
    .pillars { grid-template-columns: 1fr; }
    .evidence-grid { grid-template-columns: repeat(2, 1fr); }
    .pain-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .mk-input-grid { grid-template-columns: repeat(2, 1fr); }
    .mk-kpi-row { grid-template-columns: 1fr; }
    .mk-kpi { border-right: none; border-bottom: 1px solid #E5E7EB; }
    .mk-kpi:last-child { border-bottom: none; }
}

@media (max-width: 540px) {
    .evidence-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .console-row { grid-template-columns: 50px 1fr; }
    .console-row .ms { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
