:root {
    --bg-color: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent: #2997ff; /* Apple-style subtle blue */
    --border-color: rgba(255, 255, 255, 0.08);
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Subtle background noise texture */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    /* Below fixed nav (z-50) so header glass stays one smooth frosted slab, not grainy patches */
    z-index: 35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.025'/%3E%3C/svg%3E");
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
}

/* Hero Section */
.hero {
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 24px;
    font-weight: 600;
}

.headline {
    font-size: 42px;
    line-height: 1.15;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 48px;
    letter-spacing: -0.02em;
    max-width: 800px;
}

.headline .highlight {
    display: inline-block;
    color: transparent;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    margin-top: 12px;
}

/* Waitlist Form */
.waitlist-form {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 6px;
    width: 100%;
    max-width: 480px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.waitlist-form:focus-within {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(40, 40, 40, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    padding: 16px 24px;
    outline: none;
    font-family: inherit;
    font-weight: 400;
}

.email-input::placeholder {
    color: #6e6e73;
    letter-spacing: 0.01em;
}

.join-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 100px;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.join-btn:hover {
    transform: scale(1.02);
    background: #f5f5f7;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.join-btn:active {
    transform: scale(0.97);
}

/* Divider */
.divider {
    width: 60px;
    height: 1px;
    background: var(--border-color);
    margin: 30px 0 80px 0;
}

/* Cadence Funnel */
.cadence-funnel {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.4) 0%, rgba(10, 10, 10, 0.8) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 56px 40px;
    width: 100%;
    max-width: 640px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
}

.cadence-funnel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0.5;
}

.cadence-funnel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
}

.cadence-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cadence-funnel:hover .cadence-icon {
    transform: scale(1.05);
}

.cadence-icon svg {
    width: 28px;
    height: 28px;
    opacity: 0.95;
}

.cadence-eyebrow {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 700;
}

.cadence-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.cadence-desc {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 40px;
    max-width: 440px;
}

.download-btn {
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-btn:hover {
    transform: scale(1.02);
    background: #f5f5f7;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* Animations: Reveal & Transitions (Apple-style smoothness) */
.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Responsive */
@media (max-width: 768px) {
    .headline {
        font-size: 32px;
    }

    .cadence-funnel {
        padding: 40px 24px;
        border-radius: 24px;
    }

    .waitlist-form {
        flex-direction: column;
        background: none;
        border: none;
        padding: 0;
        backdrop-filter: none;
    }

    .email-input {
        width: 100%;
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 100px;
        padding: 16px;
        margin-bottom: 12px;
        text-align: center;
        backdrop-filter: blur(20px);
    }

    .join-btn {
        width: 100%;
    }
}

/* --- Playhead / Cadence shared surface --- */

        html, body { overflow-x: hidden; width: 100%; }
        html.lenis { height: auto; }

        /* Touch devices: no gray tap flash; desktop unchanged */
        a, button, [role="button"], .tap-target {
            -webkit-tap-highlight-color: transparent;
        }

        .huge-title {
            font-size: clamp(3rem, 16vw, 14rem);
            font-weight: 900;
            letter-spacing: -0.06em;
            line-height: 1;
            text-align: center;
            width: 100%;
            text-transform: lowercase;
        }

        .section-title {
            font-size: clamp(2.35rem, 7.5vw, 5.25rem);
            font-weight: 900;
            letter-spacing: -0.05em;
            line-height: 1.05;
            text-align: center;
            width: 100%;
        }

        .section-title.section-title--left {
            text-align: left;
        }

        /* Share a row with step pills: title keeps intrinsic width, stays big */
        .section-title.section-title--inline-row {
            width: auto;
            max-width: 100%;
        }

        /* Inline “Step 1 … Step 4” pills next to section title */
        .steps-pill-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            padding: 0.35rem 0.45rem;
            border-radius: 9999px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        }

        .steps-pill-bar button {
            flex: 0 0 auto;
            border-radius: 9999px;
            font-weight: 800;
            font-size: clamp(0.7rem, 1.8vw, 0.8125rem);
            letter-spacing: 0.06em;
            text-transform: uppercase;
            padding: 0.65rem 0.9rem;
            transition: background 0.2s, color 0.2s, box-shadow 0.2s;
            white-space: nowrap;
        }

        @media (min-width: 1024px) {
            .steps-pill-bar button {
                padding: 0.7rem 1.05rem;
                font-size: 0.8125rem;
            }
        }

        /*
         * “Do this in order” step pills: always one horizontal row (same as desktop / 14 Pro Max).
         * nowrap !important beats any legacy or Tailwind flex-wrap. min-width:0 + overflow-x
         * keeps a real scrollport when the row is wider than the column (flex min-size quirk).
         */
        .steps-pill-bar.steps-pill-bar--match-title {
            flex-wrap: nowrap !important;
            flex-direction: row;
            padding: clamp(0.22rem, 0.12rem + 0.5vw, 0.3rem) clamp(0.3rem, 0.2rem + 0.6vw, 0.45rem);
            gap: clamp(0.2rem, 0.12rem + 0.35vw, 0.35rem);
            align-items: stretch;
            justify-content: space-between;
            min-width: 0;
            max-width: 100%;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            scrollbar-width: none;
        }
        .steps-pill-bar.steps-pill-bar--match-title::-webkit-scrollbar {
            display: none;
        }

        /* Title + pills: one horizontal line; scroll if the pair exceeds column width */
        #steps .steps-header-row {
            scrollbar-width: thin;
        }

        /* Stack: center heading on small screens (row uses md:items-start from markup) */
        @media (max-width: 767px) {
            #steps .steps-header-row .section-title.section-title--left.section-title--inline-row {
                width: 100%;
                text-align: center;
            }
        }

        /* Fluid type + padding so 390–430px matches 14 Pro Max proportions without wrapping */
        .steps-pill-bar.steps-pill-bar--match-title button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            font-size: clamp(0.6875rem, 0.32rem + 1.85vw, 1.05rem);
            letter-spacing: 0.07em;
            padding: clamp(0.5rem, 0.38rem + 1.1vw, 1rem) clamp(0.5rem, 0.28rem + 2.35vw, 1.2rem);
            min-height: clamp(2.625rem, 2rem + 2.4vw, 3.25rem);
        }

        @media (min-width: 1024px) {
            .steps-pill-bar.steps-pill-bar--match-title button {
                min-height: 4rem;
                padding: 1.1rem 1.4rem;
                font-size: clamp(0.85rem, 1.2vw, 1.125rem);
            }
        }

        @media (min-width: 1280px) {
            .steps-pill-bar.steps-pill-bar--match-title button {
                min-height: 4.35rem;
                padding: 1.15rem 1.5rem;
                font-size: clamp(0.9rem, 1.05vw, 1.1875rem);
            }
        }

        .meta-text {
            font-weight: 600;
            letter-spacing: 0.3em;
            opacity: 0.8;
            text-transform: uppercase;
        }

        [x-cloak] { display: none !important; }

        .ambient-glow {
            position: fixed;
            top: -10vw;
            left: 50%;
            transform: translateX(-50%);
            width: 150vw;
            height: 100dvh;
            min-height: 100dvh;
            background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0) 60%);
            pointer-events: none;
            z-index: 0;
        }

        .content-wrapper { position: relative; z-index: 10; }

        /*
         * Desktop-first canvas: use horizontal space on large screens while keeping
         * safe-area padding for iOS/Android (matches dvh / viewport-fit approach).
         */
        .cadence-shell {
            box-sizing: border-box;
            width: 100%;
            max-width: 108rem; /* 1728px */
            margin-left: auto;
            margin-right: auto;
            padding-left: max(1rem, env(safe-area-inset-left, 0px));
            padding-right: max(1rem, env(safe-area-inset-right, 0px));
        }
        @media (min-width: 640px) {
            .cadence-shell {
                padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
                padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
            }
        }
        @media (min-width: 1024px) {
            .cadence-shell {
                padding-left: max(2.5rem, env(safe-area-inset-left, 0px));
                padding-right: max(2.5rem, env(safe-area-inset-right, 0px));
            }
        }
        @media (min-width: 1536px) {
            .cadence-shell {
                padding-left: max(3.5rem, env(safe-area-inset-left, 0px));
                padding-right: max(3.5rem, env(safe-area-inset-right, 0px));
            }
        }
        /*
         * Top bar: solid read for logo + CTAs only; blur/tint extends a short way below
         * and is masked so the glass edge softens instead of cutting off hard.
         */
        /* Match CineLabs homepage nav: p-8 rhythm + safe-area on notched devices */
        .cadence-nav-bar {
            position: relative;
            isolation: isolate;
            width: 100%;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding-top: max(2rem, env(safe-area-inset-top, 0px));
            padding-bottom: 2rem;
            padding-left: max(2rem, env(safe-area-inset-left, 0px));
            padding-right: max(2rem, env(safe-area-inset-right, 0px));
            background: transparent;
            border-bottom: none;
            box-shadow: none;
        }
        .cadence-nav-bar::before {
            content: '';
            position: absolute;
            inset-inline: 0;
            top: 0;
            /* Extra height = one smooth taper (~1 line–tall) below content, no hard seam */
            height: calc(100% + 2rem);
            z-index: -1;
            pointer-events: none;
            transform: translateZ(0);
            /* Even frosted tint; blur does the glass—avoids banding from a heavy paint gradient */
            background: rgba(6, 6, 6, 0.48);
            backdrop-filter: blur(22px) saturate(1.06);
            -webkit-backdrop-filter: blur(22px) saturate(1.06);
            -webkit-mask-image: linear-gradient(
                to bottom,
                #000 0,
                #000 calc(100% - 1.85rem),
                rgba(0, 0, 0, 0.92) calc(100% - 1.55rem),
                rgba(0, 0, 0, 0.65) calc(100% - 1.1rem),
                rgba(0, 0, 0, 0.32) calc(100% - 0.65rem),
                rgba(0, 0, 0, 0.1) calc(100% - 0.25rem),
                transparent 100%
            );
            mask-image: linear-gradient(
                to bottom,
                #000 0,
                #000 calc(100% - 1.85rem),
                rgba(0, 0, 0, 0.92) calc(100% - 1.55rem),
                rgba(0, 0, 0, 0.65) calc(100% - 1.1rem),
                rgba(0, 0, 0, 0.32) calc(100% - 0.65rem),
                rgba(0, 0, 0, 0.1) calc(100% - 0.25rem),
                transparent 100%
            );
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
        }
        @media (min-width: 640px) {
            .cadence-nav-bar::before {
                height: calc(100% + 2.25rem);
            }
        }

        /* Phones: tight horizontal padding + room for logo + link + Download (no clipping) */
        @media (max-width: 639px) {
            .cadence-nav-bar {
                padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
                padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
                padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
                padding-bottom: 1rem;
                gap: 0.5rem;
                row-gap: 0.625rem;
            }
            /* Second row: full width so link + Download stay inside the screen */
            .cadence-nav-actions {
                flex: 1 1 100%;
                justify-content: flex-end;
            }
        }

        .gsap-reveal { visibility: hidden; }

        @keyframes scrolldown {
            0% { transform: translateY(-100%); opacity: 0; }
            40% { opacity: 1; }
            100% { transform: translateY(200%); opacity: 0; }
        }

        .glass-panel {
            background: rgba(255, 255, 255, 0.015);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 48px;
            backdrop-filter: blur(80px);
            -webkit-backdrop-filter: blur(80px);
            box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.08);
        }

        .app-window {
            width: 100%;
            max-width: 1000px;
            aspect-ratio: 16/10;
            background: rgba(10, 10, 10, 0.85);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            overflow: hidden;
            position: relative;
        }
        @media (min-width: 1280px) {
            .app-window {
                max-width: min(100%, 72rem); /* up to 1152px in wide column */
            }
        }
        @media (min-width: 1536px) {
            .app-window {
                max-width: min(100%, 80rem); /* up to 1280px on very wide desktops */
            }
        }

        .app-header {
            height: 48px;
            background: rgba(20, 20, 20, 0.5);
            display: flex;
            align-items: center;
            padding: 0 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .dot { width: 12px; height: 12px; border-radius: 50%; }
        .dot-red { background: #ff5f56; opacity: 0.85; }
        .dot-yellow { background: #ffbd2e; opacity: 0.85; }
        .dot-green { background: #27c93f; opacity: 0.85; }

        /* Hero: logo only until scroll; supporting copy uses this */
        .hero-reveal-scroll {
            opacity: 0;
            transform: translateY(1rem);
        }

        .tap-target {
            min-height: 44px;
            min-width: 44px;
        }

        /* Same paths as src/lib/icons.js (ClipCard toolbar) */
        .cadence-ui-icon {
            display: inline-block;
            width: 1em;
            height: 1em;
            vertical-align: -0.2em;
            margin: 0 0.04em;
            flex-shrink: 0;
        }

        /* Hero: single line on laptop+ wide viewports; wrap on phones / short landscape */
        .hero-export-one-line {
            white-space: nowrap;
            font-size: clamp(0.65rem, 1.65vw + 0.38rem, 1.5625rem);
            letter-spacing: -0.03em;
        }

        .modes-intro-one-line {
            white-space: nowrap;
            font-size: clamp(0.58rem, 1.15vw + 0.34rem, 1.125rem);
            letter-spacing: -0.02em;
        }

        .footer-brand-one-line {
            white-space: nowrap;
            font-size: clamp(0.65rem, 1.05vw + 0.4rem, 1.0625rem);
            letter-spacing: -0.015em;
        }

        @media (max-width: 639px), (max-height: 520px) {
            .hero-export-one-line,
            .modes-intro-one-line {
                white-space: normal;
                text-wrap: balance;
                max-width: 100%;
            }
        }
        @media (max-width: 480px) {
            .footer-brand-one-line {
                white-space: normal;
                text-wrap: balance;
                max-width: min(100%, 36rem);
                margin-left: auto;
                margin-right: auto;
            }
        }

        /* Short viewports: smaller wordmark so CTA stays on-screen (iPhone / iPad landscape) */
        @media (max-height: 560px) {
            .huge-title {
                font-size: clamp(2rem, 11vw, 6rem);
            }
        }
        @media (max-height: 480px) {
            .huge-title {
                font-size: clamp(1.75rem, 10vw, 4.5rem);
            }
            .guide-step-num {
                font-size: clamp(2.5rem, 8vw, 4rem);
            }
            .guide-step-title {
                font-size: clamp(1.35rem, 4vw + 0.75rem, 2.25rem);
            }
        }

        @media (max-height: 520px) {
            #hero-section .hero-hero-copy {
                font-size: 1.0625rem !important;
                line-height: 1.35;
            }
        }

        @media (max-height: 480px) {
            .cadence-nav-bar {
                padding-top: max(1rem, env(safe-area-inset-top, 0px));
                padding-bottom: 1rem;
            }
        }

        /* Open the XML: stack text + screenshot on squat tablet landscape */
        @media (max-width: 1100px) and (max-height: 780px) and (orientation: landscape) {
            .guide-grid {
                grid-template-columns: 1fr !important;
            }
        }

        /* Phones: beat Tailwind sm:shrink-0 (640–767) while header is still stacked */
        @media (max-width: 767px) {
            .steps-pill-bar.steps-pill-bar--match-title {
                flex-shrink: 1 !important;
                width: 100%;
                touch-action: pan-x;
            }
        }

        /* iPad-style landscape: two mode columns get cramped; stack feature grid */
        @media (max-width: 1200px) and (max-height: 760px) and (orientation: landscape) {
            .modes-feature-grid {
                grid-template-columns: 1fr !important;
                column-gap: 0 !important;
            }
            .modes-feature-grid [role="listitem"] {
                border-right: none !important;
                padding-left: 0 !important;
                padding-right: 0 !important;
            }
        }

        /* Download modal: always fits in dynamic viewport + safe area (iOS) */
        .cadence-download-overlay {
            align-items: flex-end;
            padding-bottom: env(safe-area-inset-bottom, 0px);
            padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
            padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
        }
        @media (min-width: 640px) {
            .cadence-download-overlay {
                align-items: center;
                padding-bottom: 1rem;
            }
        }
        .cadence-download-panel {
            max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem));
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            border-radius: 1.5rem 1.5rem 0 0;
        }
        @media (min-width: 640px) {
            .cadence-download-panel {
                border-radius: 48px;
                max-height: min(88dvh, 40rem);
            }
        }

        /* Modes: desktop 2-col feature grid + calmer divider weight */
        .modes-feature-grid {
            display: grid;
            gap: 0;
        }
        @media (min-width: 1024px) {
            .modes-feature-grid {
                grid-template-columns: 1fr 1fr;
                column-gap: 2.25rem;
            }
        }
        @media (min-width: 1280px) {
            .modes-feature-grid { column-gap: 2.75rem; }
        }

        /* Open the XML: step titles scale with large screenshots */
        .guide-step-num {
            font-size: clamp(3.5rem, 10vw, 7.5rem);
            line-height: 0.9;
            letter-spacing: -0.04em;
        }
        .guide-step-title {
            font-size: clamp(1.85rem, 2.4vw + 1.1rem, 3.35rem);
            line-height: 1.05;
            letter-spacing: -0.035em;
        }

        /* One shared detail pane: stacked cross-fade (no per-row height jump) */
        .steps-detail-stack {
            position: relative;
            min-height: 13.5rem;
        }
        @media (min-width: 640px) {
            .steps-detail-stack { min-height: 12rem; }
        }
        @media (min-width: 768px) {
            .steps-detail-stack { min-height: 11rem; }
        }
        .steps-detail-layer {
            position: absolute;
            left: 1rem;
            right: 1rem;
            top: 1rem;
            transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
        }
        @media (prefers-reduced-motion: reduce) {
            .steps-detail-layer { transition: none !important; }
            .animate-bounce { animation: none !important; }
        }
    