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

        :root {
            --coral: #F2A09A;
            --coral-light: #FDF5F4;
            --coral-dark: #E88B84;
            --teal: #4CB5AE;
            --teal-dark: #3A9A94;
            --teal-light: #E8F6F5;
            --navy: #1A2B3C;
            --text-dark: #2D3748;
            --text-gray: #5A6B7D;
            --text-light: #7E8A97;
            --white: #FFFFFF;
            --bg-cream: #FFFAF9;
            --border: #E8ECF1;
            --shadow: 0 24px 60px rgba(26, 43, 60, 0.12);
            --sidebar-width: 280px;
        }

        html { scroll-behavior: smooth; }

        body {
            font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            color: var(--text-dark);
            line-height: 1.6;
            background: #F8FCFB;
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
        }

        h1, h2, h3 {
            font-family: 'DM Serif Display', Georgia, serif;
            font-weight: 400;
        }

        /* ── Layout ───────────────────────────────────────────── */

        .demo-layout {
            display: flex;
            min-height: 100vh;
            padding-top: 72px; /* nav height */
        }

        /* ── Sidebar ──────────────────────────────────────────── */

        .demo-sidebar {
            width: var(--sidebar-width);
            flex-shrink: 0;
            position: sticky;
            top: 72px;
            height: calc(100vh - 72px);
            overflow-y: auto;
            border-right: 1px solid var(--border);
            background: var(--white);
            padding: 28px 0;
            z-index: 10;
        }

        .demo-sidebar::-webkit-scrollbar { width: 4px; }
        .demo-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

        .sidebar-header {
            padding: 0 20px 20px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 12px;
        }

        .sidebar-header h2 {
            font-size: 1.15rem;
            color: var(--navy);
            margin-bottom: 4px;
        }

        .sidebar-header p {
            font-size: 0.82rem;
            color: var(--text-light);
        }

        .sidebar-section-label {
            padding: 16px 20px 6px;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text-light);
        }

        .sidebar-nav {
            list-style: none;
        }

        .sidebar-nav li a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 20px;
            text-decoration: none;
            color: var(--text-gray);
            font-size: 0.92rem;
            font-weight: 500;
            border-left: 3px solid transparent;
            transition: all 0.15s ease;
        }

        .sidebar-nav li a:hover {
            background: var(--teal-light);
            color: var(--teal-dark);
        }

        .sidebar-nav li a.active {
            background: var(--teal-light);
            color: var(--teal-dark);
            border-left-color: var(--teal);
            font-weight: 600;
        }

        .sidebar-nav li a .nav-icon {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            flex-shrink: 0;
        }

        .sidebar-nav li a .nav-label {
            display: flex;
            flex-direction: column;
        }

        .sidebar-nav li a .nav-label span {
            font-size: 0.76rem;
            color: var(--text-light);
            font-weight: 400;
        }

        .sidebar-nav li a.active .nav-label span { color: var(--teal-dark); opacity: 0.7; }

        .nav-icon.inbox     { background: #EBF5FF; color: #3B82F6; }
        .nav-icon.meds      { background: #FEF3C7; color: #D97706; }
        .nav-icon.note      { background: #E8F6F5; color: #059669; }
        .nav-icon.calendar  { background: #F3E8FF; color: #7C3AED; }
        .nav-icon.billing   { background: #FDF5F4; color: #E88B84; }
        .nav-icon.portal    { background: #F0FDF4; color: #16A34A; }
        .nav-icon.orders    { background: #FFF7ED; color: #EA580C; }
        .nav-icon.admin     { background: #F1F5F9; color: #475569; }

        /* ── Main content ─────────────────────────────────────── */

        .demo-main {
            flex: 1;
            min-width: 0;
            padding: 36px 48px 96px;
            max-width: 960px;
        }

        .demo-section {
            display: none;
            animation: fadeIn 0.25s ease;
        }

        .demo-section.active {
            display: block;
        }

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

        .section-hero {
            margin-bottom: 40px;
        }

        .section-hero .eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: rgba(76, 181, 174, 0.12);
            color: var(--teal-dark);
            border-radius: 999px;
            padding: 8px 14px;
            font-size: 0.82rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-bottom: 16px;
        }

        .section-hero .eyebrow::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: var(--teal);
            box-shadow: 0 0 0 6px rgba(76, 181, 174, 0.12);
        }

        .section-hero h1 {
            font-size: clamp(2rem, 4vw, 2.8rem);
            line-height: 1.1;
            color: var(--navy);
            margin-bottom: 12px;
        }

        .section-hero p {
            font-size: 1.08rem;
            color: var(--text-gray);
            max-width: 60ch;
        }

        /* ── Demo steps ───────────────────────────────────────── */

        .demo-step {
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 28px;
            margin-bottom: 28px;
            box-shadow: 0 4px 14px rgba(26, 43, 60, 0.04);
        }

        .demo-step h3 {
            font-size: 1.3rem;
            color: var(--navy);
            margin-bottom: 8px;
        }

        .demo-step p {
            color: var(--text-gray);
            margin-bottom: 16px;
        }

        .demo-screenshot {
            width: 100%;
            border-radius: 12px;
            border: 1px solid var(--border);
            margin-bottom: 16px;
            background: #f0f2f5;
            min-height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-light);
            font-size: 0.9rem;
        }

        .demo-screenshot img {
            width: 100%;
            border-radius: 12px;
            display: block;
        }

        .demo-step .step-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 16px;
        }

        /* ── Buttons ──────────────────────────────────────────── */

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 22px;
            border-radius: 999px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
            cursor: pointer;
            border: none;
        }

        .btn:hover { transform: translateY(-1px); }

        .btn-teal {
            background: var(--teal);
            color: var(--white);
            box-shadow: 0 8px 20px rgba(76, 181, 174, 0.25);
        }
        .btn-teal:hover { background: var(--teal-dark); }

        .btn-navy {
            background: var(--navy);
            color: var(--white);
            box-shadow: 0 8px 20px rgba(26, 43, 60, 0.2);
        }
        .btn-navy:hover { background: #12202d; }

        .btn-outline {
            background: transparent;
            color: var(--teal-dark);
            border: 2px solid var(--teal);
        }
        .btn-outline:hover { background: var(--teal-light); }

        .btn svg {
            width: 16px;
            height: 16px;
        }

        /* ── Deep link callout ────────────────────────────────── */

        .deep-link-callout {
            background: linear-gradient(135deg, var(--teal-light) 0%, rgba(76, 181, 174, 0.06) 100%);
            border: 1px solid rgba(76, 181, 174, 0.2);
            border-radius: 16px;
            padding: 20px 24px;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .deep-link-callout .dl-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: var(--teal);
            color: var(--white);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 1.2rem;
        }

        .deep-link-callout .dl-text {
            flex: 1;
        }

        .deep-link-callout .dl-text strong {
            display: block;
            color: var(--navy);
            margin-bottom: 2px;
        }

        .deep-link-callout .dl-text span {
            font-size: 0.88rem;
            color: var(--text-gray);
        }

        /* ── Welcome section ──────────────────────────────────── */

        .welcome-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 20px;
            margin-top: 28px;
        }

        .welcome-card {
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 24px;
            box-shadow: 0 4px 14px rgba(26, 43, 60, 0.04);
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .welcome-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 32px rgba(26, 43, 60, 0.1);
        }

        .welcome-card .wc-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            margin-bottom: 14px;
        }

        .welcome-card h3 {
            font-size: 1.15rem;
            color: var(--navy);
            margin-bottom: 6px;
        }

        .welcome-card p {
            font-size: 0.88rem;
            color: var(--text-gray);
        }

        .welcome-card .wc-status {
            display: inline-block;
            margin-top: 10px;
            font-size: 0.76rem;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 999px;
        }

        .wc-status.ready    { background: #DCFCE7; color: #16A34A; }
        .wc-status.upcoming { background: #FEF9C3; color: #A16207; }

        /* ── Story scroll (long-form demo) ────────────────────── */

        .story-intro {
            background: linear-gradient(135deg, #FFFFFF 0%, #F0FBFA 100%);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 32px;
            margin-bottom: 40px;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 24px;
            align-items: center;
        }

        .story-intro h2 {
            font-size: 1.5rem;
            color: var(--navy);
            margin-bottom: 8px;
        }

        .story-intro p {
            color: var(--text-gray);
            font-size: 0.98rem;
            max-width: 56ch;
        }

        .story-intro .channels {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .channel-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 999px;
            padding: 8px 14px;
            font-weight: 600;
            font-size: 0.88rem;
            color: var(--navy);
        }

        .channel-pill .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .channel-pill.sms .dot   { background: #3B82F6; }
        .channel-pill.email .dot { background: #059669; }
        .channel-pill.phone .dot { background: #D97706; }

        .chapter {
            margin: 56px 0 0;
            position: relative;
        }

        .chapter-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 24px;
        }

        .chapter-number {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: var(--navy);
            color: var(--white);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'DM Serif Display', Georgia, serif;
            font-size: 1.3rem;
            flex-shrink: 0;
        }

        .chapter-title {
            flex: 1;
        }

        .chapter-title h2 {
            font-size: 1.65rem;
            color: var(--navy);
            margin-bottom: 2px;
            line-height: 1.2;
        }

        .chapter-title p {
            font-size: 0.94rem;
            color: var(--text-gray);
        }

        .story-step {
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 28px;
            margin-bottom: 20px;
            position: relative;
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .story-step.with-image {
            grid-template-columns: 1fr minmax(0, 420px);
        }

        .story-step .step-body h3 {
            font-size: 1.2rem;
            color: var(--navy);
            margin-bottom: 10px;
            display: flex;
            align-items: baseline;
            gap: 10px;
            flex-wrap: wrap;
            line-height: 1.3;
        }

        .story-step .step-body h3 .step-num {
            font-family: 'DM Sans', sans-serif;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--teal-dark);
            background: var(--teal-light);
            padding: 4px 10px;
            border-radius: 999px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .story-step .step-body p {
            color: var(--text-gray);
            margin-bottom: 12px;
        }

        .story-step .step-body ul {
            margin: 12px 0 12px 18px;
            color: var(--text-gray);
        }

        .story-step .step-body li {
            margin-bottom: 6px;
        }

        .story-step .step-body code {
            background: #F1F5F9;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 0.86em;
            color: var(--navy);
        }

        .story-step .step-actions {
            margin-top: 16px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .thumb {
            position: relative;
            border-radius: 14px;
            overflow: hidden;
            border: 1px solid var(--border);
            cursor: zoom-in;
            background: #F1F5F9;
            display: block;
            box-shadow: 0 6px 20px rgba(26, 43, 60, 0.06);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            aspect-ratio: 16 / 10;
        }

        .thumb:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 32px rgba(26, 43, 60, 0.12);
        }

        .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .thumb.placeholder {
            cursor: default;
            background: var(--white);
            border: 1px solid var(--border);
            overflow: hidden;
        }

        /* Browser chrome bar (mac-style window controls) */
        .thumb.placeholder::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 30px;
            background: #F8FAFC;
            border-bottom: 1px solid var(--border);
            background-image:
                radial-gradient(circle at 14px 15px, #FF5F57 0 4.5px, transparent 5px),
                radial-gradient(circle at 30px 15px, #FEBC2E 0 4.5px, transparent 5px),
                radial-gradient(circle at 46px 15px, #28C840 0 4.5px, transparent 5px);
            background-repeat: no-repeat;
        }

        /* Content area with caption over a subtle skeleton */
        .thumb.placeholder::after {
            content: "📸  " attr(data-caption);
            position: absolute;
            top: 30px;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 24px;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--teal-dark);
            line-height: 1.5;
            background:
                linear-gradient(180deg, #FFFFFF 0%, #FAFDFC 100%),
                repeating-linear-gradient(
                    180deg,
                    transparent 0,
                    transparent 28px,
                    rgba(76, 181, 174, 0.06) 28px,
                    rgba(76, 181, 174, 0.06) 36px
                );
            background-blend-mode: multiply;
        }

        .thumb.placeholder:hover {
            transform: none;
            box-shadow: 0 6px 20px rgba(26, 43, 60, 0.06);
        }

        .thumb.placeholder img { display: none; }

        .thumb .zoom-icon {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: rgba(26, 43, 60, 0.8);
            color: var(--white);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.15s ease;
        }

        .thumb:hover .zoom-icon { opacity: 1; }
        .thumb.placeholder .zoom-icon { display: none; }

        .callout-tip {
            background: #FFF7ED;
            border-left: 4px solid #EA580C;
            border-radius: 10px;
            padding: 14px 18px;
            color: var(--text-dark);
            font-size: 0.94rem;
            margin-top: 14px;
        }

        .callout-tip strong { color: #C2410C; }

        .channel-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.76rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            padding: 3px 10px;
            border-radius: 999px;
            vertical-align: middle;
        }

        .channel-tag.sms   { background: #EBF5FF; color: #1D4ED8; }
        .channel-tag.email { background: #ECFDF5; color: #065F46; }
        .channel-tag.phone { background: #FFF7ED; color: #9A3412; }

        @media (max-width: 860px) {
            .story-step.with-image {
                grid-template-columns: 1fr;
            }
            .story-intro {
                grid-template-columns: 1fr;
            }
        }

        /* ── Lightbox ────────────────────────────────────────── */

        .lightbox {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(10, 18, 28, 0.92);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 40px;
            cursor: zoom-out;
            animation: lbFadeIn 0.15s ease;
        }

        .lightbox.open { display: flex; }

        @keyframes lbFadeIn {
            from { opacity: 0; }
            to   { opacity: 1; }
        }

        .lightbox img {
            max-width: 90vw;
            max-height: 90vh;
            border-radius: 12px;
            box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
            cursor: default;
        }

        .lightbox-caption {
            position: fixed;
            bottom: 24px;
            left: 50%;
            z-index: 2001;
            transform: translateX(-50%);
            background: rgba(255, 255, 255, 0.94);
            color: var(--navy);
            padding: 10px 18px;
            border-radius: 999px;
            font-size: 0.88rem;
            font-weight: 500;
            max-width: 80vw;
            text-align: center;
        }

        .lightbox-close {
            position: fixed;
            top: 24px;
            right: 24px;
            z-index: 2001;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.24);
            color: var(--white);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            transition: background 0.15s ease;
        }

        .lightbox-close:hover {
            background: rgba(255, 255, 255, 0.24);
        }

        /* ── Mobile toggle ────────────────────────────────────── */

        .mobile-sidebar-toggle {
            display: none;
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 100;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--navy);
            color: var(--white);
            border: none;
            box-shadow: 0 8px 24px rgba(26, 43, 60, 0.3);
            cursor: pointer;
            font-size: 1.3rem;
            align-items: center;
            justify-content: center;
        }

        .mobile-sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 49;
        }

        @media (max-width: 860px) {
            .demo-sidebar {
                position: fixed;
                left: -300px;
                top: 0;
                height: 100vh;
                padding-top: 80px;
                z-index: 50;
                transition: left 0.25s ease;
                box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
            }

            .demo-sidebar.open {
                left: 0;
            }

            .mobile-sidebar-overlay.open {
                display: block;
            }

            .mobile-sidebar-toggle {
                display: flex;
            }

            .demo-main {
                padding: 28px 20px 96px;
            }
        }
    