/* Bajanda Maps website (landing page and developers page).
   Flat colour fields after Havana's limewashed fronts, one type family in two widths.
   The colours of an address are the same everywhere: street, house number, cross streets. */

:root {
  --anil: #2A3BD0;        /* añil: the blue of limewashed doors; hero, links, the street */
  --anil-hondo: #1C278F;
  --anil-claro: #C5CCF7;
  --tinta: #11163A;       /* text, dark fields */
  --tinta-suave: #1D2352;
  --cal: #F2F5F1;         /* limewash white: page background */
  --blanco: #FFFFFF;
  --mango: #FFC02E;       /* the house number */
  --mango-hondo: #C28500;
  --mango-texto: #8A5A00;
  --mango-claro: #FFE39A;
  --flamboyan: #FF5533;   /* the pin, nothing else */
  --menta: #9FE5CF;       /* the cross streets */
  --menta-texto: #0B7A63;
  --rosa: #F9B9C8;
  --piedra: #5A6072;      /* secondary text on light */
  --linea: #D8DDD5;

  --fuente: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ancho: 1180px;
  --borde: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cal);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }

:focus-visible { outline: 3px solid var(--anil); outline-offset: 3px; border-radius: 6px; }
.campo-anil :focus-visible,
.campo-tinta :focus-visible { outline-color: var(--mango); }

.ancho { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--borde); }

/* Headings: the same family, set wide. */
.titulo {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.9rem, 3.7vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}
.entrada { margin-top: 20px; max-width: 56ch; font-size: 1.12rem; }
.sobre-claro .entrada { color: var(--piedra); }

.seccion { padding-block: clamp(64px, 9vw, 116px); }

/* Colour fields */
.campo-anil { background: var(--anil); color: var(--blanco); }
.campo-tinta { background: var(--tinta); color: var(--blanco); }
.campo-mango { background: var(--mango); color: var(--tinta); }
.campo-rosa { background: var(--rosa); color: var(--tinta); }
.campo-blanco { background: var(--blanco); }

/* Top bar */
.barra {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding-block: 18px;
}
.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}
.marca svg { width: 34px; height: 34px; }
.barra-enlaces { display: flex; align-items: center; gap: 26px; }
.barra-enlaces a {
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.86;
  padding-block: 6px;
}
.barra-enlaces a:hover,
.barra-enlaces a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
/* Language switch (ES · EN), generated from site/locales */
.idioma { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em; }
.idioma a { text-decoration: none; opacity: 0.6; padding-block: 6px; }
.idioma a:hover,
.idioma a[aria-current] { opacity: 1; }
.idioma a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.idioma span { opacity: 0.4; }

/* Buttons */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.boton-blanco { background: var(--blanco); color: var(--tinta); }
.boton-blanco:hover { background: var(--mango); }
.boton-mango { background: var(--mango); color: var(--tinta); }
.boton-mango:hover { background: var(--blanco); }
.boton-tinta { background: var(--tinta); color: var(--blanco); }
.boton-tinta:hover { background: var(--anil); }
.boton-anil { background: var(--anil); color: var(--blanco); }
.boton-anil:hover { background: var(--anil-hondo); }
.boton-linea { border-color: currentColor; background: transparent; }
.boton-linea:hover { background: var(--blanco); color: var(--tinta); border-color: var(--blanco); }
.sobre-claro .boton-linea:hover { background: var(--tinta); color: var(--blanco); border-color: var(--tinta); }
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Text links on light fields */
.enlace { color: var(--anil); font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.enlace:hover { color: var(--anil-hondo); }

/* ───────────── Landing page: hero ───────────── */

.portada { padding-bottom: clamp(48px, 7vw, 88px); }
.portada h1 {
  margin-top: clamp(22px, 4vw, 52px);
  max-width: 40ch;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* The offer, in two sentences, between the headline and the search. */
.portada-entrada { margin-top: 14px; max-width: 60ch; font-size: clamp(1.02rem, 1.5vw, 1.15rem); line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
/* Whose API it is and who built it, under the address. */
.aval { margin-top: clamp(26px, 3.4vw, 40px); padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.28); max-width: 46ch; font-size: 0.97rem; color: rgba(255, 255, 255, 0.88); }

/* Search */
.buscador { position: relative; margin-top: 22px; max-width: 760px; }
.buscador-caja {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 22px;
  background: var(--blanco);
  border-radius: 20px;
  box-shadow: 0 10px 0 var(--anil-hondo);
}
.buscador-caja:focus-within { outline: 3px solid var(--mango); outline-offset: 3px; }
.buscador input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tinta);
  font-size: 1.22rem;
  font-weight: 500;
}
.buscador input::placeholder { color: #7A8094; font-weight: 400; }
.buscador .boton { min-height: 52px; padding-inline: 26px; border-radius: 14px; }

.sugerencias {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 16px);
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  background: var(--blanco);
  color: var(--tinta);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(8, 12, 60, 0.35);
}
.sugerencias[hidden] { display: none; }
.sugerencia {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.sugerencia:hover,
.sugerencia[aria-selected="true"] { background: var(--cal); }
.sugerencia svg { width: 30px; height: 30px; }
.sugerencia b { display: block; font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* What a place is, before a name that does not say it: "Farmacia · Hospital La Dependiente". */
.sugerencia-tipo { font-weight: 500; color: var(--piedra); }
.sugerencia-tipo::after { content: ' · '; }
.sugerencia small { display: block; font-size: 0.86rem; color: var(--piedra); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugerencias-aviso { padding: 16px 14px; font-size: 0.95rem; color: var(--piedra); }

.pruebas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; font-size: 0.94rem; }
.pruebas span { opacity: 0.8; margin-right: 4px; }
.prueba {
  padding: 6px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--blanco);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.prueba:hover { background: var(--blanco); border-color: var(--blanco); color: var(--tinta); }

/* The answer: the address set large, and its block drawn */
.respuesta {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(36px, 5vw, 60px);
}
.dicho {
  --escala: 1;
  font-stretch: 125%;
  font-weight: 800;
  font-size: calc(clamp(2.2rem, 5.3vw, 5rem) * var(--escala));
  line-height: 1;
  letter-spacing: -0.022em;
  overflow-wrap: anywhere;
}
.dicho > span { display: block; }
.dicho > span + span { margin-top: 0.06em; }
.d-num { color: var(--mango); }
.d-con { color: rgba(255, 255, 255, 0.55); }
.d-cruce { color: var(--menta); }
.zona { margin-top: 22px; font-size: 1.15rem; font-weight: 500; }

.plano {
  padding: 14px;
  background: var(--cal);
  border-radius: 26px;
  color: var(--tinta);
}
/* Blocks with the streets between them: three columns of blocks with the cross streets between them, two
   rows with the main street between. The page's script sizes them so that every name fits its street
   (planLayout() in index.html); these are the sizes for short names. */
.cuadra {
  --g: 30px;
  --g1: var(--g);
  --g2: var(--g);
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr var(--g1) 1.5fr var(--g2) 0.5fr;
  grid-template-rows: 1fr var(--g) 1fr;
  aspect-ratio: 4 / 3;
}
.mz { position: relative; border-radius: 10px; }
.mz::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
}
/* Every block has its cell, and every street its own column or row. */
.mz:nth-child(1) { grid-area: 1 / 1; background: var(--rosa); }
.mz:nth-child(2) { grid-area: 1 / 3; background: var(--mango-claro); }
.mz:nth-child(3) { grid-area: 1 / 5; background: var(--menta); }
.mz:nth-child(4) { grid-area: 3 / 1; background: var(--anil-claro); }
.mz:nth-child(5) { grid-area: 3 / 3; background: var(--menta); }
.mz:nth-child(6) { grid-area: 3 / 5; background: var(--rosa); }

/* Each street's name in its street, whole: the script sets its size and its lines. */
.rot {
  z-index: 1;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
.rot:empty { display: none; }
.rot-calle { grid-area: 2 / 1; align-self: center; justify-self: start; margin-left: 8px; }
.rot-cruce {
  justify-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
}
/* The first cross street's name stands on the main street, the second's hangs from it. */
.rot-cruce1 { grid-area: 1 / 2; align-self: end; margin-bottom: 6px; }
.rot-cruce2 { grid-area: 3 / 4; align-self: start; margin-top: 6px; }

.tramo {
  grid-area: 2 / 3;
  z-index: 2;
  align-self: center;
  height: 8px;
  margin: 0 calc(var(--g2) / -2) 0 calc(var(--g1) / -2);
  background: var(--anil);
  border-radius: 4px;
  transform-origin: left center;
}
.pin {
  grid-area: 2 / 3;
  z-index: 3;
  align-self: center;
  justify-self: center;
  width: 26px;
  height: 26px;
  background: var(--flamboyan);
  border: 5px solid var(--blanco);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(17, 22, 58, 0.3);
}
.placa {
  grid-area: 1 / 3;
  z-index: 3;
  align-self: end;
  justify-self: center;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 3px 10px;
  background: var(--mango);
  border-radius: 7px;
  box-shadow: 0 2px 0 var(--mango-hondo);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.placa:empty, .tapon { display: none; }

/* A corner: one cross street, the pin where they meet */
.cuadra[data-forma="corner"] { grid-template-columns: 1.1fr var(--g1) 1fr 0 0; }
.cuadra[data-forma="corner"] .mz:nth-child(3),
.cuadra[data-forma="corner"] .mz:nth-child(6),
.cuadra[data-forma="corner"] .tramo,
.cuadra[data-forma="corner"] .rot-cruce2 { display: none; }
.cuadra[data-forma="corner"] .pin { grid-area: 2 / 2; }
.cuadra[data-forma="corner"] .placa { grid-area: 1 / 1; justify-self: end; margin-right: 10px; }

/* A street or a place: the street alone, its name in the left half, the pin in the middle */
.cuadra[data-forma="street"] { grid-template-columns: 1fr 0 0 0 1fr; }
.cuadra[data-forma="street"] .mz:nth-child(1) { grid-area: 1 / 1 / 2 / 6; background: var(--mango-claro); }
.cuadra[data-forma="street"] .mz:nth-child(4) { grid-area: 3 / 1 / 4 / 6; }
.cuadra[data-forma="street"] .mz:not(:nth-child(1)):not(:nth-child(4)),
.cuadra[data-forma="street"] .tramo,
.cuadra[data-forma="street"] .rot-cruce { display: none; }
.cuadra[data-forma="street"] .pin { grid-area: 2 / 1 / 3 / 6; }
.cuadra[data-forma="street"] .placa { grid-area: 1 / 1 / 2 / 6; }

/* "entre X y Final": the street dies in a wall */
.cuadra[data-forma="final"] .rot-cruce2 { display: none; }
.cuadra[data-forma="final"] .tramo { margin-right: 0; border-radius: 4px 0 0 4px; }
.cuadra[data-forma="final"] .tapon {
  grid-area: 1 / 4 / 4 / 6;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rosa);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 650;
}

.ficha { margin-top: 16px; min-height: 6.4em; font-size: 0.97rem; }
.ficha p + p { margin-top: 4px; }
.ficha a { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.ficha a:hover { color: var(--mango); }
.ficha-enlaces { display: flex; flex-wrap: wrap; gap: 4px 20px; }

@media (prefers-reduced-motion: no-preference) {
  .cuadra.entra .tramo { animation: tramo 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .cuadra.entra .pin { animation: pin 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) 0.3s both; }
  .cuadra.entra .placa { animation: placa 0.3s ease-out 0.55s both; }
  .cuadra[data-forma="corner"].entra .pin,
  .cuadra[data-forma="street"].entra .pin { animation-delay: 0s; }
  .cuadra[data-forma="corner"].entra .placa,
  .cuadra[data-forma="street"].entra .placa { animation-delay: 0.25s; }
}
@keyframes tramo { from { transform: scaleX(0); } }
@keyframes pin { from { transform: translateY(-34px) scale(0.4); opacity: 0; } }
@keyframes placa { from { transform: translateY(6px); opacity: 0; } }

/* ───────────── Landing page: from checkout to the door ───────────── */

/* An order's four steps, in the colours of an address: the street, the number, the cross streets and,
   at the door, the pin. */
.pasos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: clamp(32px, 5vw, 56px); counter-reset: paso; }
.paso { display: flex; flex-direction: column; padding-top: 16px; border-top: 6px solid var(--anil); counter-increment: paso; }
.paso:nth-child(2) { border-top-color: var(--mango); }
.paso:nth-child(3) { border-top-color: var(--menta); }
.paso:nth-child(4) { border-top-color: var(--flamboyan); }
.paso::before { content: counter(paso); font-stretch: 125%; font-weight: 800; font-size: 1.9rem; line-height: 1; letter-spacing: -0.02em; }
.paso h3 { margin-top: 10px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.paso p { margin-top: 8px; color: var(--piedra); }
.paso-api { margin-top: auto; padding-top: 14px; font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--anil); }

/* ───────────── Landing page: the delivery day (matrix and route optimization) ───────────── */

/* The same deliveries in the order they came in (rose) and in the optimizer's order (mint). The map
   is drawn by public/route-demo.js, which loads when the section nears the screen. */
/* Two days share the map: a fleet's, and one motorina's. */
.dia-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 4vw, 44px); }
.dia-tab { min-height: 44px; padding: 9px 20px; border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 999px; background: transparent; color: var(--blanco); font-weight: 600; font-size: 0.97rem; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.dia-tab:hover { border-color: var(--blanco); }
.dia-tab[aria-selected="true"] { background: var(--mango); border-color: var(--mango); color: var(--tinta); }
.dia { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 20px; }
.dia-cifras[hidden], .dia-fuente[hidden] { display: none; }
.dia-mapa { position: relative; min-width: 0; background: #0A0E2A; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 24px; overflow: hidden; }
.dia-mapa svg { width: 100%; height: auto; aspect-ratio: 1000 / 715; }
/* Every piece keeps its place through the film, shown or not, so nothing under the map moves. */
.dia-barra { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'fase cuenta pila'; align-items: center; gap: 6px 20px; min-height: 74px; padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.95rem; }
.dia-fase { grid-area: fase; font-weight: 650; }
.dia-fase.es-ahorro { white-space: nowrap; font-stretch: 125%; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--mango); }
.dia-cuenta { grid-area: cuenta; min-width: 13.4em; text-align: right; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dia-cuenta b { color: var(--blanco); font-weight: 700; }
.dia-cuenta b + b, .dia-cuenta span + b { margin-left: 10px; }
.dia-pila { grid-area: pila; display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.dia-pila > i { width: 54px; height: 12px; padding: 2px; border: 1.5px solid rgba(255, 255, 255, 0.6); border-radius: 4px; }
.dia-pila > i > i { display: block; height: 100%; width: 100%; background: var(--menta); border-radius: 1px; }
.dia-pila b { min-width: 3.2em; color: var(--blanco); font-weight: 700; font-variant-numeric: tabular-nums; }
.dia-pila.agotada > i { border-color: var(--flamboyan); }
.dia-pila.agotada b { color: var(--flamboyan); }
.dia-cuenta[hidden] { display: block; visibility: hidden; }
.dia-pila[hidden] { display: inline-flex; visibility: hidden; }
#diaFases { display: none; }
.dia-repetir { position: absolute; top: 12px; right: 12px; padding: 5px 12px; border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 999px; background: rgba(10, 14, 42, 0.75); color: var(--blanco); font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.dia-repetir:hover { background: var(--blanco); border-color: var(--blanco); color: var(--tinta); }

.dia-fila + .dia-fila { margin-top: 26px; }
.dia-fila h3 { font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.dia-num { margin-top: 2px; font-variant-numeric: tabular-nums; }
.dia-num b { font-stretch: 125%; font-weight: 800; font-size: clamp(1.7rem, 2.8vw, 2.3rem); line-height: 1.1; letter-spacing: -0.015em; }
.dia-num span { margin-left: 10px; font-size: 1.1rem; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
/* One scale for both rides: a bar as long as its road, and the battery's reach marked on it. */
.dia-tramo { position: relative; height: 12px; margin-top: 12px; background: rgba(255, 255, 255, 0.1); border-radius: 6px; }
.dia-tramo > i { display: block; height: 100%; border-radius: 6px; }
.dia-tramo.con-marca { margin-top: 32px; }
.dia-tramo-sin { background: linear-gradient(90deg, var(--rosa) 0 var(--pila), var(--flamboyan) var(--pila) 100%); }
.dia-tramo-con { background: var(--menta); }
.dia-tramo-mal { background: var(--rosa); }
/* Only the day told by its battery marks the battery's reach on its bars. */
.dia-cifras:not(.con-pila) .dia-tramo::after { content: none; }
.dia-tramo::after { content: ''; position: absolute; left: var(--pila); top: -5px; bottom: -5px; width: 2px; background: var(--blanco); }
.dia-tramo em { position: absolute; right: calc(100% - var(--pila) + 8px); bottom: calc(100% + 8px); font-style: normal; font-size: 0.8rem; font-weight: 600; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.dia-nota { margin-top: 10px; font-size: 0.93rem; color: rgba(255, 255, 255, 0.82); }
/* Who rides what: one row per courier, in the colour of its route. */
.dia-flota { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
.dia-flota th, .dia-flota td { padding: 7px 0 7px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.16); text-align: right; white-space: nowrap; }
.dia-flota thead th { font-size: 0.8rem; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.dia-flota tbody th { padding-left: 0; font-weight: 600; text-align: left; }
.dia-flota tbody th i { display: inline-block; width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; }
.dia-ahorro { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.25); color: var(--mango); font-variant-numeric: tabular-nums; }
.dia-ahorro b { font-stretch: 125%; font-weight: 800; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; }
.dia-ahorro-nota { margin-top: 4px; font-size: 0.97rem; }
.dia-mes { margin-top: 14px; font-size: 0.97rem; color: rgba(255, 255, 255, 0.82); }
.dia-fuente { margin-top: 26px; max-width: 86ch; font-size: 0.86rem; color: rgba(255, 255, 255, 0.6); }
.dia-credito { margin-top: 6px; }
.dia-credito a { color: inherit; }
.dia-hechos { max-width: 86ch; }

/* ───────────── Landing page: how addresses are said ───────────── */

.frases { margin-top: clamp(32px, 5vw, 56px); border-top: 2px solid var(--tinta); }
.frase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px clamp(20px, 4vw, 56px);
  align-items: center;
  padding-block: 18px;
  border-bottom: 1px solid var(--linea);
}
.frase-escrita {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 10px 14px 10px 18px;
  border: 1.5px solid var(--linea);
  border-radius: 14px;
  background: var(--blanco);
  font-size: 1.06rem;
  font-weight: 500;
  text-align: left;
}
button.frase-escrita { cursor: pointer; transition: border-color 0.15s; }
button.frase-escrita:hover { border-color: var(--anil); }
.frase-escrita i {
  flex: none;
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--anil);
}
.frase-leida { font-size: 1.06rem; font-weight: 650; line-height: 1.35; }
.p-calle { color: var(--anil); }
.p-num { color: var(--mango-texto); }
.p-cruce { color: var(--menta-texto); }
.p-con { color: var(--piedra); font-weight: 500; }
.frase-nota { margin-top: 3px; font-size: 0.92rem; font-weight: 400; color: var(--piedra); }

/* ───────────── Landing page: house numbers ───────────── */

.numeros { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.numeros .entrada { color: inherit; }
.grados { margin-top: 30px; border-top: 2px solid var(--tinta); }
.grados div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 16px; padding-block: 12px; border-bottom: 1px solid rgba(17, 22, 58, 0.25); }
.grados dt { font-weight: 700; }
.grados dd { font-size: 0.97rem; }

.cobertura { padding: clamp(20px, 3vw, 32px); background: var(--blanco); border-radius: 24px; }
.cobertura h3 { font-size: 1rem; font-weight: 600; color: var(--piedra); }
.cobertura-cifra { margin-top: 6px; font-stretch: 125%; font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -0.02em; }
.cobertura-sub { margin-top: 6px; font-size: 0.97rem; }
.barra-partes { display: flex; gap: 2px; height: 14px; margin-top: 18px; background: #E4E8E1; border-radius: 4px; overflow: hidden; }
.barra-partes span { display: block; height: 100%; }
.parte-confirmada { background: var(--anil); }
.parte-estimada { background: var(--mango-hondo); }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-size: 0.9rem; }
.leyenda li { display: flex; align-items: center; gap: 7px; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; background: #E4E8E1; }
.leyenda .parte-confirmada { background: var(--anil); }
.leyenda .parte-estimada { background: var(--mango-hondo); }
.leyenda b { font-weight: 600; font-variant-numeric: tabular-nums; }

.provincias { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 0.9rem; }
.provincias caption { padding-bottom: 8px; text-align: left; font-weight: 600; color: var(--piedra); }
.provincias th { padding: 4px 12px 4px 0; font-weight: 500; text-align: left; white-space: nowrap; }
.provincias td { padding: 4px 0; }
.provincias .p-barra { width: 100%; }
.provincias .p-barra span { display: block; height: 8px; min-width: 2px; background: var(--anil); border-radius: 0 4px 4px 0; }
.provincias .p-valor { padding-left: 12px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ───────────── Landing page: what is on the map ───────────── */

.cuentas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(32px, 5vw, 56px); border-top: 2px solid var(--tinta); }
.cuentas div { padding: 20px 18px 6px 0; }
.cuentas div + div { padding-left: 18px; border-left: 1px solid var(--linea); }
.cuentas dt { font-stretch: 125%; font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.05; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.cuentas dd { margin-top: 6px; font-size: 0.95rem; color: var(--piedra); }

.usos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-top: clamp(40px, 6vw, 72px); }
.usos li { padding-top: 18px; border-top: 6px solid var(--anil); }
.usos li:nth-child(2) { border-top-color: var(--flamboyan); }
.usos li:nth-child(3) { border-top-color: var(--mango); }
.usos h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.usos p { margin-top: 8px; color: var(--piedra); }
.usos a { display: inline-block; margin-top: 12px; }

/* ───────────── Code ───────────── */

.codigo {
  margin: 0;
  padding: 20px 22px;
  background: #0A0E2A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #E7E9F8;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  tab-size: 2;
}
.codigo + .codigo { margin-top: 12px; }
.codigo-nombre { display: block; margin-bottom: 8px; font-family: var(--fuente); font-size: 0.86rem; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.j-clave { color: var(--anil-claro); }
.j-texto { color: var(--menta); }
.j-numero { color: var(--mango); }
.j-gris { color: rgba(255, 255, 255, 0.5); }

.dos { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.campo-tinta .entrada { color: rgba(255, 255, 255, 0.82); }
.hechos { margin-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.hechos li { padding-block: 11px; border-bottom: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.99rem; }
.hechos b { color: var(--mango); font-weight: 700; }

/* ───────────── Landing page: who makes it ───────────── */

.dichazo {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 17ch;
  text-wrap: balance;
}
.origen-texto { margin-top: 26px; max-width: 54ch; font-size: 1.12rem; }

/* ───────────── Footer ───────────── */

.pie { padding-block: 44px; font-size: 0.93rem; }
.pie-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.pie a { text-underline-offset: 4px; }
.pie-enlaces a { text-decoration: none; font-weight: 500; }
.pie-enlaces a:hover { text-decoration: underline; }
.pie-nota { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.72); max-width: none; }

/* ───────────── Developers page ───────────── */

.portada-api { padding-bottom: clamp(56px, 8vw, 100px); }
.portada-api .dos { align-items: start; margin-top: clamp(28px, 5vw, 64px); }
.portada-api h1 {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.consola { min-width: 0; }
.consola-caja { display: flex; gap: 8px; padding: 7px; background: var(--blanco); border-radius: 16px; }
.consola-caja:focus-within { outline: 3px solid var(--mango); outline-offset: 3px; }
.consola-caja input { flex: 1; min-width: 0; height: 44px; padding-inline: 12px; border: 0; outline: 0; background: transparent; color: var(--tinta); font-size: 1.02rem; font-weight: 500; }
.consola-caja .boton { border-radius: 11px; }
/* The live answer wraps: a place_id (addr_…) is one long word. */
.consola .codigo { margin-top: 12px; max-height: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
.consola-estado { margin-top: 10px; min-height: 1.5em; font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }

.rutas { margin-top: clamp(28px, 4vw, 48px); border-top: 2px solid var(--tinta); }
.rutas li { border-bottom: 1px solid var(--linea); }
.rutas a {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 17rem) minmax(0, 1fr);
  gap: 6px 22px;
  align-items: baseline;
  padding-block: 16px;
  text-decoration: none;
}
.rutas a:hover .ruta-camino { color: var(--anil); text-decoration: underline; text-underline-offset: 4px; }
.verbo { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; }
.verbo-get { color: var(--menta-texto); }
.verbo-post { color: var(--anil); }
.ruta-camino { font-family: var(--mono); font-size: 0.95rem; font-weight: 500; overflow-wrap: anywhere; }
.ruta-que { color: var(--piedra); }
.ruta-que b { color: var(--tinta); font-weight: 600; }

.tabla { width: 100%; margin-top: 26px; border-collapse: collapse; border-top: 2px solid var(--tinta); }
.tabla th, .tabla td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: top; }
.tabla thead th { font-size: 0.9rem; font-weight: 600; color: var(--piedra); }
.tabla tbody th { font-weight: 600; }
.tabla .cifra { text-align: right; padding-right: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla td { color: var(--piedra); }
.tabla td.cifra { color: var(--tinta); }
.tabla code, .entiende code, .lee code { font-family: var(--mono); font-size: 0.88em; color: var(--tinta); }

.lee { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-top: clamp(28px, 4vw, 48px); }
.lee li { padding-top: 16px; border-top: 6px solid var(--tinta); }
.lee h3 { font-size: 1.12rem; font-weight: 700; }
.lee p { margin-top: 8px; font-size: 0.97rem; }

.planes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(28px, 4vw, 48px); }
.plan { display: flex; flex-direction: column; padding: clamp(24px, 3vw, 36px); background: var(--blanco); border-radius: 24px; }
.plan-fuerte { background: var(--tinta); color: var(--blanco); }
.plan h3 { font-size: 1.1rem; font-weight: 600; }
.plan .plan-precio { margin-top: 10px; opacity: 1; font-stretch: 125%; font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.02em; }
.plan .plan-precio small { font-stretch: 100%; font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.plan > p { margin-top: 8px; font-size: 0.97rem; opacity: 0.8; }
.plan ul { margin: 22px 0 28px; border-top: 1px solid rgba(17, 22, 58, 0.2); }
.plan li { padding-block: 10px; border-bottom: 1px solid rgba(17, 22, 58, 0.2); font-size: 0.97rem; }
.plan-fuerte ul, .plan-fuerte li { border-color: rgba(255, 255, 255, 0.25); }
.plan .boton { margin-top: auto; }

.entiende { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 64px); margin-top: clamp(28px, 4vw, 48px); border-top: 2px solid var(--tinta); }
.entiende li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 14px; padding-block: 14px; border-bottom: 1px solid rgba(17, 22, 58, 0.25); }
.entiende b { font-weight: 700; }

.subtitulo { margin-top: clamp(48px, 7vw, 80px); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.subtitulo + p { margin-top: 8px; color: var(--piedra); max-width: 60ch; }

/* ───────────── Narrow screens ───────────── */

@media (max-width: 900px) {
  .respuesta, .numeros, .dos, .portada-api .dos { grid-template-columns: minmax(0, 1fr); }
  .plano { max-width: 460px; }
  .cuentas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cuentas div, .cuentas div + div { padding: 16px 12px 16px 0; border-left: 0; border-bottom: 1px solid var(--linea); }
  .usos, .lee { grid-template-columns: minmax(0, 1fr); }
  .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dia { grid-template-columns: minmax(0, 1fr); }
  .entiende { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .barra-enlaces { order: 3; width: 100%; gap: 18px; overflow-x: auto; }
  .barra-enlaces a { font-size: 0.9rem; }
  .barra .boton { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }
  .buscador-caja { padding-left: 16px; border-radius: 18px; }
  .buscador input { font-size: 1.05rem; }
  .buscador .boton { padding-inline: 16px; }
  .frase { grid-template-columns: minmax(0, 1fr); }
  .pasos { grid-template-columns: minmax(0, 1fr); }
  .dia-barra { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'fase fase' 'cuenta pila'; padding: 12px 14px; }
  .dia-fase { height: 2.95rem; display: flex; align-items: center; }
  .dia-repetir { top: 8px; right: 8px; padding: 3px 10px; font-size: 0.8rem; }
  .dia-cuenta { min-width: 0; text-align: left; }
  .dia-pila-nombre { display: none; }
  .planes { grid-template-columns: minmax(0, 1fr); }
  .rutas a { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .ruta-que { grid-column: 1 / -1; }
  .grados div, .entiende li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tabla th, .tabla td { padding-right: 10px; font-size: 0.93rem; }
  .cuadra { --g: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boton, .prueba, button.frase-escrita { transition: none; }
}
