/* docs-tabler-theme — custom overrides on top of Tabler v1.4 (Bootstrap 5.3-based). */

/* --- Fixed navbar ---
   Navbar uses position: fixed; keep page content clear of it and let
   anchor navigation land below the navbar. */
body {
  padding-top: 4.5rem;
}

/* Navbar logo: swap between the light (site.logo) and dark (site.logo_dark)
   versions via the data-bs-theme attribute set on <html> by the theme
   toggle. If logo_dark is omitted, only the light <img> exists, so the
   light logo is used in both modes. */
.navbar-logo-dark {
  display: none;
}

[data-bs-theme="dark"] .navbar-logo-light {
  display: none;
}

[data-bs-theme="dark"] .navbar-logo-dark {
  display: inline-block;
}

/* Navbar and footer nav-link icons (feather): scale with the font and align
   to the baseline. The external-link indicator uses a muted color so it
   reads as a suffix, not part of the label. */
.navbar .nav-link .feather,
.navbar .dropdown-item .feather,
footer .nav-link .feather {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  margin-right: 0.375rem;
}

.navbar .nav-link .feather.feather-external-link,
.navbar .dropdown-item .feather.feather-external-link,
footer .nav-link .feather.feather-external-link {
  width: 0.875em;
  height: 0.875em;
  margin-right: 0;
  color: var(--tblr-secondary-color);
}

/* Nav items with `collapsed: true` hide their label in the expanded md+
   navbar, showing only the icon; the label returns in the mobile (< md)
   collapsed menu. The title is still used as the accessible name via
   aria-label, so the icon-only link stays readable to screen readers. */
@media (min-width: 768px) {

  .navbar-expand-md .nav-item.collapsed>.nav-link .nav-link-label,
  .navbar-expand-md .nav-item.collapsed>.dropdown-toggle .nav-link-label,
  .navbar-expand-md .dropdown-item.collapsed .nav-link-label {
    display: none;
  }

  .navbar-expand-md .nav-item.collapsed>.nav-link .feather,
  .navbar-expand-md .nav-item.collapsed>.dropdown-toggle .feather,
  .navbar-expand-md .dropdown-item.collapsed .feather {
    margin-right: 0;
  }
}

/* Footer: the container-xl class sets its own padding (gutter/2) and outranks
   a bare `footer` rule, so scope with .container-xl. Give the footer a roomier
   horizontal padding, tied to the theme gutter var (4rem desktop / 2rem
   mobile). */
footer.container-xl {
  padding-inline: calc(var(--tblr-gutter-x) * 2);
}

/* Nav parents without a link render as <span class="nav-link dropdown-toggle">
   (see navbar.html). Give them a pointer cursor — a span has none by default;
   Bootstrap's caret ::after still renders on any element. */
.navbar .nav-link.dropdown-toggle[data-bs-toggle="dropdown"] {
  cursor: pointer;
}

/* Mobile navbar collapse as an overlay: below md the menu drops down below the
   fixed navbar as a panel instead of growing the navbar, so the brand (logo +
   title) never moves when the hamburger is toggled. */
@media (max-width: 767.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1020;
    background-color: var(--tblr-bg-surface);
    border-bottom: var(--tblr-border-width) solid var(--tblr-border-color-translucent);
    box-shadow: var(--tblr-shadow-dropdown);
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
    padding: 0.75rem 1rem 1rem;
  }
}

/* Breathing room between the brand (logo + title) and the nav links. Only in
   the expanded md+ layout; the collapsed mobile menu is unaffected. */
@media (min-width: 768px) {
  .navbar-expand-md .navbar-nav {
    margin-left: 1.5rem;
    gap: 0.5rem;
  }
}

/* --- Monochrome (black & white) palette ---
   Tabler's semantic colours are blue-tinted (#066fd1 primary, #4299e1 info).
   Override them to greyscale in BOTH schemes so the whole UI — links, buttons,
   badges, focus rings, pagination, active states — becomes black & white.
   These run after tabler.min.css, so they win. Code blocks / Rouge tokens
   stay coloured (separate --tblr-rouge-* vars). */
:root {
  --tblr-primary: #000000;
  --tblr-primary-rgb: 0, 0, 0;
  --tblr-primary-fg: #ffffff;
  --tblr-primary-bg-subtle: #f3f4f6;
  --tblr-primary-border-subtle: #d1d5db;
  --tblr-primary-text-emphasis: #111827;

  --tblr-link-color: #000000;
  --tblr-link-color-rgb: 0, 0, 0;
  --tblr-link-hover-color: #4b5563;
  --tblr-link-hover-color-rgb: 75, 85, 99;

  --tblr-info: #6b7280;
  --tblr-info-rgb: 107, 114, 128;
  --tblr-info-bg-subtle: #f3f4f6;
  --tblr-info-border-subtle: #d1d5db;
  --tblr-info-text-emphasis: #374151;

  --tblr-active-bg: rgba(0, 0, 0, 0.06);
  --tblr-bg-forms: #ffffff;
}

/* --- Pure black dark color scheme ---
   Tabler's dark palette is blue-tinted (#111827 / #1f2937). These overrides
   run after tabler.min.css, so they win and neutralize the blue. */
[data-bs-theme="dark"] {
  --tblr-body-bg: #000000;
  --tblr-bg-surface: #0d0d0d;
  --tblr-bg-surface-secondary: #0d0d0d;
  --tblr-bg-surface-tertiary: #111111;
  --tblr-bg-surface-primary: #0d0d0d;
  --tblr-bg-surface-dark: #111111;
  --tblr-bg-surface-inverted: #ffffff;
  --tblr-border-color: #2a2a2a;
  --tblr-border-color-translucent: rgba(255, 255, 255, 0.12);

  --tblr-primary: #ffffff;
  --tblr-primary-rgb: 255, 255, 255;
  --tblr-primary-fg: #000000;
  --tblr-primary-bg-subtle: #1f2937;
  --tblr-primary-border-subtle: #374151;
  --tblr-primary-text-emphasis: #f3f4f6;

  --tblr-link-color: #e5e7eb;
  --tblr-link-color-rgb: 229, 231, 235;
  --tblr-link-hover-color: #ffffff;
  --tblr-link-hover-color-rgb: 255, 255, 255;

  --tblr-info: #9ca3af;
  --tblr-info-rgb: 156, 163, 175;
  --tblr-info-bg-subtle: #1f2937;
  --tblr-info-border-subtle: #374151;
  --tblr-info-text-emphasis: #e5e7eb;

  --tblr-active-bg: rgba(255, 255, 255, 0.08);
  --tblr-bg-forms: #0d0d0d;
}

:target,
.docs-content h1[id],
.docs-content h2[id],
.docs-content h3[id],
.docs-content h4[id] {
  scroll-margin-top: 5rem;
}

/* --- Docs content --- */
.docs-content {
  min-width: 0;
  padding-inline: calc(var(--tblr-gutter-x) * 2);
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  font-weight: 600;
  scroll-margin-top: 5rem;
}

.docs-content h2 {
  margin-top: 2.5rem;
}

/* Accordion headers use an h2 but must not get the section spacing. */
.docs-content h2.accordion-header {
  margin-top: 0;
}

.docs-content h3 {
  margin-top: 2rem;
}

.docs-content h4 {
  margin-top: 1.5rem;
}

.docs-content img {
  max-width: 100%;
  height: auto;
}

/* Feather icons: scale with the surrounding text and align to the baseline.
   Authors can override size per icon via inline style (e.g. width/height) —
   feather copies attributes from the <i> onto the generated SVG. */
.docs-content .feather {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* Buttons with a Feather icon (declared via the kramdown IAL attribute
   data-feather="name", or a raw <i> in the link text): flex so the icon and
   label center and space evenly, whatever order they appear in. Scoped to
   .docs-content so navbar/UI buttons (.btn btn-ghost-dark, etc.) keep their
   Tabler inline-block layout. */
.docs-content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

/* Inline <code>: Tabler supplies --tblr-code-bg/--tblr-code-color, which adapt
   via light-dark() and are separate from the always-dark block code vars. */
.docs-content code {
  font-size: 0.875em;
  padding: 2px 4px;
  border-radius: var(--tblr-border-radius);
  background-color: var(--tblr-code-bg);
  color: var(--tblr-code-color);
}

.docs-content pre {
  padding: 1rem;
  border-radius: var(--tblr-border-radius);
  background-color: var(--docs-code-bg);
  color: var(--docs-code-fg);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* Reset inside code blocks: the inline <code> padding/background above must
   not leak into <pre> blocks (higher specificity beats the inline rule). */
.docs-content pre code {
  font-size: 1em;
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
}

/* --- Code blocks: syntax highlighting (Rouge) ---
   Code blocks keep a fixed dark background in BOTH color schemes, so the
   token palette is always the light-on-dark set (no themed re-declaration). */
:root {
  --docs-code-bg: #111111;
  --docs-code-fg: #e6edf3;
  --tblr-rouge-comment: #8b949e;
  --tblr-rouge-keyword: #ff7b72;
  --tblr-rouge-string: #a5d6ff;
  --tblr-rouge-number: #79c0ff;
  --tblr-rouge-name: #7ee787;
  --tblr-rouge-attribute: #d2a8ff;
  --tblr-rouge-operator: #ff7b72;
  --tblr-rouge-symbol: #ffa657;
  --tblr-rouge-punctuation: #c9d1d9;
}

.docs-content .highlight {
  border-radius: var(--tblr-border-radius);
  background-color: var(--docs-code-bg);
  margin-bottom: 1rem;
}

.docs-content .highlight pre {
  margin: 0;
  padding: 1rem;
  background: transparent;
}

/* Rouge renders the line-numbered block inside a <figure>; neutralize the
   browser's default figure margin so padding matches plain code blocks. */
.docs-content figure.highlight {
  margin: 0 0 1rem;
}

.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs {
  color: var(--tblr-rouge-comment);
  font-style: italic;
}

.highlight .k,
.highlight .kc,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt {
  color: var(--tblr-rouge-keyword);
  font-weight: 600;
}

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .se,
.highlight .sh,
.highlight .si,
.highlight .ss,
.highlight .sx {
  color: var(--tblr-rouge-string);
}

.highlight .m,
.highlight .mb,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .mo {
  color: var(--tblr-rouge-number);
}

.highlight .n,
.highlight .na,
.highlight .nb,
.highlight .nc,
.highlight .nd,
.highlight .nf,
.highlight .nh,
.highlight .ni,
.highlight .nl,
.highlight .nn,
.highlight .no,
.highlight .nx {
  color: var(--tblr-rouge-name);
}

.highlight .err {
  color: var(--tblr-rouge-keyword);
}

.highlight .o,
.highlight .ow {
  color: var(--tblr-rouge-operator);
}

.highlight .p {
  color: var(--tblr-rouge-punctuation);
}

/* --- Code blocks: line numbers ({% highlight lang linenos %}) ---
   Rouge renders line-numbered blocks as a table with a number gutter
   and a code cell. Override the generic .docs-content table styles. */
.docs-content .highlight pre:has(> code > table.rouge-table) {
  padding: 0;
}

.docs-content .highlight table.rouge-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.docs-content .highlight table.rouge-table td {
  padding: 0;
  border: 0;
  vertical-align: top;
}

.docs-content .highlight table.rouge-table td.gutter.gl {
  padding: 1rem 0.75rem 1rem 1rem;
  border-right: var(--tblr-border-width) solid var(--tblr-border-color-translucent);
  background-color: var(--docs-code-bg);
  color: var(--tblr-rouge-comment);
  user-select: none;
  -webkit-user-select: none;
}

.docs-content .highlight table.rouge-table pre.lineno {
  padding: 0;
  text-align: right;
  color: var(--tblr-rouge-comment);
  white-space: pre;
}

.docs-content .highlight table.rouge-table td.code {
  min-width: 0;
  padding: 1rem;
}

.docs-content .highlight table.rouge-table td.code pre {
  padding: 0;
  overflow-x: auto;
}

/* --- Text selection inside code ---
   Tabler's global ::selection is a 10% primary tint that is nearly invisible
   on the always-dark code background. ::selection is resolved per element, so
   selected text in a code block lives in <code> and its token <span>s, not the
   <pre> itself: cover the whole pre subtree with a visible light-on-dark bar
   (works in both color schemes), and give inline <code> (outside pre) a solid
   primary inversion (black/white), scoped so general prose selection stays
   Tabler's default. */
.docs-content code::selection {
  background-color: var(--tblr-primary);
  color: var(--tblr-primary-fg);
}

.docs-content pre::selection,
.docs-content pre code::selection,
.docs-content pre code *::selection {
  /* Plain rgba fallback for browsers without color-mix() support, where the
     declaration below would otherwise be dropped entirely. */
  background-color: rgba(230, 237, 243, 0.35);
  background-color: color-mix(in srgb, var(--docs-code-fg) 30%, transparent);
  color: var(--docs-code-fg);
}

/* --- Copy button on code blocks ---
   Injected by theme.js into each .highlight / plain pre. Anchored to the top
   right of the block; lives outside the <pre> so it is never part of the
   copied or selected code. */
.docs-content .highlight,
.docs-content>pre {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--docs-code-fg);
  background-color: color-mix(in srgb, var(--docs-code-bg) 85%, transparent);
  border: var(--tblr-border-width) solid color-mix(in srgb, var(--docs-code-fg) 30%, transparent);
  border-radius: var(--tblr-border-radius);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

.code-copy-btn:hover,
.code-copy-btn:focus-visible {
  opacity: 1;
}

.code-copy-btn .feather {
  width: 0.875em;
  height: 0.875em;
}

.code-copy-btn.copied {
  color: var(--tblr-success-fg, #fff);
  border-color: var(--tblr-success, #2fb344);
  background-color: var(--tblr-success, #2fb344);
}

.docs-content table {
  width: 100%;
  margin-bottom: 1rem;
  vertical-align: top;
  border-collapse: collapse;
}

.docs-content table th,
.docs-content table td {
  padding: 0.5rem;
  border: var(--tblr-border-width) solid var(--tblr-border-color-translucent);
}

.docs-content blockquote {
  border-left: 0.25rem solid var(--tblr-border-color);
  padding-left: 1rem;
  color: var(--tblr-secondary-color);
}

.docs-content blockquote p:last-child,
.docs-content blockquote p:last-of-type {
  margin-bottom: 0;
}

/* --- Callouts (markdown blockquote + IAL) ---
   Base layout shared by all callouts; each variant colors the left border,
   background, and text via Tabler's semantic -subtle vars. */
.docs-content blockquote.info,
.docs-content blockquote.note,
.docs-content blockquote.success,
.docs-content blockquote.warning,
.docs-content blockquote.danger {
  padding: 0.75rem 1rem;
  border-radius: var(--tblr-border-radius);
  color: var(--tblr-body-color);
  border-left-width: 0.25rem;
  border-left-style: solid;
}

.docs-content blockquote.info {
  border-left-color: var(--tblr-info);
  background-color: var(--tblr-info-bg-subtle);
}

.docs-content blockquote.note {
  border-left-color: var(--tblr-primary);
  background-color: var(--tblr-primary-bg-subtle);
}

.docs-content blockquote.success {
  border-left-color: var(--tblr-success);
  background-color: var(--tblr-success-bg-subtle);
}

.docs-content blockquote.warning {
  border-left-color: var(--tblr-warning);
  background-color: var(--tblr-warning-bg-subtle);
}

.docs-content blockquote.danger {
  border-left-color: var(--tblr-danger);
  background-color: var(--tblr-danger-bg-subtle);
}

/* --- Right sidebar / table of contents --- */
.toc-sticky {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

/* Mobile TOC toggle: a full-width sticky toolbar pinned just below the fixed
   navbar. It is a direct child of <main> so it sticks for the whole content
   height. position: sticky (not fixed) — it sits in the flow at the top of
   the content and only appears on screens below lg. */
.toc-mobile-toggle {
  position: sticky;
  top: 3.5rem;
  z-index: 1020;
  margin-bottom: 1.5rem;
  background-color: var(--tblr-body-bg);
  border-bottom: var(--tblr-border-width) solid var(--tblr-border-color-translucent);
}

.toc-mobile-toggle-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.625rem calc(var(--tblr-gutter-x) * 0.5);
  border: 0;
  background: transparent;
  color: var(--tblr-body-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.toc-mobile-toggle-btn .feather {
  width: 1em;
  height: 1em;
  margin-right: 0.5rem;
}

.toc-mobile-toggle-btn:hover,
.toc-mobile-toggle-btn:focus {
  color: var(--tblr-link-color);
  background-color: rgba(var(--tblr-secondary-rgb), 0.06);
}

/* Offcanvas backdrop: Tabler dims the page with --tblr-gray-800 (#1f2937),
   which is blue-tinted. Use a neutral black so the dimmed content behind the
   TOC drawer looks monochrome in both schemes (Tabler keeps .show opacity). */
.offcanvas-backdrop {
  background-color: #000000;
}

.toc {
  padding: 0 1rem 0 0;
}

.toc-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--tblr-secondary-color);
  margin-bottom: 0.75rem;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.toc-list a {
  display: block;
  color: var(--tblr-secondary-color);
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.25rem 0.5rem;
  border-radius: var(--tblr-border-radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.toc-list a:hover,
.toc-list a:focus {
  color: var(--tblr-body-color);
  background-color: rgba(var(--tblr-secondary-rgb), 0.06);
}

.toc-list a.active {
  color: var(--tblr-link-color);
  background-color: rgba(var(--tblr-primary-rgb), 0.08);
  font-weight: 500;
}

/* Accordion TOC: h2 sections toggle their h3/h4 children.
   Section titles are slightly larger and bolder than their children. */
.toc-item.open>.toc-link {
  color: var(--tblr-body-color);
  font-weight: 500;
}

.toc-link.toc-h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
}

.toc-children {
  display: none;
  flex-direction: column;
  gap: 0.0625rem;
  margin-top: 0.125rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--tblr-border-color-translucent);
}

.toc-item.open>.toc-children {
  display: flex;
}

.toc-children a {
  font-size: 0.75rem;
  padding: 0.1875rem 0.5rem;
}

.toc-children .toc-h3 {
  padding-left: 0.75rem;
}

.toc-children .toc-h4 {
  padding-left: 1.5rem;
}

/* --- Search & forms (navbar) ---
   Tabler hardcodes a light-blue focus border (rgb(130.5,183,232)) on form
   controls; pin it to the theme border colour so the search input, selects,
   and checkboxes stay greyscale in both colour schemes. */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--tblr-border-color-translucent);
}

/* --- Search results (navbar dropdown) ---
   Self-contained panel (must not depend on .dropdown-menu vars, which are
   scoped to that class). z-index sits above navbar/offcanvas but below modals. */
.search-results {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  z-index: 1049;
  background-color: var(--tblr-bg-surface);
  border: var(--tblr-border-width) solid var(--tblr-border-color-translucent);
  border-radius: var(--tblr-border-radius);
  box-shadow: var(--tblr-shadow-dropdown);
  font-size: 0.875rem;
  color: var(--tblr-body-color);
}

.search-results.show {
  display: block;
}

.search-results li {
  margin: 0;
}

.search-results a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--tblr-body-color);
  text-decoration: none;
}

.search-results a:hover,
.search-results a:focus {
  background-color: rgba(var(--tblr-secondary-rgb), 0.08);
  color: var(--tblr-body-color);
}

.search-results .search-result-title {
  display: block;
  font-weight: 600;
}

.search-results .search-result-content {
  display: block;
  font-size: 0.85em;
  color: var(--tblr-secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results .no-results {
  padding: 0.5rem 0.75rem;
  color: var(--tblr-secondary-color);
}

/* --- Theme toggle ---
   Feather moon/sun icons inside #theme-toggle. Both <i> tags are swapped to
   SVGs by feather.replace(); the classes survive onto the SVG, so visibility
   toggles off the data-bs-theme attribute. Moon shows in light mode (click
   to go dark), sun in dark mode. */
#theme-toggle {
  /* Override .btn-ghost-dark, which uses the blue-tinted --tblr-dark
     (#1f2937) for its color and hover/active backgrounds. Use the neutral
     body color (dark in light mode, white in dark mode) and grey hover/
     active tints so the toggle stays monochrome in both schemes. */
  --tblr-btn-color: var(--tblr-body-color);
  --tblr-btn-hover-color: var(--tblr-body-color);
  --tblr-btn-active-color: var(--tblr-body-color);
  --tblr-btn-hover-bg: rgba(var(--tblr-secondary-rgb), 0.1);
  --tblr-btn-active-bg: rgba(var(--tblr-secondary-rgb), 0.18);
  --tblr-btn-active-shadow: none;
  --tblr-btn-border-color: transparent;
}

/* --------------------------------------------------------------------------
   SimpleAuth visual language
   A documentation-first translation of the landing page's grayscale system.
   -------------------------------------------------------------------------- */
:root {
  --docs-canvas: #f6f6f7;
  --docs-surface: #ffffff;
  --docs-ink: #17181a;
  --docs-muted: #666a70;
  --docs-line: #dedfe2;
  --docs-line-strong: #b8bbc0;
  --docs-soft: #eeeef0;
  --docs-radius: 8px;
  --docs-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --docs-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --tblr-body-bg: var(--docs-canvas);
  --tblr-bg-surface: var(--docs-surface);
  --tblr-body-color: var(--docs-ink);
  --tblr-secondary-color: var(--docs-muted);
  --tblr-border-color: var(--docs-line);
  --tblr-border-color-translucent: var(--docs-line);
  --tblr-border-radius: 6px;
  --tblr-border-radius-sm: 5px;
  --tblr-font-sans-serif: var(--docs-sans);
  --tblr-font-monospace: var(--docs-mono);
  --tblr-shadow-dropdown: 0 18px 45px rgba(0, 0, 0, .11);
  color-scheme: light;
}

body {
  padding-top: 68px;
  font-family: var(--docs-sans);
  color: var(--docs-ink);
  background: var(--docs-canvas);
  -webkit-font-smoothing: antialiased;
}

.docs-navbar {
  min-height: 68px;
  padding-block: 0;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--docs-line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docs-navbar>.container-xl {
  min-height: 68px;
}

.navbar-brand {
  min-width: max-content;
  padding: 0;
  color: var(--docs-ink);
  letter-spacing: -.02em;
}

.navbar-brand:hover {
  color: var(--docs-ink);
}

.navbar-logo {
  width: 32px;
  height: 32px;
  margin-right: .7rem;
  object-fit: contain;
}

.navbar-title {
  font-size: 1.05rem;
}

.navbar .nav-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: .45rem .7rem !important;
  border-radius: 5px;
  color: var(--docs-muted);
  font-size: .875rem;
  font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--docs-ink);
  background: var(--docs-soft);
}

.navbar .dropdown-menu {
  padding: .4rem;
  border: 1px solid var(--docs-line);
  border-radius: var(--docs-radius);
  box-shadow: var(--tblr-shadow-dropdown);
}

.navbar .dropdown-item {
  padding: .55rem .65rem;
  border-radius: 5px;
  color: var(--docs-muted);
  font-size: .875rem;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item.active {
  color: var(--docs-ink);
  background: var(--docs-soft);
}

.docs-navbar form[role="search"] {
  width: min(280px, 25vw);
}

.docs-navbar .search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  z-index: 2;
  width: 15px;
  height: 15px;
  color: var(--docs-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

#search-input {
  height: 36px;
  padding-left: 2.2rem;
  border-color: var(--docs-line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, .82);
  color: var(--docs-ink);
  font-size: .82rem;
  box-shadow: none;
}

#search-input:focus {
  border-color: var(--docs-ink);
  box-shadow: 0 0 0 2px rgba(23, 24, 26, .08);
}

#theme-toggle {
  width: 36px;
  height: 36px;
  margin-left: .25rem;
  border: 1px solid var(--docs-line) !important;
  border-radius: 6px;
}

#content.container-xl {
  max-width: 1320px;
  margin-top: 0 !important;
  padding-top: 3.5rem;
}

.docs-content {
  max-width: 900px;
  padding: 2.75rem 3.25rem 4rem;
  border: 1px solid var(--docs-line);
  border-radius: 10px;
  background: var(--docs-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .025);
}

.docs-home {
  margin-inline: auto;
}

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

.docs-content h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 740;
}

.docs-content h2 {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--docs-line);
  font-size: 1.85rem;
  line-height: 1.15;
  letter-spacing: -.035em;
  font-weight: 700;
}

.docs-content h3 {
  margin-top: 2.5rem;
  font-size: 1.3rem;
  letter-spacing: -.025em;
  font-weight: 680;
}

.docs-content h4 {
  font-size: 1.05rem;
  letter-spacing: -.015em;
  font-weight: 680;
}

.docs-content p,
.docs-content li {
  color: #46494e;
  font-size: 1rem;
  line-height: 1.72;
}

.docs-content>p:first-of-type {
  color: var(--docs-muted);
  font-size: 1.08rem;
}

.docs-content a:not(.btn) {
  color: var(--docs-ink);
  text-decoration-color: var(--docs-line-strong);
  text-underline-offset: .2em;
}

.docs-content a:not(.btn):hover {
  text-decoration-color: var(--docs-ink);
}

.docs-content .btn {
  min-height: 40px;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
}

.docs-content .btn-primary {
  --tblr-btn-bg: var(--docs-ink);
  --tblr-btn-border-color: var(--docs-ink);
  --tblr-btn-hover-bg: #2a2b2e;
  --tblr-btn-hover-border-color: #2a2b2e;
}

.docs-content code {
  padding: .18em .38em;
  border: 1px solid var(--docs-line);
  border-radius: 4px;
  background: var(--docs-canvas);
  color: #36383c;
  font-family: var(--docs-mono);
}

.docs-content pre,
.docs-content .highlight {
  border: 1px solid #34363a;
  border-radius: 8px;
  background: #1a1b1e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.docs-content pre {
  padding: 1.35rem;
}

.docs-content pre code {
  border: 0;
}

.code-copy-btn {
  top: .65rem;
  right: .65rem;
  min-height: 30px;
  padding-inline: .6rem;
  border-color: #4a4c51;
  border-radius: 5px;
  background: #24262a;
  font-family: var(--docs-mono);
}

.docs-content blockquote {
  margin-block: 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--docs-line) !important;
  border-left: 3px solid var(--docs-ink) !important;
  border-radius: 6px !important;
  background: var(--docs-canvas) !important;
  color: var(--docs-ink);
}

.docs-content blockquote.info {
  border-left-color: var(--tblr-info) !important;
  background: var(--tblr-info-bg-subtle) !important;
}

.docs-content blockquote.note {
  border-left-color: var(--tblr-primary) !important;
  background: var(--tblr-primary-bg-subtle) !important;
}

.docs-content blockquote.success {
  border-left-color: var(--tblr-success) !important;
  background: var(--tblr-success-bg-subtle) !important;
}

.docs-content blockquote.warning {
  border-left-color: var(--tblr-warning) !important;
  background: var(--tblr-warning-bg-subtle) !important;
}

.docs-content blockquote.danger {
  border-left-color: var(--tblr-danger) !important;
  background: var(--tblr-danger-bg-subtle) !important;
}

.docs-content table {
  overflow: hidden;
  border: 1px solid var(--docs-line);
  border-radius: 6px;
  background: var(--docs-surface);
}

.docs-content table th {
  padding: .75rem;
  background: var(--docs-canvas);
  color: var(--docs-ink);
  font: 600 .72rem var(--docs-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.docs-content table td {
  padding: .75rem;
}

.toc-sticky {
  top: 98px;
  max-height: calc(100vh - 125px);
  padding: 1.1rem;
  border: 1px solid var(--docs-line);
  border-radius: 8px;
  background: var(--docs-surface);
}

.toc {
  padding: 0;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--docs-muted);
  font-family: var(--docs-mono);
  font-size: .67rem;
  letter-spacing: .08em;
}

.toc-title::before {
  content: "";
  width: 16px;
  border-top: 1px solid var(--docs-ink);
}

.toc-list {
  gap: 2px;
}

.toc-list a {
  padding: .38rem .5rem;
  border-radius: 4px;
}

.toc-list a.active {
  color: var(--docs-ink);
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}

.toc-mobile-toggle {
  top: 68px;
  margin: -1rem 0 1.25rem;
  border: 1px solid var(--docs-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
}

.search-results {
  margin-top: .35rem;
  padding: .4rem;
  border-color: var(--docs-line);
  border-radius: 8px;
}

.search-results a {
  border-radius: 5px;
}

footer.container-xl {
  max-width: 1320px;
  margin-top: 2rem !important;
  padding: 1.5rem 2rem !important;
  border-color: var(--docs-line) !important;
  font-size: .82rem;
}

@media (max-width: 1199.98px) {
  .docs-content {
    padding-inline: 2.5rem;
  }
}

@media (max-width: 991.98px) {
  #content.container-xl {
    padding-top: 2rem;
  }

  .docs-content {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .docs-navbar form[role="search"] {
    width: 100%;
  }

  .navbar-collapse {
    top: 68px;
    padding: 1rem;
    border: 1px solid var(--docs-line);
  }

  #content.container-xl {
    padding-top: 1.25rem;
  }

  .docs-content {
    padding: 2rem 1.35rem 3rem;
    border-radius: 8px;
  }

  .docs-content h1 {
    font-size: 2.7rem;
  }

  .docs-content h2 {
    font-size: 1.65rem;
  }

  footer.container-xl {
    padding-inline: 1rem !important;
  }
}

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

.theme-toggle-dark {
  display: block;
}

.theme-toggle-light {
  display: none;
}

[data-bs-theme="dark"] .theme-toggle-dark {
  display: none;
}

[data-bs-theme="dark"] .theme-toggle-light {
  display: block;
}

#theme-toggle .feather {
  width: 1.25rem;
  height: 1.25rem;
}

/* Keep the optional dark scheme neutral and structurally identical. */
[data-bs-theme="dark"] {
  --docs-canvas: #090a0b;
  --docs-surface: #111214;
  --docs-ink: #f2f2f3;
  --docs-muted: #a5a7ab;
  --docs-line: #2c2e32;
  --docs-line-strong: #4b4e53;
  --docs-soft: #202226;
  --tblr-body-bg: var(--docs-canvas);
  --tblr-bg-surface: var(--docs-surface);
  --tblr-body-color: var(--docs-ink);
  --tblr-secondary-color: var(--docs-muted);
  --tblr-border-color: var(--docs-line);
  --tblr-border-color-translucent: var(--docs-line);
  color-scheme: dark;
}

[data-bs-theme="dark"] .docs-navbar {
  background: rgba(17, 18, 20, .9);
}

[data-bs-theme="dark"] #search-input,
[data-bs-theme="dark"] .toc-mobile-toggle {
  background: rgba(17, 18, 20, .9);
  color: var(--docs-ink);
}

[data-bs-theme="dark"] .docs-content p,
[data-bs-theme="dark"] .docs-content li {
  color: #c4c6ca;
}

[data-bs-theme="dark"] .docs-content code {
  background: #1b1c1f;
  color: #e1e2e4;
}

[data-bs-theme="dark"] .docs-content blockquote {
  background: #17181b !important;
}

@media (min-width: 768px) {
  .docs-navbar .navbar-nav {
    column-gap: .3rem !important;
  }
}

/* Rouge line-number blocks contain an internal layout table. Keep it part of
   the dark code surface instead of inheriting documentation-table styling. */
.docs-content .highlight>pre {
  border: 0 !important;
  border-radius: inherit;
  box-shadow: none !important;
}

.docs-content .highlight table.rouge-table {
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--docs-code-fg);
}

.docs-content .highlight table.rouge-table td {
  background: transparent !important;
}

.docs-content .highlight table.rouge-table td.gutter.gl {
  width: 1%;
  padding: 1rem .65rem !important;
  border-right-color: #383a3e;
  white-space: nowrap;
}

.docs-content .highlight>pre>code,
.docs-content .highlight table.rouge-table pre {
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}