/*
 * Documentation site (/docs).
 *
 * Everything is namespaced under .docs- because these pages render inside the
 * CMS layout, alongside Bootstrap and assets/css/styles.css. No bare element
 * selectors outside .docs-main, so nothing here can reach the site header,
 * footer or the shared modals.
 */

.docs-shell {
    --docs-ink: #14201d;
    --docs-ink-2: #4b5b57;
    --docs-ink-3: #778884;
    --docs-rule: #e2e8e6;
    --docs-rule-soft: #eef2f1;
    --docs-surface: #ffffff;
    --docs-surface-2: #f5f8f7;
    --docs-accent: #0d6e5b;
    --docs-accent-soft: #e4f2ee;
    --docs-warn: #9a5216;
    --docs-warn-soft: #fbeee1;

    background: var(--docs-surface);
    color: var(--docs-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.docs-shell *,
.docs-shell *::before,
.docs-shell *::after {
    box-sizing: border-box;
}

/* ── Breadcrumb bar ──────────────────────────────────────────────────── */
.docs-topbar {
    border-bottom: 1px solid var(--docs-rule);
    background: var(--docs-surface-2);
}

.docs-topbar__inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--docs-ink-3);
}

.docs-topbar a {
    color: var(--docs-ink-2);
    text-decoration: none;
}

.docs-topbar a:hover {
    color: var(--docs-accent);
    text-decoration: underline;
}

.docs-topbar__sep {
    color: var(--docs-ink-3);
}

.docs-topbar__current {
    color: var(--docs-ink);
    font-weight: 500;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.docs-layout {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 32px 0 48px;
}

.docs-main {
    padding: 34px 0 90px;
    min-width: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--docs-ink-2);
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.docs-nav__group + .docs-nav__group {
    margin-top: 26px;
}

.docs-nav__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--docs-ink-3);
    margin: 0 0 9px;
}

.docs-nav__title .bi {
    font-size: 13px;
}

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

.docs-nav__list a {
    display: block;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--docs-ink-2);
    text-decoration: none;
    border-left: 2px solid var(--docs-rule);
}

.docs-nav__list a:hover {
    color: var(--docs-ink);
    background: var(--docs-surface-2);
}

.docs-nav__list a.is-current {
    color: var(--docs-accent);
    border-left-color: var(--docs-accent);
    background: var(--docs-accent-soft);
    font-weight: 600;
}

.docs-nav__lock {
    font-size: 10px;
    color: var(--docs-ink-3);
    border: 1px solid var(--docs-rule);
    border-radius: 3px;
    padding: 0 4px;
    margin-left: 5px;
    vertical-align: 1px;
}

/* ── Page header ─────────────────────────────────────────────────────── */
.docs-head {
    border-bottom: 1px solid var(--docs-rule);
    padding-bottom: 18px;
    margin-bottom: 8px;
}

.docs-head__eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--docs-accent);
    margin: 0 0 8px;
}

.docs-head h1 {
    font-size: 33px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--docs-ink);
    margin: 0 0 10px;
}

.docs-head__summary {
    font-size: 17.5px;
    color: var(--docs-ink-2);
    margin: 0;
    max-width: 62ch;
}

.docs-main h2 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--docs-ink);
    margin: 40px 0 6px;
}

.docs-main h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--docs-ink);
    margin: 26px 0 4px;
}

.docs-main p {
    margin: 10px 0;
    max-width: 68ch;
}

.docs-main ul,
.docs-main ol {
    max-width: 66ch;
    padding-left: 20px;
    margin: 10px 0;
}

.docs-main li {
    margin: 5px 0;
}

.docs-main a {
    color: var(--docs-accent);
    text-underline-offset: 2px;
}

.docs-main strong {
    color: var(--docs-ink);
    font-weight: 600;
}

.docs-main code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.86em;
    background: var(--docs-surface-2);
    border: 1px solid var(--docs-rule);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--docs-ink);
}

.docs-main a:focus-visible,
.docs-sidebar a:focus-visible,
.docs-topbar a:focus-visible {
    outline: 2px solid var(--docs-accent);
    outline-offset: 2px;
}

/* ── Steps ───────────────────────────────────────────────────────────── */
.docs-steps {
    list-style: none;
    counter-reset: docstep;
    margin: 20px 0;
    padding: 0;
    max-width: none;
}

.docs-step {
    counter-increment: docstep;
    position: relative;
    padding: 0 0 26px 52px;
    margin: 0;
}

.docs-step::before {
    content: counter(docstep);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--docs-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* The connecting rail, stopping at the last step. */
.docs-step::after {
    content: '';
    position: absolute;
    left: 15.5px;
    top: 38px;
    bottom: 6px;
    width: 1px;
    background: var(--docs-rule);
}

.docs-step:last-child::after {
    display: none;
}

.docs-step__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--docs-ink);
    margin: 4px 0 2px;
    line-height: 1.35;
}

.docs-step > p:first-of-type {
    margin-top: 2px;
}

/* ── Screenshots ─────────────────────────────────────────────────────── */
.docs-shot {
    margin: 14px 0 0;
    border: 1px solid var(--docs-rule);
    border-radius: 8px;
    overflow: hidden;
    background: var(--docs-surface-2);
}

.docs-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.docs-shot figcaption {
    font-size: 13px;
    color: var(--docs-ink-3);
    padding: 9px 14px;
    border-top: 1px solid var(--docs-rule);
    background: var(--docs-surface);
}

.docs-shot--missing {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 18px;
    font-size: 13.5px;
    color: var(--docs-ink-3);
    border-style: dashed;
}

.docs-shot--missing .bi {
    font-size: 16px;
}

/* ── Callouts ────────────────────────────────────────────────────────── */
.docs-note,
.docs-tip {
    margin: 18px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--docs-accent);
    background: var(--docs-accent-soft);
    border-radius: 0 6px 6px 0;
    max-width: 68ch;
}

.docs-tip {
    border-left-color: var(--docs-warn);
    background: var(--docs-warn-soft);
}

.docs-note__label,
.docs-tip__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--docs-accent);
    margin-bottom: 2px;
}

.docs-tip__label {
    color: var(--docs-warn);
}

.docs-note p,
.docs-tip p {
    margin: 2px 0;
    font-size: 15px;
    max-width: none;
}

/* ── Landing page cards ──────────────────────────────────────────────── */
.docs-hero {
    padding: 46px 0 8px;
    max-width: 640px;
}

.docs-hero h1 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--docs-ink);
    margin: 0 0 12px;
}

.docs-hero p {
    font-size: 18px;
    color: var(--docs-ink-2);
    margin: 0;
}

.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
    margin: 30px 0 70px;
}

.docs-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--docs-rule);
    border-radius: 10px;
    padding: 22px 22px 18px;
    background: var(--docs-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-card:hover {
    border-color: var(--docs-accent);
    box-shadow: 0 10px 28px -20px rgba(13, 110, 91, 0.6);
    color: inherit;
}

.docs-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--docs-accent-soft);
    color: var(--docs-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 13px;
}

.docs-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--docs-ink);
    margin: 0 0 5px;
}

.docs-card p {
    font-size: 14.5px;
    color: var(--docs-ink-2);
    margin: 0 0 14px;
    flex: 1;
}

.docs-card__list {
    list-style: none;
    margin: 0;
    padding: 13px 0 0;
    border-top: 1px solid var(--docs-rule-soft);
}

.docs-card__list li {
    font-size: 13.5px;
    color: var(--docs-ink-3);
    padding: 2px 0;
}

/* ── Prev / next ─────────────────────────────────────────────────────── */
.docs-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--docs-rule);
}

.docs-pager__link {
    flex: 1 1 210px;
    border: 1px solid var(--docs-rule);
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
}

.docs-pager__link:hover {
    border-color: var(--docs-accent);
    color: inherit;
}

.docs-pager__link--next {
    text-align: right;
}

.docs-pager__dir {
    display: block;
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--docs-ink-3);
    margin-bottom: 2px;
}

.docs-pager__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--docs-accent);
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        padding: 20px 0 4px;
        border-bottom: 1px solid var(--docs-rule);
    }

    .docs-main {
        padding-top: 26px;
    }

    .docs-head h1 {
        font-size: 27px;
    }

    .docs-step {
        padding-left: 44px;
    }
}

@media print {
    .docs-sidebar,
    .docs-pager,
    .docs-topbar {
        display: none;
    }
}
