/* ==========================================================================
   Hill — Diagnóstico de Descarbonización — estilos del widget Elementor
   Diseño: Figma "Huella de carbono" (oct. 2026).
   Todas las variables --hcd-* pueden sobreescribirse desde el tab "Estilo"
   del widget en Elementor (ver includes/class-hcd-diagnostic-widget.php).
   ========================================================================== */

.hcd-diagnostic {
  --hcd-font: 'Open Sauce One', 'Inter', system-ui, -apple-system, sans-serif;

  --hcd-ink:    #383838;   /* títulos y etiquetas */
  --hcd-ink2:   #383838;
  --hcd-ink3:   #383838;   /* subtítulos de paso */
  --hcd-text:   #878181;   /* textos secundarios y cuerpo de tarjetas */
  --hcd-mid:    #878181;
  --hcd-placeholder: #B8B8B8;

  --hcd-primary:       #0670A5;  /* botones, chip, bordes de selección */
  --hcd-primary-dark:  #044A6C;  /* pasos completados */
  --hcd-primary-light: #3CAEE3;  /* iconos, etiquetas de tarjetas */
  --hcd-primary-pale:  rgba(6,112,165,0.08);
  --hcd-accent:        #039ADD;  /* barra de progreso y paso activo */
  --hcd-accent-dark:   #0670A5;
  --hcd-blue:          #3CAEE3;

  --hcd-smoke:  #F7F7F7;   /* fondo de las secciones */
  --hcd-ash:    #E4E4E4;   /* bordes */
  --hcd-track:  #D9D9D9;   /* barra de progreso vacía */
  --hcd-light:  #FFFFFF;

  --hcd-l1: #77B3D9;
  --hcd-l2: #F2B705;
  --hcd-l3: #34D1BF;

  --hcd-radius: 5px;
  --hcd-button-radius: 100px;
  --hcd-option-selected-bg: rgba(6,112,165,0.08);
  --hcd-option-selected-border: #0670A5;
  --hcd-option-icon-size: 40px;
  --hcd-disc-a: #3CAEE3;
  --hcd-disc-b: #0670A5;
  --hcd-hero-highlight: #3CAEE3; /* palabras destacadas del título (em) */
  --hcd-hero-btn-bg: #FAB041;     /* botón "Iniciar diagnóstico" (naranja) */
  --hcd-hero-btn-text: #2B2B2B;   /* texto oscuro: contraste ≈ 7.6:1 sobre #FAB041 (blanco solo ≈ 1.9:1) */
  --hcd-hero-btn-hover-bg: #E8961E; /* naranja algo más oscuro */
  --hcd-hero-btn-hover-text: #2B2B2B; /* contraste ≈ 5.9:1 sobre #E8961E */

  position: relative;
  font-family:var(--hcd-font) !important;
  font-weight:500 !important;
  color: var(--hcd-ink);
  background: var(--hcd-light);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}
.hcd-diagnostic, .hcd-diagnostic *, .hcd-diagnostic *::before, .hcd-diagnostic *::after {
  box-sizing: border-box;
}
.hcd-diagnostic img { max-width: 100%; }
.hcd-diagnostic [hidden] { display: none !important; }
.hcd-diagnostic :where(p) { margin: 0; }
.hcd-diagnostic strong, .hcd-diagnostic b { font-weight:900 !important; }

/* Iconos Material Symbols (trazo fino como en Figma). */
.hcd-diagnostic .material-symbols-outlined {
  font-family:'Material Symbols Outlined' !important;
  font-weight:normal !important;
  font-style:normal !important;
  font-size:24px !important;
  line-height:1 !important;
  letter-spacing:normal !important;
  text-transform:none !important;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ─── HEADER ─── */
.hcd-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  min-height: 98px;
  background: var(--hcd-light);
  padding: 16px 41px;
}
body.admin-bar .hcd-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hcd-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .hcd-header { top: 0; } }
.hcd-header-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.hcd-header-logo img { height: 42px; width: auto; display: block; }
.hcd-header-logo-fallback { font-weight:900 !important; font-size:22px !important; color: var(--hcd-primary); }
.hcd-header-actions { display: flex; align-items: center; gap: 19px; flex-wrap: wrap; justify-content: flex-end; }
body .hcd-header-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 21px;
  border: 1px solid var(--hcd-primary); border-radius: var(--hcd-button-radius);
  background: transparent; color: var(--hcd-primary);
  font-family:var(--hcd-font) !important; font-weight:700 !important; font-size:16px !important; line-height:1.6 !important;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
body .hcd-header-btn:hover, body .hcd-header-btn:focus { background: var(--hcd-primary); color: #fff; }
.hcd-header-btn .material-symbols-outlined { font-size:22px !important; }
@media (max-width: 767px) {
  .hcd-header { padding: 12px 16px; min-height: 0; }
  .hcd-header-logo img { height: 34px; }
  body .hcd-header-btn { font-size:13px !important; padding: 4px 14px; gap: 6px; }
}

/* ─── HERO ─── */
.hcd-hero {
  position: relative; overflow: hidden;
  min-height: 861px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 74px 40px 90px;
  background-color: #014364;
  background-size: cover; background-position: center;
  color: #fff;
}
.hcd-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(1,46,70,0.62) 0%, rgba(1,67,100,0.5) 55%, rgba(1,46,70,0.7) 100%);
}
.hcd-hero > * { position: relative; z-index: 2; }
.hcd-hero-eyebrow {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,0.4); border-radius: var(--hcd-button-radius);
  padding: 6px 18px; font-size:14px !important; font-weight:700 !important; margin-bottom: 24px;
}
.hcd-hero-title {
  font-family:var(--hcd-font) !important; font-weight:600 !important;
  font-size:clamp(34px, 4.6vw, 60px) !important; line-height:1 !important; letter-spacing:0 !important;
  color: #fff; max-width: 820px; margin: 0 0 40px;
}
.hcd-hero-title { text-shadow: 0 2px 18px rgba(0,30,50,0.35); }
/* Escritorio/tablet: se ignoran los <br> guardados en el texto y el título se
   reparte solo en 4 líneas equilibradas. El ancho máximo va en "em" para que
   escale con el font-size (clamp) y el nº de líneas no cambie con la ventana. */
@media (min-width: 768px) {
  .hcd-hero-title { max-width: min(100%, 14.6em); text-wrap: balance; }
  .hcd-hero-title br { display: none; }
}
.hcd-hero-title em, .hcd-hero-title .gold, .hcd-hero-title strong { font-style:italic !important; font-weight:800 !important; color: var(--hcd-hero-highlight); }
.hcd-hero-sub { font-size:18px !important; font-weight:500 !important; line-height:1.3 !important; max-width: 633px; margin: 0 0 32px; color: #fff; }
.hcd-hero-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 32px 56px; width: 100%; margin-top: 49px; max-width: 1000px; }
.hcd-hero-proof:has(> .hcd-hp:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
.hcd-hero-proof:has(> .hcd-hp:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 340px; }
.hcd-hp { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.hcd-hp-icon { display: flex; flex-direction: column; align-items: center; font-size:40px !important; line-height:1 !important; color: #fff; }
.hcd-hp-icon .material-symbols-outlined { font-size:40px !important; }
.hcd-hp-icon::after { content: ''; display: block; width: 27px; height: 1px; background: var(--hcd-blue); margin: 7px 0 18px; }
.hcd-hp-number { font-weight:900 !important; font-size:32px !important; line-height:1 !important; display: block; margin-bottom: 6px; }
.hcd-hp-label { font-size:16px !important; font-weight:500 !important; line-height:1.25 !important; color: #fff; }
@media (max-width: 767px) {
  .hcd-hero { min-height: 0; padding: 64px 20px 56px; }
  .hcd-hero-sub { font-size:16px !important; }
  .hcd-hero-proof, .hcd-hero-proof:has(> .hcd-hp:nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 360px; }
}

/* ─── BOTONES ─── */
body .hcd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family:var(--hcd-font) !important; font-size:16px !important; font-weight:700 !important; letter-spacing:0 !important; text-transform:none !important;
  padding: 10px 21px; min-height: 44px;
  border-radius: var(--hcd-button-radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  line-height:1.2 !important;
}
body .hcd-btn .hcd-btn-arrow { font-size:22px !important; }
body .hcd-btn-primary,
body .hcd-btn-gold { background: var(--hcd-primary); border-color: var(--hcd-primary); color: #fff; }
body .hcd-btn-primary:hover,
body .hcd-btn-gold:hover { background: var(--hcd-primary-dark); border-color: var(--hcd-primary-dark); color: #fff; }
body .hcd-btn-back,
body .hcd-btn-outline { background: transparent; border-color: var(--hcd-primary); color: var(--hcd-primary); }
body .hcd-btn-back:hover,
body .hcd-btn-outline:hover { background: var(--hcd-primary); color: #fff; }
body .hcd-btn-light { background: #fff; color: var(--hcd-primary); border-color: #fff; }
body .hcd-btn[disabled] { opacity: .6; cursor: not-allowed; }
/* Botón principal de la portada: naranja sobre la foto para que resalte. */
body .hcd-hero .hcd-btn-hero {
  background: var(--hcd-hero-btn-bg); border-color: var(--hcd-hero-btn-bg); color: var(--hcd-hero-btn-text);
  font-size:18px !important; padding: 14px 30px; min-height: 54px; box-shadow: 0 8px 24px rgba(0,30,50,0.28);
}
body .hcd-hero .hcd-btn-hero:hover, body .hcd-hero .hcd-btn-hero:focus-visible {
  background: var(--hcd-hero-btn-hover-bg); border-color: var(--hcd-hero-btn-hover-bg); color: var(--hcd-hero-btn-hover-text); transform: translateY(-1px);
}

/* ─── SEGUIMIENTO DE PASOS ─── */
.hcd-progress-section { display: none; background: var(--hcd-smoke); padding: 30px 24px 0; }
.hcd-progress-section.is-active { display: block; }
.hcd-progress-track { max-width: 924px; margin: 0 auto; }
.hcd-progress-bar { height: 5px; background: var(--hcd-track); border-radius: 100px; overflow: hidden; margin-bottom: 18px; }
.hcd-progress-fill { height: 100%; width: 0%; background: var(--hcd-accent); border-radius: 100px; transition: width .5s ease; }
.hcd-progress-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.hcd-progress-steps { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
.hcd-progress-step { font-size:14px !important; font-weight:700 !important; text-transform:uppercase !important; color: var(--hcd-ink); line-height:1.25 !important; }
.hcd-progress-step + .hcd-progress-step::before { content: '·'; margin: 0 5px; color: var(--hcd-ink); }
.hcd-progress-step.is-done { color: var(--hcd-primary-dark); }
.hcd-progress-step.is-active { color: var(--hcd-accent); }
.hcd-progress-count { font-size:14px !important; font-weight:700 !important; letter-spacing:0.56px !important; color: var(--hcd-primary); white-space: nowrap; }
@media (max-width: 767px) {
  .hcd-progress-steps { display: none; }
  .hcd-progress-meta { justify-content: flex-end; }
}

/* ─── FORMULARIO ─── */
.hcd-form-section { display: none; padding: 40px 24px 64px; background: var(--hcd-smoke); }
.hcd-form-section.is-active { display: block; }
.hcd-form-wrap { max-width: 754px; margin: 0 auto; }

.hcd-step { display: none; animation: hcd-slide-up .35s ease; }
.hcd-step.is-active { display: block; }
@keyframes hcd-slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.hcd-step-chip {
  display: inline-block; background: rgba(6,112,165,0.2); color: var(--hcd-primary);
  font-size:14px !important; font-weight:700 !important; letter-spacing:0 !important; text-transform:uppercase !important;
  padding: 4px 14px; border-radius: 100px; margin-bottom: 22px; line-height:1.25 !important;
}
.hcd-step-title {
  font-family:var(--hcd-font) !important; font-weight:900 !important;
  font-size:clamp(22px, 2.6vw, 30px) !important; line-height:1.418 !important; text-transform:uppercase !important;
  color: var(--hcd-ink); margin: 0 0 10px; letter-spacing:0 !important;
}
.hcd-step-title em { font-style:italic !important; }
.hcd-step-subtitle { font-size:18px !important; font-weight:500 !important; color: var(--hcd-ink3); line-height:1.3 !important; margin: 0 0 32px; }
.hcd-step-subtitle strong { font-weight:900 !important; }

.hcd-step-box {
  background: var(--hcd-light); border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius);
  padding: 40px 46px 26px; margin-bottom: 8px;
}
.hcd-box-title { font-size:16px !important; font-weight:900 !important; color: var(--hcd-ink); margin-bottom: 8px; }
.hcd-box-sub { font-size:16px !important; color: var(--hcd-text); line-height:1.25 !important; margin: 0 0 30px; }

.hcd-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.hcd-field-row .hcd-field-group.hcd-full, .hcd-field-row .hcd-conditional.hcd-full { grid-column: 1 / -1; }
.hcd-field-group { margin-bottom: 30px; }
.hcd-field-label {
  display: block; font-size:16px !important; font-weight:700 !important; letter-spacing:0 !important; text-transform:none !important;
  color: var(--hcd-ink); line-height:1.25 !important; margin-bottom: 14px;
}
/* Más específico que ".elementor-kit-XXX label" del tema. */
body .hcd-diagnostic label { text-transform:none !important; letter-spacing:normal !important; }
.hcd-diagnostic .hcd-field-label { font-family:var(--hcd-font) !important; font-weight:700 !important; text-transform:none !important; }
.hcd-label-note { font-weight:500 !important; color: var(--hcd-text); font-size:16px !important; }
.hcd-diagnostic .hcd-field-input,
.hcd-diagnostic input.hcd-field-input,
.hcd-diagnostic textarea.hcd-field-input,
.hcd-diagnostic select.hcd-field-input {
  width: 100%; min-height: 37px; padding: 8px 13px;
  border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius);
  font-family:var(--hcd-font) !important; font-size:15px !important; font-weight:500 !important;
  background: var(--hcd-light); color: var(--hcd-ink);
  outline: none; transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none; box-shadow: none;
}
.hcd-diagnostic textarea.hcd-field-input { min-height: 92px; resize: vertical; }
.hcd-field-input::placeholder { color: var(--hcd-placeholder); opacity: 1; }
.hcd-diagnostic .hcd-field-input:focus { border-color: var(--hcd-primary); box-shadow: 0 0 0 3px rgba(6,112,165,0.12); }
.hcd-diagnostic select.hcd-field-input {
  background-image: url("data:image/svg+xml,%3Csvg width='13' height='6' viewBox='0 0 13 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 0.5L6.5 5L12 0.5' stroke='%23B8B8B8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 20px center; padding-right: 44px; cursor: pointer;
}
.hcd-diagnostic select.hcd-field-input.is-empty { color: var(--hcd-placeholder); }
select.hcd-field-input option { color: var(--hcd-ink); }

/* ─── SUBIDA DE ARCHIVO ─── */
.hcd-file-wrapper { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hcd-file-label {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--hcd-primary-pale); border: 1px dashed var(--hcd-primary);
  color: var(--hcd-primary); font-size:16px !important; font-weight:500 !important;
  padding: 9px 16px; border-radius: var(--hcd-radius); cursor: pointer; transition: background .2s;
}
.hcd-file-label .material-symbols-outlined { font-size:20px !important; color: var(--hcd-blue); transform: rotate(45deg); }
.hcd-file-label:hover { background: rgba(6,112,165,0.14); }
.hcd-file-preview { max-height: 54px; max-width: 160px; object-fit: contain; border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius); padding: 4px; background: #fff; }
.hcd-file-clear { background: none; border: none; color: var(--hcd-text); font-size:13px !important; cursor: pointer; text-decoration: underline; font-family:var(--hcd-font) !important; }
.hcd-file-error { color: #E53E3E; font-size:13px !important; margin-top: 6px; }

/* ─── TARJETAS DE OPCIÓN ─── */
.hcd-question .hcd-field-label { margin-bottom: 20px; }
.hcd-options-grid { display: grid; gap: 10px 28px; }
.hcd-options-grid.hcd-cols-1 { grid-template-columns: 1fr; }
.hcd-options-grid.hcd-cols-2 { grid-template-columns: 1fr 1fr; }
.hcd-options-grid.hcd-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.hcd-option-card {
  position: relative;
  background: var(--hcd-light); border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius);
  min-height: 94px; padding: 16px 44px 16px 12px; cursor: pointer; transition: border-color .18s, background .18s;
  display: flex; align-items: center; gap: 12px;
  outline: none;
}
.hcd-option-card.hcd-no-desc { min-height: 56px; }
.hcd-option-card:hover { border-color: var(--hcd-primary); }
.hcd-option-card:focus-visible { box-shadow: 0 0 0 3px rgba(6,112,165,0.2); }
.hcd-option-card.is-selected { border-color: var(--hcd-option-selected-border); background: var(--hcd-option-selected-bg); }
.hcd-option-icon {
  flex-shrink: 0; width: var(--hcd-option-icon-size); text-align: center;
  font-size:calc(var(--hcd-option-icon-size) * 0.6) !important; line-height:1 !important; color: var(--hcd-blue);
}
.hcd-option-icon .material-symbols-outlined { font-size:var(--hcd-option-icon-size) !important; color: var(--hcd-blue); }
.hcd-option-body { flex: 1; min-width: 0; }
.hcd-option-label { font-size:16px !important; font-weight:900 !important; color: var(--hcd-ink); line-height:1.25 !important; display: block; }
.hcd-option-desc { display: block; font-size:16px !important; font-weight:500 !important; color: var(--hcd-text); line-height:1.25 !important; margin-top: 6px; }
.hcd-option-check {
  position: absolute; top: 14px; right: 16px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--hcd-ash); background: #fff; transition: all .2s;
}
.hcd-option-card.is-selected .hcd-option-check {
  border-color: var(--hcd-option-selected-border);
  box-shadow: inset 0 0 0 2px #fff; background: var(--hcd-option-selected-border);
}

.hcd-conditional { display: none; animation: hcd-slide-up .25s ease; }
.hcd-conditional.is-visible { display: block; }

.hcd-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 18px; padding-top: 24px; border-top: 1px solid var(--hcd-ash);
}
.hcd-nav.hcd-nav-end { justify-content: flex-end; }

/* ─── AUTO-EVALUACIÓN (MONTAÑA) ─── */
.hcd-self-assessment {
  margin: 10px 0 20px; padding: 28px 24px 30px;
  background: rgba(6,112,165,0.08); border: 1px solid var(--hcd-primary); border-radius: var(--hcd-radius);
}
.hcd-self-assessment-q { font-weight:900 !important; font-size:16px !important; line-height:1.25 !important; color: var(--hcd-ink); margin-bottom: 10px; }
.hcd-self-assessment-sub { font-size:16px !important; color: var(--hcd-text); line-height:1.25 !important; margin-bottom: 28px; }
.hcd-self-assessment-sub p { margin: 0 0 18px; }
.hcd-self-assessment-sub p:last-child { margin-bottom: 0; }
.hcd-self-assessment-sub strong { color: var(--hcd-ink); font-weight:900 !important; }
.hcd-self-assessment-sub ul { margin: 8px 0 0 18px; padding: 0; list-style: disc; }
.hcd-hiker-inline { display: inline-flex; vertical-align: -3px; }
.hcd-self-assessment-canvas { padding: 0 10px; }
.hcd-self-assessment-svg { width: 100%; height: auto; display: block; background: #0F172A; border-radius: var(--hcd-radius); cursor: pointer; user-select: none; }
.hcd-self-assessment-hiker { user-select: none; }
.hcd-self-assessment-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size:14px !important; color: var(--hcd-ink); margin-top: 10px;
}
.hcd-self-assessment-hint .material-symbols-outlined { font-size:20px !important; }
.hcd-self-assessment-card {
  margin: 24px 10px 0; padding: 18px 20px 18px 24px; background: #fff;
  border-left: 4px solid var(--hcd-stage-color, var(--hcd-blue)); border-radius: var(--hcd-radius);
  transition: border-color .2s;
}
.hcd-self-assessment-card-name { font-weight:900 !important; font-size:16px !important; color: var(--hcd-ink); margin-bottom: 10px; }
.hcd-self-assessment-card-desc { font-size:16px !important; color: var(--hcd-text); line-height:1.25 !important; }
.hcd-self-assessment-card-desc strong { font-weight:900 !important; }

/* ─── RESULTADOS ─── */
.hcd-results-section { display: none; padding: 40px 24px 64px; background: var(--hcd-smoke); }
.hcd-results-section.is-active { display: block; }
.hcd-results-wrap { max-width: 754px; margin: 0 auto; }

.hcd-level-reveal { text-align: center; animation: hcd-slide-up .6s ease; }
.hcd-level-eyebrow {
  display: inline-block; background: rgba(6,112,165,0.2); color: var(--hcd-primary);
  font-size:14px !important; font-weight:700 !important; text-transform:uppercase !important; line-height:1.25 !important;
  padding: 4px 16px; border-radius: 100px; margin: 0 0 30px;
}
.hcd-level-title-row { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.hcd-result-logo { display: block; max-height: 64px; max-width: 180px; object-fit: contain; }
.hcd-result-title {
  font-family:var(--hcd-font) !important; font-weight:900 !important; font-size:clamp(22px, 2.6vw, 30px) !important; line-height:1.418 !important;
  text-transform:uppercase !important; color: var(--hcd-ink); margin: 0;
}
.hcd-level-title { font-weight:900 !important; color: var(--hcd-ink); }

.hcd-level-intro,
.hcd-level-desc {
  width: 100%; margin: 0 0 22px;
  background: var(--hcd-light); border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius);
  padding: 40px 47px; text-align: left;
  font-size:18px !important; font-weight:500 !important; line-height:1.22 !important; color: var(--hcd-ink);
}
.hcd-level-intro strong, .hcd-level-desc strong { color: var(--hcd-ink); font-weight:900 !important; }
.hcd-level-badge-row { margin: 0 0 22px; }
.hcd-level-badge {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 24px; border-radius: var(--hcd-radius);
  background: rgba(60,174,227,0.1); border: 1px solid var(--hcd-blue);
  font-size:16px !important; font-weight:900 !important; color: var(--hcd-ink); letter-spacing:0 !important; text-transform:none !important;
}
.hcd-level-icon { color: var(--hcd-blue); font-size:26px !important; line-height:1 !important; }
.hcd-level-icon .material-symbols-outlined { font-size:28px !important; color: var(--hcd-blue); }

/* Montaña */
.hcd-mountain-journey {
  margin: 0 0 18px; background: var(--hcd-light); border: 1px solid var(--hcd-ash);
  border-radius: var(--hcd-radius); padding: 11px 20px 16px;
}
.hcd-mj-caption { font-size:16px !important; font-weight:900 !important; color: var(--hcd-ink); text-align: center; margin-bottom: 10px; }
.hcd-mj-svg svg, .hcd-mountain-journey svg { width: 100%; height: auto; display: block; background: #0F172A; border-radius: var(--hcd-radius); }
.hcd-mj-legend { font-size:14px !important; font-weight:500 !important; color: var(--hcd-ink); text-align: center; margin: 10px auto 0; line-height:1.2 !important; max-width: 600px; }
.hcd-mj-legend strong { color: var(--hcd-ink); font-weight:900 !important; }
.hcd-mj-legend .hcd-hl { color: var(--hcd-accent); }

/* Tarjetas de etapa bajo la montaña */
.hcd-mj-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: 0 0 56px; }
.hcd-mj-stage {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 15px 14px 20px; border-radius: var(--hcd-radius);
  background: var(--hcd-light);
  border-top: 5px solid #E4ECF0;
  font-size:16px !important; color: var(--hcd-text); line-height:1.25 !important; text-align: left;
}
.hcd-mj-stage-head { display: flex; align-items: center; gap: 10px; color: var(--hcd-blue); font-size:14px !important; font-weight:700 !important; }
.hcd-mj-stage-icon { color: var(--hcd-blue); line-height:1 !important; }
.hcd-mj-stage-icon .material-symbols-outlined { font-size:24px !important; }
.hcd-mj-stage-title { display: block; font-size:16px !important; font-weight:900 !important; color: var(--hcd-text); }
.hcd-mj-stage-desc { display: block; font-weight:500 !important; }
.hcd-mj-stage.is-current { border-top-color: var(--hcd-blue); box-shadow: 0 4px 14px rgba(6,112,165,.10); }
.hcd-mj-stage-tag {
  position: absolute; top: -14px; right: 10px;
  background: var(--hcd-blue); color: #fff;
  font-size:10px !important; font-weight:700 !important; letter-spacing:.5px !important; text-transform:uppercase !important;
  padding: 3px 9px; border-radius: 100px;
}

/* Tarjetas de resultados */
.hcd-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 30px; }
.hcd-result-grid > .hcd-rcard { margin-bottom: 0; }
.hcd-rcard {
  position: relative;
  background: var(--hcd-light); border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius);
  padding: 24px 28px 28px; margin-bottom: 30px; text-align: left;
}
.hcd-rcard-accent { border-left: 4px solid var(--hcd-blue); padding-left: 26px; }
.hcd-rcard-outline { border-color: var(--hcd-blue); }
.hcd-rcard-icon { display: block; color: var(--hcd-blue); font-size:32px !important; line-height:1 !important; margin-bottom: 10px; }
.hcd-rcard-icon .material-symbols-outlined { font-size:40px !important; color: var(--hcd-blue); }
.hcd-rcard-label { font-size:14px !important; font-weight:700 !important; color: var(--hcd-blue); margin-bottom: 12px; letter-spacing:0 !important; text-transform:none !important; }
.hcd-rcard-title { font-family:var(--hcd-font) !important; font-size:16px !important; font-weight:900 !important; color: var(--hcd-text); margin: 0 0 16px; line-height:1.25 !important; }
.hcd-rcard-body { font-size:16px !important; font-weight:500 !important; color: var(--hcd-text); line-height:1.25 !important; }
.hcd-rcard-body strong { color: var(--hcd-text); font-weight:900 !important; }
.hcd-rcard-foot { margin-top: 24px; }
.hcd-rcard-list { list-style: none; margin: 8px 0 0; padding: 0; }
.hcd-rcard-list li {
  font-size:16px !important; font-weight:500 !important; color: var(--hcd-text); line-height:1.25 !important;
  padding: 12px 0; border-bottom: 1px solid var(--hcd-ash);
  display: flex; align-items: flex-start; gap: 12px;
}
.hcd-rcard-list li:last-child { border-bottom: none; }
.hcd-rcard-list li::before {
  content: 'arrow_forward'; font-family:'Material Symbols Outlined' !important; font-size:22px !important; line-height:1 !important;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  color: var(--hcd-blue); flex-shrink: 0;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
}
.hcd-rcard-list strong { font-weight:900 !important; }
.hcd-rec-list li { padding: 18px 0; }
.hcd-rec-text { display: flex; flex-direction: column; gap: 10px; }
.hcd-rec-line { display: block; }

.hcd-rcard-phases .hcd-rcard-body { margin-bottom: 24px; }
.hcd-rcard-phases .hcd-rcard-body strong { color: var(--hcd-text); }
.hcd-scope-row { display: flex; gap: 13px; flex-wrap: wrap; }
.hcd-scope-row + .hcd-scope-row { margin-top: 15px; }
.hcd-scope-pill {
  flex: 1 1 0; min-width: 110px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  background: var(--hcd-light); border: 1px solid var(--hcd-ash);
  border-top: 2px solid var(--hcd-phase-color, var(--hcd-primary));
  border-radius: var(--hcd-radius); padding: 22px 8px 20px; text-align: center;
}
.hcd-scope-pill.is-start { padding-top: 12px; }
.hcd-scope-row-optional .hcd-scope-pill { flex-basis: 100%; }
.hcd-scope-start-badge {
  display: inline-block; font-size:14px !important; font-weight:700 !important; line-height:1.2 !important;
  color: var(--hcd-primary); background: rgba(6,112,165,0.2);
  padding: 4px 12px; border-radius: 100px;
}
.hcd-scope-num { font-size:14px !important; font-weight:700 !important; color: var(--hcd-blue); text-transform:none !important; letter-spacing:0 !important; }
.hcd-scope-name { font-size:14px !important; font-weight:700 !important; color: var(--hcd-text); line-height:1.2 !important; }
.hcd-scope-optional { font-size:14px !important; font-weight:700 !important; color: var(--hcd-blue); }
.hcd-scope-time { font-size:14px !important; font-weight:700 !important; color: var(--hcd-blue); margin-top: auto; padding-top: 6px; }

/* Descuento */
.hcd-discount-card {
  background: linear-gradient(135deg, var(--hcd-disc-a), var(--hcd-disc-b));
  border-radius: var(--hcd-radius); padding: 38px 28px 34px; margin-bottom: 30px; color: #fff; text-align: left;
}
.hcd-dc-title { font-size:16px !important; font-weight:900 !important; color: #fff; margin: 0 0 14px; }
.hcd-dc-sub { font-size:16px !important; font-weight:500 !important; color: #fff; line-height:1.25 !important; margin-bottom: 26px; }
.hcd-dc-sub strong { font-weight:900 !important; }
.hcd-discount-badges { display: flex; gap: 30px; flex-wrap: wrap; }
.hcd-db {
  flex: 0 1 265px; min-height: 101px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid #fff; border-radius: var(--hcd-radius);
  padding: 12px 16px; text-align: center;
}
.hcd-db-pct { font-size:30px !important; font-weight:900 !important; color: #fff; line-height:1 !important; }
.hcd-db-lbl { font-size:16px !important; font-weight:500 !important; color: #fff; }
.hcd-dc-note { display: flex; align-items: flex-start; gap: 6px; font-size:14px !important; font-weight:500 !important; color: #fff; margin-top: 18px; line-height:1.2 !important; }
.hcd-dc-note-icon { flex-shrink: 0; color: #fff; }
.hcd-dc-note-icon .material-symbols-outlined { font-size:22px !important; color: #fff; }

/* CTA */
.hcd-cta-block {
  background: var(--hcd-light); border: 1px solid var(--hcd-ash); border-radius: var(--hcd-radius);
  padding: 38px 32px 34px; text-align: center; margin-bottom: 26px;
}
.hcd-cta-logo { display: block; margin: 0 auto 20px; height: 34px; width: auto; }
.hcd-cta-title { font-size:24px !important; font-weight:900 !important; color: var(--hcd-text); margin: 0 0 18px; line-height:1.25 !important; }
.hcd-cta-desc { font-size:16px !important; font-weight:500 !important; color: var(--hcd-text); margin: 0 auto 36px; line-height:1.25 !important; max-width: 490px; }
.hcd-cta-actions { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.hcd-cta-actions .hcd-btn { min-width: 270px; }
.hcd-cta-contacts { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; margin-top: 28px; }
.hcd-ccon {
  font-size:14px !important; font-weight:500 !important; color: var(--hcd-text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; transition: color .2s;
}
.hcd-ccon:hover { color: var(--hcd-primary); }
.hcd-ccon-icon { display: inline-flex; color: var(--hcd-text); }
.hcd-ccon-icon.material-symbols-outlined { font-size:18px !important; }

.hcd-disc { font-size:14px !important; font-weight:500 !important; color: var(--hcd-text); text-align: center; line-height:1.2 !important; }
.hcd-reset-wrap { text-align: center; margin-top: 26px; }
.hcd-reset-wrap .hcd-btn { font-size:14px !important; min-height: 0; padding: 6px 18px; }

/* ─── MODO PDF ───
   Se aplica al clon que se rasteriza para la descarga. Las animaciones
   arrancan en opacity:0 y html2canvas captura ese fotograma inicial, lo
   que producía páginas en blanco; aquí se anulan por completo. */
.hcd-pdf-mode,
.hcd-pdf-mode * {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.hcd-pdf-mode {
  background: #FFFFFF;
  padding: 8px 4px;
}
.hcd-pdf-mode .hcd-results-wrap { max-width: none; padding: 0; margin: 0; }
/* Los botones y el reinicio no tienen sentido en un documento. */
.hcd-pdf-mode .hcd-cta-actions,
.hcd-pdf-mode .hcd-reset-wrap { display: none !important; }
/* Una sola columna: en dos columnas los bloques altos no caben en la
   página y se empujaban enteros, dejando huecos en blanco. */
.hcd-pdf-mode .hcd-result-grid { display: block; }
.hcd-pdf-mode .hcd-result-grid > * + * { margin-top: 14px; }
.hcd-pdf-mode .hcd-mj-stages { display: block; margin-bottom: 18px; }
.hcd-pdf-mode .hcd-mj-stage { margin-bottom: 8px; border: 1px solid var(--hcd-ash); border-top-width: 5px; }
.hcd-pdf-mode .hcd-mj-stage.is-current { box-shadow: none; border-top-color: var(--hcd-blue); }
.hcd-pdf-mode .hcd-mj-stage-tag { position: static; align-self: flex-start; }
/* Las tarjetas largas pueden partirse entre páginas (si no, dejaban
   medias hojas en blanco); lo que no se corta son sus piezas. */
.hcd-pdf-mode .hcd-rcard-head,
.hcd-pdf-mode .hcd-rcard-body,
.hcd-pdf-mode .hcd-discount-card,
.hcd-pdf-mode .hcd-cta-block,
.hcd-pdf-mode .hcd-mountain-journey,
.hcd-pdf-mode .hcd-mj-stage,
.hcd-pdf-mode .hcd-level-intro,
.hcd-pdf-mode .hcd-level-desc,
.hcd-pdf-mode .hcd-scope-row,
.hcd-pdf-mode .hcd-rcard-list li {
  break-inside: avoid;
  page-break-inside: avoid;
}
.hcd-pdf-mode .hcd-rcard,
.hcd-pdf-mode .hcd-discount-card,
.hcd-pdf-mode .hcd-mountain-journey { margin-bottom: 14px; }
.hcd-pdf-mode .hcd-level-intro,
.hcd-pdf-mode .hcd-level-desc { padding: 22px 26px; font-size:15px !important; }
/* El diagrama viaja al PDF ya rasterizado (ver rasterizeSvg): html2canvas
   no escala correctamente un <svg> que solo declara viewBox. */
.hcd-pdf-mode .hcd-pdf-raster { display: block; width: 100%; height: auto; border-radius: var(--hcd-radius); }
.hcd-pdf-mode .hcd-mountain-journey svg { width: 100%; height: auto; }
.hcd-pdf-mode .hcd-cta-block { padding: 24px; }
.hcd-pdf-mode .hcd-cta-desc { margin-bottom: 0; }

/* ─── RESPONSIVE ─── */
@media (max-width: 767px) {
  .hcd-form-section, .hcd-results-section { padding: 28px 16px 48px; }
  .hcd-progress-section { padding: 22px 16px 0; }
  .hcd-step-subtitle { font-size:16px !important; }
  .hcd-step-box { padding: 24px 18px 8px; }
  .hcd-field-row { grid-template-columns: 1fr; }
  .hcd-options-grid.hcd-cols-2, .hcd-options-grid.hcd-cols-3 { grid-template-columns: 1fr; }
  .hcd-option-card { min-height: 0; }
  .hcd-result-grid { grid-template-columns: 1fr; }
  .hcd-mj-stages { grid-template-columns: 1fr; }
  .hcd-level-intro, .hcd-level-desc { padding: 22px 20px; font-size:16px !important; }
  .hcd-scope-row { flex-direction: column; }
  .hcd-discount-card, .hcd-cta-block, .hcd-rcard { padding: 22px 18px; }
  .hcd-cta-actions .hcd-btn { min-width: 0; width: 100%; }
  .hcd-nav .hcd-btn { flex: 1 1 auto; }
}

/* Viñetas de color por etapa (en los textos de la auto-evaluación). */
.hcd-diagnostic .hcd-stage-dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  margin: 0 8px 1px 0; vertical-align: middle; background: var(--hcd-l1);
}
.hcd-diagnostic .hcd-stage-dot-2 { background: var(--hcd-l2); }
.hcd-diagnostic .hcd-stage-dot-3 { background: var(--hcd-l3); }

/* ─── RESPUESTAS PENDIENTES ─── */
.hcd-diagnostic { --hcd-error: #D93838; --hcd-error-bg: rgba(217,56,56,0.06); }
.hcd-diagnostic .hcd-field-group.hcd-is-missing {
  border-radius: 6px;
  background: var(--hcd-error-bg);
  box-shadow: 0 0 0 12px var(--hcd-error-bg);
  outline: 2px solid var(--hcd-error); outline-offset: 12px;
  scroll-margin-top: 140px;
}
.hcd-diagnostic .hcd-is-missing .hcd-field-label { color: var(--hcd-error); }
.hcd-diagnostic .hcd-is-missing .hcd-field-input,
.hcd-diagnostic .hcd-is-missing input.hcd-field-input,
.hcd-diagnostic .hcd-is-missing select.hcd-field-input,
.hcd-diagnostic .hcd-is-missing textarea.hcd-field-input,
.hcd-diagnostic .hcd-is-missing .hcd-option-card { border-color: var(--hcd-error); }
.hcd-diagnostic .hcd-missing-msg {
  display: flex; align-items: center; gap: 6px;
  margin: -6px 0 12px; font-size:14px !important; font-weight:700 !important; color: var(--hcd-error); line-height:1.3 !important;
}
.hcd-diagnostic .hcd-missing-msg .material-symbols-outlined { font-size:20px !important; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.hcd-diagnostic .hcd-shake { animation: hcd-shake .45s ease; }
@keyframes hcd-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
body .hcd-diagnostic .hcd-missing-notice {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 18px 0 14px; padding: 12px 16px;
  background: #FDECEC; border: 1px solid var(--hcd-error); border-radius: var(--hcd-radius);
  color: var(--hcd-error); font-family:var(--hcd-font) !important; font-size:15px !important; font-weight:700 !important; text-align: left;
  text-transform:none !important; letter-spacing:0 !important; line-height:1.3 !important; cursor: pointer; box-shadow: none;
}
body .hcd-diagnostic .hcd-missing-notice:hover { background: #FBDCDC; color: var(--hcd-error); }
.hcd-diagnostic .hcd-missing-notice .material-symbols-outlined { font-size:22px !important; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.hcd-diagnostic .hcd-missing-go { margin-left: auto; font-size:14px !important; text-decoration: underline; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .hcd-diagnostic .hcd-shake { animation: none; } }
