:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #101713;
  --paper: #f4f5f0;
  --white: #ffffff;
  --line: #c8cec7;
  --muted: #5c6961;
  --green: #245846;
  --mint: #dbe9df;
  --signal: #e96a42;
  --acid: #d7e56d;
  --danger: #b63e2d;
  --warning: #8a5a00;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
}

button,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid #34423a;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  font-weight: 900;
}

.brand b {
  font-size: 13px;
  letter-spacing: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header nav a {
  color: #d6ddd8;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--acid);
}

.console-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: end;
  gap: 64px;
  padding: 44px max(32px, calc((100% - 1440px) / 2));
  color: var(--white);
  background: var(--green);
  border-bottom: 6px solid var(--signal);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.console-intro .eyebrow {
  color: var(--acid);
}

.console-intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0;
}

.console-intro > p {
  max-width: 560px;
  margin: 0;
  color: #e1e9e4;
  font-size: 16px;
  line-height: 1.6;
}

.status-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1440px;
  margin: 0 auto;
  background: var(--white);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.status-rail div {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 20px;
  border-right: 1px solid var(--line);
}

.status-rail div:last-child {
  border-right: 0;
}

.status-rail span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.status-rail b {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.status-rail b[data-state="available"] {
  color: var(--green);
}

.status-rail b[data-state="unavailable"] {
  color: var(--danger);
}

.console-shell {
  max-width: 1440px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 0;
}

.console-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: end;
  gap: 48px;
  padding: 36px 40px 28px;
  border-bottom: 1px solid var(--line);
}

.console-heading h2,
.contract-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.console-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 650px;
}

.request-pane,
.response-pane {
  min-width: 0;
  padding: 28px 32px 32px;
}

.request-pane {
  border-right: 1px solid var(--line);
}

.response-pane {
  background: #edf1ed;
}

.pane-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.pane-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pane-head > div:first-child > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.pane-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink);
}

.segmented button {
  min-height: 36px;
  padding: 6px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.segmented button + button {
  border-left: 1px solid var(--ink);
}

.segmented button[aria-selected="true"] {
  color: var(--white);
  background: var(--ink);
}

.endpoint-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
}

.endpoint-row > span {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: var(--white);
  background: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.endpoint-row code {
  min-width: 0;
  overflow: hidden;
  padding: 0 12px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-row button,
.response-output button {
  align-self: stretch;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.editor-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 8px;
  font-size: 10px;
  font-weight: 900;
}

.editor-label b {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
}

textarea {
  width: 100%;
  min-height: 430px;
  resize: vertical;
  padding: 16px;
  color: #dce7df;
  background: #151e19;
  border: 1px solid #344139;
  border-radius: 0;
  outline: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  tab-size: 2;
}

textarea:focus {
  border-color: var(--signal);
  box-shadow: inset 3px 0 0 var(--signal);
}

.field-note {
  min-height: 34px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.command-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
}

.command-row button {
  min-height: 42px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.command-row .primary-command {
  margin-left: auto;
  color: var(--white);
  background: var(--signal);
  border-color: var(--signal);
}

.command-row button:hover,
.command-row button:focus-visible,
.endpoint-row button:hover,
.endpoint-row button:focus-visible,
.response-output button:hover,
.response-output button:focus-visible {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pane-head strong {
  min-width: 88px;
  padding: 8px 10px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.response-pane[data-response-state="match"] .pane-head strong {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.response-pane[data-response-state="mismatch"] .pane-head strong {
  color: var(--ink);
  background: var(--acid);
  border-color: #a8b54a;
}

.response-pane[data-response-state="invalid"],
.response-pane[data-response-state="error"] {
  background: #f4e7e2;
}

.response-pane[data-response-state="invalid"] .pane-head strong,
.response-pane[data-response-state="error"] .pane-head strong {
  color: var(--white);
  background: var(--danger);
  border-color: var(--danger);
}

.response-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 20px;
  background: var(--white);
  border: 1px solid var(--line);
}

.response-facts div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.response-facts div:last-child {
  border-right: 0;
}

.response-facts dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.response-facts dd {
  overflow: hidden;
  margin: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.response-output {
  background: var(--ink);
  border: 1px solid #344139;
}

.response-output > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dce7df;
  border-bottom: 1px solid #344139;
}

.response-output > div > span {
  padding: 0 14px;
  font-size: 10px;
  font-weight: 900;
}

.response-output button {
  color: #dce7df;
  border-left-color: #344139;
}

.response-output pre {
  min-height: 477px;
  max-height: 650px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  color: #cce3d2;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.contract-band {
  max-width: 1440px;
  display: grid;
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 1fr);
  gap: 56px;
  margin: 30px auto 0;
  padding: 36px 40px;
  color: var(--white);
  background: var(--ink);
  border-bottom: 6px solid var(--acid);
}

.contract-heading .eyebrow {
  color: var(--acid);
}

.contract-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #39463f;
  border-left: 1px solid #39463f;
}

.contract-list div {
  padding: 18px;
  border-right: 1px solid #39463f;
  border-bottom: 1px solid #39463f;
}

.contract-list dt {
  margin-bottom: 8px;
  color: var(--acid);
  font-weight: 800;
}

.contract-list dd {
  margin: 0;
  color: #cbd4ce;
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  max-width: 1440px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 32px;
  color: var(--muted);
  font-size: 11px;
}

.site-footer a {
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 980px) {
  .console-intro h1 {
    font-size: 48px;
  }

  .console-intro,
  .console-heading,
  .contract-band {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .request-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .status-rail div:nth-child(2) {
    border-right: 0;
  }

  .status-rail div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 58px;
    padding: 8px 16px;
  }

  .brand b {
    display: none;
  }

  .site-header nav {
    gap: 14px;
  }

  .site-header nav a {
    font-size: 10px;
  }

  .console-intro {
    padding: 32px 20px;
  }

  .console-intro h1 {
    font-size: 38px;
  }

  .status-rail {
    border-right: 0;
    border-left: 0;
  }

  .console-shell {
    border-right: 0;
    border-left: 0;
  }

  .console-heading,
  .request-pane,
  .response-pane,
  .contract-band {
    padding-right: 20px;
    padding-left: 20px;
  }

  .pane-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

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

  .endpoint-row button {
    grid-column: 1 / -1;
    min-height: 38px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .command-row .primary-command {
    grid-column: 1 / -1;
    margin-left: 0;
  }

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

  .response-facts div:nth-child(2) {
    border-right: 0;
  }

  .response-facts div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .contract-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 20px;
  }
}
