/* ==========================================================================
   GeoRuta de la Sostenibilidad — estilos de la app pública
   Construido sobre tokens.css (no se modifica). Mobile-first (360px) → desktop (1280px+).
   ========================================================================== */

/* ---------- Layout general ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--g-green-deep); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

main { display: block; }
.section { padding: var(--sp-2xl) 0; }
.section-soft { background: var(--g-bg-soft); }
.section-dark { background: var(--g-green-deep); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto var(--sp-xl); text-align: center; }
.section-head.align-left { margin-left: 0; text-align: left; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g-green); margin: 0 0 var(--sp-sm); }

@media (min-width: 1024px) { .section { padding: 72px 0; } }

/* ---------- Header ---------- */
.site-header {
  background: #fff; border-bottom: 1px solid var(--g-line-soft);
  position: sticky; top: 0; z-index: 40;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-link:hover { text-decoration: none; }
.brand-logo-full { display: none; height: 40px; width: auto; }
.brand-logo-mini { height: 34px; width: auto; flex-shrink: 0; }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-wordmark .name { font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-wordmark .name .geo { color: var(--g-gray); }
.brand-wordmark .name .ruta { color: var(--g-green); }
.brand-wordmark .sub { font-size: 10.5px; color: var(--g-gray-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 54vw; }
.brand-divider { display: none; width: 1px; height: 32px; background: var(--g-line); margin: 0 2px; }
@media (min-width: 640px) { .brand-divider { display: block; } }

.header-actions { display: flex; align-items: center; gap: var(--sp-sm); }
.header-actions .btn-secondary, .header-actions .btn-primary { padding: 8px 14px; font-size: 13px; min-height: 38px; }
.header-cta-full { display: none; }

@media (min-width: 640px) {
  .brand-logo-full { display: block; min-width: 197px; }
  .brand-logo-mini { display: none; }
  .header-cta-full { display: inline-flex; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--g-green-deep); color: #fff; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--g-green-tint); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-xl); padding: var(--sp-2xl) 0 var(--sp-lg); }
.footer-brand img { height: 46px; width: auto; margin-bottom: var(--sp-md); }
.footer-purpose { font-style: italic; color: #D7E6D2; max-width: 420px; font-size: 13px; }
.footer-col h3 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: var(--sp-md); }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-sm); font-size: 13px; }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; color: #D7E6D2; }
.footer-contact li svg { margin-top: 2px; flex-shrink: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-sm); font-size: 13px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: var(--sp-md) 0 var(--sp-xl); display: flex; flex-wrap: wrap; gap: var(--sp-sm); justify-content: space-between; font-size: 12px; color: #B9CDB4; }

@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #F6F8F5 0%, #FFFFFF 70%); padding: var(--sp-2xl) 0; position: relative; overflow: hidden; }
.hero .container { display: grid; gap: var(--sp-xl); align-items: center; }
.hero-copy h1 { font-size: var(--fs-display); line-height: var(--lh-display); margin-bottom: var(--sp-md); }
.hero-copy .name-geo { color: var(--g-gray); }
.hero-copy .name-ruta { color: var(--g-green); }
.hero-subtitle { font-size: 18px; color: var(--g-gray); margin-bottom: var(--sp-sm); font-weight: 600; }
.hero-purpose { font-style: italic; color: var(--g-gray-mid); margin-bottom: var(--sp-lg); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-md); margin-bottom: var(--sp-lg); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--sp-lg); font-size: 13px; color: var(--g-gray-mid); }
.hero-meta .item { display: flex; align-items: center; gap: 6px; }
.hero-visual { display: flex; justify-content: center; max-width: 100%; overflow: hidden; }
.hero-visual .route-svg { width: 100%; max-width: 520px; min-width: 0; height: auto; }
.hero-continue { margin-top: var(--sp-md); }

@media (min-width: 960px) {
  .hero .container { grid-template-columns: 1.1fr .9fr; }
}

/* ---------- Notice / aviso orientativo ---------- */
.notice {
  display: flex; gap: var(--sp-sm); align-items: flex-start; background: var(--g-info-bg); color: var(--g-info-fg);
  border-radius: var(--r-md); padding: 14px 16px; font-size: 12.5px; line-height: 1.6;
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice.notice-compact { font-size: 12px; padding: 10px 14px; }

/* ---------- "Qué es / para quién" ---------- */
.about-grid { display: grid; gap: var(--sp-lg); }
.about-card { display: flex; gap: var(--sp-md); }
.about-card .ic { flex-shrink: 0; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--g-green-tint); display: flex; align-items: center; justify-content: center; color: var(--g-green-text); }
@media (min-width: 760px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cómo funciona (pasos) ---------- */
.steps-grid { display: grid; gap: var(--sp-lg); counter-reset: step; }
.step-card { position: relative; padding-top: var(--sp-sm); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--g-green-deep); color: #fff; font-weight: 700; margin-bottom: var(--sp-md); }
@media (min-width: 760px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Dimensiones ---------- */
.dim-grid { display: grid; gap: var(--sp-lg); }
.dim-card { border-top: 4px solid var(--dim-color, var(--g-green)); }
.dim-card .ic { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: #fff; background: var(--dim-color, var(--g-green)); margin-bottom: var(--sp-md); }
@media (min-width: 760px) { .dim-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Ruta de niveles (SVG compartido) ---------- */
.route-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.route-svg { display: block; width: 100%; min-width: 560px; height: auto; }
.route-line { fill: none; stroke: var(--g-line); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.route-dot { fill: #fff; stroke: var(--dot-color, var(--g-green)); stroke-width: 3; }
.route-milestone.is-current .route-dot, .route-milestone.is-past .route-dot { fill: var(--dot-color, var(--g-green)); }
.route-ring { fill: none; stroke: var(--dot-color, var(--g-green)); stroke-width: 1.5; opacity: .35; }
.route-stage-icon { pointer-events: none; }
.route-label { font: 700 12px/1 var(--font); fill: var(--g-gray); }
.route-sublabel { font: 400 10px/1 var(--font); fill: var(--g-gray-mid); }
.route-tag { font: 700 10px/1 var(--font); letter-spacing: .03em; text-transform: uppercase; }
.route-tag-current { fill: var(--g-green-text); }
.route-tag-target { fill: var(--g-gray-mid); }

.levels-legend { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-lg); }
.level-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--g-line-soft); font-size: 12px; }
.level-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot-color); }

/* ---------- Qué recibe ---------- */
.deliver-grid { display: grid; gap: var(--sp-lg); }
.deliver-card { text-align: left; }
.deliver-card .ic { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--g-green-deep); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-md); }
@media (min-width: 760px) { .deliver-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .deliver-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final .btn-primary { margin: var(--sp-md) auto 0; }

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-region { position: fixed; bottom: var(--sp-md); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; background: var(--g-gray); color: #fff; border-radius: var(--r-md);
  padding: 12px 14px; box-shadow: var(--shadow-md); font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { background: #2E5A26; }
.toast-error { background: #7A2524; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: 0; color: inherit; opacity: .8; cursor: pointer; padding: 0; }
.toast-close:hover { opacity: 1; }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(27, 57, 25, .45); display: flex; align-items: flex-end; justify-content: center;
  z-index: 300; opacity: 0; transition: opacity .2s; padding: 0;
}
.modal-overlay.is-visible { opacity: 1; }
.modal-dialog {
  background: #fff; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--sp-lg); box-shadow: var(--shadow-md); transform: translateY(16px); transition: transform .2s;
}
.modal-overlay.is-visible .modal-dialog { transform: translateY(0); }
.modal-wide { max-width: 760px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-md); margin-bottom: var(--sp-md); }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close { background: none; border: 0; color: var(--g-gray-mid); cursor: pointer; padding: 4px; border-radius: var(--r-sm); }
.modal-close:hover { background: #F2F2F2; color: var(--g-gray); }
.modal-body { font-size: 13.5px; }
.modal-body h3 { font-size: 14px; margin-top: var(--sp-md); }
body.no-scroll { overflow: hidden; }

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal-dialog { border-radius: var(--r-lg); }
}

/* ==========================================================================
   Wizard (evaluacion.html)
   ========================================================================== */
.wizard-header { background: #fff; border-bottom: 1px solid var(--g-line-soft); position: sticky; top: 0; z-index: 30; }
.wizard-header .container { padding-top: 10px; padding-bottom: 12px; }
.wizard-header-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); margin-bottom: 10px; }
.wizard-save-state { font-size: 12px; color: var(--g-gray-mid); display: flex; align-items: center; gap: 6px; min-height: 18px; }
.wizard-save-state.is-saved { color: var(--g-green-text); }
.wizard-save-state.is-error { color: var(--g-danger); }
.wizard-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--g-gray-mid); margin-bottom: 6px; }
.wizard-dim-progress { display: flex; gap: 6px; margin-top: 8px; }
.wizard-dim-progress .seg { flex: 1; height: 5px; border-radius: var(--r-pill); background: #E9EEE7; overflow: hidden; }
.wizard-dim-progress .seg > span { display: block; height: 100%; background: var(--dim-color); }

.wizard-body { padding: var(--sp-xl) 0 80px; }
.wizard-layout { display: grid; gap: var(--sp-xl); align-items: start; }
.wizard-main { min-width: 0; }

.step-index-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; background: #fff; border: 1px solid var(--g-line-soft);
  border-radius: var(--r-md); padding: 12px 14px; font-weight: 600; font-size: 13px; margin-bottom: var(--sp-md); cursor: pointer;
}
.step-index-toggle svg { transition: transform .2s; }
.step-index-toggle[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
.step-index-panel { display: none; margin-bottom: var(--sp-lg); }
.step-index-panel.is-open { display: block; }
.step-index-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.step-index-list button {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-md);
  border: 0; background: transparent; font-size: 13px; color: var(--g-gray); cursor: pointer;
}
.step-index-list button:hover { background: var(--g-bg-soft); }
.step-index-list button.is-active { background: var(--g-green-tint); color: var(--g-green-text); font-weight: 600; }
.step-index-list .dot-state { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--g-line); font-size: 10px; }
.step-index-list .dot-state.is-done { background: var(--g-green); border-color: var(--g-green); color: #fff; }
.step-index-list .dot-state.is-current { border-color: var(--g-green); color: var(--g-green); }
.step-index-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--g-gray-mid); padding: 10px 10px 2px; }

@media (min-width: 960px) {
  .wizard-layout { grid-template-columns: 260px 1fr; }
  .step-index-toggle { display: none; }
  .step-index-panel { display: block; position: sticky; top: 100px; margin-bottom: 0; }
  .wizard-main { order: 2; }
}

.wizard-card { padding: var(--sp-lg); }
@media (min-width: 640px) { .wizard-card { padding: var(--sp-xl); } }

.step-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--g-green-text); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.step-title { margin-bottom: var(--sp-md); }
.step-helptext { color: var(--g-gray-mid); margin-bottom: var(--sp-lg); font-size: 13px; }

.form-grid { display: grid; gap: var(--sp-md); }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field.span-2 { grid-column: 1 / -1; }
.field-group-title { font-size: 13px; font-weight: 700; margin: var(--sp-md) 0 4px; color: var(--g-gray); }

.wizard-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); margin-top: var(--sp-xl); }
.wizard-nav .spacer { flex: 1; }

/* ---------- Certificaciones ---------- */
.cert-toolbar { display: flex; gap: var(--sp-sm); margin-bottom: var(--sp-md); flex-wrap: wrap; }
.cert-toolbar .field { margin: 0; flex: 1; min-width: 200px; }
.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item {
  display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; border: 1px solid var(--g-line-soft);
  border-radius: var(--r-md); padding: 12px 14px;
}
.cert-item .cert-name { font-weight: 600; font-size: 13.5px; }
.cert-item .cert-title { color: var(--g-gray-mid); font-size: 12px; }
.cert-status-group { display: flex; gap: 6px; flex-wrap: wrap; }
.cert-status-opt {
  flex: 1; min-width: 110px; text-align: center; padding: 8px 10px; border-radius: var(--r-md); border: 1.5px solid var(--g-line);
  font-size: 12.5px; cursor: pointer; user-select: none; min-height: 40px; display: flex; align-items: center; justify-content: center;
}
.cert-status-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cert-status-opt.is-selected { border-color: var(--g-green); background: var(--g-green-tint); color: var(--g-green-text); font-weight: 600; }
.cert-status-opt.is-none { border-style: dashed; color: var(--g-gray-mid); }
@media (min-width: 640px) {
  .cert-item { grid-template-columns: 1fr auto; }
}

.other-cert-list { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-md); }
.other-cert-row { display: grid; grid-template-columns: 1fr; gap: 8px; border: 1px dashed var(--g-line); border-radius: var(--r-md); padding: 10px 12px; }
.other-cert-row .row-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
@media (min-width: 640px) { .other-cert-row { grid-template-columns: 2fr 1.2fr 1.2fr auto; align-items: center; } }

/* ---------- Preguntas (tarjetas radio) ---------- */
.question-card { margin-bottom: var(--sp-xl); }
.question-card:last-child { margin-bottom: 0; }
.question-meta { font-size: 12px; color: var(--g-gray-mid); margin-bottom: 6px; }
.question-text { font-size: 15px; font-weight: 600; margin-bottom: var(--sp-sm); }
.question-help-toggle {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--g-green);
  font-size: 12.5px; cursor: pointer; padding: 2px 0; margin-bottom: var(--sp-sm);
}
.question-help-body { display: none; background: var(--g-info-bg); color: var(--g-info-fg); border-radius: var(--r-md); padding: 10px 12px; font-size: 12.5px; margin-bottom: var(--sp-sm); }
.question-help-body.is-open { display: block; }

.option-list { display: flex; flex-direction: column; gap: 8px; }
.option-card {
  display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--g-line); border-radius: var(--r-md);
  padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.option-card:hover { border-color: var(--g-green); }
.option-card input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--g-green); flex-shrink: 0; }
.option-card .opt-label { font-size: 13.5px; line-height: 1.5; }
.option-card.is-checked { border-color: var(--g-green); background: var(--g-green-tint); }
.option-card.is-checked .opt-label { color: var(--g-green-text); font-weight: 600; }

/* ---------- Revisión final ---------- */
.review-dim { margin-bottom: var(--sp-lg); }
.review-dim-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.review-missing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.review-missing-list li a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--g-warning-bg); color: var(--g-warning-fg); font-size: 13px;
}
.review-complete-msg { display: flex; align-items: center; gap: 8px; color: var(--g-success-fg); background: var(--g-success-bg); padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; }

/* ==========================================================================
   Resultados (resultado.html)
   ========================================================================== */
.result-hero { background: var(--g-green-deep); color: #fff; padding: var(--sp-xl) 0; }
.result-hero h1, .result-hero h2, .result-hero h3 { color: #fff; }
.result-hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-md); margin-bottom: var(--sp-lg); }
.result-company { font-size: 13px; color: #CFE0C9; }
.result-company strong { color: #fff; }
.result-score-row { display: grid; gap: var(--sp-lg); align-items: center; }
.result-score-big { display: flex; align-items: baseline; gap: 8px; }
.result-score-big .num { font-size: 56px; line-height: 1; }
.result-score-big .suffix { font-size: 16px; color: #CFE0C9; }
.result-category-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 15px; }
.result-bottleneck-note { font-size: 12.5px; color: #CFE0C9; margin-top: 6px; }
@media (min-width: 860px) { .result-score-row { grid-template-columns: 1fr 1fr; } }

.result-actions { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-lg); }
.download-btn { position: relative; }
.download-btn .spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.download-btn.is-loading .spinner { display: inline-block; }
.download-btn.is-loading .btn-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.route-section .route-svg { background: #fff; border-radius: var(--r-lg); padding: var(--sp-md); }

/* Tarjetas de dimensión con umbral */
.dim-score-grid { display: grid; gap: var(--sp-lg); }
@media (min-width: 860px) { .dim-score-grid { grid-template-columns: repeat(3, 1fr); } }
.dim-score-card { border-top: 4px solid var(--dim-color); }
.dim-score-card.is-bottleneck { box-shadow: 0 0 0 2px var(--g-green) inset, var(--shadow-md); }
.dim-score-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dim-score-value { font-size: 32px; font-weight: 700; margin: 2px 0 10px; }
.dim-score-value small { font-size: 14px; color: var(--g-gray-mid); font-weight: 500; }
.threshold-bar { position: relative; height: 14px; background: #E9EEE7; border-radius: var(--r-pill); margin: 18px 0 10px; }
.threshold-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--dim-color); border-radius: var(--r-pill); }
.threshold-bar .mark { position: absolute; top: -5px; width: 2px; height: 24px; background: var(--g-gray-mid); opacity: .5; }
.threshold-bar .mark span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--g-gray-mid); white-space: nowrap; }
.dim-score-breakdown { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--g-gray-mid); }
.bottleneck-chip { font-size: 11px; font-weight: 700; color: var(--g-green-text); background: var(--g-green-tint); padding: 3px 9px; border-radius: var(--r-pill); }

/* Radar + barras */
.charts-grid { display: grid; gap: var(--sp-xl); }
.chart-card canvas { max-width: 100%; }
.radar-canvas-wrap { position: relative; height: 340px; }
.subdim-bars { display: flex; flex-direction: column; gap: 10px; }
.subdim-bar-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.subdim-bar-row .label-row { display: flex; justify-content: space-between; font-size: 12px; }
.subdim-bar-row .label-row .dim-tag { color: var(--g-gray-mid); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.subdim-bar-track { height: 9px; background: #E9EEE7; border-radius: var(--r-pill); overflow: hidden; }
.subdim-bar-track > span { display: block; height: 100%; border-radius: inherit; }
@media (min-width: 1024px) { .charts-grid { grid-template-columns: 1.1fr 1fr; } }
@media (max-width: 759px) { #radar-card { display: none; } }

/* Fortalezas / brechas */
.sg-grid { display: grid; gap: var(--sp-lg); }
@media (min-width: 760px) { .sg-grid { grid-template-columns: 1fr 1fr; } }
.sg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 9px 12px; border-radius: var(--r-md); font-size: 13px; }
.sg-strength li { background: var(--g-success-bg); color: var(--g-success-fg); }
.sg-gap li { background: var(--g-warning-bg); color: var(--g-warning-fg); }

/* Gaps al siguiente nivel */
.gaps-grid { display: grid; gap: var(--sp-md); }
@media (min-width: 760px) { .gaps-grid { grid-template-columns: repeat(3, 1fr); } }
.gap-card .gap-value { font-size: 22px; font-weight: 700; }

/* Certificaciones y SIG */
.contrib-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.contrib-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); background: var(--g-bg-soft); font-size: 13px; }
.contrib-points { display: flex; gap: 6px; }
.contrib-points span { font-size: 11px; background: #fff; border: 1px solid var(--g-line-soft); padding: 1px 7px; border-radius: var(--r-pill); }

.coherence-list { display: flex; flex-direction: column; gap: 8px; }

/* Beneficios por categoría */
.benefits-accordion { display: flex; flex-direction: column; gap: 10px; }
.benefit-item { border: 1px solid var(--g-line-soft); border-radius: var(--r-lg); overflow: hidden; }
.benefit-item.is-current { border-color: var(--g-green); box-shadow: 0 0 0 1px var(--g-green) inset; }
.benefit-item.is-next { border-color: var(--cat-oro); }
.benefit-summary {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px;
  background: #fff; border: 0; cursor: pointer; text-align: left; font-weight: 600; font-size: 13.5px;
}
.benefit-summary .left { display: flex; align-items: center; gap: 10px; }
.benefit-summary svg.chev { transition: transform .2s; flex-shrink: 0; }
.benefit-item.is-open .benefit-summary svg.chev { transform: rotate(180deg); }
.benefit-body { display: none; padding: 0 16px 16px; font-size: 13px; }
.benefit-item.is-open .benefit-body { display: block; }
.benefit-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* Ruta al siguiente nivel */
.next-route-grid { display: grid; gap: var(--sp-md); margin-bottom: var(--sp-lg); }
@media (min-width: 760px) { .next-route-grid { grid-template-columns: repeat(4, 1fr); } }
.next-route-stat { text-align: center; }
.next-route-stat .big { font-size: 22px; font-weight: 700; display: block; }
.next-route-stat .lbl { font-size: 11.5px; color: var(--g-gray-mid); }
.projection-table { width: 100%; }

/* Plan de acción */
.plan-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-sm); align-items: flex-end; margin-bottom: var(--sp-lg); }
.plan-toolbar .field { margin: 0; min-width: 150px; flex: 1; }
.plan-toolbar .check { min-height: 44px; }
.plan-count { font-size: 12.5px; color: var(--g-gray-mid); margin-bottom: var(--sp-md); }

.plan-cards { display: flex; flex-direction: column; gap: 10px; }
.plan-card { border: 1px solid var(--g-line-soft); border-radius: var(--r-lg); padding: 14px 16px; }
.plan-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.plan-card-title { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.plan-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plan-detail-toggle { background: none; border: 0; color: var(--g-green); font-size: 12.5px; cursor: pointer; padding: 6px 0 0; display: inline-flex; gap: 4px; align-items: center; }
.plan-detail-body { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--g-line-soft); font-size: 12.5px; }
.plan-detail-body.is-open { display: block; }
.plan-detail-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.plan-detail-body dt { color: var(--g-gray-mid); }
.plan-detail-body dd { margin: 0; }

.priority-pill { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); }
.priority-alta { background: #FBE6E5; color: #A13330; }
.priority-media { background: var(--g-warning-bg); color: var(--g-warning-fg); }
.priority-baja { background: #EFEFEF; color: #6B6B6B; }
.route-flag { background: var(--g-green-tint); color: var(--g-green-text); font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 4px; }

.plan-table-wrap { display: none; }
@media (min-width: 1024px) {
  .plan-cards { display: none; }
  .plan-table-wrap { display: block; }
  .plan-table td, .plan-table th { font-size: 12.5px; }
  .plan-table .col-detail { max-width: 260px; }
}

/* CTA acompañamiento */
.cta-contact { text-align: center; }
.cta-contact .btn-primary { margin-top: var(--sp-md); }

.methodology-box { font-size: 12.5px; color: var(--g-gray-mid); }
.result-footer-actions { display: flex; flex-wrap: wrap; gap: var(--sp-sm); justify-content: center; margin-top: var(--sp-lg); }

/* ---------- Loading / error states ---------- */
.page-loading, .page-error { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px; gap: var(--sp-md); min-height: 50vh; }
.spinner-lg { width: 36px; height: 36px; border: 3px solid var(--g-line-soft); border-top-color: var(--g-green); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- Privacidad ---------- */
.policy-doc h2 { margin-top: var(--sp-xl); }
.policy-doc h2:first-child { margin-top: 0; }
.policy-version-note { font-size: 12px; color: var(--g-gray-mid); margin-top: var(--sp-xl); padding-top: var(--sp-md); border-top: 1px solid var(--g-line-soft); }
.policy-placeholder { color: var(--g-danger); font-style: italic; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--sp-2xl) var(--sp-md); gap: var(--sp-md); }
.notfound .code { font-size: 72px; font-weight: 700; color: var(--g-green); line-height: 1; }

/* ---------- Utilidades ---------- */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); }
.stack-sm > * + * { margin-top: var(--sp-sm); }
.hidden { display: none !important; }

/* Botones sobre el encabezado oscuro de resultados */
.btn-on-dark { color: var(--g-white); border-color: rgba(255, 255, 255, 0.4); }
.btn-on-dark:hover { background: rgba(255, 255, 255, 0.1); color: var(--g-white); }
#result-download-actions { flex-wrap: wrap; }
