:root {
  color-scheme: light dark;
  --bg: #ffffff; --fg: #1f2328; --muted: #57606a; --border: #d0d7de; --surface: #f6f8fa;
  --accent: #0b5fff; --accent-fg: #ffffff; --link: #0550ae; --focus: #0b5fff;
  --code-bg: #f6f8fa; --code-fg: #24292f;
  --tok-comment: #57606a; --tok-punct: #57606a; --tok-keyword: #cf222e; --tok-string: #0a3069;
  --tok-function: #8250df; --tok-number: #0550ae; --tok-class: #953800; --tok-builtin: #116329;
  --tok-prop: #0550ae; --tok-operator: #24292f; --tok-tag: #116329; --tok-attr: #0550ae;
  --tok-regex: #0a3069; --tok-deleted-bg: #ffebe9; --tok-inserted-bg: #dafbe1;
  --measure: 70ch; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --fg: #e6edf3; --muted: #9da7b3; --border: #30363d; --surface: #161b22;
    --accent: #4c8dff; --accent-fg: #0d1117; --link: #79b8ff; --focus: #79b8ff;
    --code-bg: #161b22; --code-fg: #e6edf3;
    --tok-comment: #8b949e; --tok-punct: #9da7b3; --tok-keyword: #ff7b72; --tok-string: #a5d6ff;
    --tok-function: #d2a8ff; --tok-number: #79c0ff; --tok-class: #ffa657; --tok-builtin: #7ee787;
    --tok-prop: #79c0ff; --tok-operator: #e6edf3; --tok-tag: #7ee787; --tok-attr: #79c0ff;
    --tok-regex: #a5d6ff; --tok-deleted-bg: #5a1e24; --tok-inserted-bg: #17421f;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.0625rem/1.65 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-fg); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .9rem; padding-bottom: .9rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.nav { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--link); text-decoration: underline; }
main { padding-top: 2rem; padding-bottom: 4rem; min-height: 60vh; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .95rem; padding: 2rem 0; }
.site-footer a { color: var(--muted); }
.footer-inner p { margin: .75rem 0 0; }

h1, h2, h3, h4 { line-height: 1.25; margin: 2rem 0 .75rem; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: 1.55rem; } h3 { font-size: 1.25rem; }
.summary { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); }
.meta { color: var(--muted); font-size: .95rem; }
.header-anchor { margin-left: .4rem; text-decoration: none; opacity: 0; font-weight: 400; }
:is(h2, h3, h4):hover .header-anchor, .header-anchor:focus { opacity: .6; }

.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .92rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; }

.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 64rem) {
  .guide-layout { grid-template-columns: minmax(0, var(--measure)) 16rem; justify-content: center; gap: 3rem; }
  .toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow: auto; order: 2; }
}
.toc { font-size: .93rem; border-left: 2px solid var(--border); padding-left: 1rem; }
.toc summary { font-weight: 700; cursor: pointer; margin-bottom: .5rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: .3rem 0; } .toc .l3 { padding-left: .9rem; }
.toc a { color: var(--muted); text-decoration: none; } .toc a:hover { color: var(--link); text-decoration: underline; }
@media (max-width: 63.99rem) { .toc { order: -1; border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; background: var(--surface); } }

.hero figure, figure.hero { margin: 1.5rem 0; }
.hero img { border-radius: 8px; width: 100%; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.info-box { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 6px; padding: .5rem 1.25rem 1rem; margin: 1.5rem 0; }
.info-box h2 { font-size: 1rem; margin: .9rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
.info-box ul { margin: 0; padding-left: 1.2rem; } .info-box p { margin: 0; }

.prose > :first-child { margin-top: 0; }
.prose img { border-radius: 6px; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5rem .75rem; text-align: left; }
.prose th { background: var(--surface); }
.prose blockquote { margin: 1.25rem 0; padding: .1rem 1.25rem; border-left: 4px solid var(--border); color: var(--muted); }
.prose :not(pre) > code { font-family: var(--mono); font-size: .88em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: .1em .35em; }
.prose kbd { font-family: var(--mono); font-size: .85em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: .05em .4em; background: var(--surface); }

pre[class*="language-"], pre.copyable { position: relative; margin: 1.25rem 0; padding: 1rem 1.1rem; overflow-x: auto; background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--border); border-radius: 8px; font: .88rem/1.55 var(--mono); tab-size: 2; }
pre[class*="language-"] code, pre.copyable code { font: inherit; background: none; border: 0; padding: 0; color: inherit; white-space: pre; }
.copy-btn { position: absolute; top: .4rem; right: .4rem; font: .78rem var(--font); padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--fg); cursor: pointer; opacity: .85; }
.copy-btn:hover, .copy-btn:focus-visible { opacity: 1; border-color: var(--accent); }
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--tok-comment); font-style: italic; }
.token.punctuation { color: var(--tok-punct); }
.token.operator, .token.entity, .token.url { color: var(--tok-operator); }
.token.keyword, .token.atrule, .token.boolean, .token.important, .token.selector .token.pseudo-class { color: var(--tok-keyword); }
.token.string, .token.char, .token.attr-value, .token.template-string { color: var(--tok-string); }
.token.regex { color: var(--tok-regex); }
.token.function, .token.function-variable { color: var(--tok-function); }
.token.number, .token.constant, .token.symbol, .token.unit { color: var(--tok-number); }
.token.class-name, .token.maybe-class-name, .token.namespace { color: var(--tok-class); }
.token.builtin, .token.variable.parameter, .token.parameter { color: var(--tok-builtin); }
.token.property, .token.selector, .token.attr-name { color: var(--tok-attr); }
.token.tag, .token.tag .token.punctuation { color: var(--tok-tag); }
.token.tag .token.punctuation, .token.attr-equals { color: var(--tok-punct); }
.token.deleted { background: var(--tok-deleted-bg); display: inline-block; width: 100%; }
.token.inserted { background: var(--tok-inserted-bg); display: inline-block; width: 100%; }
.token.bold { font-weight: 700; } .token.italic { font-style: italic; }
.language-bash .token.function, .language-shell .token.function { color: var(--tok-function); }
.language-diff .token.coord { color: var(--tok-comment); }
.language-css .token.property { color: var(--tok-prop); }

.cards { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.cards a { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards strong { color: var(--link); } .cards span { color: var(--muted); font-size: .95rem; }
.guide-list { list-style: none; padding: 0; margin: 1rem 0; max-width: var(--measure); }
.guide-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.guide-list h2, .guide-list h3 { margin: 0 0 .3rem; font-size: 1.25rem; }
.guide-list p { margin: .25rem 0; }
.hero-home { padding: 1rem 0 2rem; max-width: 52rem; }
.hero-home p { font-size: 1.15rem; color: var(--muted); }
.related { margin-top: 3rem; border-top: 1px solid var(--border); }
.guide-footer { margin-top: 2.5rem; padding: 1rem 1.25rem; background: var(--surface); border-radius: 8px; font-size: .95rem; }

.ad-slot { min-height: 280px; margin: 2rem 0; display: flex; align-items: center; justify-content: center; position: relative; contain: layout; }
.ad-slot:not([data-ad-ready]) { display: none; }
.ad-label { position: absolute; top: 0; left: 0; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 40rem; margin: 0 auto; z-index: 50; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; box-shadow: 0 8px 30px rgb(0 0 0 / .25); font-size: .95rem; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 .75rem; }
.consent-actions { display: flex; gap: .75rem; }
.consent-actions button { font: inherit; font-weight: 600; padding: .5rem 1.1rem; border-radius: 6px; border: 1px solid var(--accent); cursor: pointer; background: var(--bg); color: var(--link); }
.consent-actions button[data-consent="accept"] { background: var(--accent); color: var(--accent-fg); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
@media print { .site-header, .site-footer, .toc, .consent, .ad-slot, .copy-btn { display: none !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.token.variable, .token.assign-left { color: var(--tok-prop); }
