:root {
  --brand: #176b52;
  --brand-dark: #0d4f3b;
  --brand-soft: #e8f3ed;
  --coral: #eb654d;
  --ink: #17251f;
  --muted: #52635a;
  --line: #eadfce;
  --surface: #fffdf8;
  --canvas: #fffaf2;
  --code: #17251f;
  --sidebar: 292px;
  --topbar: 72px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.7 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 12px; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(16,24,40,.04);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 1.02rem; font-weight: 850; letter-spacing: -.03em; text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(13,79,59,.16); border-radius: 11px; color: #fff; background: var(--brand-dark); box-shadow: 0 5px 14px rgba(13,79,59,.18); font-weight: 850; font-size: 1.02rem; }
.brand-mark i { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border: 2px solid var(--surface); border-radius: 50%; background: #b9ff2c; }
.brand-context { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.version { margin-left: 10px; padding-left: 22px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.version strong { color: var(--ink); }
.top-link { margin-left: auto; font-size: 13px; font-weight: 650; }
.menu-button { display: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; color: var(--ink); cursor: pointer; }

.docs-shell { min-height: 100vh; padding-top: var(--topbar); }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: var(--topbar) auto 0 0;
  width: var(--sidebar);
  padding: 24px 20px 30px;
  overflow-y: auto;
  background: #fffdf8;
  border-right: 1px solid var(--line);
}
.search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 26px; }
.search-wrap > span { position: absolute; left: 12px; color: #718078; font-size: 19px; pointer-events: none; }
.search-wrap input { width: 100%; height: 42px; padding: 0 42px 0 38px; border: 1px solid #e4d6c2; border-radius: 8px; color: var(--ink); background: #fffdf8; outline: none; }
.search-wrap input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,107,92,.12); }
.search-wrap kbd { position: absolute; right: 10px; padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: #718078; background: #fbfaf6; font-size: 11px; }
.nav-group { margin: 0 0 24px; }
.nav-group[hidden], .doc-link[hidden] { display: none; }
.nav-title { margin: 0 10px 8px; color: #718078; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.doc-link { display: flex; align-items: center; min-height: 37px; padding: 7px 10px; border-radius: 7px; color: #4f5b55; font-size: 13.5px; font-weight: 520; }
.doc-link:hover { color: var(--ink); background: #f6eee3; text-decoration: none; }
.doc-link.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 750; box-shadow: inset 3px 0 0 var(--brand); }
.doc-link.active::before { content: none; }
.sidebar-help { margin-top: 30px; padding: 16px; border: 1px solid #d7e8df; border-radius: 10px; background: var(--brand-soft); }
.sidebar-help strong { color: var(--brand-dark); font-size: 13px; }
.sidebar-help p { margin: 5px 0 8px; color: #516159; font-size: 12px; line-height: 1.5; }
.sidebar-help a { font-size: 12px; font-weight: 700; }
.sidebar-scrim { display: none; }

.main-content { margin-left: var(--sidebar); min-height: calc(100vh - var(--topbar)); padding: 24px 48px 0; background: var(--surface); }
.breadcrumbs { max-width: 1120px; margin: 0 auto 32px; color: #718078; font-size: 12px; }
.breadcrumbs span, .breadcrumbs a { margin-right: 9px; }
.article-grid { display: grid; grid-template-columns: minmax(0, 760px) 190px; gap: 68px; max-width: 1120px; margin: 0 auto; }
.article { min-width: 0; }
.article-header { margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.article-kicker { display: inline-block; margin-bottom: 8px; color: var(--brand); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.article-header h1 { margin: 0; color: #171917; font-size: clamp(32px, 4vw, 44px); line-height: 1.15; letter-spacing: -.035em; }
.article-header p { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.article-body { color: #34463d; font-size: 15.5px; }
.article-body > :first-child { margin-top: 0; }
.article-body h2, .article-body h3 { position: relative; color: #171917; line-height: 1.3; scroll-margin-top: 95px; }
.article-body h2 { margin: 44px 0 14px; padding-top: 4px; font-size: 25px; letter-spacing: -.02em; }
.article-body h3 { margin: 30px 0 10px; font-size: 19px; }
.article-body h2 a, .article-body h3 a { color: inherit; text-decoration: none; }
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 23px; }
.article-body li { margin: 7px 0; padding-left: 3px; }
.article-body li::marker { color: var(--brand); font-weight: 700; }
.article-body strong { color: #26352e; }
.article-body code:not(pre code) { padding: 2px 6px; border: 1px solid #eadfce; border-radius: 5px; color: #b42318; background: #fbfaf6; font: 13px/1.5 "SFMono-Regular", Consolas, monospace; }
.code-block { position: relative; margin: 22px 0 26px; border: 1px solid #263545; border-radius: 10px; overflow: hidden; background: var(--code); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 12px 0 16px; border-bottom: 1px solid #2f4051; color: #98a9ba; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.copy-button { padding: 4px 9px; border: 1px solid #45586a; border-radius: 5px; color: #d5dee7; background: transparent; font-size: 11px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.copy-button:hover { background: #263545; }
.code-block pre { margin: 0; padding: 17px 19px 20px; overflow-x: auto; color: #e7edf3; font: 13px/1.65 "SFMono-Regular", Consolas, monospace; tab-size: 2; }
.article-body blockquote { margin: 24px 0; padding: 15px 18px 15px 48px; border: 1px solid #b8e1d6; border-radius: 8px; color: #315c53; background: var(--brand-soft); position: relative; }
.article-body blockquote::before { content: "i"; position: absolute; left: 17px; top: 16px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: var(--brand); font-size: 12px; font-weight: 800; }
.article-body blockquote p { margin: 0; }
.table-wrap { margin: 22px 0 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #34463d; background: #fbfaf6; font-weight: 700; text-align: left; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.checklist { padding-left: 0 !important; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 9px; }
.checklist input { margin-top: 6px; accent-color: var(--brand); }

.page-toc { position: sticky; top: calc(var(--topbar) + 24px); align-self: start; padding-left: 18px; border-left: 1px solid var(--line); font-size: 12px; }
.page-toc > strong { display: block; margin-bottom: 8px; color: #34463d; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.page-toc a { display: block; padding: 5px 0; color: #52635a; line-height: 1.4; }
.page-toc a:hover { color: var(--brand); text-decoration: none; }
.page-toc a.toc-h3 { padding-left: 10px; }
.page-toc:has(nav:empty) { display: none; }
.article-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.page-link { display: flex; flex-direction: column; min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.page-link:hover { border-color: #a9d7cb; background: var(--brand-soft); text-decoration: none; }
.page-link.next { text-align: right; }
.page-link small { color: #718078; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.page-link strong { margin-top: 3px; font-size: 13px; }
.docs-footer { display: flex; justify-content: space-between; max-width: 1120px; margin: 64px auto 0; padding: 22px 0 30px; border-top: 1px solid var(--line); color: #718078; font-size: 11px; }
.empty-search { padding: 8px 10px; color: var(--muted); font-size: 12px; }

@media (max-width: 1050px) {
  .article-grid { grid-template-columns: minmax(0, 760px); }
  .page-toc { display: none; }
  .main-content { padding-right: 36px; padding-left: 36px; }
}
@media (max-width: 760px) {
  :root { --topbar: 62px; }
  .topbar { gap: 12px; padding: 0 16px; }
  .menu-button { display: inline-grid; place-items: center; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-context, .version, .top-link { display: none; }
  .sidebar { transform: translateX(-100%); width: min(86vw, 310px); transition: transform .2s ease; box-shadow: 8px 0 24px rgba(16,24,40,.12); }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 15; inset: var(--topbar) 0 0; width: 100%; border: 0; background: rgba(16,24,40,.35); }
  body.menu-open .sidebar-scrim { display: block; }
  .main-content { margin-left: 0; padding: 20px 20px 0; }
  .breadcrumbs { margin-bottom: 24px; }
  .article-header h1 { font-size: 34px; }
  .article-header p { font-size: 15px; }
  .article-body { font-size: 15px; }
  .article-pagination { grid-template-columns: 1fr; }
  .docs-footer { display: block; }
  .docs-footer span { display: block; margin-top: 4px; }
}
@media print {
  .topbar, .sidebar, .page-toc, .breadcrumbs, .article-pagination, .docs-footer { display: none !important; }
  .docs-shell { padding: 0; }
  .main-content { margin: 0; padding: 0; }
  .article-grid { display: block; max-width: none; }
  .code-block { break-inside: avoid; box-shadow: none; }
}
.article-body img { display: block; width: 100%; margin: 24px 0 30px; border: 1px solid #eadfce; border-radius: 18px; background: #fffaf2; box-shadow: 0 16px 40px rgba(23,37,31,.08); }

/* Multipage documentation layout */
.main-content{padding-top:38px}.doc-article{min-width:0;padding:8px 0 58px;scroll-margin-top:92px}.article-header h1{font-size:clamp(30px,4vw,42px)}@media(max-width:760px){.main-content{padding-top:24px}.doc-article{padding-bottom:44px}}

/* Mobile documentation visibility */
@media(max-width:760px){
  .menu-button{display:grid!important;position:relative;z-index:2;place-content:center;gap:4px;color:#17251f!important;background:#fff!important;border:1px solid #cfd7d1!important;box-shadow:0 2px 8px rgba(23,37,31,.08)}
  .menu-button span{display:block!important;width:18px;height:2px;opacity:1;background:#17251f!important;border-radius:3px}
  body.menu-open .menu-button span:nth-child(2){opacity:0}
  .docs-intro{margin:0 0 36px;padding:24px 20px;background:#edf4ef;border:1px solid #cddfd5;border-left:4px solid var(--brand);border-radius:12px}
  .docs-intro>span{display:block;margin-bottom:7px;color:var(--brand-dark);font-size:10px}
  .docs-intro h1{margin:0 0 10px;font-size:31px;line-height:1.12}
  .docs-intro p{font-size:13px;line-height:1.6}
}

.back-to-top{position:fixed;right:22px;bottom:22px;z-index:12;display:grid;width:42px;height:42px;place-items:center;border:1px solid #0d4f3b;border-radius:10px;color:#fff;background:#0d4f3b;box-shadow:0 8px 24px rgba(13,79,59,.22);font-size:20px;cursor:pointer;opacity:0;pointer-events:none;transform:translateY(8px);transition:.2s ease}.back-to-top.visible{opacity:1;pointer-events:auto;transform:none}@media print{.back-to-top{display:none!important}}

.back-to-top svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
