:root {
  color-scheme: light;
  --docs-bg: #f5f7fb;
  --docs-panel: #ffffff;
  --docs-border: #e4e7ef;
  --docs-text: #1f2933;
  --docs-muted: #5f6b7a;
  --docs-primary: #2f5cff;
  --docs-code: #f1f5f9;
  --docs-warning: #f59e0b;
  --docs-note: #3b82f6;
}

* {
  box-sizing: border-box;
}

body.docs {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--docs-bg);
  color: var(--docs-text);
  line-height: 1.6;
}

a {
  color: inherit;
}

.docs-layout {
  display: flex;
  min-height: 100vh;
}

.docs-sidebar {
  width: 270px;
  padding: 28px 22px;
  background: var(--docs-panel);
  border-right: 1px solid var(--docs-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 24px;
}

.docs-brand img {
  width: 36px;
  height: 36px;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-nav a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--docs-text);
  transition: background 0.2s ease, color 0.2s ease;
}

.docs-nav a.active,
.docs-nav a:hover {
  background: #eef2ff;
  color: var(--docs-primary);
}

.docs-lang {
  display: inline-flex;
  gap: 0.4rem;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--docs-border);
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--docs-muted);
}

.docs-lang a {
  text-decoration: none;
  color: inherit;
}

.docs-lang a.active,
.docs-lang a:hover {
  color: var(--docs-primary);
}

.docs-meta {
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--docs-muted);
}

.docs-meta a {
  color: var(--docs-primary);
  text-decoration: none;
}

.docs-content {
  flex: 1;
  padding: 36px 48px 60px;
}

.docs-header {
  margin-bottom: 32px;
}

.docs-eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--docs-muted);
  margin: 0 0 8px;
}

.docs-title {
  font-size: 2.3rem;
  margin: 0 0 12px;
}

.docs-subtitle {
  font-size: 1.05rem;
  color: var(--docs-muted);
  max-width: 720px;
}

.doc-section {
  margin-bottom: 34px;
}

.doc-section h2 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.doc-section h3 {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.doc-section ul,
.doc-section ol {
  padding-left: 20px;
  margin-top: 8px;
}

.doc-section li {
  margin-bottom: 6px;
}

.doc-callout {
  border-left: 4px solid var(--docs-note);
  background: #eff6ff;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 16px 0;
}

.doc-callout.warning {
  border-color: var(--docs-warning);
  background: #fffbeb;
}

pre,
code {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;
}

code {
  background: var(--docs-code);
  padding: 2px 6px;
  border-radius: 6px;
}

pre {
  background: var(--docs-code);
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--docs-panel);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--docs-border);
  font-size: 0.95rem;
}

th {
  background: #f8fafc;
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: none;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.doc-card {
  background: var(--docs-panel);
  border: 1px solid var(--docs-border);
  padding: 16px;
  border-radius: 12px;
}

@media (max-width: 960px) {
  .docs-layout {
    flex-direction: column;
  }

  .docs-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--docs-border);
  }

  .docs-content {
    padding: 28px 22px 48px;
  }
}
