/* Piezas que dibuja el script o que se repiten en todas las variantes.
   Cada variante define estas variables por sección:
   --fondo, --texto, --suave, --linea, --sup, --acento, --acento-texto */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Resultado del comprobador */
.check-result { min-height: 1.4em; margin: 1.6rem 0 0; max-width: 780px; font-weight: 500; }
.carbon { margin-top: .6rem; font-weight: 400; }
.veredicto {
  display: inline-block; padding: .4em 1.1em; border-radius: 999px;
  font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.veredicto.si { background: var(--acento); color: var(--acento-texto); }
.veredicto.no { background: #f5b955; color: #3a2a00; }
.detalle {
  max-width: 780px; margin: 1rem 0 0; text-align: left; font-weight: 400;
  background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio, 6px); padding: 18px 22px;
}
.detalle .fila { margin: 0 0 .45em; }
.detalle .fila strong {
  font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--suave); font-weight: 500; margin-right: .3em;
}
.detalle .nota { font-size: .85rem; color: var(--suave); }
.detalle ul { margin: 0 0 .5em; padding-left: 1.2em; }
.check-result a { color: var(--acento-enlace, var(--acento)); }
.hint {
  margin-top: 1.4rem; font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--suave); max-width: 640px;
}

/* Impacto anual */
.impacto { max-width: 900px; margin: 1.2rem 0 0; text-align: left; font-weight: 400; border-top: 1px solid var(--linea); padding-top: 2rem; }
.impacto-titulo { font-size: clamp(1.25rem, 2.4vw, 1.8rem); font-weight: 300; line-height: 1.5; letter-spacing: -0.02em; margin: 0 0 1.4rem; }
.impacto-titulo input {
  width: 6.8em; padding: .1em .5em; font: inherit; font-family: var(--mono, ui-monospace, Menlo, monospace); font-weight: 500;
  color: var(--acento-texto); background: var(--acento); border: 0; border-radius: 6px; text-align: center;
}
.tarjetas {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
  background: var(--linea); border: 1px solid var(--linea); border-radius: var(--radio, 6px); overflow: hidden;
}
.tarjeta { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--fondo); }
.tarjeta .icono { color: var(--acento-enlace, var(--acento)); line-height: 0; }
.tarjeta .cifra { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.03em; color: var(--texto); }
.tarjeta .etiqueta { font-size: .88rem; color: var(--suave); }
.impacto .nota { margin: 1rem 0 0; font-size: .8rem; color: var(--suave); }

/* Metodología */
.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 0; }
.pasos li { counter-increment: paso; position: relative; padding: 20px 0 20px 3.4rem; border-bottom: 1px solid var(--linea); color: var(--suave); }
.pasos li::before {
  content: counter(paso, decimal-leading-zero); position: absolute; left: 0; top: 22px;
  font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .85rem; color: var(--acento-enlace, var(--acento));
}
.pasos strong { color: var(--texto); font-weight: 500; display: block; }
.tabla-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--linea); }
th {
  font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--suave); font-weight: 500;
}
td:not(:first-child) { font-family: var(--mono, ui-monospace, Menlo, monospace); }
.reparto { display: flex; gap: 3px; margin-top: 1.6rem; }
.reparto span {
  flex: var(--p) 1 0; min-width: 0; padding: 12px 10px 10px; color: #0c1d12;
  font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1.3;
}
.reparto .r1 { background: var(--acento); color: var(--acento-texto); border-radius: 6px 0 0 6px; }
.reparto .r2 { background: #8ee9ff; }
.reparto .r3 { background: #f3f2ec; border-radius: 0 6px 6px 0; }
.formula {
  background: var(--sup); border: 1px solid var(--linea); border-left: 3px solid var(--acento-enlace, var(--acento));
  padding: 18px 22px; border-radius: var(--radio, 6px); font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .9rem; line-height: 1.7;
}
.ejemplo { padding-left: 1.2em; }
.ejemplo li { margin-bottom: .4em; }
.fuentes { margin-top: 2.4rem; font-size: .9rem; color: var(--suave); }
.nota-pie { font-size: .88rem; color: var(--suave); margin-top: .8rem; }

/* Calculadora */
.calc { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio, 6px); padding: 24px; }
.calc-campos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--suave); }
.calc input[type="number"] {
  padding: .7em .9em; border: 1px solid var(--linea); border-radius: var(--radio, 6px);
  background: var(--campo, rgba(255, 255, 255, .06)); color: var(--texto); font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 1rem;
}
.calc input[type="number"]:focus { border-color: var(--acento-enlace, var(--acento)); outline: none; }
.calc .check-label { flex-direction: row; align-items: center; gap: 10px; grid-column: 1 / -1; color: var(--texto); }
.calc .check-label input { accent-color: var(--acento-enlace, var(--acento)); width: 18px; height: 18px; }
.calc-salida { margin-top: 22px; border-top: 1px solid var(--linea); padding-top: 20px; }
.calc-total { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 300; letter-spacing: -0.03em; color: var(--acento-enlace, var(--acento)); margin: 0 0 .6rem; }
.calc-salida table { margin-bottom: .8rem; }

/* Generador de sellos */
.sello-tipo { border: 0; padding: 0; margin: 1.2rem 0 0; display: flex; gap: 22px; flex-wrap: wrap; font-size: .95rem; }
.sello-tipo label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sello-tipo input { accent-color: var(--acento-enlace, var(--acento)); }
.sello-error { color: var(--error, #ff9d6b); min-height: 1.4em; margin: .8rem 0 0; font-weight: 500; }
.sello-salida { margin-top: 1rem; text-align: left; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio, 6px); padding: 24px; }
.sello-vista { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 16px; margin-bottom: 1rem; background: #0c1d12; border-radius: var(--radio, 6px); text-align: center; }
.sello-estado { margin: 0; color: #9fb5a7; }
.sello-estado:empty { display: none; }
.sello-etiqueta { display: block; font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
#sello-codigo {
  width: 100%; padding: 12px; border: 1px solid var(--linea); border-radius: var(--radio, 6px);
  font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .82rem; margin-bottom: 1rem; resize: vertical;
  background: var(--campo, rgba(255, 255, 255, .06)); color: var(--texto);
}

/* Formularios de una línea */
.check, .sello-form, .newsletter { display: flex; gap: 10px; }
@media (max-width: 720px) {
  .check, .sello-form, .newsletter { flex-direction: column; }
  .calc-campos { grid-template-columns: 1fr; }
  .reparto { flex-direction: column; }
  .reparto span { flex: none; border-radius: 6px !important; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
