/* Geoportal Rímac · dirección "río andino": piedra clara, azul petróleo, agua turquesa.
 * Escritorio/proyector: mapa a pantalla completa + panel lateral con pestañas.
 * Celular (≤ 48rem): el panel pasa a hoja inferior con tres alturas. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../vendor/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --piedra: #f4f1ea;
  --piedra-2: #ebe6db;
  --superficie: #fffdf8;
  --linea: #ddd5c6;
  --linea-fuerte: #b9b0a0;
  --tinta: #1b2832;
  --tinta-2: #475660;
  --petroleo: #0b4f6c;
  --petroleo-oscuro: #083a50;
  --agua: #1fa3a3;
  --agua-suave: #d9efee;

  --cumple: #14632b;
  --cumple-fondo: #e1f2e5;
  --cumple-marca: #1a7f37;
  --no-cumple: #a3191b;
  --no-cumple-fondo: #fbe4e2;
  --no-cumple-marca: #c62828;
  --sin-dato: #46505c;
  --sin-dato-fondo: #eceae6;
  --sin-dato-marca: #6b7280;

  --aviso-fondo: #fcefd2;
  --aviso-tinta: #6b4200;
  --aviso-linea: #e8c77d;

  --radio: 10px;
  --sombra: 0 1px 2px rgb(27 40 50 / 0.06), 0 4px 14px rgb(27 40 50 / 0.08);
  --sombra-alta: 0 2px 6px rgb(27 40 50 / 0.1), 0 12px 32px rgb(27 40 50 / 0.16);
  --fuente: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ancho-panel: 30rem;
  --hoja-plegada: 6.25rem;

  color-scheme: light;
  accent-color: var(--petroleo);
}

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

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

body {
  margin: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  font-family: var(--fuente);
  font-size: 1.0625rem;          /* 17 px: legible en proyector */
  line-height: 1.5;
  color: var(--tinta);
  background: var(--piedra);
  font-variant-numeric: tabular-nums;
  scrollbar-color: var(--linea-fuerte) transparent;
}

::selection { background: var(--agua-suave); color: var(--petroleo-oscuro); }

:focus-visible {
  outline: 3px solid var(--agua);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }

a { color: var(--petroleo); text-underline-offset: 0.18em; }

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.icono { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cabecera, aviso e información ---------- */

.cabecera {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--petroleo);
  color: #fff;
  padding: 0.7rem 1.25rem 0.65rem;
  border-bottom: 3px solid var(--agua);
}
.cabecera h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; }
.cabecera__sub { margin: 0.1rem 0 0; color: #cfe6ee; font-size: 0.95rem; }

.boton-info {
  flex: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.5rem; padding: 0.35rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.55); border-radius: 6px;
  background: transparent; color: #fff;
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.boton-info:hover { background: rgb(255 255 255 / 0.12); }
.boton-info .icono { width: 1.15rem; height: 1.15rem; stroke-width: 2; }
.boton-info:focus-visible { outline-color: #fff; }

.aviso {
  display: flex; gap: 0.55rem; align-items: center;
  padding: 0.4rem 1.25rem;
  background: var(--aviso-fondo);
  color: var(--aviso-tinta);
  border-bottom: 1px solid var(--aviso-linea);
  font-size: 0.975rem;
}
.aviso p { margin: 0; }
.aviso__icono {
  flex: none; width: 1.2rem; height: 1.2rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.aviso[hidden] { display: none; }

.info {
  margin: 0;
  inset: 4.25rem 1rem auto auto;
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 5.5rem);
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--tinta);
  box-shadow: var(--sombra-alta);
  font-size: 0.975rem;
}
.info::backdrop { background: rgb(27 40 50 / 0.25); }
.info__cabecera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.25rem; }
.info h2 { font-size: 1.2rem; color: var(--petroleo-oscuro); }
.info h3 { font-size: 1rem; color: var(--petroleo-oscuro); margin: 1rem 0 0.25rem; }
.info p, .info ul { margin: 0; }
.info ul { padding-left: 1.2rem; }
.info li + li { margin-top: 0.2rem; }
.info__cerrar {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: 6px; background: none; color: var(--tinta-2);
  cursor: pointer;
}
.info__cerrar:hover { background: var(--piedra-2); color: var(--tinta); }
.info__cerrar .icono { width: 1.25rem; height: 1.25rem; stroke-width: 2.5; }

/* ---------- Distribución ---------- */

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ancho-panel);
  min-height: 0;
}

.mapa { height: 100%; min-height: 0; background: var(--piedra-2); font: inherit; }

.panel {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--superficie);
  border-left: 1px solid var(--linea);
  box-shadow: -2px 0 12px rgb(27 40 50 / 0.06);
  z-index: 1;
}
.panel__asa { display: none; }

/* ---------- Pestañas ---------- */

.pestanas {
  display: flex; gap: 0.25rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--linea);
  background: var(--superficie);
}
.pestanas [role="tab"] {
  flex: 1 1 0;
  padding: 0.75rem 0.5rem 0.6rem;
  border: 0; border-bottom: 3px solid transparent;
  background: none;
  font: inherit; font-weight: 600; color: var(--tinta-2);
  cursor: pointer;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}
.pestanas [role="tab"]:hover { color: var(--petroleo); }
.pestanas [role="tab"][aria-selected="true"] { color: var(--petroleo-oscuro); border-bottom-color: var(--agua); }
.pestanas [role="tab"]:focus-visible { outline-offset: -3px; }

.panel__contenido {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.25rem 1.5rem;
  overscroll-behavior: contain;
}
.panel__contenido[hidden] { display: none; }
.panel__contenido:focus-visible { outline-offset: -3px; }
.panel__contenido--tabla { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 1rem; }

.panel__intro { margin: 0 0 0.6rem; color: var(--tinta-2); font-size: 0.95rem; }
.panel__subtitulo { font-size: 1.05rem; color: var(--petroleo-oscuro); margin: 1.25rem 0 0.35rem; }

.lista-vacia { list-style: none; margin: 0; padding: 0.75rem 0; color: var(--tinta-2); }
.lista-vacia--error { color: var(--no-cumple); font-weight: 600; }

/* ---------- Semáforo (texto + icono, no solo color) ---------- */

.semaforo {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.1rem 0.55rem 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
}
.semaforo svg { width: 0.95rem; height: 0.95rem; flex: none; }
.semaforo--cumple { background: var(--cumple-fondo); color: var(--cumple); }
.semaforo--no-cumple { background: var(--no-cumple-fondo); color: var(--no-cumple); }
.semaforo--sin-dato { background: var(--sin-dato-fondo); color: var(--sin-dato); }

/* ---------- Resumen ---------- */

.conteos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem;
}
.conteo {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.65rem 0.75rem 0.55rem;
  border-radius: var(--radio);
  border: 1px solid transparent;
}
.conteo__etiqueta { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
.conteo__etiqueta svg { width: 1rem; height: 1rem; flex: none; }
.conteo__numero { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.conteo--cumple { background: var(--cumple-fondo); color: var(--cumple); border-color: #c4e3cc; }
.conteo--no-cumple { background: var(--no-cumple-fondo); color: var(--no-cumple); border-color: #f1c4c0; }
.conteo--sin-dato { background: var(--sin-dato-fondo); color: var(--sin-dato); border-color: #d9d5ce; }

.estaciones { list-style: none; margin: 0; padding: 0; }
.estaciones li + li { border-top: 1px solid var(--linea); }
.estacion {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.4rem;
  border: 0; border-radius: 6px;
  background: none;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.estacion:hover { background: var(--piedra); }
.estacion[aria-current="true"] { background: var(--agua-suave); }
.estacion__codigo { font-weight: 700; color: var(--petroleo); }
.estacion__nombre { display: block; font-weight: 600; }
.estacion__fecha { display: block; font-size: 0.875rem; color: var(--tinta-2); white-space: nowrap; }

/* ---------- Estación ---------- */

.ficha { margin-bottom: 1rem; }
.ficha__titulo { display: flex; align-items: center; gap: 0.6rem; }
.ficha__codigo {
  padding: 0.1rem 0.5rem; border-radius: 6px;
  background: var(--petroleo); color: #fff;
  font-weight: 700; font-size: 1rem;
}
.ficha__nombre { font-size: 1.4rem; color: var(--petroleo-oscuro); }
.ficha__estado { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.6rem; }
.ficha__estado .semaforo { font-size: 1rem; padding: 0.2rem 0.7rem 0.2rem 0.5rem; }
.ficha__meta { margin: 0.5rem 0 0; color: var(--tinta-2); font-size: 0.925rem; }

.panel__subtitulo--graficos { margin-top: 0.25rem; }
.graficos {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* una gráfica por fila, a todo el ancho */
  gap: 0.75rem;
  margin: 0.4rem 0 1rem;
}
.graficos__estado { grid-column: 1 / -1; margin: 0; padding: 0.75rem 0; color: var(--tinta-2); }
.graficos__estado--error { color: var(--no-cumple); font-weight: 600; }

.grafico-figura {
  margin: 0;
  min-width: 0;
  padding: 0.45rem 0 0.3rem;
  border: 1px solid var(--linea);
  border-radius: 8px;
  background: #fff;
}
.grafico-figura figcaption { padding: 0 0.6rem 0.15rem; font-size: 0.925rem; line-height: 1.25; font-weight: 700; color: var(--petroleo-oscuro); }
.grafico-figura__nota { margin: 0; padding: 0 0.6rem; font-size: 0.8rem; color: var(--tinta-2); line-height: 1.3; }

.grafico { display: block; overflow: visible; font-family: var(--fuente); }
.grafico text { font-size: 12px; }
.grafico__eje { fill: var(--tinta-2); }
.grafico__unidad { fill: var(--tinta-2); font-weight: 600; }
.grafico__rejilla { stroke: #ece7dc; stroke-width: 1; }
.grafico__base { stroke: var(--linea-fuerte); stroke-width: 1; }
.grafico__banda { fill: var(--agua); fill-opacity: 0.14; }
.grafico__banda--escalon { fill-opacity: 0.2; }
.grafico__linea-limite { stroke: var(--petroleo); stroke-width: 1.5; stroke-dasharray: 5 3; }
.grafico__rotulo {
  fill: var(--petroleo-oscuro); font-weight: 700;
  paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round;
}

.barra { outline: none; cursor: default; }
.barra__marco { fill: transparent; stroke: none; rx: 4px; }
.barra:hover .barra__marco { fill: var(--piedra); }
.barra:focus-visible .barra__marco { fill: var(--agua-suave); stroke: var(--agua); stroke-width: 2.5; }
.barra__rect { stroke: #fff; stroke-width: 1; }
.barra--cumple .barra__rect { fill: var(--cumple-marca); }
.barra--no-cumple .barra__rect { fill: var(--no-cumple-marca); }
.barra--sin-dato .barra__rect { fill: var(--sin-dato-marca); }
.barra__icono { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.barra--cumple .barra__icono { stroke: var(--cumple); }
.barra--no-cumple .barra__icono { stroke: var(--no-cumple); }
.barra--sin-dato .barra__icono { stroke: var(--sin-dato); }
.barra__sin-dato { stroke: var(--sin-dato-marca); stroke-width: 3; stroke-linecap: round; }
.grafico .barra__texto-sin-dato { fill: var(--sin-dato); font-size: 12px; font-weight: 700; }

.mini-tabla-contenedor { overflow-x: auto; margin-top: 0.5rem; }
.mini-tabla { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.mini-tabla caption { text-align: left; font-weight: 700; color: var(--petroleo-oscuro); padding-bottom: 0.3rem; }
.mini-tabla th, .mini-tabla td { padding: 0.4rem 0.35rem; border-top: 1px solid var(--linea); text-align: left; }
.mini-tabla thead th { border-top: 0; font-size: 0.85rem; color: var(--tinta-2); font-weight: 600; }
.mini-tabla tbody th { font-weight: 600; }
.mini-tabla .num, .mini-tabla td { white-space: nowrap; }
.mini-tabla .num { text-align: right; }

/* ---------- Mapa: marcadores, leyenda, controles ---------- */

.marca {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.5rem 0.2rem 0.3rem;
  border-radius: 999px;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 700; font-size: 0.875rem; line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  translate: -50% -50%;
  transition: scale 150ms ease-out, box-shadow 150ms ease-out;
}
.marca svg { width: 1rem; height: 1rem; }
.marca--cumple { background: var(--cumple-marca); }
.marca--no-cumple { background: var(--no-cumple-marca); }
.marca--sin-dato { background: var(--sin-dato-marca); }
.marca--activa { scale: 1.18; box-shadow: 0 0 0 3px var(--petroleo-oscuro), 0 3px 10px rgb(0 0 0 / 0.35); }
.marca-icono:hover .marca, .marca-icono:focus-visible .marca { scale: 1.12; }
.marca-icono:hover .marca--activa { scale: 1.18; }
.leaflet-marker-icon.marca-icono { background: none; border: 0; }

.leaflet-container a { color: var(--petroleo); }
.leaflet-control-attribution { font-size: 0.75rem; }

.leyenda {
  background: rgb(255 253 248 / 0.96);
  border: 1px solid var(--linea);
  border-radius: 8px;
  box-shadow: var(--sombra);
  font: inherit; font-size: 0.9rem;
  max-width: 15rem;
}
.leyenda__boton {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; min-height: 2.25rem;
  padding: 0.3rem 0.65rem;
  border: 0; border-radius: 8px; background: none;
  font: inherit; font-weight: 700; color: var(--petroleo-oscuro);
  cursor: pointer;
}
.leyenda__boton::after {
  content: ""; width: 0.45rem; height: 0.45rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  rotate: -135deg; translate: 0 0.15rem;
  transition: rotate 150ms ease-out;
}
.leyenda__boton[aria-expanded="false"]::after { rotate: 45deg; translate: 0 -0.1rem; }
.leyenda__lista { list-style: none; margin: 0; padding: 0 0.65rem 0.6rem; display: grid; gap: 0.35rem; }
.leyenda__lista[hidden] { display: none; }
.leyenda__nota { font-size: 0.8rem; color: var(--tinta-2); line-height: 1.35; }

/* ---------- Mediciones: filtros y tabla ---------- */

.filtros {
  display: grid;
  gap: 0.6rem 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  margin-bottom: 0.6rem;
}
.campo { min-width: 0; display: grid; gap: 0.2rem; font-size: 0.875rem; font-weight: 600; color: var(--tinta-2); }
.campo select, .campo input {
  width: 100%; min-width: 0;
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--tinta);
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--linea-fuerte);
  border-radius: 6px;
  background: #fff;
}
.campo select:hover, .campo input:hover { border-color: var(--petroleo); }
.campo input[aria-invalid="true"] { border-color: var(--no-cumple-marca); }
.filtros__acciones { grid-column: 1 / -1; display: flex; gap: 0.5rem; }
.filtros__acciones .boton { flex: 1; }

.boton {
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--petroleo);
  border-radius: 6px;
  background: #fff;
  color: var(--petroleo);
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.boton:hover { background: var(--agua-suave); }
.boton--primario { background: var(--petroleo); color: #fff; }
.boton--primario:hover { background: var(--petroleo-oscuro); }
.boton:disabled { opacity: 0.55; cursor: progress; }
.boton--chico { min-height: 2.2rem; padding: 0.2rem 0.75rem; font-size: 0.9rem; }

.estado { margin: 0 0 0.5rem; color: var(--tinta-2); font-size: 0.925rem; }
.estado:empty { display: none; }
.estado--error { color: var(--no-cumple); font-weight: 600; }

.tabla-contenedor {
  flex: 1 1 auto;
  min-height: 8rem;
  overflow: auto;
  border: 1px solid var(--linea);
  border-radius: 8px;
  background: #fff;
}
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
.tabla th, .tabla td { padding: 0.45rem 0.65rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--linea); }
.tabla thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--piedra-2);
  color: var(--petroleo-oscuro);
  font-size: 0.875rem; font-weight: 700;
  vertical-align: bottom;
}
.th-sub { font-weight: 400; color: var(--tinta-2); font-size: 0.8rem; }
.tabla tbody tr:nth-child(even) td { background: #faf8f3; }
.tabla tbody tr:hover td { background: var(--agua-suave); }
.tabla .num { text-align: right; }
.tabla td.valor { font-weight: 600; }
.tabla[aria-busy="true"] tbody { opacity: 0.5; }
/* Primera columna (fecha) fija al desplazar en horizontal */
.tabla th:first-child, .tabla td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--linea); }
.tabla thead th:first-child { z-index: 3; background: var(--piedra-2); }

.origen { font-size: 0.85rem; font-weight: 600; padding: 0.05rem 0.45rem; border-radius: 4px; }
.origen--simulado { background: var(--aviso-fondo); color: var(--aviso-tinta); border: 1px solid var(--aviso-linea); }
.origen--campo { color: var(--tinta-2); }

/* ---------- Proyector y pantallas medianas ---------- */

@media (max-width: 80rem) {
  :root { --ancho-panel: 27rem; }
  .cabecera__sub { font-size: 0.9rem; }
}

/* ---------- Celular: hoja inferior ---------- */

@media (max-width: 48rem) {
  /* Celular: base 15 px, espaciado más compacto, ningún texto < 12 px y
   * controles táctiles >= 44 px (2.75rem). Los campos de formulario se quedan
   * en 16 px para que iOS no haga zoom al enfocarlos. */
  :root { --hoja-plegada: 5.6rem; }
  body { font-size: 0.9375rem; line-height: 1.45; }

  .cabecera { padding: 0.4rem 0.75rem; gap: 0.5rem; }
  .cabecera h1 { font-size: 1rem; }
  .cabecera__sub { display: none; }
  .boton-info { min-height: 2.75rem; padding: 0.25rem 0.65rem; font-size: 0.875rem; }
  .boton-info .icono { width: 1rem; height: 1rem; }
  .aviso { padding: 0.3rem 0.75rem; font-size: 0.875rem; gap: 0.4rem; }
  .aviso__icono { width: 1rem; height: 1rem; }
  .aviso__largo { display: none; }
  .info { inset: 3.5rem 0.5rem auto 0.5rem; width: auto; padding: 0.75rem 1rem 1rem; font-size: 0.875rem; }
  .info h2 { font-size: 1.05rem; }
  .info h3 { font-size: 0.9375rem; margin-top: 0.75rem; }
  .info__cerrar { width: 2.75rem; height: 2.75rem; }

  .app { grid-template-columns: minmax(0, 1fr); position: relative; }
  /* El mapa deja libre la franja de la hoja plegada para que sus controles se vean. */
  .mapa { height: calc(100% - var(--hoja-plegada)); }
  .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
  .leyenda { font-size: 0.875rem; }
  .leyenda__boton { min-height: 2.75rem; }
  .leyenda__nota { font-size: 0.75rem; }

  .panel {
    position: fixed; left: 0; right: 0; bottom: 0;
    /* Cambia de alto (no de posición) para que todo el contenido quede dentro de la pantalla y se pueda desplazar. */
    height: var(--hoja-plegada);
    border-left: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgb(27 40 50 / 0.18);
    z-index: 1100;
    transition: height 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel[data-hoja="media"] { height: 50dvh; }
  .panel[data-hoja="completa"] { height: 88dvh; }
  .panel[data-hoja="plegada"] .panel__contenido { visibility: hidden; }

  .panel__asa {
    display: grid; place-items: center;
    flex: none;
    width: 100%; height: 2.75rem;
    border: 0; border-radius: 16px 16px 0 0; background: none;
    cursor: pointer;
  }
  .panel__asa span { width: 2.75rem; height: 5px; border-radius: 999px; background: var(--linea-fuerte); }
  .panel__asa:focus-visible { outline-offset: -4px; }

  .pestanas { padding: 0 0.5rem; }
  .pestanas [role="tab"] { min-height: 2.75rem; padding: 0.3rem 0.25rem 0.25rem; font-size: 0.9375rem; }
  .panel__contenido { padding: 0.7rem 0.85rem 1rem; }
  .panel__intro { font-size: 0.875rem; margin-bottom: 0.45rem; }
  .panel__subtitulo { font-size: 0.9375rem; margin: 0.9rem 0 0.2rem; }

  .semaforo { font-size: 0.8125rem; }
  .semaforo svg { width: 0.85rem; height: 0.85rem; }

  .conteos { gap: 0.45rem; }
  .conteo { padding: 0.4rem 0.5rem 0.35rem; }
  .conteo__etiqueta { font-size: 0.8125rem; gap: 0.2rem; white-space: nowrap; }
  .conteo__etiqueta svg { width: 0.85rem; height: 0.85rem; }
  .conteo__numero { font-size: 1.4rem; }

  .estacion { min-height: 2.75rem; padding: 0.4rem 0.3rem; gap: 0.5rem; grid-template-columns: 2.3rem minmax(0, 1fr) auto; }
  .estacion__fecha { font-size: 0.8125rem; }

  .ficha { margin-bottom: 0.75rem; }
  .ficha__codigo { font-size: 0.875rem; }
  .ficha__nombre { font-size: 1.15rem; }
  .ficha__estado { margin-top: 0.45rem; }
  .ficha__estado .semaforo { font-size: 0.875rem; }
  .ficha__meta { font-size: 0.8125rem; margin-top: 0.35rem; }
  .graficos { gap: 0.6rem; margin-bottom: 0.75rem; }
  .grafico-figura figcaption { font-size: 0.875rem; }
  .grafico-figura__nota { font-size: 0.75rem; }
  .mini-tabla { font-size: 0.875rem; }
  .mini-tabla thead th { font-size: 0.8125rem; }
  .mini-tabla th, .mini-tabla td { padding: 0.35rem 0.3rem; }

  .filtros { gap: 0.45rem 0.6rem; margin-bottom: 0.45rem; }
  .campo { font-size: 0.8125rem; gap: 0.15rem; }
  .campo select, .campo input { min-height: 2.75rem; padding: 0.3rem 0.5rem; }
  .boton, .boton--chico { min-height: 2.75rem; padding: 0.25rem 0.8rem; font-size: 0.9375rem; }
  .estado { font-size: 0.8125rem; margin-bottom: 0.4rem; }
  .tabla { font-size: 0.875rem; }
  .tabla th, .tabla td { padding: 0.35rem 0.5rem; }
  .tabla thead th { font-size: 0.8125rem; }
  .th-sub { font-size: 0.75rem; }
  .origen { font-size: 0.8125rem; }
}

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