:root {
  --primary: #f67828;
  --primary-hover: #d65f12;
  --body-bg: #f4f6f8;
  --body-color: #1e293b;
  --border-color: #e2e8f0;
  --text-dim: #818c99;
  --code-bg: #f8fafc;
  --green: #10b981;
  --yellow: #f59e0b;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--body-bg);
  color: var(--body-color);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.6;
}

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

code, pre {
  font-family: "SF Mono", "JetBrains Mono", Consolas, Menlo, monospace;
  font-size: 0.86em;
}

code {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.12em 0.4em;
  color: #1e293b;
}

pre {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; color: #e2e8f0; }

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1.2rem;
  background: #fff;
}

.sidebar__brand {
  display: block;
  margin-bottom: 1.4rem;
}
.sidebar__brand img { width: 100%; height: auto; display: block; }

.sidebar__sections {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar nav { display: grid; gap: 0.1rem; }
.sidebar nav a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  color: #475569;
  font-size: 0.86rem;
  font-weight: 500;
}
.sidebar nav a:hover { background: rgba(246, 120, 40, 0.08); color: var(--primary); text-decoration: none; }
.sidebar nav a.active { background: rgba(246, 120, 40, 0.1); color: var(--primary); font-weight: 600; }
.sidebar nav .group-title {
  margin: 1.1rem 0 0.3rem;
  padding: 0 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.sidebar nav .group-title:first-child { margin-top: 0; }
.sidebar nav a.method-get::before,
.sidebar nav a.method-post::before {
  display: inline-block;
  width: 36px;
  font-size: 0.62rem;
  font-weight: 700;
  margin-right: 0.4rem;
}
.sidebar nav a.method-get::before { content: "GET"; color: var(--green); }
.sidebar nav a.method-post::before { content: "POST"; color: var(--yellow); }

main {
  padding: 2.5rem 3rem 6rem;
  max-width: 820px;
}

h1, h2, h3 { line-height: 1.3; font-weight: 600; color: #1e293b; }
h1 { font-size: 1.9rem; margin-top: 0; }
h2 {
  font-size: 1.3rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-size: 1.02rem; margin-top: 1.8rem; }

.lead { color: var(--text-dim); font-size: 1.02rem; }

.endpoint-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.2rem 0 0.8rem;
}
.method {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}
.method--get { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.method--post { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.endpoint-head code { font-size: 0.95rem; background: none; border: 0; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.9rem 0 1.4rem;
  font-size: 0.86rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th { color: var(--text-dim); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

.callout {
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  font-size: 0.9rem;
  background: #fff;
  box-shadow: var(--shadow);
}
.callout--info { border-color: #fde8d4; background: #fff7ed; }
.callout--warn { border-color: #fde68a; background: #fefce8; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-dim);
}

.status-list { display: grid; gap: 0.5rem; margin: 0.8rem 0 1.4rem; }
.status-list code { min-width: 2.6rem; display: inline-block; text-align: center; }

.section-cards { display: grid; gap: 0.9rem; margin: 1.2rem 0; }
.section-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  color: inherit;
}
.section-card:hover { border-color: var(--primary); text-decoration: none; }
.section-card strong { display: block; font-size: 1rem; font-weight: 600; color: #1e293b; margin-bottom: 0.3rem; }
.section-card span { display: block; color: var(--text-dim); font-size: 0.86rem; }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--border-color); }
  main { padding: 1.6rem 1.2rem 4rem; }
}
