/* Global sections above Furo's reading layout. */
:root { --docs-header-height: 76px; }
/* Furo sizes body to the viewport (height: 100%); a sticky header can only
   stick within its parent's box, so let the body grow with the document and
   give the page its full-height guarantee in viewport units instead. */
body { height: auto; min-height: 100%; }
.page { min-height: calc(100vh - var(--docs-header-height)); }
.docs-header {
  height: var(--docs-header-height); box-sizing: border-box;
  display: flex; align-items: center; gap: 3rem; padding: 0 2rem;
  border-bottom: 1px solid var(--color-background-border);
  background: var(--color-background-primary);
  /* Furo's .page is a flex container; its drawers are flex items with
     z-index 30 (sidebar) and 50 (contents), so the header must clear both. */
  position: sticky; top: 0; z-index: 60;
}
.skip-to-content { z-index: 70; }
.back-to-top { top: calc(var(--docs-header-height) + 1rem); }
.docs-header ~ .skip-to-content { display: none; }
@media print { .docs-header { display: none; } }
.docs-brand { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.docs-brand img { width: 114px; height: 32px; object-fit: contain; }
.docs-brand > span { color: var(--color-foreground-muted); font-size: .875rem; }
.docs-version { margin-left: .35rem; font-variant-numeric: tabular-nums; }
.docs-tabs { display: flex; height: 100%; align-items: stretch; gap: 2rem; }
.docs-tabs a {
  display: flex; align-items: center; border-bottom: 2px solid transparent;
  padding: 2px 0 0; color: var(--color-foreground-secondary);
  font-size: .925rem; white-space: nowrap;
}
.docs-tabs a.active { border-bottom-color: var(--color-brand-primary); color: var(--color-foreground-primary); font-weight: 600; }
.docs-header a { text-decoration: none; }
.docs-header a:hover { color: var(--color-brand-primary); }
.docs-repository { margin-left: auto; color: var(--color-foreground-muted); font-size: .875rem; }
.docs-sidebar-heading { padding: 2rem 1.5rem 1rem; font-size: .8rem; font-weight: 650; letter-spacing: .035em; }
.docs-sidebar-heading a { color: var(--color-foreground-primary); text-decoration: none; }
.docs-section-tree > ul { padding-left: 0; }
.docs-section-tree > ul > li > a { padding-left: 1.5rem; }
/* Keep the theme's native disclosures reachable by keyboard. */
.docs-section-tree .toctree-checkbox {
  display: block; position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.docs-section-tree .toctree-checkbox:focus-visible + label {
  outline: 2px solid var(--color-brand-primary); outline-offset: 2px;
}
.sidebar-sticky, .toc-sticky { top: var(--docs-header-height); height: calc(100vh - var(--docs-header-height)); }
.toc-sticky { max-height: calc(100vh - var(--docs-header-height)); }
.sidebar-container { width: 100%; }
.sidebar-search-container { margin-bottom: 1rem; }
article h1 { letter-spacing: -.035em; }
article :is(h1,h2,h3,h4,[id]) { scroll-margin-top: calc(var(--docs-header-height) + 2rem); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--color-brand-primary); outline-offset: 4px; }
.docs-eyebrow { color: var(--color-brand-primary); font-size: .875rem; font-weight: 600; margin-bottom: .65rem; }
.docs-intro { font-size: 1.15rem; line-height: 1.65; max-width: 37em; color: var(--color-foreground-secondary); }
.docs-paths { margin: 1.5rem 0 2rem; }
.docs-paths a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: 1rem 0; border-top: 1px solid var(--color-background-border); text-decoration: none; }
.docs-paths a:last-child { border-bottom: 1px solid var(--color-background-border); }
.docs-paths strong { color: var(--color-foreground-primary); font-weight: 600; }
.docs-paths span { color: var(--color-foreground-secondary); font-size: .925rem; grid-column: 1; }
.docs-paths b { grid-column: 2; grid-row: 1 / 3; align-self: center; font-weight: 400; }
.docs-paths a:hover strong { color: var(--color-brand-primary); }
@media (max-width: 67em) {
  /* Narrow screens: the global header scrolls away and Furo's own mobile bar
     (menu, title, theme, contents) stays sticky as the theme intends. */
  :root { --docs-header-height: 0px; }
  .docs-header {
    position: static; height: auto; flex-wrap: wrap; gap: 0;
    padding: .75rem 1rem 0; justify-content: space-between;
  }
  .docs-repository { margin-left: 0; }
  .docs-tabs {
    order: 3; width: 100%; height: 44px; gap: 1.5rem; justify-content: flex-start;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .docs-tabs::-webkit-scrollbar { display: none; }
  .docs-tabs a { font-size: .85rem; flex-shrink: 0; }
  .sidebar-sticky, .toc-sticky { top: 0; height: 100vh; }
  .toc-sticky { max-height: 100vh; }
  article :is(h1,h2,h3,h4,[id]) { scroll-margin-top: 5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
