:root {
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-code: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --get: #22c55e;
  --post: #3b82f6;
  --delete: #ef4444;
  --put: #f59e0b;
  --sidebar-w: 260px;
  --header-h: 56px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 13px;
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
}

.logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 24px; height: 24px; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 0;
}

.nav-section { margin-bottom: 8px; }

.nav-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 16px;
}

.nav-link {
  display: block;
  padding: 6px 16px;
  color: var(--text-secondary);
  font-size: 14px;
}
.nav-link:hover {
  color: var(--text);
  background: var(--border);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  background: rgba(59,130,246,0.1);
  border-right: 2px solid var(--accent);
}
.nav-link.indent { padding-left: 28px; font-size: 13px; }

/* Main */
.main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

.content {
  max-width: 820px;
  padding: 32px 40px;
}

/* Typography */
h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
h2 { font-size: 20px; font-weight: 600; margin-top: 40px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
h3 { font-size: 16px; font-weight: 600; margin-top: 24px; margin-bottom: 8px; }
p { margin-bottom: 12px; color: var(--text-secondary); }

/* Code */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  overflow-x: auto;
  margin-bottom: 16px;
}
code {
  background: var(--bg-code);
  padding: 2px 5px;
  border-radius: 4px;
}
pre code { background: none; padding: 0; }

/* Method badges */
.method {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.method-get { background: rgba(34,197,94,0.15); color: var(--get); }
.method-post { background: rgba(59,130,246,0.15); color: var(--post); }
.method-delete { background: rgba(239,68,68,0.15); color: var(--delete); }

/* Endpoint box */
.endpoint {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--bg-secondary); font-weight: 600; }
td { color: var(--text-secondary); }
td code { color: var(--text); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.04); text-decoration: none; }
.card-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.card-desc { font-size: 13px; color: var(--text-secondary); margin: 0; }
.card-meta { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* Endpoint list */
.ep-list { margin-bottom: 24px; }
.ep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
  transition: border-color 0.15s;
}
.ep-item:hover { border-color: var(--accent); text-decoration: none; }
.ep-path { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }
.ep-desc { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* Base URL */
.base-url {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.base-url-label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.base-url-val { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent); }

/* Alerts */
.alert {
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #1d4ed8; }
.alert-warn { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #b45309; }
.alert-title { font-weight: 600; margin-bottom: 4px; }

/* Required/Optional */
.req { color: var(--delete); font-size: 11px; font-weight: 500; }
.opt { color: var(--text-muted); font-size: 11px; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 20px; }
}
