/* Public documentation — panel design system.
   Same colors, fonts and radii as the dashboard: #070709 page, #141416 cards,
   Poppins body, IBM Plex Sans headings, red primary accent, 4px radius.
   Layout: fixed 64px navbar, 250px sidebar, article and "On this page" side by
   side. Global resets are scoped so this file is safe to load in the admin
   preview as well. */

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

:root {
    --docs-bg: rgb(var(--color-800, 7 7 9));
    --docs-card: rgb(var(--color-700, 20 20 22));
    --docs-card-hover: rgb(var(--color-600, 27 27 33));
    --docs-fg: rgb(var(--color-200, 210 210 219));
    --docs-heading: rgb(var(--color-50, 244 244 245));
    --docs-muted-fg: rgb(var(--color-300, 130 130 164));
    --docs-border: rgba(255, 255, 255, 0.08);
    --docs-border-strong: rgba(255, 255, 255, 0.14);
    --docs-primary: rgb(var(--color-primary, 210 68 63));
    --docs-primary-soft: rgba(210, 68, 63, 0.14);
    --docs-secondary: rgb(var(--color-600, 27 27 33));
    --docs-code-bg: rgb(var(--color-700, 20 20 22));
    --docs-font: "Poppins", sans-serif;
    --docs-heading-font: "IBM Plex Sans", "Roboto", system-ui, sans-serif;
    --docs-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --docs-radius: 4px;
    --docs-navbar-height: 64px;
    --docs-sidebar-width: 250px;
    --docs-toc-width: 260px;
    --docs-content-width: 900px;
}

html.docs-html {
    background: var(--docs-bg);
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body.docs-body {
    margin: 0;
    min-height: 100vh;
    background: var(--docs-bg);
    color: var(--docs-fg);
    font-family: var(--docs-font);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.docs-body a,
.docs-preview a {
    color: inherit;
    text-decoration: inherit;
}

.docs-body button,
.docs-body input,
.docs-preview button,
.docs-preview input {
    font: inherit;
    color: inherit;
}

.docs-body button,
.docs-preview button {
    background: transparent;
    border-radius: 0;
}

.docs-body svg,
.docs-preview svg {
    display: block;
    vertical-align: middle;
}

.docs-body h1, .docs-body h2, .docs-body h3, .docs-body h4, .docs-body h5, .docs-body h6,
.docs-preview h1, .docs-preview h2, .docs-preview h3, .docs-preview h4, .docs-preview h5, .docs-preview h6 {
    margin: 0;
    font-family: var(--docs-heading-font);
    font-weight: 500;
    letter-spacing: normal;
}

.docs-body p,
.docs-preview p {
    margin: 0;
}

.docs-body ol, .docs-body ul, .docs-body menu,
.docs-preview ol, .docs-preview ul, .docs-preview menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-body img, .docs-body video,
.docs-preview img, .docs-preview video {
    display: block;
    max-width: 100%;
    height: auto;
}

.docs-body hr,
.docs-preview hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
}

.docs-body ::selection,
.docs-preview ::selection {
    background: rgba(210, 68, 63, 0.35);
}

.docs-body ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.docs-body ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}

.docs-body ::-webkit-scrollbar-track {
    background: transparent;
}

/* ------------------------------------------------------------------ navbar */

.docs-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--docs-navbar-height);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    background: rgba(7, 7, 9, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--docs-border);
}

.docs-navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: none;
    color: var(--docs-heading);
    font-size: 16px;
    font-weight: 600;
}

.docs-navbar-brand img {
    height: 32px;
    width: 32px;
    object-fit: cover;
    border-radius: 4px;
}

.docs-navbar-brand svg {
    width: 22px;
    height: 22px;
    color: var(--docs-primary);
}

.docs-navbar-divider {
    width: 1px;
    height: 24px;
    background: var(--docs-border);
    flex: none;
}

.docs-navbar-title {
    color: var(--docs-muted-fg);
    font-size: 15px;
    font-weight: 500;
}

.docs-navbar-spacer {
    flex: 1;
}

.docs-navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.docs-navbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--docs-radius);
    color: var(--docs-muted-fg);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 150ms, color 150ms;
}

.docs-navbar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--docs-heading);
}

.docs-navbar-link.is-active {
    background: var(--docs-primary-soft);
    color: var(--docs-heading);
}

.docs-navbar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    margin-left: 8px;
    padding: 0 18px;
    border-radius: var(--docs-radius);
    background: var(--docs-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: filter 150ms;
}

.docs-navbar-cta:hover {
    filter: brightness(1.08);
}

.docs-navbar-menu {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    color: var(--docs-heading);
    cursor: pointer;
}

.docs-navbar-menu svg {
    width: 18px;
    height: 18px;
}

/* ------------------------------------------------------------------ shell */

.docs-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

/* The dashboard navbar is fixed, unlike the sticky guest header. Offset the
   shell so the article never slides underneath it. */
body.docs-has-navbar .docs-shell {
    padding-top: var(--docs-navbar-height);
}

/* Same header component as /dashboard, adapted to the flat docs background. */
.docs-body #navbar {
    background: rgba(7, 7, 9, 0.92);
    border-bottom: 1px solid var(--docs-border);
    backdrop-filter: blur(14px);
}

/* The guest auth header only carries a logo, so the docs drawer needs its own
   trigger on mobile. Hidden as soon as the sidebar is visible. */
.docs-guest-menu {
    display: none;
}

@media (max-width: 1023px) {
    .docs-guest-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        right: 0;
        z-index: 51;
        width: 64px;
        height: 64px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--docs-fg);
        cursor: pointer;
    }

    .docs-guest-menu:hover {
        color: var(--docs-heading);
    }

    .docs-guest-menu svg {
        width: 22px;
        height: 22px;
    }
}

.docs-sidebar {
    position: fixed;
    top: var(--docs-navbar-height);
    left: 0;
    bottom: 0;
    z-index: 40;
    width: var(--docs-sidebar-width);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px 22px 32px 32px;
    overflow-y: auto;
    border-right: 1px solid var(--docs-border);
    background: var(--docs-bg);
    overscroll-behavior: contain;
}

.docs-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    color: var(--docs-muted-fg);
    transition: border-color 150ms;
}

.docs-search:focus-within {
    border-color: var(--docs-border-strong);
}

.docs-search svg {
    width: 17px;
    height: 17px;
    flex: none;
}

.docs-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--docs-heading);
    font-size: 15px;
}

.docs-search input::placeholder {
    color: var(--docs-muted-fg);
    opacity: 1;
}

.docs-search input::-webkit-search-cancel-button {
    display: none;
}

.docs-search kbd {
    flex: none;
    padding: 2px 6px;
    border: 1px solid var(--docs-border);
    border-radius: 3px;
    background: var(--docs-secondary);
    color: var(--docs-muted-fg);
    font-family: var(--docs-font);
    font-size: 11px;
    line-height: 1.4;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-nav-home {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--docs-radius);
    color: var(--docs-fg);
    font-size: 16px;
    font-weight: 600;
    transition: background-color 150ms, color 150ms;
}

.docs-nav-home:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--docs-heading);
}

.docs-nav-group {
    display: flex;
    flex-direction: column;
}

.docs-nav-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--docs-radius);
    color: var(--docs-fg);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 150ms, color 150ms;
}

.docs-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--docs-heading);
}

.docs-nav-group-name {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.docs-nav-chevron {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--docs-muted-fg);
    transition: rotate 180ms ease;
    rotate: 0deg;
}

.docs-nav-group.is-collapsed .docs-nav-chevron {
    rotate: -90deg;
}

.docs-nav-children {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 6px 10px;
}

.docs-nav-children::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 10px;
    left: 10px;
    width: 1px;
    background: var(--docs-border);
}

.docs-nav-group.is-collapsed .docs-nav-children {
    display: none;
}

.docs-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 10px 9px 20px;
    border-radius: var(--docs-radius);
    color: var(--docs-muted-fg);
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    transition: background-color 150ms, color 150ms;
}

.docs-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--docs-heading);
}

.docs-nav-link.is-active {
    background: var(--docs-primary-soft);
    color: var(--docs-heading);
}

.docs-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 2px;
    background: var(--docs-primary);
}

.docs-nav-link.is-hidden,
.docs-nav-home.is-hidden {
    display: none;
}

.docs-nav-empty {
    padding: 8px 12px;
    color: var(--docs-muted-fg);
    font-size: 14px;
}

.docs-overlay {
    display: none;
}

/* ------------------------------------------------------------------- main */

.docs-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--docs-sidebar-width);
    padding: 32px 40px 64px;
}

.docs-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--docs-toc-width);
    align-items: start;
    gap: 48px;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.docs-main-grid--full {
    grid-template-columns: minmax(0, 1fr);
}

.docs-main-grid--full .docs-content {
    width: 100%;
    margin: 0 auto;
}

.docs-content {
    min-width: 0;
    max-width: var(--docs-content-width);
    padding-bottom: 72px;
}

.docs-toc {
    position: sticky;
    top: calc(var(--docs-navbar-height) + 32px);
    max-height: calc(100vh - var(--docs-navbar-height) - 64px);
    overflow-y: auto;
    padding-left: 20px;
    border-left: 1px solid var(--docs-border);
    scrollbar-width: none;
}

.docs-toc::-webkit-scrollbar {
    display: none;
}

.docs-toc-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 15px;
    font-weight: 600;
}

.docs-toc-title svg {
    width: 16px;
    height: 16px;
    color: var(--docs-primary);
}

.docs-toc-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.docs-toc-link {
    display: block;
    padding: 8px 0;
    color: var(--docs-muted-fg);
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    transition: color 150ms;
}

.docs-toc-link:hover {
    color: var(--docs-heading);
}

.docs-toc-link.is-active {
    color: var(--docs-primary);
    font-weight: 500;
}

.docs-toc-l3 {
    padding-left: 14px;
}

/* ------------------------------------------------------------ page header */

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--docs-muted-fg);
    font-size: 15px;
    font-weight: 500;
}

.docs-breadcrumb a {
    color: var(--docs-primary);
    font-weight: 600;
}

.docs-breadcrumb a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.docs-page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0 32px;
}

.docs-page-title {
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
}

.docs-page-description {
    margin: 0;
    color: var(--docs-muted-fg);
    font-size: 18px;
    line-height: 1.6;
}

.docs-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--docs-border);
}

.docs-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    color: var(--docs-fg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms, color 150ms;
}

.docs-action-button:hover {
    border-color: var(--docs-border-strong);
    background: var(--docs-card-hover);
    color: var(--docs-heading);
}

.docs-action-button svg {
    width: 15px;
    height: 15px;
    color: var(--docs-muted-fg);
}

/* ------------------------------------------------------------------ prose */

.docs-prose {
    color: var(--docs-fg);
    font-size: 16px;
    line-height: 1.75;
}

.docs-prose > :first-child {
    margin-top: 0;
}

.docs-prose > :last-child {
    margin-bottom: 0;
}

.docs-prose p {
    margin: 0 0 20px;
}

.docs-prose h1,
.docs-prose h2,
.docs-prose h3,
.docs-prose h4,
.docs-prose h5,
.docs-prose h6 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--docs-heading);
    scroll-margin-top: 96px;
}

.docs-prose h1 {
    margin: 0 0 20px;
    font-size: 32px;
    font-weight: 600;
}

.docs-prose h2 {
    margin: 48px 0 16px;
    font-size: 26px;
    font-weight: 600;
}

.docs-prose h3 {
    margin: 36px 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.docs-prose h4 {
    margin: 30px 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.docs-prose h5,
.docs-prose h6 {
    margin: 26px 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.docs-prose h1 + *,
.docs-prose h2 + *,
.docs-prose h3 + *,
.docs-prose h4 + *,
.docs-prose hr + * {
    margin-top: 0;
}

.docs-anchor {
    order: 2;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 3px;
    color: var(--docs-muted-fg);
    opacity: 0;
    transition: opacity 150ms, background-color 150ms, color 150ms;
}

.docs-anchor svg {
    width: 14px;
    height: 14px;
}

.docs-heading:hover .docs-anchor {
    opacity: 1;
}

.docs-anchor:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--docs-primary);
}

.docs-prose a {
    color: var(--docs-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 150ms;
}

.docs-prose a:hover {
    opacity: 0.8;
}

.docs-prose strong {
    color: var(--docs-heading);
    font-weight: 600;
}

.docs-prose em {
    font-style: italic;
}

.docs-prose ul,
.docs-prose ol {
    margin: 0 0 20px;
    padding-inline-start: 1.5em;
}

.docs-prose ul {
    list-style-type: disc;
}

.docs-prose ol {
    list-style-type: decimal;
}

.docs-prose li {
    margin: 7px 0;
    padding-inline-start: 2px;
}

.docs-prose ul > li {
    padding-inline-start: 0;
}

.docs-prose li::marker {
    color: var(--docs-muted-fg);
}

.docs-prose li > ul,
.docs-prose li > ol {
    margin: 8px 0;
}

.docs-prose blockquote {
    margin: 24px 0;
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--docs-primary);
    color: var(--docs-fg);
    font-style: normal;
}

.docs-prose blockquote p:last-child {
    margin-bottom: 0;
}

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

.docs-prose img {
    margin: 24px 0;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
}

.docs-prose code {
    padding: 2px 5px;
    border: 1px solid var(--docs-border);
    border-radius: 3px;
    background: var(--docs-secondary);
    color: var(--docs-heading);
    font-family: var(--docs-mono);
    font-size: 14px;
    font-weight: 400;
}

.docs-prose pre code {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: inherit;
}

/* code blocks */

.docs-code {
    position: relative;
    margin: 24px 0;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-code-bg);
    overflow: hidden;
}

.docs-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--docs-border);
    background: rgba(255, 255, 255, 0.02);
}

.docs-code-lang {
    color: var(--docs-muted-fg);
    font-family: var(--docs-mono);
    font-size: 12px;
    text-transform: lowercase;
}

.docs-copy {
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--docs-muted-fg);
    font-size: 12px;
    cursor: pointer;
    transition: background-color 150ms, color 150ms, border-color 150ms;
}

.docs-copy:hover {
    border-color: var(--docs-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--docs-heading);
}

.docs-code pre {
    margin: 0;
    padding: 16px;
    overflow: auto;
    max-height: 600px;
    color: var(--docs-fg);
    font-family: var(--docs-mono);
    font-size: 14px;
    line-height: 1.65;
    tab-size: 2;
}

/* tables */

.docs-table-wrap {
    margin: 24px 0;
    overflow-x: auto;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.docs-table th,
.docs-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--docs-border);
    text-align: left;
    vertical-align: top;
}

.docs-table tr:last-child td {
    border-bottom: 0;
}

.docs-table thead th {
    background: var(--docs-secondary);
    color: var(--docs-heading);
    font-weight: 600;
    white-space: nowrap;
}

/* images */

.docs-image {
    margin: 24px 0;
}

.docs-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
}

.docs-image figcaption {
    margin-top: 8px;
    color: var(--docs-muted-fg);
    font-size: 14px;
    text-align: center;
}

/* callouts */

.docs-callout {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--docs-border);
    border-left-width: 3px;
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    color: var(--docs-fg);
}

.docs-callout-icon {
    flex: none;
    margin-top: 2px;
}

.docs-callout-icon svg {
    width: 18px;
    height: 18px;
}

.docs-callout-body {
    min-width: 0;
    flex: 1;
}

.docs-callout-body > :last-child {
    margin-bottom: 0;
}

.docs-callout-title {
    margin: 0 0 4px;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-weight: 600;
}

.docs-callout-info { border-left-color: #2d87e6; }
.docs-callout-info .docs-callout-icon { color: #5aa6f0; }
.docs-callout-warning { border-left-color: #d9a441; }
.docs-callout-warning .docs-callout-icon { color: #e6bb66; }
.docs-callout-error { border-left-color: var(--docs-primary); }
.docs-callout-error .docs-callout-icon { color: #e76560; }
.docs-callout-success { border-left-color: #3d8f1f; }
.docs-callout-success .docs-callout-icon { color: #6cc24a; }
.docs-callout-idea { border-left-color: #d2443f; }
.docs-callout-idea .docs-callout-icon { color: #e6bb66; }

.docs-banner {
    margin: 24px 0;
    padding: 14px 16px;
    border: 1px solid var(--docs-border);
    border-left-width: 3px;
    border-radius: var(--docs-radius);
    background: var(--docs-card);
}

.docs-banner p {
    margin: 0;
}

.docs-banner-title {
    margin-bottom: 3px !important;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-weight: 600;
}

.docs-banner-info { border-left-color: #2d87e6; }
.docs-banner-warning { border-left-color: #d9a441; }
.docs-banner-error { border-left-color: var(--docs-primary); }
.docs-banner-success { border-left-color: #3d8f1f; }

/* cards */

.docs-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.docs-card {
    display: block;
    padding: 18px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    transition: background-color 150ms, border-color 150ms;
}

a.docs-card:hover {
    border-color: var(--docs-border-strong);
    background: var(--docs-card-hover);
}

.docs-card-icon {
    margin-bottom: 10px;
    color: var(--docs-primary);
}

.docs-card-icon svg {
    width: 20px;
    height: 20px;
}

.docs-card-title {
    margin: 0 0 4px;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-weight: 600;
}

.docs-card-body {
    color: var(--docs-muted-fg);
    font-size: 15px;
}

.docs-card-body > :last-child {
    margin-bottom: 0;
}

/* steps */

.docs-steps {
    position: relative;
    counter-reset: docs-step;
    margin: 24px 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.docs-step {
    position: relative;
    counter-increment: docs-step;
    padding-left: 46px;
}

.docs-step-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--docs-border);
    border-radius: 50%;
    background: var(--docs-secondary);
    color: var(--docs-heading);
    font-size: 14px;
    font-weight: 600;
}

.docs-step-marker::before {
    content: counter(docs-step);
}

.docs-step-title {
    margin: 2px 0 6px;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-weight: 600;
}

.docs-step-body > :last-child {
    margin-bottom: 0;
}

/* tabs */

.docs-tabs {
    margin: 24px 0;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    overflow: hidden;
}

.docs-tab-list {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 0 14px;
    border-bottom: 1px solid var(--docs-border);
    overflow-x: auto;
}

.docs-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 6px 8px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--docs-muted-fg);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.docs-tab:hover {
    color: var(--docs-heading);
}

.docs-tab.is-active {
    border-bottom-color: var(--docs-primary);
    color: var(--docs-heading);
}

.docs-tab-panel {
    display: none;
    padding: 18px;
}

.docs-tab-panel.is-active {
    display: block;
}

.docs-tab-panel > :last-child {
    margin-bottom: 0;
}

/* accordions */

.docs-accordions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 24px 0;
}

.docs-accordion {
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    overflow: hidden;
}

.docs-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    color: var(--docs-heading);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.docs-accordion summary::-webkit-details-marker {
    display: none;
}

.docs-accordion summary::after {
    content: "+";
    color: var(--docs-muted-fg);
    font-weight: 400;
    font-size: 18px;
}

.docs-accordion[open] summary::after {
    content: "−";
}

.docs-accordion-body {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--docs-border);
}

.docs-accordion-body > :last-child {
    margin-bottom: 0;
}

/* file tree */

.docs-files {
    margin: 24px 0;
    padding: 10px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    font-family: var(--docs-mono);
    font-size: 14px;
}

.docs-folder {
    margin: 2px 0;
}

.docs-folder > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 3px;
    color: var(--docs-fg);
    cursor: pointer;
    list-style: none;
}

.docs-folder > summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.docs-folder > summary::-webkit-details-marker {
    display: none;
}

.docs-folder summary svg,
.docs-file svg {
    width: 15px;
    height: 15px;
    flex: none;
    color: var(--docs-muted-fg);
}

.docs-folder-body {
    margin-left: 15px;
    padding-left: 18px;
    border-left: 1px solid var(--docs-border);
}

.docs-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 3px;
    color: var(--docs-muted-fg);
}

.docs-file:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--docs-heading);
}

/* badges */

.docs-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border: 1px solid var(--docs-border);
    border-radius: 999px;
    background: var(--docs-secondary);
    color: var(--docs-fg);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    vertical-align: middle;
}

.docs-badge-blue { border-color: rgba(45, 135, 230, 0.4); color: #7fbcf5; }
.docs-badge-green { border-color: rgba(61, 143, 31, 0.4); color: #8bd36b; }
.docs-badge-red { border-color: rgba(210, 68, 63, 0.4); color: #ec8a86; }
.docs-badge-yellow { border-color: rgba(217, 164, 65, 0.4); color: #e8c17a; }
.docs-badge-orange { border-color: rgba(230, 126, 34, 0.4); color: #f0a86a; }
.docs-badge-purple { border-color: rgba(155, 89, 182, 0.4); color: #c9a0dd; }
.docs-badge-pink { border-color: rgba(231, 76, 156, 0.4); color: #f09ac1; }
.docs-badge-cyan { border-color: rgba(38, 166, 154, 0.4); color: #7fd6cf; }

/* inline toc */

.docs-inline-toc {
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
}

.docs-inline-toc-title {
    margin: 0 0 8px;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 14px;
    font-weight: 600;
}

.docs-inline-toc ul {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.docs-inline-toc a {
    color: var(--docs-muted-fg);
    font-size: 14px;
}

.docs-inline-toc a:hover {
    color: var(--docs-heading);
}

.docs-inline-toc-l3 {
    padding-left: 14px;
}

.docs-mdx-unknown {
    margin: 24px 0;
    padding: 12px 14px;
    border: 1px dashed var(--docs-border-strong);
    border-radius: var(--docs-radius);
}

.docs-mdx-unknown-label {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--docs-muted-fg);
    font-family: var(--docs-mono);
    font-size: 12px;
}

/* ------------------------------------------------------------------ pager */

.docs-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--docs-border);
}

.docs-pager-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    transition: background-color 150ms, border-color 150ms;
}

.docs-pager-link:hover {
    border-color: var(--docs-border-strong);
    background: var(--docs-card-hover);
}

.docs-pager-next {
    text-align: end;
    align-items: flex-end;
}

.docs-pager-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--docs-heading);
    font-size: 16px;
    font-weight: 600;
}

.docs-pager-label svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--docs-primary);
}

.docs-pager-desc {
    width: 100%;
    color: var(--docs-muted-fg);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------- landings */

.docs-landing {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-landing-title {
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
}

.docs-landing-lead {
    max-width: 60ch;
    color: var(--docs-muted-fg);
    font-size: 18px;
    line-height: 1.65;
}

.docs-landing-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--docs-muted-fg);
    font-size: 15px;
}

.docs-landing-stats strong {
    color: var(--docs-heading);
    font-weight: 600;
}

.docs-stat-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.docs-landing-grid,
.docs-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.docs-landing-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    transition: background-color 150ms, border-color 150ms;
}

.docs-landing-card:hover,
.docs-doc-card:hover {
    border-color: var(--docs-border-strong);
    background: var(--docs-card-hover);
}

.docs-landing-icon,
.docs-doc-card-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-secondary);
    color: var(--docs-primary);
}

.docs-landing-icon svg,
.docs-doc-card-icon svg {
    width: 18px;
    height: 18px;
}

.docs-landing-card h2,
.docs-doc-card h2 {
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 19px;
    font-weight: 600;
}

.docs-landing-card p,
.docs-doc-card p {
    color: var(--docs-muted-fg);
    font-size: 15px;
    line-height: 1.55;
}

.docs-landing-meta,
.docs-doc-card-meta {
    margin-top: auto;
    padding-top: 10px;
    color: var(--docs-muted-fg);
    font-size: 14px;
}

.docs-doc-card {
    display: flex;
    flex-direction: row;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    transition: background-color 150ms, border-color 150ms;
}

.docs-doc-card-icon {
    flex: none;
    margin-bottom: 0;
}

.docs-doc-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.docs-empty {
    padding: 48px 24px;
    border: 1px dashed var(--docs-border-strong);
    border-radius: var(--docs-radius);
    text-align: center;
}

.docs-empty h2 {
    margin-bottom: 6px;
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 18px;
    font-weight: 600;
}

.docs-empty p {
    color: var(--docs-muted-fg);
    font-size: 14px;
}

/* error */

.docs-error {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 0;
}

.docs-error h1 {
    color: var(--docs-heading);
    font-family: var(--docs-heading-font);
    font-size: 32px;
    font-weight: 600;
}

.docs-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.docs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    background: var(--docs-card);
    color: var(--docs-fg);
    font-size: 14px;
    font-weight: 500;
}

.docs-button:hover {
    border-color: var(--docs-border-strong);
    background: var(--docs-card-hover);
    color: var(--docs-heading);
}

.docs-button-primary {
    border-color: var(--docs-primary);
    background: var(--docs-primary);
    color: #fff;
}

.docs-button-primary:hover {
    background: var(--docs-primary);
    color: #fff;
    filter: brightness(1.08);
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1120px) {
    .docs-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .docs-toc {
        display: none;
    }
}

@media (max-width: 1023px) {
    .docs-navbar-menu {
        display: grid;
    }

    .docs-navbar-nav {
        display: none;
    }

    .docs-navbar-title {
        display: none;
    }

    .docs-navbar-divider {
        display: none;
    }

    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 250ms ease;
        background: var(--docs-bg);
        box-shadow: 16px 0 48px rgba(0, 0, 0, 0.55);
        z-index: 60;
    }

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

    .docs-overlay {
        display: block;
        position: fixed;
        inset: var(--docs-navbar-height) 0 0;
        z-index: 55;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 250ms ease;
        backdrop-filter: blur(2px);
    }

    .docs-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    body.docs-body.is-drawer-open {
        overflow: hidden;
    }

    .docs-main {
        margin-left: 0;
        padding: 24px 20px 64px;
    }
}

@media (max-width: 640px) {
    .docs-navbar {
        padding: 0 16px;
    }

    .docs-main {
        padding: 20px 16px 56px;
    }

    .docs-main-grid {
        gap: 24px;
    }

    .docs-landing-title {
        font-size: 28px;
    }

    .docs-page-title {
        font-size: 30px;
    }

    .docs-landing-grid,
    .docs-card-grid,
    .docs-cards,
    .docs-pager {
        grid-template-columns: 1fr;
    }

    .docs-pager-next {
        text-align: start;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.docs-html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
