.back-link {
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s ease;
}
.back-link:hover {
  color: var(--ink);
}
.test-page {
  padding: 54px 0 108px;
}
.test-intro {
  padding: 28px 0 54px;
}
.test-intro h1 {
  max-width: none;
  margin: 18px 0 12px;
  font-size: clamp(18px, 5.2vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.test-intro p:not(.eyebrow) {
  max-width: 570px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.test-code {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--accent-text);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}
.test-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.example-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.example-actions button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.request-preview {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.request-preview summary {
  cursor: pointer;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.request-preview .reference-code-heading {
  gap: 10px;
  font-size: 11px;
}
.reference-table code {
  overflow-wrap: anywhere;
}
.test-card {
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(18, 37, 63, 0.045);
}
.test-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.test-card h2 {
  margin: 9px 0 0;
  font-size: 25px;
  letter-spacing: -0.8px;
}
.test-status-dot {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(53, 230, 164, 0.12);
}
.test-card label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}
.test-card label span {
  color: var(--muted);
  font-weight: 500;
}
.test-card input,
.test-card textarea {
  width: 100%;
  margin-bottom: 21px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: var(--surface-2);
  font: inherit;
  font-size: 13px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.test-card textarea {
  min-height: 185px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}
.test-card input:focus,
.test-card textarea:focus {
  border-color: rgba(53, 230, 164, 0.55);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(53, 230, 164, 0.09);
}
.field-help {
  margin: -8px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.field-help code {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-2);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.primary-button:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}
.primary-button span {
  color: var(--accent-text);
  font-size: 17px;
}
.form-message {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.error-message {
  color: var(--danger);
}
.status-label {
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--accent-text);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
}
.task-reference {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  min-height: 52px;
  align-items: center;
}
.task-reference code {
  max-width: 68%;
  overflow: hidden;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-result {
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  margin: 20px 0;
  padding: 16px;
  overflow: auto;
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--surface);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.result-card .field-help {
  margin-bottom: 0;
}
.result-card .field-help + .field-help {
  margin-top: 12px;
}
.test-section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  font-size: 13px;
}
.test-section-links a {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-text);
}
.test-card {
  min-width: 0;
}
.api-reference {
  margin-top: 24px;
  scroll-margin-top: 24px;
}
.api-reference > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.api-reference h3 {
  margin-top: 30px;
  font-size: 17px;
}
.reference-table-wrap {
  overflow-x: auto;
}
.reference-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.reference-table th,
.reference-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.reference-table th {
  color: var(--muted);
  background: var(--paper);
  font-weight: 500;
}
.reference-table td:first-child {
  white-space: nowrap;
  color: var(--accent-text);
}
.reference-table td:last-child {
  min-width: 220px;
  line-height: 1.6;
}
.reference-code {
  margin: 16px 0;
  padding: 18px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reference-endpoint b {
  margin-right: 12px;
  color: var(--accent-text);
}
.reference-code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reference-code-heading button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--accent-text);
  cursor: pointer;
}
.reference-errors {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 14px 24px;
  font-size: 13px;
}
.reference-errors dd {
  margin: 0;
  color: var(--muted);
}
.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}
.task-result {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .test-page {
    padding-top: 35px;
  }
  .test-layout {
    grid-template-columns: 1fr;
  }
  .test-card {
    padding: 23px;
  }
}

#validator-test-form { grid-column: 1 / -1; }
.request-card .task-result { margin-bottom: 0; }
.request-card .task-reference { align-items: center; }
