:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(8, 14, 30, 0.65);
  --border: rgba(148, 163, 184, 0.14);
  --text: #e6e8f2;
  --muted: #94a3b8;
  --brand: #e8663c;
  --brand-dim: rgba(232, 102, 60, 0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(900px 500px at 15% 0%, rgba(232, 102, 60, 0.10), transparent 55%),
              radial-gradient(700px 400px at 85% 5%, rgba(232, 102, 60, 0.06), transparent 50%),
              var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height: 1.5;
}

body.docs {
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(2, 6, 23, 0.5);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  border-radius: 14px;
  display: block;
}

.brand-text {
  display: inline-block;
  font-size: 26px;
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  color: #cbd5e1;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
}

.nav-icon:hover {
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}

.nav-icon .icon {
  width: 22px;
  height: 22px;
}

.hero {
  padding: 48px 0 48px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 54ch;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.lead {
  font-size: 17px;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 62ch;
  margin: 24px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(232, 102, 60, 0.5);
  background: #c4532a;
  color: #ffffff;
  font-weight: 600;
}

.btn:hover {
  text-decoration: none;
  background: #d45e32;
}

.btn.disabled {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.18);
  cursor: default;
}

.btn.disabled:hover {
  background: rgba(148, 163, 184, 0.12);
}

.btn.secondary {
  background: rgba(14, 20, 38, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.btn.secondary:hover {
  background: rgba(20, 28, 50, 0.9);
  border-color: rgba(148, 163, 184, 0.4);
  color: #e6e8f2;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 24px;
}

.grid .card {
  background: rgba(2, 6, 23, 0.35);
  border-color: rgba(148, 163, 184, 0.12);
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

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

.card h2, .card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.card .steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card .steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.65;
}

.card .steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-dim);
  border: 1px solid rgba(232, 102, 60, 0.4);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}


.card .note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.hero > .card {
  margin-top: 32px;
}

.hero > .card + .card {
  margin-top: 16px;
}

.prose {
  padding: 26px 0 36px;
}

.prose h1 {
  margin-top: 0;
}

.prose h2 {
  margin-top: 32px;
  font-size: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.prose h3 {
  margin-top: 24px;
  font-size: 16px;
}

.prose p, .prose li {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.7;
}

.prose a {
  color: #60a5fa;
}

.prose a:hover {
  color: #93bbfc;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}

.prose th, .prose td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.prose th {
  background: rgba(15, 23, 42, 0.5);
  font-weight: 600;
}

.prose td {
  color: #cbd5e1;
}

.prose tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.3);
}

.prose pre {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.prose blockquote {
  border-left: 3px solid var(--brand);
  margin: 16px 0;
  padding: 8px 16px;
  background: var(--brand-dim);
  color: #cbd5e1;
  font-size: 14px;
}

.prose blockquote p {
  margin: 4px 0;
}

.prose ol, .prose ul {
  padding-left: 24px;
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 18px 0 30px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.docs-layout {
  display: flex;
  gap: 32px;
  padding: 26px 0 36px;
}

.docs-sidebar {
  flex-shrink: 0;
  width: 220px;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

.docs-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-sidebar li {
  margin: 0;
}

.docs-sidebar-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.docs-sidebar li a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 6px;
  border-left: 2px solid transparent;
}

.docs-sidebar li a:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(148, 163, 184, 0.08);
}

.docs-sidebar li.active a {
  color: var(--text);
  background: transparent;
  border-left-color: var(--brand);
}

.docs-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.docs-title-row h1 {
  margin: 0;
}

.docs-llms {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-shrink: 0;
}

.docs-llms a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
}

.docs-llms a:hover {
  color: var(--brand);
  text-decoration: none;
}

.llms-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s;
}

.llms-copy:hover {
  color: var(--text);
}

.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 72ch;
}

.docs-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.docs-prevnext a {
  color: var(--muted);
}

.docs-prevnext a:hover {
  color: var(--text);
}

.docs-next {
  margin-left: auto;
}

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

  .docs-sidebar {
    width: 100%;
    position: static;
  }

  .docs-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .prose table {
    display: block;
    overflow-x: auto;
  }
}
