/* InsurgentLab · Diagnóstico guiado (V5.1).
   Se apoya en styles.css. Warm White dominante, Emerald estructural, Coral solo como señal.
   Sin sombras, sin degradados, sin tarjetas pesadas. */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.fx { padding: clamp(32px, 5vw, 72px) 0 clamp(64px, 8vw, 112px); min-height: 70vh; }
.fx-wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.fx-wrap.is-result { max-width: 920px; }
.fx-stage:focus { outline: none; }
.fx-stage h2:focus, .fx-stage h3:focus { outline: none; }

/* ---------- modo inmersivo: preguntas y primera pista ---------- */
body.fx-immersive .site-header,
body.fx-immersive .site-footer { display: none; }
body.fx-immersive .fx { padding-top: clamp(20px, 3vw, 40px); min-height: calc(100vh - 72px); }
.fx-shell { border-bottom: 1px solid var(--rule); background: var(--white); }
.fx-shell[hidden] { display: none; }
.fx-shell-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1200px; min-height: 72px; margin: 0 auto; padding: 0 var(--gutter); }
.fx-shell .brand img { display: block; width: 148px; height: auto; }
.fx-exit { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--emerald); font: 600 0.92rem var(--font-body); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.fx-exit:hover { color: var(--graphite); }
.fx-exit:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.fx-exit-s { display: none; }

/* ---------- barra: anterior + progreso por fases (sin totales ni porcentajes) ---------- */
.fx-bar { margin-bottom: clamp(28px, 4vw, 48px); }
.fx-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.fx-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 2px; border: 0; background: none; color: var(--emerald); font: 600 0.92rem var(--font-body); cursor: pointer; }
.fx-back:hover { color: var(--graphite); text-decoration: underline; text-underline-offset: 4px; }
.fx-back:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.fx-progress { margin: 0; font: 600 0.74rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald); text-align: right; }
.fx-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fx-phases li { position: relative; padding-top: 10px; border-top: 3px solid var(--rule); }
.fx-phases li i { position: absolute; left: 0; top: -3px; height: 3px; width: 0; background: var(--emerald); transition: width .35s ease; }
.fx-phases li span { font-size: 0.76rem; line-height: 1.25; color: var(--muted); }
.fx-phases li.is-current span { color: var(--emerald); font-weight: 600; }
.fx-phases li.is-done span { color: var(--graphite); }

/* ---------- tipografía común ---------- */
.fx-eyebrow { margin: 0 0 0.8rem; font: 600 0.78rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fx-stage h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.18; max-width: 26ch; }
.fx-lead { max-width: 40em; margin: 1rem 0 0; color: var(--graphite); font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.6; }
.fx-help { margin: 0.6rem 0 0; font-size: 0.92rem; color: var(--muted); }
.fx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: clamp(24px, 3vw, 36px); }
.fx-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 0; border: 0; background: none; color: var(--emerald); font: 600 0.95rem var(--font-body); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; cursor: pointer; }
.fx-link:hover { color: var(--graphite); }
.fx-link:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.fx .btn > span[aria-hidden] { margin-left: 8px; }
.btn[disabled] { opacity: 0.38; cursor: not-allowed; }

/* ---------- inicio ---------- */
.fx-steps-preview { list-style: none; margin: 1.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.fx-steps-preview li { display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--emerald); font-weight: 600; }
.fx-steps-preview span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--sage); border-radius: 50%; font: 600 0.74rem var(--font-display); }
.fx-facts { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.fx-facts li { position: relative; padding-left: 16px; font-size: 0.95rem; color: var(--graphite); }
.fx-facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

/* ---------- preguntas: filas completas seleccionables, no tarjetas ---------- */
.fx-phase-intro { max-width: 36em; margin: 0 0 1.4rem; padding-left: 14px; border-left: 2px solid var(--coral); font-size: 1.02rem; line-height: 1.5; color: var(--graphite); }
.fx-q fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.fx-opts { list-style: none; margin: clamp(22px, 3vw, 32px) -12px 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.fx-opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.fx-opt { position: relative; display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 14px 12px; margin: 0; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background-color .15s ease; }
.fx-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-mark { flex: 0 0 auto; position: relative; width: 22px; height: 22px; border: 1.5px solid var(--sage); border-radius: 50%; background: var(--paper); transition: border-color .15s ease; }
.fx-opt input[type="checkbox"] + .fx-mark { border-radius: 4px; }
.fx-opt-t { font-size: 1.04rem; line-height: 1.4; color: var(--emerald); }
.fx-opt:hover { background: rgba(0, 68, 56, 0.045); }
.fx-opt:hover .fx-mark { border-color: var(--emerald); }
.fx-opt.is-on { background: rgba(0, 68, 56, 0.07); }
.fx-opt.is-on::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 3px; background: var(--emerald); }
.fx-opt.is-on .fx-mark { border-color: var(--emerald); }
.fx-opt.is-on .fx-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--coral); }
.fx-opt input[type="checkbox"]:checked + .fx-mark { background: var(--emerald); border-color: var(--emerald); }
.fx-opt input[type="checkbox"]:checked + .fx-mark::after { inset: 3px 6px 6px; border-radius: 0; background: none; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fx-opt.is-on .fx-opt-t { font-weight: 600; }
.fx-opt:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: -3px; }
.fx-opt.is-disabled { cursor: not-allowed; }
.fx-opt.is-disabled:hover { background: none; }
.fx-opt.is-disabled .fx-opt-t { color: var(--muted); }
.fx-opt.is-disabled .fx-mark { border-color: var(--rule); }
.fx-other { margin-top: 18px; display: grid; gap: 6px; max-width: 420px; }
.fx-other label { font-weight: 600; font-size: 0.92rem; color: var(--emerald); }
.fx-other label span { font-weight: 400; color: var(--muted); }

/* entradas de texto (sector "otro" y formulario) */
.fx-other input, .fx-field input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--sage); border-radius: 4px; background: var(--paper); color: var(--emerald); font: 400 1rem var(--font-body); }
.fx-other input:focus-visible, .fx-field input:focus-visible { outline: 3px solid var(--coral); outline-offset: 1px; border-color: var(--emerald); }

/* ---------- primera pista: una recompensa sobria ---------- */
.fx-insight { padding-top: clamp(8px, 2vw, 24px); }
.fx-insight-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 1.1rem; font: 600 0.8rem var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: #C2253F; }
.fx-insight-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.fx-stage .fx-insight h2 { max-width: 24ch; font-size: clamp(1.85rem, 3.4vw, 2.7rem); line-height: 1.15; }
.fx-insight-text { max-width: 36em; margin: 1.2rem 0 0; font-size: clamp(1.08rem, 1.45vw, 1.24rem); line-height: 1.6; color: var(--graphite); }
.fx-note { max-width: 40em; margin: 1.6rem 0 0; font-size: 0.92rem; font-style: italic; color: var(--muted); }

/* ---------- resultado ---------- */
.fx-r-head h2 { max-width: 24ch; }
.fx-r-block { margin-top: clamp(32px, 4.5vw, 52px); padding-top: 16px; border-top: 1px solid var(--rule); }
.fx-r-h { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font: 600 0.8rem var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); }
.fx-r-h span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--sage); border-radius: 50%; font-size: 0.72rem; letter-spacing: 0; }

/* contexto como metadatos escaneables */
.fx-r-ctx { border-top-color: var(--rule); }
.fx-ctx { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 28px; margin: 0; }
.fx-ctx > div { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.fx-ctx dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fx-ctx dd { margin: 3px 0 0; font-size: 0.96rem; color: var(--emerald); line-height: 1.35; overflow-wrap: anywhere; }

/* área principal: el bloque con más peso */
.fx-r-main { border-top: 3px solid var(--emerald); padding-top: 20px; }
.fx-r-title { max-width: 26ch; font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.18; }
.fx-r-sym { margin: 0.8rem 0 0; max-width: 38em; color: var(--graphite); font-size: clamp(1.05rem, 1.3vw, 1.15rem); line-height: 1.6; }
.fx-r-impact { margin-top: 1.4rem; }
.fx-r-label { margin: 0 0 0.5rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fx-dash { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-dash li { position: relative; padding-left: 20px; color: var(--graphite); line-height: 1.45; }
.fx-dash li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; border-top: 1.5px solid var(--coral); }
.fx-r-main .fx-link { margin-top: 14px; }

/* lo que no asumiríamos: visible, sin alarma */
.fx-r-mis { padding: 18px 22px 20px; border-top: 0; background: var(--stone); }
.fx-r-mis .fx-r-h span { border-color: var(--graphite); }
.fx-mis { margin: 0; max-width: 34em; font: 600 clamp(1.15rem, 1.8vw, 1.35rem)/1.4 var(--font-display); color: var(--emerald); }
.fx-r-note { margin: 0.6rem 0 0; font-size: 0.94rem; color: var(--graphite); }

.fx-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.fx-tests li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.fx-t-q { margin: 0 0 8px; font: 600 1.06rem/1.35 var(--font-display); color: var(--emerald); }
.fx-t-m { margin: 0; color: var(--graphite); font-size: 0.95rem; line-height: 1.5; }
.fx-t-m span { display: block; margin-bottom: 2px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fx-rel { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; }
.fx-rel li { padding-left: 16px; border-left: 2px solid var(--rule); }
.fx-rel-t { margin: 0 0 6px; font: 600 1.06rem/1.3 var(--font-display); color: var(--emerald); }
.fx-rel-s { margin: 0; color: var(--graphite); font-size: 0.95rem; line-height: 1.45; }
.fx-r-cta p { max-width: 40em; color: var(--graphite); }
.fx-r-cta .fx-actions { margin-top: 16px; }

/* ---------- captura de contacto ---------- */
.fx-lead-box { margin-top: clamp(40px, 5vw, 60px); padding: clamp(22px, 3.2vw, 36px); background: var(--paper); border: 1px solid var(--rule); scroll-margin-top: 24px; }
.fx-lead-box h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); margin-bottom: 0.6rem; }
.fx-lead-copy { margin: 0; font-size: 1.04rem; color: var(--graphite); }
.fx-lead-sub { margin: 0.35rem 0 0.9rem; font-size: 0.93rem; color: var(--muted); }
.fx-demo { margin: 0 0 0.6rem; padding: 10px 12px; border-left: 3px solid var(--lab-orange); background: var(--white); font-size: 0.9rem; color: var(--graphite); }
.fx-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin-top: 12px; }
.fx-field { display: grid; gap: 6px; align-content: start; }
.fx-field label { font-weight: 600; font-size: 0.9rem; color: var(--emerald); }
.fx-field label span { font-weight: 400; color: var(--muted); }
.fx-field input[aria-invalid="true"] { border-color: #C2253F; border-width: 2px; }
.fx-err { margin: 0; font-size: 0.86rem; font-weight: 600; color: #A8102B; }
.fx-err[hidden] { display: none; }
.fx-checks { display: grid; gap: 10px; margin-top: 20px; }
.fx-check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding-top: 2px; font-size: 0.93rem; color: var(--graphite); line-height: 1.45; cursor: pointer; }
.fx-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--emerald); }
.fx-check input:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.fx-check input[aria-invalid="true"] { outline: 2px solid #C2253F; outline-offset: 2px; }
.fx-check-talk { color: var(--emerald); font-weight: 600; }
.fx-checks .fx-err { margin: -6px 0 0 34px; }
.fx-req { color: var(--muted); }
.fx-form-msg { min-height: 1.4em; margin: 12px 0 0; font-size: 0.92rem; }
.fx-form-msg:empty { min-height: 0; }
.fx-form-msg.is-error { color: #A8102B; font-weight: 600; }
.fx-form-msg.is-demo { padding: 10px 12px; border-left: 3px solid var(--lab-orange); background: var(--white); color: var(--graphite); }
.fx-form-msg.is-ok { color: var(--emerald); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .fx-phases li i, .fx-opt, .fx-mark { transition: none; }
}

@media (max-width: 760px) {
  .fx-opts-2 { grid-template-columns: 1fr; }
  .fx-rel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fx-shell-inner { min-height: 60px; }
  .fx-shell .brand img { width: 124px; }
  .fx-exit-l { display: none; }
  .fx-exit-s { display: inline; }
  body.fx-immersive .fx { min-height: calc(100vh - 60px); }
  .fx-phases li span { display: none; }
  .fx-bar { margin-bottom: 26px; }
  .fx-stage h2 { font-size: 1.55rem; }
  .fx-stage .fx-insight h2 { font-size: 1.75rem; }
  .fx-opt { min-height: 54px; gap: 14px; }
  .fx-opt-t { font-size: 1rem; }
  .fx-fields { grid-template-columns: 1fr; }
  .fx-actions .btn { width: 100%; justify-content: center; }
  .fx-ctx { grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .fx-r-mis { padding: 16px; }
}

/* los botones <button> con estilo ghost no deben heredar el fondo del navegador */
.fx .btn-ghost { background: transparent; }
.fx .btn-ghost:hover { background: var(--emerald); color: var(--white); }

/* honeypot antispam: fuera de pantalla, sin foco ni lectura para personas */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }


/* información básica de protección de datos (primera capa) */
.fx-privacy { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.fx-privacy a, .fx-check a { color: var(--emerald); }
