:root {
  --ink: #0e2e3e;
  --ink-soft: #2c3c58;
  --muted: #495057;
  --line: #dee2e6;
  --paper: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --accent: #37bcd9;
  --accent-light: #8ee6f7;
  --accent-dark: #197fa1;
  --info: #4a7aaf;
  --success: #4a9a82;
  --warn: #9a5565;
  --code: #0e2e3e;
  --code-soft: rgba(142, 230, 247, 0.12);
  --shadow: 0 18px 55px rgba(14, 46, 62, 0.11);
  --soft-shadow: 0 8px 24px rgba(14, 46, 62, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(142, 230, 247, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(55, 188, 217, 0.06), transparent 34%),
    var(--paper);
  font-family:
    "Ubuntu",
    "Helvetica",
    "Arial",
    sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 28px 32px 32px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 28px;
  align-items: end;
  min-height: 240px;
  padding-bottom: 28px;
}

.masthead > *,
.workspace > *,
.panel > * {
  min-width: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  margin-bottom: 22px;
  color: var(--info);
  font-size: 0.86rem;
  font-weight: 700;
}

.brand-lockup img {
  display: block;
  width: 96px;
  height: auto;
}

.brand-lockup div {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 13px;
}

.brand-lockup div::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 22px;
  background: rgba(14, 46, 62, 0.18);
  content: "";
  transform: translateY(-50%);
}

.brand-lockup strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.brand-lockup span {
  color: var(--info);
  font-size: 0.82rem;
  line-height: 1.1;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 16px;
  font-size: clamp(3.1rem, 6vw, 5.7rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0;
}

.lede {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
}

.endpoint-card {
  overflow: hidden;
  border: 1px solid rgba(55, 188, 217, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(142, 230, 247, 0.18), rgba(255, 255, 255, 0.92)),
    var(--surface);
  box-shadow: var(--soft-shadow);
  padding: 20px;
  max-width: 100%;
}

.endpoint-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.endpoint-card code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.steps {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(14, 46, 62, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 10px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(14, 46, 62, 0.04);
}

.step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(55, 188, 217, 0.35);
  border-radius: 50%;
  background: rgba(142, 230, 247, 0.14);
  color: var(--accent-dark);
  font-weight: 800;
}

.step strong {
  font-size: 0.96rem;
}

.step.is-active {
  border-color: rgba(55, 188, 217, 0.5);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(55, 188, 217, 0.28);
}

.step.is-active span {
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 520px);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(14, 46, 62, 0.08);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-main {
  padding: clamp(22px, 4vw, 54px);
  border-right: 1px solid rgba(14, 46, 62, 0.08);
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.screen-heading {
  max-width: 720px;
  margin-bottom: 28px;
  min-width: 0;
}

.screen-heading p:last-child {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  color: var(--info);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.field {
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #ced4da;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 188, 217, 0.2);
}

.primary-action,
.ghost-action {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(55, 188, 217, 0.28);
}

.primary-action:hover {
  background: linear-gradient(135deg, #30abc5, #146f8f);
  transform: translateY(-1px);
  box-shadow: 0 13px 26px rgba(55, 188, 217, 0.32);
}

.danger-action {
  background: linear-gradient(135deg, #d9b0b8, var(--warn));
}

.danger-action:hover {
  background: linear-gradient(135deg, #c4909a, #854657);
}

.ghost-action {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f9f9f9;
}

.ghost-action:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.08);
}

.action-row {
  display: grid;
  grid-template-columns: max-content minmax(260px, 420px);
  gap: 16px;
  align-items: end;
}

.response-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(74, 122, 175, 0.18), transparent 42%),
    var(--code);
  color: #f9f9f9;
  padding: 18px;
}

.request-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.request-summary span {
  flex: 0 0 auto;
  border: 1px solid rgba(142, 230, 247, 0.42);
  border-radius: 999px;
  color: var(--accent-light);
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 700;
}

.request-summary code {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-strip {
  border: 1px solid rgba(220, 232, 234, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  color: rgba(249, 249, 249, 0.76);
  font-size: 0.84rem;
}

.status-strip.is-success {
  border-color: rgba(123, 191, 171, 0.66);
  color: #c5f0db;
}

.status-strip.is-error {
  border-color: rgba(196, 144, 154, 0.75);
  color: #ffd6e0;
}

#response-output {
  min-height: 420px;
  margin: 0;
  overflow: auto;
  border: 1px solid rgba(220, 232, 234, 0.22);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 16px;
  color: #eaf8fb;
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .masthead,
  .workspace,
  .panel {
    grid-template-columns: 1fr;
  }

  .steps {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .panel-main {
    border-right: 0;
    border-bottom: 1px solid rgba(14, 46, 62, 0.08);
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 18px;
  }

  .masthead {
    min-height: auto;
    gap: 20px;
  }

  .steps,
  .form-grid,
  .action-row {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 34px 1fr;
    justify-items: start;
    text-align: left;
  }

  .panel {
    min-height: auto;
    width: 100%;
    max-width: 100%;
  }

  .panel-main {
    padding: 20px;
  }

  .endpoint-card {
    width: 100%;
    max-width: 100%;
  }

  h1 {
    font-size: clamp(1.95rem, 9.4vw, 2.55rem);
    line-height: 1.08;
  }

  h2 {
    font-size: clamp(1.45rem, 6.2vw, 1.8rem);
    line-height: 1.18;
  }

  .lede {
    font-size: 1rem;
  }

  .brand-lockup {
    margin-bottom: 16px;
  }

  .brand-lockup img {
    width: 86px;
  }

  .screen-heading {
    max-width: 100%;
  }

  .screen-heading h2,
  .screen-heading p:last-child {
    max-width: 100%;
  }

  .screen-heading p:last-child {
    font-size: 0.92rem;
    overflow-wrap: anywhere;
  }

  .primary-action {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .shell {
    padding: 18px 14px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-lockup img {
    width: 76px;
  }

  .panel-main {
    padding: 18px;
  }

  .step {
    border-radius: 12px;
  }
}
