/* ============================================================
   Missing Middle SA — Calculator Page Styles
   ============================================================ */

/* ── Page layout ── */
.calc-page {
  min-height: calc(100vh - 60px);
  padding: 3rem 0 5rem;
  background: var(--base);
}

.calc-header {
  text-align: center;
  margin-bottom: 2rem;
}
.calc-header__title {
  font-size: clamp(28px, 5vw, 44px);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.calc-header__sub {
  font-size: 15px;
  color: var(--muted);
}

/* ── Progress bar ── */
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--green-500);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Calc card ── */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1rem;
}
.calc-card__section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ── Field hint ── */
.field-hint {
  font-size: 12px;
  color: var(--subtle);
  margin-top: 4px;
}

/* ── Disclaimer ── */
.calc-disclaimer {
  font-size: 12px;
  color: var(--subtle);
  line-height: 1.6;
  text-align: center;
  margin-top: 1rem;
}

/* ── Verdict ── */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.verdict__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
.verdict__body h2 { font-size: 17px; font-weight: 600; margin-bottom: 5px; font-family: var(--font-body); }
.verdict__body p  { font-size: 14px; line-height: 1.6; margin: 0; }

.verdict--green { background: var(--green-50); border-color: var(--green-200); }
.verdict--green .verdict__icon { background: var(--green-700); color: #fff; }
.verdict--green h2 { color: var(--green-800); }
.verdict--green p  { color: var(--green-700); }

.verdict--amber { background: var(--amber-50); border-color: #FDE68A; }
.verdict--amber .verdict__icon { background: var(--amber-600); color: #fff; }
.verdict--amber h2 { color: var(--amber-700); }
.verdict--amber p  { color: #92400E; }
.verdict--amber strong { color: var(--amber-700); }

.verdict--red { background: var(--red-100); border-color: #FECACA; }
.verdict--red .verdict__icon { background: var(--red-600); color: #fff; }
.verdict--red h2 { color: var(--red-700); }
.verdict--red p  { color: #991B1B; }

/* ── Metric cards ── */
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.metric-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.metric-card__value {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--ink);
  line-height: 1;
}
.metric-card__value--amber { color: var(--amber-600); }
.metric-card__value--red   { color: var(--red-600); }
.metric-card__value--green { color: var(--green-700); }

/* ── Bar chart ── */
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.bar-row:last-child { margin-bottom: 0; }
.bar-row__label  { font-size: 13px; color: var(--muted); width: 140px; flex-shrink: 0; }
.bar-row__track  { flex: 1; height: 7px; background: var(--base-mid); border-radius: 4px; overflow: hidden; }
.bar-row__fill   { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.bar-row__amount { font-size: 13px; font-weight: 600; color: var(--ink); width: 80px; text-align: right; flex-shrink: 0; }

/* ── Bursary list ── */
.bursary-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.bursary-item:last-child { border-bottom: none; padding-bottom: 0; }
.bursary-item:first-child { padding-top: 0; }

.bursary-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.bursary-item__body  { flex: 1; min-width: 0; }
.bursary-item__name  { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.bursary-item__desc  { font-size: 13px; color: var(--muted); line-height: 1.5; }
.bursary-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.bursary-item__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
  white-space: nowrap;
}
.bursary-item__link:hover { text-decoration: underline; }

/* ── Loan grid ── */
.loan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.loan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  position: relative;
}
.loan-card--featured { border: 2px solid var(--green-500); }
.loan-card__badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-700);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.loan-card__name { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.loan-card__sub  { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.loan-card__sub strong { color: var(--ink); }
.loan-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.loan-card__row:last-of-type { border-bottom: none; }
.loan-card__row span:first-child { color: var(--muted); }
.loan-card__row span:last-child  { font-weight: 600; color: var(--ink); }
.loan-card__cta {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--green-100);
  color: var(--green-700);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}
.loan-card__cta:hover { background: var(--green-200); text-decoration: none; }

/* ── Viral hero reveal ── */
.result-hero {
  background: linear-gradient(135deg, #0B4D2F 0%, #1D4ED8 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  color: #fff;
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.result-hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem;
}
.result-hero__count-row {
  margin-bottom: 0.25rem;
}
.result-hero__count {
  font-family: var(--font-display);
  font-size: 72px;
  color: #fff;
  line-height: 1;
  display: block;
  letter-spacing: -2px;
}
.result-hero__count-label {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
  display: block;
}
.result-hero__divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.25);
  margin: 1.5rem auto 1.25rem;
}
.result-hero__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.result-hero__amount {
  font-family: var(--font-display);
  font-size: 44px;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}
.result-hero__amount-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
  margin-bottom: 1.75rem;
}
.result-hero__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.75rem;
}
.result-hero__tag {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

/* ── Share strip ── */
.share-strip {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  font-family: var(--font-body);
}
.share-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.share-btn:active { transform: translateY(0); }
.share-btn--wa { background: #25D366; color: #fff; }
.share-btn--x  { background: #fff; color: #000; }

/* ── Social proof ── */
.social-proof {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.02em;
}

/* ── Bursary count pill ── */
.bursary-count-pill {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ── Email capture ── */
.email-capture {
  background: var(--green-700);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.email-capture__content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 6px;
}
.email-capture__content p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.email-capture__row {
  display: flex;
  gap: 10px;
}
.email-capture__row input {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  outline: none;
  width: auto;
}
.email-capture__row input::placeholder { color: rgba(255,255,255,0.45); }
.email-capture__row input:focus { border-color: rgba(255,255,255,0.7); }
.email-capture__row button {
  background: #fff;
  color: var(--green-700);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.email-capture__row button:hover { opacity: 0.9; }
.email-capture__success {
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  text-align: center;
  padding: 12px;
}

@media (max-width: 640px) {
  .calc-page { padding: 2rem 0 4rem; }
  .calc-card { padding: 1.25rem; }
  .loan-grid { grid-template-columns: 1fr; }
  .verdict { flex-direction: column; gap: 10px; }
  .bursary-item { flex-wrap: wrap; }
  .bursary-item__actions { flex-direction: row; align-items: center; }
  .email-capture__row { flex-direction: column; }
  .bar-row__label { width: 100px; font-size: 12px; }
  .bar-row__amount { width: 68px; font-size: 12px; }
  .result-hero { padding: 2rem 1.25rem 1.75rem; }
  .result-hero__count { font-size: 56px; }
  .result-hero__amount { font-size: 36px; }
  .share-strip { gap: 8px; }
  .share-btn { padding: 10px 16px; font-size: 13px; }
}
