@font-face { font-family: 'Plex'; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2248, U+2260-2265; }
@font-face { font-family: 'Plex'; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: 'Plex'; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2248, U+2260-2265; }
@font-face { font-family: 'Plex'; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2248, U+2260-2265; }
@font-face { font-family: 'JBM'; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JBM'; font-weight: 600; font-display: swap; src: url(/fonts/jetbrains-mono-latin-600-normal.woff2) format('woff2'); }

:root {
  --bg: #FFFFFF; --bg-2: #F6F7F9; --bg-3: #EEF0F3; --line: #E3E6EB; --line-2: #D0D5DD;
  --fg: #111418; --fg-2: #454C57; --fg-3: #69717D;
  --accent: #C8321A; --accent-bg: #FDF1EE;
  --code-bg: #0F1115; --code-fg: #E6E8EC;
  --note: #2459C7; --note-bg: #EFF4FE; --warn: #9A5B00; --warn-bg: #FFF7E6; --sec: #B42318; --sec-bg: #FEF1F0;
  --sans: 'Plex', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JBM', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1115; --bg-2: #151820; --bg-3: #1C2029; --line: #232833; --line-2: #313846;
    --fg: #ECEEF2; --fg-2: #B4BAC5; --fg-3: #8A92A0;
    --accent: #FF6B4A; --accent-bg: #2A1712;
    --code-bg: #0A0C10; --code-fg: #E6E8EC;
    --note: #7EA6FF; --note-bg: #111B30; --warn: #F2B24C; --warn-bg: #251C0C; --sec: #FF8A80; --sec-bg: #2A1414;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 20px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 400; color: var(--fg-3); }
.mark { width: 26px; height: 26px; border-radius: 6px; background: var(--fg); color: var(--bg); display: grid; place-items: center; font: 700 15px/1 var(--sans); }
.menu { display: none; background: none; border: 1px solid var(--line-2); color: var(--fg); border-radius: 6px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; }
.search { position: relative; flex: 0 1 420px; margin-left: auto; }
.search input { width: 100%; height: 38px; padding: 0 40px 0 12px; font: 400 14px var(--sans); color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.search kbd { position: absolute; right: 10px; top: 9px; font: 12px var(--mono); color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; }
.results { position: absolute; top: 44px; left: 0; right: 0; max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 6px; }
.results a { display: block; padding: 9px 10px; border-radius: 6px; color: var(--fg); }
.results a:hover, .results a[aria-selected="true"] { background: var(--bg-3); text-decoration: none; }
.results small { display: block; color: var(--fg-3); font-size: 12.5px; }
.results .empty { padding: 12px; color: var(--fg-3); font-size: 14px; }
.results mark { background: var(--accent-bg); color: var(--accent); border-radius: 2px; }
.top-links { display: flex; gap: 16px; font-size: 14px; }
.top-links a { color: var(--fg-2); }

/* shell */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; max-width: 1480px; margin: 0 auto; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 24px 16px 40px 20px; border-right: 1px solid var(--line); font-size: 14.5px; }
.nav-group { margin-bottom: 18px; }
.nav-product { display: block; font-weight: 600; color: var(--fg); padding: 4px 8px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.nav-group ul { list-style: none; margin: 4px 0 0; padding: 0; }
.nav-group li a { display: block; padding: 5px 8px 5px 12px; color: var(--fg-2); border-left: 2px solid var(--line); line-height: 1.45; }
.nav-group li a:hover { color: var(--fg); text-decoration: none; border-left-color: var(--line-2); }
.nav-group li a[aria-current="page"] { color: var(--accent); border-left-color: var(--accent); font-weight: 500; background: var(--accent-bg); }
.doc { min-width: 0; padding: 36px clamp(20px, 4vw, 56px) 64px; }
.doc article { max-width: 780px; }
.crumb { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 36px 20px 40px 8px; font-size: 13.5px; }
.toc-h { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; color: var(--fg-3); padding: 3px 0; line-height: 1.4; }
.toc li.d3 a { padding-left: 12px; }
.toc li a.on { color: var(--accent); }

/* prose */
article h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 600; }
article h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; margin: 48px 0 14px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; }
article h3 { font-size: 18.5px; margin: 32px 0 10px; font-weight: 600; }
article h4 { font-size: 16px; margin: 24px 0 8px; font-weight: 600; }
article h2, article h3, article h4 { position: relative; }
.anchor { position: absolute; left: -1em; color: var(--fg-3); opacity: 0; text-decoration: none !important; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: 1; }
article p, article ul, article ol { margin: 0 0 16px; color: var(--fg); }
article li { margin: 4px 0; }
article li > p { margin: 0; }
article strong { font-weight: 600; }
article hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
article img { max-width: 100%; }
:not(pre) > code { font: 0.86em var(--mono); background: var(--bg-3); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
a code { color: var(--accent); }

.code { margin: 0 0 20px; border-radius: 10px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line); }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; font: 12px var(--mono); color: #8A92A0; border-bottom: 1px solid #1F2430; }
.copy { font: 12px var(--mono); color: #C9CED6; background: transparent; border: 1px solid #2B313D; border-radius: 5px; padding: 3px 9px; cursor: pointer; }
.copy:hover { border-color: #56607A; color: #fff; }
.copy.done { color: #6EE7A4; border-color: #2F6B4B; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.65 var(--mono); color: var(--code-fg); tab-size: 2; }
.hljs-keyword, .hljs-built_in, .hljs-type { color: #FF8F73; }
.hljs-string, .hljs-regexp { color: #A5D6A7; }
.hljs-number, .hljs-literal { color: #F7C873; }
.hljs-comment { color: #6F7888; font-style: italic; }
.hljs-title, .hljs-title.function_ { color: #8CB8FF; }
.hljs-attr, .hljs-property, .hljs-variable, .hljs-params { color: #D7DBE2; }
.hljs-meta { color: #C39BFF; }

.table { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
td code:only-child { white-space: normal; overflow-wrap: anywhere; }

.callout { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; border: 1px solid; font-size: 15px; }
.callout p:last-child { margin-bottom: 0; }
.callout.note, .callout.plain, .callout.tip { background: var(--note-bg); border-color: color-mix(in srgb, var(--note) 30%, transparent); }
.callout.note > p:first-child strong:first-child, .callout.tip > p:first-child strong:first-child { color: var(--note); }
.callout.warning, .callout.important, .callout.unverified { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.callout.warning > p:first-child strong:first-child, .callout.important > p:first-child strong:first-child, .callout.unverified > p:first-child strong:first-child { color: var(--warn); }
.callout.security, .callout.danger { background: var(--sec-bg); border-color: color-mix(in srgb, var(--sec) 35%, transparent); }
.callout.security > p:first-child strong:first-child, .callout.danger > p:first-child strong:first-child { color: var(--sec); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 780px; margin-top: 56px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-weight: 500; }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager a span { display: block; font-size: 12.5px; color: var(--fg-3); font-weight: 400; }
.pager .next { text-align: right; }
.foot { max-width: 780px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }

@media (max-width: 1180px) { .shell { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .menu { display: inline-block; }
  .top { gap: 12px; padding: 0 12px; }
  .top-links { display: none; }
  .brand b { display: none; }
  .side { position: fixed; top: var(--top); left: 0; bottom: 0; width: min(300px, 86vw); height: auto; background: var(--bg); z-index: 25; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  body.nav-open .side { transform: none; }
  .doc { padding: 24px 16px 48px; }
  .anchor { display: none; }
  .pager { grid-template-columns: 1fr; }
  .search kbd { display: none; }
}
