.welcome-shell {
  gap: 28px;
  padding-top: 44px;
}

.test-page {
  width: min(640px, 100%);
}

.test-page h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1.12;
}

.test-page .lede {
  margin-bottom: 24px;
}

.welcome-shell .test-page {
  width: min(1080px, 100%);
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 36px;
  align-items: center;
  margin-bottom: 18px;
}

.compact-hero {
  grid-template-columns: minmax(0, 720px);
  margin-bottom: 34px;
}

.welcome-copy h1 {
  max-width: 620px;
  margin-bottom: 14px;
  font-size: 3rem;
  letter-spacing: 0;
}

.welcome-copy .lede {
  max-width: 640px;
  margin-bottom: 22px;
  font-size: 1.08rem;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button.secondary {
  border-color: #b9c9ed;
  background: var(--surface);
  color: var(--accent-dark);
}

.button.secondary:hover {
  border-color: var(--accent);
  background: var(--surface-blue);
}

.test-image-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #c5d5f6;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.test-image-panel::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 58px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 28px 0 0 var(--lime);
}

.test-image-frame {
  display: grid;
  min-height: 300px;
  place-items: center;
  background:
    linear-gradient(135deg, #f8fbff 0 48%, #e7efff 48% 100%);
}

.test-image-frame img {
  width: min(70%, 270px);
  height: auto;
  filter: drop-shadow(0 24px 28px rgb(24 61 145 / 20%));
}

.test-image-content {
  border-top: 1px solid var(--border);
  padding: 18px 20px 20px;
}

.test-image-content h2,
.next-panel h2,
.test-step h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.test-image-content p,
.next-panel p,
.test-step p {
  color: var(--muted);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.test-step,
.next-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgb(24 61 145 / 7%);
}

.test-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px;
}

.workflow[data-state="locked"] #download-step,
.workflow[data-state="locked"] #next-panel,
.workflow[data-state="ready"] #next-panel,
.image-capture-step[data-state="locked"] {
  filter: grayscale(0.7);
  opacity: 0.48;
}

.workflow[data-state="locked"] #download-link,
.workflow[data-state="locked"] #open-upload-page,
.workflow[data-state="ready"] #open-upload-page {
  pointer-events: none;
}

.workflow[data-state="locked"] #download-step .step-number,
.workflow[data-state="locked"] #next-panel .step-number,
.workflow[data-state="ready"] #next-panel .step-number,
.image-capture-step[data-state="locked"] .step-number {
  background: #96a1b8;
}

.next-panel {
  padding: 18px;
}

.step-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 850;
}

.upload-box {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  font-weight: 700;
}

.upload-box input {
  width: 100%;
  border: 1px dashed #8fadf2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
  color: var(--text);
  font: inherit;
}

.upload-status {
  margin: 8px 0 0;
  font-weight: 700;
}

.neutral { color: var(--muted); }

.success {
  border: 1px solid #a9db73;
  border-radius: 8px;
  background: #f5ffe8;
  color: #315f0e;
  padding: 10px 12px;
}

.error { color: #b42318; }

.single-step {
  width: min(620px, 100%);
  margin-bottom: 14px;
}

.image-capture-step {
  width: min(620px, 100%);
}

.capture-test-image {
  display: grid;
  min-height: 220px;
  margin-top: 14px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #f8fbff 0 48%, #e7efff 48% 100%);
}

.capture-test-image img {
  width: min(64%, 210px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgb(24 61 145 / 18%));
}

@media (max-width: 840px) {
  .welcome-hero,
  .workflow {
    grid-template-columns: 1fr;
  }

  .welcome-copy h1 {
    font-size: 2.2rem;
    line-height: 1.08;
  }

  .test-image-frame { min-height: 220px; }
}

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

  .welcome-hero { gap: 22px; }

  .test-page h1 {
    font-size: 1.75rem;
    line-height: 1.12;
  }

  .welcome-copy h1 {
    font-size: 1.9rem;
    line-height: 1.12;
  }

  .welcome-copy .lede { font-size: 1rem; }

  .welcome-actions { align-items: stretch; }
}
