/* ── Google Fonts: Nunito (Museo Sans web-safe substitute) ── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

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

/* ── Brand tokens ── */
:root {
  --cyan:       #00B8E0;
  --cyan-dk:    #0099BB;
  --cyan-lt:    #E6F8FD;
  --orange:     #F89818;
  --orange-lt:  #FEF4E6;
  --magenta:    #D81078;
  --magenta-lt: #FCE4F1;
  --lime:       #B8D830;
  --lime-lt:    #F4FAE3;
  --gold:       #C9930A;
  --gold-dk:    #9A6F05;
  --gold-lt:    #FBF1D6;
  --black:      #1A1A2E;
  --white:      #FFFFFF;
  --muted:      #6B7280;
  --border:     #E5E7EB;
  --bg:         #F7FAFB;
  --radius:     10px;
  --shadow:     0 1px 6px rgba(0,184,224,0.10);
}

/* ── Base ── */
body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 16px;
}

/* ── Header ── */
header {
  background: var(--white);
  border-bottom: 3px solid var(--cyan);
  padding: 1.25rem 2rem;
}
.header-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header-logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
}
.header-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}
.header-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
}
.header-text p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.badge {
  display: inline-block;
  background: var(--cyan-lt);
  color: var(--cyan-dk);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.15rem 0.65rem;
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--cyan);
}

/* ── Layout ── */
main {
  max-width: 820px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

/* ── Progress ── */
.progress-wrap { margin-bottom: 1.75rem; }
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.progress-bar-bg {
  background: var(--border);
  border-radius: 20px;
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  border-radius: 20px;
  transition: width 0.4s ease;
}

/* ── Step dots ── */
.step-indicator { display: flex; gap: 0.45rem; justify-content: center; margin-bottom: 1.5rem; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: background 0.3s; }
.step-dot.active { background: var(--cyan); }
.step-dot.done   { background: var(--lime); }

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg);
}
.step-icon {
  width: 36px; height: 36px;
  background: var(--cyan);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.card-header h2 { font-size: 1.1rem; font-weight: 800; color: var(--black); }
.card-header p  { font-size: 0.82rem; color: var(--muted); }

/* ── Form elements ── */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--black);
}
.field .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.95rem;
  font-family: 'Nunito', sans-serif;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,184,224,0.15);
}

/* ── Radio group ── */
.radio-group { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 0.45rem 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}
.radio-group label:has(input:checked) {
  border-color: var(--cyan);
  background: var(--cyan-lt);
}
.radio-group input[type="radio"] { accent-color: var(--cyan); }

/* ── Income row ── */
.income-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.income-row .or-divider {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.income-row .or-divider::before,
.income-row .or-divider::after {
  content: ''; flex: 1; border-top: 1px solid var(--border);
}

/* ── Sub-field ── */
.sub-field {
  display: none;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--cyan-lt);
  border-radius: 7px;
  border-left: 3px solid var(--cyan);
}
.sub-field.visible { display: block; }

/* ── Buttons ── */
.btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
button {
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 7px;
  font-size: 0.9rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
button:active { transform: scale(0.98); }
.btn-primary   { background: var(--cyan);   color: var(--white); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--white);  color: var(--black); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-accent    { background: var(--orange); color: var(--white); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-print     { background: var(--white);  color: var(--black); border: 1.5px solid var(--border); }
.btn-print:hover { background: var(--bg); }

/* ── Results ── */
#results { display: none; }

.result-eligible {
  background: linear-gradient(135deg, var(--cyan-lt), #D0F2FB);
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.result-eligible .amount {
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--cyan-dk);
  letter-spacing: -0.03em;
}
.result-eligible .label {
  font-size: 0.95rem;
  color: var(--cyan-dk);
  font-weight: 600;
  margin-top: 0.3rem;
}

.result-ineligible {
  background: var(--magenta-lt);
  border: 2px solid var(--magenta);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.result-ineligible h3 { color: var(--magenta); margin-bottom: 0.5rem; font-weight: 800; }
.result-ineligible p  { color: var(--black); font-size: 0.9rem; }

/* ── Breakdown table ── */
.breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.breakdown-table th {
  background: var(--bg);
  text-align: left;
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.breakdown-table td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--bg); }
.breakdown-table tr:last-child td { border-bottom: none; }
.breakdown-table .total-row td { font-weight: 700; border-top: 2px solid var(--border); }
.text-right  { text-align: right; }
.text-cyan   { color: var(--cyan-dk); }
.text-red    { color: var(--magenta); }
.text-muted  { color: var(--muted); }

/* ── Comparison table ── */
.comparison-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.comparison-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 0.35rem;
}
.comparison-card .sub-title {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.comparison-table th {
  padding: 0.6rem 0.9rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-align: right;
}
.comparison-table th:first-child { text-align: left; }
.comparison-table th.col-actual  { background: var(--cyan-lt);   color: var(--cyan-dk);  border-radius: 6px 6px 0 0; }
.comparison-table th.col-max     { background: var(--orange-lt); color: var(--orange);   border-radius: 6px 6px 0 0; }
.comparison-table th.col-label   { background: var(--bg);        color: var(--muted); }
.comparison-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--bg);
  text-align: right;
}
.comparison-table td:first-child { text-align: left; color: var(--muted); font-size: 0.85rem; }
.comparison-table .total-row td  { font-weight: 800; border-top: 2px solid var(--border); }
.comparison-table .total-row td:first-child { color: var(--black); }
.col-actual-val { color: var(--cyan-dk); font-weight: 600; }
.col-max-val    { color: var(--orange);  font-weight: 600; }
.bolsillo-row td {
  background: var(--cyan-lt);
  border-top: 2px solid var(--cyan);
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
}
.bolsillo-row td:first-child { color: var(--black); }
.bolsillo-row td:not(:first-child) { color: var(--cyan-dk); font-size: 1rem; }
.comparison-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--lime-lt);
  border-radius: 7px;
  border-left: 3px solid var(--lime);
  line-height: 1.5;
}
.comparison-note strong { color: var(--black); }

/* ── Disclaimer ── */
.disclaimer {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.1rem 1.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.disclaimer strong { color: var(--black); }

/* ── ADSEF Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
}
.contact-item {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}
.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.contact-item a { color: var(--cyan-dk); text-decoration: none; font-weight: 600; }
.contact-item a:hover { text-decoration: underline; }

/* ── Step visibility ── */
.step { display: none; }
.step.active { display: block; }

/* ── Results: outside <main>, needs own centering ── */
#results {
  display: none;
  max-width: 820px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .card, .comparison-card { padding: 1.25rem; }
  .income-row { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .btn-row { flex-direction: column; }
  button { width: 100%; text-align: center; }
  .header-inner { flex-wrap: wrap; gap: 0.75rem; }
  .header-divider { display: none; }
  .result-eligible .amount { font-size: 2.25rem; }
}

/* ══════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════ */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Hide everything except the print doc and results */
  header, .progress-wrap, .step-indicator, .step { display: none !important; }
  .btn-row { display: none !important; }
  main { display: none !important; }

  /* Show the print document first, then results */
  #printDoc { display: block !important; padding: 1.5rem 2rem 0; }
  #results  {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 2rem 2rem !important;
  }

  body { background: #fff; font-size: 11pt; margin: 0; padding: 0; }

  .result-eligible,
  .result-ineligible,
  .comparison-card,
  .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }

  /* Print header */
  .print-header {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #00B8E0;
  }
  .print-header img { height: 48px; }
  .print-header h1  { font-size: 13pt; font-weight: 800; line-height: 1.3; }
  .print-header p   { font-size: 9pt; color: #666; }

  /* Section titles */
  .print-section-title {
    font-size: 14pt;
    font-weight: 800;
    color: #00B8E0;
    margin: 0 0 1rem;
  }
  .print-sub-label {
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0099BB;
    font-weight: 700;
    margin: 0 0 0.4rem;
  }

  /* Answer summary table */
  .print-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    margin-bottom: 1.5rem;
  }
  .print-summary-table th {
    background: #E6F8FD;
    padding: 6px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #0099BB;
  }
  .print-summary-table td { padding: 5px 10px; border-bottom: 1px solid #eee; }
  .print-summary-table td:first-child { color: #6B7280; width: 55%; }
  .print-summary-table td:last-child  { font-weight: 600; }
}

/* Hidden until print */
#printDoc { display: none; }

/* ── TANF status banners ── */
.tanf-status-eligible {
  background: var(--orange-lt);
  border: 2px solid var(--orange);
}
.tanf-status-eligible strong { color: var(--black); }
.tanf-status-eligible span   { color: var(--muted); }

.tanf-status-ineligible {
  background: var(--bg);
  border: 2px solid var(--border);
}
.tanf-status-ineligible strong { color: var(--muted); }
.tanf-status-ineligible span   { color: var(--muted); }

/* ── Checkbox group (WIC categories) ── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}
.checkbox-group input[type="checkbox"] {
  margin-top: 0.18rem;
  accent-color: var(--cyan-dk);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.hint-inline {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

/* ══════════════════════════════════════════════
   MENÚ DE PROGRAMAS (página inicial)
══════════════════════════════════════════════ */
.menu-intro {
  text-align: center;
  margin: 0.5rem auto 2rem;
  max-width: 620px;
}
.menu-intro h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 0.4rem;
}
.menu-intro p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  justify-content: center;
}
.program-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-top: 4px solid var(--accent, var(--cyan));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  color: var(--black);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.program-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(26,26,46,0.12);
  border-color: var(--accent, var(--cyan));
}
.program-card .program-abbr {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent, var(--cyan));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.program-card h3 {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}
.program-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  flex-grow: 1;
}
.program-card .program-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent, var(--cyan));
}
.program-card.accent-cyan    { --accent: var(--cyan); }
.program-card.accent-lime    { --accent: var(--lime); }
.program-card.accent-lime .program-abbr { color: var(--black); }
.program-card.accent-lime .program-cta  { color: #7A9410; }
.program-card.accent-orange  { --accent: var(--orange); }
.program-card.accent-magenta { --accent: var(--magenta); }
.program-card.accent-cyandk  { --accent: var(--cyan-dk); }
.program-card.accent-gold    { --accent: var(--gold); }
.program-card.accent-gold .program-cta { color: var(--gold-dk); }

/* Pequeña insignia "Propuesta" para tarjetas / encabezados de módulos no validados */
.program-card .card-pill {
  position: absolute; top: 0.9rem; right: 0.9rem;
}
.program-card { position: relative; }
.pill-propuesta {
  display: inline-block;
  background: var(--gold-lt);
  color: var(--gold-dk);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  border: 1.5px solid var(--gold);
}

/* ══════════════════════════════════════════════
   MÓDULO PROPUESTA (EITC / Crédito por Trabajo)
══════════════════════════════════════════════ */
/* Insignia PROPUESTA para el encabezado de la calculadora */
.badge-propuesta {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 800;
  border-radius: 20px;
  padding: 0.18rem 0.7rem;
  margin-top: 0.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Banner prominente "módulo propuesto, pendiente de validación" */
.propuesta-banner {
  background: var(--gold-lt);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin-bottom: 1.5rem;
  font-size: 0.83rem;
  color: var(--black);
  line-height: 1.55;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.propuesta-banner .pb-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
}
.propuesta-banner strong { color: var(--gold-dk); }

/* Resultado elegible en tono dorado (calculadora propuesta) */
.result-eligible.gold {
  background: linear-gradient(135deg, var(--gold-lt), #F6E7B8);
  border-color: var(--gold);
}
.result-eligible.gold .amount,
.result-eligible.gold .label { color: var(--gold-dk); }

/* Tarjeta de resultado dorada en el cuestionario unificado */
.result-card.accent-gold { --accent: var(--gold); }

/* ── Enlace de regreso al menú ── */
.back-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan-dk);
  text-decoration: none;
  margin-bottom: 1rem;
}
.back-link:hover { text-decoration: underline; }

@media print {
  .back-link, .menu-grid, .menu-intro { display: none !important; }
}

/* ── WIC status banners ── */
.wic-status-banner {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.wic-status-banner strong { font-size: 0.97rem; font-weight: 800; }
.wic-status-banner span   { font-size: 0.85rem; }

.wic-status-eligible {
  background: var(--lime-lt);
  border: 2px solid var(--lime);
}
.wic-status-eligible strong { color: var(--black); }
.wic-status-eligible span   { color: var(--muted); }

.wic-status-ineligible {
  background: var(--magenta-lt);
  border: 2px solid var(--magenta);
}
.wic-status-ineligible strong { color: var(--magenta); }
.wic-status-ineligible span   { color: var(--black); }
