/* ClaimKey — Eligibility Screening Styles */

.screening-app {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Screening Header */
.screening-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.screening-header .nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.screening-header .header-step {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Progress Bar */
.progress-wrap {
  padding: 0 48px;
  background: var(--bg);
}

.progress-bar {
  max-width: 640px;
  margin: 0 auto;
  height: 4px;
  background: rgba(27,77,62,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Content */
.screening-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 24px 80px;
}

/* Step Container */
.step-container {
  width: 100%;
  max-width: 640px;
  display: none;
  flex-direction: column;
  animation: stepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-container.active {
  display: flex;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.step-question {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.25;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

/* Form Elements */
.field-group {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

.field-hint {
  font-size: 13px;
  color: var(--fg-light);
  margin-top: 6px;
}

input[type="text"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 17px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--white);
  border: 1.5px solid rgba(27,77,62,0.2);
  border-radius: var(--radius);
  color: var(--fg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27,77,62,0.1);
}

input.error,
select.error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.field-error {
  font-size: 13px;
  color: #c0392b;
  margin-top: 6px;
  display: none;
}

.field-error.visible { display: block; }

/* Checkbox/Radio Group */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 1.5px solid rgba(27,77,62,0.15);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.option-item:hover {
  border-color: rgba(27,77,62,0.35);
  box-shadow: 0 2px 12px rgba(27,77,62,0.08);
}

.option-item.selected {
  border-color: var(--accent);
  background: rgba(27,77,62,0.03);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-check {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(27,77,62,0.3);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: var(--white);
}

.option-item.selected .option-check {
  border-color: var(--accent);
  background: var(--accent);
}

.option-check svg {
  opacity: 0;
  width: 12px;
  height: 12px;
  stroke: white;
  stroke-width: 3;
  transition: opacity 0.15s ease;
}

.option-item.selected .option-check svg { opacity: 1; }

.option-text { font-size: 16px; font-weight: 500; color: var(--fg); }
.option-sub { font-size: 13px; color: var(--fg-muted); margin-top: 2px; }

/* Number input with label */
.number-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .number-group { grid-template-columns: 1fr; }
}

/* Buttons */
.btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary {
  padding: 16px 36px;
  background: var(--accent);
  color: white;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(27,77,62,0.25);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27,77,62,0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  padding: 16px 24px;
  background: transparent;
  color: var(--fg-muted);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost:hover { color: var(--fg); }
.btn-ghost svg { width: 16px; height: 16px; }

/* ============ RESULTS PAGE ============ */

.results-page {
  width: 100%;
  max-width: 680px;
  animation: stepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header .step-eyebrow {
  color: var(--accent);
}

.results-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.results-sub {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.results-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 24px;
  background: rgba(27,77,62,0.05);
  border: 1px solid rgba(27,77,62,0.12);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
}

.results-summary svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
}

/* Program Cards */
.program-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.program-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.program-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(27,77,62,0.2);
}

.program-rank {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.program-info { min-width: 0; }

.program-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.program-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.program-match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #2A6B57;
  background: rgba(27,77,62,0.07);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.program-match svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.5; fill: none; }

.program-value { text-align: right; }

.program-amount {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.program-label {
  font-size: 12px;
  color: var(--fg-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Not Qualified Section */
.no-match-header {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-muted);
  margin-bottom: 12px;
  margin-top: 8px;
}

.no-match-note {
  font-size: 14px;
  color: var(--fg-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* CTA on results */
.results-cta {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-top: 8px;
}

.results-cta h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}

.results-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-gold {
  padding: 16px 40px;
  background: var(--gold);
  color: #1A1A1A;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  letter-spacing: 0.3px;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* Restart link */
.restart-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.restart-link:hover { color: var(--fg); }

/* Mobile adjustments */
@media (max-width: 768px) {
  .screening-header { padding: 16px 24px; }
  .nav-tagline { display: none; }
  .progress-wrap { padding: 0 24px; }
  .screening-content { padding: 32px 20px 60px; }

  .step-question { font-size: 24px; }

  .program-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .program-value {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .program-amount { font-size: 22px; }
  .program-label { font-size: 11px; }
  .btn-row { flex-direction: column-reverse; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .results-title { font-size: 28px; }
  .program-card { padding: 20px; }
}