:root {
  --bg: #f7f8fb;
  --card: #ffffff;
  --border: #d9deea;
  --text: #172033;
  --muted: #5b6477;
  --primary: #265bdc;
  --danger: #c62828;
  --get: #0f766e;
  --post: #1d4ed8;
  --patch: #b45309;
  --delete: #b91c1c;
}

* { box-sizing: border-box; }

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

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

nav {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

nav a {
  display: block;
  margin: 6px 0;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

section {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

section h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.method {
  display: inline-block;
  min-width: 64px;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.method-get { background: var(--get); }
.method-post { background: var(--post); }
.method-patch { background: var(--patch); }
.method-delete { background: var(--delete); }

label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 14px; }
input, textarea, select, button { font: inherit; }
input, textarea, select {
  width: 100%;
  border: 1px solid #c7cfdd;
  border-radius: 6px;
  padding: 10px;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  color: white;
  background: var(--primary);
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

button.secondary { background: #475467; }
button.danger { background: var(--danger); }

pre {
  overflow: auto;
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #101828;
  color: #f3f6fc;
  font-size: 13px;
  min-height: 72px;
}

pre[data-ok="false"] { outline: 2px solid var(--danger); }

.hint { color: var(--muted); font-size: 13px; margin: 0 0 8px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  nav { position: static; }
}
