:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #eef2f6;
  --border: #d8dee6;
  --text: #1d2733;
  --muted: #617080;
  --accent: #0f766e;
  --accent-soft: #d9f4ef;
  --admin: #7c3aed;
  --public: #0f766e;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 24px 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 0;
}

h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

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

.base-url {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.base-url code,
p code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

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

.sidebar {
  border-right: 1px solid var(--border);
  padding: 24px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 112px;
}

.sidebar a {
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
}

.sidebar a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.content {
  display: grid;
  gap: 18px;
  padding: 24px 32px 48px;
}

.panel,
.group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.group {
  margin-bottom: 18px;
}

.group-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.group-header p {
  color: var(--muted);
  margin-bottom: 0;
}

.endpoint-list {
  display: grid;
  gap: 10px;
}

.endpoint {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.endpoint-summary {
  align-items: center;
  background: var(--surface);
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.endpoint-summary:hover {
  background: #fbfcfd;
}

.method {
  border-radius: 5px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  padding: 5px 8px;
}

.GET {
  background: #2563eb;
}

.POST {
  background: #0f766e;
}

.PUT,
.PATCH {
  background: #b45309;
}

.DELETE {
  background: var(--danger);
}

.path {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.badge.admin {
  background: #eee7ff;
  color: var(--admin);
}

.badge.public {
  background: var(--accent-soft);
  color: var(--public);
}

.endpoint-body {
  background: #fbfcfd;
  border-top: 1px solid var(--border);
  display: none;
  padding: 14px;
}

.endpoint.open .endpoint-body {
  display: block;
}

.endpoint-body p {
  color: var(--muted);
  margin-bottom: 12px;
}

pre {
  background: #151b23;
  border-radius: 8px;
  color: #f4f7fb;
  margin: 0;
  overflow-x: auto;
  padding: 14px;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .base-url {
    align-items: flex-start;
  }

  .layout {
    display: block;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 18px;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    position: static;
  }

  .sidebar a {
    white-space: nowrap;
  }

  .content {
    padding: 18px;
  }

  .endpoint-summary {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .badge {
    grid-column: 2;
    justify-self: start;
  }
}
