/* Sistema Full House: tres colores, dos tipografías. No agregar un cuarto color. */
:root {
  --oliva: #2B2E22;
  --dorado: #C9A227;
  --hueso: #F1E9D8;

  --texto: var(--hueso);
  --texto-suave: rgba(241, 233, 216, 0.82);
  --borde: rgba(241, 233, 216, 0.28);
  --borde-fuerte: rgba(241, 233, 216, 0.55);
  --superficie: rgba(241, 233, 216, 0.06);
  --seleccion: rgba(201, 162, 39, 0.16);

  --titulos: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --cuerpo: "Inter", "Segoe UI", Arial, sans-serif;
  --radio: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--oliva);
  color: var(--texto);
  font-family: var(--cuerpo);
  font-size: 20px;
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, .cifra, .wordmark, .boton {
  font-family: var(--titulos);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(34px, 8vw, 52px); line-height: 1.1; margin: 0 0 20px; }
h2 { font-size: clamp(28px, 6.4vw, 38px); line-height: 1.18; margin: 0 0 20px; }
h3 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
p { margin: 0 0 16px; }

a { color: var(--hueso); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--dorado);
  outline-offset: 3px;
}

/* Estructura */
.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--borde);
}
.wordmark { font-size: 20px; letter-spacing: 0.08em; }
.barra-recurso { font-size: 16px; color: var(--texto-suave); }

.progreso { height: 6px; background: var(--superficie); }
.progreso-relleno { height: 100%; width: 0; background: var(--dorado); transition: width 0.25s ease; }

.contenedor {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 64px;
  outline: none;
}

.cargando { color: var(--texto-suave); }

.etiqueta {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 14px;
}

.suave { color: var(--texto-suave); }
.pequeno { font-size: 18px; }

/* Botones */
.boton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 14px 22px;
  border-radius: var(--radio);
  border: 2px solid var(--hueso);
  font-size: 20px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.boton-primario { background: var(--hueso); color: var(--oliva); }
.boton-secundario { background: transparent; color: var(--hueso); }
.boton[disabled], .boton[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.boton + .boton { margin-top: 14px; }

.enlace-boton {
  background: none;
  border: none;
  color: var(--hueso);
  font: inherit;
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 48px;
  padding: 8px 4px;
  cursor: pointer;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  min-height: 48px;
}
.nav .contador { font-size: 18px; color: var(--texto-suave); }

/* Opciones */
.opciones { display: grid; gap: 12px; margin: 8px 0 20px; }

.opcion {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 16px 18px;
  border: 2px solid var(--borde);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--texto);
  font: inherit;
  font-size: 20px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.opcion:hover { border-color: var(--borde-fuerte); }
.opcion[aria-pressed="true"] { border-color: var(--dorado); background: var(--seleccion); }

.marca {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--borde-fuerte);
  display: grid;
  place-items: center;
}
.opcion[aria-pressed="true"] .marca { border-color: var(--dorado); }
.opcion[aria-pressed="true"] .marca::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dorado);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Formularios */
.campo { margin-bottom: 22px; }
.campo label, .campo .rotulo { display: block; font-weight: 500; margin-bottom: 8px; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"], .campo textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--borde-fuerte);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--texto);
  font: inherit;
  font-size: 20px;
}
.campo textarea { min-height: 112px; resize: vertical; }
.campo input:focus, .campo textarea:focus { border-color: var(--dorado); }
.ayuda { font-size: 17px; color: var(--texto-suave); margin-top: 6px; }
.error { font-size: 18px; color: var(--hueso); font-weight: 500; margin-top: 8px; }
.error::before { content: "Revisar: "; color: var(--dorado); }
.contador-caracteres { font-size: 16px; color: var(--texto-suave); text-align: right; margin-top: 4px; }

.casilla {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 18px;
  line-height: 1.45;
  cursor: pointer;
}
.casilla input {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 2px 0 0;
  accent-color: var(--dorado);
}

/* Resultados */
.caja-cifra {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid var(--dorado);
  border-radius: var(--radio);
  padding: 18px 20px;
  margin-bottom: 28px;
}
.caja-cifra .rotulo { font-size: 20px; font-weight: 500; }

/* Caja dorada: reservada exclusivamente para cifras clave */
.cifra {
  display: inline-block;
  background: var(--dorado);
  color: var(--oliva);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 22px;
  line-height: 1.3;
  white-space: nowrap;
}
.cifra-grande { font-size: 40px; padding: 4px 14px; }

.dimension { margin-bottom: 26px; }
.dimension-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.dimension-nombre { font-family: var(--titulos); font-weight: 700; font-size: 24px; }
.dimension-nivel { font-size: 18px; font-weight: 500; }
.barra-fondo {
  height: 14px;
  border-radius: 7px;
  background: var(--superficie);
  border: 1px solid var(--borde);
  overflow: hidden;
}
.barra-relleno { height: 100%; background: var(--dorado); }
.dimension p { margin: 10px 0 0; font-size: 18px; color: var(--texto-suave); }

.bloque {
  border-top: 1px solid var(--borde);
  padding-top: 24px;
  margin-top: 28px;
}
.bloque h3 { color: var(--hueso); }

.tarjeta {
  border: 2px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px 20px;
  margin: 24px 0;
  background: var(--superficie);
}
.tarjeta-destacada { border-color: var(--dorado); }

.frase-adn {
  font-family: var(--titulos);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 18px;
}
.atributos { margin: 0 0 18px; padding-left: 22px; }
.atributos li { margin-bottom: 8px; }
.subrotulo {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto-suave);
  margin: 0 0 8px;
}
.estado { font-family: var(--titulos); font-weight: 700; font-size: 22px; margin-bottom: 8px; }

.nota {
  font-size: 17px;
  color: var(--texto-suave);
  border-left: 3px solid var(--dorado);
  padding-left: 14px;
  margin: 24px 0;
}

.aviso { font-size: 18px; border: 1px dashed var(--borde-fuerte); border-radius: var(--radio); padding: 14px 16px; }

.pie { font-size: 16px; color: var(--texto-suave); text-align: center; margin-top: 48px; }

.espera { text-align: center; padding: 64px 0; }
.espera-linea {
  width: 160px;
  height: 6px;
  margin: 28px auto 0;
  border-radius: 3px;
  background: var(--superficie);
  overflow: hidden;
  position: relative;
}
.espera-linea::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--dorado);
  animation: avance 1.4s ease-in-out infinite;
}
@keyframes avance { 0% { left: -40%; } 100% { left: 100%; } }

.solo-impresion { display: none; }

/* Botón de agendar fijo en la parte inferior (pantalla de resultado) */
.cta-flotante {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--oliva);
  border-top: 1px solid var(--borde-fuerte);
  box-shadow: 0 -8px 24px rgba(43, 46, 34, 0.9);
}
.cta-flotante[hidden] { display: none; }
.cta-flotante .boton { max-width: 648px; margin: 0 auto; }
body.con-flotante .contenedor { padding-bottom: 120px; }

@media (min-width: 720px) {
  .contenedor { padding-top: 48px; }
  .acciones-fila { display: flex; gap: 14px; }
  .acciones-fila .boton + .boton { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* PDF de una página: fondo hueso, texto oliva, acento dorado */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: var(--hueso); color: var(--oliva); font-size: 9.5pt; line-height: 1.32; min-height: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .barra { border-bottom: 2px solid var(--oliva); padding: 0 0 6px; }
  .barra-recurso { color: var(--oliva); font-size: 10pt; }
  .wordmark { font-size: 14pt; }
  .progreso, .no-imprimir, .nav, button, .boton { display: none !important; }
  .solo-impresion { display: block; }
  .contenedor { max-width: none; padding: 8px 0 0; }
  h1, h2 { font-size: 15pt; margin-bottom: 2px; }
  h3 { font-size: 11pt; margin-bottom: 3px; }
  p { margin-bottom: 4px; }
  .etiqueta, .subrotulo { color: var(--oliva); font-size: 8pt; margin-bottom: 3px; }
  .suave, .dimension p, .nota, .ayuda { color: var(--oliva); }
  .tarjeta, .bloque { border-color: var(--oliva); background: none; padding: 6px 9px; margin: 5px 0; break-inside: avoid; }
  .bloque { border-width: 1px 0 0; padding: 5px 0 0; }
  .tarjeta-destacada { border-color: var(--dorado); }
  .frase-adn { font-size: 12pt; margin-bottom: 5px; }
  .atributos { margin-bottom: 5px; }
  .atributos li { margin-bottom: 1px; }
  .estado { font-size: 11pt; margin-bottom: 2px; }
  .caja-cifra { border-color: var(--oliva); padding: 3px 9px; margin-bottom: 5px; align-items: center; }
  .caja-cifra .rotulo { font-size: 9.5pt; }
  .cifra { font-size: 9.5pt; padding: 0 6px; }
  .cifra-grande { font-size: 12pt; }
  .resumen-diagnostico { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .dimension { margin-bottom: 4px; }
  .dimension-nombre { font-size: 11pt; }
  .dimension-nivel { font-size: 9pt; }
  .barra-fondo { height: 7px; border-color: var(--oliva); background: none; }
  .nota { margin: 6px 0; font-size: 8.5pt; }
  .pie { margin-top: 8px; font-size: 8pt; color: var(--oliva); }
  .ocultar-en-pdf, .cta-flotante { display: none !important; }
  body.con-flotante .contenedor { padding-bottom: 0; }
}
