:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #eef3f8;
  --text: #172033;
  --text-strong: #0d1728;
  --muted: #5f6f86;
  --line: #d7e0eb;
  --accent: #0099cc;
  --accent-strong: #007fa8;
  --accent-soft: rgba(0, 153, 204, 0.1);
  --code-bg: #eaf0f7;
  --shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #111827;
  --surface-strong: #1a2332;
  --text: #c7d2e0;
  --text-strong: #ffffff;
  --muted: #8b9bb3;
  --line: #243244;
  --accent: #00d4ff;
  --accent-strong: #33e0ff;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --code-bg: #111827;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--accent-strong);
}

.site-header,
.site-footer,
.site-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.site-title {
  color: var(--text-strong);
  font-weight: 700;
  text-decoration: none;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.theme-menu {
  position: relative;
}

.theme-menu-toggle {
  width: 50px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.theme-menu-toggle:hover,
.theme-menu-toggle:focus-visible,
.theme-menu[data-open="true"] .theme-menu-toggle {
  border-color: var(--accent);
  color: var(--text-strong);
  outline: 0;
}

.theme-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 156px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.theme-menu[data-open="true"] .theme-menu-panel {
  display: grid;
  gap: 2px;
}

.theme-menu-item {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1;
  text-align: left;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.theme-menu-toggle svg,
.theme-menu-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-menu-caret {
  width: 13px;
  height: 13px;
  opacity: 0.72;
}

.theme-menu[data-open="true"] .theme-menu-caret {
  transform: rotate(180deg);
}

.theme-auto-fill {
  fill: currentColor;
  stroke: none;
  opacity: 0.55;
}

.theme-menu-icon {
  display: inline-grid;
  place-items: center;
}

.theme-menu-item:hover,
.theme-menu-item:focus-visible {
  color: var(--text-strong);
  background: var(--surface-strong);
  outline: 0;
}

.theme-menu-item[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.site-main {
  padding: 48px 0 72px;
}

.hero {
  display: grid;
  align-items: end;
  min-height: 360px;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 34%);
}

.hero h1,
.page-header h1 {
  max-width: 860px;
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  line-height: 1.04;
  font-weight: 760;
}

.page-header {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.section {
  padding-top: 44px;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
}

.doc-list {
  display: grid;
  gap: 14px;
}

.doc-item {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.doc-item:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
}

.doc-item h2,
.doc-item h3 {
  margin: 0;
  font-size: 1.15rem;
}

.doc-item p {
  margin: 10px 0 0;
  color: var(--muted);
}

.doc-page {
  max-width: 860px;
}

.content {
  padding-top: 36px;
}

.content h2,
.content h3 {
  color: var(--text-strong);
  line-height: 1.25;
}

.content pre,
.content code {
  background: var(--code-bg);
  border-radius: 6px;
}

.content code {
  padding: 0.1em 0.28em;
}

.content pre {
  overflow-x: auto;
  padding: 18px;
}

.content pre code {
  padding: 0;
}

.muted {
  color: var(--muted);
}

.site-footer {
  padding: 28px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .site-actions {
    width: 100%;
    justify-content: space-between;
  }

  .site-main {
    padding-top: 32px;
  }

  .hero {
    min-height: 300px;
    padding: 44px 0;
  }
}
