/* Shared reading experience for public manuals and the account help center. */
.kb {
    container-type: inline-size;
    --kb-text: var(--bs-gray-700, #334155);
    --kb-heading: #171d29;
    --kb-muted: #657187;
    --kb-border: #dfe5ef;
    --kb-surface: #fff;
    --kb-soft: #f5f7fb;
    --kb-accent: #0878c9;
    --kb-accent-soft: #eaf4ff;
    --kb-sticky-top: 100px;
    color: var(--kb-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    padding-block: 0 32px;
    overflow-wrap: anywhere;
}
.kb *, .kb *::before, .kb *::after { box-sizing: border-box; }
.kb [hidden] { display: none !important; }
.kb a { color: var(--kb-accent); text-decoration: none; }
.kb a:hover { text-decoration: underline; }
.kb :is(a, button, input, summary):focus-visible,
.kb-image-dialog :is(a, button):focus-visible { outline: 3px solid #68a7ed; outline-offset: 4px; }
.kb button, .kb input, .kb summary { font: inherit; }
.kb-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 14px; color: var(--kb-muted); }
.kb-breadcrumbs a { color: var(--kb-muted); }
.kb-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; width: 100%; }

.kb-main { min-width: 0; }
.kb-rail, .kb-layout > .kb-sidebar { position: sticky; top: var(--kb-sticky-top); max-height: calc(100vh - var(--kb-sticky-top) - 24px); overflow-y: auto; scrollbar-width: thin; }
.kb-sidebar, .kb-toc { min-width: 0; }
.kb-sidebar { padding: 16px; background: var(--kb-surface); border: 1px solid var(--kb-border); border-radius: 14px; }
.kb-sidebar details { margin: 0; }
.kb-sidebar summary, .kb-toc summary { cursor: pointer; color: var(--kb-heading); font-size: 14px; font-weight: 600; padding-block: 8px; }
.kb-nav-title { margin: 0 0 10px; color: var(--kb-heading); font-size: 14px; font-weight: 600; }
.kb-nav-list { display: grid; gap: 4px; padding: 0; margin: 0; list-style: none; }
.kb-nav-list a { display: flex; justify-content: space-between; gap: 12px; border-radius: 8px; padding: 10px 12px; color: var(--kb-muted); font-size: 14px; line-height: 1.45; }
.kb-nav-list a:hover, .kb-nav-list a[aria-current], .kb-nav-list a.is-active { background: var(--kb-accent-soft); color: var(--kb-accent); text-decoration: none; }
.kb-nav-list a span:last-child:not(:first-child) { color: var(--kb-muted); font-size: 13px; flex-shrink: 0; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.kb-tags a { border: 1px solid var(--kb-border); border-radius: 7px; padding: 4px 9px; color: var(--kb-muted); font-size: 13px; }
.kb-tags a:hover, .kb-tags a[aria-current], .kb-tags a.is-active { color: var(--kb-accent); background: var(--kb-accent-soft); border-color: var(--kb-accent); text-decoration: none; }
.kb-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.kb-heading-copy { flex: 1; min-width: 0; }
.kb-eyebrow { display: block; margin-bottom: 12px; color: var(--kb-accent); font-size: 13px; font-weight: 600; }
.kb .kb-title { margin: 0 0 8px; color: var(--kb-heading); font-size: 30px; font-weight: 750; line-height: 1.3; letter-spacing: -.025em; }
.kb .kb-lead { margin: 0; color: var(--kb-muted); font-size: 15px; font-weight: 400; line-height: 1.65; }
.kb-hero .kb-search { flex: 0 1 460px; margin: 0; }
.kb-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 100%; margin-block: 20px 0; }
.kb-search label { flex-basis: 100%; color: var(--kb-heading); font-size: 14px; font-weight: 600; }
.kb-search input { flex: 1 1 180px; width: 0; min-width: 0; padding: 12px 16px; border: 1px solid var(--kb-border); border-radius: 10px; background: var(--kb-surface); color: var(--kb-heading); box-shadow: 0 2px 5px rgba(15, 23, 42, .03); }
.kb-search input::placeholder { color: var(--kb-muted); }
.kb-search button { flex-shrink: 0; border: 1px solid var(--kb-accent); border-radius: 10px; background: var(--kb-accent); color: #fff; padding: 12px 22px; font-weight: 600; cursor: pointer; }
.kb-search button:hover { filter: brightness(.92); }
.kb-sidebar .kb-search { margin: 0 0 26px; }
.kb-sidebar .kb-search input { flex-basis: 100%; width: 100%; }
.kb-sidebar .kb-search button { width: 100%; padding: 8px 16px; }
.kb-article-header { padding-bottom: 26px; margin-bottom: 32px; border-bottom: 1px solid var(--kb-border); }
.kb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--kb-muted); font-size: 13px; }
.kb-meta a { font-size: inherit; }
.kb .kb-prose { color: var(--kb-text); }
.kb-prose > :first-child { margin-top: 0; }
.kb-prose :is(p, ul, ol, blockquote, pre, figure, table) { margin-block: 0 1.35em; }
.kb-prose :is(h1, h2, h3, h4, h5, h6) { color: var(--kb-heading); font-weight: 600; line-height: 1.3; letter-spacing: -.015em; margin: 2em 0 .75em; scroll-margin-top: calc(var(--kb-sticky-top) + 16px); }
.kb-prose :is(ul, ol) { padding-left: 1.5em; }
.kb-prose li { margin-block: .4em; padding-left: .2em; }
.kb-prose li > :is(ul, ol) { margin-bottom: 0; }
.kb-prose a { text-decoration: underline; text-underline-offset: .2em; }
.kb-prose strong, .kb-prose b { font-weight: 600; }
.kb-prose blockquote { padding: 16px 22px; border-left: 3px solid var(--kb-accent); border-radius: 0 10px 10px 0; background: var(--kb-accent-soft); color: var(--kb-text); }
.kb-prose blockquote > :last-child { margin-bottom: 0; }
.kb-prose pre { overflow-x: auto; padding: 20px; border: 1px solid var(--kb-border); border-radius: 10px; background: var(--kb-soft); color: var(--kb-text); font-size: 14px; line-height: 1.65; white-space: pre; overflow-wrap: normal; }
.kb-prose code { padding: .15em .35em; border-radius: 4px; color: var(--kb-heading); background: var(--kb-soft); font-size: .88em; }
.kb-prose pre code { padding: 0; font-size: inherit; }
.kb-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.kb-prose :is(td, th) { border: 1px solid var(--kb-border); padding: 10px 14px; text-align: left; }
.kb-prose th { background: var(--kb-soft); color: var(--kb-heading); font-weight: 600; }
.kb-prose :is(img, video, iframe, embed) { max-width: 100%; }
.kb-prose img { height: auto; }
.kb-prose :is(video, iframe) { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; margin-block: 24px; }
.kb-prose figure { max-width: 100% !important; }
.kb-prose figcaption { margin-top: 10px; color: var(--kb-muted); font-size: 14px; text-align: center; }
.kb-media { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; margin: 24px 0; padding: 16px; border: 1px solid var(--kb-border); border-radius: 12px; background: var(--kb-soft); cursor: zoom-in; text-align: center; }
.kb-prose .kb-media img { display: block; width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important; max-width: 100% !important; max-height: 480px !important; margin: 0 auto !important; object-fit: contain; border-radius: 4px; }
.kb-media:hover { border-color: var(--kb-accent); }
.kb-media-hint { margin-top: 10px; color: var(--kb-muted); font-size: 13px; font-weight: 400; line-height: 1.4; }
.kb-prose .kb-inline-image { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
/* Quill-generated content needs its semantic alignment and indentation outside the editor. */
.kb-prose .ql-align-center { text-align: center; }
.kb-prose .ql-align-right { text-align: right; }
.kb-prose .ql-align-justify { text-align: justify; }
.kb-prose .ql-indent-1 { padding-left: 2em; }
.kb-prose .ql-indent-2 { padding-left: 4em; }
.kb-prose .ql-indent-3 { padding-left: 6em; }
.kb-prose .ql-size-small { font-size: .85em; }
.kb-prose .ql-size-large { font-size: 1.2em; }
.kb-prose .ql-size-huge { font-size: 1.4em; }
.kb-toc { margin-top: 16px; padding: 16px; border: 1px solid var(--kb-border); border-radius: 14px; background: var(--kb-surface); }
.kb-toc nav { display: grid; gap: 4px; margin-top: 12px; }
.kb-toc a { display: block; padding: 6px 0; color: var(--kb-muted); font-size: 13px; line-height: 1.45; }
.kb-toc a[data-level="3"] { padding-left: 12px; }
.kb-toc a[aria-current="location"] { color: var(--kb-accent); font-weight: 600; }
/* Account articles keep the TOC after the article in reading order. */
.kb-layout--account > .kb-toc { grid-column: 2; margin-top: 0; }
.kb-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kb-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--kb-border); border-radius: 12px; background: var(--kb-surface); transition: border-color .15s, box-shadow .15s; }
.kb-card:hover { border-color: #99bde4; box-shadow: 0 6px 18px rgba(15, 23, 42, .04); }
.kb-card-category { display: block; margin-bottom: 12px; color: var(--kb-muted); font-size: 13px; }
.kb .kb-card-title { margin: 0 0 10px; color: var(--kb-heading); font-size: 18px; font-weight: 600; line-height: 1.4; }
.kb-card-title a { color: inherit; }
.kb-card-title a:hover { color: var(--kb-accent); }
.kb-card-description { margin: 0; color: var(--kb-muted); font-size: 15px; font-weight: 400; line-height: 1.65; }
.kb-empty { padding: 36px; border: 1px dashed var(--kb-border); border-radius: 12px; background: var(--kb-surface); color: var(--kb-muted); }
.kb-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 32px; font-size: 14px; }
.kb-pagination a { padding: 8px 14px; border: 1px solid var(--kb-border); border-radius: 8px; background: var(--kb-surface); }
.kb-related { border-top: 1px solid var(--kb-border); margin-top: 48px; padding-top: 28px; }
.kb-related > h2 { color: var(--kb-heading); font-size: 22px; margin: 0 0 20px; }
.kb-image-dialog { width: min(1200px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 18px; border: 1px solid #334155; border-radius: 14px; background: #101722; color: #f1f5f9; box-shadow: 0 24px 80px #0006; }
.kb-image-dialog::backdrop { background: rgba(3, 7, 18, .85); }
.kb-image-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; font: 14px/1.5 Inter, sans-serif; }
.kb-image-dialog-bar a { color: #b8d9ff; text-decoration: underline; }
.kb-image-dialog button { padding: 9px 14px; border: 1px solid #64748b; border-radius: 8px; background: #1e293b; color: #fff; font: inherit; cursor: pointer; }
.kb-image-dialog img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; margin: auto; }
[data-bs-theme="dark"] .kb, [data-theme="dark"] .kb {
    --kb-text: #d1d9e6; --kb-heading: #edf2f9; --kb-muted: #a1adc0; --kb-border: #303c50;
    --kb-surface: #1b2535; --kb-soft: #16202f; --kb-accent: #83baff; --kb-accent-soft: #1c324d;
}
[data-bs-theme="dark"] .kb-search button, [data-theme="dark"] .kb-search button { color: #10243d; }

/* Public pages use the same responsive .container as the blog and breadcrumbs. */
.public-v2-page .kb { --kb-heading: #0f172a; --kb-muted: #64748b; --kb-border: #e5e7eb; --kb-accent: #0e8bec; --kb-accent-soft: #eaf5fe; }
.public-v2-page .kb-search button { background: #e8a33d; border-color: #d7932f; color: #17110a; }
.public-v2-page .kb-hub .kb-search { flex: 1; max-width: 100%; }
.kb-search > div { display: flex; flex: 1 1 100%; gap: 10px; min-width: 0; }
.kb-article-surface { padding: 32px; border: 1px solid var(--kb-border); border-radius: 14px; background: var(--kb-surface); }
.kb-article-header .kb-lead { margin-block: 16px 22px; padding-left: 16px; border-left: 3px solid var(--kb-accent); }
.kb-topbar, .kb-results-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.kb-topbar .kb-breadcrumbs { margin: 0; }
.kb-topbar .kb-search { flex: 0 1 430px; margin: 0; }
.kb-topbar .kb-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kb .kb-section-title { margin: 0 0 18px; font-size: 20px; font-weight: 600; color: var(--kb-heading); }
.kb-results-heading .kb-section-title { margin: 0; }
.kb-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.kb-topic { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--kb-border); border-radius: 14px; background: var(--kb-surface); }
.kb a.kb-topic { color: var(--kb-heading); font-size: 15px; }
.kb a.kb-topic:hover, .kb a.kb-card:hover { text-decoration: none; border-color: var(--kb-accent); }
.kb-topic > span, .kb-count { color: var(--kb-muted); font-size: 13px; font-weight: 400; }
.kb .kb-card-action { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 600; }
.kb-article-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--kb-border); font-size: 14px; }
.kb-prose img:not(.kb-inline-image) { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 480px !important; object-fit: contain; }
.kb-collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.kb-collection { min-width: 0; padding: 24px; border: 1px solid var(--kb-border); border-radius: 14px; background: var(--kb-surface); }
.kb-collection header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--kb-border); }
.kb-collection h2 { margin: 0; font-size: 20px; color: var(--kb-heading); }
.kb-collection ul { list-style: none; margin: 0 0 20px; padding: 0; }
.kb-collection li { padding: 16px 0; border-bottom: 1px solid var(--kb-border); }
.kb-collection li a { color: var(--kb-heading); font-size: 15px; font-weight: 600; }
.kb-collection li p { margin: 6px 0 0; color: var(--kb-muted); font-size: 13px; line-height: 1.6; }
.kb-collection-more { font-size: 14px; font-weight: 600; }
html.dark-mode .kb, body.dark-mode .kb, [data-bs-theme="dark"] .kb, [data-theme="dark"] .kb {
    --kb-text: #b4bbc8; --kb-heading: #eceef2; --kb-muted: #a1aabd; --kb-border: #232936;
    --kb-surface: #10141b; --kb-soft: #151a23; --kb-accent: #59b6ff; --kb-accent-soft: #12263d;
}
html.dark-mode .kb-search button, body.dark-mode .kb-search button { color: #10243d; }
@container (min-width: 1051px) {
    /* Only reserve a third column when the article has a visible TOC. */
    .kb-layout--account:has(> .kb-toc:not([hidden])) { grid-template-columns: 240px minmax(0, 1fr) 220px; }
    .kb-layout--account > .kb-toc { grid-column: 3; position: sticky; top: var(--kb-sticky-top); max-height: calc(100vh - var(--kb-sticky-top) - 24px); overflow-y: auto; scrollbar-width: thin; }
}
@container (max-width: 1050px) {
    .kb-layout { grid-template-columns: 210px minmax(0, 1fr); }
    .kb-topic-grid, .kb-collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kb-hero { align-items: stretch; flex-direction: column; }
    .kb-hero .kb-search { flex-basis: auto; }
    .kb-article-surface { padding: 24px; }
}
@container (max-width: 700px) {
    .kb-layout { display: flex; flex-direction: column; gap: 16px; }
    .kb-rail, .kb-layout > .kb-sidebar { width: 100%; position: static; max-height: none; }
    .kb-main { width: 100%; }
    .kb-layout--account > .kb-toc { width: 100%; grid-column: auto; }
    .kb-sidebar, .kb-toc { padding: 10px 14px; }
    .kb-article-surface { padding: 20px; }
    .kb-results, .kb-collections { grid-template-columns: 1fr; }
    .kb .kb-title { font-size: 26px; }
}
@media (max-width: 767px) {
    .kb { --kb-sticky-top: 80px; }
    .kb-hero { flex-direction: column; align-items: stretch; }
    .kb-hero .kb-search { flex-basis: auto; }
    .kb-topic-grid { grid-template-columns: 1fr; }
    .kb-image-dialog { width: calc(100vw - 16px); padding: 12px; }
    .kb-prose .kb-media img { max-height: 400px !important; }
}
@media (prefers-reduced-motion: reduce) { .kb-card { transition: none; } }
@media print {
    .kb-rail, .kb-sidebar, .kb-toc, .kb-search, .kb-media-hint, .kb-related, .support-nav { display: none; }
    .kb-layout { display: block; }
    .kb-media { border: 0; padding: 0; }
}
