/* =========================================================
   Neto · estilos
   Idea del diseño: "fuerzas en equilibrio".
   - Modo claro: fondo blanco, tinta casi negra.
   - Modo oscuro: fondo casi negro, tinta casi blanca.
   - Un solo color de acento: el azul. Se usa para lo
     que resta (gastos) y para lo que se toca (acciones).
   - Líneas finas de 1px como estructura. Esquinas rectas.
   ========================================================= */

/* Letras incluidas en el sitio (carpeta fonts/) */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Colores y medidas (tema claro) ---------- */
:root {
  --fondo: #ffffff;        /* blanco */
  --panel: #f2f3f5;        /* paneles y tablas */
  --tinta: #141414;        /* texto y barras */
  --tinta-2: #3b3d42;      /* texto secundario, todavía fuerte */
  --linea: #141414;        /* líneas de estructura */
  --linea-suave: #d5d7dc;  /* separadores dentro de paneles */
  --hilo: #1f5fd6;         /* el hilo azul: barras de gastos y acciones */
  --hilo-texto: #1a52b8;   /* azul con contraste suficiente para texto */
  --sobre-tinta: #ffffff;  /* texto encima de fondo negro */
  --pendiente: #fff4c2;

  --letra: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ancho: 1080px;
  --lectura: 68ch;
  --margen: 18px;
  --salida: cubic-bezier(0.16, 1, 0.3, 1); /* frenado suave */

  color-scheme: light;
}

/* ---------- Tema oscuro (de noche en el carro) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #121211;
    --panel: #1c1c1a;
    --tinta: #ecebe7;
    --tinta-2: #c9c8c2;
    --linea: #ecebe7;
    --linea-suave: #3a3a37;
    --hilo: #7aa7ff;
    --hilo-texto: #93b8ff;
    --sobre-tinta: #121211;
    --pendiente: #4a4320;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fondo: #121211;
  --panel: #1c1c1a;
  --tinta: #ecebe7;
  --tinta-2: #c9c8c2;
  --linea: #ecebe7;
  --linea-suave: #3a3a37;
  --hilo: #7aa7ff;
  --hilo-texto: #93b8ff;
  --sobre-tinta: #121211;
  --pendiente: #4a4320;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* sin destello gris al tocar */
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--letra);
  font-size: 17px;
  line-height: 1.6;
  caret-color: var(--hilo);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--hilo); color: var(--sobre-tinta); }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

/* Botones y enlaces de menú: respuesta inmediata al tocar
   y sin seleccionar el texto al dejar el dedo presionado */
button, .boton, .menu a, .fila-enlace {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

h1, h2, h3 {
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-stretch: 90%; /* un poco angosta: los títulos largos caben mejor en el celular */
  text-wrap: balance;
  margin: 0;
}
p { text-wrap: pretty; }

.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--margen);
}

.cifra, .medida {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.icono { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }

/* Salto al contenido (teclado y lectores de pantalla) */
.saltar {
  position: absolute;
  left: var(--margen);
  top: -100px;
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.saltar:focus { top: 0.5rem; }

/* Texto solo para lectores de pantalla */
.saltar-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Encabezado y menú ---------- */
.encabezado {
  border-bottom: 1px solid var(--linea);
  padding-top: env(safe-area-inset-top, 0px);
}
.encabezado .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 2rem;
}
.logo {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 0.9rem 0;
}
.logo span { color: var(--hilo); }

/* Botones de idioma y de modo oscuro, junto al logo */
.utilidades {
  order: 3;
  display: flex;
  align-items: center;
  margin-left: -0.75rem;
}
.idioma, .boton-tema {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--tinta);
  cursor: pointer;
  text-decoration: none;
}
.idioma span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--linea);
  padding: 0.3rem 0.45rem;
  line-height: 1;
}
.boton-tema .icono { width: 1.25rem; height: 1.25rem; vertical-align: 0; }
/* Luna en modo claro, sol en modo oscuro */
.boton-tema:not([aria-pressed="true"]) .sol,
.boton-tema[aria-pressed="true"] .luna { display: none; }
.idioma:active span, .boton-tema:active { color: var(--hilo-texto); }
@media (hover: hover) and (pointer: fine) {
  .idioma:hover span { border-color: var(--hilo); color: var(--hilo-texto); }
  .boton-tema:hover { color: var(--hilo-texto); }
}

.menu {
  margin-left: auto;
  display: flex;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.8rem;
  text-decoration: none;
  position: relative;
}
.menu a:last-child { padding-right: 0; }
/* La página actual se marca con el hilo azul debajo */
.menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: -1px;
  height: 3px;
  background: var(--hilo);
}
.menu a:last-child[aria-current="page"]::after { right: 0; }

/* Hasta 859px (celular y tableta) el menú va abajo del logo, en 2 filas de 3 */
@media (max-width: 859px) {
  .utilidades { order: 2; margin-left: auto; margin-right: -0.6rem; }
  .menu {
    order: 3;
    width: calc(100% + 2 * var(--margen));
    margin: 0 calc(-1 * var(--margen));
    border-top: 1px solid var(--linea);
  }
  /* 6 botones: 2 filas de 3, todos del mismo ancho */
  .menu { display: grid; grid-template-columns: repeat(3, 1fr); }
  .menu a {
    justify-content: center;
    min-height: 44px;
    padding: 0 0.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
  }
  .menu a:not(:nth-child(3n)) { border-right: 1px solid var(--linea-suave); }
  .menu a:nth-child(-n + 3) { border-bottom: 1px solid var(--linea-suave); }
  .menu a:last-child { padding-right: 0.25rem; }
  .menu a[aria-current="page"]::after,
  .menu a:last-child[aria-current="page"]::after { left: 0; right: 0; }
}

/* ---------- Botón principal ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 52px;
  padding: 0.85rem 1.2rem;
  background: var(--tinta);
  color: var(--sobre-tinta);
  border: 0;
  border-radius: 0;
  font: 700 1rem/1.2 var(--letra);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--salida), background-color 120ms;
}
.boton .icono { color: var(--hilo); width: 1.25em; height: 1.25em; transition: transform 200ms var(--salida); }
.boton:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .boton:hover .icono { transform: translateX(4px); }
}

/* ---------- Portada (inicio) ---------- */
.portada {
  display: grid;
  gap: 1.75rem;
  padding: 2rem 0 3rem;
}
.portada h1 {
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 13ch;
}
.portada .entrada {
  font-size: 1.1rem;
  max-width: 36ch;
  margin: 0.9rem 0 0;
  color: var(--tinta-2);
}
.portada .boton { width: 100%; }

@media (min-width: 860px) {
  .portada {
    grid-template-columns: 1.15fr 1fr;
    align-items: end;
    column-gap: 3.5rem;
    padding: 4.5rem 0 4.5rem;
  }
  .portada .boton { width: auto; }
}

/* ---------- Diagrama de fuerzas ----------
   Cada barra mide exactamente la cantidad, comparada con el pago.
   Negro = lo que entra o queda. Azul = lo que resta. */
.fuerzas {
  background: var(--panel);
  padding: 1.1rem 1rem 0.9rem;
  margin: 0;
}
.fuerza {
  display: grid;
  grid-template-columns: 6.2rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
}
.fuerza dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fuerza dd { margin: 0; }
.fuerza .monto {
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.barra {
  height: 3px;
  background: var(--tinta);
  width: var(--w, 0%);
  transition: width 700ms var(--salida);
}
.fuerza.resta .barra { height: 2px; background: var(--hilo); }
.fuerza.resta .monto { color: var(--hilo-texto); }
.fuerza.neta {
  border-top: 1px solid var(--linea);
  margin-top: 0.4rem;
  padding-top: 0.85rem;
}
.fuerza.neta .barra { height: 5px; }
.fuerza.neta .monto { font-size: 1.6rem; letter-spacing: -0.02em; }
.fuerza.neta.perdida .barra { background: var(--hilo); }
.fuerza.neta.perdida .monto { color: var(--hilo-texto); }
.pie-diagrama {
  font-size: 0.85rem;
  color: var(--tinta-2);
  margin: 0.6rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .barra, .boton, .boton .icono { transition: none; }
}

/* ---------- Ejemplo vivo de la portada (js/portada.js) ----------
   Las barras crecen con transform (más fluido que width) y, al cambiar de
   ejemplo, se encogen o estiran desde donde estén. */
/* Todas las filas comparten las mismas columnas (de ancho fijo), así las barras
   se comparan bien entre sí y no tiemblan mientras cuentan los números */
.fuerzas.vivo {
  display: grid;
  grid-template-columns: max-content 1fr 6.2rem; /* 6.2rem: cabe "$534.88" grande */
  column-gap: 0.75rem;
}
.fuerzas.vivo .fuerza { grid-column: 1 / -1; grid-template-columns: subgrid; }
.fuerzas.vivo .barra {
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 700ms var(--salida);
}
.fuerzas.vivo .monto { transition: color 200ms ease; }

/* Botones para elegir el ejemplo; la línea azul se llena hasta el siguiente */
.ejemplos {
  display: flex;
  gap: 1.1rem;
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ejemplos[hidden] { display: none; }
.ejemplos button {
  position: relative;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--tinta-2);
  cursor: pointer;
  transition: color 150ms ease;
}
.ejemplos button[aria-pressed="true"] { color: var(--tinta); }
.ejemplos button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--hilo);
  transform-origin: left center;
  transform: scaleX(0);
}
.ejemplos button[aria-pressed="true"]::after { transform: scaleX(1); }
/* Mientras el ejemplo cambia solo, la línea avanza a ritmo constante */
.ejemplos.corriendo button[aria-pressed="true"]::after {
  animation: llenar var(--espera, 4.5s) linear both;
}
.ejemplos.pausa button[aria-pressed="true"]::after { animation-play-state: paused; }
@keyframes llenar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover: hover) and (pointer: fine) {
  .ejemplos button:hover { color: var(--tinta); }
}

/* ---------- Carretera de la portada ----------
   Un carrito recorre la línea; de vez en cuando salta (js/portada.js)
   y en lo alto del salto sale un "$" que sube y se desvanece. */
.carretera {
  position: relative;
  height: 30px;
  border-bottom: 1px solid var(--linea);
  overflow-x: clip;       /* el carro entra y sale por los lados... */
  overflow-y: visible;    /* ...pero el "$" puede subir por encima */
  margin-bottom: 0.4rem;
}
/* Capa del ancho de la carretera que se desplaza: el carro va en su borde izquierdo */
.trayecto {
  position: absolute;
  inset: 0;
  animation: recorrer 9s linear infinite;
}
@keyframes recorrer {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}
.carro {
  position: absolute;
  left: -38px;            /* empieza escondido a la izquierda */
  bottom: 0;
  width: 36px;
  height: 17px;
  color: var(--tinta);
}
.carro svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* El salto: sube rápido y frenando, baja acelerando (como la gravedad) */
.carro.salta { animation: saltar 480ms both; }
@keyframes saltar {
  0%   { transform: translateY(0) rotate(0); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  45%  { transform: translateY(-11px) rotate(-7deg); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  100% { transform: translateY(0) rotate(0); }
}
.dinero {
  position: absolute;
  bottom: 18px;
  font: 700 1rem/1 var(--mono);
  color: var(--hilo-texto);
  pointer-events: none;
  animation: subir-dinero 900ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes subir-dinero {
  0%   { opacity: 0; transform: translateY(4px) scale(0.9); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-22px) scale(1); }
}
/* El ojito de Neto: parpadea de vez en cuando y, al saltar, se pone contento (^) */
.carro .ojo-abierto {
  transform-box: fill-box;
  transform-origin: center;
  animation: parpadear 4.6s infinite;
}
@keyframes parpadear {
  0%, 93%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}
.carro .ojo-feliz { opacity: 0; }
/* Mientras salta (js/portada.js quita .salta al aterrizar) */
.carro.salta .ojo-abierto { opacity: 0; animation: none; }
.carro.salta .ojo-feliz { opacity: 1; }
.carretera.pausa .ojo-abierto { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .carro .ojo-abierto { animation: none; } }

/* Fuera de pantalla o en otra pestaña: todo quieto */
.carretera.pausa .trayecto,
.carretera.pausa .carro,
.carretera.pausa .dinero { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  /* Sin movimiento: el carro se queda estacionado y no salta */
  .trayecto { animation: none; transform: translateX(12%); }
  .carro.salta, .dinero { animation: none; }
  .dinero { display: none; }
}

/* Entrada de la portada: una sola vez, al abrir la página */
.portada > div > * {
  animation: aparecer 520ms var(--salida) both;
}
.portada > div:first-child > :nth-child(2) { animation-delay: 70ms; }
.portada > div:last-child > * { animation-delay: 140ms; }
@keyframes aparecer {
  from { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .fuerzas.vivo .barra { transition: none; }
  .ejemplos.corriendo button[aria-pressed="true"]::after { animation: none; }
  /* Sin movimiento: solo aparece, sin subir */
  .portada > div > * { animation-name: aparecer-suave; animation-duration: 300ms; }
  @keyframes aparecer-suave { from { opacity: 0; } }
}

/* ---------- Índice de secciones (inicio y guía) ---------- */
.indice {
  border-top: 1px solid var(--linea);
  margin-bottom: 4rem;
}
.indice h2.titulo-indice {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 0;
}
.fila-enlace {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--linea-suave);
  text-decoration: none;
}
.fila-enlace h3, .fila-enlace h2 {
  font-size: clamp(1.3rem, 3.6vw, 1.75rem);
  font-weight: 700;
}
.fila-enlace p {
  grid-column: 1;
  margin: 0;
  color: var(--tinta-2);
  max-width: 60ch;
}
.fila-enlace .icono {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--hilo);
  transition: transform 220ms var(--salida);
}
.fila-enlace:active { background: var(--panel); }
@media (hover: hover) and (pointer: fine) {
  .fila-enlace:hover h3, .fila-enlace:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
  .fila-enlace:hover .icono { transform: translateX(6px); }
}

/* ---------- Inicio: bloques de tarjetas (herramientas y guía) ----------
   Menos texto: cada tarjeta enseña con un dibujo o un número grande. */
.bloque { margin: 1rem 0 4.5rem; }
.bloque-cabeza {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--linea);
  padding: 1rem 0 1.1rem;
}
.bloque-cabeza h2 {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.bloque-cabeza .ver-todo {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--hilo-texto);
  text-decoration: none;
  padding: 0.75rem 0; /* área cómoda para tocar */
}

/* Herramientas: 2 columnas en el celular, 4 en la computadora */
.tarjetas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 860px) { .tarjetas { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.tarjeta {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--linea);
  text-decoration: none;
  color: var(--tinta);
  background: var(--fondo);
  transition: transform 160ms var(--salida);
}
.tarjeta:active { transform: scale(0.98); }
.tarjeta .vista {
  height: 96px;
  background: var(--panel);
  border-bottom: 1px solid var(--linea);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.tarjeta .texto { padding: 0.75rem 0.75rem 0.85rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.tarjeta .etiqueta {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tinta-2);
}
.tarjeta h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.2; }
.tarjeta .accion {
  margin-top: auto;
  padding-top: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--hilo-texto);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.tarjeta .accion .icono { width: 1rem; height: 1rem; transition: transform 200ms var(--salida); }
@media (hover: hover) and (pointer: fine) {
  .tarjeta:hover { transform: translateY(-3px); }
  .tarjeta:hover .accion .icono { transform: translateX(4px); }
}

/* Dibujo: mapa de calor (horarios) */
.mini-calor {
  display: grid;
  grid-template-columns: repeat(7, 13px);
  gap: 3px;
}
.mini-calor i { height: 13px; background: var(--linea-suave); }
.mini-calor i[data-n="1"] { background: color-mix(in srgb, var(--hilo) 30%, var(--panel)); }
.mini-calor i[data-n="2"] { background: color-mix(in srgb, var(--hilo) 60%, var(--panel)); }
.mini-calor i[data-n="3"] { background: var(--hilo); }

/* Dibujo: barras por día (turnos) */
.mini-barras {
  display: grid;
  grid-template-columns: repeat(7, 12px);
  gap: 6px;
  align-items: end;
  height: 62px;
}
.mini-barras i { height: var(--h); background: var(--tinta); transform-origin: bottom; }
.mini-barras i.top { background: var(--hilo); }

/* Dibujo: oferta de una app leída por el lector */
.mini-oferta {
  width: 112px;
  background: var(--fondo);
  border: 1px solid var(--linea);
  padding: 7px 8px 8px;
  position: relative;
  overflow: hidden;
}
.mini-oferta b { display: block; font-size: 1.15rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-oferta small { display: block; font: 500 0.6rem/1.4 var(--mono); color: var(--tinta-2); }
.mini-oferta .queda {
  display: block;
  margin-top: 5px;
  font: 700 0.62rem/1 var(--mono);
  color: var(--sobre-tinta);
  background: var(--hilo);
  padding: 4px 5px;
}
/* La línea que "lee" la captura */
.mini-oferta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--hilo);
  opacity: 0;
}

/* Dibujo: íconos de gadgets */
.mini-iconos { display: flex; gap: 14px; color: var(--tinta); }
.mini-iconos svg { width: 30px; height: 30px; }
.mini-iconos svg:nth-child(2) { color: var(--hilo); }

/* Guía: tarjetas de un dato. En el celular se deslizan de lado */
.datos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--margen));
  padding: 0 var(--margen) 6px;
  scroll-padding: 0 var(--margen);
  scrollbar-width: none;
}
.datos::-webkit-scrollbar { display: none; }
.dato {
  flex: 0 0 76%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 236px;
  padding: 1rem 1rem 1.05rem;
  background: var(--panel);
  text-decoration: none;
  color: var(--tinta);
  transition: transform 160ms var(--salida);
}
.dato:active { transform: scale(0.98); }
/* La primera va en negro para dar ritmo */
.dato:first-child { background: var(--tinta); color: var(--sobre-tinta); }
.dato:first-child .dato-num { color: var(--sobre-tinta); }
.dato:first-child .meta, .dato:first-child .dato-txt { color: color-mix(in srgb, var(--sobre-tinta) 75%, transparent); }
.dato .meta {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tinta-2);
  display: flex;
  justify-content: space-between;
}
.dato-num {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--hilo-texto);
  margin-top: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.dato-txt { font-size: 0.95rem; line-height: 1.35; color: var(--tinta-2); }
.dato h3 {
  margin-top: auto;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.dato h3 .icono { width: 1.2rem; height: 1.2rem; color: var(--hilo); flex: none; transition: transform 200ms var(--salida); }
.dato:first-child h3 .icono { color: var(--sobre-tinta); }
@media (hover: hover) and (pointer: fine) {
  .dato:hover { transform: translateY(-3px); }
  .dato:hover h3 .icono { transform: translateX(4px); }
}
@media (min-width: 860px) {
  .datos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; overflow: visible; margin: 0; padding: 0; }
}
/* Puntos que indican cuántas tarjetas hay (solo en el celular) */
.puntos { display: flex; justify-content: center; gap: 6px; margin-top: 0.75rem; }
.puntos i { width: 6px; height: 6px; background: var(--linea-suave); transition: background-color 200ms ease, transform 200ms var(--salida); }
.puntos i.activo { background: var(--hilo); transform: scaleX(2.2); }
@media (min-width: 860px) { .puntos { display: none; } }

/* Aparecen al llegar a ellas (js/portada.js pone .listo y luego .visto) */
.bloque.listo .tarjeta, .bloque.listo .dato { opacity: 0; transform: translateY(14px); }
.bloque.visto .tarjeta, .bloque.visto .dato {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--salida), transform 500ms var(--salida);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.bloque.listo .mini-calor i { opacity: 0; }
.bloque.visto .mini-calor i { opacity: 1; transition: opacity 260ms ease; transition-delay: calc(250ms + var(--c, 0) * 18ms); }
.bloque.listo .mini-barras i { transform: scaleY(0); }
.bloque.visto .mini-barras i { transform: none; transition: transform 600ms var(--salida); transition-delay: calc(300ms + var(--c, 0) * 50ms); }
.bloque.visto .mini-oferta::after { animation: leer 1100ms 400ms ease-in-out both; }
@keyframes leer {
  0% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(78px); }
  100% { opacity: 0; transform: translateY(78px); }
}
.bloque.listo .mini-oferta .queda { opacity: 0; transform: translateY(4px); }
.bloque.visto .mini-oferta .queda { opacity: 1; transform: none; transition: opacity 300ms ease, transform 300ms var(--salida); transition-delay: 1400ms; }
/* Al terminar, js/portada.js quita .listo y .visto: vuelven los estilos normales (y el hover rápido) */

@media (prefers-reduced-motion: reduce) {
  .bloque.listo .tarjeta, .bloque.listo .dato { transform: none; }
  .bloque.listo .mini-barras i { transform: none; }
  .bloque.visto .mini-oferta::after { animation: none; }
  .tarjeta, .dato { transition: opacity 300ms ease; }
  .tarjeta:hover, .dato:hover, .tarjeta:active, .dato:active { transform: none; }
}

/* ---------- Noticias (noticias.html, js/noticias.js) ---------- */
/* Texto que solo leen los lectores de pantalla */
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.filtros[hidden] { display: none; }
.filtros {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 1.25rem calc(-1 * var(--margen)) 1rem;
  padding: 0 var(--margen) 4px;
  scrollbar-width: none;
}
.filtros::-webkit-scrollbar { display: none; }
.filtros button {
  flex: none;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid var(--linea);
  background: var(--fondo);
  color: var(--tinta);
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--salida);
}
.filtros button:active { transform: scale(0.96); }
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--sobre-tinta); }
.filtros button span { color: var(--tinta-2); margin-left: 0.35rem; }
.filtros button[aria-pressed="true"] span { color: inherit; opacity: 0.7; }

.noticias { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 860px) { .noticias { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.noticia a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--linea);
  text-decoration: none;
  color: var(--tinta);
  transition: transform 160ms var(--salida);
}
.noticia a:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
  .noticia a:hover { transform: translateY(-2px); }
  .noticia a:hover h2, .noticia a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
}
.noticia .etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.noticia .tag {
  font: 600 0.64rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 6px;
  background: var(--panel);
  color: var(--tinta);
}
.noticia .tag.idioma-en { background: none; border: 1px solid var(--linea-suave); color: var(--tinta-2); }
.noticia h2, .noticia h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
/* En el inicio: 3 noticias, en fila en la computadora */
@media (min-width: 860px) { .noticias-inicio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.noticia .de {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--tinta-2);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.noticia .de b { font-weight: 600; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noticia .de span { white-space: nowrap; }
/* La más reciente, en grande */
.noticia.destacada { grid-column: 1 / -1; }
.noticia.destacada a { background: var(--tinta); color: var(--sobre-tinta); border-color: var(--tinta); padding: 1.2rem 1.15rem 1.15rem; gap: 0.75rem; }
.noticia.destacada h2 { font-size: clamp(1.45rem, 5.5vw, 2.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.noticia.destacada .tag { background: var(--hilo); color: var(--sobre-tinta); }
.noticia.destacada .tag.idioma-en { background: none; border-color: color-mix(in srgb, var(--sobre-tinta) 40%, transparent); color: var(--sobre-tinta); }
.noticia.destacada .de, .noticia.destacada .de b { color: var(--sobre-tinta); }
.noticia.destacada .de { opacity: 0.8; }
/* Tarjetas grises mientras carga */
.noticia.cargando div { height: 128px; background: var(--panel); animation: latir 1.2s ease-in-out infinite alternate; }
.noticia.cargando.destacada div { height: 190px; }
@keyframes latir { from { opacity: 1; } to { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .noticia.cargando div { animation: none; }
  .noticia a:hover, .noticia a:active, .filtros button:active { transform: none; }
}
.noticias-estado { padding: 1.5rem 0; color: var(--tinta-2); }
.noticias-pie { margin: 1.5rem 0 3.5rem; font-size: 0.85rem; color: var(--tinta-2); }

/* ---------- Encabezado de páginas internas ---------- */
.cabeza {
  padding: 2.25rem 0 1.75rem;
  border-bottom: 1px solid var(--linea);
  margin-bottom: 0.5rem;
}
.cabeza h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  max-width: 18ch;
}
.cabeza p {
  font-size: 1.1rem;
  color: var(--tinta-2);
  max-width: 52ch;
  margin: 0.9rem 0 0;
}

/* ---------- Calculadora ---------- */
.calculadora {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding: 1.5rem 0 4rem;
}
.calculadora > * { min-width: 0; }
@media (min-width: 860px) {
  .calculadora { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .calculadora .resultados { position: sticky; top: 1.5rem; }
}

/* Leer captura de la oferta */
.captura {
  background: var(--panel);
  padding: 1.1rem 1rem 1rem;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem 2.5rem;
}
@media (min-width: 860px) {
  .captura { grid-template-columns: 1fr 1fr; align-items: center; padding: 1.5rem; }
}
.captura h2 { font-size: 1.4rem; font-weight: 700; }
.captura p { margin: 0.4rem 0 0; }
.boton-captura { width: 100%; }
@media (min-width: 860px) { .boton-captura { width: auto; } }
.boton-captura:focus-within { outline: 2px solid var(--hilo); outline-offset: 3px; }
.captura[aria-busy="true"] .boton-captura { opacity: 0.55; pointer-events: none; }
.estado-captura { font-weight: 600; margin-top: 0.8rem !important; }
.estado-captura:empty { display: none; }
.estado-captura[data-tipo="aviso"],
.estado-captura[data-tipo="error"] { color: var(--hilo-texto); }

.campos { border: 0; margin: 0; padding: 0; min-width: 0; }
.campos legend {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0 0.5rem;
}
.campos + .campos { margin-top: 1.75rem; }

.campo {
  display: block;
  border-top: 1px solid var(--linea-suave);
  padding: 0.85rem 0 0.9rem;
}
.campo:last-of-type { border-bottom: 1px solid var(--linea-suave); }
.campo .etiqueta-campo { display: block; font-weight: 600; }
.campo small { display: block; color: var(--tinta-2); font-size: 0.875rem; margin-top: 0.15rem; }

.entrada-num {
  display: flex;
  align-items: baseline;
  margin-top: 0.5rem;
  border-bottom: 2px solid var(--tinta);
  transition: border-color 120ms;
}
.entrada-num:focus-within { border-color: var(--hilo); }
.entrada-num .unidad {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--tinta-2);
  padding: 0 0.4rem;
}
.entrada-num input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--tinta);
  font: 700 1.5rem/1.2 var(--letra);   /* más de 16px: el celular no hace zoom */
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.4rem 0.4rem 0;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.entrada-num input::-webkit-outer-spin-button,
.entrada-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.entrada-num input::placeholder { color: var(--tinta-2); opacity: 0.55; font-weight: 500; }

.campo.con-error .entrada-num { border-color: var(--hilo); }

/* Selector de carro: marca, modelo y año */
.selects {
  display: grid;
  gap: 0.5rem 0.75rem;
  margin-top: 0.6rem;
}
@media (min-width: 480px) {
  .selects { grid-template-columns: 1fr 1.4fr 0.8fr; }
}
.selects label { position: relative; display: block; min-width: 0; }
/* Flechita dibujada con dos bordes */
.selects label::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--tinta);
  border-bottom: 2px solid var(--tinta);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.selects select {
  width: 100%;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--tinta);
  border: 0;
  border-bottom: 2px solid var(--tinta);
  border-radius: 0;
  font: 600 1.0625rem/1.2 var(--letra);   /* 17px: el celular no hace zoom */
  padding: 0.5rem 1.6rem 0.5rem 0;
  text-overflow: ellipsis;
  cursor: pointer;
}
.selects select:focus-visible { outline: none; border-color: var(--hilo); }
.selects select:disabled { opacity: 0.45; cursor: not-allowed; }
.selects select option { color: var(--tinta); background: var(--fondo); }
.nota-carro {
  font-size: 0.875rem;
  color: var(--tinta-2);
  margin: 0.6rem 0 0;
}
.mensaje-error {
  color: var(--hilo-texto);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.4rem 0 0;
}

.acciones-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
}
.boton-texto {
  background: none;
  border: 0;
  padding: 0.75rem 0;
  color: var(--tinta);
  font: 600 0.95rem var(--letra);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.resultados h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.resultados .vacio {
  color: var(--tinta-2);
  margin: 0 0 0.9rem;
}
.tasas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--linea);
  margin: 1rem 0 0;
}
.tasas div { padding: 0.8rem 0; }
.tasas div + div { border-left: 1px solid var(--linea-suave); padding-left: 1rem; }
.tasas dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tasas dd {
  margin: 0.2rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.nota-irs {
  font-size: 0.95rem;
  color: var(--tinta-2);
  border-top: 1px solid var(--linea-suave);
  padding-top: 0.8rem;
  margin: 0.2rem 0 0;
}

/* Barra fija abajo en el celular: el resultado siempre a la vista */
.resumen-fijo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 0.75rem var(--margen) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  text-decoration: none;
  transform: translateY(110%);
  transition: transform 320ms var(--salida);
}
.resumen-fijo.visible { transform: none; }
.resumen-fijo .medida { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.resumen-fijo strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.resumen-fijo .por-hora { font-family: var(--mono); font-size: 0.85rem; }
@media (min-width: 860px) { .resumen-fijo { display: none; } }
@media (prefers-reduced-motion: reduce) { .resumen-fijo { transition: none; } }

/* ---------- Horarios por ZIP code ---------- */
.horarios {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding: 1.5rem 0 4rem;
}
@media (min-width: 960px) {
  .horarios { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .form-horarios { position: sticky; top: 1.5rem; }
}
.form-horarios .campo { border-bottom: 1px solid var(--linea-suave); }
.form-horarios .boton { width: 100%; margin-top: 1.25rem; }
.form-horarios[aria-busy="true"] .boton { opacity: 0.55; pointer-events: none; }
.estado-horarios { font-weight: 600; margin: 0.8rem 0 0; }
.estado-horarios:empty { display: none; }

.plataformas { border: 0; margin: 1.1rem 0 0; padding: 0; min-width: 0; }
.plataformas legend { padding: 0; margin-bottom: 0.5rem; }
/* Botones de app: uno al lado del otro, el elegido se rellena */
.segmentos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--linea);
}
.segmentos label { position: relative; display: block; }
.segmentos label:nth-child(odd) { border-right: 1px solid var(--linea); }
.segmentos label:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
.segmentos input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmentos span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-weight: 600;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 120ms, color 120ms;
}
.segmentos input:checked + span { background: var(--tinta); color: var(--sobre-tinta); }
.segmentos input:focus-visible + span { outline: 2px solid var(--hilo); outline-offset: -4px; }

.reporte h2 { font-size: clamp(1.45rem, 4.4vw, 1.9rem); font-weight: 700; }
.reporte h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--linea);
  padding-top: 0.9rem;
  margin: 2rem 0 0.75rem;
}
.reporte > .nota:first-of-type { margin-top: 0.4rem; }

.mejores { list-style: none; padding: 0; margin: 0; counter-reset: mejor; }
.mejores li {
  counter-increment: mejor;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
.mejores li::before {
  content: counter(mejor);
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--hilo-texto);
  padding-top: 0.15rem;
}
.mejores strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.mejores span { color: var(--tinta-2); font-size: 0.95rem; }

/* Mapa de calor: filas = horas, columnas = días */
.mapa-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.mapa {
  border-collapse: separate;
  border-spacing: 3px;
  width: 100%;
  min-width: 330px;
  font-size: 0.75rem;
  table-layout: fixed;
}
.mapa th, .mapa td { border: 0; padding: 0; }
.mapa thead th {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.66rem;
  text-align: center;
  padding-bottom: 0.3rem;
  white-space: normal;
}
.mapa thead th span { display: block; }
.mapa thead th span + span { font-size: 0.85rem; font-family: var(--letra); font-weight: 700; }
.mapa thead th:first-child { width: 3.6rem; }
.mapa tbody th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62rem;
  text-align: right;
  padding-right: 0.4rem;
  white-space: nowrap;
}
.mapa td { height: 1.6rem; }
.nivel-0 { background: transparent; box-shadow: inset 0 0 0 1px var(--linea-suave); }
.nivel-1 { background: color-mix(in srgb, var(--hilo) 22%, transparent); }
.nivel-2 { background: color-mix(in srgb, var(--hilo) 55%, transparent); }
.nivel-3 { background: var(--hilo); }
.mapa td.pasado {
  background: repeating-linear-gradient(135deg, var(--linea-suave) 0 1px, transparent 1px 5px);
}

.leyenda {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.85rem;
}
.leyenda li { display: flex; align-items: center; gap: 0.4rem; }
.muestra { width: 1rem; height: 1rem; display: inline-block; }

.clima { list-style: none; padding: 0; margin: 0; }
.clima li { padding: 0.45rem 0; border-bottom: 1px solid var(--linea-suave); font-size: 0.95rem; }
.clima strong { display: block; }
@media (min-width: 560px) { .clima strong { display: inline-block; min-width: 7.5rem; } }
.datos-zona dd { white-space: pre-line; }
.aviso-estimado { margin-top: 2rem; border-top: 1px solid var(--linea); padding-top: 1rem; }

/* Días festivos de la semana */
.festivos-reporte { font-weight: 600; color: var(--hilo-texto); margin: 0.5rem 0 0; }
.festivos-reporte:empty { display: none; }
.mapa thead th.festivo span:first-child { color: var(--hilo-texto); }
.mapa thead th.festivo span + span { text-decoration: underline; text-decoration-color: var(--hilo); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Compartir / calendario */
.acciones-reporte { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.5rem; }
.boton-texto { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; }
.boton-texto .icono { color: var(--hilo); }
.estado-acciones { font-weight: 600; margin: 0.25rem 0 0; }
.estado-acciones:empty { display: none; }

/* ¿Es buena mi zona? */
.estado-zona { color: var(--tinta-2); margin: 0; }
.estado-zona:empty { display: none; }
.zona[aria-busy="true"] .estado-zona::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.5rem;
  border: 2px solid var(--hilo);
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.05em;
  animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .zona[aria-busy="true"] .estado-zona::before { animation: none; } }
.veredicto { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem; }
.datos-zona { margin: 0; }
.datos-zona div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
@media (min-width: 560px) { .datos-zona div { grid-template-columns: 16rem 1fr; gap: 1rem; } }
.datos-zona dt { color: var(--tinta-2); font-size: 0.95rem; }
.datos-zona dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Mapa de la zona */
.mapa-zona { margin: 1.25rem 0 0.5rem; }
.lienzo-mapa {
  height: clamp(280px, 55vw, 420px);
  background: var(--panel);
  border: 1px solid var(--linea);
  z-index: 0;
}
.lienzo-mapa .maplibregl-ctrl-attrib { font-size: 0.65rem; }
.lienzo-mapa .maplibregl-popup-content {
  font: 600 0.9rem/1.4 var(--letra);
  color: #141414;
  border-radius: 0;
  padding: 0.5rem 0.7rem;
}
.lienzo-mapa .maplibregl-ctrl-group { border-radius: 0; }
/* Alfiler de Walmart: rombo azul con la distancia */
.pin-walmart {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.pin-walmart:focus-visible { outline: 2px solid var(--hilo); outline-offset: 2px; }
.pin-marca {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--hilo);
  border: 2px solid var(--fondo);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  transform: rotate(45deg);
  flex: none;
}
.pin-grande .pin-marca { width: 18px; height: 18px; }
.pin-texto {
  font: 700 11px/1 var(--letra);
  color: var(--tinta);
  background: var(--fondo);
  border: 1px solid var(--linea);
  padding: 3px 5px;
}
.pin-walmart:not(.pin-grande) .pin-texto { display: none; }
.marcador-zip { display: flex; align-items: center; gap: 5px; pointer-events: none; }
.marcador-zip .anillo { width: 18px; height: 18px; border-width: 4px; background: var(--fondo); }
.etiqueta-zip {
  font: 700 12px/1 var(--mono);
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 4px 6px;
}
.leyenda-mapa {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.82rem;
  color: var(--tinta-2);
}
.leyenda-mapa li { display: flex; align-items: center; gap: 0.45rem; }
.leyenda-mapa .pin-marca { width: 10px; height: 10px; box-shadow: none; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--tinta-2); display: inline-block; }
.punto-azul { background: var(--hilo); }
.anillo { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--tinta); display: inline-block; }

/* Tus turnos */
.turnos { padding: 1.5rem 0 3rem; }
.titulo-form { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.5rem; }
.cabeza-turnos h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
.cabeza-turnos p { color: var(--tinta-2); max-width: 60ch; margin: 0.6rem 0 0; }
.turnos-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-top: 1.5rem; }
@media (min-width: 960px) { .turnos-grid { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 3.5rem; align-items: start; } }
.fila-campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; }
.form-turno .campo { border-top: 0; border-bottom: 0; padding: 0.5rem 0 0.75rem; }
.form-turno .campo small { display: inline; }
.form-turno .entrada-num input,
.select-simple {
  font: 600 1.0625rem/1.2 var(--letra);
  color: var(--tinta);
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 44px;
  width: 100%;
  min-width: 0;
}
.form-turno .entrada-num input { padding: 0.35rem 0.4rem 0.4rem 0; }
.form-turno .entrada-num input::-webkit-calendar-picker-indicator { opacity: 0.7; cursor: pointer; }
:root[data-theme="dark"] .form-turno .entrada-num input::-webkit-calendar-picker-indicator { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-turno .entrada-num input::-webkit-calendar-picker-indicator { filter: invert(1); }
}
.select-simple { cursor: pointer; padding: 0.35rem 0; }
.select-simple option { background: var(--fondo); color: var(--tinta); }
.form-turno .boton { width: 100%; margin-top: 0.5rem; }
.estado-turno { font-weight: 600; margin: 0.75rem 0 0; }
.estado-turno:empty { display: none; }
.estado-turno[data-tipo="error"] { color: var(--hilo-texto); }

.filtro-turnos { display: block; border-bottom: 2px solid var(--tinta); max-width: 16rem; margin-bottom: 1rem; }
.total-turnos { font-weight: 600; margin: 0 0 0.5rem; font-variant-numeric: tabular-nums; }
.resultados-turnos h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.5rem 0 0.4rem;
}
.momentos-turnos { list-style: none; padding: 0; margin: 0; }
.momentos-turnos li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
.momentos-turnos strong { font-weight: 700; }
.momentos-turnos span { grid-column: 1; color: var(--tinta-2); font-size: 0.9rem; }
.momentos-turnos b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.detalle-turnos { margin-top: 1.75rem; border-top: 1px solid var(--linea); padding-top: 0.75rem; }
.detalle-turnos summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.lista-turnos { list-style: none; padding: 0; margin: 0.5rem 0 0.75rem; }
.lista-turnos li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  border-bottom: 1px solid var(--linea-suave);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.lista-turnos li span { padding: 0.5rem 0; }

/* ---------- Artículos de la guía ---------- */
.articulo {
  max-width: var(--lectura);
  padding-bottom: 4rem;
}
.migas {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.5rem 0 0;
}
.migas a { text-decoration: none; }
.migas a:active { text-decoration: underline; }
.articulo > h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-top: 1rem;
}
.articulo .migas { margin: 1.75rem 0 0; }
.articulo .entradilla {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--tinta-2);
  margin: 1.25rem 0 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--linea);
}
.articulo h2 {
  font-size: clamp(1.45rem, 4.4vw, 1.9rem);
  font-weight: 700;
  margin: 3rem 0 0.75rem;
}
.articulo h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.5rem;
}
.articulo p { margin: 0 0 1rem; }
.articulo ul, .articulo ol { padding-left: 1.3rem; margin: 0 0 1.25rem; }
.articulo li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.articulo li::marker { color: var(--hilo-texto); font-weight: 700; }
.articulo strong { font-weight: 700; }
.articulo a:not(.boton) { text-decoration-color: var(--hilo); }

.nota {
  font-size: 0.92rem;
  color: var(--tinta-2);
}

/* "De la calle": consejo de experiencia real.
   Panel con un trazo corto del hilo azul arriba. */
.experiencia {
  background: var(--panel);
  padding: 1.1rem 1.1rem 0.4rem;
  margin: 2rem 0;
  position: relative;
}
.experiencia::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.1rem;
  width: 2.5rem;
  height: 3px;
  background: var(--hilo);
}
.experiencia .rotulo {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.3rem 0 0.5rem;
}
.experiencia p { margin: 0 0 0.75rem; }
.experiencia ol, .experiencia ul { margin-bottom: 0.75rem; }

/* ---------- Neto Pro (próximamente): medir interés ---------- */
.pro-caja {
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 1.4rem 1.15rem 1.2rem;
}
.pro-tag {
  display: inline-block;
  font: 600 0.66rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--hilo);
  color: var(--sobre-tinta);
  padding: 5px 7px;
}
.pro-caja h2 { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; margin: 0.6rem 0 0.4rem; }
.pro-sub { margin: 0 0 1rem; color: color-mix(in srgb, var(--sobre-tinta) 82%, transparent); max-width: 52ch; }
.pro-sub strong { color: var(--sobre-tinta); }
.pro-ideas { display: grid; gap: 8px; margin-bottom: 1rem; }
@media (min-width: 860px) { .pro-ideas { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pro-ideas button {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  padding: 0.75rem 0.85rem 0.8rem 2.6rem;
  position: relative;
  background: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--sobre-tinta) 35%, transparent);
  font: inherit;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms var(--salida);
}
.pro-ideas button b { font-weight: 700; }
.pro-ideas button span { font-size: 0.88rem; color: color-mix(in srgb, var(--sobre-tinta) 75%, transparent); }
/* Cuadrito de marcar */
.pro-ideas button::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
}
.pro-ideas button[aria-pressed="true"] { border-color: var(--hilo); background: color-mix(in srgb, var(--hilo) 22%, transparent); }
.pro-ideas button[aria-pressed="true"]::before {
  background: var(--hilo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E") center / 80% no-repeat;
  border-color: var(--hilo);
}
.pro-ideas button:active { transform: scale(0.985); }
.pro-ideas button:disabled { cursor: default; }
.pro-ideas button:disabled:not([aria-pressed="true"]) { opacity: 0.5; }
.pro-caja .boton { background: var(--sobre-tinta); color: var(--tinta); border-color: var(--sobre-tinta); width: 100%; }
.pro-caja .boton .icono { color: var(--hilo); }
@media (min-width: 860px) { .pro-caja .boton { width: auto; } }
.pro-caja .boton[hidden] { display: none; }
.pro-nota { margin: 0.75rem 0 0; font-size: 0.85rem; color: color-mix(in srgb, var(--sobre-tinta) 70%, transparent); }
.pro.votado .pro-nota { color: var(--sobre-tinta); font-weight: 600; font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) { .pro-ideas button:active { transform: none; } }

/* Privacidad: botón para borrar lo guardado en el teléfono */
.borrar-datos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.borrar-datos .boton { width: auto; }
.borrar-datos .boton.confirmar { background: var(--hilo); border-color: var(--hilo); color: var(--sobre-tinta); }
#estadoBorrar { color: var(--tinta-2); font-size: 0.95rem; }
.pie a { color: inherit; }

/* Caja punteada: texto que falta escribir.
   Bórrala cuando pongas tu experiencia. */
.pendiente {
  border: 1px dashed var(--tinta);
  background: var(--pendiente);
  padding: 0.8rem 1rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}

/* Tablas: en el celular se deslizan de lado */
.tabla-scroll {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  padding: 0.35rem 0.5rem;
  overscroll-behavior-x: contain;
  /* Sombra en el borde cuando queda tabla escondida: avisa que se desliza.
     Las capas "local" se mueven con la tabla y tapan la sombra al llegar al final. */
  --sombra: color-mix(in srgb, var(--tinta) 38%, transparent);
  background:
    linear-gradient(to right, var(--panel) 40%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--panel) 40%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(to right, var(--sombra), transparent) left / 22px 100% no-repeat scroll,
    linear-gradient(to left, var(--sombra), transparent) right / 22px 100% no-repeat scroll,
    var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--linea-suave);
}
thead th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--linea);
  white-space: nowrap;
}
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Bloque "siguiente paso" al final de cada artículo */
.siguiente {
  border-top: 1px solid var(--linea);
  margin-top: 3.5rem;
  padding-top: 1.5rem;
}
.siguiente p { font-size: 1.15rem; font-weight: 600; max-width: 34ch; }
.siguiente .boton { margin-top: 0.25rem; }

/* ---------- Gadgets ---------- */
.productos {
  border-top: 1px solid var(--linea);
  margin-top: 2.5rem;
}
.productos > h2 {
  font-size: clamp(1.45rem, 4.4vw, 1.9rem);
  font-weight: 700;
  padding: 1.1rem 0 0.25rem;
}
.producto {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--linea-suave);
  display: grid;
  gap: 0.6rem 2.5rem;
}
.producto h3 { font-size: 1.3rem; font-weight: 700; }
.producto p { margin: 0 0 0.6rem; max-width: 62ch; }
.producto .buscar {
  background: var(--panel);
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.producto .buscar .medida {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}
@media (min-width: 860px) {
  .producto { grid-template-columns: 16rem 1fr; }
  .producto h3 { padding-top: 0.15rem; }
}
.filtro-gadgets { max-width: 34rem; margin: 1.75rem 0 0; }
.filtro-gadgets .segmentos span { text-align: center; padding: 0 0.4rem; line-height: 1.2; }
.productos > h2 .cuenta {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--tinta-2);
  vertical-align: middle;
}
.productos > h2 .cuenta:not(:empty)::before { content: "· "; }
.intro-seccion { color: var(--tinta-2); margin: 0.2rem 0 0.4rem; }
.sirve-para {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tinta-2);
  margin: 0.75rem 0 0 !important;
}
.boton-amazon { margin-top: 0.9rem; min-height: 46px; padding: 0.65rem 1rem; font-size: 0.95rem; }
.aviso-afiliado {
  font-size: 0.85rem !important;
  border-left: 0;
  background: var(--panel);
  padding: 0.6rem 0.8rem;
  margin-top: 1rem !important;
}
.productos.compactos { display: grid; }
@media (min-width: 700px) {
  .productos.compactos { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .productos.compactos > h2 { grid-column: 1 / -1; }
}
.productos.compactos .producto { grid-template-columns: 1fr; }
.productos.compactos .producto h3 { font-size: 1.15rem; }

/* ---------- Pie de página ---------- */
.pie {
  border-top: 1px solid var(--linea);
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.9rem;
  color: var(--tinta-2);
}
.pie p { margin: 0; max-width: 60ch; }
.pie strong { color: var(--tinta); }
body.con-resumen .pie { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 860px) { body.con-resumen .pie { padding-bottom: 1.5rem; } }
