@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --void: #0f1720;
  --void-deep: #0a1017;
  --panel: #151f2a;
  --panel-raised: #1a2632;
  --cream: #f0eee6;
  --ash: #c2c4be;
  --muted: #959d9f;
  --steel: #98a4a9;
  --line: rgba(215, 215, 207, 0.13);
  --line-strong: rgba(215, 215, 207, 0.23);
  --orange: #ff7a2f;
  --orange-hover: #ff8b4a;
  --orange-soft: rgba(255, 122, 47, 0.12);
  --on-accent: #0f1720;
  --active: #ffa16d;
  --link: #ff9b65;
  --code-text: #ffd1b7;
  --green: #6fcd91;
  --yellow: #e8c46b;
  --blue: #7db3da;
  --surface-hover: rgba(255, 255, 255, 0.045);
  --dialog-overlay: rgba(4, 8, 12, 0.72);
  --menu-overlay: rgba(4, 8, 12, 0.6);
  --elevated-shadow: rgba(0, 0, 0, 0.65);
  --image-shadow: rgba(0, 0, 0, 0.25);
  --header-h: 64px;
  --sidebar-w: 264px;
  --toc-w: 216px;
  --article-w: 760px;
  --font-sans: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --void: #fbfaf7;
  --void-deep: #f1efe9;
  --panel: #ffffff;
  --panel-raised: #f7f5ef;
  --cream: #15202a;
  --ash: #37444b;
  --muted: #536068;
  --steel: #5a686f;
  --line: rgba(21, 32, 42, 0.13);
  --line-strong: rgba(21, 32, 42, 0.24);
  --orange: #b9470f;
  --orange-hover: #9f3807;
  --orange-soft: rgba(185, 71, 15, 0.1);
  --on-accent: #fffaf5;
  --active: #9f3807;
  --link: #9f3807;
  --code-text: #873006;
  --green: #247347;
  --yellow: #7c5a00;
  --blue: #256b99;
  --surface-hover: rgba(21, 32, 42, 0.055);
  --dialog-overlay: rgba(21, 32, 42, 0.34);
  --menu-overlay: rgba(21, 32, 42, 0.3);
  --elevated-shadow: rgba(21, 32, 42, 0.2);
  --image-shadow: rgba(21, 32, 42, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 28px); }
body { margin: 0; background: var(--void); color: var(--cream); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(255, 122, 47, 0.3); color: var(--cream); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; border-radius: 0 0 6px 6px; background: var(--orange); color: var(--on-accent); padding: 9px 14px; font-weight: 700; transition: top 0.15s ease; }
.skip-link:focus { top: 0; }

.docs-header { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; height: var(--header-h); align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--void) 92%, transparent); padding: 0 24px; backdrop-filter: blur(18px); }
.docs-brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.docs-brand img { width: 118px; height: auto; }
html[data-theme="light"] .docs-brand img, html[data-theme="light"] .error-page img { filter: brightness(0) saturate(100%); opacity: 0.9; }
.docs-brand span { border-left: 1px solid var(--line-strong); padding-left: 13px; color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.docs-header-actions { display: flex; align-items: center; gap: 18px; }
.docs-header-actions > a { color: var(--muted); font-size: 13px; font-weight: 550; }
.docs-header-actions > a:hover { color: var(--cream); }
.docs-header-actions .download-link { border-radius: 6px; background: var(--orange); color: var(--on-accent); padding: 8px 12px; }
.docs-header-actions .download-link:hover { color: var(--on-accent); background: var(--orange-hover); }
.search-button { display: flex; width: 250px; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); padding: 8px 9px 8px 12px; cursor: pointer; text-align: left; }
.search-button:hover { border-color: var(--line-strong); color: var(--ash); }
kbd { border: 1px solid var(--line-strong); border-radius: 4px; background: var(--void-deep); color: var(--muted); font-family: var(--font-mono); font-size: 10px; line-height: 1; padding: 3px 5px; box-shadow: 0 1px 0 rgba(255,255,255,0.04); }
.theme-button { display: inline-flex; width: 34px; height: 34px; flex: 0 0 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); padding: 0; cursor: pointer; }
.theme-button:hover { border-color: var(--line-strong); color: var(--cream); }
.theme-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-moon { display: block; }
.search-button:focus-visible, .theme-button:focus-visible, .menu-button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.menu-button { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--cream); }
.menu-button span:not(.sr-only) { width: 14px; height: 1px; background: currentColor; }

.docs-shell { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); padding-top: var(--header-h); }
.docs-sidebar { position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w); overflow-y: auto; border-right: 1px solid var(--line); background: var(--void-deep); padding: 28px 18px 60px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.docs-nav-group + .docs-nav-group { margin-top: 28px; }
.docs-nav-group h2 { margin: 0 10px 9px; color: var(--steel); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.11em; text-transform: uppercase; }
.docs-nav-group ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.docs-nav-group a { display: block; border-radius: 6px; color: var(--muted); padding: 7px 10px; font-size: 13.5px; line-height: 1.35; }
.docs-nav-group a:hover { background: var(--surface-hover); color: var(--cream); }
.docs-nav-group a[aria-current="page"] { background: var(--orange-soft); color: var(--active); font-weight: 600; }

.docs-main { grid-column: 2; min-width: 0; }
.docs-article-wrap { display: grid; grid-template-columns: minmax(0, var(--article-w)) var(--toc-w); justify-content: center; gap: 72px; padding: 48px 48px 96px; }
.docs-article { min-width: 0; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; color: var(--steel); font-family: var(--font-mono); font-size: 11px; }
.breadcrumbs a:hover { color: var(--orange); }
.article-header { margin-bottom: 46px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-kicker { margin: 0 0 12px; color: var(--orange) !important; font-family: var(--font-mono); font-size: 11px !important; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.article-header h1 { margin: 0; max-width: 720px; font-size: clamp(38px, 5vw, 54px); font-weight: 690; letter-spacing: -0.035em; line-height: 1.02; }
.article-header > p:not(.article-kicker) { margin: 18px 0 0; max-width: 690px; color: var(--ash); font-size: 18px; line-height: 1.65; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--steel); font-family: var(--font-mono); font-size: 10.5px; }

.docs-article h2, .docs-article h3 { position: relative; color: var(--cream); scroll-margin-top: calc(var(--header-h) + 24px); }
.docs-article h2 { margin: 54px 0 16px; padding-top: 4px; font-size: 27px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.docs-article h3 { margin: 34px 0 12px; font-size: 18px; font-weight: 650; line-height: 1.25; }
.heading-anchor::before { content: "#"; position: absolute; left: -23px; color: transparent; font-family: var(--font-mono); font-size: 0.75em; transition: color 0.15s ease; }
.heading-anchor:hover::before, .heading-anchor:focus::before { color: var(--orange); }
.docs-article p, .docs-article li { color: var(--ash); font-size: 15.5px; line-height: 1.75; }
.docs-article p { margin: 0 0 18px; }
.docs-article ul, .docs-article ol { margin: 12px 0 22px; padding-left: 24px; }
.docs-article li + li { margin-top: 7px; }
.docs-article li::marker { color: var(--steel); }
.docs-article strong { color: var(--cream); font-weight: 640; }
.docs-article em { color: var(--cream); }
.docs-article a:not(.heading-anchor):not(.card):not(.docs-pager a) { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--orange) 42%, transparent); text-underline-offset: 3px; }
.docs-article a:not(.heading-anchor):hover { text-decoration-color: var(--orange); }
.docs-article code { border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--code-text); padding: 2px 5px; font-family: var(--font-mono); font-size: 0.87em; }
.docs-article pre { position: relative; overflow-x: auto; margin: 20px 0 26px; border: 1px solid var(--line); border-radius: 9px; background: var(--void-deep); padding: 20px; }
.docs-article pre code { border: 0; background: transparent; color: var(--ash); padding: 0; font-size: 12.5px; line-height: 1.7; }
.copy-code { position: absolute; top: 8px; right: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--muted); padding: 5px 7px; font-family: var(--font-mono); font-size: 9px; cursor: pointer; }
.copy-code:hover { color: var(--cream); }
.docs-article blockquote { margin: 22px 0; border-left: 3px solid var(--orange); background: var(--orange-soft); padding: 14px 18px; }
.docs-article blockquote p { margin: 0; color: var(--cream); }
.table-wrap { overflow-x: auto; margin: 22px 0 30px; border: 1px solid var(--line); border-radius: 9px; }
.docs-article table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-article th, .docs-article td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; line-height: 1.55; }
.docs-article tr:last-child td { border-bottom: 0; }
.docs-article th { background: var(--panel); color: var(--muted); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.docs-article td { color: var(--ash); }
.docs-article td:first-child { color: var(--cream); font-weight: 590; }

.callout { margin: 24px 0; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); padding: 16px 18px; }
.callout > strong:first-child { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; }
.callout > strong:first-child::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(125,179,218,0.12); }
.callout p:last-child { margin-bottom: 0; }
.callout.warning { border-color: rgba(232,196,107,0.32); background: rgba(232,196,107,0.07); }
.callout.warning > strong:first-child::before { background: var(--yellow); box-shadow: 0 0 0 4px rgba(232,196,107,0.12); }
.callout.success { border-color: rgba(111,205,145,0.3); background: rgba(111,205,145,0.07); }
.callout.success > strong:first-child::before { background: var(--green); box-shadow: 0 0 0 4px rgba(111,205,145,0.12); }
.steps { margin: 24px 0 34px !important; padding: 0 !important; list-style: none; counter-reset: docs-steps; }
.steps > li { position: relative; min-height: 48px; margin: 0 !important; padding: 0 0 26px 48px; counter-increment: docs-steps; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; top: 30px; bottom: 0; left: 15px; width: 1px; background: var(--line-strong); }
.steps > li::before { content: counter(docs-steps); position: absolute; top: 0; left: 0; display: flex; width: 31px; height: 31px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); color: var(--orange); font-family: var(--font-mono); font-size: 11px; }
.steps > li > strong { display: block; margin-bottom: 4px; }
.steps > li > p:last-child { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 32px; }
.card { display: block; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); padding: 18px; transition: border-color 0.15s ease, transform 0.15s ease; }
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card strong { display: block; margin-bottom: 7px; font-size: 15px; }
.card span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.screenshot { margin: 28px 0 34px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: 0 24px 60px var(--image-shadow); }
.screenshot img { width: 100%; height: auto; border-radius: 10px 10px 0 0; }
.screenshot figcaption { padding: 10px 14px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; line-height: 1.5; }

.docs-toc { position: sticky; top: calc(var(--header-h) + 36px); align-self: start; max-height: calc(100vh - var(--header-h) - 72px); overflow-y: auto; border-left: 1px solid var(--line); padding-left: 18px; }
.docs-toc > p { margin: 0 0 12px; color: var(--steel); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.docs-toc ol { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.docs-toc a { display: block; color: var(--steel); font-size: 12.5px; line-height: 1.4; }
.docs-toc a:hover, .docs-toc a.is-active { color: var(--cream); }
.docs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 72px; padding-top: 26px; border-top: 1px solid var(--line); }
.docs-pager a { display: flex; min-height: 78px; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 14px 16px; }
.docs-pager a:last-child { text-align: right; }
.docs-pager a:hover { border-color: var(--line-strong); }
.docs-pager span { color: var(--steel); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.docs-pager strong { margin-top: 6px; font-size: 13.5px; }

.search-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 80px)); margin: 11vh auto 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--cream); padding: 0; box-shadow: 0 30px 100px var(--elevated-shadow); }
.search-dialog::backdrop { background: var(--dialog-overlay); backdrop-filter: blur(5px); }
.search-panel { display: flex; max-height: inherit; flex-direction: column; }
.search-field { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 14px 16px; }
.search-field svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--cream); font-size: 16px; }
.search-field input::placeholder { color: var(--steel); }
.search-results { min-height: 170px; overflow-y: auto; padding: 10px; }
.search-results > p { margin: 50px 16px; color: var(--steel); text-align: center; font-size: 13px; }
.search-result { display: block; border-radius: 7px; padding: 11px 12px; }
.search-result:hover, .search-result:focus { outline: none; background: var(--surface-hover); }
.search-result small { color: var(--orange); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.search-result strong { display: block; margin-top: 4px; font-size: 14px; }
.search-result span { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.menu-backdrop { position: fixed; inset: var(--header-h) 0 0; z-index: 24; background: var(--menu-overlay); }

.error-page { display: grid; min-height: 100vh; place-items: center; padding: 32px; text-align: center; }
.error-page main { max-width: 520px; }
.error-page img { width: 132px; margin: 0 auto 30px; }
.error-page p:first-of-type { color: var(--orange); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; }
.error-page h1 { margin: 10px 0 14px; font-size: 42px; }
.error-page p { color: var(--muted); line-height: 1.6; }
.error-page a { display: inline-block; margin-top: 14px; border-radius: 6px; background: var(--orange); color: var(--on-accent); padding: 10px 14px; font-weight: 650; }
.error-theme-button { position: fixed; top: 18px; right: 18px; }

@media (max-width: 1180px) {
  .docs-article-wrap { grid-template-columns: minmax(0, var(--article-w)); }
  .docs-toc { display: none; }
}

@media (max-width: 860px) {
  .docs-header { padding-inline: 16px; }
  .docs-header-actions > a:not(.download-link) { display: none; }
  .search-button { width: 36px; height: 34px; justify-content: center; padding: 0; }
  .search-button span, .search-button kbd { display: none; }
  .search-button::before { content: ""; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; }
  .search-button::after { content: ""; width: 6px; height: 1.5px; margin-left: -7px; align-self: flex-end; background: currentColor; transform: rotate(45deg) translateY(-5px); transform-origin: left; }
  .menu-button { display: flex; }
  .docs-shell { display: block; }
  .docs-main { grid-column: auto; }
  .docs-sidebar { z-index: 30; width: min(316px, 86vw); transform: translateX(-102%); transition: transform 0.22s cubic-bezier(0.22,1,0.36,1); box-shadow: 20px 0 60px rgba(0,0,0,0.35); }
  .docs-sidebar.is-open { transform: translateX(0); }
  .docs-article-wrap { padding: 36px 28px 80px; }
}

@media (max-width: 560px) {
  :root { --header-h: 58px; }
  .docs-brand img { width: 102px; }
  .docs-brand span { padding-left: 10px; font-size: 10px; }
  .docs-header-actions { gap: 8px; }
  .docs-header-actions .download-link { display: none; }
  .docs-article-wrap { padding: 28px 20px 64px; }
  .breadcrumbs { margin-bottom: 24px; }
  .article-header { margin-bottom: 36px; padding-bottom: 28px; }
  .article-header h1 { font-size: 36px; }
  .article-header > p:not(.article-kicker) { font-size: 16px; }
  .article-meta { flex-direction: column; gap: 5px; }
  .docs-article h2 { margin-top: 44px; font-size: 24px; }
  .docs-article p, .docs-article li { font-size: 15px; }
  .heading-anchor::before { display: none; }
  .card-grid, .docs-pager { grid-template-columns: 1fr; }
  .docs-pager a:last-child { text-align: left; }
  .steps > li { padding-left: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
