:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #697386;
  --line: #dce2ea;
  --accent: #176b87;
  --accent-strong: #0f5269;
  --success: #20754f;
  --danger: #b42318;
  --code-bg: #101820;
}

* {
  box-sizing: border-box;
}

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

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

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 18px 38px rgba(31, 42, 55, 0.08);
}

.request-panel,
.response-panel {
  min-width: 0;
}

.brand,
.response-head,
.capture-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand,
.response-head,
.capture-head {
  margin-bottom: 18px;
}

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

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

.badge {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3f5;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.badge.ok {
  background: #e7f5ee;
  color: var(--success);
}

.badge.fail {
  background: #fff0ed;
  color: var(--danger);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

label strong {
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  color: var(--text);
  outline: none;
}

input[type="text"],
input[type="url"],
input[type="password"],
select {
  height: 42px;
  padding: 0 12px;
}

select {
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 84px;
  padding: 11px 12px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.14);
}

input[type="range"] {
  accent-color: var(--accent);
  height: 42px;
  padding: 0;
}

.toolbar {
  margin-top: 4px;
  flex-wrap: wrap;
}

.switch {
  width: auto;
  margin: 0 auto 0 0;
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.inline-control {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.inline-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

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

button.ghost {
  background: #ffffff;
  color: var(--accent);
}

button.ghost:hover {
  background: #eef7fa;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.response-panel {
  display: flex;
  flex-direction: column;
}

.output {
  min-height: 300px;
  max-height: 42vh;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-radius: 7px;
  background: var(--code-bg);
  color: #eaf2f8;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.capture-head {
  margin-top: 18px;
}

.mini-toolbar {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-toolbar button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.capture-output {
  min-height: 260px;
  max-height: 34vh;
}

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

  .output {
    min-height: 280px;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
  }

  .panel {
    padding: 16px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .brand,
  .response-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 25px;
  }
}
