:root {
  --navy: #0d2747;
  --navy-2: #1f4d7a;
  --blue: #2c6fa8;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --border: #cdd6e0;
  --text: #1a1a1a;
  --muted: #5a6b80;
  --good: #1f7a3a;
  --good-bg: #eff8f1;
  --bad: #b8341c;
  --bad-bg: #fdf2ef;
  --warn: #8a6a00;
  --warn-bg: #fdf8e6;
  --code-bg: #eef3f9;
  --code-fg: #1f4d7a;
  --shadow: 0 1px 3px rgba(13, 39, 71, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

code {
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}

/* ---------- Banner ---------- */

.banner {
  background: var(--bad);
  color: #fff;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.banner-row { padding: 0.45em 1em; }
.banner-row-top {
  background: var(--bad);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.banner-row-bottom {
  background: #8a2613;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.banner-sep { opacity: 0.6; margin: 0 0.5em; }

/* ---------- Layout ---------- */

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5em 1.2em 3em;
}

h1 {
  margin: 0.4em 0 0.4em;
  font-size: 22px;
  color: var(--navy);
  font-weight: 700;
}
h2 {
  font-size: 13px;
  margin: 0;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 1em;
  max-width: 820px;
}

.intro {
  margin-bottom: 1.5em;
}

.scope {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6em 1em;
  margin: 1em 0;
  box-shadow: var(--shadow);
}
.scope summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
  padding: 0.3em 0;
}
.scope-body {
  padding-top: 0.5em;
  border-top: 1px solid var(--border);
  margin-top: 0.5em;
  color: #2a3a52;
}
.scope-body p { margin: 0.6em 0 0.3em; }
.scope-body ul { margin: 0.2em 0 0.6em 1.4em; padding: 0; }
.scope-body li { margin: 0.15em 0; }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.8em;
}
.toolbar-run { margin-bottom: 0.4em; }
.toolbar-examples { margin-bottom: 1em; }
.toolbar-label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-right: 0.3em;
}
.toolbar-spacer { flex: 1; }

select.select {
  font: inherit;
  padding: 0.4em 0.65em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--navy);
  cursor: pointer;
  min-width: 22em;
}
select.select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.btn {
  font: inherit;
  padding: 0.45em 0.85em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--navy);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.1s, border-color 0.1s;
}
.btn:hover { background: #f0f4f9; border-color: var(--blue); }
.btn:active { background: #e6eef7; }
.btn.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn.primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn.ghost:hover { color: var(--navy); border-color: var(--navy); }

/* ---------- Panes ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin-bottom: 1em;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

.pane {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.pane-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.6em 1em;
  border-bottom: 1px solid var(--border);
  background: #fafcff;
  border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
  gap: 0.5em;
}
.pane-hint {
  font-size: 11.5px;
  color: var(--muted);
}

textarea#request-body {
  flex: 1;
  resize: vertical;
  border: none;
  outline: none;
  padding: 0.85em 1em;
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 12.5px;
  line-height: 1.5;
  background: transparent;
  color: var(--text);
  min-height: 360px;
  border-radius: 0 0 6px 6px;
}

pre.response-xml, pre.lint-json {
  flex: 1;
  margin: 0;
  padding: 0.85em 1em;
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  border-radius: 0 0 6px 6px;
}
pre.response-xml.bad   { background: var(--bad-bg);  color: #50190d; }
pre.response-xml.good  { background: var(--good-bg); color: #0c3a1d; }
pre.response-xml.warn  { background: var(--warn-bg); color: #4a3900; }

.placeholder { color: var(--muted); font-style: italic; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lint-pane {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
pre.lint-json { background: #f7faff; color: #1a2a40; }

/* ---------- Footer ---------- */

.footer {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.footer p { margin: 0.4em 0; }
.footer .small { font-size: 11px; }
