/* Soporte en Aula - Formulario de Reporte y Diagnóstico (HUB CTA) */
.cuaad-form-wrap {
  font-family: Arial, Helvetica, sans-serif;
  color: #1E293B;
  background-color: #FFFFFF;
  line-height: 1.5;
  box-sizing: border-box;
  padding: 0 0 35px 0;
  margin: 24px auto 40px auto;
  width: 100%;
  max-width: 880px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  border: 1px solid #E2E8F0;
}
.cuaad-form-wrap * { box-sizing: border-box; }

/* HERO HEADER */
.cfm-hero {
  background: linear-gradient(135deg, #1E293B 0%, #334155 50%, #475569 100%);
  color: #FFFFFF;
  padding: 30px 32px 24px 32px;
  border-bottom: 4px solid var(--cta-accent);
}
.cfm-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #F8D59A;
  margin-bottom: 8px;
}
.cfm-hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}
.cfm-hero__title {
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  line-height: 1.25;
}
.cfm-hero__subtitle {
  font-size: 14px;
  color: #CBD5E1;
  max-width: 780px;
  margin: 0;
  line-height: 1.45;
}

/* STEPPER */
.cfm-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  padding: 16px 32px;
  border-bottom: 1px solid #E2E8F0;
}
.cfm-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 600;
}
.cfm-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid #CBD5E1;
  transition: all 0.2s ease;
}
.cfm-step-item.is-active { color: #1E293B; font-weight: 700; }
.cfm-step-item.is-active .cfm-step-num {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}
.cfm-step-item.is-completed { color: #047857; }
.cfm-step-item.is-completed .cfm-step-num {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
}
.cfm-step-divider {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin: 0 12px;
}

/* BODY */
.cfm-body { padding: 28px 32px; }
.cfm-step-content { display: none; }
.cfm-step-content.is-visible { display: block; animation: cfmFadeIn 0.25s ease; }
@keyframes cfmFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.cfm-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 4px 0;
}
.cfm-section-desc {
  font-size: 13.5px;
  color: #64748B;
  margin: 0 0 20px 0;
}

/* FORM ELEMENTS */
.cfm-form-group { margin-bottom: 20px; }
.cfm-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.cfm-label__req { color: #DC2626; margin-left: 2px; }
.cfm-input, .cfm-select, .cfm-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #CBD5E1;
  background-color: #FFFFFF;
  font-size: 14px;
  color: #0F172A;
  outline: none;
  transition: border-color 0.2s;
}
.cfm-input:focus, .cfm-select:focus, .cfm-textarea:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.cfm-helper-text {
  font-size: 12px;
  color: #64748B;
  margin-top: 4px;
}

/* CARDS & GRIDS */
.cfm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.cfm-choice-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cfm-choice-card:hover {
  border-color: #94A3B8;
  background: #F1F5F9;
  transform: translateY(-1px);
}
.cfm-choice-card.is-selected {
  border-color: #0284C7;
  background: #F0F9FF;
  box-shadow: 0 0 0 2px #0284C7;
}
.cfm-choice-card__icon { font-size: 24px; margin-bottom: 4px; }
.cfm-choice-card__title { font-size: 13.5px; font-weight: 700; color: #0F172A; }
.cfm-choice-card__desc { font-size: 12px; color: #64748B; line-height: 1.35; }

/* AUTO-FILTRADO DE TICKETS ACTIVOS */
.cfm-active-tickets-box {
  margin-top: 14px;
  border-radius: 10px;
  padding: 16px;
  border: 1.5px solid #FCD34D;
  background: #FFFBEB;
  animation: cfmFadeIn 0.3s ease;
}
.cfm-active-tickets-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.cfm-active-tickets-icon { font-size: 24px; line-height: 1; }
.cfm-active-tickets-title {
  font-size: 14px;
  font-weight: 800;
  color: #92400E;
  margin: 0 0 2px 0;
}
.cfm-active-tickets-subtitle {
  font-size: 12.5px;
  color: #B45309;
  margin: 0;
}
.cfm-active-tickets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.cfm-ticket-pill {
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
}
.cfm-ticket-pill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.cfm-ticket-folio {
  font-family: monospace;
  font-weight: 700;
  color: #1E293B;
}
.cfm-badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #FEF3C7;
  color: #92400E;
  text-transform: uppercase;
}
.cfm-ticket-desc { color: #475569; }
.cfm-ticket-meta { font-size: 11.5px; color: #94A3B8; margin-top: 2px; }

.cfm-active-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cfm-active-tickets-clear {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cfm-field-help {
  margin: 7px 0 0;
  color: #64748b;
  font-size: .84rem;
}

.cfm-active-tickets--warning {
  display: block;
  margin: 14px 0 4px;
  padding: 14px 16px;
  border: 1px solid #f3c66b;
  border-radius: 10px;
  background: #fff9eb;
  color: #604214;
}

.cfm-active-tickets--warning p { margin: 5px 0 7px; }
.cfm-active-tickets--warning ul { margin: 0; padding-left: 20px; }

/* SUB-DIAGNOSTICO CHIPS */
.cfm-subdiag-box {
  margin-top: 22px;
  padding: 18px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
}
.cfm-subdiag-title {
  font-size: 14px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cfm-chip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cfm-symptom-chip {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cfm-symptom-chip:hover {
  border-color: #0284C7;
  background: #F0F9FF;
}
.cfm-symptom-chip.is-selected {
  border-color: #0284C7;
  background: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* SOLUCIÓN RÁPIDA (30 SEGUNDOS) */
.cfm-troubleshoot-box {
  margin-top: 20px;
  border: 1.5px solid #38BDF8;
  background: #F0F9FF;
  border-radius: 10px;
  padding: 20px;
  display: none;
  animation: cfmFadeIn 0.3s ease;
}
.cfm-troubleshoot-header {
  font-size: 14.5px;
  font-weight: 800;
  color: #0369A1;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cfm-troubleshoot-body {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}
.cfm-troubleshoot-img {
  flex-shrink: 0;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #BAE6FD;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfm-troubleshoot-steps {
  flex: 1;
  font-size: 13px;
  color: #0F172A;
  line-height: 1.5;
}
.cfm-troubleshoot-steps ol {
  margin: 0;
  padding-left: 20px;
}
.cfm-troubleshoot-steps li {
  margin-bottom: 6px;
}
.cfm-troubleshoot-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #BAE6FD;
  padding-top: 14px;
}
.cfm-btn-fixed {
  background: #10B981;
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.cfm-btn-fixed:hover { background: #059669; }
.cfm-btn-still-broken {
  background: #FFFFFF;
  color: #0369A1;
  border: 1.5px solid #0284C7;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.cfm-btn-still-broken:hover { background: #E0F2FE; }

/* FELICITACION AUTO-RESUELTO */
.cfm-self-resolved-card {
  margin-top: 20px;
  padding: 24px;
  background: #F0FDF4;
  border: 2px solid #86EFAC;
  border-radius: 12px;
  text-align: center;
  display: none;
  animation: cfmFadeIn 0.3s ease;
}

/* REDIRECCIÓN A SERVICIOS GENERALES */
.cfm-redirect-card {
  margin-top: 20px;
  padding: 20px;
  background: #FFF1F2;
  border: 1.5px solid #FDA4AF;
  border-radius: 10px;
  display: none;
  animation: cfmFadeIn 0.3s ease;
}
.cfm-redirect-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cfm-redirect-icon { font-size: 24px; }
.cfm-redirect-title {
  font-size: 15px;
  font-weight: 800;
  color: #9F1239;
  margin: 0;
}
.cfm-redirect-desc {
  font-size: 13px;
  color: #881337;
  line-height: 1.45;
  margin: 0 0 14px 0;
}
.cfm-contact-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  font-size: 12.5px;
}
.cfm-contact-table th, .cfm-contact-table td {
  padding: 8px 12px;
  border: 1px solid #FECDD3;
  text-align: left;
}
.cfm-contact-table th { background: #FFE4E6; color: #9F1239; font-weight: 700; }

.cfm-energy-triage { margin-top: 18px; padding: 18px; border: 1px solid #CBD5E1; border-radius: 10px; background: #F8FAFC; }
.cfm-energy-triage h3, .cfm-energy-route h4 { margin: 0 0 8px; color: #082F49; }
.cfm-energy-triage > p, .cfm-energy-route p { line-height: 1.5; }
.cfm-energy-options { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; border: 0; }
.cfm-energy-options legend { margin-bottom: 8px; font-weight: 700; }
.cfm-energy-options label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #CBD5E1; border-radius: 8px; background: #fff; cursor: pointer; }
.cfm-energy-options input { flex: 0 0 auto; margin-top: 3px; accent-color: #075985; }
.cfm-energy-route { margin-top: 14px; padding: 16px; border: 1px solid #7DD3FC; border-radius: 8px; background: #F0F9FF; }
.cfm-energy-route--redirect { border-color: #CBD5E1; background: #fff; }
.cfm-energy-route--urgent { border: 2px solid #E11D48; background: #FFF1F2; }
.cfm-energy-route--urgent h4 { color: #9F1239; }
.cfm-energy-contacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cfm-energy-contacts a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid #94A3B8; border-radius: 7px; color: #075985; font-weight: 700; text-decoration: underline; }
.cfm-energy-route--urgent .cfm-energy-contacts a { border-color: #BE123C; color: #9F1239; }
.cfm-energy-triage [hidden], .cfm-energy-route[hidden] { display: none !important; }
@media (max-width: 600px) { .cfm-energy-contacts { flex-direction: column; } .cfm-energy-contacts a { justify-content: center; } }

/* BOTONES STEPPER */
.cfm-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}
.cfm-btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.cfm-btn--primary {
  background: #0284C7;
  color: #FFFFFF;
}
.cfm-btn--primary:hover { background: #0369A1; }
.cfm-btn--gold {
  background: var(--cta-accent);
  color: #FFFFFF;
}
.cfm-btn--gold:hover { background: #B45309; }
.cfm-btn--outline {
  background: #FFFFFF;
  color: #475569;
  border: 1.5px solid #CBD5E1;
}
.cfm-btn--outline:hover { background: #F1F5F9; }
.cfm-btn--sm {
  padding: 6px 12px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .cfm-hero { padding: 20px 18px; }
  .cfm-body { padding: 20px 18px; }
  .cfm-stepper { padding: 12px 18px; }
  .cfm-step-label { display: none; }
  .cfm-troubleshoot-body { flex-direction: column; text-align: center; }
  .cfm-active-actions { flex-direction: column; }
}

/* HUB identity and accessible interaction. */
.cuaad-form-wrap{width:calc(100% - 40px);max-width:940px;color:var(--cta-ink);border-color:var(--cta-line);box-shadow:none;border-radius:12px}
.hub-form-back{display:block;padding:24px 32px 0;font-size:14px}
.cfm-hero{background:var(--cta-surface);color:var(--cta-ink);border-bottom:1px solid var(--cta-line);padding:24px 32px}
.cfm-hero__eyebrow{color:var(--cta-accent);font-size:11px}.cfm-hero__eyebrow-dot{display:none}
.cfm-hero__title{color:var(--cta-ink);font-size:clamp(26px,3vw,38px);font-weight:600;letter-spacing:-.035em}
.cfm-hero__subtitle{color:var(--cta-muted);font-size:15px;line-height:1.6;margin-top:12px}
.cfm-stepper{background:var(--cta-soft)}.cfm-step-item{color:var(--cta-muted)}
.cfm-step-item.is-active{color:var(--cta-ink)}.cfm-step-item.is-active .cfm-step-num{background:var(--cta-ink);border-color:var(--cta-ink);color:white}
.cfm-section-title{color:var(--cta-ink);letter-spacing:-.02em}.cfm-section-desc,.cfm-helper-text{color:var(--cta-muted)}
.cfm-input,.cfm-select,.cfm-textarea{font:inherit;min-height:44px;border:1px solid #b8c3cc;border-radius:7px;color:var(--cta-ink);background:white}
.cfm-btn{font:600 14px/1.4 Arial,Helvetica,sans-serif;min-height:44px;border-radius:7px;box-shadow:none;white-space:normal}
.cfm-btn--primary{background:var(--cta-ink);border-color:var(--cta-ink);color:#fff}.cfm-btn--primary:hover{background:var(--cta-slate);border-color:var(--cta-slate)}
.cfm-btn--outline{color:var(--cta-ink);border-color:var(--cta-line);background:#fff}
.cfm-choice-card.is-selected,.cfm-symptom-chip.is-selected{border-color:var(--cta-accent);background:var(--cta-soft);color:var(--cta-ink)}
.cfm-choice-card__icon{display:none}.cfm-input:focus,.cfm-select:focus,.cfm-textarea:focus{outline:3px solid #78517726;border-color:var(--cta-accent)}
.cuaad-form-wrap button:focus-visible,.cuaad-form-wrap a:focus-visible{outline:3px solid var(--cta-accent);outline-offset:3px}
.cfm-ticket-pill{display:grid;gap:8px}.cfm-subscription{display:grid;gap:10px;padding:14px;border-top:1px solid var(--cta-line);margin-top:12px}
.hub-form-error{padding:14px 20px;margin:20px 32px 0;background:#fff1f0;color:#842029;border:1px solid #e0a6a2;border-radius:7px}
.cfm-subscription [hidden],.hub-form-error[hidden]{display:none!important}
.cfm-step-content h2:focus{outline:none}.cfm-btn:disabled{opacity:.65;cursor:wait}
@media(max-width:600px){.cuaad-form-wrap{width:calc(100% - 24px);margin:12px auto 24px}.hub-form-back,.cfm-hero,.cfm-body{padding-left:18px;padding-right:18px}.cfm-stepper{padding:14px 12px;gap:6px}.cfm-step-item{flex-direction:column;gap:6px;text-align:center;font-size:11px;flex:1}.cfm-step-divider{display:none}.cfm-actions{flex-wrap:wrap}.cfm-actions .cfm-btn{flex:1}.hub-form-error{margin-inline:18px}}

.cfm-btn--gold{background:var(--cta-ink);color:white;border-color:var(--cta-ink)}.cfm-btn--gold:hover{background:var(--cta-slate);color:white}

/* Keep each step immediately legible and preserve mobile orientation. */
.cuaad-form-wrap [hidden] { display: none !important; }
.cfm-location-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.cfm-context { background: #f1f5f9; border-left: 3px solid #785177; padding: 14px 18px; border-radius: 4px; color: #243e50; margin: 18px 0; line-height: 1.65; }
.cfm-context pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; }
.cfm-guide { margin-top: 28px; padding: 24px; border: 1px solid #b8c3cc; border-radius: 12px; background: #fff; }
.cfm-guide h3 { font-size: 21px; line-height: 1.35; margin: 8px 0 16px; color: #002e46; }
.cfm-guide p { line-height: 1.7; }
.cfm-guide-actions { justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
.cfm-problem-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; border-bottom:1px solid #dce3e9; margin-bottom:20px; }
.cfm-connection { display:flex; align-items:center; justify-content:space-around; gap:8px; background:#f6f8fa; border-radius:8px; padding:16px 8px; margin:16px 0; font-size:13px; color:#23485b; }
.cfm-connection span { text-align:center; }
.cfm-connection svg { display:block; height:48px; width:60px; margin:0 auto 8px; fill:none; stroke:currentColor; stroke-width:2; }
.cfm-resolution { margin: 24px 0; padding: 24px; border: 1px solid #86b6a2; background: #effaf5; border-radius: 12px; color: #17533d; }
#categoryCardsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#categoryCardsGrid .cfm-choice-card { text-align: left; min-height: 76px; font-size: 16px; font-weight: 600; line-height: 1.4; justify-content: center; align-items: flex-start; }
@media (max-width: 600px) { .cfm-location-filters, #categoryCardsGrid { grid-template-columns: 1fr; } .cfm-guide { padding: 18px; } .cfm-guide-actions { flex-direction: column; align-items: stretch; } }
.cfm-step-content.is-visible { animation: none; }
@media (max-width: 600px) { .cfm-step-label { display: inline; font-size: 0.72rem; } }

/* Actions retain the Hub identity; additional color is confined to CTA buttons. */
.cuaad-form-wrap {
  --cfm-action-blue: #00658f;
  --cfm-action-blue-hover: #004e70;
  --cfm-action-gold: #f2b544;
  --cfm-action-gold-hover: #dfa02b;
  --cfm-action-green: #19734f;
  --cfm-action-green-hover: #12593d;
}
.cuaad-form-wrap .cfm-btn--primary { background: var(--cfm-action-blue); color: #fff; border-color: var(--cfm-action-blue); }
.cuaad-form-wrap .cfm-btn--primary:hover { background: var(--cfm-action-blue-hover); border-color: var(--cfm-action-blue-hover); }
.cuaad-form-wrap .cfm-btn--gold { background: var(--cfm-action-gold); color: var(--cta-ink); border: 1px solid transparent; }
.cuaad-form-wrap .cfm-btn--gold:hover { background: var(--cfm-action-gold-hover); color: var(--cta-ink); }
.cuaad-form-wrap .cfm-btn--success { background: var(--cfm-action-green); color: #fff; }
.cuaad-form-wrap .cfm-btn--success:hover { background: var(--cfm-action-green-hover); }
.cfm-eligibility { font-size: 14px; color: var(--cta-muted); line-height: 1.6; margin: 14px 0 0; max-width: 70ch; }
.cfm-section-desc { font-size: 16px; line-height: 1.6; }
.cfm-label { font-size: 15px; }
.cfm-helper-text, .cfm-field-help { font-size: 14px; line-height: 1.6; }
.cfm-search-group { position: relative; margin-bottom: 12px; }
.cfm-room-suggestions { list-style: none; margin: 8px 0; padding: 4px; max-height: 300px; overflow-y: auto; border: 1px solid var(--cta-line); border-radius: 8px; background: #fff; }
.cfm-room-suggestions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; min-height: 48px; cursor: pointer; border-radius: 5px; }
.cfm-room-suggestions li:hover, .cfm-room-suggestions li[aria-selected="true"] { background: var(--cta-soft); outline: 2px solid var(--cta-accent); outline-offset: -2px; }
.cfm-room-suggestions span { color: var(--cta-muted); font-size: 14px; }
.cfm-location-picker { margin: 8px 0; }
.cfm-location-picker summary, .cfm-review summary { padding: 10px 0; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--cta-ink); }
.cfm-location-picker .cfm-form-group { margin: 12px 0; }
.cfm-text-button { display: inline-flex; align-items: center; padding: 8px 0; min-height: 44px; border: 0; background: none; font: 600 14px/1.5 Arial, Helvetica, sans-serif; color: var(--cta-ink); text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cfm-profile-group { border: 0; padding: 0; margin: 28px 0 0; min-width: 0; }
.cfm-profile-group > .cfm-field-help { margin: 0 0 12px; }
.cfm-profile-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; min-height: 88px; border: 1px solid var(--cta-line); border-radius: 8px; cursor: pointer; background: #fff; }
.cfm-profile-card input { margin: 4px 0 0; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--cta-accent); }
.cfm-profile-card strong, .cfm-profile-card small { display: block; }
.cfm-profile-card strong { color: var(--cta-ink); font-size: 15px; }
.cfm-profile-card small { margin-top: 4px; color: var(--cta-muted); font-size: 14px; line-height: 1.5; }
.cfm-profile-card:has(input:checked) { border-color: var(--cta-accent); outline: 2px solid var(--cta-accent); outline-offset: -2px; background: var(--cta-soft); }
.cfm-profile-card:has(input:focus-visible) { outline: 3px solid var(--cta-accent); outline-offset: 3px; }
.cfm-guide-choice { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 0; margin: 8px 0 20px; }
.cfm-guide-choice h3 { margin: 0 0 6px; font-size: 18px; color: var(--cta-ink); }
.cfm-guide-choice p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--cta-muted); max-width: 46ch; }
.cfm-guide-choice .cfm-btn { flex-shrink: 0; }
.cfm-impact-group { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--cta-line); }
.cfm-review { margin: 22px 0 28px; padding: 22px; border: 1px solid var(--cta-line); border-radius: 10px; background: var(--cta-soft); }
.cfm-review h3 { margin: 0 0 14px; font-size: 16px; }
.cfm-review > strong { display: block; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.cfm-review dl { margin: 18px 0 8px; display: grid; gap: 12px; }
.cfm-review dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }
.cfm-review dt { color: var(--cta-muted); font-size: 14px; }
.cfm-review dd { margin: 0; font-size: 15px; }
.cfm-review pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.6; }
.cfm-review-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; }
.cfm-field-error { color: #842029; font-size: 14px; font-weight: 600; line-height: 1.5; margin: 8px 0 0; }
.cuaad-form-wrap [aria-invalid="true"] { border-color: #842029; }
.hub-form-error a { color: inherit; text-decoration: underline; }
.hub-form-error ul { margin: 10px 0 0; padding-left: 20px; }
.hub-form-error li + li { margin-top: 6px; }
.cfm-attachments { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.cfm-attachments li { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--cta-line); border-radius: 8px; }
.cfm-attachments img { width: 64px; height: 64px; object-fit: cover; border-radius: 5px; }
.cfm-attachments span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.cfm-submit-help { color: var(--cta-muted); font-size: 14px; line-height: 1.6; margin: 22px 0 0; }
.cfm-step-content.is-visible > .cfm-actions { margin-top: 28px; }
.cuaad-form-wrap summary:focus-visible { outline: 3px solid var(--cta-accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .cfm-hero__title { font-size: 27px; }
  .cfm-hero { padding-top: 18px; padding-bottom: 18px; }
  .cfm-eligibility { font-size: 13px; }
  .cfm-profile-group .cfm-card-grid { grid-template-columns: 1fr; }
  .cfm-guide-choice { flex-direction: column; align-items: stretch; gap: 14px; }
  .cfm-guide-choice .cfm-btn { justify-content: center; }
  .cfm-actions { flex-direction: column-reverse; align-items: stretch; }
  .cfm-actions .cfm-btn { justify-content: center; }
  .cfm-guide-actions { flex-direction: column; }
  .cfm-room-suggestions li { align-items: flex-start; flex-direction: column; gap: 2px; }
  .cfm-review { padding: 16px; }
  .cfm-review dl > div { grid-template-columns: 1fr; gap: 2px; }
  .cfm-attachments li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .cuaad-form-wrap *, .cuaad-form-wrap *::before, .cuaad-form-wrap *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Two permanent reporting channels; the chat shares the original form fields. */
.cfm-channels { padding: 20px 32px; border-bottom: 1px solid var(--cta-line); }
.cfm-channels > p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--cta-muted); }
.cfm-channel-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.cfm-channel-buttons [aria-pressed="true"] { outline: 2px solid var(--cta-ink); outline-offset: 3px; }
.cfm-assistant { padding: 26px 32px; }
.cfm-assistant h2 { margin: 0 0 10px; font-size: 23px; color: var(--cta-ink); }
.cfm-assistant header p { font-size: 15px; line-height: 1.7; color: var(--cta-muted); margin: 0 0 20px; max-width: 70ch; }
.cfm-chat-log { max-height: 290px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 16px; }
.cfm-chat-message { margin: 0; padding: 12px 16px; background: var(--cta-soft); border: 1px solid var(--cta-line); border-radius: 10px; width: fit-content; max-width: 90%; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 15px; line-height: 1.65; }
.cfm-chat-message--user { margin-left: auto; background: #fff; }
.cfm-chat-prompt { padding: 18px 0; border-top: 1px solid var(--cta-line); border-bottom: 1px solid var(--cta-line); }
.cfm-chat-prompt h3 { font-size: 17px; line-height: 1.6; margin: 0 0 16px; color: var(--cta-ink); overflow-wrap: anywhere; }
.cfm-chat-options { display: flex; flex-wrap: wrap; gap: 10px; }
.cfm-chat-options .cfm-btn { text-align: left; }
.cfm-chat-composer { padding-top: 20px; }
.cfm-chat-composer textarea { display: block; width: 100%; margin-top: 8px; resize: vertical; min-height: 88px; }
.cfm-chat-composer .cfm-helper-text { margin: 10px 0 14px; }
.cfm-assistant-review { padding: 18px 32px 0; font-size: 14px; line-height: 1.6; color: var(--cta-muted); }
.cfm-assistant h2:focus, .cfm-chat-prompt h3:focus { outline: none; }
@media(max-width:600px) {
  .cfm-channels,.cfm-assistant { padding: 18px; }
  .cfm-channel-buttons { flex-direction: column; align-items: stretch; }
  .cfm-chat-log { max-height: 220px; }
  .cfm-chat-message { max-width: 95%; }
  .cfm-chat-options { flex-direction: column; align-items: stretch; }
  .cfm-chat-options .cfm-btn { width: 100%; justify-content: center; text-align: center; }
  .cfm-assistant-review { padding: 18px 18px 0; }
  .cfm-chat-composer > .cfm-btn { width: 100%; justify-content: center; }
}

/* Conversación React: una sola superficie para búsqueda, guía y envío. */
.cfm-assistant.cfm-messenger { padding: 0; border-top: 1px solid var(--cta-line); overflow: hidden; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: #fff; border-bottom: 1px solid var(--cta-line); }
.chat-header h2 { font-size: 19px; margin: 0; color: var(--cta-ink); }
.chat-header p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--cta-muted); }
.chat-avatar { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 50%; background: var(--cta-ink); color: #fff; font-size: 12px; font-weight: 700; }
.chat-thread { height: clamp(390px,65dvh,640px); min-height: 390px; padding: 24px; overflow-y: auto; overscroll-behavior-y: contain; background: #f3f6f8; display: flex; flex-direction: column; gap: 16px; scroll-padding-block: 20px; }
.chat-bubble { padding: 16px; border: 1px solid var(--cta-line); border-radius: 4px 16px 16px; background: #fff; color: var(--cta-ink); width: fit-content; max-width: 92%; flex-shrink: 0; overflow-wrap: anywhere; }
.chat-bubble--user { align-self: flex-end; border-radius: 16px 4px 16px 16px; background: #e8eef2; }
.chat-bubble p { margin: 6px 0; white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
.chat-speaker { font-size: 12px; font-weight: 700; color: #526877; }
.chat-current { width: 100%; }
.chat-current h3 { font-size: 16px; line-height: 1.6; margin: 6px 0 14px; }
.chat-current h3:focus, .chat-header h2:focus { outline: none; }
.chat-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chat-options .cfm-btn { font-size: 14px; white-space: normal; text-align: left; min-height: 44px; }
.chat-field { display: block; font-weight: 600; font-size: 14px; line-height: 1.6; margin-block: 14px; }
.chat-field input, .chat-field textarea, .chat-field select { display: block; margin-top: 6px; width: 100%; font-weight: 400; font-size: 16px; }
.chat-hint { color: #526877; font-size: 13px!important; }
.chat-room-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 14px; }
.chat-room-results .cfm-btn { justify-content: flex-start; }
.chat-summary { margin: 0; }
.chat-summary > div { border-bottom: 1px solid var(--cta-line); padding-block: 10px; }
.chat-summary dt { font-size: 12px; color: #526877; font-weight: 600; }
.chat-summary dd { margin: 3px 0 0; font-size: 15px; line-height: 1.6; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.chat-summary .cfm-text-button { flex-shrink: 0; min-height: 44px; }
.chat-checks { white-space: pre-wrap; }
.chat-review details { font-size: 14px; }
.chat-review details summary { cursor: pointer; min-height: 44px; padding-block: 10px; }
.chat-photos { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chat-photos li { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.chat-photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.chat-photos span { flex: 1; overflow-wrap: anywhere; }
.chat-errors { margin-top: 16px; padding: 12px; border-left: 3px solid #9b3333; background: #fff4f4; font-size: 14px; line-height: 1.6; }
.chat-errors ul { padding-left: 20px; }
.chat-folio { display: block; font-size: 24px; letter-spacing: .04em; padding: 12px 0; }
.chat-composer { padding: 14px 24px; background: #fff; border-top: 1px solid var(--cta-line); }
.chat-composer-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.chat-composer > div { display: flex; gap: 10px; align-items: end; }
.chat-composer textarea { flex: 1; min-width: 0; resize: vertical; max-height: 160px; min-height: 48px; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--cta-line); border-radius: 10px; }
.chat-composer p { margin: 6px 0 0; font-size: 12px; color: #526877; }
.cfm-messenger :is(input,textarea,select,button,a):focus-visible { outline: 2px solid var(--cfm-action-blue); outline-offset: 3px; }
.chat-progress { display:flex; justify-content:space-between; gap:8px; list-style:none; padding:10px 24px; margin:0; border-bottom:1px solid var(--cta-line); background:#fff; }
.chat-progress li { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--cta-muted); }
.chat-progress li > span { display:grid; place-items:center; border:1px solid var(--cta-line); border-radius:50%; width:22px; height:22px; }
.chat-progress [aria-current="step"] { color:var(--cta-ink); font-weight:700; }
.chat-progress [aria-current="step"] > span { color:#fff; background:var(--cta-ink); border-color:var(--cta-ink); }
.chat-progress [data-complete] > span { color:var(--cta-ink); background:#e8eef2; }
.chat-current { width:auto; min-width:min(100%,280px); }
.cfm-messenger [hidden] { display:none!important; }
.chat-typing { min-width:210px; }
.chat-typing p { font-size:14px; color:var(--cta-muted); }
.chat-typing-dots { display:flex; gap:5px; padding:7px 0 3px; }
.chat-typing-dots i { width:7px; height:7px; border-radius:50%; background:var(--cta-ink); animation:chat-typing-dot 600ms ease-in-out 3; }
.chat-typing-dots i:nth-child(2) { animation-delay:120ms; }
.chat-typing-dots i:nth-child(3) { animation-delay:240ms; }
@keyframes chat-typing-dot { 0%,100% { opacity:.45; transform:translateY(0); } 50% { opacity:1; transform:translateY(-4px); } }
.chat-header h2 span { display:inline-block; white-space:pre; }
.chat-intro h2 span { animation:chat-word-in 450ms ease-out both; }
.chat-intro h2 span:nth-child(2) { animation-delay:140ms; }
.chat-intro h2 span:nth-child(3) { animation-delay:280ms; }
.chat-intro .chat-avatar { animation:chat-avatar-in 450ms ease-out both; }
.chat-welcome.chat-intro p { animation:chat-word-in 450ms ease-out both; }
.chat-welcome.chat-intro p:nth-of-type(2) { animation-delay:180ms; }
.chat-welcome-dots { display:flex; gap:4px; margin-top:8px; height:6px; }
.chat-welcome-dots i { width:5px; height:5px; border-radius:50%; background:var(--cta-muted); animation:chat-dot 300ms ease-in-out 2; }
.chat-welcome-dots i:nth-child(2) { animation-delay:100ms; }
.chat-welcome-dots i:nth-child(3) { animation-delay:200ms; }
.chat-bubble--user, .chat-current { animation:chat-message-in 180ms ease-out; }
.chat-options .cfm-btn, .chat-composer .cfm-btn { transition:transform 120ms ease-out,background-color 160ms ease-out; }
.chat-options .cfm-btn:active, .chat-composer .cfm-btn:active { transform:scale(.98); }
.chat-upload { padding:12px; border:1px dashed var(--cta-line); border-radius:10px; background:#f8fafb; }
.chat-success-mark { display:block; width:48px; height:48px; color:#267144; margin:10px 0; }
.chat-success-mark circle { fill:#edf7ef; stroke:currentColor; stroke-width:2; }
.chat-success-mark path { fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:36; stroke-dashoffset:0; animation:chat-check-in 300ms ease-out; }
@keyframes chat-word-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@keyframes chat-avatar-in { from { opacity:0; transform:scale(.92); } to { opacity:1; transform:scale(1); } }
@keyframes chat-message-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@keyframes chat-dot { 50% { opacity:.4; transform:translateY(-2px); } }
@keyframes chat-check-in { from { stroke-dashoffset:36; } to { stroke-dashoffset:0; } }
@media(prefers-reduced-motion:reduce) {
 .cfm-messenger *, .cfm-messenger *::before, .cfm-messenger *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
 .chat-welcome-dots { display:none; }
}
@media (max-width:640px) {
 .chat-header { padding: 14px; }
 .chat-header { flex-wrap:wrap; }
 .chat-thread { height: 62dvh; min-height: 350px; max-height: 620px; padding: 14px 10px; gap: 12px; }
 .chat-bubble { max-width: 96%; padding: 13px; }
 .chat-current { max-width: 100%; }
 .chat-room-results { grid-template-columns: 1fr; }
 .chat-options { flex-direction: column; align-items: stretch; }
 .chat-composer { padding: 12px; }
 .chat-progress { padding:10px 12px; }
 .chat-composer .cfm-btn { min-width: auto; padding-inline: 14px; }
 .chat-summary dd { display: block; }
 .chat-summary .cfm-text-button { display: block; padding-left: 0; }
}
