*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5ead5;
  --bg-sidebar: #efe0c8;
  --bg-card: #efe0c8;
  --bg-code: #e8d8b8;
  --border: #d4c4a0;
  --text: #1a1610;
  --text-dim: #6a5a40;
  --accent: #b8862e;
  --gradient: linear-gradient(135deg, #b8862e, #a06820);
  --radius: 12px;
  --font: 'IBM Plex Mono', 'Menlo', 'Consolas', monospace;
  --mono: 'IBM Plex Mono', 'Menlo', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ─── */
.docs-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 0;
  background: rgba(245, 234, 213, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.docs-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.docs-logo-img {
  height: 28px;
  width: auto;
}

.docs-logo span {
  color: var(--text-dim);
  font-size: 13px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.docs-nav-links {
  display: flex;
  gap: 24px;
}

.docs-nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.docs-nav-links a:hover {
  color: var(--accent);
}

.docs-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.docs-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ─── Layout ─── */
.docs-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 60px;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.docs-sidebar {
  position: fixed;
  top: 60px;
  left: calc((100vw - 1200px) / 2);
  width: 240px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 20px;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
}

.docs-sidebar-section {
  margin-bottom: 28px;
}

.docs-sidebar-section h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.docs-sidebar-link {
  display: block;
  padding: 6px 12px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.docs-sidebar-link:hover {
  color: var(--text);
  background: rgba(184, 134, 46, 0.08);
}

.docs-sidebar-link.active {
  color: var(--accent);
  background: rgba(184, 134, 46, 0.1);
  font-weight: 500;
}

/* ─── Content ─── */
.docs-content {
  flex: 1;
  margin-left: 240px;
  padding: 40px 48px;
  max-width: 960px;
}

.docs-section {
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.docs-section:last-child {
  border-bottom: none;
}

.docs-breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.docs-section h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.docs-lead {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 32px;
}

.docs-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
}

.docs-section h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.docs-section p {
  margin-bottom: 16px;
  line-height: 1.8;
}

/* ─── Badges ─── */
.docs-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.docs-badge-live {
  background: rgba(74, 222, 128, 0.12);
  color: #16a34a;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.docs-badge-dev {
  background: rgba(184, 134, 46, 0.12);
  color: var(--accent);
  border: 1px solid rgba(184, 134, 46, 0.3);
}

.docs-badge-planned {
  background: rgba(0,0,0,0.04);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ─── Cards ─── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.docs-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.docs-card:hover {
  border-color: rgba(184, 134, 46, 0.3);
}

.docs-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.docs-card p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 0;
}

/* ─── Code ─── */
.docs-code {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.docs-code-header {
  padding: 10px 16px;
  background: rgba(0,0,0,0.04);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.docs-code pre {
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}

.docs-code code {
  font-family: var(--mono);
}

/* ─── Tables ─── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

.docs-table th,
.docs-table td {
  padding: 10px 16px;
  text-align: left;
  border: 1px solid var(--border);
}

.docs-table th {
  background: rgba(0,0,0,0.03);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

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

.docs-table code {
  background: rgba(184, 134, 46, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ─── Steps ─── */
.docs-step {
  display: flex;
  gap: 20px;
  margin: 24px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.docs-step-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(184, 134, 46, 0.1);
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.docs-step h3 {
  margin-bottom: 6px;
}

.docs-step p {
  margin-bottom: 0;
  color: var(--text-dim);
  font-size: 13px;
}

/* ─── Callout ─── */
.docs-callout {
  padding: 20px 24px;
  background: rgba(184, 134, 46, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.docs-callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.docs-callout p {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--text-dim);
}

.docs-callout a {
  color: var(--accent);
}

/* ─── List ─── */
.docs-list {
  margin: 16px 0;
  padding-left: 24px;
}

.docs-list li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.docs-list code {
  background: rgba(184, 134, 46, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ─── FAQ ─── */
.docs-faq-item {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.docs-faq-item h3 {
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--accent);
}

.docs-faq-item p {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Footer ─── */
.docs-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-left: 240px;
}

.docs-footer-inner {
  max-width: 960px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo-img {
  height: 24px;
}

.logo {
  display: flex;
  align-items: center;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }

  .docs-content {
    margin-left: 0;
    padding: 32px 24px;
  }

  .docs-footer {
    margin-left: 0;
  }

  .docs-footer-inner {
    padding: 0 24px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .docs-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(245, 234, 213, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .docs-nav-links.open {
    display: flex;
  }

  .docs-nav-toggle {
    display: flex;
  }

  .docs-step {
    flex-direction: column;
    gap: 12px;
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }
}
