/* =============================================================================
   main.css — Ley 21.719 Diagnostic Tool · MarTech
   Estilos globales compartidos por las páginas de la herramienta
   ============================================================================= */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  /* Fondos — tema claro */
  --navy: #FFFFFF;
  /* fondo principal */
  --navy2: #F4F7FB;
  /* tarjetas / paneles */
  --navy3: #E8EEF6;
  /* inputs / sidebars */
  --navy4: #C8D6E8;
  /* bordes */
  --navy5: #A0B8D0;
  /* bordes fuertes */
  /* Marca MarTech */
  --lime: #9EF01A;
  --lime2: rgba(158, 240, 26, .18);
  --lime3: rgba(158, 240, 26, .30);
  /* Acento */
  --teal: #0891B2;
  /* Estados */
  --red: #DC2626;
  --red2: rgba(220, 38, 38, .10);
  --amber: #D97706;
  --amber2: rgba(217, 119, 6, .10);
  --green: #059669;
  --green2: rgba(5, 150, 105, .10);
  /* Texto — oscuro sobre blanco */
  --text: #0F172A;
  /* texto principal */
  --text2: #0F172A;
  /* texto secundario */
  --text3: #0f172aa2;
  /* etiquetas / placeholders */
  /* Dark fijo para texto sobre botones lime */
  --dark: #1A2740;
  --r: 10px;
  --rlg: 16px;
  --f: 'Lato', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--f);
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.shell--wide {
  max-width: 1000px;
}

/* ── Topbar ────────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--navy4);
  margin-bottom: 44px;
  background: var(--navy);
}

.topbar-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
}

.logo {
  height: 70px;
  width: auto;
  display: block;
}

.law-pill {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 20px;
  padding: 5px 14px;
}

/* ── Error box ─────────────────────────────────────────────────────────────── */
.error-box {
  display: none;
  background: var(--red2);
  border: 1px solid rgba(255, 92, 92, .22);
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 15px;
  color: var(--red);
  margin-bottom: 20px;
}

.error-box.on {
  display: block;
}

/* Cuando el contenido ya es una tarjeta con su propio fondo (.cf-error-box:
   pago, bloqueo por CF, confirmación) el contenedor rojo de alerta de texto
   plano sobra — queda solo como wrapper neutro. */
.error-box.is-card {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* ── Risk pills (shared: index results + admin table) ──────────────────────── */
.risk-pill {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 10px;
}

.r-critico {
  background: var(--red2);
  color: var(--red);
  border: 1px solid rgba(255, 92, 92, .25);
}

.r-alto {
  background: rgba(255, 120, 0, .1);
  color: #FF8C00;
  border: 1px solid rgba(255, 140, 0, .25);
}

.r-medio {
  background: var(--amber2);
  color: var(--amber);
  border: 1px solid rgba(255, 181, 71, .25);
}

.r-bajo {
  background: var(--green2);
  color: var(--green);
  border: 1px solid rgba(46, 204, 138, .25);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--navy4);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.foot-logo {
  height: 22px;
  opacity: .5;
}

.foot-text {
  font-size: 15px;
  color: var(--text3);
  line-height: 1.5;
}

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim {
  animation: fadeUp .38s ease both;
}

.anim:nth-child(1) {
  animation-delay: .04s;
}

.anim:nth-child(2) {
  animation-delay: .08s;
}

.anim:nth-child(3) {
  animation-delay: .12s;
}

.anim:nth-child(4) {
  animation-delay: .16s;
}

.anim:nth-child(5) {
  animation-delay: .20s;
}

.anim:nth-child(6) {
  animation-delay: .24s;
}


/* =============================================================================
   INDEX — Hero & Search
   ============================================================================= */
.hero {
  text-align: center;
  padding: 8px 0 48px;
}

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lime-text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--lime2);
}

.hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
  color: #0F172A;
  margin-bottom: 14px;
}

.hero p.hero-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.2;
  max-width: 560px;
  margin: 0 auto 20px;
}

.hero p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
  /* max-width: 520px; */
  margin: 0 auto 36px;
}

.hero p.hero-disclaimer {
  font-size: 15px;
  color: #0F172A;
  line-height: 1.2;
  text-align: center;
  width: 100%;
  margin: 20px;
}

.search-wrap {
  max-width: 100%;
  margin: 0 auto;
}

/* ── Email gate — único dato pedido antes de analizar ───────────────────────*/
.email-gate-box {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px;
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 14px;
  text-align: left;
}

.email-gate-box .reg-label {
  display: block;
  margin-bottom: 6px;
}

.email-gate-box .reg-input {
  margin-bottom: 6px;
}

.email-gate-box .reg-consent-row {
  margin: 10px 0;
}

.email-gate-box .reg-consent-row:first-of-type {
  margin-top: 14px;
}

.email-gate-box .reg-consent-row:last-of-type {
  margin-bottom: 18px;
}

.email-gate-box altcha-widget {
  display: block;
  margin: 0 0 14px;
  --altcha-max-width: 100%;
  /* Paleta del sitio — logo y firma "protected by ALTCHA" quedan visibles
     (indican seguridad) pero heredan color de marca en vez del tema default. */
  --altcha-color-base: var(--navy);
  --altcha-color-base-content: var(--text);
  --altcha-border-color: var(--navy4);
  --altcha-border-width: 1.5px;
  --altcha-border-radius: 8px;
  --altcha-color-neutral: var(--navy3);
  --altcha-color-neutral-content: var(--text3);
  --altcha-checkbox-border-color: var(--navy5);
  --altcha-color-primary: var(--lime);
  --altcha-color-primary-content: var(--dark);
  --altcha-color-success: var(--green);
  --altcha-color-success-content: #fff;
  --altcha-color-error: var(--red);
  --altcha-color-error-content: #fff;
  --altcha-spinner-color: var(--lime);
}

.altcha-checkbox input:checked {
  background-color: var(--lime) !important;
  border-color: var(--lime) !important;
}

.altcha-footer p {
  font-size: 10px;
}

.email-gate-box .run-btn {
  width: 100%;
}

.search-row {
  display: flex;
  align-items: stretch;
  background: transparent;
  border: none;
  border-radius: 100px;
  overflow: hidden;
  transition: box-shadow .2s;
  max-width: 611px;
  margin: 0 auto;
}

.search-row:focus-within {
  box-shadow: 0 0 0 3px rgba(209, 243, 105, .35);
}

.url-icon {
  display: flex;
  align-items: center;
  padding: 0 12px 0 20px;
  color: var(--text2);
  flex-shrink: 0;
  background: transparent;
  border: 1px solid #CBD5E1;
  border-right: none;
  position: absolute;
  height: 48px;
  border-top-left-radius: 100px;
  border-bottom-left-radius: 100px;
}

.url-icon svg {
  width: 14px;
  height: 14px;
}

#inp-url {
  flex: 1;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-left: none;
  outline: none;
  color: #0F172A;
  font-family: var(--f);
  font-size: 15px;
  padding: 0 20px 0 45px;
  min-width: 0;
  height: 48px;
}

#inp-url::placeholder {
  color: #666676;
}

.run-btn {
  background: #D1F369;
  color: #000;
  border: none;
  font-family: var(--f);
  font-size: 16px;
  font-weight: 400;
  padding: 0 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
  height: 48px;
}

.run-btn:hover {
  background: #c2f043;
}

.run-btn:active {
  background: #a9d92e;
}

.run-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: #D1F369;
}

.run-btn svg {
  width: 14px;
  height: 14px;
}

.features {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

.feat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  color: var(--text3);
}

.feat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}


/* =============================================================================
   INDEX — Progress
   ============================================================================= */
.progress-wrap {
  display: none;
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: var(--rlg);
  padding: 40px;
  text-align: center;
  margin-bottom: 24px;
}

.progress-wrap.on {
  display: block;
}

.prog-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.prog-eta {
  font-size: 15px;
  color: var(--text3);
  margin-bottom: 26px;
}

.prog-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto 28px;
}

.prog-pct {
  font-size: 15px;
  font-weight: 700;
  color: var(--lime-text);
  flex-shrink: 0;
  min-width: 2.6em;
  transition: color .3s;
}

.prog-bar {
  height: 8px;
  flex: 1;
  background: var(--navy3);
  border-radius: 4px;
  overflow: hidden;
}

.prog-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--lime);
  border-radius: 4px;
  transition: width .5s ease;
}

.steps {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

/* Cada paso oculto ocupa altura 0 real (no solo opacity) — así el cuadro
   crece/se achica de verdad a medida que aparecen los pasos, en vez de
   reservar espacio en blanco desde el inicio. grid-template-rows anima la
   altura de contenido variable sin medir píxeles a mano (0fr → 1fr). */
.step {
  display: grid;
  grid-template-rows: 0fr;
  color: var(--text3);
  opacity: 0;
  transition: grid-template-rows .45s ease, opacity .3s ease, color .3s;
}

.step.shown {
  grid-template-rows: 1fr;
  opacity: 1;
}

.step.active {
  color: var(--lime-text);
}

.step.done {
  color: var(--green);
}

.step-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 10px;
}

/* Icono a la izquierda del texto del paso: vacío mientras no se alcanza,
   spinner girando mientras está en curso (.active), check al completarse
   (.done) — un solo contenedor que anima su ancho para que ninguno de los
   dos estados "salte" al aparecer/desaparecer. */
.step-icon {
  position: relative;
  width: 0;
  height: 16px;
  margin-right: 0;
  flex-shrink: 0;
  transition: width .3s ease, margin-right .3s ease;
}

.step.active .step-icon,
.step.done .step-icon {
  width: 16px;
  margin-right: 8px;
}

.step-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(5, 150, 105, .22);
  border-top-color: var(--green);
  opacity: 0;
  transition: opacity .2s ease;
}

.step.active .step-spinner {
  opacity: 1;
  animation: step-spin .8s linear infinite;
}

@keyframes step-spin {
  to { transform: rotate(360deg); }
}

.step-check {
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.step.done .step-check {
  opacity: 1;
  transform: scale(1);
}


/* =============================================================================
   INDEX — Results
   ============================================================================= */
#results {
  display: none;
}

#results.on {
  display: block;
}

/* URLs inspeccionadas */
.url-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 10px;
}

/* Listado plano de las URLs reales, además de los botones de arriba */
.url-plain-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.url-plain-list li {
  font-size: 15px;
  line-height: 1.5;
  word-break: break-all;
}

.url-plain-label {
  color: var(--text2);
  font-weight: 600;
  margin-right: 4px;
}

.url-plain-link {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.url-plain-link:hover {
  color: var(--text);
}

.url-key-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  background: rgba(15, 163, 177, .08);
  border: 1px solid rgba(15, 163, 177, .2);
  border-radius: 6px;
  padding: 4px 10px;
  transition: background .15s;
}

.url-key-link:hover {
  background: rgba(15, 163, 177, .16);
}

.pdf-badge {
  font-size: 15px;
  font-weight: 700;
  color: #B91C1C;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 3px;
  padding: 1px 4px;
  vertical-align: middle;
  letter-spacing: .3px;
}

.url-fail-badge {
  font-size: 15px;
  color: var(--amber);
  background: var(--amber2);
  border: 1px solid rgba(255, 181, 71, .2);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ── Cloudflare / Bot protection warning ────────────────────────────────── */

.cf-warning {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255, 181, 71, .08);
  border: 1px solid rgba(255, 181, 71, .35);
  border-left: 4px solid var(--amber);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--text1);
  line-height: 1.55;
}

.cf-warning-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cf-warning-body {
  flex: 1;
}

.cf-warning-title {
  font-weight: 700;
  color: var(--amber);
  font-size: 15px;
  margin-bottom: 4px;
}

.cf-warning-body p {
  margin: 0 0 6px;
  color: var(--text2);
}

.cf-warning-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text2);
}

.cf-warning-body ul li {
  margin-bottom: 3px;
}

/* Error box variant para CF_BLOCKED (pantalla completa, no banner) */
.cf-error-box {
  background: var(--navy2);
  border: 1px solid rgba(255, 181, 71, .4);
  border-radius: var(--r);
  padding: 28px 24px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 24px;
}

.cf-error-box .cf-ico {
  font-size: 40px;
  margin-bottom: 12px;
}

.cf-error-box h3 {
  color: var(--amber);
  font-size: 17px;
  margin: 0 0 8px;
}

.cf-error-box p {
  color: var(--text2);
  font-size: 15px;
  margin: 0 0 6px;
  line-height: 1.55;
}

.cf-error-box .cf-tips {
  text-align: left;
  background: var(--navy3);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
}

.cf-error-box .cf-tips strong {
  color: var(--text1);
  font-size: 15px;
}

/* Variante neutra para las pantallas de pago — a diferencia de un error real
   (CF_BLOCKED, etc.), no pagar no es una falla: gris/neutro, sin acentos
   ámbar/rojo, con los mismos colores de marca que el resto del sitio. */
.cf-payment-box {
  border-color: var(--navy4);
}

.cf-payment-box h3 {
  color: var(--text);
}

.pay-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0 !important;
  font-size: 12px !important;
  color: var(--text3) !important;
}

.pay-provider .vp-logo {
  height: 16px;
  width: auto;
}

/* ── Botón de pago CTA ──────────────────────────────────────────────────────── */
.pay-cta-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 28px;
  background: #D1F369;
  color: #000;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .15s;
  text-decoration: none;
}

.pay-cta-btn:hover:not(:disabled) {
  background: #c2f043;
  transform: translateY(-1px);
}

.pay-cta-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@media print {
  .cf-warning {
    display: none;
  }
}

/* ── Sección final: Urls analizadas ─────────────────────────────────────── */

.urls-section {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.urls-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}

.url-key-subsection,
.url-pages-subsection {
  margin-bottom: 14px;
}

.url-key-sublabel {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.url-list-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px 16px;
}

.url-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 3px 0;
  font-size: 15px;
  line-height: 1.4;
}

.url-row a {
  color: var(--text2);
  text-decoration: none;
  word-break: break-all;
  transition: color .15s;
}

.url-row a:hover {
  color: var(--lime-text);
}

.url-row.fail-url {
  color: var(--amber);
}

.url-row.fail-url span:last-child {
  word-break: break-all;
}

.url-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text3);
  margin-top: 5px;
}

.ok-url .url-dot {
  background: var(--green);
}

.fail-url .url-dot {
  background: var(--amber);
}

.url-key-link {
  color: var(--teal);
}

@media print {
  .urls-section {
    page-break-before: always;
    border: none;
    padding: 0;
    background: transparent;
  }

  .urls-section-title {
    color: var(--text);
    font-size: 15px;
    margin-bottom: 16px;
  }

  .url-key-sublabel {
    color: var(--text2);
  }

  .url-list-full {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px 12px;
  }

  .url-row a {
    color: var(--text);
  }

  .url-row.fail-url {
    color: var(--amber);
  }

  .url-key-link {
    color: #0FA3B1;
    border-color: rgba(15, 163, 177, .3);
  }
}

/* Título y pestañas de navegación del resultado */
.result-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #0F172A;
  margin-bottom: 16px;
}

.result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
  justify-content: center;
}

.result-tab {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 20px;
  border: 1px solid #475569;
  border-radius: 20px;
  color: #475569;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}

.result-tab:hover {
  background: var(--navy2);
}

/* Score hero */
.score-hero {
  background: #F8FAFC;
  border: none;
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
}

.score-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #0F172A;
  line-height: 1.2;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-pct {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.015em;
  flex-shrink: 0;
}

.score-bar {
  flex: 1;
}

.score-desc {
  font-size: 16px;
  color: #0F172A;
  line-height: 1.2;
}

/* Índice de hallazgos dentro del hero */
.hero-index {
  border-top: 1px solid #E2E8F0;
  padding-top: 14px;
  margin-top: 2px;
}

.hero-index-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text3);
  margin-bottom: 10px;
}

.hero-index-list {
  list-style: decimal;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.hero-index-item {
  font-size: 15px;
  color: var(--text2);
}

.hero-index-item a {
  color: var(--text2);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color .15s;
}

.hero-index-item a:hover {
  color: var(--text);
}

/* Resalte breve al saltar desde el índice a una tarjeta de hallazgo */
.fcard.flash {
  animation: fcard-flash 1.4s ease;
}

@keyframes fcard-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(99, 155, 6, .5);
  }

  100% {
    box-shadow: 0 0 4px rgba(0, 0, 0, .14);
  }
}

/* ── Checklist Diagnóstico Ley 21.719 — sección completa ───────────────────── */
.diag-full-wrap {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: var(--rlg);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.diag-full-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.diag-full-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.diag-full-score {
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}

/* Grid de secciones: 2-3 columnas según contenido */
.diag-secs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.diag-secs-grid--single {
  grid-template-columns: 1fr;
}

/* Tarjeta de sección */
.diag-sec {
  background: #fff;
  border: 1px solid var(--navy4);
  border-radius: var(--r);
  padding: 14px 16px;
}

.diag-sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--navy3);
}

.diag-sec-name {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text2);
}

.diag-sec-score {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

/* Lista de ítems */
.diag-sec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diag-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
}

.diag-row-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.diag-row-check img {
  width: 24px;
  height: 24px;
}

.diag-row-label {
  flex: 1;
  color: var(--text2);
  line-height: 1.35;
}

.diag-row.has-sublist {
  align-items: flex-start;
}

.diag-row.has-sublist .diag-row-check {
  margin-top: 2px;
}

.diag-row-sublist {
  list-style: disc;
  margin: 6px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diag-row-sublist li {
  font-size: 15px;
  color: var(--text3, var(--text2));
  word-break: break-all;
}

.diag-badge {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}

.diag-ok {
  background: rgba(5, 150, 105, .10);
  color: var(--green);
}

.diag-fail {
  background: rgba(220, 38, 38, .08);
  color: var(--red);
}

@media (max-width: 700px) {
  .diag-secs-grid {
    grid-template-columns: 1fr;
  }

  .diag-full-wrap {
    padding: 16px;
  }
}

/* ── Hallazgos agrupados por categoría (premium) ───────────────────────────── */
.cat-groups-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Todo el acordeón (header + hallazgos + checklist) es UNA sola caja gris —
   nada dentro se dibuja como tarjeta separada. */
.cat-group {
  margin-bottom: 14px;
  border-radius: var(--r);
  border: none;
  background: #F8FAFC;
  box-shadow: 0 0 4px rgba(0, 0, 0, .14);
  overflow: hidden;
}

.cat-group-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.cat-group-hdr:hover {
  background: var(--navy3);
}

.cat-group-hdr h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: #0F172A;
  margin: 0;
  flex: 1;
}

.cat-group-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Body del grupo — empieza cerrado, se expande con la clase .open. El borde
   superior separa visualmente el header del contenido dentro de la misma caja. */
.cat-group-body {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--navy4);
}

.cat-group-body.open {
  display: block;
  padding-top: 18px;
}

/* Hallazgos de la categoría — lista consolidada, arriba del checklist */
.cat-findings {
  display: flex;
  flex-direction: column;
}

/* Etiqueta "Checklist" antes de la lista cumple/no cumple de la categoría */
.cat-checklist-label {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text3);
  margin-bottom: 10px;
  margin-top: 10px;
}

.cat-group-findings {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cat-grid-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #0F172A;
  margin-bottom: 16px;
}

/* Categories grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

@media (max-width: 720px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
}

.cat-card {
  background: #F8FAFC;
  border: none;
  border-radius: var(--r);
  padding: 18px;
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s;
}

.cat-card:hover {
  box-shadow: 0 0 8px rgba(0, 0, 0, .16);
}

.cat-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-ico {
  font-size: 18px;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fig-ico {
  display: block;
  flex-shrink: 0;
}

.cat-nm {
  font-size: 18px;
  font-weight: 600;
  color: #0F172A;
}

.cat-pct-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-pct {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  flex-shrink: 0;
}

.bar-track {
  height: 7px;
  background: #E2E8F0;
  border-radius: 40px;
  overflow: hidden;
  flex: 1;
}

.bar-fill {
  height: 100%;
  border-radius: 40px;
  transition: width 1.1s cubic-bezier(.4, 0, .2, 1);
}

.bg {
  background: #639B06;
}

.ba {
  background: #F59E0B;
}

.cat-sc {
  font-size: 15px;
  color: #0F172A;
  line-height: 1.4;
}

.cat-sc b {
  color: var(--text);
  font-weight: 600;
}

/* Checklist de criterios por categoría */
.cat-checklist {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--navy4);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cat-checklist li {
  font-size: 15px;
  line-height: 1.4;
  padding: 2px 4px;
  border-radius: 4px;
}

.chk-ok {
  color: var(--green);
}

.chk-fail {
  color: var(--red);
}

/* Divider & section headers */
.divider {
  height: 1px;
  background: var(--navy4);
  margin: 24px 0;
}

.sec-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.sec-hdr-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.sec-hdr-ico img {
  width: 3px;
  height: 14px;
}

.sec-hdr-ico.crit {
  background: #EF4444;
}

.sec-hdr-ico.med {
  background: #F59E0B;
}

.sec-hdr h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #0F172A;
  text-transform: none;
}

.sev-tag {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.t-crit {
  background: var(--red2);
  color: var(--red);
  border: 1px solid rgba(255, 92, 92, .2);
}

.t-med {
  background: var(--amber2);
  color: var(--amber);
  border: 1px solid rgba(255, 181, 71, .2);
}

/* Finding — sin ícono ni color propio: título + párrafo explicativo, como
   una fila más dentro de la caja gris del acordeón de su categoría. */
.fcard {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--navy4);
  padding: 14px 0;
}

.fico {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.ftitle {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.fexplain {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.55;
  margin-top: 6px;
}

/* Solo las citas a la ley van en itálica */
.law-cite {
  font-style: italic;
}

.floc {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 15px;
  color: var(--text2);
  margin-top: 8px;
  opacity: .85;
}

/* display:flex + width/height explícitos evita que el ícono quede recortado
   por line-height/vertical-align en distintos navegadores. */
.floc-ico {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  display: block;
}

.floc-text {
  min-width: 0;
}

.floc-label {
  font-weight: 600;
}

.floc a {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}

.diag-row-loc {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 4px;
  font-size: 15px;
  color: var(--text2);
  opacity: .8;
}

/* Cursiva reservada solo para citas de ley (.law-cite) — el detalle de
   incumplimiento/cumplimiento (evidencia real del sitio) va en texto normal. */
.diag-row-evidencia {
  opacity: .85;
}

.fchev {
  color: var(--text2);
  font-size: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}

.fchev img {
  width: 32px;
  height: 32px;
}

.fchev.open {
  transform: rotate(180deg);
}

/* Acciones recomendadas — resumen tipo lista de tareas antes del PDF */
.acciones-section {
  background: #F8FAFC;
  border: none;
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.acciones-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accion-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* accion-text (la acción a tomar) debe verse como el texto principal;
   accion-meta (el título del hallazgo al que corresponde) es solo contexto
   secundario — antes estaba al revés: meta se veía más grande y en negro
   puro, dando la impresión visual de que el título era la acción. */
.accion-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.accion-meta {
  color: var(--text2);
  font-family: Lato;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: -0.1px;
  opacity: .75;
}

/* CTA card */
.cta-card {
  background: linear-gradient(135deg, var(--navy2) 0%, var(--navy3) 100%);
  border: 1px solid var(--navy4);
  border-radius: var(--rlg);
  padding: 28px;
  text-align: center;
  margin-bottom: 28px;
}

.cta-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cta-card p {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 18px;
  line-height: 1.6;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: var(--dark);
  font-family: var(--f);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}

.cta-btn:hover {
  background: #b5ff30;
}

.reset-btn {
  display: block;
  margin: 20px auto 0;
  font-size: 15px;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f);
  text-decoration: underline;
  transition: color .2s;
}

.reset-btn:hover {
  color: var(--lime-text);
}

/* Print button */
.print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--navy3);
  border: 1px solid var(--navy4);
  color: var(--text2);
  font-family: var(--f);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  margin: 0 auto 20px;
  transition: background .15s;
}

.print-btn:hover {
  background: var(--navy4);
  color: var(--text);
}


/* =============================================================================
   ADMIN — Stats & Table
   ============================================================================= */
.page-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-hdr h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.page-hdr h1 span {
  color: var(--lime-text);
}

.back-link {
  font-size: 15px;
  color: var(--text3);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}

.back-link:hover {
  color: var(--lime-text);
}

.stats {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.stat {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: var(--r);
  padding: 14px 20px;
  flex: 1;
  min-width: 140px;
}

.stat-val {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 2px;
}

.stat-lbl {
  font-size: 15px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-inp {
  flex: 1;
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--text);
  font-family: var(--f);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

.search-inp:focus {
  border-color: var(--lime);
}

.search-inp::placeholder {
  color: var(--text3);
}

.tbl-wrap {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: var(--r);
  overflow: hidden;
}

.tbl-head {
  display: grid;
  grid-template-columns: 48px 1fr 80px 90px 130px 110px;
  background: var(--navy3);
  border-bottom: 1px solid var(--navy4);
}

#tbl-body .empty {
  padding: 15px;
}

.tbl-head span {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text2);
  padding: 10px 14px;
}

.tbl-row {
  display: grid;
  grid-template-columns: 48px 1fr 80px 90px 130px 110px;
  border-bottom: 1px solid var(--navy4);
  transition: background .15s;
  cursor: default;
}

.tbl-row:last-child {
  border-bottom: none;
}

.tbl-row:hover {
  background: rgba(0, 0, 0, .03);
}

.tbl-cell {
  padding: 12px 14px;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.id-cell {
  color: var(--text3);
  font-weight: 500;
}

.url-cell {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  padding: 12px 14px;
  align-self: center;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  width: 40px;
  height: 24px;
  border-radius: 5px;
}

.s-ok {
  background: var(--green2);
  color: var(--green);
}

.s-med {
  background: var(--amber2);
  color: var(--amber);
}

.s-bad {
  background: var(--red2);
  color: var(--red);
}

.date-cell {
  font-size: 15px;
  color: var(--text3);
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
}

.btn-ver {
  font-size: 15px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 5px;
  background: var(--lime);
  color: var(--dark);
  border: 1px solid var(--lime);
  text-decoration: none;
  transition: background .15s, opacity .15s;
  cursor: pointer;
  font-family: var(--f);
  white-space: nowrap;
}


.btn-ver:hover {
  background: var(--lime3);
}

.btn-del {
  font-size: 15px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--red2);
  color: var(--red);
  border: 1px solid rgba(255, 92, 92, .2);
  cursor: pointer;
  font-family: var(--f);
  transition: background .15s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOPBAR — acciones de sesión
   ═══════════════════════════════════════════════════════════════════════════ */

.topbar-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.topbar-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .04em;
  transition: color .2s;
}

.topbar-link:hover {
  color: var(--lime-text);
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  background: rgb(209, 243, 105);
  border: 1px solid var(--lime);
  color: var(--dark);
  font-family: var(--f);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}

.demo-btn:hover {
  background: #c2f043;
}

/* ── User menu (icono + dropdown "Historial" / "Cerrar sesión") ─────────── */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.user-menu-btn img {
  width: 20px;
  height: 24px;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: #F8FAFC;
  border-radius: var(--r);
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
  white-space: nowrap;
  z-index: 50;
}

.user-menu-dropdown[hidden] {
  display: none;
}

.user-menu-dropdown:not([hidden]) {
  display: flex;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -.21px;
  color: #0F172A;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.user-menu-item img {
  width: 24px;
  height: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN — stat value colors (por ID)
   ═══════════════════════════════════════════════════════════════════════════ */

#st-avg {
  color: var(--lime-text);
}

#st-crit {
  color: var(--red);
}

#st-ok {
  color: var(--green);
}

.foot--spaced {
  margin-top: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

body.login-page {
  background: var(--navy);
  margin: 0;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  height: 70px;
}

.login-logo .logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--lime-text);
  letter-spacing: -.02em;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.login-sub {
  font-size: 15px;
  color: var(--text2);
  margin: 0 0 28px;
  line-height: 1.5;
}

.login-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.login-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--navy3);
  border: 1px solid var(--navy4);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--f);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s;
  margin-bottom: 16px;
}

.login-input::placeholder {
  color: var(--text3);
}

.login-input:focus {
  border-color: var(--lime);
}

.login-input.code-input {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 12px;
  text-align: center;
  padding: 16px;
}

.login-btn {
  width: 100%;
  background: var(--lime);
  color: var(--dark);
  border: none;
  border-radius: 8px;
  font-family: var(--f);
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: 4px;
}

.login-btn:hover {
  opacity: .88;
}

.login-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.login-err {
  background: var(--red2);
  border: 1px solid rgba(255, 92, 92, .3);
  border-radius: 8px;
  color: var(--red);
  font-size: 15px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: none;
}

.login-err.on {
  display: block;
}

.login-ok {
  background: rgba(158, 240, 26, .18);
  border: 1px solid rgba(158, 240, 26, .45);
  border-radius: 8px;
  color: var(--lime-text);
  font-size: 15px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: none;
  line-height: 1.5;
}

.login-ok.on {
  display: block;
}

.login-step {
  display: none;
}

.login-step.on {
  display: block;
}

.back-link-sm {
  display: inline-block;
  font-size: 15px;
  color: var(--text3);
  cursor: pointer;
  margin-top: 14px;
  text-decoration: underline;
}

.back-link-sm:hover {
  color: var(--text2);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 15px;
  color: var(--text3);
}

.login-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 8px;
}

.login-footer-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color .15s;
}

.login-footer-links a:hover {
  color: #3D6B00;
  text-decoration: underline;
}

.login-footer-copy {
  font-size: 15px;
  color: var(--text3);
}

.login-footer a {
  color: var(--lime-text);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEMO PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.demo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(158, 240, 26, .07);
  border: 1px solid rgba(158, 240, 26, .2);
  border-radius: 10px;
  padding: 11px 18px;
  margin: 16px auto 0;
  max-width: 860px;
  font-size: 15px;
  color: var(--text2);
}

.demo-banner-ico {
  color: var(--lime-text);
  font-size: 15px;
}

.demo-banner-cta {
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--lime-text);
  text-decoration: none;
  white-space: nowrap;
}

.demo-banner-cta:hover {
  text-decoration: underline;
}

.search-row--demo {
  opacity: .55;
  pointer-events: none;
}

.inp-demo-disabled {
  cursor: not-allowed;
}

.run-btn--demo {
  opacity: .5;
  cursor: not-allowed;
}

.demo-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 10px;
}

.demo-cta-text {
  font-size: 15px;
  color: var(--text2);
  flex: 1;
}

.demo-cta-btn {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  background: var(--lime);
  border-radius: 7px;
  padding: 7px 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s;
}

.demo-cta-btn:hover {
  opacity: .85;
}

.demo-cta-btn--lg {
  font-size: 15px;
  padding: 12px 28px;
}


.demo-bottom-cta {
  margin: 40px 0 0;
  padding: 36px 24px;
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 14px;
  text-align: center;
}

.demo-bottom-inner {
  max-width: 480px;
  margin: 0 auto;
}

.demo-bottom-cta h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text1);
  margin: 0 0 10px;
}

.demo-bottom-cta p {
  font-size: 15px;
  color: var(--text2);
  margin: 0 0 20px;
  line-height: 1.5;
}

.demo-cta-btn--lg {
  display: inline-block;
  font-size: 15px;
  padding: 12px 28px;
}


/* =============================================================================
   Páginas legales: Privacidad, Cookies, Términos
   ============================================================================= */

.legal-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.legal-hero {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--navy4);
}

.legal-hero .eyebrow {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3D6B00;
  margin-bottom: 8px;
}

.legal-hero h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}

.legal-hero .meta {
  font-size: 15px;
  color: var(--text3);
}

.legal-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.legal-nav a {
  font-size: 15px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid var(--navy4);
  color: var(--text2);
  transition: all .15s;
}

.legal-nav a:hover {
  border-color: var(--lime);
  color: #3D6B00;
}

.legal-nav a.active {
  background: var(--lime);
  color: #1A2740;
  border-color: var(--lime);
}

.legal-toc {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 36px;
}

.legal-toc h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 12px;
}

.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}

.legal-toc li {
  font-size: 15px;
  color: var(--text2);
}

.legal-toc a {
  color: var(--text2);
  text-decoration: none;
}

.legal-toc a:hover {
  color: #3D6B00;
  text-decoration: underline;
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid var(--lime);
  padding-left: 12px;
  margin: 0 0 14px;
}

.legal-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 8px;
}

.legal-section p,
.legal-section li {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  margin: 0 0 10px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 20px;
  margin: 0 0 12px;
}

.legal-section li {
  margin-bottom: 5px;
}

.legal-highlight {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
}

.legal-highlight strong {
  color: var(--text);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 14px 0;
}

.legal-table th {
  background: var(--navy3);
  color: var(--text);
  font-weight: 600;
  padding: 9px 12px;
  text-align: left;
  border: 1px solid var(--navy4);
}

.legal-table td {
  padding: 9px 12px;
  border: 1px solid var(--navy4);
  color: var(--text2);
  vertical-align: top;
}

.legal-table tr:nth-child(even) td {
  background: var(--navy2);
}

.arco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.arco-card {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 8px;
  padding: 12px 14px;
}

.arco-card strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.arco-card span {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.5;
}

.legal-contact-box {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.legal-contact-box .contact-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.legal-contact-box p {
  margin: 0;
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
}

.legal-contact-box a {
  color: #3D6B00;
  font-weight: 600;
}

.legal-divider {
  border: none;
  border-top: 1px solid var(--navy4);
  margin: 36px 0;
}

.disclaimer-box {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
  color: #78350F;
  line-height: 1.65;
}

.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 15px;
  color: #1E3A5F;
  line-height: 1.65;
}

/* Política de Cookies */
.cookie-type-badge {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.badge-necesaria {
  background: #EDF7E0;
  color: #3D6B00;
}

.badge-no {
  background: #F1F5F9;
  color: #64748B;
}

.badge-analitica {
  background: #EFF6FF;
  color: #1D4ED8;
}

.badge-marketing {
  background: #FFF7ED;
  color: #C2410C;
}

.browser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.browser-card {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 8px;
  padding: 12px 14px;
}

.browser-card strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.browser-card a {
  font-size: 15px;
  color: #3D6B00;
}

@media (max-width: 600px) {
  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  .arco-grid {
    grid-template-columns: 1fr;
  }

  .browser-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Formulario ARCO+ ────────────────────────────────────────────────────────*/

.arco-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.arco-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.arco-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.arco-field--full {
  grid-column: 1 / -1;
}

.arco-field label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.arco-field .req {
  color: #DC2626;
}

.arco-field .opt {
  font-weight: 400;
  color: var(--text3);
  font-size: 15px;
}

.arco-field input,
.arco-field select,
.arco-field textarea {
  background: var(--navy2);
  border: 1.5px solid var(--navy4);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  font-family: var(--f);
  transition: border-color .15s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.arco-field input:focus,
.arco-field select:focus,
.arco-field textarea:focus {
  border-color: var(--lime);
  background: #fff;
}

.arco-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238099B0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.arco-field textarea {
  resize: vertical;
  min-height: 120px;
}

.field-err {
  font-size: 15px;
  color: #DC2626;
  display: none;
}

.char-count {
  font-size: 15px;
  color: var(--text3);
  text-align: right;
  margin-top: 2px;
}

.arco-check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.arco-check-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--lime);
  width: 15px;
  height: 15px;
}

.arco-check-label span {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.55;
}

.arco-check-label a {
  color: #3D6B00;
}

.arco-form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #991B1B;
}

.arco-submit-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.arco-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: var(--dark);
  font-weight: 700;
  font-size: 15px;
  font-family: var(--f);
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s;
}

.arco-submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.arco-submit-btn:not(:disabled):hover {
  opacity: .87;
}

.arco-btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, .2);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.arco-btn-spinner.visible {
  display: inline-block;
}

.arco-legal-note {
  font-size: 15px;
  color: var(--text3);
  line-height: 1.5;
  margin: 0;
}

.arco-success {
  text-align: center;
  padding: 36px 24px;
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
  border-radius: 12px;
  margin-bottom: 24px;
}

.arco-success-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: #16A34A;
}

.arco-success h3 {
  font-size: 18px;
  font-weight: 700;
  color: #15803D;
  margin: 0 0 10px;
}

.arco-success p {
  font-size: 15px;
  color: #166534;
  margin: 0 0 8px;
  line-height: 1.6;
}

.arco-success a {
  color: #15803D;
  font-weight: 600;
}

@media (max-width: 600px) {
  .arco-form-row {
    grid-template-columns: 1fr;
  }

  .arco-submit-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Paywall (plan gratuito) — informe parcial, un único CTA de pago ─────────*/

.paywall-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: #F8FAFC;
  border-radius: var(--r);
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
  padding: 28px 24px;
  margin-bottom: 24px;
}

.paywall-cta-text {
  font-size: 15px;
  color: var(--text2);
  margin: 0;
  max-width: 480px;
  line-height: 1.5;
}

.paywall-btn {
  display: inline-block;
  background: var(--lime);
  color: var(--dark);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--f);
  transition: opacity .15s;
}

.paywall-btn:hover {
  opacity: .85;
}

.paywall-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Hallazgo bloqueado — contenido real y parcial (título + resumen breve),
   sin datos falsos ni difuminado; el detalle completo queda tras el pago. */
.fcard-locked .flock-note {
  font-size: 15px;
  font-style: italic;
  color: var(--text3);
  margin-top: 8px;
}

/* Nota de categoría / checklist bloqueados por el plan gratuito */
.cat-group-body>.flock-note {
  font-size: 15px;
  margin: 0;
  margin-top: 12px;
}

.accion-item-locked .accion-text {
  color: var(--text2);
}

.accion-item-locked .accion-meta {
  font-style: italic;
}

/* ── Cookie Banner ─────────────────────────────────────────────────────────*/
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border-top: 2px solid #9EF01A;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, .18);
  padding: 20px 24px;
  transition: bottom .35s cubic-bezier(.4, 0, .2, 1);
  color: #1A2740;
}

.cookie-banner.cb-visible {
  bottom: 0;
}

.cb-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cb-text {
  flex: 1;
  min-width: 340px;
}

.cb-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #1A2740;
}

.cb-text p {
  font-size: 15px;
  color: #4A6B8A;
  line-height: 1.5;
  margin: 0;
}

.cb-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

.cb-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  line-height: 1;
}

.cb-btn--sec {
  background: #F4F7FB;
  color: #1A2740;
  border: 1px solid #C8D6E8;
}

.cb-btn--sec:hover {
  background: #E8EEF6;
}

.cb-btn--cfg {
  background: #ffffff;
  color: #1A2740;
  border: 1px solid #C8D6E8;
}

.cb-btn--cfg:hover {
  background: #F4F7FB;
}

.cb-btn--pri {
  background: #9EF01A;
  color: #1A2740;
}

.cb-btn--pri:hover {
  opacity: .88;
}

.cb-link {
  font-size: 15px;
  color: #4A6B8A;
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Panel de configuración granular */
.cb-config-panel {
  display: none;
  width: 100%;
  margin-top: 16px;
  border-top: 1px solid #E8EEF6;
  padding-top: 16px;
}

.cb-config-panel.cb-cfg-open {
  display: block;
}

.cb-cfg-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #F4F7FB;
}

.cb-cfg-row:last-child {
  border-bottom: none;
}

.cb-cfg-info strong {
  font-size: 15px;
  font-weight: 600;
  color: #1A2740;
  display: block;
  margin-bottom: 2px;
}

.cb-cfg-info span {
  font-size: 15px;
  color: #4A6B8A;
  line-height: 1.4;
}

/* Toggle switch */
.cb-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-toggle-slider {
  position: absolute;
  inset: 0;
  background: #C8D6E8;
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}

.cb-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.cb-toggle input:checked+.cb-toggle-slider {
  background: #9EF01A;
}

.cb-toggle input:checked+.cb-toggle-slider::before {
  transform: translateX(20px);
}

.cb-toggle input:disabled+.cb-toggle-slider {
  opacity: .5;
  cursor: not-allowed;
}

.cb-cfg-save {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .cb-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .cb-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .cb-btn {
    flex: 1;
    text-align: center;
  }
}

/* ── Formulario de Registro ─────────────────────────────────────────────────*/
.reg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 540px) {
  .reg-row {
    grid-template-columns: 1fr;
  }
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.reg-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.reg-label .req {
  color: var(--red);
}

.reg-input {
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid var(--navy4);
  background: var(--navy2);
  color: var(--text);
  font-size: 15px;
  font-family: var(--f);
  transition: border-color .15s;
  width: 100%;
}

.reg-input:focus {
  outline: none;
  border-color: var(--lime);
}

.reg-input::placeholder {
  color: var(--text3);
}

.reg-error {
  font-size: 15px;
  color: var(--red);
  display: none;
}

.reg-error--global {
  font-size: 15px;
  color: var(--red);
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

/* Consentimientos */
.reg-consents {
  background: var(--navy2);
  border: 1px solid var(--navy4);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.reg-consents-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

.reg-consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  cursor: pointer;
}

.reg-consent-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--lime);
  cursor: pointer;
}

.reg-consent-text {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.5;
}

.reg-consent-text strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.reg-consent-text a {
  color: var(--teal);
  text-decoration: underline;
}

.reg-consent-optional .reg-consent-text {
  opacity: .85;
}

.reg-consents-note {
  font-size: 15px;
  color: var(--text3);
  margin-top: 8px;
  line-height: 1.4;
  border-top: 1px solid var(--navy4);
  padding-top: 10px;
}

.reg-consents-note a {
  color: var(--teal);
}

/* Botón submit */
.reg-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--lime);
  color: var(--dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--f);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .15s;
}

.reg-btn:hover:not(:disabled) {
  opacity: .88;
}

.reg-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.reg-spinner {
  width: 18px;
  height: 18px;
  animation: spin .7s linear infinite;
}

/* OTP en paso 2 */
.otp-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.otp-input {
  height: 56px;
  text-align: center;
  letter-spacing: .25em;
  font-size: 22px;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid var(--navy4);
  background: var(--navy2);
  color: var(--text);
  font-family: var(--f);
  width: 100%;
}

.otp-input:focus {
  outline: none;
  border-color: var(--lime);
}

/* ── Botón flotante "volver arriba" ──────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lime);
  border: none;
  color: var(--dark);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, background .15s;
  z-index: 500;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: #c2f043;
}

/* ── Widget flotante: contador global de análisis gratuitos ─────────────────
 * Fijo en pantalla (sigue al usuario al hacer scroll). Convive con el botón
 * "volver arriba" (.scroll-top-btn, 44px, presente en diagnóstico/demo/legales)
 * — bottom:96px lo deja siempre por encima sin coordinar con su JS. En la
 * landing (index.html) no hay .scroll-top-btn, así que landing.css lo baja
 * a la posición que dejó libre el antiguo botón "Iniciar Check" flotante.
 * Diseño propio (tarjeta verde clara + gráfico de dona), independiente del
 * tema de cada página — se ve igual en la landing (clara) y en la
 * herramienta (oscura). */
.free-counter-widget {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 400;
  width: 182px;
  background: #F4FDCD;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  font-family: 'Lato', var(--f, sans-serif);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.free-counter-widget[hidden] {
  display: none;
}

.free-counter-widget.on {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.free-counter-widget .fcw-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  background: none;
  color: #52524F;
  opacity: .55;
  cursor: pointer;
}

.free-counter-widget .fcw-close:hover {
  opacity: 1;
}

.free-counter-widget .fcw-close svg {
  display: block;
  width: 100%;
  height: 100%;
}

.free-counter-widget .fcw-title {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: #52524F;
}

.free-counter-widget .fcw-donut {
  position: relative;
  width: 107px;
  height: 107px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.free-counter-widget .fcw-donut svg {
  width: 100%;
  height: 100%;
}

.free-counter-widget .fcw-donut-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.free-counter-widget .fcw-num {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  color: #52524F;
}

.free-counter-widget .fcw-label {
  font-weight: 400;
  font-size: 10px;
  line-height: 1.2;
  color: #52524F;
}

.free-counter-widget .fcw-note {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: #52524F;
}

.free-counter-widget .fcw-btn {
  background: #141413;
  color: #FFFFFF;
  height: 36px;
  padding: 0 14px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: opacity .15s;
}

.free-counter-widget .fcw-btn:hover {
  opacity: .85;
}

/* ── Modo "cupo agotado con descuento" (solo landing) — node Figma 1035:5879 */
.free-counter-widget.fcw-mode-discount {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  width: auto;
  max-width: calc(100vw - 48px);
  padding: 10px 20px;
  text-align: left;
}

.free-counter-widget .fcw-discount-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.free-counter-widget .fcw-discount-title {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.3px;
  color: #141413;
  white-space: nowrap;
}

.free-counter-widget .fcw-discount-price {
  margin: 0;
  white-space: nowrap;
}

.free-counter-widget .fcw-discount-now {
  font-weight: 500;
  font-size: 25px;
  letter-spacing: -.375px;
  color: #141413;
}

.free-counter-widget .fcw-discount-before {
  font-weight: 400;
  font-size: 16px;
  color: #141413;
}

.free-counter-widget .fcw-discount-btn {
  flex-shrink: 0;
  background: #141413;
  color: #FFFFFF;
  height: 54px;
  padding: 0 20px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: opacity .15s;
}

.free-counter-widget .fcw-discount-btn:hover {
  opacity: .85;
}

@media (max-width: 640px) {
  .free-counter-widget.fcw-mode-discount {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
  }

  .free-counter-widget .fcw-discount-title,
  .free-counter-widget .fcw-discount-price {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .free-counter-widget {
    right: 14px;
    bottom: 82px;
    gap: 0;
  }

  .free-counter-widget .fcw-btn {
    height: 54px;
  }

  .free-counter-widget .fcw-note {
    display: none;
  }
}