:root {
  color-scheme: light;
  --brand: #146b5f; --ink: #172b28; --muted: #52635e;
  --canvas: #f6f8f7; --surface: #fff; --line: #d3dfd9;
  --code: #112722; --note: #edf8f5; --radius: 8px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s6: 24px; --s8: 32px; --s12: 48px;
  --body: 15px; --small: 13px; --title: 36px; --section: 25px;
  --table-min: 560px; --layout: 1280px; --sidebar: 224px; --header: 72px;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + var(--s6)); }
body { margin: 0; color: var(--ink); background: var(--canvas); font: var(--body)/1.7 system-ui, sans-serif; }
a { color: var(--brand); text-underline-offset: var(--s1); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--brand); outline-offset: var(--s1); }
.skip { position: fixed; top: -100px; left: var(--s4); padding: var(--s3) var(--s4); background: var(--surface); z-index: 5; }
.skip:focus { top: var(--s2); }
.site-header { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--layout); min-height: var(--header); padding: var(--s3) var(--s8); margin: auto; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s3); min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.brand img { border-radius: var(--radius); }
.brand-divider { color: var(--line); padding: 0 var(--s2); }
.brand-label { color: var(--muted); font-size: var(--small); font-weight: 500; letter-spacing: normal; }
.header-links { display: flex; gap: var(--s6); }
.header-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--small); text-decoration: none; white-space: nowrap; }
.page-layout { max-width: var(--layout); padding: var(--s12) var(--s8); margin: auto; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--s12); align-items: start; }
.sidebar { position: sticky; top: calc(var(--header) + var(--s6)); max-height: calc(100dvh - var(--header) - var(--s12)); overflow-y: auto; scrollbar-width: thin; }
.sidebar-title { font-size: var(--body); font-weight: 650; margin: 0; }
.api-version { font: var(--small)/1.7 var(--mono); color: var(--brand); margin: var(--s1) 0 var(--s6); }
.toc { display: grid; gap: var(--s1); }
.toc a { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: var(--small); line-height: 1.5; text-decoration: none; padding: var(--s2) var(--s3); border-left: 2px solid var(--line); }
.toc a:hover { background: var(--note); color: var(--brand); border-left-color: var(--brand); }
.downloads { display: grid; gap: var(--s2); margin-top: var(--s6); border-top: 1px solid var(--line); padding-top: var(--s4); font-size: var(--small); }
.downloads a { display: flex; min-height: 44px; align-items: center; }
main { min-width: 0; }
.document-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); font-size: var(--small); color: var(--muted); margin-bottom: var(--s4); }
.document-meta span { color: var(--brand); font-weight: 600; }
.prose { padding: var(--s8); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.prose h1 { font-size: var(--title); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 var(--s6); }
.prose h2 { font-size: var(--section); line-height: 1.35; letter-spacing: -.02em; margin: var(--s12) 0 var(--s4); padding-top: var(--s6); border-top: 1px solid var(--line); }
.prose h3 { font: 600 18px/1.5 var(--mono); margin: var(--s8) 0 var(--s4); color: var(--brand); }
.prose p, .prose ul, .prose ol { margin: var(--s4) 0; }
.prose ul, .prose ol { padding-left: var(--s6); }
.prose li + li { margin-top: var(--s2); }
.prose code { font: var(--small)/1.7 var(--mono); padding: 2px var(--s1); border-radius: var(--s1); background: var(--note); color: var(--code); }
.prose pre { margin: var(--s6) 0; background: var(--code); color: var(--note); border-radius: var(--radius); padding: var(--s6); overflow: auto; max-width: 100%; tab-size: 2; }
.prose pre code { font: var(--small)/1.7 var(--mono); background: none; color: inherit; padding: 0; overflow-wrap: normal; }
.table-scroll { overflow: auto; margin: var(--s6) 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: var(--table-min); font-size: var(--small); overflow-wrap: normal; }
th { text-align: left; background: var(--note); font-weight: 650; }
th, td { padding: var(--s3) var(--s4); vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
table code { white-space: nowrap; }
.prose strong { color: var(--ink); }
.document-footer { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); align-items: center; padding: var(--s6) 0; color: var(--muted); font-size: var(--small); }
.document-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.mobile-index { display: none; }
.not-found { max-width: 760px; margin: var(--s12) auto; padding: var(--s8); }
@media (max-width: 899px) {
  :root { --title: 30px; --section: 23px; }
  .header-inner { padding-inline: var(--s4); }
  .page-layout { display: block; padding: var(--s6) var(--s4); }
  .sidebar { display: none; }
  .mobile-index { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 var(--s4); margin: var(--s4) 0; }
  .mobile-index summary { cursor: pointer; padding: var(--s3) 0; color: var(--brand); font-weight: 600; min-height: 48px; }
  .mobile-index nav { padding-bottom: var(--s4); }
  .download-mobile { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: var(--s4); }
  .prose { padding: var(--s6); }
}
@media (max-width: 479px) {
  .brand-label, .brand-divider { display: none; }
  .header-links { gap: var(--s4); }
  .prose { padding: var(--s4); }
  .prose pre { padding: var(--s4); }
}
@media print {
  .site-header, .sidebar, .mobile-index, .skip, .document-footer { display: none; }
  .page-layout { display: block; padding: 0; }
  .prose { padding: 0; border: 0; }
  .prose pre { white-space: pre-wrap; color: var(--ink); background: var(--canvas); }
  body { background: var(--surface); }
}
