:root {
  color-scheme: light;
  --scalar-custom-header-height: 64px;
  --scalar-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --scalar-font-code: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --docs-background: #fff;
  --docs-foreground: #20242c;
  --docs-muted: #687080;
  --docs-border: #e9ebef;
  --docs-accent: #635bff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--docs-background); color: var(--docs-foreground); font-family: var(--scalar-font); }
[hidden] { display: none !important; }
a { color: inherit; }

body.dark-mode {
  color-scheme: dark;
  --docs-background: #0f0f0f;
  --docs-foreground: #f0f0f0;
  --docs-muted: #a3a3a3;
  --docs-border: #292929;
  --docs-accent: #a59bff;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--scalar-custom-header-height);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  background: var(--docs-background);
  border-bottom: 1px solid var(--docs-border);
}

.docs-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -.6px; }
.brand-symbol { display: grid; place-items: center; width: 30px; height: 30px; background: #635bff; color: #fff; font: 700 16px var(--scalar-font-code); border-radius: 8px; letter-spacing: -2px; padding-right: 2px; }
.header-divider { height: 22px; width: 1px; background: var(--docs-border); }
.header-label { font-size: 13px; color: var(--docs-muted); }
.website-link { margin-left: auto; font-size: 13px; text-decoration: none; white-space: nowrap; }
.website-link:hover, .fallback-links a:hover { color: var(--docs-accent); }
.website-link span { margin-left: 6px; }

.docs-status { max-width: 620px; margin: 100px auto; padding: 28px; text-align: center; }
.docs-status h1 { font-size: 24px; line-height: 1.3; letter-spacing: -.5px; }
.docs-status p { color: var(--docs-muted); font-size: 15px; line-height: 1.6; }
.loading-indicator { display: inline-block; width: 28px; height: 28px; border: 2px solid var(--docs-border); border-top-color: var(--docs-accent); border-radius: 50%; animation: spin .8s linear infinite; }
.retry-button { padding: 10px 16px; margin: 10px; border: 0; border-radius: 7px; background: #635bff; color: white; font: 600 14px var(--scalar-font); cursor: pointer; }
.fallback-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 20px; font-size: 13px; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 200; padding: 12px; border-radius: 6px; background: var(--docs-background); }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-indicator { animation: none; } }
@media (max-width: 540px) {
  .docs-header { gap: 14px; padding: 0 16px; }
  .header-label { font-size: 12px; }
  .header-divider { display: none; }
  .docs-brand { font-size: 18px; }
  .brand-symbol { display: none; }
}
