@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f3f5f8; --surface: #ffffff; --ink: #12182b; --muted: #4b5466; --rule: #dde1e8;
  --accent: #12805c; --accent-text: #0e6a4c; --accent-soft: #e3f6ee; --mint: #5fd3a4;
  --code-bg: #12182b; --code-ink: #eef1f6; --inline-bg: #e9edf2; --focus: #12182b;
  --head: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1020; --surface: #141a2e; --ink: #eef1f6; --muted: #a3abbd; --rule: #263049;
    --accent: #5fd3a4; --accent-text: #5fd3a4; --accent-soft: #173a2e; --code-bg: #060a16; --inline-bg: #1c2440; --focus: #5fd3a4;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16.5px/1.6 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; overflow-wrap: break-word; }
a { color: var(--accent-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.bar { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 20px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .dot { color: var(--accent); }
.brand .sub { font-family: "IBM Plex Sans", sans-serif; font-weight: 400; font-size: 15px; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 10px; }
.search { position: relative; margin-left: auto; width: min(340px, 40vw); }
.search input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; min-height: 42px; }
.hits { position: absolute; right: 0; left: 0; top: 48px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 18px 40px -20px rgba(0,0,0,.4); max-height: 70vh; overflow: auto; }
.hits a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.hits a:hover, .hits a:focus { background: var(--inline-bg); }
.hits small { display: block; color: var(--muted); }
.site, .lang { color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.lang { border: 1px solid var(--rule); border-radius: 8px; padding: 6px 10px; }
.lang:hover, .site:hover { color: var(--ink); }

.layout { max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 15px; }
.menu > summary { display: none; }
.side .group { margin: 18px 0 6px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.side li a:hover { background: var(--inline-bg); }
.side li a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

main { min-width: 0; }
.doc { max-width: 780px; }
.doc h1, .doc h2, .doc h3 { font-family: var(--head); letter-spacing: -0.015em; line-height: 1.15; }
.doc h1 { font-size: clamp(30px, 4.4vw, 42px); margin: 8px 0 18px; }
.doc h2 { font-size: 24px; margin: 38px 0 10px; padding-top: 6px; border-top: 1px solid var(--rule); }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc li { margin: 4px 0; }
.doc code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--inline-bg); padding: 1px 5px; border-radius: 5px; }
.doc pre { background: var(--code-bg); color: var(--code-ink); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.doc pre code { background: none; padding: 0; color: inherit; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.doc th { font-size: 13px; color: var(--muted); font-weight: 600; }
.doc blockquote { margin: 16px 0; padding: 12px 16px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; }
.doc blockquote p:last-child { margin: 0; }
.pager { max-width: 780px; display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; }
.pager a { flex: 1 1 0; display: block; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
.pager a span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.pager .next { text-align: right; }
.meta { max-width: 780px; color: var(--muted); font-size: 14px; margin-top: 28px; }
.foot { border-top: 1px solid var(--rule); padding: 20px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 1240px; margin: 0 auto; }
.foot a { color: var(--muted); }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; }
  .side { position: static; max-height: none; }
  .menu { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); padding: 4px 12px; }
  .menu > summary { display: list-item; cursor: pointer; font-weight: 600; padding: 8px 0; }
  .brand .sub, .site { display: none; }
  .lang { padding: 6px 8px; font-size: 14px; }
  .search { width: auto; flex: 1; }
}
