.self-test-hero {
  max-width: 760px;
}

.self-test-hero > p:last-child,
.self-test-message {
  color: var(--muted);
  line-height: 1.6;
}

.self-test-intro,
.self-test-console {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 34px);
}

.self-test-profile-action {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 22px;
  padding: clamp(20px, 4vw, 30px);
}

.self-test-profile-action h2,
.self-test-profile-action p {
  margin: 5px 0;
}

.self-test-profile-action > div > p:last-child {
  color: var(--muted);
}

.primary-button {
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  border-radius: 10px;
  color: #071421;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-width: 190px;
  padding: 13px 18px;
  text-decoration: none;
}

.self-test-intro {
  max-width: 760px;
}

.self-test-plan {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  padding-left: 24px;
}

.self-test-start-form {
  margin-top: 24px;
}

.self-test-advice {
  background: color-mix(in srgb, var(--mint) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--mint) 35%, var(--line));
  border-radius: 12px;
  line-height: 1.5;
  padding: 16px;
}

.self-test-advice p {
  color: var(--muted);
  margin: 7px 0 0;
}

.self-test-start-form button,
.self-test-actions button {
  min-height: 46px;
}

.self-test-heading,
.self-test-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.self-test-actions [hidden] {
  display: none !important;
}

.self-test-heading h2 {
  margin: 4px 0 0;
}

.self-test-status {
  white-space: nowrap;
}

.self-test-progress {
  background: color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  height: 8px;
  margin: 24px 0;
  overflow: hidden;
}

.self-test-progress span {
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 300ms ease;
  width: 12%;
}

.self-test-results {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.self-test-step {
  align-items: flex-start;
  background: color-mix(in srgb, var(--card) 80%, var(--line));
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: 14px 1fr;
  padding: 16px;
}

.self-test-step-mark {
  background: var(--muted);
  border-radius: 50%;
  height: 12px;
  margin-top: 4px;
  width: 12px;
}

.self-test-step.state-ok .self-test-step-mark {
  background: var(--mint);
}

.self-test-step.state-warning .self-test-step-mark,
.self-test-step.state-failed .self-test-step-mark {
  background: #f2a65a;
}

.self-test-step p {
  color: var(--muted);
  line-height: 1.45;
  margin: 5px 0;
}

.self-test-step small,
.self-test-poll-error {
  color: var(--muted);
}

.self-test-actions {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}

.secondary-button {
  color: var(--mint);
  font-weight: 700;
  text-decoration: none;
}

.repair-form {
  display: grid;
  gap: 18px;
  max-width: 900px;
}

.repair-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.repair-form label:not(.repair-confirm) {
  display: grid;
  font-weight: 700;
  gap: 7px;
}

.repair-form textarea {
  min-height: 130px;
  resize: vertical;
}

.repair-confirm {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.repair-confirm input {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .repair-grid {
    grid-template-columns: 1fr;
  }
  .self-test-profile-action {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .self-test-actions,
  .self-test-actions form,
  .self-test-actions button,
  .secondary-button {
    text-align: center;
    width: 100%;
  }
}
