.demo-nav {
    position: sticky;
    top: 0;
    z-index: 960;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px;
    padding: 0 20px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--llh-line);
}

[data-llh-theme="dark"] .demo-nav {
    background: rgba(22, 28, 36, .88);
}

.demo-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--llh-ink);
    text-decoration: none;
}

.demo-nav__logo {
    display: block;
    height: 26px;
    width: auto;
    padding: 3px 7px;
    border: 1px solid var(--llh-line);
    border-radius: 8px;
    background: #fff;
}

.demo-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.demo-nav__link {
    padding: 7px 11px;
    border-radius: 8px;
    color: var(--llh-ink-2);
    font-size: 13.5px;
    text-decoration: none;
    white-space: nowrap;
}

.demo-nav__link:hover {
    background: rgba(16, 24, 40, .05);
    color: var(--llh-ink);
}

.demo-nav__link.is-active {
    background: var(--llh-primary-soft);
    color: var(--llh-primary);
    font-weight: 600;
}

.demo-nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    border: 1px solid var(--llh-line);
    border-radius: 10px;
    background: var(--llh-card);
    color: var(--llh-ink);
    cursor: pointer;
}

.demo-nav__toggle .llh-ico {
    width: 20px;
    height: 20px;
}

.demo-nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.demo-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 56px;
    border-bottom: 1px solid var(--llh-line);
    background:
        radial-gradient(900px 380px at 12% -10%, rgba(0, 86, 179, .16), transparent 60%),
        radial-gradient(700px 320px at 88% 0%, rgba(43, 143, 224, .14), transparent 62%);
}

[data-llh-theme="dark"] .demo-hero {
    background:
        radial-gradient(900px 380px at 12% -10%, rgba(72, 143, 220, .20), transparent 60%),
        radial-gradient(700px 320px at 88% 0%, rgba(72, 143, 220, .14), transparent 62%);
}

.demo-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin-bottom: 14px;
    border: 1px solid var(--llh-line-2);
    border-radius: var(--llh-radius-pill);
    background: var(--llh-card);
    color: var(--llh-ink-3);
    font-size: 12px;
}

.demo-hero__title {
    margin: 0 0 12px;
    font-size: 38px;
    line-height: 1.22;
    letter-spacing: -.02em;
    color: var(--llh-ink);
}

.demo-hero__title em {
    font-style: normal;
    color: var(--llh-primary);
}

.demo-lead {
    margin: 0 0 22px;
    max-width: 620px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--llh-ink-3);
}

.demo-section {
    padding: 44px 0;
    border-bottom: 1px solid var(--llh-line);
}

.demo-section:last-of-type {
    border-bottom: 0;
}

.demo-h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--llh-ink);
}

.demo-h3 {
    margin: 26px 0 10px;
    font-size: 15px;
    color: var(--llh-ink);
}

.demo-note {
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--llh-ink-3);
}

.demo-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--llh-primary);
}

.demo-panel {
    padding: 20px;
    border: 1px solid var(--llh-line);
    border-radius: var(--llh-radius-lg);
    background: var(--llh-card);
    box-shadow: var(--llh-shadow-1);
}

.demo-panel--pad {
    padding: 22px;
}

.demo-panel__label {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--llh-ink-4);
}

.demo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-row + .demo-row {
    margin-top: 14px;
}

.demo-stack > * + * {
    margin-top: 12px;
}

.demo-classes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px dashed var(--llh-line-2);
}

.demo-classes__tag {
    flex: 0 0 auto;
    margin-right: 2px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--llh-ink-4);
}

.demo-classes code {
    padding: 1px 7px;
    border: 1px solid var(--llh-line-2);
    border-radius: 6px;
    background: var(--llh-th-bg);
    color: var(--llh-ink-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 11.5px;
    line-height: 1.75;
    white-space: nowrap;
}

.demo-classes code.is-attr {
    border-style: dashed;
    background: transparent;
    color: var(--llh-warn);
}

.demo-classes code.is-active {
    border-color: var(--llh-primary);
    background: var(--llh-primary-soft);
    color: var(--llh-primary);
}

[data-llh-theme="dark"] .demo-classes code.is-active {
    color: #84caff;
    border-color: #3b6ea5;
}

.demo-cell {
    padding: 10px 12px;
    border: 1px dashed var(--llh-line-2);
    border-radius: var(--llh-radius-sm);
    background: var(--llh-th-bg);
    color: var(--llh-ink-3);
    font-size: 12px;
    text-align: center;
}

.demo-code {
    position: relative;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--llh-line-2);
    border-radius: var(--llh-radius-md);
    background: #0d1218;
    color: #e6edf3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    line-height: 1.75;
    overflow-x: auto;
    tab-size: 4;
}

.demo-code code {
    font: inherit;
    color: inherit;
    background: none;
}

.demo-code .c-tag { color: #7ee787; }
.demo-code .c-attr { color: #79c0ff; }
.demo-code .c-str { color: #ffa657; }
.demo-code .c-com { color: #8b949e; }
.demo-code .c-key { color: #ff7b72; }
.demo-code .c-fn { color: #d2a8ff; }

.demo-code--light {
    background: #f9fafb;
    border-color: var(--llh-line);
    color: var(--llh-ink-2);
}

[data-llh-theme="dark"] .demo-code--light {
    background: #10161d;
    border-color: var(--llh-line-2);
    color: var(--llh-ink-2);
}

.demo-kbd {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border: 1px solid var(--llh-line-2);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--llh-bg);
    color: var(--llh-ink-2);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    text-align: center;
}

.demo-table-wrap {
    border: 1px solid var(--llh-line);
    border-radius: var(--llh-radius-lg);
    overflow: hidden;
    background: var(--llh-card);
}

.demo-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--llh-line);
    border-radius: var(--llh-radius-sm);
    background: var(--llh-card);
}

.demo-swatch__dot {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex: 0 0 auto;
    border: 1px solid rgba(16, 24, 40, .06);
}

.demo-swatch__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--llh-ink);
}

.demo-swatch__val {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: var(--llh-ink-4);
}

.demo-icon-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border: 1px solid var(--llh-line);
    border-radius: var(--llh-radius-sm);
    background: var(--llh-card);
    color: var(--llh-ink-2);
    font-size: 11px;
}

.demo-icon-cell .llh-ico {
    width: 20px;
    height: 20px;
    color: var(--llh-primary);
}

.demo-slide-a {
    background: linear-gradient(112deg, #003f80 0%, #0056b3 48%, #2b8fe0 100%);
}

.demo-slide-b {
    background: linear-gradient(112deg, #0b3c2f 0%, #067647 52%, #35b37e 100%);
}

.demo-slide-c {
    background: linear-gradient(112deg, #4a2b12 0%, #b54708 55%, #f0a13c 100%);
}

.demo-mock {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--llh-line-2);
    border-radius: var(--llh-radius-md);
    background:
        repeating-linear-gradient(45deg, rgba(16, 24, 40, .03) 0 8px, transparent 8px 16px);
    color: var(--llh-ink-4);
    font-size: 12px;
    min-height: 96px;
}

.demo-toc {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--llh-line);
    border-radius: var(--llh-radius-lg);
    background: var(--llh-card);
}

.demo-toc a {
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--llh-ink-3);
    font-size: 13px;
    text-decoration: none;
}

.demo-toc a:hover {
    background: rgba(16, 24, 40, .04);
    color: var(--llh-ink);
}

.demo-toc__title {
    padding: 4px 10px 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--llh-ink-4);
}

.demo-docs {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    padding: 28px 0 56px;
}

.demo-footer {
    padding: 26px 0;
    border-top: 1px solid var(--llh-line);
    background: var(--llh-card);
    color: var(--llh-ink-3);
    font-size: 12.5px;
}

.demo-footer a {
    color: var(--llh-ink-2);
    text-decoration: none;
}

.demo-footer a:hover {
    color: var(--llh-primary);
}

.demo-quote {
    padding: 12px 14px;
    border-left: 3px solid var(--llh-primary);
    border-radius: 0 var(--llh-radius-sm) var(--llh-radius-sm) 0;
    background: var(--llh-primary-soft);
    color: var(--llh-ink-2);
    font-size: 13px;
    line-height: 1.75;
}

.demo-switch-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 970;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.demo-switch-fab a,
.demo-switch-fab button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    opacity: .55;
    padding: 0;
    border: 1px solid var(--llh-line-2);
    border-radius: var(--llh-radius-md);
    background: var(--llh-card);
    color: var(--llh-primary);
    box-shadow: 0 4px 14px rgba(16, 24, 40, .10);
    cursor: pointer;
    transition: background var(--llh-speed) ease, color var(--llh-speed) ease, transform var(--llh-speed) ease;
}

.demo-switch-fab a:hover,
.demo-switch-fab button:hover {
    background: var(--llh-primary);
    border-color: var(--llh-primary);
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
}

body {
    padding-bottom: 76px;
}

@media (max-width: 1000px) {
    .demo-docs {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .demo-toc__title {
        display: none;
    }
}

@media (max-width: 720px) {
    .demo-hero {
        padding: 44px 0 36px;
    }

    .demo-hero__title {
        font-size: 27px;
    }

    .demo-nav {
        height: 56px;
        padding: 0 14px;
        gap: 10px;
    }

    .demo-nav__brand {
        margin-right: auto;
    }

    .demo-nav__toggle {
        display: inline-flex;
    }

    .demo-nav__menu {
        position: fixed;
        top: 64px;
        right: 12px;
        left: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: min(224px, calc(100vw - 24px));
        padding: 10px;
        border: 1px solid var(--llh-line);
        border-radius: 14px;
        background: var(--llh-card);
        box-shadow: var(--llh-shadow-3);
        z-index: 970;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity var(--llh-speed) ease, transform var(--llh-speed) ease, visibility var(--llh-speed) ease;
    }

    .demo-nav__menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .demo-nav__links {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        gap: 2px;
    }

    .demo-nav__link {
        padding: 10px 12px;
        font-size: 14px;
    }

    .demo-nav__menu .llh-ico-btn {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 4px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .demo-switch-fab {
        display: none;
    }
}
