:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5f6875;
  --line: #dbe1ea;
  --green: #0a8f5c;
  --red: #c93d3d;
  --amber: #b7791f;
  --blue: #2357a6;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(219, 225, 234, 0.86);
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 750;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  padding: 8px 10px;
}

.nav-links a:hover {
  background: #eef2f7;
  color: var(--ink);
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: stretch;
}

.intro-copy {
  padding: 8px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.lead code {
  color: var(--ink);
  font-size: 0.92em;
}

.status-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.status-panel span,
.summary-item span,
.endpoint-row small,
.footer {
  color: var(--muted);
}

.status-panel strong {
  font-size: 36px;
  line-height: 1;
}

.status-panel strong[data-state="ok"] {
  color: var(--green);
}

.status-panel strong[data-state="warn"] {
  color: var(--amber);
}

.status-panel strong[data-state="error"] {
  color: var(--red);
}

.status-panel code,
.code-block,
.result-shell {
  border: 1px solid var(--line);
  background: #101820;
  color: #f5f7fb;
}

.status-panel code {
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  padding: 7px 9px;
  overflow-wrap: anywhere;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 40px;
}

.summary-item {
  display: grid;
  gap: 5px;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.summary-item strong {
  font-size: 18px;
  line-height: 1.24;
}

.workspace-section {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.section-heading {
  margin-bottom: 18px;
}

.tester {
  display: grid;
  gap: 10px;
}

.tester > label {
  color: var(--muted);
  font-weight: 700;
}

.request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

input[type="url"] {
  min-width: 0;
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 0 13px;
}

input[type="url"]:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(35, 87, 166, 0.16);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  padding: 0 12px;
  white-space: nowrap;
}

button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 20px;
}

button:hover {
  background: #2a3642;
}

.result-shell {
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.result-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  color: #c8d3df;
  font-size: 13px;
  padding: 12px 14px;
}

#request-path,
#request-status {
  min-width: 0;
  overflow-wrap: anywhere;
}

#result-output,
.code-block {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

#result-output {
  min-height: 180px;
  max-height: 420px;
  padding: 16px;
}

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

.endpoint-row {
  display: grid;
  grid-template-columns: 96px minmax(150px, 230px) minmax(0, 1fr) minmax(150px, 240px) 100px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.endpoint-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 8px;
  background: #e8f6ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.code-block {
  min-height: 70px;
  border-radius: 8px;
  padding: 16px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  font-size: 14px;
}

@media (max-width: 860px) {
  .intro,
  .summary-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    margin-top: 18px;
  }

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

  .endpoint-row p,
  .endpoint-row small {
    grid-column: 1 / -1;
  }
}

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

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  main {
    width: min(100% - 28px, 1120px);
    padding-top: 30px;
  }

  h1 {
    font-size: 36px;
  }

  .request-row {
    grid-template-columns: 1fr;
  }

  .checkbox-label,
  button {
    width: 100%;
    justify-content: center;
  }

  .result-toolbar,
  .footer {
    flex-direction: column;
  }
}
