:root {
  color-scheme: light;
  --ink: #1b2d47;
  --muted: #596b82;
  --faint: #738399;
  --line: #dce5f0;
  --soft: #f4f7fc;
  --accent: #245dc4;
  --grid-pattern:
    linear-gradient(rgba(36,93,196,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,93,196,.09) 1px, transparent 1px),
    linear-gradient(rgba(36,93,196,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,93,196,.12) 1px, transparent 1px);
  --grid-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; position: relative; isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 760px;
  z-index: -1;
  pointer-events: none;
  background-image:
    var(--grid-pattern),
    radial-gradient(ellipse at left top, #edf4ff, transparent 70%);
  background-size: var(--grid-size), auto;
  mask-image: radial-gradient(ellipse 1100px 760px at left top, #000 0%, rgba(0,0,0,.6) 36%, transparent 85%);
}
::selection { background: #d7e5ff; color: #173567; }
a { color: var(--accent); text-decoration-color: #b9cdef; text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; }
:focus-visible { outline: 3px solid #4c7cd8; outline-offset: 4px; border-radius: 3px; }
.skip-link { position: absolute; left: 20px; top: -80px; z-index: 10; padding: 8px 14px; background: #fff; }
.skip-link:focus { top: 10px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background-color: #fff;
  background-image: linear-gradient(90deg, rgba(255,255,255,.75), #fff 70%), var(--grid-pattern);
  background-size: auto, var(--grid-size);
}
.topbar-inner { max-width: 1144px; margin: auto; padding: 16px 32px; display: flex; align-items: center; gap: 14px; }
.wordmark { font-size: 21px; font-weight: 750; letter-spacing: -.055em; color: var(--ink); text-decoration: none; }
.topbar-links { margin-left: auto; display: flex; gap: 24px; }
.topbar-links a { font-size: 14px; color: var(--muted); text-decoration: none; }
.topbar-links a:hover { color: var(--accent); }

.page-layout { max-width: 1144px; margin: auto; padding: 60px 32px 0; display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 48px; }
.page-nav { position: sticky; top: 112px; align-self: start; max-height: calc(100dvh - 136px); overflow-y: auto; scrollbar-width: thin; font-size: 15px; line-height: 1.5; }
.nav-label { margin: 0 0 17px 10px; color: var(--faint); font-size: 11px; letter-spacing: .09em; font-weight: 650; text-transform: uppercase; }
.page-nav a { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--muted); }
.page-nav a:hover { color: var(--accent); background: #eff4fc; }
.page-nav a[aria-current="location"] { color: #194da5; background: #e3ecfc; font-weight: 600; }
.page-nav .nav-sub { padding-left: 20px; font-size: 14px; border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.page-nav .nav-sub[aria-current="location"] { box-shadow: inset 2px 0 0 var(--accent); }
.content-column { min-width: 0; }
#main { min-width: 0; }
.page-header { margin-bottom: 25px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: clamp(36px, 4.8vw, 56px); letter-spacing: -.055em; font-weight: 700; margin: 0; }
h2 { font-size: 27px; letter-spacing: -.035em; font-weight: 650; padding-bottom: 16px; margin: 64px 0 26px; border-bottom: 1px solid var(--line); }
h3 { font-size: 19px; letter-spacing: -.025em; font-weight: 650; margin: 34px 0 13px; }
h4 { font-size: 20px; letter-spacing: -.025em; font-weight: 600; margin: 0; }
p { margin: 0 0 19px; }
p.hero { font-size: 17px; line-height: 1.7; color: var(--muted); letter-spacing: -.012em; }
strong, b { font-weight: 600; }
ul, ol { margin: 16px 0 24px; padding-left: 22px; }
li { padding-left: 3px; margin-bottom: 13px; }
li::marker { color: #7d8792; }
li p { margin-bottom: 12px; }
article { display: flow-root; }
p.note { font-size: 14px; line-height: 1.6; font-style: normal; color: var(--muted); margin: 14px 0 0; }
code { font-family: var(--mono); font-size: .875em; background: #f0f3f5; color: #374651; border-radius: 4px; padding: .16em .35em; }

.snippet { margin: 22px 0 28px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; max-width: 100%; }
.code-snippet { background: var(--soft); }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 43px; padding: 8px 16px 8px 20px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.code-language { font-family: var(--sans); color: #68727f; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.copy-code { background: #fff; border: 1px solid #d9dfe5; border-radius: 5px; color: #5c6672; font: 12px/1.4 var(--sans); padding: 4px 9px; cursor: pointer; min-width: 46px; }
.copy-code:hover { color: var(--accent); border-color: #acc3eb; }
pre { margin: 0; overflow: auto; tab-size: 2; }
pre code { display: block; padding: 21px 23px; border-radius: 0; background: transparent; color: #303844; font: 14px/1.75 var(--mono); white-space: pre; letter-spacing: -.01em; -webkit-font-smoothing: auto; }
pre code::selection, pre code *::selection { background: #cbdfe9; color: inherit; }
.code-snippet > p.note { border-top: 1px solid var(--line); padding: 13px 20px; margin: 0; background: #fafbfc; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal { color: #8250aa; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #245dab; }
.hljs-title, .hljs-title.function_, .hljs-name, .hljs-selector-id, .hljs-selector-class { color: #135da2; }
.hljs-variable, .hljs-template-variable, .hljs-number { color: #995321; }
.hljs-attr, .hljs-attribute, .hljs-built_in, .hljs-type { color: #345a86; }
.hljs-comment, .hljs-quote, .hljs-doctag { color: #73808e; }
.hljs-meta, .hljs-tag { color: #687586; }
.hljs-tag .hljs-name { color: #135da2; }
.hljs-subst, .hljs-punctuation { color: #54616e; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 600; }

.text-snippet { background: #f3f7ff; border-color: #dce6f7; padding: 22px 24px; }
.text-snippet h4 { color: #294b80; }
.text-snippet ul { margin: 0; }
.text-snippet li { margin-bottom: 8px; font-size: 15px; }
.text-snippet li:last-child { margin-bottom: 0; }
.img-snippet { display: table; padding: 8px; background: #fafbfc; }
.img-snippet img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.img-snippet p.note { padding: 3px 6px 5px; }
/* Captions wrap within the image's width without widening the frame. */
.img-snippet:not(.thumb-snippet) > p.note { contain: inline-size; overflow-wrap: anywhere; }
.img-snippet > a { display: block; }
.thumb-snippet { display: flex; flex-wrap: wrap; gap: 7px; padding: 18px; }
.thumb-snippet > a { display: block; border: 0; }
.thumb-snippet img { width: 35px; height: 35px; border-radius: 4px; }
.thumb-snippet p.note { flex-basis: 100%; padding: 0; margin-top: 7px; }

.table-snippet { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 1.65; text-align: left; }
th { background: var(--soft); color: #62707c; font-size: 11px; font-weight: 600; letter-spacing: .03em; padding: 12px 15px; border-bottom: 1px solid var(--line); }
td { padding: 14px 15px; border-bottom: 1px solid #edf0f2; vertical-align: top; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfd; }
table th:first-child { width: 22%; }
table th:nth-child(2) { width: 36%; }
table code { font-size: 12px; padding: 0; background: transparent; color: #43515f; }
table td span { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 4px; }
.image-table td:first-child { font-weight: 550; }
.image-table td:first-child span { font-weight: 400; }
.image-table td:last-child { font-family: var(--mono); font-size: 10px; }
.image-preview { display: inline-block; vertical-align: top; line-height: 0; border-radius: 5px; overflow: hidden; background: var(--soft); outline: 1px solid rgba(32,38,45,.1); }
.image-preview img { display: block; max-width: 144px; max-height: 96px; width: auto; height: auto; }
.image-preview:hover { outline-color: var(--accent); }
.lorem-paragraphs { white-space: pre-line; }
.table-snippet > p.note { padding: 14px 16px; margin: 0; border-top: 1px solid var(--line); background: #fafbfc; }
footer { border-top: 1px solid var(--line); margin-top: 58px; padding: 24px 0 40px; }
footer p { font-size: 12px; color: var(--faint); }

@media (max-width: 980px) {
  .page-layout { grid-template-columns: 1fr; max-width: 820px; padding-top: 44px; }
  .page-nav { display: none; }
  .topbar-inner { max-width: 820px; }
}
@media (max-width: 580px) {
  :root { font-size: 15px; scroll-padding-top: 80px; }
  .topbar-inner { padding: 13px 20px; gap: 10px; }
  .topbar-links { gap: 15px; }
  .topbar-links a { font-size: 13px; }
  .page-layout { padding: 34px 20px 0; }
  h1 { font-size: 37px; }
  h2 { font-size: 24px; margin-top: 48px; }
  h3 { font-size: 18px; }
  p.hero { font-size: 16px; }
  pre code { font-size: 12px; padding: 18px; }
  .code-toolbar { padding-left: 18px; }
  table { min-width: 640px; }
  .text-snippet { padding: 19px; }
  .snippet { border-radius: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
