/* Shared documentation layout (hero, sidebar, table of contents, article).
   Colors are themed per product through the variables below: each product's
   docs/styles.css overrides the accent set. Structural neutrals stay here. */

:root {
    /* Accent theme (overridden in each product's docs/styles.css) */
    --docs-accent: #2a6fb0;
    --docs-accent-dark: #1f4c7a;
    --docs-accent-soft: #eef4fb;
    --docs-eyebrow: #d4e4f5;
    --docs-anchor: #a9b6c4;
    --docs-code: #244a78;
    --docs-quote-border: #9ab8d8;
    --docs-quote-bg: #f1f6fb;

    /* Structural neutrals (shared across products) */
    --docs-ink: #243342;
    --docs-muted: #5c6b78;
    --docs-border: #e2e8ee;
    --docs-card: #ffffff;
    --docs-body: #3e4e5c;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    color: var(--docs-ink);
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--docs-accent-dark);
    font-weight: 700;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.docs-hero {
    padding: 72px 24px 64px;
    text-align: center;
    color: #ffffff;
    background: var(--docs-accent);
}

.docs-hero h1 {
    max-width: 900px;
    margin: 4px auto 16px;
    color: #ffffff;
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.1;
}

.docs-hero > p:not(.docs-eyebrow) {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.08rem;
}

.docs-eyebrow {
    margin: 0;
    color: var(--docs-eyebrow);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.back-link {
    display: inline-flex;
    margin-top: 28px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 820px);
    gap: 32px;
    max-width: 1180px;
    margin: 42px auto 72px;
    padding: 0 24px;
}

.docs-sidebar {
    min-width: 0;
}

.docs-toc {
    position: sticky;
    top: 92px;
    z-index: 1;
    max-height: calc(100vh - 116px);
    padding: 22px;
    overflow-y: auto;
    border: 1px solid var(--docs-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 28px rgba(28, 48, 66, 0.08);
}

.docs-toc h2 {
    margin: 0 0 14px;
    color: var(--docs-ink);
    font-size: 1rem;
}

.docs-toc ul {
    /* This TOC is a <nav>, so its <ul> matches common.css's site-menu rules.
       Below 768px, `nav ul { position: absolute }` would pull the list out of
       flow and overlap the article. Keep it static and unstyled here. */
    position: static;
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    list-style: none;
}

.docs-toc li {
    margin: 0;
}

.docs-toc li::before {
    content: none;
}

.docs-toc a {
    display: block;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--docs-muted);
    font-size: 0.9rem;
    line-height: 1.35;
    text-decoration: none;
}

.docs-toc a:hover,
.docs-toc a:focus-visible {
    color: var(--docs-accent-dark);
    background: var(--docs-accent-soft);
}

.docs-content {
    min-width: 0;
    padding: clamp(26px, 5vw, 56px);
    border: 1px solid var(--docs-border);
    border-radius: 20px;
    background: var(--docs-card);
    box-shadow: 0 12px 36px rgba(28, 48, 66, 0.09);
}

.docs-content h2,
.docs-content h3 {
    position: relative;
    color: var(--docs-accent-dark);
    line-height: 1.25;
}

.docs-content h2 {
    margin: 54px 0 18px;
    padding-top: 8px;
    border-top: 1px solid var(--docs-border);
    font-size: clamp(1.55rem, 3vw, 2rem);
}

.docs-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.docs-content h3 {
    margin: 32px 0 12px;
    font-size: 1.24rem;
}

.heading-anchor {
    margin-left: 8px;
    color: var(--docs-anchor);
    font-size: 0.72em;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.docs-content h2:hover .heading-anchor,
.docs-content h3:hover .heading-anchor,
.heading-anchor:focus-visible {
    opacity: 1;
}

.docs-content p,
.docs-content li {
    color: var(--docs-body);
    font-size: 1rem;
    line-height: 1.75;
}

.docs-content p {
    margin: 12px 0;
}

.docs-content ul,
.docs-content ol {
    margin: 14px 0 22px;
    padding-left: 26px;
}

/* Use standard bullet points, overriding the site-wide checkmark bullet */
.docs-content ul {
    list-style: disc;
}

.docs-content ul li {
    padding: 0;
}

.docs-content ul li::before {
    content: none;
}

.docs-content li {
    margin: 7px 0;
}

.docs-content a {
    color: var(--docs-accent-dark);
    font-weight: 600;
    text-underline-offset: 3px;
}

.docs-content code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #f1f4f6;
    color: var(--docs-code);
    font-size: 0.92em;
}

.docs-content hr {
    margin: 44px 0;
    border: 0;
    border-top: 1px solid var(--docs-border);
}

.docs-content blockquote {
    margin: 18px 0;
    padding: 15px 18px;
    border-left: 4px solid var(--docs-quote-border);
    border-radius: 0 10px 10px 0;
    background: var(--docs-quote-bg);
}

.docs-content blockquote p {
    margin: 0;
}

.docs-footer {
    padding: 28px 20px;
    text-align: center;
    color: #ffffff;
    background: #263746;
}

.docs-footer p {
    margin: 0;
    color: #ffffff;
}

@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-toc {
        position: static;
        max-height: none;
    }

    .docs-toc ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .docs-hero {
        padding: 54px 18px 48px;
    }

    .docs-layout {
        margin-top: 24px;
        padding: 0 14px;
    }

    .docs-content {
        padding: 26px 20px;
        border-radius: 14px;
    }

    .docs-toc ul {
        grid-template-columns: 1fr;
    }

    .heading-anchor {
        opacity: 1;
    }
}
