:root {
  color-scheme: light;
  --ink: #201d18;
  --muted: #6d665c;
  --paper: #f4f0e7;
  --card: #fffdf8;
  --line: #d8d0c3;
  --accent: #a4492d;
  --good: #247443;
  --bad: #a52d2d;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

header, main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 0 26px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-family: Georgia, serif; font-size: clamp(2.4rem, 7vw, 5.2rem); line-height: .9; font-weight: 500; }
h2 { margin-bottom: 6px; font-size: 1.05rem; }
.eyebrow { margin-bottom: 12px; color: var(--accent); font: 700 .72rem/1 ui-monospace, monospace; letter-spacing: .18em; }
.lede, .section-title p { color: var(--muted); }
.account { display: grid; justify-items: end; gap: 8px; }
.developer { color: var(--muted); font-size: .78rem; }

main { padding-bottom: 64px; }

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

.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.section-title p { margin-bottom: 14px; font-size: .9rem; }
.fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 14px; }
.connection-fields label { flex: 1 1 360px; }
.request-fields { flex-wrap: nowrap; }
.grow { flex: 1; }

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

textarea { margin: 5px 0 12px; resize: vertical; font-family: ui-monospace, monospace; font-size: .82rem; }

button {
  padding: 9px 13px;
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  cursor: pointer;
}

button:hover { filter: brightness(.94); }
button:disabled { cursor: wait; opacity: .55; }
button.secondary { color: var(--ink); border-color: var(--line); background: transparent; }

.status {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
}

.neutral { color: var(--muted); background: #ded8cd; }
.pass { color: var(--good); background: #dcebdd; }
.fail { color: var(--bad); background: #f2dddd; }
.hint, .summary { color: var(--muted); font-size: .78rem; }
.hint { margin: 0; }
.summary { margin-bottom: 10px; }
.error { min-height: 1.2em; margin: 8px 0 0; color: var(--bad); font-size: .8rem; }

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 56px;
  align-items: center;
  max-width: 840px;
  margin: 30px auto;
  padding: 36px;
}

.auth-card h2 { font: 500 2rem/1.05 Georgia, serif; }
.auth-card p { color: var(--muted); line-height: 1.55; }
.auth-card form { display: grid; gap: 12px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; }

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 7px;
}

.result-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
  text-align: left;
}

.result-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.result-row.pass .result-mark { background: var(--good); }
.result-row.fail .result-mark { background: var(--bad); }
.result-name { overflow: hidden; font: .76rem/1.2 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.result-time, .result-code { color: var(--muted); font-size: .7rem; }

pre {
  max-height: 420px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 14px;
  color: #e8e1d5;
  border-radius: 7px;
  background: #28241f;
  font: .78rem/1.5 ui-monospace, SFMono-Regular, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 660px) {
  header { align-items: start; padding-top: 32px; }
  section { padding: 16px; }
  .section-title { display: block; }
  .section-title button { margin-bottom: 14px; }
  .request-fields { flex-wrap: wrap; }
  .request-fields label { width: 100%; }
  .auth-card { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
}
