:root {
  color-scheme: light dark;
  --bg: #fbf8f4;
  --surface: #fff;
  --soft: #f3eee7;
  --text: #1d1a17;
  --muted: #6b625a;
  --border: #e4dcd2;
  --accent: #9a3412;
  --highlight: #fde7d9;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110f;
    --surface: #1c1916;
    --soft: #24201c;
    --text: #f1ebe4;
    --muted: #a79d93;
    --border: #4a4037;
    --accent: #fdba74;
    --highlight: #3a2116;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; top: -100px; left: 16px; padding: 10px 16px; background: var(--surface); z-index: 20; }
.skip:focus { top: 8px; }
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { max-width: 1200px; margin: auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 19px; font-weight: 750; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.header-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.header-links a { padding: 8px 0; }
.layout { max-width: 1200px; margin: auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding: 32px 24px 64px; }
.sidebar { align-self: start; position: sticky; top: 24px; font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin: 0; }
.nav-top { margin-bottom: 8px; }
.nav-group summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 6px; font-weight: 650; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.nav-group[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.nav-group summary:hover { background: var(--soft); }
.nav-group ul { margin: 2px 0 8px 12px; }
.nav-group a { color: var(--muted); }
.nav-group a:hover { color: var(--text); }
.sidebar a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.sidebar a:hover { background: var(--soft); }
.sidebar a[aria-current="page"] { color: var(--accent); background: var(--highlight); font-weight: 650; }
main { min-width: 0; max-width: 800px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(32px, 5vw, 46px); margin: 12px 0 20px; }
h2 { font-size: 26px; margin-top: 44px; }
h3 { font-size: 19px; margin-top: 28px; }
[id] { scroll-margin-top: 24px; }
.lede { font-size: 19px; color: var(--muted); margin-bottom: 28px; }
.soon { position: relative; text-decoration: underline dotted; text-underline-offset: .2em; cursor: help; }
.soon::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); padding: 3px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 13px; line-height: 1.4; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.soon:hover::after, .soon:focus::after { opacity: 1; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--soft); border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--border); white-space: nowrap; }
pre { padding: 18px 20px; background: #1b1815; color: #f3ece4; border-radius: 8px; overflow-x: auto; font-size: 15px; }
pre code { background: none; color: inherit; padding: 0; overflow-wrap: normal; }
.callout { padding: 16px 20px; margin: 24px 0; background: var(--highlight); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
.callout p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.card h2, .card h3 { font-size: 20px; margin: 0 0 10px; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card a { font-weight: 650; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 650; text-decoration: none; }
.btn:hover { opacity: .9; }
.fine { font-size: 14px; color: var(--muted); }
.shot { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
figure { margin: 28px 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.table-wrap { overflow-x: auto; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--soft); }
li { margin: 6px 0; }
.on-page { border-block: 1px solid var(--border); padding: 12px 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.page-nav { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--border); margin-top: 48px; padding-top: 24px; }
.page-nav a { max-width: 50%; }
.page-nav a:last-child { margin-left: auto; text-align: right; }
.page-nav small { display: block; color: var(--muted); }
.page-footer { margin-top: 36px; font-size: 13px; color: var(--muted); }
@media (max-width: 800px) {
  .cards-3 { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; gap: 28px; padding: 24px 20px 48px; }
  .sidebar { position: static; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
  .header-inner { padding-inline: 20px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .header-links { gap: 16px; }
  th, td { padding: 10px 6px; }
}
@media print {
  .site-header, .sidebar, .skip, .page-nav { display: none; }
  .layout { display: block; padding: 0; }
  :root { --bg: #fff; --text: #000; --muted: #333; --accent: #000; }
}
.start { padding: 22px; margin: 20px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.start h3 { margin: 0 0 12px; }
.start pre { margin: 0 0 12px; }
.start p { margin: 0 0 16px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-quiet { background: var(--soft); color: var(--text); border: 1px solid var(--border); }
.doc-list { list-style: none; padding: 0; margin: 20px 0 32px; display: grid; gap: 10px; }
.doc-list li { margin: 0; }
.doc-list a { display: block; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.doc-list a:hover { border-color: var(--accent); }
.doc-list strong { display: block; font-size: 17px; }
.doc-list strong::after { content: " \2192"; color: var(--accent); }
.doc-list span { display: block; color: var(--muted); font-size: 15px; }
.download { max-width: 1040px; margin: auto; padding: 56px 24px 64px; }
.download-head { text-align: center; margin-bottom: 40px; }
.download-head h1 { margin: 16px 0 8px; }
.download-head p { margin: 0; color: var(--muted); }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.platform { display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.platform h2 { margin: 0 0 8px; font-size: 24px; }
.platform p { margin: 0 0 16px; color: var(--muted); }
.platform pre { margin: 0 0 16px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.platform pre code { overflow-wrap: anywhere; }
.platform .actions { margin-top: auto; }
.download-foot { text-align: center; margin-top: 32px; }
.actions-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions-split .btn { text-align: center; }
@media (max-width: 800px) {
  .platforms { grid-template-columns: minmax(0, 1fr); }
  .platform { padding: 20px; }
  .download { padding: 32px 20px 48px; }
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-btn, .nav-site { display: none; }
@media (max-width: 800px) {
  .menu-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px -10px -6px auto; cursor: pointer; }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px; position: relative; content: ""; }
  .menu-btn span::before { position: absolute; top: -7px; }
  .menu-btn span::after { position: absolute; top: 7px; }
  .nav-toggle:checked ~ .site-header .menu-btn span { background: transparent; }
  .nav-toggle:checked ~ .site-header .menu-btn span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .site-header .menu-btn span::after { top: 0; transform: rotate(-45deg); }
  .nav-toggle:focus-visible ~ .site-header .menu-btn { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
  .menu-btn ~ .header-links { display: none; }
  .header-inner { flex-wrap: nowrap; padding-block: 14px; }
  .layout { gap: 0; padding-top: 0; }
  .sidebar { display: none; padding: 16px 0 20px; }
  .nav-toggle:checked ~ .layout .sidebar { display: block; }
  .sidebar { font-size: 17px; }
  .sidebar a, .nav-group summary { padding: 12px 10px; }
  .nav-site { display: block; border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px; }
  main { padding-top: 28px; }
  h1 { margin-top: 0; }
  .lede { font-size: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
  .lede:has(+ .on-page) { padding-bottom: 0; border-bottom: 0; }
  .actions-split { grid-template-columns: 1fr; }
  .start, .doc-list a { padding: 18px; }
}
.search-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 7px 10px; min-width: 220px; background: var(--soft); color: var(--muted); border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.search-btn:hover { color: var(--text); border-color: var(--accent); }
.search-btn kbd { margin-left: auto; font-size: 12px; }
.search-btn ~ .header-links { margin-left: 0; }
.search-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 96px)); margin: 72px auto auto; padding: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden; }
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog::backdrop { background: rgba(10, 8, 6, .55); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-box input { flex: 1; min-width: 0; padding: 6px 0; background: none; border: 0; color: var(--text); font: inherit; font-size: 17px; outline: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-close { padding: 2px 8px; background: var(--soft); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; font: 12px var(--mono); cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results li { margin: 0; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-results [aria-selected="true"] a, .search-results a:hover { background: var(--highlight); }
.search-where { color: var(--muted); font-size: 13px; }
.search-results strong { font-size: 15px; }
.search-snippet { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.search-results mark { background: none; color: var(--accent); font-weight: 650; }
.search-status { margin: 0; padding: 0 20px; color: var(--muted); font-size: 14px; }
.search-status:not(:empty) { padding: 16px 20px; }
@media (max-width: 800px) {
  .search-btn { min-width: 0; width: 44px; height: 44px; padding: 0; justify-content: center; background: none; border: 0; color: var(--text); }
  .search-btn .search-label, .search-btn kbd { display: none; }
  .search-btn ~ .menu-btn { margin-left: 0; }
  .search-dialog { margin-top: 16px; max-height: calc(100vh - 32px); }
}
.breadcrumbs { padding-bottom: 18px; margin-bottom: 28px; border-bottom: 1px solid var(--border); font-size: 15px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 14px 2px 10px; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: rotate(45deg); }
.breadcrumbs a { color: var(--text); text-decoration: none; }
.breadcrumbs a:hover, .breadcrumbs [aria-current="page"] { text-decoration: underline; }
.breadcrumbs + h1 { margin-top: 0; }
