/* Mapa de luz · «¿Hay luz?», de noche: el lado con luz (la pregunta, el estado, el buscador) y el lado apagado (dónde hay cortes).
   Tinta color luz de sodio sobre la noche. Letra Chivo (Omnibus-Type, fundición argentina; SIL Open Font License), servida desde acá. */
@font-face { font-family: "Chivo"; src: url(/chivo-latin.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap }
:root {
  --dia: #17191e;          /* el lado con luz */
  --noche: #0d0e11;        /* el lado apagado */
  --sup: #1f2228;          /* cajas y sugerencias, sobre los dos lados */
  --tinta: #f2c27c;        /* luz de sodio: el texto */
  --suave: #a9895e;        /* texto secundario */
  --brillo: #f7d29b;       /* lo más claro: la lamparita y el foco */
  --linea: #2e3138;
  --hover: #23262d;
  --rojo: #ff8a7f;         /* el texto de «hay un corte» */
  --rojo-fuerte: #e2392f;  /* las marcas de corte: borde del estado, puntos */
  --gris: #c9c4bb;         /* sin datos */
  --gris-fuerte: #6f6a62;
  --aviso: #f7d29b; --aviso-f: #2b2418;
  --boton: #f2c27c; --boton-texto: #0d0e11;
  --foco: #f7d29b;
  --letra: "Chivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box }
[hidden] { display: none !important }   /* si no, .boton (inline-flex) le gana al atributo */
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--noche); color: var(--tinta); font: 400 1.0625rem/1.5 var(--letra) }
::selection { background: var(--tinta); color: var(--noche) }
a { color: inherit; text-underline-offset: 3px }
a:hover { text-decoration-thickness: 2px }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px }
.n { font-variant-numeric: tabular-nums lining-nums }
.saltar { position: absolute; left: -999px; top: 8px } .saltar:focus { left: 8px; background: var(--dia); padding: 10px 14px; z-index: 9 }

/* encabezado */
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 20px; background: var(--dia) }
.marca { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 1.1875rem; letter-spacing: -.015em; text-decoration: none; white-space: nowrap }
.marca svg { width: 26px; height: 26px; flex: none }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 600; text-decoration: none }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px }
.nav .buscar-link { min-width: 44px; justify-content: center; gap: 8px }
.buscar-link svg { width: 22px; height: 22px; flex: none }
@media (max-width: 1039px) {   /* en el celular «Buscar» es una lupa (el nombre queda para los lectores de pantalla) */
  .nav .solo-ancho { display: none } .nav a:last-child { padding-right: 0 }
  .buscar-link .texto-buscar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
}
@media (max-width: 400px) { .marca { font-size: 1.0625rem } .nav a { padding: 0 8px; font-size: .9375rem } }
@media (min-width: 1040px) { .buscar-link svg { display: none } }

/* las dos mitades: con luz y apagada; abajo, a lo ancho, lo que sigue */
.dia { background: var(--dia); padding: 20px 20px 44px }
.noche { background: var(--noche); padding: 36px 20px 48px }
.abajo { background: var(--noche); padding: 8px 20px 48px; border-top: 1px solid var(--linea) }
main.una .dia, main.una .noche, .abajo { padding-left: max(20px, calc((100% - 46rem) / 2)); padding-right: max(20px, calc((100% - 46rem) / 2)) }
main.una .noche { padding-top: 12px }
#sin-red, #viejo { margin: 0; max-width: none; border-radius: 0 }

/* títulos y texto */
.migas { color: var(--suave); font-size: .9375rem; margin: 0 0 10px } .migas a { color: inherit }
h1 { font-weight: 800; font-size: clamp(2.3rem, 1.7rem + 2.6vw, 3.6rem); line-height: 1; letter-spacing: -.03em; margin: 0 0 18px; text-wrap: balance }
h1.portada { font-size: clamp(3.4rem, 2.5rem + 3.6vw, 5.5rem); line-height: .95; letter-spacing: -.035em; max-width: 6em; margin-bottom: 16px }   /* siempre «¿Hay luz en / tu zona?»: la lamparita cuelga al lado */
h2 { font-weight: 700; font-size: 1.375rem; line-height: 1.2; letter-spacing: -.01em; margin: 36px 0 12px; text-wrap: balance }
h3 { font-size: 1.125rem; line-height: 1.25; margin: 20px 0 8px }
.noche h2.con-icono { display: flex; align-items: center; gap: 10px; margin-top: 0 }
.noche h2.con-icono svg { width: 26px; height: 26px; flex: none }
.bajada { font-size: 1.125rem; line-height: 1.45; margin: 0; max-width: 34rem; text-wrap: pretty }
p, ul, ol { max-width: 40rem }
.nota { color: var(--suave); font-size: .9375rem }
.nota a, .hora a { color: var(--tinta) }
.hora { color: var(--suave); font-size: .9375rem; margin: 12px 0 0 }
.hora b { color: var(--tinta) }

/* botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; font: 700 1.0625rem var(--letra); color: var(--tinta); background: transparent; border: 2px solid var(--tinta); border-radius: 6px; text-decoration: none; cursor: pointer }
.boton:hover { background: var(--hover) }
.boton:active { transform: translateY(1px) }
.boton.principal, .boton.wa { color: var(--boton-texto); background: var(--boton); border-color: var(--boton) }
.boton.principal:hover, .boton.wa:hover { background: var(--brillo); border-color: var(--brillo) }
.boton svg { width: 22px; height: 22px; flex: none }
.botones { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 }

/* buscador (patrón combobox) */
.buscador { margin-top: 28px; max-width: 34rem; position: relative }
.buscador form { display: block }
.etiqueta { display: block; font-weight: 700; margin-bottom: 8px }
.buscador .fila { display: flex; border: 2px solid var(--tinta); border-radius: 6px }
.buscador .fila:focus-within { outline: 3px solid var(--foco); outline-offset: 3px }
.buscador input { flex: 1; min-width: 0; min-height: 56px; padding: 0 14px; font: 400 1.1875rem var(--letra); color: var(--tinta); background: transparent; border: 0 }
.buscador input::placeholder { color: var(--suave); opacity: 1 }
.buscador input:focus { outline: none }
.buscador .fila .boton { min-height: 56px; margin: -2px -2px -2px 0; padding: 0 22px; font-size: 1.1875rem; border-radius: 0 6px 6px 0 }
.buscador .fila .boton:focus-visible { outline: 3px solid var(--boton-texto); outline-offset: -7px }   /* la fila ya tiene su anillo: el botón marca el suyo por dentro */
.ubicacion { margin-top: 12px; font-weight: 600 }
.mensaje { margin: 10px 0 0; color: var(--suave); font-size: .9375rem }
.mensaje:empty { margin: 0 }
.sugerencias { list-style: none; margin: 6px 0 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 5; background: var(--sup); border: 1px solid var(--linea); border-radius: 6px; box-shadow: 0 12px 28px rgba(0, 0, 0, .5) }
.sugerencias li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 4px; cursor: pointer }
.sugerencias li[aria-selected="true"], .sugerencias li:hover { background: var(--hover) }
.sugerencias small { color: var(--suave); font-size: .875rem; text-align: right }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: middle; flex: none; background: var(--gris-fuerte) }
.punto.verde { background: var(--tinta) }
.punto.rojo { background: var(--rojo-fuerte); box-shadow: 0 0 0 3px rgba(226, 57, 47, .28) }
.tarjeta.tuzona { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; max-width: 34rem; min-height: 52px; padding: 10px 14px; background: var(--sup); border: 1px solid var(--linea); border-radius: 6px; text-decoration: none }
.tarjeta.tuzona:hover { background: var(--hover) }

/* avisos (CAMMESA, sin conexión, datos viejos) */
.aviso { margin: 16px 0; padding: 12px 14px; background: var(--aviso-f); color: var(--aviso); border-left: 4px solid var(--tinta); font-weight: 600; max-width: 40rem }
.aviso span { font-weight: 400 }

/* el estado de una zona, un partido o una distribuidora: la lamparita prendida, apagada o con duda */
.estado { margin: 4px 0 0; padding: 16px 18px 18px; background: var(--sup); border-left: 4px solid var(--gris-fuerte); border-radius: 0 6px 6px 0; max-width: 40rem }
.estado.rojo { border-left-color: var(--rojo-fuerte) }
.estado.verde { border-left-color: var(--tinta) }
.estado .titular { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-weight: 800; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.01em }
.estado.rojo .titular { color: var(--rojo) }
.estado.gris .titular { color: var(--gris) }
.estado .foco { width: 34px; height: 34px; flex: none }
.estado .cifra { font-weight: 700; font-size: 1.125rem; margin: 0 0 6px }
.estado p { margin: 6px 0 0 }

/* listas */
.cortes { list-style: none; margin: 8px 0 0; padding: 0 }
.cortes li { padding: 12px 0; border-bottom: 1px solid var(--linea) }
.cortes .que { font-weight: 700 }
.detalle { color: var(--suave); font-size: .9375rem }
.grupo { margin: 0; padding: 16px 0 4px; border-top: 1px solid var(--linea); font-size: 1.3125rem; font-weight: 700 }
.grupo a { text-decoration: none } .grupo a:hover { text-decoration: underline }
.grupo .sub { color: var(--suave); font-size: 1rem; font-weight: 400 }
.zonas { list-style: none; margin: 0 0 8px; padding: 0 }
.zonas a, .zonas .fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; text-decoration: none }
.zonas a:hover { background: var(--hover) }
.zonas .sub { color: var(--suave); font-size: .9375rem }
.zonas .n { font-weight: 700; font-variant-numeric: tabular-nums }
.cercanas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.cercanas a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; background: var(--sup); border: 1px solid var(--linea); border-radius: 999px; text-decoration: none }
.cercanas a:hover { border-color: var(--tinta) }
.columnas { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: 24px; max-width: none }
.columnas li { break-inside: avoid }
.columnas a { display: inline-flex; align-items: center; min-height: 44px }
.historial { list-style: none; margin: 0; padding: 0 }
.historial li { padding: 12px 0; border-bottom: 1px solid var(--linea) }
.pasos { padding-left: 1.4em } .pasos li { margin: 0 0 10px; padding-left: 4px } .pasos li::marker { color: var(--brillo); font-weight: 800 }
details { border-bottom: 1px solid var(--linea); max-width: 40rem }
summary { display: flex; align-items: center; min-height: 48px; padding: 10px 0; font-weight: 700; cursor: pointer }
summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--brillo); font-weight: 800 }
details[open] > summary::before { content: "–" }
summary::-webkit-details-marker { display: none }
details p { margin: 0 0 14px; padding-left: 1.2em }
details.mas { border: 0 } details.mas summary { text-decoration: underline }
table { width: 100%; max-width: 40rem; border-collapse: collapse; font-variant-numeric: tabular-nums }
th, td { text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--linea) }
th { color: var(--suave); font-weight: 600; font-size: .9375rem }
td + td, th + th { text-align: right }
td a { display: inline-flex; align-items: center; min-height: 32px }

/* la caja de reclamo */
.caja { margin: 28px 0 0; padding: 18px; background: var(--sup); border: 1px solid var(--linea); border-radius: 8px; max-width: 40rem }
.caja h2 { margin: 0 0 8px; font-size: 1.25rem }
.caja .nota { margin: 8px 0 0 }

/* la home: el resumen y la lamparita */
.ahora { margin-top: 44px; max-width: 34rem }
.ahora h2 { margin: 0 }
.total { font-weight: 800; font-size: 2.5rem; line-height: 1.02; letter-spacing: -.03em; margin: 8px 0 6px; text-wrap: balance }
.empresas { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--linea) }
.empresas li { border-bottom: 1px solid var(--linea) }
.empresas a { display: grid; grid-template-columns: 1fr auto 6rem; align-items: baseline; column-gap: 14px; min-height: 52px; padding: 13px 0; text-decoration: none }
.empresas a:hover { background: var(--hover) }
.empresas .nombre, .empresas .n { font-weight: 700; font-size: 1.1875rem; line-height: 1.2 }
.empresas .n { text-align: right }
.empresas .cuantos { color: var(--suave); font-size: .9375rem; text-align: right }
.empresas .sin-datos { grid-column: 2 / 4; color: var(--suave); font-size: .9375rem; text-align: right }
.resumen-mapa { margin: 0 0 12px }
/* la lamparita: cuelga al lado de «tu zona?». Se ubica en unidades del título (--h1, el mismo clamp que h1.portada):
   «¿Hay luz en» mide 5,05 de su tamaño, así que va en 5,3. Abajo, la luz se apaga hacia el lado de los cortes */
.con-lampara {
  --h1: clamp(3.4rem, 2.5rem + 3.6vw, 5.5rem); --pad: 20px; --padtop: 20px;
  --foco-x: calc(var(--pad) + 5.3 * var(--h1) + 23px); --foco-y: calc(var(--padtop) + 1.425 * var(--h1));
  position: relative; isolation: isolate; background: linear-gradient(to bottom, var(--dia) calc(100% - 96px), var(--noche))
}
.con-lampara::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at var(--foco-x) var(--foco-y), rgba(247, 210, 155, .16), rgba(242, 194, 124, .05) 140px, rgba(242, 194, 124, 0) 340px) }
.lampara { position: absolute; top: 0; left: calc(var(--foco-x) - 23px); width: 46px; display: flex; flex-direction: column; align-items: center; z-index: -1; pointer-events: none }
.lampara::before { content: ""; width: 16px; height: calc(var(--foco-y) - 35px); background: linear-gradient(#a9895e, #a9895e) center top / 16px 3px no-repeat, linear-gradient(#a9895e, #a9895e) center / 2px 100% no-repeat }   /* el florón y el cable */
.lampara svg { display: block; width: 46px; height: auto; overflow: visible }
@media (max-width: 359px) { .lampara { display: none } }   /* en celulares muy angostos no entra al lado del título */
@media (prefers-reduced-motion: no-preference) {
  .lampara .vidrio, .con-lampara::before { animation: prender 1.4s linear both }   /* parpadea dos veces y queda prendida, como cuando vuelve la luz */
}
@keyframes prender { 0%, 6% { opacity: 0 } 8% { opacity: 1 } 12% { opacity: .2 } 18% { opacity: 1 } 22% { opacity: .35 } 30%, 100% { opacity: 1 } }

/* el mapa: cada partido del conurbano y cada barrio de CABA, del color de la luz al rojo (el color va en el atributo fill de cada sector) */
figure.mapa { margin: 4px 0 24px }
figure.mapa > svg { display: block; width: 100%; height: auto; background: #08090b; border: 1px solid #1c1e24 }
.sectores path { stroke: #0d0e11; stroke-opacity: .45; stroke-width: 1; vector-effect: non-scaling-stroke }
.sectores a:hover path { filter: brightness(1.15) }
.sectores a:focus-visible { outline: none }
.sectores a:focus-visible path { stroke: var(--foco); stroke-opacity: 1; stroke-width: 2 }
.borde-caba { fill: none; stroke: #0d0e11; stroke-opacity: .9; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none }
.rio { fill: #a9895e; fill-opacity: .55; font-family: var(--letra); font-style: italic; letter-spacing: .06em; pointer-events: none }
.etq-s { font-family: var(--letra); font-weight: 700; fill: #fff3e3; paint-order: stroke; stroke: #0b0c0f; stroke-width: 6px; stroke-linejoin: round; pointer-events: none }
.etq-s .num { font-weight: 800; fill: #ffd1a1 }
.ley-mapa { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 12px; color: var(--suave); font-size: .875rem }
.ley-mapa .escala { display: inline-flex; flex-direction: column; gap: 4px; min-width: 200px }
.ley-mapa .barra { display: block; width: 100%; height: 10px; background: linear-gradient(90deg, #a38759, #dc7a3c 50%, #e2392f) }
.ley-mapa .extremos { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem }
.ley-edelap { display: inline-flex; align-items: center; gap: 6px } .ley-edelap svg { width: 18px; height: 18px }

/* pie */
.pie { background: var(--noche); border-top: 1px solid var(--linea); padding: 24px 20px 40px; color: var(--suave); font-size: .9375rem }
.pie .ancho { max-width: 46rem; margin: 0 auto }
.pie a { color: var(--tinta); display: inline-block; padding: 6px 0 }
.pie b { color: var(--tinta) }

@media (prefers-reduced-motion: no-preference) { .boton, .zonas a, .empresas a, .cercanas a { transition: background-color .15s ease-out, border-color .15s ease-out } }

/* escritorio: mitad con luz, mitad apagada */
@media (min-width: 1040px) {
  .cab.partida { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; min-height: 80px; background: linear-gradient(90deg, var(--dia) 50%, var(--noche) 50%) }
  .cab.partida .marca { padding-left: 48px }
  .cab.partida .nav { padding: 0 46px }
  .cab:not(.partida) { padding: 0 max(20px, calc((100% - 46rem) / 2)) }
  main.dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  main.dos > .abajo, main.dos > #sin-red, main.dos > #viejo { grid-column: 1 / -1 }
  main.dos .dia { padding: 36px 56px 72px 48px }
  main.dos .noche { padding: 40px 56px 72px }
  main.dos .dia > *:not(.lampara), main.dos .noche > * { max-width: 34rem }
  .con-lampara { --pad: 48px; --padtop: 36px }
  .con-lampara::before { background: radial-gradient(circle at var(--foco-x) var(--foco-y), rgba(247, 210, 155, .16), rgba(242, 194, 124, .05) 200px, rgba(242, 194, 124, 0) 480px) }
  .total { font-size: 2.875rem }
}
