:root {
  --bg: #fafafa;
  --bg-panel: #ffffff;
  --bg-code: #0f172a;
  --code-fg: #e2e8f0;
  --border: #e5e7eb;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 8px;
  font-feature-settings: "cv11", "ss01";
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.875em; }
code { background: #f1f5f9; padding: 0.1rem 0.3rem; border-radius: 4px; }
pre {
  background: var(--bg-code); color: var(--code-fg);
  padding: 1rem 1.25rem; border-radius: var(--radius); overflow-x: auto; margin: 0.5rem 0;
}
pre code { background: transparent; color: inherit; padding: 0; }
.layout { display: grid; grid-template-columns: 260px 1fr 320px; min-height: 100vh; }
@media (max-width: 1100px) { .layout { grid-template-columns: 240px 1fr; } .right-rail { display: none; } }
@media (max-width: 720px)  { .layout { grid-template-columns: 1fr; } .sidebar { display: none; } }

.sidebar { background: var(--bg-panel); border-right: 1px solid var(--border); padding: 1.25rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { padding: 0 1.25rem 1rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-brand img { height: 28px; }
.sidebar-brand strong { font-size: 1.1rem; }
.sidebar-section-title { padding: 0.5rem 1.25rem 0.25rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; margin-top: 1rem; }
.sidebar-link { display: block; padding: 0.4rem 1.25rem; color: var(--text); font-size: 0.9rem; border-left: 3px solid transparent; cursor: pointer; }
.sidebar-link:hover { background: #f5f5f5; text-decoration: none; }
.sidebar-link.active { background: #eef2ff; border-left-color: var(--primary); color: var(--primary-hover); font-weight: 600; }

.content { padding: 2rem 2.5rem 6rem; max-width: 820px; }
.content h1 { font-size: 2rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.content h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.content h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.content p, .content ul, .content ol { margin: 0.5rem 0; }
.content blockquote { border-left: 3px solid var(--primary); margin: 1rem 0; padding: 0.5rem 1rem; background: #eef2ff; color: var(--text); border-radius: 0 var(--radius) var(--radius) 0; }
.content table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.9rem; }
.content th, .content td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.content th { background: #f9fafb; font-weight: 600; font-size: 0.85rem; }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-post { background: #dbeafe; color: #1d4ed8; }
.badge-get { background: #dcfce7; color: #166534; }
.endpoint { display: flex; gap: 0.5rem; align-items: center; padding: 0.5rem 0.75rem; background: #f1f5f9; border-radius: var(--radius); font-family: ui-monospace, monospace; font-size: 0.85rem; margin: 0.5rem 0; }
.endpoint code { background: transparent; padding: 0; }

.right-rail { padding: 1.5rem 1.25rem; border-left: 1px solid var(--border); background: var(--bg-panel); position: sticky; top: 0; height: 100vh; overflow-y: auto; font-size: 0.85rem; }
.right-rail h4 { margin: 0 0 0.5rem; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.tryit { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1.25rem 0; }
.tryit-title { font-weight: 700; margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.tryit label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin: 0.5rem 0 0.2rem; }
.tryit input, .tryit textarea, .tryit select { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; font-family: inherit; }
.tryit textarea { font-family: ui-monospace, monospace; font-size: 0.8rem; }
.tryit-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.btn { padding: 0.45rem 0.85rem; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.btn:hover { background: #f5f5f5; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.banner-auth { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.banner-auth strong { color: #92400e; }
.banner-ok { background: #f0fdf4; border-color: #86efac; }
.banner-ok strong { color: var(--success); }
.kbd { background: #f1f5f9; border: 1px solid var(--border); border-radius: 4px; padding: 0.05rem 0.4rem; font-family: ui-monospace, monospace; font-size: 0.8rem; }
.callout { padding: 0.75rem 1rem; border-radius: var(--radius); margin: 1rem 0; font-size: 0.9rem; }
.callout-info    { background: #eff6ff; border: 1px solid #bfdbfe; }
.callout-warning { background: #fffbeb; border: 1px solid #fcd34d; }
.callout-danger  { background: #fef2f2; border: 1px solid #fecaca; }
.response-box { margin-top: 0.75rem; }
.response-box pre { font-size: 0.8rem; max-height: 280px; }
.tag { background: #e0e7ff; color: #3730a3; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }
.muted { color: var(--text-muted); font-size: 0.85rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
