:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d9dee8;
  --accent: #2563eb;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

button:hover {
  filter: brightness(0.96);
}

button.secondary {
  background: #4b5563;
}

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

input,
select {
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: white;
  color: var(--text);
}

label {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: stretch;
  padding: 34px;
  background: #0f172a;
  color: white;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0 0 8px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
}

.subtitle {
  max-width: 840px;
  margin: 0;
  color: #cbd5e1;
}

.status-card {
  min-width: 230px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: center;
  background: rgba(255, 255, 255, 0.06);
}

.pill {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--warn);
  color: white;
  font-weight: 700;
}

.pill.ok {
  background: var(--ok);
}

.pill.bad {
  background: var(--danger);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 38vw);
  gap: 18px;
  align-items: start;
  min-height: 100vh;
  padding: 18px;
}

.left-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.left-column > .hero {
  grid-column: 1 / -1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}

.panel h2 {
  margin-top: 0;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.inline-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hint {
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fbfdff;
}

.item-title {
  font-weight: 700;
}

.item-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

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

.left-column .response-panel {
  grid-column: 1 / -1;
}

.api-response-panel {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
}

.api-response-panel h2 {
  margin-bottom: 14px;
}

.api-response-panel pre {
  flex: 1;
  min-height: 0;
  margin: 0;
}

pre {
  overflow: auto;
  min-height: 220px;
  padding: 16px;
  border-radius: 14px;
  background: #0b1020;
  color: #d1e7ff;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .left-column {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  .left-column .response-panel {
    grid-column: auto;
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .api-response-panel {
    position: static;
    min-height: auto;
    max-height: none;
  }

  .api-response-panel pre {
    min-height: 280px;
    max-height: 60vh;
  }
}


code {
  border-radius: 6px;
  padding: 2px 5px;
  background: #eef2ff;
}

.wide-form label {
  flex: 1 1 420px;
}

.wide-form input {
  width: 100%;
}

.small {
  font-size: 0.92rem;
}

.explain-grid,
.probe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.explain-card,
.probe-card,
.tool-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fbfdff;
}

.explain-card h3,
.probe-card h3,
.tool-box h3 {
  margin: 0 0 8px;
}

.explain-card p,
.probe-card p,
.tool-box p {
  margin: 8px 0 0;
}

.probe-card button {
  width: 100%;
  margin-bottom: 8px;
}

.endpoint {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef2ff;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.tool-box {
  margin-top: 14px;
}

.compact-form {
  margin-top: 10px;
}
