.fp-docs .shell {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    min-height: 100vh;
}

.fp-docs .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    padding: 1.5rem 1rem;
}

.fp-docs .docs-sidebar-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fp-docs .docs-nav-close,
.fp-docs .docs-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 0.95rem;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(77, 166, 166, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fp-docs .docs-nav-backdrop {
    display: none;
}

.fp-docs .brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.fp-docs .brand-lockup {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
}

.fp-docs .brand-copy {
    min-width: 0;
}

.fp-docs .docs-logo {
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    opacity: 0.16;
}

.fp-docs .docs-logo__img {
    width: 3.1rem;
}

.fp-docs .brand strong {
    display: block;
    font-size: 1.05rem;
}

.fp-docs .brand small {
    color: var(--text-muted);
}

.fp-docs .doc-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1 1 auto;
}

.fp-docs .nav-heading {
    margin: 0 0 0.5rem;
}

.fp-docs .nav-link {
    display: block;
    margin-bottom: 0.25rem;
    padding: 0.5rem 0.65rem 0.5rem 0.8rem;
    font-size: 0.9375rem;
    text-decoration: none;
}

.fp-docs .content {
    padding: 1.5rem clamp(1rem, 2vw, 2.25rem) 3rem;
}

.fp-docs .docs-sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.fp-docs .docs-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.fp-docs .docs-theme-toggle__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 2.1rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: rgba(77, 166, 166, 0.12);
    color: var(--pop-cyan);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fp-docs .docs-theme-toggle__label {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fp-docs .docs-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
}

.fp-docs .docs-topbar__intro {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fp-docs .docs-mobile-brand {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.fp-docs .docs-mobile-brand__logo {
    width: 2.6rem;
    justify-content: center;
    opacity: 0.18;
}

.fp-docs .docs-mobile-brand__img {
    width: 2.6rem;
}

.fp-docs .docs-mobile-brand strong {
    display: block;
    font-size: 0.95rem;
}

.fp-docs .docs-mobile-brand small {
    color: var(--text-muted);
}

.fp-docs .docs-topbar__eyebrow {
    margin: 0 0 0.3rem;
}

.fp-docs .docs-topbar strong {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.fp-docs .docs-topbar__link {
    white-space: nowrap;
    color: var(--pop-orange);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fp-docs .hero,
.fp-docs .doc-shell {
    max-width: 62rem;
    padding: clamp(1.25rem, 2vw, 2rem);
}

.fp-docs .hero {
    border-radius: 1.6rem;
}

.fp-docs .hero h1,
.fp-docs .doc-header h1 {
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: clamp(2.9rem, 6vw, 5.6rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
}

.fp-docs .eyebrow,
.fp-docs .doc-section {
    margin: 0 0 0.75rem;
}

.fp-docs .hero-copy,
.fp-docs .doc-description {
    max-width: 54rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 1.12rem;
    line-height: 1.8;
}

.fp-docs .doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1rem;
    max-width: 62rem;
    margin-top: 1rem;
}

.fp-docs .doc-card {
    padding: 1.35rem;
    border-radius: 1.25rem;
}

.fp-docs .doc-card h2 {
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: 2rem;
}

.fp-docs .doc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-docs .doc-list li + li {
    margin-top: 1rem;
}

.fp-docs .doc-list a {
    font-size: 1.1rem;
    text-decoration: none;
}

.fp-docs .doc-list span {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.fp-docs .doc-body {
    margin-top: 1.5rem;
}

.fp-docs .doc-body h2,
.fp-docs .doc-body h3 {
    color: var(--text-primary);
}

.fp-docs .doc-body h2 {
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    font-size: 2rem;
}

.fp-docs .doc-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    font-size: 1.35rem;
}

.fp-docs .doc-body p,
.fp-docs .doc-body li,
.fp-docs .doc-body blockquote {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.82;
}

.fp-docs .doc-body ul,
.fp-docs .doc-body ol {
    padding-left: 1.35rem;
}

.fp-docs .doc-body pre {
    overflow-x: auto;
    margin: 1rem 0;
    padding: 1rem 1.15rem;
}

.fp-docs .doc-body pre,
.fp-docs .event-row code {
    background: rgba(1, 4, 5, 0.88);
    border: 1px solid rgba(77, 166, 166, 0.12);
    border-radius: 1rem;
    color: #f8f3e8;
}

.fp-docs .doc-body code {
    padding: 0.14rem 0.35rem;
    border-radius: 0.35rem;
    background: rgba(77, 166, 166, 0.1);
    color: var(--pop-cyan);
}

.fp-docs .doc-body pre code {
    padding: 0;
    background: transparent;
    border: 0;
}

.fp-docs .doc-body blockquote {
    margin: 1rem 0;
    padding: 0.45rem 1rem;
    border-left: 4px solid var(--pop-orange);
    background: rgba(217, 69, 117, 0.08);
}

.fp-docs .reference-block {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.fp-docs .reference-block h2 {
    margin-bottom: 1rem;
}

.fp-docs .event-table {
    display: grid;
    gap: 0.75rem;
}

.fp-docs .event-table-header,
.fp-docs .event-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 0.85fr 0.85fr 1.2fr;
    gap: 1rem;
    align-items: start;
}

.fp-docs .event-table-header {
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fp-docs .event-row {
    padding: 1rem;
}

.fp-docs .event-row p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.fp-docs .doc-card,
.fp-docs .hero,
.fp-docs .doc-shell,
.fp-docs .event-row {
    background: linear-gradient(180deg, rgba(8, 25, 31, 0.92), rgba(5, 18, 22, 0.94));
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-panel);
}

html[data-theme="light"] .fp-docs .docs-logo {
    opacity: 0.22;
}

html[data-theme="light"] .fp-docs .docs-mobile-brand {
    color: #0f172a;
}

html[data-theme="light"] .fp-docs .brand small,
html[data-theme="light"] .fp-docs .doc-list span,
html[data-theme="light"] .fp-docs .event-row p,
html[data-theme="light"] .fp-docs .hero-copy,
html[data-theme="light"] .fp-docs .doc-description {
    color: var(--text-muted);
}

html[data-theme="light"] .fp-docs .docs-theme-toggle__icon {
    background: rgba(15, 118, 110, 0.1);
}

html[data-theme="light"] .fp-docs .doc-body pre,
html[data-theme="light"] .fp-docs .event-row code {
    background: rgba(248, 250, 252, 0.96);
    color: #1f2937;
}

html[data-theme="light"] .fp-docs .doc-body code {
    background: rgba(15, 118, 110, 0.08);
}

html[data-theme="light"] .fp-docs .doc-body blockquote {
    background: rgba(184, 51, 103, 0.06);
}

html[data-theme="light"] .fp-docs .doc-card,
html[data-theme="light"] .fp-docs .hero,
html[data-theme="light"] .fp-docs .doc-shell,
html[data-theme="light"] .fp-docs .event-row {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 238, 0.96));
}

@media (max-width: 960px) {
    .fp-docs .shell {
        grid-template-columns: 1fr;
    }

    .fp-docs .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(21rem, calc(100vw - 2rem));
        height: 100vh;
        padding: 1rem;
        gap: 1.25rem;
        border-right: 1px solid var(--border-subtle) !important;
        border-bottom: 0;
        box-shadow: var(--shadow-panel);
        transform: translateX(calc(-100% - 1rem));
        transition: transform 0.22s ease;
    }

    .fp-docs .docs-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .fp-docs .docs-topbar__intro {
        width: 100%;
        align-items: flex-start;
        justify-content: space-between;
    }

    .fp-docs .docs-sidebar-mobile-bar,
    .fp-docs .docs-nav-close,
    .fp-docs .docs-nav-toggle,
    .fp-docs .docs-mobile-brand {
        display: inline-flex;
    }

    .fp-docs .docs-sidebar-mobile-bar {
        display: flex;
    }

    .fp-docs .docs-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 20;
        border: 0;
        background: rgba(1, 4, 5, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .fp-docs.docs-nav-open .sidebar {
        transform: translateX(0);
    }

    .fp-docs.docs-nav-open .docs-nav-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .fp-docs .brand {
        gap: 0.75rem;
    }

    .fp-docs .content {
        padding: 1rem 1rem 2.25rem;
    }

    .fp-docs .hero,
    .fp-docs .doc-shell {
        padding: 1.15rem;
    }

    .fp-docs .hero h1,
    .fp-docs .doc-header h1 {
        font-size: clamp(2.15rem, 9vw, 3.2rem);
        line-height: 0.98;
    }

    .fp-docs .hero-copy,
    .fp-docs .doc-description {
        font-size: 1rem;
        line-height: 1.72;
    }

    .fp-docs .doc-grid {
        grid-template-columns: 1fr;
    }

    .fp-docs .event-table-header {
        display: none;
    }

    .fp-docs .event-row {
        grid-template-columns: 1fr;
    }

    .fp-docs .docs-sidebar-footer {
        margin-top: 0;
    }

    .fp-docs .docs-topbar__link {
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .fp-docs .docs-topbar__intro {
        flex-wrap: wrap;
        gap: 0.85rem;
    }

    .fp-docs .docs-mobile-brand {
        min-width: 0;
    }

    .fp-docs .docs-mobile-brand span:last-child {
        min-width: 0;
    }

    .fp-docs .event-row,
    .fp-docs .doc-card {
        padding: 0.95rem;
    }

    .fp-docs .doc-body pre {
        padding: 0.9rem 0.95rem;
        border-radius: 0.9rem;
    }
}
