:root {
  color-scheme: light;
  font: 100%/1.5 system-ui, sans-serif;
  color: #142638;
  background: #f4f7fa;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
a { color: #075782; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #00709b; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1.15; }
h2 { font-size: 1.15rem; }
h3 { line-height: 1.3; }

.salto { position: absolute; left: 1rem; top: 1rem; z-index: 5; padding: .5rem; background: white; }
.salto:not(:focus) { clip-path: inset(50%); }
.cabecera {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  color: #fff;
  background: #112b40;
}
.marca { color: #bbddec; text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; font-weight: 700; }
.demo { color: #392800; background: #ffda78; border-radius: .3rem; padding: .35rem .65rem; font-weight: 750; }
.visor { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, 27rem); }
.panel-mapa { display: flex; flex-direction: column; min-width: 0; background: #e4edf3; }
.encabezado-mapa { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; background: #f3f8fb; }
.estado-mapa, .ayuda-mapa { padding: .65rem 1rem; background: #edf4f8; }
.ayuda-mapa { font-size: .85rem; }
#mapa { position: relative; flex: 1; min-height: 0; }
#mapa > .montaje-mapa { position: absolute; inset: 0; }
.panel-informes { padding: .85rem 1rem 1.4rem; background: white; overflow-wrap: anywhere; }
#estado-informes { color: #354d5f; margin: .25rem 0 .75rem; }
#filtros fieldset { min-width: 0; margin: .5rem 0; border: 1px solid #a4b7c4; border-radius: .4rem; }
.campos-filtro { display: grid; gap: .35rem; }
.campos-filtro label { display: grid; }
.campos-filtro input, .campos-filtro select { min-width: 0; font: inherit; }
.acciones-filtro { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
#formato-fecha, #unidades-filtro, #estado-filtros { font-size: .85rem; }
#estado-filtros { color: #832118; }
#reintentar, #reintentar-mapa, #cerrar-ficha { border-radius: .3rem; border: 1px solid #8299ab; color: inherit; background: white; padding: .35rem .6rem; }
.informes, .leyenda { margin: .6rem 0 0; padding: 0; list-style: none; }
.informes li + li { border-top: 1px solid #dbe4eb; }
.fila {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 44px;
  padding: .5rem .25rem;
  border: 0;
  background: white;
  text-align: left;
  color: inherit;
}
.fila:hover, .fila[aria-expanded="true"] { background: #edf5fa; }
.fila small { display: block; color: #354d5f; }
.simbolo { width: 24px; height: 24px; flex: 0 0 24px; }
.panel-leyenda { border-top: 1px solid #dbe4eb; padding: .5rem 1rem .7rem; background: #f3f8fb; }
.panel-leyenda p { font-size: .85rem; color: #354d5f; }
.leyenda { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .25rem .45rem; font-size: .85rem; }
.leyenda li { display: flex; align-items: center; gap: .25rem; }
.leyenda + p { margin-top: .4rem; }
#ficha { margin: .75rem 0; padding: .75rem; border: 1px solid #a4b7c4; border-radius: .4rem; background: #f3f8fb; }
#titulo-ficha { margin: .55rem 0; }
#ficha dt { font-weight: 650; }
#ficha dd { margin: 0 0 .4rem; }
#ficha ul { padding-left: 1.2rem; }

@media (min-width: 49rem) {
  body { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .panel-informes { overflow-y: auto; }
  .panel-leyenda { max-height: 30vh; overflow-y: auto; }
}
@media (max-width: 48.99rem) {
  .visor { grid-template-columns: minmax(0, 1fr); }
  #mapa { flex: none; height: clamp(13rem, 45svh, 27rem); }
  #titulo-informes, #titulo-ficha { scroll-margin-top: 9rem; }
}
