:root {
  color-scheme: dark;
  --bg: #0c111d;
  --bg-elevated: #111827;
  --bg-panel: #121b2b;
  --bg-muted: #172033;
  --paper: var(--bg-panel);
  --paper-soft: var(--bg-muted);
  --panel: var(--paper);
  --panel-2: var(--paper-soft);
  --ink: #e7edf7;
  --muted: #b8c3d4;
  --faint: #8ea0b8;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --subtle: var(--line);
  --accent: #7dd3fc;
  --accent-soft: rgba(125, 211, 252, 0.12);
  --active: var(--accent);
  --active-soft: var(--accent-soft);
  --blue: #93c5fd;
  --blue-soft: rgba(147, 197, 253, 0.13);
  --teal: #5eead4;
  --teal-soft: rgba(94, 234, 212, 0.12);
  --orange: #fbbf24;
  --orange-soft: rgba(251, 191, 36, 0.12);
  --coral: #fb7185;
  --coral-soft: rgba(251, 113, 133, 0.12);
  --green: #86efac;
  --green-soft: rgba(134, 239, 172, 0.12);
  --violet: #c4b5fd;
  --violet-soft: rgba(196, 181, 253, 0.12);
  --code-bg: #0f172a;
  --code-text: #dbeafe;
  --code-dark: #0a1020;
  --table-head-bg: #172033;
  --table-border: var(--line);
  --note-bg: rgba(15, 23, 42, 0.62);
  --note-border: var(--line-strong);
  --footer-bg: #080d18;
  --footer-text: #dbeafe;
  --footer-muted: #9fb0c7;
  --radius: 6px;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.22);
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.28);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eeece3;
  --bg-elevated: #e5e2d8;
  --bg-panel: #f5f2e9;
  --bg-muted: #ebe7dc;
  --paper: var(--bg-panel);
  --paper-soft: var(--bg-muted);
  --panel: var(--paper);
  --panel-2: var(--paper-soft);
  --ink: #20252d;
  --muted: #596171;
  --faint: #768092;
  --line: rgba(82, 92, 112, 0.18);
  --line-strong: rgba(82, 92, 112, 0.30);
  --subtle: var(--line);
  --accent: #2f6fae;
  --accent-soft: rgba(47, 111, 174, 0.12);
  --active: var(--accent);
  --active-soft: var(--accent-soft);
  --blue: #2f6fae;
  --blue-soft: rgba(47, 111, 174, 0.12);
  --teal: #0f766e;
  --teal-soft: rgba(15, 118, 110, 0.11);
  --orange: #a15c10;
  --orange-soft: rgba(161, 92, 16, 0.12);
  --coral: #b5455a;
  --coral-soft: rgba(181, 69, 90, 0.11);
  --green: #28744a;
  --green-soft: rgba(40, 116, 74, 0.11);
  --violet: #6750a4;
  --violet-soft: rgba(103, 80, 164, 0.10);
  --code-bg: #e3dfd3;
  --code-text: #182232;
  --code-dark: #242936;
  --table-head-bg: #e8e4d8;
  --table-border: var(--line);
  --note-bg: rgba(232, 228, 216, 0.74);
  --note-border: var(--line-strong);
  --footer-bg: #e4e0d4;
  --footer-text: #20252d;
  --footer-muted: #626a78;
  --shadow: 0 18px 42px rgba(70, 61, 45, 0.14);
  --shadow-soft: 0 10px 26px rgba(70, 61, 45, 0.12);
  --shadow-subtle: 0 1px 2px rgba(70, 61, 45, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body {
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  transition: background-color 220ms ease, color 220ms ease;
}

body,
.topbar,
.panel,
.panel-head,
.doc-body,
.top-actions,
.theme-switcher,
.text-button,
.tool-link,
.footer-links a,
input,
select,
button,
code {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    opacity 160ms ease;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  color: var(--ink);
}

code {
  overflow-wrap: anywhere;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1px 4px;
  font-family: var(--mono);
  font-size: 0.92em;
}

pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.52;
}

th {
  background: var(--table-head-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

tr:last-child td {
  border-bottom: 0;
}

.source-note,
.version-note,
.risk-note,
.quality-note {
  color: var(--muted);
  font-size: 0.9em;
}

.code-token.keyword {
  color: #c4b5fd;
}

.code-token.string {
  color: #f6ad55;
}

.code-token.comment {
  color: #7dd3a8;
  font-style: italic;
}

.code-token.number {
  color: #facc15;
}

.code-token.function {
  color: #7dd3fc;
}

.code-token.property {
  color: #93c5fd;
}

.code-token.variable {
  color: #67e8f9;
}

.code-token.builtin {
  color: #f0abfc;
}

.code-token.operator,
.code-token.punctuation {
  color: #94a3b8;
}

.code-token.decorator {
  color: #fb7185;
}

html[data-theme="light"] .code-token.keyword {
  color: #6d28d9;
}

html[data-theme="light"] .code-token.string {
  color: #9a3412;
}

html[data-theme="light"] .code-token.comment {
  color: #047857;
}

html[data-theme="light"] .code-token.number {
  color: #a16207;
}

html[data-theme="light"] .code-token.function {
  color: #0369a1;
}

html[data-theme="light"] .code-token.property {
  color: #1d4ed8;
}

html[data-theme="light"] .code-token.variable {
  color: #0f766e;
}

html[data-theme="light"] .code-token.builtin {
  color: #a21caf;
}

html[data-theme="light"] .code-token.operator,
html[data-theme="light"] .code-token.punctuation {
  color: #64748b;
}

html[data-theme="light"] .code-token.decorator {
  color: #be123c;
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 86px;
  }
}
