:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --switch-knob: #ffffff;
  --switch-track: #d0d7de;
  --switch-border: #8c959f;
  --soft: #f6f8fa;
  --text: #1f2328;
  --muted: #59636e;
  --border: #d0d7de;
  --link: #0969da;
  --code-bg: #f6f8fa;
  --inline-bg: #eaf2ff;
  --quote-bg: #fff2c2;
  --quote-border: #a16f00;
  --quote-text: #3d2b00;
  --token-comment: #59636e;
  --token-keyword: #b21e35;
  --token-string: #116329;
  --token-number: #0550ae;
  --token-function: #6639ba;
  --token-register: #953800;
  --token-operator: #424a53;
  --measure: 750px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
html[data-theme="dark"] {
  color-scheme: dark; --switch-knob: #e6edf3; --switch-track: #30363d; --switch-border: #6e7681;
  --bg: #0d1117; --surface: #161b22; --soft: #151c25;
  --text: #e6edf3; --muted: #9da7b3; --border: #30363d; --link: #79b8ff;
  --code-bg: #161b22; --inline-bg: #233346;
  --quote-bg: #302611; --quote-border: #d29922; --quote-text: #ffe7a3;
  --token-comment: #9da7b3; --token-keyword: #ff7b72; --token-string: #a5d6ff;
  --token-number: #79c0ff; --token-function: #d2a8ff; --token-register: #ffa657;
  --token-operator: #c9d1d9;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark; --switch-knob: #e6edf3; --switch-track: #30363d; --switch-border: #6e7681;
    --bg: #0d1117; --surface: #161b22; --soft: #151c25;
    --text: #e6edf3; --muted: #9da7b3; --border: #30363d; --link: #79b8ff;
    --code-bg: #161b22; --inline-bg: #233346;
    --quote-bg: #302611; --quote-border: #d29922; --quote-text: #ffe7a3;
    --token-comment: #9da7b3; --token-keyword: #ff7b72; --token-string: #a5d6ff;
    --token-number: #79c0ff; --token-function: #d2a8ff; --token-register: #ffa657;
    --token-operator: #c9d1d9;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--muted) var(--border); scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.65;
}
.page { width: min(var(--measure), calc(100% - 2rem)); margin-inline: auto; }
main, article, .article-intro, .article-body { min-width: 0; }
article:focus { outline: none; }
a { text-decoration: none; color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
.theme-control { position: absolute; top: 1rem; right: 0; display: inline-flex; width: 3.1rem; height: 1.65rem; cursor: pointer; }
.theme-control input { position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.theme-track { display: block; width: 3.1rem; height: 1.65rem; border: 1px solid var(--switch-border); border-radius: 999px; background: var(--switch-track); }
.theme-track::before { content: ""; position: absolute; top: 50%; left: .18rem; width: 1.14rem; height: 1.14rem; background: var(--switch-knob); box-shadow: 0 1px 3px rgba(0, 0, 0, .22); border-radius: 50%; transform: translateY(-50%); transition: transform .18s ease; }
.theme-control input:checked + .theme-track::before { transform: translate(1.42rem, -50%); }
.theme-control input:focus-visible + .theme-track { outline: 2px solid var(--link); outline-offset: 3px; }
.article-header { position: relative; display: grid; grid-template-columns: 3.1rem minmax(0, 1fr) 3.1rem; align-items: center; gap: 1rem; padding: 2rem 0 1.1rem; text-align: center; }
h1 { grid-column: 2; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 1rem; text-wrap: balance; }
.subtitle { grid-column: 1 / -1; margin-block: 0; font-size: clamp(1.06rem, 2.3vw, 1.22rem); line-height: 1.5; color: var(--muted); max-width: 40rem; margin-inline: auto; text-wrap: balance; }
p { margin: 0 0 1.25rem; }
.article-intro > :last-child { margin-bottom: 0; }
.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 {
  position: relative; padding-right: 2.3rem; margin: 2rem 0 1rem;
  line-height: 1.3; scroll-margin-top: 1.5rem; letter-spacing: -.015em;
}
.article-body h2 { font-size: 1.6rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body h4, .article-body h5, .article-body h6 { font-size: 1.1rem; }
.heading-link, .heading-link:hover, .heading-link:focus-visible { color: inherit; text-decoration: none; }
.copy-link, .copy-code {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: .75rem; font-weight: 500; line-height: 1.45; border-radius: .35rem;
  padding: .28rem .55rem; flex: none; min-height: 1.9rem;
}
.copy-link { position: absolute; top: 50%; right: 0; width: 1.8rem; height: 1.8rem; padding: 0; opacity: 0; transform: translateY(-50%); }
.copy-link, .copy-code { display: inline-flex; align-items: center; justify-content: center; }
.copy-link svg, .copy-code svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h2:hover .copy-link, h3:hover .copy-link, h4:hover .copy-link,
h5:hover .copy-link, h6:hover .copy-link, .copy-link:focus-visible { opacity: 1; }
.copy-link:hover, .copy-code:hover { color: var(--text); border-color: var(--muted); }
.copy-link[aria-busy="true"], .copy-code[aria-busy="true"] { cursor: progress; }
.toc { margin: 0 0 2rem; text-align: center; font-size: 1rem; line-height: 1.65; }
.toc h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.toc ol { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem .5rem; padding: 0; margin: 0; list-style: none; }
.toc li { margin: 0; white-space: nowrap; }
.toc li:not(:last-child)::after { content: "|"; margin-left: .5rem; color: var(--muted); }
.toc a { white-space: nowrap; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
blockquote { margin: 1.4rem 0; padding: 1rem 1.2rem; border-left: .25rem solid var(--quote-border); border-radius: .3rem; background: var(--quote-bg); color: var(--quote-text); }
blockquote p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.6rem; margin: 0 0 1.25rem; }
li { margin: .2rem 0; }
code { font-family: var(--mono); font-variant-ligatures: none; }
:not(pre) > code { padding: .12rem .3rem; border-radius: .25rem; background: var(--inline-bg); font-size: .87em; box-decoration-break: clone; -webkit-box-decoration-break: clone; overflow-wrap: anywhere; white-space: break-spaces; }
a > code { color: inherit; }
.code-block { position: relative; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: .45rem; background: var(--code-bg); overflow: hidden; }
.copy-code { position: absolute; top: .55rem; right: .55rem; width: 2rem; height: 2rem; padding: 0; }
pre { margin: 0; padding: 1rem 3rem 1rem 1rem; overflow-x: auto; font-family: var(--mono); font-size: .9rem; line-height: 1.55; tab-size: 4; }
pre code { display: block; width: max-content; min-width: 100%; white-space: pre; }
.token.comment, .token.prolog, .token.doctype { color: var(--token-comment); }
.token.keyword, .token.directive, .token.boolean { color: var(--token-keyword); }
.token.string, .token.char, .token.attr-value { color: var(--token-string); }
.token.number { color: var(--token-number); }
.token.function, .token.label, .token.class-name { color: var(--token-function); }
.token.variable, .token.register { color: var(--token-register); }
.token.operator, .token.punctuation { color: var(--token-operator); }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.4rem 0; }
table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: .94rem; line-height: 1.5; }
th, td { border: 0; padding: .35rem .8rem; text-align: left; vertical-align: top; }
th { border-bottom: 1px solid var(--border); font-weight: 650; white-space: nowrap; }

table.table-content-width { width: max-content; max-width: 100%; min-width: 0; }
table .compact-column { width: 1%; white-space: nowrap; }
.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
article img { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; }
.site-footer { margin: 3.5rem 0 0; padding: 1.1rem 0 2.5rem; border-top: 1px solid var(--border); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; color: var(--muted); font-size: .84rem; line-height: 1.3; }
.site-footer p { margin: 0 0 .12rem; }
.site-footer__left { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.site-footer__links { font-size: 1rem; line-height: 1.65; flex: none; white-space: nowrap; }
.license-link { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--surface); border: 1px solid var(--border); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.clipboard-buffer { position: fixed; top: 0; left: -10000px; width: 1px; height: 1px; }
@media (max-width: 600px) {
  .page { width: calc(100% - 2rem); }
  body { font-size: 16px; }
    .article-header { margin-bottom: 1.75rem; }
  .article-body h2 { font-size: 1.4rem; }
  .copy-link { opacity: 1; font-size: .68rem; padding-inline: .35rem; }
  blockquote { padding: .85rem .9rem; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .site-footer__links { align-self: stretch; text-align: center; }
}
@media (hover: none) { .copy-link { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
@media (forced-colors: active) {
  .theme-track::before { background: CanvasText; }
  .code-block, .table-wrap, .toc, blockquote { border-color: CanvasText; }
}
@media print {
  :root, html[data-theme], html:not([data-theme]) {
    color-scheme: light; --bg: #fff; --surface: #fff; --soft: #f5f5f5;
    --text: #111; --muted: #444; --border: #aaa; --link: #111;
    --code-bg: #fff; --inline-bg: #f0f0f0;
    --quote-bg: #f6f6f6; --quote-text: #111; --quote-border: #888;
    --token-comment: #555; --token-keyword: #8b1029; --token-string: #116329;
    --token-number: #0550ae; --token-function: #6639ba; --token-register: #953800; --token-operator: #111;
  }
  .page { width: 100%; max-width: none; }
  body { font-size: 10.5pt; line-height: 1.5; }
  .topbar, .theme-control, .toc, .copy-code, .copy-link, .heading-anchor, .skip-link { display: none !important; }
  h1 { font-size: 25pt; }
  .article-body h2, .article-body h3 { break-after: avoid; }
  pre { overflow: visible; font-size: 8.5pt; }
  pre code { width: auto; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; font-size: 9pt; }
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
  .site-footer { margin-top: 1.5rem; }
}

/* Short-lived copy feedback stays beside its control without shifting content. */
.copy-link[data-copy-state], .copy-code[data-copy-state] { opacity: 1; z-index: 2; }
.copy-feedback { position: absolute; right: calc(100% + .4rem); top: 50%; transform: translateY(-50%); padding: .2rem .45rem; border: 1px solid var(--border); border-radius: .3rem; background: var(--surface); color: var(--text); font-size: .75rem; font-weight: 500; line-height: 1.4; white-space: nowrap; pointer-events: none; }
[data-copy-state="success"] svg { color: #1a7f37; }
[data-copy-state="error"] svg { color: #cf222e; }
html[data-theme="dark"] [data-copy-state="success"] svg { color: #3fb950; }
html[data-theme="dark"] [data-copy-state="error"] svg { color: #ff7b72; }
