:root {
  --fondo: #f6f7f9; --tarjeta: #ffffff; --texto: #1d2330; --suave: #5f6878; --borde: #dde1e8;
  --acento: #1f5fbf; --acento-texto: #ffffff; --aviso: #fff6e0; --aviso-borde: #e9c46a;
  --error: #b3261e; --bloqueo: #fdecea; --codigo: #f0f2f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #14171d; --tarjeta: #1c2029; --texto: #e7e9ee; --suave: #9aa3b2; --borde: #2e3441;
    --acento: #6ea0f0; --acento-texto: #0d1117; --aviso: #3a3120; --aviso-borde: #8a7234;
    --error: #f2b8b5; --bloqueo: #3b2322; --codigo: #262b36;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--texto);
       font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.barra { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
         padding: .75rem 1rem; background: var(--tarjeta); border-bottom: 1px solid var(--borde); }
.marca { font-weight: 600; color: var(--texto); text-decoration: none; }
.quien { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--suave); font-size: .9rem; }
.quien form { display: inline; }
.rol { background: var(--codigo); border-radius: 999px; padding: 0 .6rem; font-size: .8rem; }
main { max-width: 60rem; margin: 1.5rem auto; padding: 0 1rem; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px;
           padding: 1.25rem; margin-bottom: 1rem; }
.estrecha { max-width: 26rem; margin: 3rem auto; }
h1, h2 { margin-top: 0; } h2 { font-size: 1.05rem; }
.pregunta { display: grid; grid-template-columns: 1fr auto; gap: .75rem; }
.pregunta .calculando { grid-column: 1 / -1; margin: 0; color: var(--suave); }
textarea, input[type=email] { width: 100%; font: inherit; padding: .6rem .75rem; color: var(--texto);
                              background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px; }
button { font: inherit; padding: .6rem 1.1rem; border: 0; border-radius: 8px; cursor: pointer;
         background: var(--acento); color: var(--acento-texto); align-self: start; }
button:disabled { opacity: .6; cursor: progress; }
button.enlace { background: none; color: var(--acento); padding: 0; }
button.lectura { background: var(--codigo); color: var(--texto); text-align: left; width: 100%; }
.lecturas { display: grid; gap: .5rem; }
.apilado { display: grid; gap: .75rem; } .apilado label { display: grid; gap: .25rem; }
.interpretacion { font-weight: 600; margin-top: 0; }
.tabla { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--borde); }
th { color: var(--suave); font-weight: 500; font-size: .85rem; text-transform: capitalize; }
td:not(:first-child), th:not(:first-child) { text-align: right; }
.cobertura { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1rem 0 0; }
.cobertura dt { color: var(--suave); font-size: .85rem; } .cobertura dd { margin: 0; font-weight: 600; }
.aviso { background: var(--aviso); border-left: 3px solid var(--aviso-borde); padding: .5rem .75rem;
         border-radius: 4px; margin: .75rem 0 0; }
.error { color: var(--error); }
.tipo-bloqueada { background: var(--bloqueo); }
.texto { white-space: pre-wrap; margin-top: 0; }
.propuesta { background: var(--codigo); border-radius: 8px; padding: .5rem 1rem; }
.pie { margin: 1rem 0 0; font-size: .85rem; } .pie details { display: inline; }
pre { white-space: pre-wrap; background: var(--codigo); padding: .75rem; border-radius: 6px; font-size: .85rem; }
code { background: var(--codigo); padding: 0 .3rem; border-radius: 4px; }
.suave { color: var(--suave); }
.historial { list-style: none; padding: 0; margin: 0; }
.historial li { padding: .35rem 0; border-bottom: 1px solid var(--borde); display: flex; justify-content: space-between; gap: 1rem; }
.historial a { color: var(--texto); }
.etiqueta { font-size: .75rem; color: var(--suave); white-space: nowrap; }
.oculto { position: absolute; left: -9999px; }
@media (max-width: 36rem) { .pregunta { grid-template-columns: 1fr; } }
.botones { display: flex; gap: .5rem; flex-wrap: wrap; }
button.secundario { background: var(--codigo); color: var(--texto); }
.revision { margin-bottom: 1rem; }
.quien a { color: var(--acento); }
input[type=text] { width: 100%; font: inherit; padding: .6rem .75rem; color: var(--texto);
                   background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px; }
progress.progreso { width: 100%; height: .6rem; accent-color: var(--acento); }
a.boton { display: inline-block; padding: .6rem 1.1rem; border-radius: 8px; background: var(--acento);
          color: var(--acento-texto); text-decoration: none; margin-right: 1rem; }
main:has(.revisar) { max-width: 90rem; }
.revisar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem; align-items: start; }
.transcripcion { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.transcripcion p { margin: 0 0 .5rem; }
.cabecera-seccion { display: flex; justify-content: space-between; align-items: center; }
.linea { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.linea .que p { margin: .15rem 0 0; font-size: .85rem; }
.linea .veredicto { display: flex; gap: .75rem; white-space: nowrap; font-size: .9rem; }
.linea .detalle { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .5rem; }
.linea select { font: inherit; padding: .4rem; border: 1px solid var(--borde); border-radius: 6px; background: var(--fondo); color: var(--texto); }
.valor { display: inline-block; font-weight: 600; background: var(--codigo); border-radius: 6px; padding: 0 .5rem; margin-right: .4rem; }
.valor.quiza { background: var(--aviso); }
.acciones { position: sticky; bottom: 0; display: flex; gap: .75rem; justify-content: flex-end; }
@media (max-width: 60rem) { .revisar { grid-template-columns: 1fr; } .transcripcion { position: static; max-height: 50vh; } }
.linea .que p.significado { font-size: .85rem; }
.entrar h1 { font-size: 1.35rem; margin-bottom: .35rem; }
.entrar .apilado button { width: 100%; }
a.boton-google { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%;
                 margin: 1.25rem 0 0; padding: .7rem 1rem; font-weight: 500; text-decoration: none;
                 background: #ffffff; color: #1f1f1f; border: 1px solid #c4c7c5; border-radius: 8px; }
a.boton-google:hover { background: #f3f6fb; border-color: #9aa0a6; }
a.boton-google:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
a.boton-google svg { flex: none; width: 18px; height: 18px; }
.pie-entrar { font-size: .85rem; text-align: center; margin: .75rem 0 0; }
.resumen { font-size: 1.05rem; line-height: 1.6; margin: 0 0 .5rem; white-space: pre-wrap; }
.entendido { font-size: .85rem; margin: 0 0 1rem; }
