/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink: #e8006e;
  --pink-light: #fce4f0;
  --pink-dark: #b5005a;
  --green: #4caf50;
  --yellow: #f59e0b;
  --red: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: white;
  border-bottom: 3px solid var(--pink);
  padding: 16px 20px;
  margin-bottom: 32px;
}
.site-header .inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header .logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.site-header .tool-name {
  font-size: 15px;
  color: var(--gray-500);
}

/* ── Homepage cards ───────────────────────────────────────────────────────── */
.home-intro {
  margin-bottom: 32px;
}
.home-intro h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.home-intro p {
  color: var(--gray-700);
  font-size: 17px;
}

.tool-cards {
  display: grid;
  gap: 20px;
}

.tool-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}
.tool-card:hover {
  border-color: var(--pink);
  box-shadow: 0 4px 20px rgba(232,0,110,0.12);
}
.tool-card .checkpoint {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink);
  margin-bottom: 8px;
}
.tool-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.tool-card p {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.tool-card .card-cta {
  display: inline-block;
  background: var(--pink);
  color: white;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
}
.tool-card:hover .card-cta {
  background: var(--pink-dark);
}

/* ── Tool pages ───────────────────────────────────────────────────────────── */
.tool-header {
  margin-bottom: 28px;
}
.tool-header .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--pink);
  text-decoration: none;
  margin-bottom: 16px;
  font-weight: 500;
}
.tool-header .back:hover { text-decoration: underline; }
.tool-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.tool-header p {
  color: var(--gray-700);
  font-size: 16px;
}

/* ── Form elements ────────────────────────────────────────────────────────── */
.form-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}
.form-section h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 16px;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 17px;
  color: var(--gray-900);
  transition: border-color 0.15s;
  background: white;
}
.field input:focus {
  outline: none;
  border-color: var(--pink);
}
.field .hint {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 5px;
}

/* ── Upload zone ──────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--pink);
  background: var(--pink-light);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-zone .upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.upload-zone .upload-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.upload-zone .upload-hint {
  font-size: 14px;
  color: var(--gray-500);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--pink);
  color: white;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.btn-primary:hover:not(:disabled) { background: var(--pink-dark); }
.btn-primary:disabled {
  background: var(--gray-200);
  color: var(--gray-500);
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: white;
  color: var(--pink);
  font-size: 16px;
  font-weight: 600;
  border: 2px solid var(--pink);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--pink-light); }

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading {
  display: none;
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
}
.loading.visible { display: block; }
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results ──────────────────────────────────────────────────────────────── */
.result-box {
  display: none;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 20px;
}
.result-box.visible { display: block; }

.result-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 17px;
}
.result-verdict.ready {
  background: #dcfce7;
  color: #166534;
}
.result-verdict.review {
  background: #fef9c3;
  color: #854d0e;
}
.result-verdict.resubmit {
  background: #fee2e2;
  color: #991b1b;
}
.result-verdict.situation-a {
  background: #fef9c3;
  color: #854d0e;
}
.result-verdict.situation-b {
  background: #fee2e2;
  color: #991b1b;
}
.result-verdict.clean {
  background: #dcfce7;
  color: #166534;
}

.result-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-700);
  white-space: pre-wrap;
}

.save-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}
.save-section p {
  font-size: 15px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

/* ── CP2 student lookup ───────────────────────────────────────────────────── */
.student-found {
  display: none;
  background: var(--pink-light);
  border: 1px solid var(--pink);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 12px;
}
.student-found.visible { display: block; }
.student-found .found-name {
  font-weight: 700;
  color: var(--pink-dark);
  font-size: 17px;
  margin-bottom: 6px;
}
.student-found .found-detail {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.5;
}

.student-not-found {
  display: none;
  background: #fef9c3;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 12px;
  font-size: 15px;
  color: #854d0e;
}
.student-not-found.visible { display: block; }

/* ── Error ────────────────────────────────────────────────────────────────── */
.error-box {
  display: none;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 16px;
  font-size: 15px;
  color: #991b1b;
}
.error-box.visible { display: block; }

/* ── Onboarding stepper ──────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}
.step.active .step-circle {
  background: var(--pink);
  color: white;
}
.step.active .step-label {
  color: var(--pink-dark);
}
.step.complete .step-circle {
  background: var(--green);
  color: white;
}
.step.complete .step-label {
  color: var(--gray-700);
}
.step-line {
  flex: 1 1 auto;
  max-width: 90px;
  height: 3px;
  background: var(--gray-200);
  margin: 0 12px;
  margin-bottom: 28px; /* align with circles, not labels */
  border-radius: 2px;
  transition: background 0.2s;
}
.step-line.filled {
  background: var(--green);
}

.greeting {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 18px;
}

.edit-info-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--pink);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}
.edit-info-link:hover { text-decoration: underline; }

/* ── CP1 result cards (stacking flow) ────────────────────────────────────── */
.inline-note {
  display: none;
  margin-top: 14px;
  background: #fef9c3;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #854d0e;
}
.inline-note.visible { display: block; }

.result-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  background: white;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.card-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.card-loading {
  text-align: center;
  padding: 28px 20px;
  color: var(--gray-500);
  font-size: 16px;
}
.card-body {
  padding: 24px;
}
.card-issue {
  background: #fef9c3;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 16px;
  color: #854d0e;
  line-height: 1.5;
}
.card-dup {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 16px;
  color: #1e40af;
  line-height: 1.5;
}
.card-warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 16px;
  color: #9a3412;
  line-height: 1.55;
  font-weight: 500;
}
.card-reminder {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #854d0e;
  line-height: 1.5;
  margin-bottom: 18px;
}
.btn-proceed {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 22px;
  background: white;
  color: var(--pink);
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--pink);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-proceed:hover { background: var(--pink-light); }
.proceed-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Field blocks (Target Ancestor, DNA Tester) */
.field-block {
  margin-bottom: 18px;
}
.field-title {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.field-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
}
.gen-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--gray-500);
}

/* Candidates section */
.candidates {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}
.candidates-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 14px;
}
.candidate {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
}
.candidate:last-child { margin-bottom: 0; }
.candidate-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.candidate-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--gray-900);
}
.badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-verified   { background: #dcfce7; color: #166534; }
.badge-borderline { background: #fef9c3; color: #854d0e; }
.badge-flagged    { background: #fee2e2; color: #991b1b; }

.candidate-stat-line {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.candidate-field {
  font-size: 16px;
  color: var(--gray-700);
  margin-bottom: 8px;
}
.mini-title {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pink);
  margin-right: 4px;
}
.candidate-reasoning {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  margin-top: 8px;
}

/* "More matches to check" prompt */
.more-matches {
  margin-top: 22px;
  background: var(--pink-light);
  border: 1px solid var(--pink);
  border-radius: 10px;
  padding: 18px 20px;
}
.more-matches-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 8px;
}
.more-matches p {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 8px;
}
.more-matches ul {
  margin: 8px 0 12px 20px;
}
.more-matches li {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

/* ── CP2 progress bar (3 steps) ──────────────────────────────────────────── */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.progress-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: background .2s, color .2s;
}
.progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}
.progress-step.active .progress-num { background: var(--pink); color: #fff; }
.progress-step.active .progress-label { color: var(--pink-dark); }
.progress-step.complete .progress-num { background: var(--green); color: #fff; }
.progress-step.complete .progress-label { color: var(--gray-700); }
.progress-line {
  flex: 1 1 auto;
  max-width: 110px;
  height: 3px;
  background: var(--gray-200);
  margin: 0 10px 28px;
  border-radius: 2px;
  transition: background .2s;
}
.progress-line.filled { background: var(--green); }

/* ── Example image placeholder ───────────────────────────────────────────── */
.example-box {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  background: var(--gray-50);
}
.example-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pink);
  margin-bottom: 6px;
}
.example-desc {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ── Single-image preview (shown in place of the upload box) ──────────────── */
.single-preview:not(:empty) { margin-bottom: 8px; }
.single-preview-item {
  display: block;
  width: 100%;
  max-width: 520px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.single-preview-item img { display: block; width: 100%; }

/* ── Tool goal-context line + interstitial ───────────────────────────────── */
.goal-context {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink-dark);
  background: var(--pink-light);
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
}
.interstitial { border-left: 5px solid var(--pink); }

/* ── Goal creation sentence ──────────────────────────────────────────────── */
.goal-sentence {
  font-size: 21px;
  line-height: 2.1;
  color: var(--gray-900);
  font-weight: 500;
}
.goal-sentence select,
.goal-sentence .goal-input {
  font-size: 18px;
  padding: 6px 12px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  color: var(--pink-dark);
  font-weight: 700;
  background: var(--pink-light);
}
.goal-sentence select:focus,
.goal-sentence .goal-input:focus { outline: none; border-color: var(--pink); }
.goal-sentence .goal-input { min-width: 180px; }

/* ── Dashboard: active goal banner ───────────────────────────────────────── */
.goal-banner {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 5px solid var(--pink);
  padding: 22px 26px;
  margin-bottom: 30px;
}
.goal-banner-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink);
  margin-bottom: 8px;
}
.goal-banner-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.goal-banner-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.45;
}
.goal-switch {
  font-size: 14px;
  color: var(--gray-500);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.goal-switch:hover { color: var(--pink); }

.zone-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}
.zone-title-sub { margin-top: 40px; font-size: 18px; color: var(--gray-700); }

/* ── Checkpoint cards ────────────────────────────────────────────────────── */
.checkpoint-cards { display: grid; gap: 16px; }
.checkpoint-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.checkpoint-card:hover { border-color: var(--pink); box-shadow: 0 4px 20px rgba(232,0,110,0.12); }
.cp-status-dot {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gray-200);
}
.cp-status-dot.grey { background: var(--gray-200); }
.cp-status-dot.pink { background: var(--pink); }
.cp-status-dot.green { background: var(--green); }
.cp-card-body { display: flex; flex-direction: column; gap: 3px; }
.cp-card-name { font-size: 19px; font-weight: 700; color: var(--gray-900); }
.cp-card-state { font-size: 14px; color: var(--gray-500); }

/* ── All goals ───────────────────────────────────────────────────────────── */
.all-goals { display: flex; flex-direction: column; gap: 12px; }
.goal-row {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px 18px;
}
.goal-row.active { border-color: var(--pink); background: var(--pink-light); }
.goal-row-text { font-size: 16px; color: var(--gray-900); line-height: 1.5; margin-bottom: 8px; }
.goal-row-meta { display: flex; align-items: center; gap: 14px; }
.goal-row-status { font-size: 14px; font-weight: 600; color: var(--gray-500); }
.goal-row-active {
  font-size: 13px; font-weight: 700; color: var(--pink-dark);
  background: white; border: 1px solid var(--pink); border-radius: 999px; padding: 2px 12px;
}
.goal-row-activate { font-size: 14px; color: var(--pink); cursor: pointer; text-decoration: underline; }

/* ── Step 0 choice row ───────────────────────────────────────────────────── */
.choice-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.choice-row .btn-secondary { min-width: 110px; text-align: center; }
.btn-secondary.chosen {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

/* ── Confirmation gate: expected statements ──────────────────────────────── */
.expect-block {
  margin: 6px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.expect-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--pink);
  border-radius: 8px;
  padding: 14px 18px;
}
.expect-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pink-dark);
  margin-bottom: 6px;
}
.expect-text {
  font-size: 16px;
  color: var(--gray-900);
  line-height: 1.55;
}

/* ── Correction paths ────────────────────────────────────────────────────── */
.correction-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
}
.correction-detail { margin-top: 8px; }
.correction-detail p { font-size: 15px; color: var(--gray-700); line-height: 1.55; margin-bottom: 10px; }
.correction-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 18px;
}
.correction-note a { margin-top: 4px; }

/* ── Verify labeled tree ─────────────────────────────────────────────────── */
.verify-image {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray-50);
  margin-bottom: 14px;
}
.verify-image img { display: block; width: 100%; }
.verify-unmatched .map-note {
  font-size: 14px;
  color: var(--gray-700);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  line-height: 1.5;
}
/* ── Label → couple table (grouped by generation) ────────────────────────── */
.label-table { margin-bottom: 16px; }
.lt-gen { margin-bottom: 16px; }
.lt-gen-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pink-dark);
  margin-bottom: 8px;
}
.lt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 8px;
  background: white;
}
.lt-row.selected {
  border-color: var(--pink);
  background: var(--pink-light);
}
.lt-dot {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
}
.lt-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-label { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.lt-couple { font-size: 14px; color: var(--gray-500); }
.lt-tag {
  flex: 0 0 auto;
  font-size: 12px; font-weight: 700;
  color: var(--pink-dark);
  background: white;
  border: 1px solid var(--pink);
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}

/* ── Declaration correction banner (declared label ≠ initial network) ─────── */
.decl-correction {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: #9a3412;
}

/* ── Directed self-report choices (Step 4) ──────────────────────────────── */
.sr-why {
  display: block;
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--pink-light);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-700);
}
.self-report-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.self-report-opt {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.45;
  white-space: normal;
}

/* collapsible original-tree reference */
.tree-ref {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 6px 14px;
  margin-bottom: 16px;
  background: var(--gray-50);
}
.tree-ref > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink);
  padding: 6px 0;
  list-style: none;
}
.tree-ref > summary::-webkit-details-marker { display: none; }
.tree-ref .verify-image { margin: 10px 0 6px; }

/* ── Step actions / batch cards ──────────────────────────────────────────── */
.step-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}
.batch-card { margin-bottom: 20px; }
.batch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.batch-num {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}
.batch-network {
  background: var(--pink-light);
  color: var(--pink-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 3px 12px;
  border-radius: 999px;
}

/* ── Two-column working layout (screen 2) ────────────────────────────────── */
.work-layout { display: block; }

@media (min-width: 900px) {
  .page.screen2-active { max-width: 1060px; }
  .tool-header p { max-width: 660px; }
  .work-layout.has-checklist {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
  }
  .work-aside {
    position: sticky;
    top: 16px;
  }
}

/* ── BKM checklist ───────────────────────────────────────────────────────── */
.checklist-card { margin-bottom: 0; }
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.checklist-item.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.check-box {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  border: 2px solid var(--gray-200);
  background: white;
  color: white;
}
.checklist-item.done .check-box {
  background: var(--green);
  border-color: var(--green);
}
.checklist-item.pending .check-box {
  border-style: dashed;
}
.check-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.check-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}
.check-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}
.checklist-item.done .check-status { color: #166534; }
.checklist-item.pending .check-status { color: var(--pink-dark); }

/* ── Manual BKM entry ────────────────────────────────────────────────────── */
.manual-add {
  margin: 8px 0 24px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-50);
}
.manual-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.manual-help {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.manual-grid .field { margin-bottom: 0; }
.manual-grid select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 16px;
  color: var(--gray-900);
  background: white;
}
.manual-grid select:focus { outline: none; border-color: var(--pink); }
.manual-list {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manual-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
}
.manual-item-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.manual-item-text strong { font-size: 16px; color: var(--gray-900); }
.manual-item-meta { font-size: 13px; color: var(--gray-500); }
.manual-remove {
  flex: 0 0 auto;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 13px;
}
.manual-remove:hover { background: #fee2e2; color: #991b1b; }

@media (max-width: 560px) {
  .manual-grid { grid-template-columns: 1fr; }
}

/* ── Confirm actions ─────────────────────────────────────────────────────── */
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* ── Consolidated list ───────────────────────────────────────────────────── */
.consolidated-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 22px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--gray-700);
}
.consolidated-summary .cs-label {
  font-weight: 700;
  color: var(--gray-500);
  display: inline-block;
  min-width: 200px;
}
.cons-group { margin-bottom: 22px; }
.cons-group-title {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.grp-verified   .cons-group-title { background: #dcfce7; color: #166534; }
.grp-borderline .cons-group-title { background: #fef9c3; color: #854d0e; }
.grp-flagged    .cons-group-title { background: #fee2e2; color: #991b1b; }
.cons-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.cons-row-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
}
.cons-row-meta {
  font-size: 15px;
  color: var(--gray-500);
}
.final-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.final-actions .btn-primary,
.final-actions .btn-secondary { width: auto; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { font-size: 17px; }
  .tool-header h1 { font-size: 22px; }
  .form-section { padding: 20px; }
  .btn-primary { font-size: 17px; padding: 14px; }
  .field-value { font-size: 18px; }
  .candidate-name { font-size: 17px; }
  .consolidated-summary .cs-label { min-width: 0; display: block; }
}

/* ── Brand carry-through (dashboard-matching) ─────────────────────────────── */
:root { --pink: #EC0C8D; }
body { font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif; background: #F7F5EE; }
h1, h2, .tool-name, .home-intro h1, .zone-title, .cp-card-name, .tool-header h1 {
  font-family: "Fraunces", Georgia, serif;
}
.site-header { border-bottom: none; background: #fff; }
.site-header .inner { max-width: 960px; }
.hdr-logo { height: 40px; width: auto; display: block; }
.site-header .tool-name { font-size: 14px; color: var(--gray-500); font-weight: 500; margin-top: 2px; }
.brand-stripe { height: 10px; width: 100%; background: var(--pink); margin-bottom: 24px; }
.back { color: var(--pink); font-weight: 600; text-decoration: none; font-size: 14px; }
.back:hover { text-decoration: underline; }

/* Per-tool accent: Best Known Match Validator = blue, Network = orange.
   Re-themes the whole tool by swapping the --pink accent token. */
body.theme-blue   { --pink: #34a6de; --pink-dark: #2a86b3; --pink-light: #e3f2fb; }
body.theme-orange { --pink: #FF4C00; --pink-dark: #c93b00; --pink-light: #ffe6dc; }

/* Review-saved-results panel (on the already-completed interstitial) */
.review-results { margin-top: 18px; }
.review-h { font-family: "Fraunces", Georgia, serif; font-size: 15px; margin: 16px 0 8px; color: var(--pink-dark); }
.review-row { padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 6px; font-size: 15px; color: var(--gray-900); }
.review-row b { color: var(--gray-900); }

/* ── Screenshot helper (reusable) — accent follows the tool theme (--pink) ─── */
.ssh { border: 1px solid var(--gray-200); border-radius: 12px; margin-bottom: 22px; background: #fff; overflow: hidden; }
.ssh-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--pink-light); border: none; padding: 15px 18px; font-size: 16px; font-weight: 600; font-family: inherit; color: var(--pink-dark); cursor: pointer; text-align: left; min-height: 44px; }
.ssh-chev { width: 22px; height: 22px; flex-shrink: 0; transition: transform .2s; }
.ssh.is-open .ssh-chev { transform: rotate(180deg); }
.ssh-panel { padding: 20px 18px 22px; }
.ssh-os { display: inline-flex; border: 1.5px solid var(--pink); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.ssh-os-btn { background: #fff; border: none; padding: 10px 24px; font-size: 15px; font-weight: 600; font-family: inherit; color: var(--pink-dark); cursor: pointer; min-height: 44px; }
.ssh-os-btn.is-on { background: var(--pink); color: #fff; }
.ssh-clip-wrap { margin-bottom: 18px; }
.ssh-clip { width: 100%; max-width: 520px; border-radius: 10px; border: 1px solid var(--gray-200); display: block; }
.ssh-clip-fallback { max-width: 520px; padding: 44px; text-align: center; background: var(--gray-100); border-radius: 10px; color: var(--gray-500); font-size: 15px; }
.ssh-play { color: var(--pink); margin-right: 6px; }
.ssh-steps { list-style: none; padding: 0; margin: 0 0 14px; }
.ssh-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; margin-bottom: 13px; line-height: 1.5; }
.ssh-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.ssh-key { display: inline-block; border: 1.5px solid var(--gray-500); border-bottom-width: 3px; border-radius: 6px; padding: 2px 9px; font-family: "IBM Plex Mono", monospace; font-size: 14px; font-weight: 600; background: #fff; color: var(--gray-900); }
.ssh-plus { margin: 0 5px; color: var(--gray-500); font-weight: 700; }
.ssh-lands { font-size: 15px; color: var(--gray-700); margin: 0; }
.ssh-example { margin-top: 22px; }
.ssh-example-note { display: inline-block; color: var(--pink); line-height: 1; }
.ssh-caption { font-family: "Caveat", cursive; font-size: 27px; color: var(--pink-dark); }
.ssh-arrow { display: block; color: var(--pink); margin: -2px 0 0 40px; }
.ssh-example-img { display: block; max-width: 340px; width: 100%; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 3px 14px rgba(0,0,0,.15); }
.ssh-example-img--placeholder { height: 170px; background: var(--gray-100); border: 2px dashed var(--gray-200); box-shadow: none; display: flex; align-items: center; justify-content: center; color: var(--gray-500); font-size: 14px; }

/* Per-step example images inside the Network tool's example boxes */
.example-img { display: block; max-width: 340px; width: 100%; border-radius: 8px; border: 1px solid var(--gray-200); margin-top: 12px; }
