/* Docs load this stylesheet for both the index and every article. The selected
   color scheme drives the canvas, native controls, dialogs and reader surfaces. */
:root[data-docs-reader] {
  color-scheme: light dark;
  --bg: light-dark(#e2e5e9, #101216);
  --surface: light-dark(#eef0f3, #1b1e24);
  --ink: light-dark(#111316, var(--night-ink));
  --muted: light-dark(#4a525d, #b2b9c3);
  --faint: light-dark(#5a626d, #99a2ae);
  --accent: light-dark(#2c5d8c, var(--blue));
  --wash: light-dark(#a7c2dc, #2b4055);
  --docs-control-edge: light-dark(#79838e, #727e8b);
  --docs-footer-bg: light-dark(#e6edf4, #15171b);
  background: var(--bg);
}
:root[data-docs-theme="light"] { color-scheme: light; }
:root[data-docs-theme="dark"] { color-scheme: dark; }
/* An undismissed privacy notice stays visually steady between articles. */
.mgp-notice { animation: none; }

/* The compact footer uses the same palette as the reader. Its shared .on-night
   class normally defines separate tokens for the marketing footer. */
.closing > .base { color: light-dark(#1a1d22, var(--night-muted)); background: var(--docs-footer-bg); }
:root[data-docs-theme="dark"] .foot-logo img { filter: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-docs-theme="light"]) .foot-logo img { filter: none; }
}

.docs-shell {
  --docs-rule-x: repeating-linear-gradient(90deg, var(--rule) 0 2px, transparent 2px 4px);
  --docs-rule-y: repeating-linear-gradient(var(--rule) 0 2px, transparent 2px 4px);
  --docs-sticky-top: 96px;
  padding: clamp(110px, 9vw, 138px) 0 clamp(60px, 7vw, 100px);
  color: var(--ink);
}
.docs-layout {
  display: grid;
  grid-template-columns: clamp(210px, 20vw, 248px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 5.6vw, 84px);
  width: min(100% - 2 * var(--gutter), 1232px);
}
.docs-sr-only, .docs-skip-link:not(:focus-visible) {
  position: absolute; width: 1px; height: 1px; padding: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.docs-skip-link:focus-visible { position: fixed; z-index: 55; top: 14px; left: 14px; background: var(--surface); padding: .9rem; }
.docs-bookmark { display: none; }
.docs-bookmark:target { display: inline-block; scroll-margin-top: var(--docs-sticky-top); text-decoration: underline; }
.docs-shell [hidden] { display: none !important; }
.docs-shell button, .docs-shell summary { cursor: pointer; }
.docs-shell button { font: inherit; color: inherit; }
.docs-sidebar {
  position: sticky; top: var(--docs-sticky-top);
  display: flex; flex-direction: column; gap: 18px;
  max-height: calc(100dvh - var(--docs-sticky-top) - 16px);
  min-height: 0; padding-right: 18px;
  background: var(--docs-rule-y) right top / 1px 100% no-repeat;
}
.docs-contents {
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.docs-nav-group { padding: 17px 0; background: var(--docs-rule-x) left bottom / 100% 1px no-repeat; }
.docs-nav-group:first-child { padding-top: 0; }
.docs-nav-group:last-child { background: none; }
.docs-nav-group h2 {
  color: var(--muted); font: 500 11px/1.55 var(--mono);
  letter-spacing: .055em; text-transform: uppercase;
  margin: 0 0 .45rem; padding: 0 .6rem;
}
.docs-nav-group a {
  display: block; position: relative; padding: .39rem .7rem .39rem .85rem;
  text-decoration: none; color: var(--muted); font: 400 14px/1.35 var(--sans);
}
.docs-nav-group a:hover, .docs-nav-group a:focus-visible { color: var(--ink); background: var(--tint-1); }
.docs-nav-group a[aria-current="page"] {
  color: var(--ink); background: var(--surface); font-weight: 550;
  box-shadow: inset 3px 0 var(--accent);
}
.docs-mobile-contents { display: none; }
button.docs-search-trigger {
  display: flex; align-items: center; gap: .55rem; flex: none;
  padding: 9px 11px; width: 100%; min-height: 42px;
  border: 1px solid var(--docs-control-edge); border-radius: 0; background: var(--surface);
  text-align: left; font-size: 14px; font-weight: 450;
}
.docs-search-trigger svg { color: var(--accent); }
.docs-search-trigger kbd {
  margin-left: auto; font: 11px var(--mono); white-space: nowrap; color: var(--muted);
  background: var(--bg); padding: .25rem .35rem;
}
button.docs-search-trigger:hover { background: var(--tint-1); border-color: var(--accent); }
button.docs-search-trigger:focus-visible, .docs-theme-control:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.docs-main { min-width: 0; width: 100%; max-width: 51rem; scroll-margin-top: var(--docs-sticky-top); }
.docs-main:focus { outline: none; }
.docs-reader-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  margin-bottom: clamp(16px, 1.8vw, 24px);
}
.docs-breadcrumb {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem;
  font: 12px/1.5 var(--mono); color: var(--muted);
}
.docs-theme-control {
  display: inline-flex; align-items: center; position: relative; flex: none;
  color: var(--muted); background: var(--surface); border: 1px solid var(--docs-control-edge);
}
.docs-theme-control:hover { color: var(--ink); border-color: var(--accent); }
.docs-theme-control > svg { pointer-events: none; position: absolute; left: .55rem; width: 14px; height: 14px; }
.docs-theme-control > .docs-theme-chevron { left: auto; right: .5rem; width: 10px; height: 10px; }
.docs-theme-control select {
  appearance: none; cursor: pointer; min-height: 32px; padding: 0 1.5rem 0 1.8rem;
  margin: 0; border: 0; border-radius: 0; font: 12px/1.35 var(--sans); color: inherit; background: transparent;
}
.docs-theme-control select:focus-visible { outline: none; }
.docs-theme-control option { color: var(--ink); background: var(--surface); }
.docs-breadcrumb > a { color: var(--accent); text-decoration: none; }
.docs-breadcrumb > a:hover { text-decoration: underline; text-underline-offset: .22em; }
.docs-breadcrumb > span[aria-hidden] { color: var(--faint); }
.docs-page-heading { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.docs-page-heading h1 {
  margin: 0; font: 470 clamp(36px, 3.4vw, 51px)/1.06 var(--sans);
  letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere;
}
.docs-page-heading button {
  position: relative; display: grid; place-items: center; align-self: flex-start;
  width: 38px; height: 38px; flex: none; background: transparent; border: 0; color: var(--muted);
}
.docs-page-heading button:hover, .docs-page-heading button:focus-visible { background: var(--surface); color: var(--ink); }
button.docs-copy-link[data-copy-feedback]::after {
  content: attr(data-copy-feedback); position: absolute; right: 0; top: 100%; z-index: 1;
  padding: .35rem .5rem; width: max-content; max-width: 14rem;
  color: var(--night-ink); background: var(--night); font: 12px/1.4 var(--sans);
}
.docs-lead { color: var(--muted); max-width: 65ch; margin: .8rem 0 0; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.5; }
.docs-sections {
  margin: 1.35rem 0 1.55rem; background: var(--docs-rule-x) left bottom / 100% 1px no-repeat;
}
.docs-sections summary, .docs-mobile-contents summary {
  display: flex; align-items: center; gap: .65rem; list-style: none;
  padding: .65rem 0; font-size: 14px; font-weight: 500;
}
.docs-sections summary::-webkit-details-marker, .docs-mobile-contents summary::-webkit-details-marker { display: none; }
.docs-sections summary > span, .docs-mobile-contents summary > span {
  width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid;
  color: var(--muted); transform: translateY(-2px) rotate(45deg);
}
.docs-sections[open] > summary > span, .docs-mobile-contents[open] > summary > span { transform: translateY(2px) rotate(225deg); }
.docs-sections ul { list-style: none; display: grid; gap: .45rem; padding: .35rem 0 1rem; margin: 0; }
.docs-sections a { color: var(--accent); font-size: 14px; text-underline-offset: .22em; }
.docs-main .docs-article { max-width: 100%; }
.docs-pagination { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; padding-top: 1.4rem; background: var(--docs-rule-x) left top / 100% 1px no-repeat; }
.docs-pagination a {
  display: flex; align-items: center; gap: 1rem; max-width: 100%; padding: .7rem .9rem;
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 15px;
}
.docs-pagination small { display: block; color: var(--muted); font: 11px/1.5 var(--mono); }
.docs-pagination a:hover { background: var(--wash); }
.docs-pagination [rel=prev] { flex-direction: row-reverse; }
.docs-pagination [rel=prev] svg { transform: rotate(180deg); }
.docs-pagination [rel=next] { text-align: right; margin-left: auto; }
.docs-pagination svg { width: 12px; height: 12px; flex-shrink: 0; }

@media (max-width: 880px) {
  .docs-shell { padding-top: 100px; }
  .docs-layout { display: block; }
  .docs-sidebar {
    position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: 0 .65rem; padding: 0 0 .8rem; max-height: none; margin-bottom: 1.7rem;
    background: var(--docs-rule-x) left bottom / 100% 1px no-repeat;
  }
  .docs-mobile-contents { display: block; }
  .docs-mobile-contents summary { min-height: 44px; padding: .5rem .2rem; width: fit-content; }
  .docs-search-trigger { grid-column: 2; }
  .docs-search-trigger kbd { display: none; }
  .docs-contents { display: none; grid-column: 1 / -1; max-height: 55dvh; padding: .8rem .25rem .25rem 0; }
  .docs-mobile-contents[open] ~ .docs-contents { display: block; }
  .docs-nav-group a { min-height: 44px; display: flex; align-items: center; }
  .docs-mobile-contents[open] summary { color: var(--accent); }
  .docs-main { margin-inline: auto; }
  .docs-page-heading button { width: 44px; height: 44px; }
  .docs-theme-control select { min-height: 42px; }
}
@media (max-width: 479px) {
  .docs-shell { padding-top: 90px; }
  .docs-layout { width: calc(100% - 32px); }
  .docs-reader-bar { margin-bottom: 12px; }
  .docs-breadcrumb { font-size: 11px; }
  .docs-pagination a { font-size: 14px; padding: .7rem; gap: .65rem; }
}
