:root {
  --bg: #ffffff; --side: #f7f8fa; --ink: #16191d; --muted: #66707d; --line: #e6e8eb; --accent: #2f6fde;
  --code-bg: #0f1216; --code-ink: #e6e9ee; --inline: #f1f3f6;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1013; --side: #13161a; --ink: #e7eaee; --muted: #8c96a3; --line: #23272d; --accent: #6b9cf5;
    --code-bg: #090b0d; --code-ink: #e6e9ee; --inline: #1b1f24; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-weight: 700; font-size: 17px; }
.brand span { color: var(--muted); font-weight: 500; }
.bar nav { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.brand { white-space: nowrap; }
.cta { background: var(--accent); color: #fff !important; padding: 6px 12px; border-radius: 8px; }
.cta:hover { text-decoration: none; opacity: .9; }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }
aside { position: sticky; top: 53px; align-self: start; height: calc(100vh - 53px); overflow-y: auto; padding: 18px 14px 40px; border-right: 1px solid var(--line); }
aside .grp { margin: 18px 8px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
aside a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--ink); font-size: 14px; }
aside a:hover { background: var(--side); text-decoration: none; }
aside a.on { background: var(--side); color: var(--accent); font-weight: 600; }
main { padding: 28px 40px 80px; min-width: 0; }
section { padding-top: 8px; margin-bottom: 36px; scroll-margin-top: 70px; }
h1 { font-size: 30px; line-height: 1.2; margin: 6px 0 12px; }
h2 { font-size: 21px; margin: 0 0 10px; }
.lead { font-size: 17px; color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--inline); padding: 1px 5px; border-radius: 4px; }
pre { position: relative; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; color: inherit; font-size: 13px; line-height: 1.55; white-space: pre; }
pre .copy { position: absolute; top: 8px; right: 8px; background: #2a2f36; color: #e6e9ee; border: 0; border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; opacity: .8; }
pre .copy:hover { opacity: 1; }
table { border-collapse: collapse; width: 100%; margin: 10px 0 14px; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
footer { margin-top: 50px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
td code { overflow-wrap: anywhere; }
.cta .short { display: none; }
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
  .cta .long { display: none; }
  .cta .short { display: inline; }
  aside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 2px; }
  aside .grp { width: 100%; margin: 8px 0 2px; }
  main { padding: 20px 16px 60px; }
  .bar { padding: 10px 16px; }
}
