/* ============================================
   TSB — Static / Standalone Pages
   Family: 404, thank-you, unsubscribe, bundle, demo
   Base layer for small standalone pages
   ============================================ */

@import url('tokens.css');

/* ============================================
   Shared: base resets for standalone pages
   ============================================ */
.page-404,
.page-thank-you,
.page-unsubscribe,
.bundle-template-page,
.public-profile-page,
.leaderboard-page,
.page-demo {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}


/* Shared: glass shell (lz-shell style) */
.page-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04),
        0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-shell::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 34%, transparent 72%);
    pointer-events: none;
}

/* Shared: kicker label */
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(214, 223, 232, 0.52);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-kicker::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(77, 171, 154, 0.9);
    box-shadow: 0 0 0 4px rgba(77, 171, 154, 0.12);
}

/* Shared: action buttons */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
    border: none;
}

.page-btn svg {
    width: 15px;
    height: 15px;
}

.page-btn-primary {
    background: linear-gradient(135deg, #4DAB9A, #5BC4B0);
    color: #0a0a0a;
    box-shadow: 0 14px 32px rgba(7, 17, 14, 0.16);
}

.page-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(7, 17, 14, 0.18);
}

.page-btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(240, 240, 242, 0.88);
}

.page-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.042);
    border-color: rgba(255, 255, 255, 0.11);
    transform: translateY(-2px);
}

/* ============================================
   Page: 404
   ============================================ */
.page-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(28px + env(safe-area-inset-top)) 20px calc(36px + env(safe-area-inset-bottom));
    background: var(--app-bg-page);
}

html.dark body.page-404.tsb-brand-scene:not(.embed-mode) {
    background: var(--app-bg-page);
}

html.dark body.page-404.tsb-brand-scene:not(.embed-mode)::after {
    display: none;
}

.page-404 .page-shell {
    box-sizing: border-box;
    width: min(100%, 600px);
    padding: 28px;
    border-radius: var(--app-radius-section);
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-section);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    text-align: left;
}

.page-404 .page-shell::before {
    display: none;
}

.page-404 .error-title {
    max-width: 500px;
    margin: 0;
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 620;
    letter-spacing: -0.045em;
    line-height: 0.98;
    color: var(--text-primary);
}

.page-404 .error-desc {
    max-width: 440px;
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--text-tertiary);
}

.page-404 .action-row {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--app-border-muted);
}

.page-404 .page-kicker {
    margin: 0;
}

.page-404 .page-kicker::before {
    display: none;
}

.page-404 .page-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.page-404 .page-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.page-404 .page-btn {
    box-sizing: border-box;
    min-height: 42px;
    padding: 0 15px;
    border-radius: var(--app-radius-control);
    box-shadow: none;
    transform: none;
}

.page-404 .page-btn i,
.page-404 .page-btn svg {
    width: 16px;
    height: 16px;
}

.page-404 .page-btn-primary {
    border: 1px solid rgba(77, 171, 154, 0.26);
    background: rgba(77, 171, 154, 0.1);
    color: #b7f5ec;
}

.page-404 .page-btn-primary:hover {
    border-color: rgba(77, 171, 154, 0.36);
    background: rgba(77, 171, 154, 0.15);
    box-shadow: none;
    transform: none;
}

.page-404 .page-btn-ghost {
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
}

.page-404 .page-btn-ghost:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
    transform: none;
}

@media (max-width: 480px) {
    .page-404 {
        align-items: stretch;
        padding: calc(14px + env(safe-area-inset-top)) 10px calc(20px + env(safe-area-inset-bottom));
    }

    .page-404 .page-shell {
        width: 100%;
        min-height: auto;
        margin: auto 0;
        padding: 20px 16px 18px;
    }

    .page-404 .error-title {
        font-size: clamp(28px, 9vw, 34px);
    }

    .page-404 .error-desc {
        margin-top: 12px;
        font-size: 13px;
        line-height: 1.55;
    }

    .page-404 .page-status-row {
        margin-bottom: 16px;
    }

    .page-404 .page-status-chip {
        min-height: 22px;
        font-size: 10.5px;
    }

    .page-404 .action-row {
        gap: 8px;
        margin-top: 20px;
        padding-top: 16px;
        flex-direction: column;
    }

    .page-404 .page-btn {
        width: 100%;
    }
}

/* ============================================
   Page: Thank You
   ============================================ */
.page-thank-you {
    --ty-accent: #6fd4c4;
    --ty-accent-rgb: 111, 212, 196;
    --ty-surface: #0d0e0e;
    --ty-border: rgba(255, 255, 255, 0.12);
    --ty-divider: rgba(255, 255, 255, 0.08);
    --ty-text: #f5f5f5;
    --ty-muted: rgba(212, 212, 216, 0.66);
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background: #000;
    color: var(--ty-text);
}

.ty-topbar {
    width: min(1100px, calc(100% - 56px));
    min-height: 72px;
    margin: 0 auto;
    border-bottom: 1px solid var(--ty-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
}

.page-thank-you .page-shell {
    display: grid;
    gap: 14px;
    width: min(1100px, calc(100% - 56px));
    min-height: 0;
    margin: 0 auto;
    padding: clamp(42px, 4.5vw, 58px) 0 64px;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.ty-brand-row {
    display: flex;
    align-items: center;
    color: var(--ty-text);
    text-decoration: none;
}

.ty-logo {
    display: block;
    width: 82px;
    height: auto;
}

.ty-topbar-link {
    color: var(--ty-muted);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.18s ease;
}

.ty-topbar-link:hover,
.ty-topbar-link:focus-visible {
    color: var(--ty-text);
}

.ty-success-card {
    overflow: hidden;
    border: 1px solid var(--ty-border);
    border-radius: 14px;
    background: var(--ty-surface);
}

.ty-hero {
    display: block;
    padding: 38px 40px 34px;
}

.ty-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 0;
    min-width: 0;
}

.ty-status {
    display: block;
    margin: 0;
    color: var(--ty-accent);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 740;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.ty-title {
    max-width: 780px;
    margin: 14px 0 0;
    color: var(--ty-text);
    font-size: clamp(42px, 4vw, 52px);
    font-weight: 740;
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.ty-sub {
    max-width: 650px;
    margin: 16px 0 0;
    color: var(--ty-muted);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}

.ty-action-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: center;
    gap: 40px;
    width: 100%;
    margin: 0;
    padding: 26px 40px;
    box-sizing: border-box;
    border-top: 1px solid var(--ty-divider);
    border-radius: 0;
    background: transparent;
}

.ty-action-copy {
    min-width: 0;
}

.ty-action-copy span,
.ty-bundle-eyebrow {
    display: block;
    margin: 0;
    color: rgba(212, 212, 216, 0.48);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 720;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ty-action-copy strong {
    display: block;
    margin-top: 7px;
    color: rgba(245, 245, 245, 0.92);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 690;
}

.ty-action-copy p {
    max-width: 560px;
    margin: 5px 0 0;
    color: rgba(212, 212, 216, 0.58);
    font-size: 14px;
    line-height: 1.5;
}

.ty-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid rgba(var(--ty-accent-rgb), 0.74);
    background: #8fd3ca;
    color: #06100e;
    font-size: 14px;
    font-weight: 720;
    text-decoration: none;
    box-shadow: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ty-cta svg {
    width: 16px;
    height: 16px;
}

.ty-cta:hover {
    border-color: #aaf1e6;
    background: #a2e4da;
}

.ty-cta:focus-visible,
.ty-bundle-card .ty-bundle-cta:focus-visible,
.ty-brand-row:focus-visible,
.ty-topbar-link:focus-visible {
    outline: 2px solid var(--ty-accent);
    outline-offset: 3px;
}

.ty-note {
    margin: 4px 0 0;
    padding: 0 4px;
    font-size: 14px;
    color: rgba(212, 212, 216, 0.5);
    line-height: 1.5;
    text-align: center;
}

.ty-note a {
    color: rgba(143, 211, 202, 0.82);
    text-decoration: none;
}

.ty-bundle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 0;
    width: 100%;
    padding: 22px 24px;
    border: 1px solid var(--ty-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.012);
    box-sizing: border-box;
    text-align: left;
}

.ty-bundle-copy {
    min-width: 0;
}

.ty-bundle-eyebrow {
    margin-bottom: 8px;
    color: var(--ty-accent);
}

.ty-bundle-card strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ty-text);
    font-size: 17px;
    font-weight: 690;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.ty-bundle-card p {
    margin: 0;
    color: var(--ty-muted);
    font-size: 13px;
    line-height: 1.55;
}

.ty-bundle-card .ty-bundle-cta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(var(--ty-accent-rgb), 0.28);
    border-radius: 10px;
    background: rgba(var(--ty-accent-rgb), 0.08);
    color: #b7f5ec;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ty-bundle-card .ty-bundle-cta svg {
    width: 15px;
    height: 15px;
}

.ty-bundle-card .ty-bundle-cta:hover {
    border-color: rgba(77, 171, 154, 0.42);
    background: rgba(77, 171, 154, 0.17);
    color: #dcfff9;
}

@media (max-width: 640px) {
    .ty-topbar,
    .page-thank-you .page-shell {
        width: calc(100% - 28px);
    }

    .page-thank-you .page-shell {
        padding: 32px 0 40px;
    }

    .ty-logo {
        width: 70px;
    }

    .ty-hero {
        padding: 24px 22px 22px;
    }

    .ty-title {
        font-size: clamp(34px, 10vw, 42px);
    }

    .ty-sub {
        font-size: 14px;
        line-height: 1.6;
    }

    .ty-action-panel {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 22px;
    }

    .ty-bundle-card {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        padding: 20px 22px;
    }

    .ty-bundle-card .ty-bundle-cta {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .ty-topbar {
        min-height: 64px;
    }

    .ty-topbar-link {
        font-size: 12px;
    }
}

/* ============================================
   Page: Unsubscribe
   ============================================ */
.page-unsubscribe {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(28px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
    background: var(--app-bg-page);
}

.page-unsubscribe .page-shell {
    box-sizing: border-box;
    width: min(100%, 560px);
    padding: 28px;
    border-radius: var(--app-radius-section);
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-section);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    text-align: left;
}

.page-unsubscribe .page-shell::before {
    display: none;
}

.unsubscribe-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.unsubscribe-kicker {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.unsubscribe-chip {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.unsubscribe-chip.is-success {
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.07);
    color: #9feadd;
}

.unsubscribe-chip.is-error {
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.07);
    color: #ff8d8d;
}

.unsubscribe-title {
    max-width: 460px;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 620;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.unsubscribe-copy {
    max-width: 460px;
    margin: 14px 0 0;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
}

.unsubscribe-actions {
    margin-top: 22px;
}

.unsubscribe-button {
    appearance: none;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(77, 171, 154, 0.28);
    border-radius: 999px;
    background: #4DAB9A;
    color: #07110f;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(77, 171, 154, 0.16);
}

.unsubscribe-button:hover {
    background: #62c5b5;
}

.unsubscribe-panel {
    margin-top: 24px;
    padding: 16px;
    border-radius: var(--app-radius-section);
    border: 1px solid rgba(77, 171, 154, 0.16);
    background: rgba(77, 171, 154, 0.06);
}

.unsubscribe-panel.is-error {
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.06);
}

.unsubscribe-panel p,
.unsubscribe-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.unsubscribe-meta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--app-border-muted);
    color: var(--text-muted);
    font-size: 13px;
}

.page-unsubscribe a {
    color: #9feadd;
    text-decoration: none;
}

.page-unsubscribe a:hover {
    color: #d6f5ef;
}

@media (max-width: 480px) {
    .page-unsubscribe {
        align-items: flex-start;
        padding: calc(14px + env(safe-area-inset-top)) 10px calc(20px + env(safe-area-inset-bottom));
    }

    .page-unsubscribe .page-shell {
        width: 100%;
        margin: 0;
        padding: 20px 16px 18px;
    }

    .unsubscribe-title {
        font-size: clamp(28px, 9vw, 34px);
    }

    .unsubscribe-copy {
        font-size: 13px;
        line-height: 1.55;
    }
}

/* ============================================
   Page: Leaderboard
   ============================================ */
.leaderboard-page {
    margin: 0;
    background: var(--app-bg-page);
}

.leaderboard-page *,
.leaderboard-page *::before,
.leaderboard-page *::after {
    box-sizing: border-box;
}

.leaderboard-page h1,
.leaderboard-page h2,
.leaderboard-page p {
    margin: 0;
}

.leaderboard-page .container {
    width: min(100% - 40px, 980px);
    margin: 0 auto;
    padding: calc(32px + env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
}

.leaderboard-page .page-header,
.leaderboard-page .sort-tabs,
.leaderboard-page .empty-state,
.leaderboard-page .cta-section {
    border-radius: var(--app-radius-section);
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-section);
    box-shadow: none;
}

.leaderboard-page .page-header {
    display: grid;
    gap: 18px;
    padding: 28px;
    margin-bottom: 14px;
}

.leaderboard-page .leaderboard-kicker,
.leaderboard-page .cta-kicker,
.leaderboard-page .trader-count span,
.leaderboard-page .trader-stat .lbl,
.leaderboard-page .score-badge::before {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.leaderboard-page .leaderboard-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.leaderboard-page .page-title {
    color: var(--text-primary);
    font-size: clamp(34px, 4.2vw, 48px);
    font-weight: 620;
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.leaderboard-page .page-subtitle {
    max-width: 640px;
    margin-top: 14px;
    color: var(--text-tertiary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.leaderboard-page .trader-count {
    display: grid;
    gap: 4px;
    min-width: 116px;
    padding: 12px 14px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
}

.leaderboard-page .trader-count strong {
    color: var(--text-primary);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
}

.leaderboard-page .sort-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
    scrollbar-color: var(--app-border-hover) transparent;
    scrollbar-width: thin;
}

.leaderboard-page .sort-tabs::-webkit-scrollbar {
    height: 6px;
}

.leaderboard-page .sort-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.leaderboard-page .sort-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--app-border-hover);
}

.leaderboard-page .sort-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--app-white-rgb), 0.18);
}

.leaderboard-page .sort-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--app-radius-control);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.leaderboard-page .sort-tab:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
}

.leaderboard-page .sort-tab.active {
    border-color: rgba(77, 171, 154, 0.24);
    background: rgba(77, 171, 154, 0.09);
    color: #b7f5ec;
}

.leaderboard-page .trader-list {
    display: grid;
    gap: 8px;
}

.leaderboard-page .trader-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 104px 58px;
    align-items: center;
    gap: 16px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.leaderboard-page .trader-card:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-card-hover);
}

.leaderboard-page .rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--app-radius-control);
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-card);
    color: var(--text-muted);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
}

.leaderboard-page .rank-1 .rank-number {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
    color: #f3c76b;
}

.leaderboard-page .rank-2 .rank-number,
.leaderboard-page .rank-3 .rank-number {
    border-color: rgba(var(--app-white-rgb), 0.08);
    color: var(--text-secondary);
}

.leaderboard-page .trader-info {
    min-width: 0;
}

.leaderboard-page .trader-name {
    max-width: 100%;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-page .trader-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 8px;
    margin-top: 5px;
    min-width: 0;
}

.leaderboard-page .badge {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

.leaderboard-page .badge:not(:last-child)::after {
    content: '';
    width: 3px;
    height: 3px;
    margin-left: 8px;
    border-radius: 999px;
    background: var(--app-border-hover);
}

.leaderboard-page .badge-accent {
    color: #9fe4d8;
}

.leaderboard-page .badge-gold {
    color: #f3c76b;
}

.leaderboard-page .trader-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(58px, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
}

.leaderboard-page .trader-stat {
    min-width: 0;
    padding: 9px 11px;
    text-align: left;
}

.leaderboard-page .trader-stat:not(:last-child) {
    border-right: 1px solid var(--app-border-muted);
}

.leaderboard-page .trader-stat .val,
.leaderboard-page .score-badge {
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum' 1;
}

.leaderboard-page .trader-stat .val {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.05;
}

.leaderboard-page .trader-stat .val.is-positive {
    color: #9fe4d8;
}

.leaderboard-page .trader-stat .lbl {
    display: block;
    margin-top: 5px;
    font-size: 9.5px;
}

.leaderboard-page .mini-equity {
    width: 104px;
    height: 34px;
}

.leaderboard-page .mini-equity svg {
    display: block;
    width: 100%;
    height: 100%;
}

.leaderboard-page .score-badge {
    display: grid;
    gap: 4px;
    min-width: 54px;
    color: #b7f5ec;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-align: right;
}

.leaderboard-page .score-badge::before {
    content: 'Score';
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 9.5px;
}

.leaderboard-page .empty-state {
    display: grid;
    gap: 8px;
    padding: 34px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.leaderboard-page .empty-state p:first-child {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 650;
}

.leaderboard-page .cta-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 14px;
    padding: 22px 24px;
}

.leaderboard-page .cta-copy {
    display: grid;
    gap: 10px;
    max-width: 680px;
    min-width: 0;
}

.leaderboard-page .cta-title {
    max-width: 660px;
    color: var(--text-primary);
    font-size: clamp(22px, 2.35vw, 30px);
    font-weight: 650;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.leaderboard-page .cta-subtitle {
    max-width: 640px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

.leaderboard-page .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 16px;
    border: 1px solid rgba(77, 171, 154, 0.26);
    border-radius: var(--app-radius-control);
    background: rgba(77, 171, 154, 0.1);
    color: #b7f5ec;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.leaderboard-page .cta-button:hover {
    border-color: rgba(77, 171, 154, 0.36);
    background: rgba(77, 171, 154, 0.15);
    color: #d7fff8;
}

.leaderboard-page .footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--app-border-muted);
    text-align: center;
}

.leaderboard-page .footer-text {
    color: var(--text-muted);
    font-size: 13px;
}

.leaderboard-page .footer-text a {
    color: var(--text-secondary);
    text-decoration: none;
}

@media (max-width: 860px) {
    .leaderboard-page .trader-card {
        grid-template-columns: 36px minmax(0, 1fr) 54px;
        gap: 12px;
        align-items: start;
    }

    .leaderboard-page .trader-stats {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .leaderboard-page .mini-equity {
        display: none;
    }
}

@media (max-width: 640px) {
    .leaderboard-page .container {
        width: min(100% - 20px, 980px);
        padding: calc(14px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));
    }

    .leaderboard-page .page-header {
        padding: 20px 16px;
    }

    .leaderboard-page .leaderboard-header-row,
    .leaderboard-page .cta-section {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .leaderboard-page .trader-count {
        width: 100%;
    }

    .leaderboard-page .sort-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 8px 8px 12px;
        -webkit-overflow-scrolling: touch;
    }

    .leaderboard-page .sort-tab {
        flex: 0 0 auto;
    }

    .leaderboard-page .trader-card {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 10px;
        min-height: 0;
        padding: 12px;
    }

    .leaderboard-page .score-badge {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        min-width: 0;
        font-size: 15px;
        text-align: right;
    }

    .leaderboard-page .trader-stats {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leaderboard-page .cta-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .leaderboard-page .page-title {
        font-size: clamp(30px, 12vw, 40px);
    }

    .leaderboard-page .trader-meta {
        display: none;
    }

    .leaderboard-page .trader-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leaderboard-page .trader-stat {
        padding: 8px 9px;
    }

    .leaderboard-page .trader-stat:not(:last-child) {
        border-right: 1px solid var(--app-border-muted);
        border-bottom: 0;
    }
}

/* ============================================
   Page: Public Profile
   ============================================ */
.public-profile-page {
    margin: 0;
    background: var(--app-bg-page);
}

.public-profile-page *,
.public-profile-page *::before,
.public-profile-page *::after {
    box-sizing: border-box;
}

.public-profile-page h1,
.public-profile-page h2,
.public-profile-page p {
    margin: 0;
}

.public-profile-page .container {
    width: min(100% - 40px, 980px);
    margin: 0 auto;
    padding: calc(32px + env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
}

.public-profile-page .app-section-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--app-radius-section);
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-section);
    box-shadow: none;
}

.public-profile-page .header {
    display: grid;
    gap: 20px;
    margin-bottom: 14px;
    padding: 28px;
}

.public-profile-page .profile-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
}

.public-profile-page .profile-kicker,
.public-profile-page .section-kicker,
.public-profile-page .stat-label,
.public-profile-page .detail-stat .label,
.public-profile-page .equity-title {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.public-profile-page .profile-hero-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.public-profile-page .profile-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.public-profile-page .public-avatar {
    display: flex;
    width: 58px;
    height: 58px;
    margin-top: 2px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-control);
    overflow: hidden;
}

.public-profile-page .public-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-profile-page .display-name {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: clamp(30px, 3.6vw, 38px);
    font-weight: 620;
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.public-profile-page .username,
.public-profile-page .member-since {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.public-profile-page .performance-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: var(--app-radius-control);
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.public-profile-page .performance-badge {
    margin-top: 2px;
    flex: 0 0 auto;
}

.public-profile-page .performance-badge svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.public-profile-page .performance-badge.positive {
    border-color: rgba(77, 171, 154, 0.2);
    background: rgba(77, 171, 154, 0.08);
    color: #9fe4d8;
}

.public-profile-page .performance-badge.negative {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red-light);
}

.public-profile-page .share-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
}

.public-profile-page .profile-highlights {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-muted);
}

.public-profile-page .profile-highlights-label {
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.public-profile-page .profile-highlights-list {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 8px;
    min-width: 0;
}

.public-profile-page .profile-highlight {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

.public-profile-page .profile-highlight:not(:last-child)::after {
    content: '';
    width: 3px;
    height: 3px;
    margin-left: 8px;
    border-radius: 999px;
    background: var(--app-border-hover);
}

.public-profile-page .profile-highlight.badge-accent {
    color: #9fe4d8;
}

.public-profile-page .profile-highlight.badge-gold {
    color: #f3c76b;
}

.public-profile-page .app-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 15px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.public-profile-page .app-action-btn:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
}

.public-profile-page .app-action-btn-primary {
    border-color: rgba(77, 171, 154, 0.26);
    background: rgba(77, 171, 154, 0.1);
    color: #b7f5ec;
}

.public-profile-page .app-action-btn-primary:hover {
    border-color: rgba(77, 171, 154, 0.36);
    background: rgba(77, 171, 154, 0.15);
    color: #d7fff8;
}

.public-profile-page .public-share-btn.copied {
    border-color: var(--green-border);
    background: var(--green-bg);
    color: var(--green-light);
}

.public-profile-page .public-share-btn svg,
.public-profile-page .cta-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.public-profile-page .profile-metrics {
    margin-bottom: 14px;
    padding: 16px;
}

.public-profile-page .section-kicker {
    margin-bottom: 12px;
}

.public-profile-page .stats-grid,
.public-profile-page .detail-stats {
    display: grid;
    margin-bottom: 10px;
}

.public-profile-page .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
}

.public-profile-page .detail-stats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0;
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
}

.public-profile-page .stat-card,
.public-profile-page .detail-stat,
.public-profile-page .equity-section {
    box-shadow: none;
}

.public-profile-page .stat-card,
.public-profile-page .detail-stat {
    min-width: 0;
    padding: 14px;
    text-align: left;
}

.public-profile-page .stat-card,
.public-profile-page .detail-stat {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.public-profile-page .stat-card:not(:last-child),
.public-profile-page .detail-stat:not(:last-child) {
    border-right: 1px solid var(--app-border-muted);
}

.public-profile-page .stat-value,
.public-profile-page .detail-stat .value {
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum' 1;
}

.public-profile-page .stat-value {
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 23px;
    font-weight: 500;
    line-height: 1.05;
}

.public-profile-page .stat-value.highlight {
    color: #9fe4d8;
}

.public-profile-page .detail-stat .value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.1;
}

.public-profile-page .detail-stat .label {
    margin-top: 6px;
}

.public-profile-page .equity-section {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
}

.public-profile-page .equity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.public-profile-page .equity-status {
    font-size: 12px;
    font-weight: 700;
}

.public-profile-page .equity-status.is-positive,
.public-profile-page .value.is-positive {
    color: var(--green);
}

.public-profile-page .equity-status.is-negative,
.public-profile-page .value.is-negative {
    color: var(--red);
}

.public-profile-page .equity-chart {
    width: 100%;
    height: 78px;
}

.public-profile-page .equity-chart svg {
    display: block;
    width: 100%;
    height: 100%;
}

.public-profile-page .cta-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
}

.public-profile-page .cta-copy {
    display: grid;
    gap: 10px;
    max-width: 680px;
    min-width: 0;
}

.public-profile-page .cta-kicker {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.public-profile-page .cta-title {
    max-width: 660px;
    color: var(--text-primary);
    font-size: clamp(22px, 2.35vw, 30px);
    font-weight: 650;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.public-profile-page .cta-text {
    max-width: 640px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

.public-profile-page .cta-points {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 10px;
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
}

.public-profile-page .cta-points span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.public-profile-page .cta-points span:not(:last-child)::after {
    content: '';
    width: 3px;
    height: 3px;
    margin-left: 10px;
    border-radius: 999px;
    background: var(--app-border-hover);
}

.public-profile-page .cta-section .cta-button {
    flex: 0 0 auto;
    margin-bottom: 2px;
}

@media (max-width: 760px) {
    .public-profile-page .container {
        width: min(100% - 20px, 980px);
        padding: calc(14px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));
    }

    .public-profile-page .header {
        gap: 18px;
        padding: 20px 16px;
    }

    .public-profile-page .profile-topline {
        flex-direction: column;
        gap: 10px;
    }

    .public-profile-page .profile-status {
        margin-left: 68px;
    }

    .public-profile-page .performance-badge {
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        font-size: 12px;
    }

    .public-profile-page .performance-badge svg {
        width: 13px;
        height: 13px;
        flex-basis: 13px;
    }

    .public-profile-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-profile-page .detail-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .public-profile-page .stat-card:nth-child(2n),
    .public-profile-page .detail-stat:nth-child(3n) {
        border-right: 0;
    }

    .public-profile-page .stat-card:nth-child(n + 3),
    .public-profile-page .detail-stat:nth-child(n + 4) {
        border-top: 1px solid var(--app-border-muted);
    }

    .public-profile-page .profile-metrics,
    .public-profile-page .cta-section {
        padding: 16px;
    }

    .public-profile-page .cta-section {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .public-profile-page .cta-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .public-profile-page .profile-hero-main {
        gap: 12px;
    }

    .public-profile-page .display-name {
        font-size: clamp(30px, 12vw, 36px);
    }

    .public-profile-page .public-avatar {
        width: 52px;
        height: 52px;
    }

    .public-profile-page .profile-status {
        margin-left: 64px;
    }

    .public-profile-page .stats-grid,
    .public-profile-page .detail-stats {
        grid-template-columns: 1fr;
    }

    .public-profile-page .stat-card,
    .public-profile-page .detail-stat {
        border-right: 0;
    }

    .public-profile-page .stat-card:not(:first-child),
    .public-profile-page .detail-stat:not(:first-child) {
        border-top: 1px solid var(--app-border-muted);
    }

    .public-profile-page .public-share-btn,
    .public-profile-page .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Page: Bundle Template
   ============================================ */
.bundle-template-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0 28px calc(36px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    background: #050505;
    color: var(--text-secondary);
}

.bundle-template-page *,
.bundle-template-page *::before,
.bundle-template-page *::after {
    box-sizing: border-box;
}

.bundle-page {
    width: min(100%, 900px);
}

.bundle-shell {
    width: 100%;
}

.bundle-topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: calc(72px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    background: #050505;
}

.bundle-logo {
    display: block;
    width: 78px;
    height: auto;
}

.bundle-back {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(212, 212, 216, 0.52);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.18s ease;
}

.bundle-back:hover {
    color: var(--text-primary);
}

.bundle-back svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.bundle-hero {
    max-width: 690px;
    margin-top: clamp(38px, 5vw, 54px);
}

.bundle-kicker {
    display: block;
    margin-bottom: 13px;
    color: #5bc4b0;
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.bundle-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(40px, 5vw, 54px);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.052em;
}

.bundle-sub {
    max-width: 650px;
    margin: 15px 0 0;
    color: rgba(212, 212, 216, 0.58);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.bundle-status-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 26px 0 0;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.bundle-chip {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 0 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.075);
}

.bundle-chip:first-child {
    padding-left: 0;
    border-left: 0;
}

.bundle-chip:last-child {
    padding-right: 0;
}

.bundle-chip strong {
    color: rgba(161, 161, 170, 0.6);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.bundle-chip em {
    overflow-wrap: anywhere;
    color: rgba(245, 245, 245, 0.86);
    font-size: 13px;
    font-style: normal;
    font-weight: 690;
    line-height: 1.35;
}

.bundle-alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.bundle-alert.success {
    border: 1px solid rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.07);
    color: #9feadd;
}

.bundle-alert.error {
    border: 1px solid rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.07);
    color: #ff9d9d;
}

.bundle-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
    gap: 34px;
    align-items: center;
    margin-top: 22px;
    padding: clamp(24px, 3vw, 32px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: #0a0a0a;
}

.bundle-card-copy {
    min-width: 0;
}

.bundle-card-label {
    display: block;
    margin-bottom: 10px;
    color: #5bc4b0;
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 9px;
    line-height: 1;
    font-weight: 720;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bundle-card h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 740;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.bundle-card p {
    max-width: 620px;
    margin: 12px 0 0;
    color: rgba(212, 212, 216, 0.58);
    font-size: 14px;
    line-height: 1.6;
}

.bundle-card p:last-child {
    margin-bottom: 0;
}

.bundle-meta {
    margin-top: 18px !important;
    color: rgba(212, 212, 216, 0.4) !important;
    font-size: 12px !important;
    overflow-wrap: anywhere;
}

.bundle-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding-left: 34px;
    border-left: 1px solid rgba(255, 255, 255, 0.075);
}

.bundle-actions > * {
    width: 100%;
    min-width: 0;
}

.bundle-actions form {
    margin: 0;
}

.bundle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.01em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.bundle-btn.primary {
    border-color: #5bc4b0;
    background: #5bc4b0;
    color: #04100e;
}

.bundle-btn.primary:hover {
    border-color: rgba(91, 196, 176, 0.48);
    background: #67d6c2;
    color: #04100e;
}

.bundle-btn.secondary {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.018);
    color: rgba(245, 245, 245, 0.78);
}

.bundle-btn.secondary:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
}

.bundle-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bundle-btn svg,
.bundle-dashboard-link svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.bundle-dashboard-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(212, 212, 216, 0.5);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.bundle-dashboard-link:hover,
.bundle-dashboard-link:focus-visible {
    color: var(--text-primary);
}

@media (max-width: 700px) {
    .bundle-template-page {
        align-items: flex-start;
        padding: 0 16px calc(24px + env(safe-area-inset-bottom));
    }

    .bundle-page {
        width: 100%;
    }

    .bundle-topbar {
        min-height: calc(58px + env(safe-area-inset-top));
    }

    .bundle-logo {
        width: 70px;
    }

    .bundle-back {
        font-size: 12px;
    }

    .bundle-hero {
        margin-top: 32px;
    }

    .bundle-title {
        font-size: clamp(34px, 10.5vw, 44px);
    }

    .bundle-sub {
        font-size: 14px;
        line-height: 1.6;
    }

    .bundle-card {
        grid-template-columns: 1fr;
    }

    .bundle-chip {
        padding: 0 10px;
    }

    .bundle-chip:first-child {
        padding-left: 0;
    }

    .bundle-card {
        gap: 22px;
        margin-top: 18px;
        padding: 22px;
    }

    .bundle-actions {
        padding: 20px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.075);
        border-left: 0;
    }
}

/* ============================================
   Page: Demo Hub
   ============================================ */
.page-demo {
    margin: 0;
    padding: calc(24px + env(safe-area-inset-top)) 20px calc(34px + env(safe-area-inset-bottom));
    background: var(--app-bg-page);
}

.page-demo *,
.page-demo *::before,
.page-demo *::after {
    box-sizing: border-box;
}

.page-demo h1,
.page-demo h2,
.page-demo h3,
.page-demo p {
    margin: 0;
}

.page-demo .demo-container {
    width: min(100%, 1120px);
    max-width: none;
    margin: 0 auto;
}

.page-demo .demo-header {
    margin-bottom: 12px;
    padding: 24px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
}

.page-demo .demo-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.page-demo .demo-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.page-demo .demo-logo img {
    flex: 0 0 auto;
    width: 112px;
    height: auto;
    border-radius: 0;
}

.page-demo .demo-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.page-demo .demo-header-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 700px;
    text-align: left;
}

.page-demo .demo-badge,
.page-demo .demo-card-kicker,
.page-demo .demo-card-kicker--soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-muted);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-demo .demo-badge {
    gap: 7px;
    margin-bottom: 16px;
}

.page-demo .demo-badge svg,
.page-demo .demo-nav-link svg,
.page-demo .data-note svg,
.page-demo .page-btn svg {
    width: 16px;
    height: 16px;
}

.page-demo .demo-card-icon svg {
    width: 22px;
    height: 22px;
}

.page-demo .demo-card-cta svg {
    width: 14px;
    height: 14px;
}

.page-demo .demo-header h1 {
    max-width: 680px;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 620;
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.page-demo .demo-header p {
    max-width: 640px;
    margin: 14px 0 0;
    color: var(--text-tertiary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.page-demo .demo-proof-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.page-demo .demo-proof-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--app-border-muted);
    border-radius: 999px;
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
}

.page-demo .demo-nav-link,
.page-demo .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border-radius: var(--app-radius-control);
    text-decoration: none;
    box-shadow: none;
    transform: none;
    font-size: 13px;
    font-weight: 650;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.page-demo .demo-nav-link.primary,
.page-demo .page-btn-primary {
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
}

.page-demo .demo-nav-link.primary:hover,
.page-demo .page-btn-primary:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

.page-demo .demo-nav-link.secondary,
.page-demo .page-btn-ghost {
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
}

.page-demo .demo-nav-link.secondary:hover,
.page-demo .page-btn-ghost:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
    transform: none;
}

.page-demo .data-note {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    min-height: 44px;
    margin-bottom: 14px;
    padding: 0 14px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-section);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.page-demo .demo-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 0 0 16px;
}

.page-demo .demo-section {
    display: grid;
    grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
    gap: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--app-border-muted);
}

.page-demo .demo-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.page-demo .demo-section-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding-top: 4px;
}

.page-demo .demo-section-heading span {
    color: var(--text-muted);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-demo .demo-section-heading h2 {
    max-width: 310px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.page-demo .demo-section-heading p {
    max-width: 300px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
}

.page-demo .demo-feature-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 10px;
    min-width: 0;
}

.page-demo .demo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.page-demo .demo-card,
.page-demo .demo-card--featured {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
    color: inherit;
    text-decoration: none;
    box-shadow: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.page-demo .demo-card--featured {
    min-height: 270px;
    background: var(--app-surface-section);
}

.page-demo .demo-card::before {
    display: none;
}

.page-demo .demo-card:hover,
.page-demo .demo-card--featured:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-card-hover);
    box-shadow: none;
    transform: none;
}

.page-demo .demo-card-kicker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.page-demo .demo-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: var(--app-radius-control);
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-card);
    color: var(--text-tertiary);
    box-shadow: none;
}

.page-demo .demo-card-title {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 650;
}

.page-demo .demo-card--featured .demo-card-title {
    max-width: 520px;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.page-demo .demo-card-desc {
    min-height: 0;
    margin-bottom: 16px;
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 1.58;
}

.page-demo .demo-card--featured .demo-card-desc {
    max-width: 570px;
    font-size: 15px;
}

.page-demo .demo-card-preview,
.page-demo .demo-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.page-demo .demo-card-preview-chip,
.page-demo .demo-card-meta-chip {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
}

.page-demo .demo-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--app-border-muted);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
}

.page-demo .demo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
    text-align: left;
}

.page-demo .demo-footer p {
    max-width: 560px;
    margin: 0;
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 1.6;
}

.page-demo .demo-footer-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 1120px) {
    .page-demo .demo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-demo .demo-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .page-demo .demo-section-heading {
        max-width: 640px;
        padding-top: 0;
    }

    .page-demo .demo-section-heading h2,
    .page-demo .demo-section-heading p {
        max-width: none;
    }

    .page-demo .demo-feature-row {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-card--featured {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .page-demo {
        padding: calc(14px + env(safe-area-inset-top)) 10px calc(20px + env(safe-area-inset-bottom));
    }

    .page-demo .demo-header {
        padding: 20px 16px;
    }

    .page-demo .demo-nav {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .page-demo .demo-logo {
        justify-content: flex-start;
    }

    .page-demo .demo-logo img {
        width: 104px;
    }

    .page-demo .demo-nav-actions {
        justify-content: flex-start;
    }

    .page-demo .demo-nav-link {
        flex: 1 1 auto;
    }

    .page-demo .demo-header h1 {
        font-size: clamp(30px, 10vw, 40px);
    }

    .page-demo .demo-header p {
        font-size: 14px;
    }

    .page-demo .data-note {
        align-items: flex-start;
        min-height: 0;
        padding: 12px;
        line-height: 1.45;
    }

    .page-demo .demo-sections {
        gap: 26px;
    }

    .page-demo .demo-section {
        padding-top: 16px;
    }

    .page-demo .demo-section-heading h2 {
        font-size: 17px;
    }

    .page-demo .demo-grid {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-card {
        padding: 16px;
    }

    .page-demo .demo-card--featured .demo-card-title {
        font-size: 21px;
    }

    .page-demo .demo-footer {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .page-demo .demo-footer-actions,
    .page-demo .page-btn {
        width: 100%;
    }

    .page-demo .demo-footer-actions {
        flex-direction: column;
    }
}

/* Demo hub app-style correction */
.page-demo {
    padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}

.page-demo .demo-container {
    width: min(100%, 1180px);
}

.page-demo .demo-header {
    padding: 20px 22px 22px;
    margin-bottom: 10px;
    border-radius: var(--app-radius-section);
}

.page-demo .demo-nav {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--app-border-muted);
}

.page-demo .demo-logo img {
    width: 88px;
}

.page-demo .demo-header-copy {
    max-width: 760px;
}

.page-demo .demo-badge {
    min-height: 24px;
    margin-bottom: 14px;
    padding: 0 9px;
    background: transparent;
    font-size: 9px;
}

.page-demo .demo-header h1 {
    max-width: 720px;
    font-size: clamp(32px, 3.4vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.page-demo .demo-header p {
    max-width: 720px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.58;
}

.page-demo .demo-nav-link,
.page-demo .page-btn,
.page-demo .demo-nav-link.primary,
.page-demo .page-btn-primary {
    min-height: 40px;
    border: 1px solid var(--app-border-muted);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-secondary);
}

.page-demo .demo-nav-link:hover,
.page-demo .page-btn:hover,
.page-demo .demo-nav-link.primary:hover,
.page-demo .page-btn-primary:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
}

.page-demo .demo-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 46px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-section);
}

.page-demo .demo-status-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 650;
}

.page-demo .demo-status-main span:not(.demo-status-kicker) {
    color: var(--text-tertiary);
    font-weight: 600;
}

.page-demo .demo-status-kicker {
    color: var(--text-muted);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-demo .demo-status-note {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 550;
}

.page-demo .data-note,
.page-demo .demo-proof-row {
    display: none;
}

.page-demo .demo-sections {
    gap: 12px;
    margin-bottom: 12px;
}

.page-demo .demo-section {
    display: block;
    padding: 18px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
}

.page-demo .demo-section:first-child {
    border-top: 1px solid var(--app-border-muted);
}

.page-demo .demo-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
    gap: 18px;
    margin-bottom: 14px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--app-border-muted);
}

.page-demo .demo-section-heading span {
    grid-column: 1 / -1;
    margin-bottom: -4px;
}

.page-demo .demo-section-heading h2 {
    max-width: none;
    font-size: 18px;
    line-height: 1.2;
}

.page-demo .demo-section-heading p {
    max-width: none;
    align-self: end;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.5;
}

.page-demo .demo-feature-stack,
.page-demo .demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.page-demo .demo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-demo .demo-card,
.page-demo .demo-card--featured {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.page-demo .demo-card--featured {
    background: var(--app-surface-card);
}

.page-demo .demo-card:hover,
.page-demo .demo-card--featured:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-card-hover);
}

.page-demo .demo-card-icon {
    grid-row: span 3;
    width: 38px;
    height: 38px;
    margin: 0;
    background: transparent;
}

.page-demo .demo-card-icon svg {
    width: 18px;
    height: 18px;
}

.page-demo .demo-card-title,
.page-demo .demo-card--featured .demo-card-title {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.page-demo .demo-card-desc,
.page-demo .demo-card--featured .demo-card-desc {
    max-width: none;
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.52;
}

.page-demo .demo-card-copy {
    min-width: 0;
}

.page-demo .demo-card-meta,
.page-demo .demo-card-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.page-demo .demo-card-meta span,
.page-demo .demo-card-preview-chip,
.page-demo .demo-card-meta-chip {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 650;
}

.page-demo .demo-card-meta span + span::before {
    content: '/';
    margin-right: 8px;
    color: var(--text-muted);
    opacity: 0.55;
}

.page-demo .demo-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-top: 2px;
    padding: 0;
    border: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
}

.page-demo .demo-footer {
    padding: 14px 18px;
    border-radius: var(--app-radius-control);
}

@media (max-width: 900px) {
    .page-demo .demo-section-heading,
    .page-demo .demo-feature-stack,
    .page-demo .demo-grid {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-status-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-demo .demo-status-note {
        flex: 1 1 auto;
    }
}

@media (max-width: 640px) {
    .page-demo {
        padding: calc(12px + env(safe-area-inset-top)) 10px calc(18px + env(safe-area-inset-bottom));
    }

    .page-demo .demo-header,
    .page-demo .demo-section {
        padding: 14px;
    }

    .page-demo .demo-nav {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .page-demo .demo-header h1 {
        font-size: clamp(30px, 9vw, 36px);
    }

    .page-demo .demo-card {
        padding: 12px;
    }

    .page-demo .demo-footer-actions,
    .page-demo .page-btn {
        width: 100%;
    }
}

/* Demo hub: product command center */
.page-demo {
    padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}

.page-demo .demo-container {
    width: min(100%, 1200px);
}

.page-demo .demo-command-center {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-color: var(--app-border-soft);
    background: var(--app-surface-section);
    box-shadow: inset 0 1px 0 rgba(var(--app-white-rgb), 0.035);
}

.page-demo .demo-command-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    width: 152px;
    height: 2px;
    background: var(--accent);
    opacity: 0.9;
}

.page-demo .demo-nav {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-border-muted);
}

.page-demo .demo-nav-link,
.page-demo .page-btn {
    min-height: 40px;
    border-radius: var(--app-radius-control);
}

.page-demo .demo-nav-link.primary,
.page-demo .page-btn-primary {
    border-color: rgba(77, 171, 154, 0.38);
    background: rgba(77, 171, 154, 0.1);
    color: #bff5ea;
}

.page-demo .demo-nav-link.primary:hover,
.page-demo .page-btn-primary:hover {
    border-color: rgba(91, 196, 176, 0.52);
    background: rgba(77, 171, 154, 0.14);
    color: #d9fff8;
}

.page-demo .demo-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1fr);
    gap: 24px;
    align-items: stretch;
}

.page-demo .demo-header-copy {
    max-width: none;
    min-height: 410px;
    justify-content: space-between;
    padding: 6px 0 2px;
}

.page-demo .demo-header-copy h1 {
    max-width: 560px;
    color: var(--text-primary);
    font-size: 50px;
    font-weight: 660;
    line-height: 0.96;
    letter-spacing: 0;
}

.page-demo .demo-header-copy p {
    max-width: 520px;
    margin: 16px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 520;
    line-height: 1.56;
}

.page-demo .demo-badge {
    margin-bottom: 22px;
    border-color: rgba(77, 171, 154, 0.24);
    background: rgba(77, 171, 154, 0.055);
    color: #9fe4d8;
}

.page-demo .demo-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.page-demo .demo-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.page-demo .demo-action svg {
    width: 15px;
    height: 15px;
}

.page-demo .demo-action-primary {
    border-color: rgba(77, 171, 154, 0.38);
    background: rgba(77, 171, 154, 0.1);
    color: #c9fbf2;
}

.page-demo .demo-action-secondary {
    background: rgba(var(--app-white-rgb), 0.018);
}

.page-demo .demo-action:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-control);
    color: var(--text-primary);
}

.page-demo .demo-action-primary:hover {
    border-color: rgba(91, 196, 176, 0.55);
    background: rgba(77, 171, 154, 0.14);
    color: #e7fffb;
}

.page-demo .demo-proof-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 28px;
}

.page-demo .demo-proof-strip span {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--app-border-muted);
    border-radius: 999px;
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 650;
}

.page-demo .demo-proof-strip strong {
    color: var(--text-primary);
    font-weight: 760;
}

.page-demo .demo-preview-kicker,
.page-demo .demo-section-kicker,
.page-demo .demo-route-number {
    color: var(--text-muted);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-demo .demo-status-bar {
    margin: 12px 0;
    border-color: var(--app-border-soft);
    background: var(--app-surface-section-alt);
}

.page-demo .demo-workflow-shell {
    margin-bottom: 12px;
    padding: 18px;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
}

.page-demo .demo-workflow-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.6fr);
    gap: 22px;
    align-items: end;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--app-border-muted);
}

.page-demo .demo-workflow-intro h2 {
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
}

.page-demo .demo-workflow-intro p {
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 520;
    line-height: 1.55;
}

.page-demo .demo-route-list {
    display: grid;
    gap: 8px;
}

.page-demo .demo-route {
    display: grid;
    grid-template-columns: 44px 42px minmax(0, 1fr) minmax(96px, auto) 28px;
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 12px;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-card);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.page-demo .demo-route:hover {
    border-color: var(--app-border-hover);
    background: var(--app-surface-card-hover);
}

.page-demo .demo-route-featured {
    border-color: rgba(77, 171, 154, 0.28);
    background: rgba(77, 171, 154, 0.045);
}

.page-demo .demo-route-featured:hover {
    border-color: rgba(91, 196, 176, 0.46);
    background: rgba(77, 171, 154, 0.07);
}

.page-demo .demo-route-icon,
.page-demo .demo-route-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: rgba(var(--app-white-rgb), 0.018);
    color: var(--text-tertiary);
}

.page-demo .demo-route-icon {
    width: 42px;
    height: 42px;
}

.page-demo .demo-route-icon svg {
    width: 18px;
    height: 18px;
}

.page-demo .demo-route-arrow {
    width: 28px;
    height: 28px;
}

.page-demo .demo-route-arrow svg {
    width: 14px;
    height: 14px;
}

.page-demo .demo-route-copy {
    min-width: 0;
}

.page-demo .demo-route-copy strong {
    display: block;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 720;
    line-height: 1.25;
}

.page-demo .demo-route-copy small {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 520;
    line-height: 1.42;
}

.page-demo .demo-route-meta {
    justify-self: end;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.page-demo .demo-footer {
    border-color: var(--app-border-soft);
    border-radius: var(--app-radius-section);
}

@media (max-width: 980px) {
    .page-demo .demo-hero-grid,
    .page-demo .demo-workflow-intro {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-header-copy,
    .page-demo .demo-screen-panel {
        min-height: 0;
    }

    .page-demo .demo-header-copy h1 {
        max-width: 760px;
        font-size: 44px;
    }

    .page-demo .demo-proof-strip {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .page-demo .demo-route {
        grid-template-columns: 38px minmax(0, 1fr) 28px;
        gap: 10px;
    }

    .page-demo .demo-route-number,
    .page-demo .demo-route-meta {
        display: none;
    }

}

@media (max-width: 640px) {
    .page-demo {
        padding: calc(12px + env(safe-area-inset-top)) 10px calc(18px + env(safe-area-inset-bottom));
    }

    .page-demo .demo-command-center,
    .page-demo .demo-workflow-shell {
        padding: 14px;
    }

    .page-demo .demo-nav {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .page-demo .demo-nav-actions {
        width: 100%;
    }

    .page-demo .demo-nav-link {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 10px;
    }

    .page-demo .demo-header-copy h1 {
        font-size: 34px;
        line-height: 1;
    }

    .page-demo .demo-header-copy p {
        font-size: 14px;
    }

    .page-demo .demo-hero-actions,
    .page-demo .demo-action {
        width: 100%;
    }

    .page-demo .demo-workflow-intro h2 {
        font-size: 22px;
    }

    .page-demo .demo-route {
        min-height: 72px;
        padding: 10px;
    }
}

/* Demo hub: real product screen */
.page-demo .demo-hero-grid {
    grid-template-columns: minmax(330px, 0.62fr) minmax(0, 1.38fr);
    gap: 22px;
}

.page-demo .demo-header-copy {
    min-height: 440px;
}

.page-demo .demo-header-copy h1 {
    max-width: 460px;
    font-size: 48px;
}

.page-demo .demo-header-copy p {
    max-width: 450px;
}

.page-demo .demo-screen-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 440px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--app-border-default);
    border-radius: var(--app-radius-section);
    background: #0b0b0b;
    box-shadow:
        inset 0 1px 0 rgba(var(--app-white-rgb), 0.04),
        0 18px 36px rgba(0, 0, 0, 0.22);
}

.page-demo .demo-screen-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--app-border-muted);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-demo .demo-screen-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.page-demo .demo-screen-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(77, 171, 154, 0.08);
}

.page-demo .demo-screen-media {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #080808;
}

.page-demo .demo-screen-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
    object-position: 50% 0;
}

.page-demo .demo-screen-caption {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--app-border-muted);
}

.page-demo .demo-screen-caption span {
    min-width: 0;
    padding: 13px 14px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.page-demo .demo-screen-caption span:not(:last-child) {
    border-right: 1px solid var(--app-border-muted);
}

@media (max-width: 980px) {
    .page-demo .demo-hero-grid {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-header-copy,
    .page-demo .demo-screen-panel {
        min-height: 0;
    }

    .page-demo .demo-header-copy h1 {
        max-width: 760px;
        font-size: 44px;
    }

    .page-demo .demo-header-copy p {
        max-width: 660px;
    }
}

@media (max-width: 640px) {
    .page-demo .demo-screen-panel {
        border-radius: var(--app-radius-control);
    }

    .page-demo .demo-screen-media img {
        min-height: 220px;
        object-position: 38% 0;
    }

    .page-demo .demo-screen-caption {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-screen-caption span:not(:last-child) {
        border-right: 0;
        border-bottom: 1px solid var(--app-border-muted);
    }
}

/* Demo hub: product-grade refresh */
.page-demo {
    --demo-line: rgba(255, 255, 255, 0.14);
    --demo-line-soft: rgba(255, 255, 255, 0.07);
    --demo-bg: #050505;
    --demo-panel: #0b0b0b;
    --demo-panel-soft: #080808;
    margin: 0;
    padding: 0 24px calc(36px + env(safe-area-inset-bottom));
    background: var(--demo-bg);
    color: #f5f5f5;
}

.page-demo .demo-container {
    width: min(1380px, 100%);
    margin: 0 auto;
}

.page-demo .demo-command-center {
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.page-demo .demo-command-center::before {
    display: none;
}

.page-demo .demo-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--demo-line);
}

.page-demo .demo-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: rgba(245, 245, 245, 0.54);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

.page-demo .demo-logo img {
    display: block;
    width: 66px;
    height: auto;
    max-height: 20px;
    object-fit: contain;
}

.page-demo .demo-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-demo .demo-nav-link,
.page-demo .page-btn,
.page-demo .demo-action {
    min-height: 44px;
    padding: 0 15px;
    border-radius: 8px;
    border: 1px solid var(--demo-line-soft);
    background: rgba(255, 255, 255, 0.018);
    color: rgba(245, 245, 245, 0.72);
    box-shadow: none;
    transform: none;
    font-size: 13px;
    font-weight: 700;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.page-demo .demo-nav-link.primary,
.page-demo .page-btn-primary,
.page-demo .demo-action-primary {
    border-color: rgba(77, 171, 154, 0.34);
    background: rgba(77, 171, 154, 0.12);
    color: #c9fbf2;
}

.page-demo .demo-nav-link:hover,
.page-demo .page-btn:hover,
.page-demo .demo-action:hover {
    border-color: var(--demo-line);
    background: rgba(255, 255, 255, 0.045);
    color: #f5f5f5;
    box-shadow: none;
    transform: none;
}

.page-demo .demo-nav-link.primary:hover,
.page-demo .page-btn-primary:hover,
.page-demo .demo-action-primary:hover {
    border-color: rgba(91, 196, 176, 0.54);
    background: rgba(77, 171, 154, 0.17);
    color: #e7fffb;
}

.page-demo .demo-hero-grid {
    display: block;
    padding: 74px 0 54px;
}

.page-demo .demo-header-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

.page-demo .demo-badge,
.page-demo .demo-preview-kicker,
.page-demo .demo-section-kicker,
.page-demo .demo-route-number {
    color: #5bc4b0;
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.page-demo .demo-badge {
    gap: 8px;
    min-height: 28px;
    margin: 0 0 18px;
    padding: 0 10px;
    border: 1px solid rgba(77, 171, 154, 0.28);
    border-radius: 999px;
    background: rgba(77, 171, 154, 0.08);
}

.page-demo .demo-header-copy h1 {
    max-width: 860px;
    color: #f5f5f5;
    font-size: clamp(48px, 5.2vw, 76px);
    font-weight: 760;
    line-height: 0.92;
    letter-spacing: -0.052em;
}

.page-demo .demo-header-copy p {
    max-width: 650px;
    margin: 18px 0 0;
    color: rgba(245, 245, 245, 0.58);
    font-size: 17px;
    font-weight: 520;
    line-height: 1.55;
}

.page-demo .demo-header-copy .demo-hero-answer strong {
    color: #f5f5f5;
}

.page-demo .demo-header-copy .demo-hero-answer strong:first-child {
    color: #5bc4b0;
}

.page-demo .demo-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.page-demo .demo-action svg,
.page-demo .demo-nav-link svg,
.page-demo .page-btn svg {
    width: 14px;
    height: 14px;
}

.page-demo .demo-proof-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 28px 0 0;
    padding: 0;
}

.page-demo .demo-proof-strip span {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--demo-line-soft);
    border-radius: 999px;
    background: transparent;
    color: rgba(245, 245, 245, 0.42);
    font-size: 12px;
    font-weight: 650;
}

.page-demo .demo-proof-strip strong {
    color: rgba(245, 245, 245, 0.88);
}

.page-demo .demo-screen-panel {
    display: none;
}

.page-demo .demo-screen-topbar {
    display: none;
}

.page-demo .demo-screen-live {
    display: none;
}

.page-demo .demo-screen-media {
    position: relative;
    overflow: hidden;
    background: #080808;
}

.page-demo .demo-screen-media::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0) 58%, rgba(5, 5, 5, 0.72) 100%),
        linear-gradient(90deg, rgba(5, 5, 5, 0.48) 0%, rgba(5, 5, 5, 0) 14%, rgba(5, 5, 5, 0) 76%, rgba(5, 5, 5, 0.62) 100%);
}

.page-demo .demo-screen-media img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 420px;
    opacity: 0.82;
}

.page-demo .demo-screen-caption {
    display: none;
}

.page-demo .demo-screen-caption span {
    padding: 14px;
    color: rgba(245, 245, 245, 0.62);
    font-size: 12px;
}

.page-demo .demo-screen-caption span:not(:last-child) {
    border-right: 1px solid var(--demo-line-soft);
}

.page-demo .demo-status-bar {
    display: none;
}

.page-demo .demo-workflow-shell {
    display: block;
    overflow: visible;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.page-demo .demo-workflow-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin: 0;
    padding: 0 0 18px;
    border: 0;
    border-bottom: 1px solid var(--demo-line);
    background: transparent;
}

.page-demo .demo-workflow-intro h2 {
    max-width: 760px;
    margin: 10px 0 0;
    color: #f5f5f5;
    font-size: 34px;
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.052em;
}

.page-demo .demo-workflow-intro p {
    max-width: 560px;
    margin: 0;
    color: rgba(245, 245, 245, 0.52);
    font-size: 14px;
    font-weight: 520;
    line-height: 1.58;
}

.page-demo .demo-route-list {
    display: grid;
    gap: 0;
    min-width: 0;
}

.page-demo .demo-route {
    display: grid;
    grid-template-columns: 32px 40px minmax(0, 1fr) minmax(92px, 128px) 30px;
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid var(--demo-line-soft);
    border-radius: 0;
    background: transparent;
}

.page-demo .demo-route:last-child {
    border-bottom: 0;
}

.page-demo .demo-route:hover,
.page-demo .demo-route-featured:hover {
    background: transparent;
    border-color: var(--demo-line-soft);
}

.page-demo .demo-route-featured {
    border-color: var(--demo-line-soft);
    background: transparent;
}

.page-demo .demo-route-icon,
.page-demo .demo-route-arrow {
    border: 1px solid var(--demo-line-soft);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
    color: rgba(245, 245, 245, 0.48);
}

.page-demo .demo-route-icon {
    width: 40px;
    height: 40px;
}

.page-demo .demo-route-icon svg {
    width: 17px;
    height: 17px;
}

.page-demo .demo-route-arrow {
    width: 30px;
    height: 30px;
}

.page-demo .demo-route-copy strong {
    color: #f5f5f5;
    font-size: 15px;
    font-weight: 720;
    line-height: 1.24;
}

.page-demo .demo-route-copy small {
    max-width: 600px;
    margin-top: 4px;
    color: rgba(245, 245, 245, 0.48);
    font-size: 13px;
    font-weight: 520;
    line-height: 1.42;
}

.page-demo .demo-route-meta {
    justify-self: end;
    color: rgba(245, 245, 245, 0.36);
    font-size: 12px;
    font-weight: 700;
}

.page-demo .demo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0 0;
    border: 0;
    border-top: 1px solid var(--demo-line-soft);
    border-radius: 0;
    background: transparent;
}

.page-demo .demo-footer p {
    max-width: 620px;
    color: rgba(245, 245, 245, 0.48);
    font-size: 14px;
    line-height: 1.55;
}

.page-demo .demo-footer-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

@media (max-width: 1180px) {
    .page-demo {
        padding-right: 18px;
        padding-left: 18px;
    }

    .page-demo .demo-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 42px 0 28px;
    }

    .page-demo .demo-header-copy {
        max-width: 760px;
    }

    .page-demo .demo-header-copy h1,
    .page-demo .demo-header-copy p {
        max-width: 720px;
    }

    .page-demo .demo-screen-panel {
        min-height: 0;
    }

    .page-demo .demo-screen-media img {
        min-height: 360px;
    }

    .page-demo .demo-workflow-shell {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-workflow-intro {
        border-right: 0;
        border-bottom: 1px solid var(--demo-line-soft);
    }

    .page-demo .demo-workflow-intro h2,
    .page-demo .demo-workflow-intro p {
        max-width: 720px;
    }
}

@media (max-width: 760px) {
    .page-demo {
        padding-right: 14px;
        padding-left: 14px;
    }

    .page-demo .demo-nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 62px;
        margin: 0;
        gap: 12px;
    }

    .page-demo .demo-logo span,
    .page-demo .demo-nav-link.secondary {
        display: none;
    }

    .page-demo .demo-nav-actions {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .page-demo .demo-nav-link.primary {
        flex: 0 0 auto;
        width: auto;
        min-height: 44px;
        padding: 0 12px;
        font-size: 12.5px;
    }

    .page-demo .demo-hero-grid {
        gap: 20px;
        padding: 34px 0 22px;
    }

    .page-demo .demo-header-copy h1 {
        font-size: clamp(42px, 11.2vw, 54px);
        line-height: 0.94;
    }

    .page-demo .demo-header-copy p {
        font-size: 15px;
        line-height: 1.5;
    }

    .page-demo .demo-hero-actions,
    .page-demo .demo-action {
        width: 100%;
    }

    .page-demo .demo-proof-strip {
        margin-top: 20px;
    }

    .page-demo .demo-screen-panel {
        border-radius: 10px;
    }

    .page-demo .demo-screen-topbar {
        font-size: 10px;
    }

    .page-demo .demo-screen-media img {
        min-height: 228px;
        object-position: 43% 0;
    }

    .page-demo .demo-screen-caption {
        display: none;
    }

    .page-demo .demo-workflow-shell {
        margin-top: 18px;
        border-radius: 10px;
    }

    .page-demo .demo-workflow-intro {
        display: block;
        padding: 18px;
    }

    .page-demo .demo-workflow-intro h2 {
        max-width: none;
        font-size: 30px;
    }

    .page-demo .demo-workflow-intro p {
        max-width: none;
        margin-top: 12px;
    }

    .page-demo .demo-route {
        grid-template-columns: 40px minmax(0, 1fr) 30px;
        gap: 12px;
        min-height: 84px;
        padding: 14px;
    }

    .page-demo .demo-route-number,
    .page-demo .demo-route-meta {
        display: none;
    }

    .page-demo .demo-route-copy small {
        font-size: 12.5px;
        line-height: 1.38;
    }

    .page-demo .demo-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .page-demo .demo-footer-actions {
        flex-direction: column;
        width: 100%;
    }

    .page-demo .page-btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .page-demo .demo-header-copy h1 {
        font-size: clamp(38px, 10.8vw, 46px);
    }

    .page-demo .demo-route {
        padding: 13px;
    }
}

/* Demo hub: align the standalone product preview with the public ecosystem shell. */
.page-demo.public-ecosystem-page {
    margin: 0;
    padding: 0;
    background: var(--demo-bg);
}

.page-demo.public-ecosystem-page .demo-container {
    width: min(1240px, calc(100% - 56px));
    margin-inline: auto;
    padding-top: 88px;
}

.page-demo.public-ecosystem-page .demo-hero-grid {
    padding: 62px 0 56px;
}

.page-demo.public-ecosystem-page .demo-header-copy {
    max-width: 1120px;
}

.page-demo.public-ecosystem-page .demo-header-copy h1 {
    max-width: 1120px;
    font-size: clamp(54px, 4.4vw, 68px);
    line-height: 0.96;
}

.page-demo.public-ecosystem-page .demo-workflow-intro {
    align-items: center;
    padding-bottom: 24px;
}

.page-demo.public-ecosystem-page .demo-workflow-intro h2 {
    font-size: clamp(32px, 3vw, 42px);
}

.page-demo.public-ecosystem-page .demo-route {
    grid-template-columns: 36px 44px minmax(0, 1fr) minmax(110px, 148px) 32px;
    min-height: 92px;
    padding: 17px 0;
}

.page-demo.public-ecosystem-page .demo-route-icon {
    width: 44px;
    height: 44px;
}

.page-demo.public-ecosystem-page .demo-route-copy strong {
    font-size: 17px;
}

.page-demo.public-ecosystem-page .demo-route-copy small {
    max-width: 660px;
    color: rgba(245, 245, 245, 0.58);
    font-size: 14px;
    line-height: 1.48;
}

.page-demo.public-ecosystem-page .demo-route-meta {
    color: rgba(245, 245, 245, 0.46);
    font-size: 12.5px;
}

.page-demo.public-ecosystem-page .demo-final-cta {
    max-width: 680px;
    margin: 80px auto 0;
    padding: 46px 24px 0;
    border-top: 1px solid var(--demo-line);
    text-align: center;
}

.page-demo.public-ecosystem-page .demo-final-cta h2 {
    margin: 10px 0 0;
    color: #f5f5f5;
    font-size: 32px;
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.page-demo.public-ecosystem-page .demo-final-cta p {
    max-width: 540px;
    margin: 14px auto 0;
    color: rgba(245, 245, 245, 0.58);
    font-size: 15px;
    line-height: 1.6;
}

.page-demo.public-ecosystem-page .demo-final-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 26px;
}

.page-demo.public-ecosystem-page .demo-final-cta-link {
    color: rgba(245, 245, 245, 0.62);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.page-demo.public-ecosystem-page .demo-public-footer {
    margin-top: clamp(72px, 7vw, 96px);
}

.page-demo.public-ecosystem-page .demo-public-footer .lz-footer-main {
    padding-top: clamp(48px, 4vw, 60px);
}

@media (max-width: 860px) {
    .page-demo.public-ecosystem-page .demo-container {
        width: calc(100% - 40px);
        padding-top: 88px;
    }

    .page-demo.public-ecosystem-page .demo-hero-grid {
        padding: 44px 0 38px;
    }

    .page-demo.public-ecosystem-page .demo-header-copy h1 {
        font-size: clamp(42px, 8.5vw, 58px);
    }

    .page-demo.public-ecosystem-page .demo-workflow-intro {
        align-items: start;
    }
}

@media (max-width: 760px) {
    .page-demo.public-ecosystem-page .demo-hero-grid {
        padding: 38px 0 34px;
    }

    .page-demo.public-ecosystem-page .demo-title-break {
        display: none;
    }

    .page-demo.public-ecosystem-page .demo-header-copy h1 {
        font-size: clamp(38px, 10vw, 44px);
        line-height: 0.98;
    }

    .page-demo.public-ecosystem-page .demo-workflow-intro {
        padding: 0 0 20px;
    }

    .page-demo.public-ecosystem-page .demo-workflow-intro h2 {
        font-size: 30px;
    }

    .page-demo.public-ecosystem-page .demo-workflow-intro p {
        font-size: 14px;
    }

    .page-demo.public-ecosystem-page .demo-route {
        grid-template-columns: 44px minmax(0, 1fr) 32px;
        gap: 14px;
        min-height: 96px;
        padding: 18px 0;
    }

    .page-demo.public-ecosystem-page .demo-route-copy strong {
        font-size: 16px;
    }

    .page-demo.public-ecosystem-page .demo-route-copy small {
        font-size: 14px;
        line-height: 1.46;
    }

    .page-demo.public-ecosystem-page .demo-final-cta {
        margin-top: 64px;
        padding: 40px 0 0;
    }

    .page-demo.public-ecosystem-page .demo-final-cta h2 {
        font-size: 30px;
    }

    .page-demo.public-ecosystem-page .demo-final-cta-actions,
    .page-demo.public-ecosystem-page .demo-final-cta-actions .demo-action {
        width: 100%;
    }

    .page-demo.public-ecosystem-page .demo-final-cta-actions {
        flex-direction: column;
        gap: 16px;
    }

    .page-demo.public-ecosystem-page .demo-public-footer {
        margin-top: 64px;
    }
}

@media (max-width: 430px) {
    .page-demo.public-ecosystem-page .demo-container {
        width: calc(100% - 40px);
    }

    .page-demo.public-ecosystem-page .demo-header-copy h1 {
        font-size: clamp(36px, 9.8vw, 42px);
    }
}
