.doc-body {
    background: #f4f6f8;
}

.site-header__logo {
    display: flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
}

.doc-logo {
    height: 2.15rem;
    width: auto;
    max-width: min(14rem, 46vw);
    filter: brightness(0) invert(1);
}

.doc-shell {
    display: grid;
    grid-template-columns: 15.5rem minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 78rem;
    margin: 0 auto;
    padding: calc(var(--site-header-height, 4rem) + 1.25rem) 1.25rem 3rem;
    box-sizing: border-box;
}

.doc-nav {
    position: sticky;
    top: calc(var(--site-header-height, 4rem) + 0.75rem);
    align-self: start;
    max-height: calc(100vh - var(--site-header-height, 4rem) - 1.5rem);
    overflow: auto;
    padding: 0.9rem 1rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.doc-nav__home,
.doc-nav a {
    display: block;
    padding: 0.28rem 0.45rem;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}

.doc-nav a:hover,
.doc-nav__home:hover,
.doc-nav a.is-active,
.doc-nav__home.is-active {
    background: color-mix(in srgb, var(--wikifamille-clr-base, #2b5c8a) 12%, white);
    color: var(--wikifamille-clr-base, #2b5c8a);
}

.doc-nav__home {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.doc-nav__group {
    margin: 0.85rem 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wikifamille-clr-base, #2b5c8a);
}

.doc-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-main {
    min-width: 0;
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem 1.75rem 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.doc-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wikifamille-clr-base, #2b5c8a);
}

.doc-main h1 {
    margin: 0 0 0.6rem;
}

.doc-lead {
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0 0 1.5rem;
}

.doc-lead code,
.doc-notes code,
.doc-params code,
.doc-example__note code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    background: #f0f2f5;
}

.doc-group-title {
    margin: 1.75rem 0 0.25rem;
    font-size: 1.15rem;
}

.doc-group-blurb {
    margin: 0 0 0.75rem;
    color: #555;
}

.doc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
}

.doc-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 1rem;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: #fafbfc;
}

.doc-card:hover {
    border-color: var(--wikifamille-clr-base, #2b5c8a);
    background: #fff;
}

.doc-card span {
    font-size: 0.92rem;
    line-height: 1.4;
    color: #444;
}

.doc-card code {
    font-size: 0.78rem;
    color: var(--wikifamille-clr-base, #2b5c8a);
}

.doc-section {
    margin-top: 1.75rem;
}

.doc-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.doc-syntax {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: #1f2a33;
    color: #f4f7fa;
    overflow: auto;
}

.doc-syntax code,
.doc-example__code pre,
.doc-example__code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.5;
}

.doc-params {
    width: 100%;
}

.doc-params th {
    white-space: nowrap;
    width: 1%;
    text-align: left;
    vertical-align: top;
}

.doc-notes {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    line-height: 1.5;
}

.doc-example {
    margin: 0 0 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e8edf2;
}

.doc-example:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.doc-example__title {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.doc-example__note {
    margin: 0 0 0.7rem;
    color: #555;
}

.doc-example__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.doc-example__grid--wide {
    grid-template-columns: 1fr;
}

.doc-example__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #667;
    margin-bottom: 0.35rem;
}

.doc-example__code pre {
    margin: 0;
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
    background: #1f2a33;
    color: #f4f7fa;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.doc-preview {
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.doc-preview::after {
    content: "";
    display: block;
    clear: both;
}

.doc-error {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #fdecea;
    color: #8a1f11;
}

@media (max-width: 64rem) {
    .doc-example__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 52rem) {
    .doc-shell {
        grid-template-columns: 1fr;
        padding-top: calc(var(--site-header-height, 4rem) + 0.75rem);
    }

    .doc-nav {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
        gap: 0.15rem 0.75rem;
    }

    .doc-nav__home,
    .doc-nav__group {
        grid-column: 1 / -1;
    }

    .doc-main {
        padding: 1.1rem 1rem 1.5rem;
    }
}
