/* Common visual foundation, extracted from the approved documentation. */
:root {
  color-scheme: light;
  --ink: #1b1b1b;
  --muted: #626864;
  --line: #e4e7e5;
  --bg: #fff;
  --soft: #f7f8f7;
  --brand: #087f73;
  --brand-soft: #e8f3f0;
  --accent: #087568;
  --warn: #975419;
  --radius: 8px;
  --max: 1600px;
  --toc: 292px;
  --measure: 78ch;
  --head: 72px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--head) + 24px); }
body {
  color: var(--ink); background: var(--bg);
  font: 15.5px/1.75 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: #087f731c; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
::selection { background: #ccebe4; color: #152b24; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.keep { white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 150; padding: 10px 16px; background: var(--brand); color: white; border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Shared brand; the source SVG is a shape, not a color authority. */
.topbar {
  position: sticky; top: 0; z-index: 50; min-height: 72px;
  display: flex; align-items: center; gap: 28px; padding: 14px 32px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-block; width: 28px; height: 28px; background: var(--brand); mask: url("bs-icon.svg") center / contain no-repeat; }
.brand-name { font-size: 22px; line-height: 1; font-weight: 650; letter-spacing: -.055em; }
.docs-label { border-left: 1px solid var(--line); padding-left: 24px; color: var(--muted); font-size: 13px; }
.language-switch { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; margin-left: auto; }
.language-switch :is(a, .lang-btn) { min-width: 32px; padding: 4px 6px; color: var(--muted); border-radius: 3px; font-size: 11px; line-height: 22px; font-weight: 550; text-align: center; }
.language-switch :is(a, .lang-btn):hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.language-switch :is(a[aria-current="page"], .lang-btn[aria-pressed="true"]) { color: var(--accent); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 24px; }
.topbar .back { font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 13px; white-space: nowrap; }
.quiet-button:hover { background: var(--soft); border-color: #b4c3bc; }
/* Reading canvas and a continuous, quiet navigation rail. */
.shell { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: var(--toc) minmax(0, 1fr); gap: clamp(36px, 4.4vw, 72px); padding: 0 48px 88px 0; }
nav.toc {
  position: sticky; top: var(--head); align-self: start; height: calc(100dvh - var(--head));
  overflow-y: auto; padding: 30px 14px 36px 18px; font-size: 13px;
  background: var(--soft); border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: #d4dcd7 transparent;
}
nav.toc h2 { color: var(--muted); border: 0; margin: 0 10px 16px; padding: 0; font-size: 11px; line-height: 1.6; text-transform: uppercase; letter-spacing: .1em; font-weight: 550; }
nav.toc h2 span { float: right; font-variant-numeric: tabular-nums; }
nav.toc ol, nav.toc ul { list-style: none; margin: 0; }
nav.toc > ol > li { margin-bottom: 3px; }
nav.toc > ol > li > a { display: flex; align-items: baseline; padding: 7px 10px; border-radius: 5px; color: #474e49; font-weight: 450; line-height: 1.5; }
nav.toc > ol > li > a:hover { background: #edf0ed; text-decoration: none; color: var(--ink); }
nav.toc > ol > li > a.active { background: var(--brand-soft); color: var(--accent); font-weight: 600; }
nav.toc .toc-num { flex: 0 0 26px; color: var(--muted); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
nav.toc > ol > li > a.active .toc-num { color: var(--accent); }
nav.toc ul { margin: 7px 0 12px 36px; padding-left: 13px; border-left: 1px solid #dce3de; display: none; }
nav.toc > ol > li.open > ul { display: block; }
nav.toc ul li { margin: 0; }
nav.toc ul a { display: block; padding: 5px 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
nav.toc ul a:hover, nav.toc ul a.active { color: var(--accent); text-decoration: none; }
nav.toc ul a.active { font-weight: 600; }
.nav-foot { margin: 24px 10px 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.nav-foot a { display: inline-flex; align-items: center; gap: 8px; }


.language-switch .lang-btn { appearance: none; border: 0; background: transparent; }
a.quiet-button:hover { text-decoration: none; }

/* Native image viewer, shared by documentation and the platform overview. */
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 60px 20px; display: flex; align-items: center; justify-content: center; background: #101713f5; color: white; cursor: zoom-out; }
.lightbox[hidden], .lightbox:not([open]) { display: none; }
.lightbox figure { max-width: 96vw; max-height: calc(100dvh - 120px); display: flex; flex-direction: column; align-items: center; gap: 14px; cursor: default; }
.lightbox img { max-width: 96vw; max-height: calc(100dvh - 180px); object-fit: contain; border-radius: 6px; background: white; }
.lightbox figcaption { padding: 0 40px; color: #d7ded9; font-size: 13px; text-align: center; }
.lightbox figcaption b { color: #a1b4aa; white-space: nowrap; font-weight: 400; font-variant-numeric: tabular-nums; }
.lb-btn { position: fixed; width: 44px; height: 44px; border: 1px solid #ffffff35; border-radius: 6px; background: #ffffff0d; color: white; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: #ffffff25; }
.lb-close { top: 16px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 1200px) {
  .topbar { padding-right: 24px; gap: 20px; }
  .header-actions { gap: 16px; }
  .topbar .back { display: none; }
  .shell { gap: 36px; padding-right: 32px; --toc: 276px; }
}

@media (max-width: 900px) {
  :root { --head: 64px; }
  .topbar { min-height: 64px; padding: 10px 20px; gap: 16px; }
  .brand-name { font-size: 21px; }
  .brand-mark { width: 26px; height: 26px; }
  .docs-label { font-size: 12px; padding-left: 16px; }
  .header-actions { gap: 10px; }
  .shell { display: block; padding: 0 32px 60px; }
  nav.toc { position: fixed; inset: var(--head) 0 auto 0; width: 100%; height: auto; max-height: min(70dvh, 580px); padding: 22px 24px; display: none; border-bottom: 1px solid var(--line); z-index: 40; box-shadow: 0 22px 46px #182d2322; overscroll-behavior: contain; }
  nav.toc.open { display: block; }
  nav.toc > ol > li > a { padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
  nav.toc ul a { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: #14281d59; z-index: 35; }
}

@media (max-width: 640px) {
  .docs-label { display: none; }
}

@media (max-width: 560px) {
  :root { --head: 108px; }
  .topbar { gap: 8px; padding: 10px 16px 6px; flex-wrap: wrap; }
  .brand { gap: 7px; }
  .brand-name { font-size: 20px; }
  .brand-mark { width: 25px; height: 25px; }
  .header-actions { gap: 8px; width: 100%; }
  .shell { padding: 0 22px 40px; }
  body { font-size: 14px; line-height: 1.8; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; } .lb-close { right: 12px; }
  .lightbox { padding: 64px 12px; }
  .lightbox figcaption { padding: 0 8px; font-size: 11px; }
  .lightbox img { max-height: calc(100dvh - 210px); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
