/* DocuWeb theme, modelled on the VitePress default theme.
   Colours are tokens; .dark (set by the theme toggle / system preference) swaps them. */

:root {
    --c-bg: #ffffff;
    --c-bg-alt: #f6f6f7;
    --c-bg-soft: #f6f6f7;
    --c-bg-elv: #ffffff;
    --c-divider: #e2e2e3;
    --c-gutter: #e2e2e3;
    --c-border: #c2c2c4;
    --c-text-1: #3c3c43;
    --c-text-2: #67676c;
    --c-text-3: #929295;
    --c-heading: #1b1b1f;
    --c-brand-1: #3451b2;
    --c-brand-2: #3a5ccc;
    --c-brand-soft: rgba(100, 108, 255, 0.14);
    --c-default-soft: rgba(142, 150, 170, 0.14);
    --c-tip-1: #3451b2;
    --c-tip-soft: rgba(100, 108, 255, 0.14);
    --c-warning-1: #915930;
    --c-warning-soft: rgba(234, 179, 8, 0.14);
    --c-danger-1: #b8272c;
    --c-danger-soft: rgba(244, 63, 94, 0.14);
    --c-code-bg: #f6f6f7;
    --c-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);

    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    --nav-height: 64px;
    --sidebar-width: 288px;
    --content-max: 784px;
    --outline-width: 224px;

    color-scheme: light;
}

.dark {
    --c-bg: #1b1b1f;
    --c-bg-alt: #161618;
    --c-bg-soft: #202127;
    --c-bg-elv: #202127;
    --c-divider: #2e2e32;
    --c-gutter: #000000;
    --c-border: #3c3f44;
    --c-text-1: #dfdfd6;
    --c-text-2: #98989f;
    --c-text-3: #6a6a71;
    --c-heading: #ffffff;
    --c-brand-1: #a8b1ff;
    --c-brand-2: #5c73e7;
    --c-brand-soft: rgba(100, 108, 255, 0.16);
    --c-default-soft: rgba(101, 117, 133, 0.16);
    --c-tip-1: #a8b1ff;
    --c-tip-soft: rgba(100, 108, 255, 0.16);
    --c-warning-1: #f9b44e;
    --c-warning-soft: rgba(234, 179, 8, 0.16);
    --c-danger-1: #f66f81;
    --c-danger-soft: rgba(244, 63, 94, 0.16);
    --c-code-bg: #161618;
    --c-shadow: none;

    color-scheme: dark;
}

/* ---------- Base ---------- */

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

html { scroll-padding-top: calc(var(--nav-height) + 24px); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--c-bg);
    color: var(--c-text-1);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.25s;
}

a { color: var(--c-brand-1); text-decoration: none; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top navigation ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--nav-height);
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-gutter);
}

.dark .nav { border-bottom-color: var(--c-divider); }

.is-staging .nav { box-shadow: inset 0 -2px 0 var(--c-warning-1); }

.nav-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 0 24px;
}

.nav-title {
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--c-heading);
    white-space: nowrap;
}

.nav-logo { display: block; height: 24px; width: auto; }

/* Search box in the top bar */
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 360px;
    min-width: 0;
    margin-left: 24px;
}

.nav-search input {
    width: 100%;
    height: 40px;
    padding: 0 72px 0 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: var(--c-text-1);
    background: var(--c-bg-alt);
    outline: none;
    transition: border-color 0.25s, background-color 0.25s;
}

.nav-search input::placeholder { color: var(--c-text-2); }
.nav-search input:hover, .nav-search input:focus { border-color: var(--c-brand-1); background: var(--c-bg); }
.nav-search input::-webkit-search-cancel-button { display: none; }

.nav-search-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--c-text-2); pointer-events: none; }

.nav-search-key, .search-all kbd {
    padding: 0 6px;
    border: 1px solid var(--c-divider);
    border-radius: 4px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 500;
    line-height: 20px;
    color: var(--c-text-3);
}

.nav-search-key { position: absolute; right: 10px; pointer-events: none; }
.nav-search input:focus ~ .nav-search-key { display: none; }

.search-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(560px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--c-divider);
    border-radius: 12px;
    background: var(--c-bg-elv);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.search-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--c-text-1);
}

.search-item:hover, .search-item[aria-selected="true"] { background: var(--c-brand-soft); }
.search-item-path { display: block; font-size: 12px; line-height: 18px; color: var(--c-text-3); }
.search-item-title { display: block; font-size: 14px; font-weight: 600; line-height: 22px; color: var(--c-heading); }
.search-item[aria-selected="true"] .search-item-title { color: var(--c-brand-1); }

.search-item-snippet, .search-result-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 20px;
    color: var(--c-text-2);
}

mark { padding: 0 1px; border-radius: 2px; color: inherit; background: var(--c-brand-soft); font-weight: 600; }
.search-item mark, .search-result mark { color: var(--c-brand-1); background: transparent; }

.search-empty { margin: 0; padding: 16px 12px; font-size: 14px; color: var(--c-text-2); }

.search-all {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--c-divider);
    font-size: 13px;
    font-weight: 500;
}

/* Search results page */
.search-summary { color: var(--c-text-2); }
.search-results { list-style: none; margin: 24px 0 0; padding: 0; }
.search-results li + li { margin-top: 8px; }

.search-result {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--c-divider);
    border-radius: 8px;
    color: var(--c-text-1);
    transition: border-color 0.25s;
}

.search-result:hover { border-color: var(--c-brand-1); }
.search-result-path { display: block; font-size: 12px; color: var(--c-text-3); }
.search-result-title { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 600; color: var(--c-brand-1); }

/* ---------- Front page (product.html building blocks) ---------- */

.home { max-width: 1152px; margin: 0 auto; padding: 64px 24px 96px; }

.home-hero { padding: 32px 0 48px; }

.home-name {
    margin: 0;
    max-width: 640px;
    font-size: 56px;
    font-weight: 700;
    line-height: 64px;
    letter-spacing: -0.02em;
    color: var(--home-name-color, var(--c-brand-1));
}

.home-text {
    margin: 0;
    max-width: 640px;
    font-size: 56px;
    font-weight: 700;
    line-height: 64px;
    letter-spacing: -0.02em;
    color: var(--c-heading);
}

.home-tagline { margin: 16px 0 0; max-width: 576px; font-size: 20px; line-height: 32px; font-weight: 500; color: var(--c-text-2); }

.home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.button {
    display: inline-block;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 38px;
    white-space: nowrap;
    transition: color 0.25s, background-color 0.25s, border-color 0.25s;
}

.button.brand { color: #ffffff; background: var(--c-brand-2); }
.button.brand:hover { background: var(--c-brand-1); }
.button.alt { color: var(--c-text-1); background: var(--c-default-soft); }
.button.alt:hover { background: var(--c-divider); }

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px 0 48px;
}

.feature {
    display: block;
    padding: 24px;
    border: 1px solid var(--c-bg-soft);
    border-radius: 12px;
    background: var(--c-bg-soft);
    color: var(--c-text-1);
    transition: border-color 0.25s, background-color 0.25s;
}

.feature:hover { border-color: var(--c-brand-1); }
.feature h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 24px; color: var(--c-heading); }
.feature p { margin: 8px 0 0; font-size: 14px; line-height: 24px; color: var(--c-text-2); }

.home-section { padding-top: 32px; border-top: 1px solid var(--c-divider); color: var(--c-text-2); }
.home-section h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; color: var(--c-heading); }
.home-section a { font-weight: 500; }

.nav-end { margin-left: auto; display: flex; flex: none; align-items: center; gap: 8px; }

.nav-link {
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: var(--nav-height);
    white-space: nowrap;
    color: var(--c-text-1);
    transition: color 0.25s;
}

.nav-link:hover { color: var(--c-brand-1); }

.nav-user { font-size: 14px; color: var(--c-text-2); padding-left: 8px; border-left: 1px solid var(--c-divider); }

.icon-button {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--c-text-2);
    cursor: pointer;
    transition: color 0.25s, background-color 0.25s;
}

.icon-button:hover { color: var(--c-text-1); background: var(--c-default-soft); }

.icon-moon { display: none; }
.dark .icon-sun { display: none; }
.dark .icon-moon { display: block; }

.menu-button { display: none; margin-left: -8px; }

.badge {
    display: inline-block;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
}

.badge-warning { color: var(--c-warning-1); background: var(--c-warning-soft); }

/* ---------- Sidebar ---------- */

.sidebar {
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    left: 0;
    z-index: 20;
    width: var(--sidebar-width);
    padding: 24px 24px 64px 32px;
    overflow-y: auto;
    background: var(--c-bg-alt);
    border-right: 1px solid var(--c-divider);
    scrollbar-width: thin;
}

.sidebar-items { list-style: none; margin: 0; padding: 0; }

.sidebar-items .sidebar-items { padding-left: 16px; border-left: 1px solid var(--c-divider); margin-left: 2px; }

.sidebar-top { padding-bottom: 16px; }

.sidebar-link {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--c-text-2);
    transition: color 0.25s;
}

.sidebar-link:hover { color: var(--c-text-1); }

.sidebar-link[aria-current="page"],
.sidebar-group-title[aria-current="page"] { color: var(--c-brand-1); }

.sidebar-group { padding: 16px 0 8px; border-top: 1px solid var(--c-divider); }

.sidebar-group-title {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: var(--c-heading);
}

.sidebar details > summary {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    list-style: none;
    cursor: pointer;
}

.sidebar details > summary::-webkit-details-marker { display: none; }
.sidebar details > summary .sidebar-link { flex: 1; }

.caret {
    flex: none;
    width: 24px;
    height: 28px;
    background: currentColor;
    color: var(--c-text-3);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
    transition: transform 0.25s;
}

.sidebar details[open] > summary .caret { transform: rotate(90deg); }

.sidebar-backdrop { display: none; }

/* ---------- Page layout ---------- */

.layout.has-sidebar .doc-container { padding-left: var(--sidebar-width); }

.doc {
    display: flex;
    justify-content: center;
    gap: 64px;
    padding: 48px 48px 96px;
}

.doc-content { flex: 1 1 auto; min-width: 0; max-width: var(--content-max); }

.outline {
    flex: none;
    width: var(--outline-width);
    position: sticky;
    top: calc(var(--nav-height) + 48px);
    align-self: flex-start;
    max-height: calc(100vh - var(--nav-height) - 96px);
    overflow-y: auto;
    padding-left: 16px;
    border-left: 1px solid var(--c-divider);
}

.outline-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 32px; color: var(--c-heading); }
.outline ul { list-style: none; margin: 0; padding: 0; }
.outline li.level-3 { padding-left: 12px; }

.outline a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 30px;
    color: var(--c-text-2);
    transition: color 0.25s;
}

.outline a:hover, .outline a.active { color: var(--c-brand-1); }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--c-text-3);
}

.breadcrumbs a { color: var(--c-text-2); }
.breadcrumbs a:hover { color: var(--c-brand-1); }

.doc-title {
    margin: 0 0 24px;
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
    letter-spacing: -0.02em;
    color: var(--c-heading);
}

.empty { padding: 96px 0; text-align: center; color: var(--c-text-2); }
.empty h1 { color: var(--c-heading); font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Doc footer ---------- */

.doc-footer { margin-top: 64px; }

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--c-text-2);
}

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--c-divider);
}

.pager-link {
    display: block;
    padding: 11px 16px 13px;
    border: 1px solid var(--c-divider);
    border-radius: 8px;
    transition: border-color 0.25s;
}

.pager-link:hover { border-color: var(--c-brand-1); }
.pager-link.next { grid-column: 2; text-align: right; }
.pager-label { display: block; font-size: 12px; font-weight: 500; line-height: 20px; color: var(--c-text-2); }
.pager-title { display: block; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--c-brand-1); }

/* ---------- Document content (Confluence HTML) ---------- */

.vp-doc { overflow-wrap: break-word; }

.vp-doc > :first-child { margin-top: 0; }

.vp-doc h1, .vp-doc h2, .vp-doc h3, .vp-doc h4, .vp-doc h5, .vp-doc h6 {
    position: relative;
    font-weight: 600;
    outline: none;
    color: var(--c-heading);
    text-align: left !important; /* Confluence sometimes centers headings inline */
}

.vp-doc h1 { margin: 48px 0 16px; font-size: 28px; line-height: 36px; letter-spacing: -0.02em; }

.vp-doc h2 {
    margin: 48px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--c-divider);
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -0.02em;
}

.vp-doc h3 { margin: 32px 0 0; font-size: 20px; line-height: 28px; letter-spacing: -0.01em; }
.vp-doc h4 { margin: 24px 0 0; font-size: 18px; line-height: 24px; }

.vp-doc p, .vp-doc summary { margin: 16px 0; line-height: 28px; }

.vp-doc a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; transition: color 0.25s, opacity 0.25s; }
.vp-doc a:hover { color: var(--c-brand-2); }

.vp-doc strong { font-weight: 600; color: var(--c-heading); }

.vp-doc ul, .vp-doc ol { margin: 16px 0; padding-left: 1.25rem; }
.vp-doc ul { list-style: disc; }
.vp-doc ol { list-style: decimal; }
.vp-doc li + li { margin-top: 8px; }
.vp-doc li > p { margin: 8px 0; }
.vp-doc li > ul, .vp-doc li > ol { margin: 8px 0 0; }

.vp-doc blockquote {
    margin: 16px 0;
    padding-left: 16px;
    border-left: 2px solid var(--c-divider);
    color: var(--c-text-2);
}

.vp-doc hr { margin: 16px 0; border: none; border-top: 1px solid var(--c-divider); }

/* Inline code and code blocks (Confluence code macro: div.code > div.codeContent > pre) */
.vp-doc :not(pre) > code {
    padding: 3px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--c-text-1);
    background: var(--c-default-soft);
}

.vp-doc pre {
    margin: 16px 0;
    padding: 20px 24px;
    overflow-x: auto;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--c-text-1);
    background: var(--c-code-bg);
    white-space: pre;
}

.vp-doc .code.panel { margin: 16px 0; border: 0 !important; }
.vp-doc .code.panel pre { margin: 0; }

/* Tables (Confluence: div.table-wrap > table.confluenceTable) */
.vp-doc .table-wrap { margin: 20px 0; overflow-x: auto; }

.vp-doc table {
    display: block;
    max-width: 100%;
    margin: 20px 0;
    overflow-x: auto;
    border-collapse: collapse;
}

.vp-doc .table-wrap table { margin: 0; }
.vp-doc col { width: auto !important; }

.vp-doc tr { border-top: 1px solid var(--c-divider); transition: background-color 0.5s; }
.vp-doc tr:nth-child(2n) { background: var(--c-bg-soft); }

.vp-doc th, .vp-doc td {
    padding: 8px 16px;
    border: 1px solid var(--c-divider);
    font-size: 14px;
    text-align: left;
    vertical-align: top;
}

.vp-doc th { font-weight: 600; color: var(--c-text-2); background: var(--c-bg-soft); }
.vp-doc td > p:first-child, .vp-doc th > p:first-child { margin-top: 0; }
.vp-doc td > p:last-child, .vp-doc th > p:last-child { margin-bottom: 0; }
.vp-doc td > p, .vp-doc th > p { line-height: 24px; }

/* Images (Confluence wraps them in span.confluence-embedded-file-wrapper) */
.vp-doc img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    vertical-align: middle;
}

.vp-doc .confluence-embedded-file-wrapper { display: inline-block; max-width: 100%; }
.vp-doc .image-center-wrapper { display: block; text-align: center; }
.vp-doc .image-center-wrapper img { margin: 8px auto; }

/* Column layouts */
.vp-doc .columnLayout { display: flex; flex-wrap: wrap; gap: 32px; margin: 24px 0; }
.vp-doc .columnLayout > .cell { flex: 1 1 280px; min-width: 0; }

/* Headings in columns: no section divider, they sit side by side */
.vp-doc .columnLayout h2 { margin-top: 24px; padding-top: 0; border-top: 0; font-size: 20px; line-height: 28px; }
.vp-doc .columnLayout h3 { margin-top: 16px; font-size: 17px; line-height: 24px; }
.vp-doc .columnLayout .innerCell > :first-child { margin-top: 0; }

/* Callouts (Confluence info/tip/note/warning panels, converted by the transformer) */
.custom-block {
    margin: 16px 0;
    padding: 16px 16px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    line-height: 24px;
    color: var(--c-text-1);
}

.custom-block p { margin: 8px 0; line-height: 24px; }
.custom-block > :first-child { margin-top: 0; }
.custom-block-title { font-weight: 600; }

.custom-block.info { background: var(--c-default-soft); }
.custom-block.tip { background: var(--c-tip-soft); }
.custom-block.warning { background: var(--c-warning-soft); }
.custom-block.danger { background: var(--c-danger-soft); }

.custom-block.tip strong { color: var(--c-tip-1); }
.custom-block.warning strong { color: var(--c-warning-1); }
.custom-block.danger strong { color: var(--c-danger-1); }

/* Expand macros, converted to details */
.custom-block.details { padding: 12px 16px; border-color: var(--c-divider); background: transparent; }
.custom-block.details > summary { margin: 0; font-weight: 600; cursor: pointer; }
.custom-block.details[open] > summary { margin-bottom: 8px; }

/* Remaining Confluence widgets */
.vp-doc .content-by-label { list-style: none; padding-left: 0; }
.vp-doc .content-by-label .details { display: inline; }
.vp-doc .toc-macro ul { list-style: none; padding-left: 16px; }

/* Confluence's own table of contents duplicates the outline column where that is visible */
@media (min-width: 1280px) {
    .vp-doc .toc-macro { display: none; }
}

/* ---------- Narrow pages (admin, error) ---------- */

.content.narrow { max-width: 960px; margin: 0 auto; padding: 48px 24px 96px; }

.content.narrow h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--c-heading); }
.content.narrow h2 { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-divider); font-size: 20px; font-weight: 600; color: var(--c-heading); }
.content.narrow h3 { font-size: 16px; font-weight: 600; color: var(--c-heading); }

.admin table { border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.admin th, .admin td { padding: 8px 16px; border: 1px solid var(--c-divider); text-align: left; vertical-align: middle; }
.admin th { background: var(--c-bg-soft); color: var(--c-text-2); font-weight: 600; }
.admin td form { margin: 0; }
.admin .actions { display: flex; gap: 8px; }
/* Admin: access keys */
.access-keys input[readonly] { width: 100%; min-width: 300px; font-family: var(--font-mono, monospace); font-size: 12px; }
.access-keys tr.disabled td:not(.actions) { opacity: 0.55; }
.access-keys td.actions { display: flex; gap: 8px; }

.notice { padding: 12px 16px; border-radius: 8px; background: var(--c-tip-soft); font-size: 14px; }
.error { padding: 12px 16px; border-radius: 8px; background: var(--c-danger-soft); color: var(--c-danger-1); white-space: pre-wrap; font-size: 13px; }
.warnings { margin: 8px 0 16px; padding: 12px 16px; border-radius: 8px; background: var(--c-warning-soft); color: var(--c-warning-1); font-size: 14px; }

button:not(.icon-button) {
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 38px;
    color: #ffffff;
    background: var(--c-brand-2);
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

button:not(.icon-button):hover { background: var(--c-brand-1); }
.dark button:not(.icon-button):hover { background: #6f83ec; }

button.secondary { color: var(--c-text-1); background: var(--c-default-soft); }
button.secondary:hover { color: var(--c-text-1); background: var(--c-divider) !important; }
button:disabled { opacity: 0.5; cursor: default; }

.status, .change { padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--c-default-soft); }
.status-failed, .change-removed { color: var(--c-danger-1); background: var(--c-danger-soft); }
.status-completed, .status-published, .change-added { color: #18794e; background: rgba(16, 185, 129, 0.14); }
.dark .status-completed, .dark .status-published, .dark .change-added { color: #3dd68c; }
.status-running, .change-updated { color: var(--c-brand-1); background: var(--c-brand-soft); }
.change-moved { color: var(--c-warning-1); background: var(--c-warning-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 1279px) {
    .outline { display: none; }
}

@media (max-width: 959px) {
    .menu-button { display: inline-flex; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s, box-shadow 0.25s;
        border-right: 0;
    }

    .sidebar-open .sidebar { transform: none; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1); }

    .sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: var(--nav-height) 0 0 0;
        z-index: 15;
        background: rgba(0, 0, 0, 0.6);
    }

    .layout.has-sidebar .doc-container { padding-left: 0; }
    .doc { padding: 32px 24px 64px; }
    .nav-inner { padding: 0 16px; }
    .nav-user { display: none; }
    .nav-search { margin-left: 8px; flex: 1 1 auto; }
    .nav-search-key { display: none; }
    .nav-search input { padding-right: 12px; }
}

@media (max-width: 639px) {
    /* Search collapses to an icon and expands over the top bar while in use. */
    .nav-inner { position: relative; }
    .nav-search { flex: 0 0 36px; margin-left: auto; position: static; }
    .nav-search input { width: 36px; height: 36px; padding: 0 0 0 36px; background: transparent; cursor: pointer; }
    .nav-search input::placeholder { color: transparent; }
    .nav-search-icon { left: auto; margin-left: 10px; }
    .nav-search:focus-within { position: absolute; inset: 12px 16px; z-index: 5; display: flex; }
    .nav-search:focus-within .nav-search-icon { margin-left: 12px; }
    .nav-search:focus-within input { width: 100%; height: 40px; padding: 0 12px 0 38px; background: var(--c-bg-alt); cursor: text; }
    .nav-search:focus-within input::placeholder { color: var(--c-text-2); }
    .search-popover { top: calc(100% + 8px); width: 100%; }
    .nav-end { margin-left: 0; }

    .nav-title:has(.nav-logo) .nav-title-text { display: none; }
    .nav-logo { height: 20px; }
    .home { padding: 32px 16px 64px; }
    .home-name, .home-text { font-size: 36px; line-height: 44px; }
    .home-tagline { font-size: 18px; line-height: 28px; }
    .pager { grid-template-columns: 1fr; }
    .pager-link.next { grid-column: 1; }
    .doc-title { font-size: 28px; line-height: 36px; }
}

/* Image lightbox */
.vp-doc img.zoomable { cursor: zoom-in; }

.lightbox {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 24px;
    border: 0;
    background: transparent;
    cursor: zoom-out;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}
.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}
.lightbox-close svg { flex-shrink: 0; }
.lightbox-close:hover, .lightbox-close:focus-visible { background: rgba(255, 255, 255, 0.3); }
