/* GASVIA (gas + vía)
   Idea: lo primero, tus gasolineras. La portada se abre con tu zona (ubicación o ciudad) y la lista de
   las más baratas, con la distancia, el ahorro y cómo llegar.
   Paleta: fondo claro cálido, amarillo de cartel de carretera para la marca, tinta negra y verde para el
   ahorro y la acción de ir. Tipografía: Albert Sans. */

:root {
  --bg: #f3f2ef;
  --surface: #ece9e2;
  --papel: #ffffff;
  --ink: #17191b;
  --muted: #59554d;
  --amarillo: #ffcf32;
  --amarillo-claro: #fff6d1;
  --sobre-amarillo: #4d4430;   /* texto secundario sobre amarillo */
  --accent: #0a7c4f;           /* verde: ahorro y "cómo llegar" */
  --accent-hover: #08643f;
  --accent-ink: #ffffff;
  --accent-texto: #076640;
  --linea: rgba(20, 20, 20, .12);
  --borde: rgba(20, 20, 20, .26);
  --positive: #0a7c4f;
  --negative: #b42318;

  --r: 16px;       /* tarjetas */
  --r-ctrl: 10px;  /* botones y campos */
  --sombra: 0 1px 2px rgba(60, 45, 0, .06), 0 18px 48px rgba(60, 45, 0, .16);

  --margin: clamp(1rem, 2.4vw, 2.5rem);
  --gutter: clamp(0.75rem, 1.4vw, 1.25rem);
  --gap-seccion: clamp(64px, 7vw, 112px);
  --ancho: 1440px;

  --step-small: 0.9375rem;
  --step-ui: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-head: clamp(1.875rem, 1.3rem + 2vw, 2.875rem);
  --step-cifra: clamp(3rem, 2rem + 3vw, 4.5rem);

  --font: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--font); font-kerning: normal;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a, button, input, summary { touch-action: manipulation; }
button, input { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
b, strong { font-weight: 600; }
h1, h2 { text-wrap: balance; font-weight: 600; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 24px; }
::selection { background: var(--amarillo); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saltar { position: absolute; left: 16px; top: -64px; background: var(--ink); color: var(--papel); padding: 10px 14px; z-index: 30; border-radius: var(--r-ctrl); }
.saltar:focus { top: 8px; }
.suave { color: var(--muted); }

/* cifras */
.cifra, .num, table, .importe, [data-roll] { font-variant-numeric: tabular-nums; }
.importe { white-space: nowrap; }
.unidad { color: var(--muted); font-size: max(.7em, 13px); font-weight: 400; }
.sin-dato { color: var(--muted); }
.dato, .dato .cifra { color: var(--accent-texto); }
.sube { color: var(--negative); }
.baja { color: var(--positive); }

/* Solo el combustible elegido. Sin JavaScript se queda el diésel. */
[data-comb="diesel"] [data-c]:not([data-c="diesel"]),
[data-comb="g95"] [data-c]:not([data-c="g95"]),
[data-comb="g98"] [data-c]:not([data-c="g98"]),
[data-comb="glp"] [data-c]:not([data-c="glp"]) { display: none !important; }
[data-comb="diesel"] [data-tiene]:not([data-tiene~="diesel"]),
[data-comb="g95"] [data-tiene]:not([data-tiene~="g95"]),
[data-comb="g98"] [data-tiene]:not([data-tiene~="g98"]),
[data-comb="glp"] [data-tiene]:not([data-tiene~="glp"]) { display: none; }

/* ---------- botones ---------- */
.boton, .boton-negro {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: none;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--r-ctrl); cursor: pointer;
  font-weight: 600; font-size: var(--step-ui);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.boton { background: var(--accent); color: var(--accent-ink); }
.boton-negro { background: var(--ink); color: #fff; }
.boton:active, .boton-negro:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .boton:hover { background: var(--accent-hover); }
  .boton-negro:hover { background: #333; }
}
.boton-sec {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--borde); border-radius: var(--r-ctrl);
  background: transparent; cursor: pointer; font-size: var(--step-ui); white-space: nowrap;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.boton-sec:hover { border-color: var(--ink); }
.boton-sec[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--borde); border-radius: 999px; background: var(--papel);
  cursor: pointer; font-size: var(--step-small); font-weight: 500; white-space: nowrap;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.enlace-flecha { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .2em; }
.enlace-flecha::after { content: "→"; transition: transform var(--t-ui) var(--ease-out); }
.enlace-flecha:hover::after { transform: translateX(4px); }
.enlace-sec { font-size: var(--step-small); color: var(--muted); text-decoration: underline; text-underline-offset: .2em; }
.enlace-sec:hover { color: var(--ink); }
.campo {
  min-height: 40px; padding: 0 12px; width: 240px; border: 1px solid var(--borde); border-radius: var(--r-ctrl);
  background: var(--papel); font-size: var(--step-ui);
}
.campo:focus { outline: 2px solid var(--ink); outline-offset: 0; }

/* ---------- buscador y sugerencias ---------- */
.buscador { position: relative; }
.buscador input {
  width: 100%; min-height: 48px; padding: 0 14px 0 40px; border: 1px solid var(--borde);
  border-radius: var(--r-ctrl); background: var(--papel); font-size: var(--step-body); color: var(--ink);
}
.buscador input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.buscador input::placeholder { color: #6a655e; }
.buscador-icono { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.busqueda-barra .buscador input { padding-left: 14px; }
.sugerencias {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); padding: 6px; z-index: 25;
  background: var(--papel); color: var(--ink); border: 1px solid var(--linea); border-radius: var(--r-ctrl);
  box-shadow: 0 12px 32px rgba(20, 20, 20, .2); /* taste-skill-ignore: desplegable que flota */
  max-height: 340px; overflow: auto; overscroll-behavior: contain; text-align: left;
}
.sugerencias a { display: flex; justify-content: space-between; gap: 12px; padding: 12px; min-height: 44px; border-radius: 8px; }
.sugerencias a:hover, .sugerencias a.activo { background: var(--amarillo-claro); }
.sugerencias small { color: var(--muted); font-size: var(--step-small); text-align: right; }
.sugerencias .vacio { border: 0; }

/* ======================================================================
   PORTADA
   ====================================================================== */
.seccion { max-width: var(--ancho); margin: 0 auto; padding: var(--gap-seccion) var(--margin) 0; }
.titular-seccion { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; }

/* ---------- 1. cabecera amarilla: buscar a la izquierda, tu zona a la derecha ---------- */
.cabeza { background: var(--amarillo); }
.cabeza-marco { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margin) clamp(40px, 5vw, 72px); }
.cabeza-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; }
.logo { display: block; height: 30px; width: auto; flex: none; }
.cabeza-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--step-body); min-height: 44px; letter-spacing: -0.01em; }
.cabeza-nav { display: flex; gap: 26px; font-size: var(--step-ui); font-weight: 500; }
.cabeza-nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; transition: text-decoration-color var(--t-hover) ease; }
.cabeza-nav a:hover { text-decoration-color: currentColor; }
.cabeza-cuerpo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: start; padding-top: clamp(8px, 2vw, 32px); }
.cabeza-izq { position: sticky; top: 24px; }
.cabeza-izq { container-type: inline-size; }
.cabeza h1 { font-size: clamp(2.125rem, 10.5cqi, 4.25rem); line-height: .98; letter-spacing: -0.045em; font-weight: 700; overflow-wrap: break-word; }
.cabeza-frase { margin-top: 18px; max-width: 34ch; color: var(--sobre-amarillo); font-size: var(--step-lead); line-height: 1.35; }
.cabeza-buscar { margin-top: 32px; }
.cabeza-buscar input { min-height: 64px; padding-left: 52px; font-size: var(--step-lead); border: 2px solid var(--ink); border-radius: 12px; }
.cabeza-buscar input:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.cabeza-buscar .buscador-icono { left: 18px; color: var(--ink); }
.cabeza-ubicacion { margin-top: 12px; width: 100%; min-height: 60px; font-size: var(--step-body); border-radius: 12px; }
.cabeza-comb { margin-top: 28px; }
.cabeza-comb p { font-size: var(--step-ui); font-weight: 600; margin-bottom: 8px; }
.cabeza .selector { margin: 0; background: rgba(255, 255, 255, .5); border-color: rgba(20, 20, 20, .45); }
.cabeza .selector a { color: var(--ink); }
.cabeza .selector a:hover { background: rgba(255, 255, 255, .8); }
.cabeza .selector a[aria-current="true"] { background: var(--ink); color: #fff; }
.cabeza-litros { margin-top: 22px; }
.cabeza-litros p { font-size: var(--step-ui); font-weight: 600; margin-bottom: 8px; }
.cabeza-litros .litros { margin-top: 0; }
.cabeza-litros .litros-txt { display: none; }
.cabeza-litros .litros button { min-height: 44px; background: rgba(255, 255, 255, .5); border-color: rgba(20, 20, 20, .45); }
.cabeza-litros .litros button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.cabeza-nota { margin-top: 28px; font-size: var(--step-small); color: var(--sobre-amarillo); max-width: 44ch; }

/* línea a línea */
.lineas .linea { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.lineas [data-linea] { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .lineas [data-linea] { transform: translateY(105%); animation: subir-linea 900ms var(--ease-expo) forwards; animation-delay: calc(var(--i) * 110ms + 100ms); }
  .js .zona { transform: translateY(20px); opacity: 0; animation: subir 700ms var(--ease-expo) 120ms forwards; }
}
@keyframes subir-linea { to { transform: none; } }
@keyframes subir { to { transform: none; opacity: 1; } }

/* tu zona: la tarjeta con la lista */
.zona { background: var(--papel); border-radius: 20px; padding: clamp(18px, 2vw, 28px); box-shadow: var(--sombra); }
.zona-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.zona-titulo { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.zona-sub { margin-top: 2px; font-size: var(--step-small); color: var(--muted); }
.zona-cambiar { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--borde); border-radius: 999px; background: none; cursor: pointer; font-size: var(--step-small); font-weight: 500; }
.zona-cambiar:hover { border-color: var(--ink); }
.zona-controles { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.zona-mejor {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: end;
  margin-top: 16px; padding: 18px 20px; background: var(--amarillo-claro); border-radius: 14px;
}
.zm-etq { grid-column: 1 / -1; font-size: var(--step-small); font-weight: 600; color: var(--accent-texto); }
.zm-precio { font-size: clamp(2.75rem, 2rem + 2.2vw, 4rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; display: flex; align-items: baseline; }
.zm-precio .cifra { display: inline-flex; color: var(--ink); }
.zm-precio .unidad { font-size: var(--step-body); letter-spacing: 0; margin-left: 4px; }
.zm-sitio { grid-column: 1; font-size: var(--step-ui); color: var(--muted); margin-top: 8px; }
.zm-sitio b { display: block; color: var(--ink); font-size: var(--step-body); }
.zm-ahorro { grid-column: 1; font-size: var(--step-ui); margin-top: 6px; }
.zm-acciones { grid-column: 2; grid-row: 2 / 5; align-self: end; display: flex; flex-direction: column; gap: 8px; }
.zm-ir { min-height: 52px; }
.zm-compartir { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--borde); border-radius: var(--r-ctrl); font-weight: 600; font-size: var(--step-small); background: var(--papel); }
.zm-compartir:hover { border-color: var(--ink); }
.zona-lista-t { margin-top: 20px; font-size: var(--step-small); color: var(--muted); font-weight: 500; }
.zona-lista { margin-top: 4px; }
.zl { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; gap: 4px 14px; align-items: center; min-height: 64px; padding: 8px 0; border-top: 1px solid var(--linea); }
.zona-lista > li:first-child, .zona-lista > li:first-child > .zc { border-top: 0; }
.zl-id { display: flex; flex-direction: column; min-width: 0; }
.zl-id b { font-weight: 600; font-size: var(--step-ui); }
.zl-id > span { font-size: var(--step-small); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zl-precio { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.zl-precio > span { display: flex; flex-direction: column; align-items: flex-end; }
.zl-precio .cifra { font-size: var(--step-body); font-weight: 700; }
.zl-precio small { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.zl-ir { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--borde); border-radius: var(--r-ctrl); font-weight: 600; font-size: var(--step-small); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease; }
.zl-ir:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.zc { display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 4px 14px; align-items: center; min-height: 64px; padding: 8px 10px; margin: 0 -10px; border-top: 1px solid var(--linea); border-radius: 10px; transition: background-color var(--t-hover) ease; }
.zc:hover { background: var(--amarillo-claro); }
.zc .zl-id b { font-size: var(--step-body); }
.zc-flecha { color: var(--muted); justify-self: end; }
.zc:hover .zc-flecha { color: var(--ink); }
.zona-mas { width: 100%; margin-top: 10px; min-height: 48px; border: 1px solid var(--borde); border-radius: var(--r-ctrl); background: none; cursor: pointer; font-weight: 600; font-size: var(--step-ui); }
.zona-mas:hover { border-color: var(--ink); }
.zona-pie { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linea); font-size: var(--step-small); color: var(--muted); }
.zona-pie a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; min-height: 32px; display: inline-flex; align-items: center; }
.zona-vacio { margin-top: 16px; padding: 16px; border: 1px dashed var(--borde); border-radius: 12px; color: var(--muted); }
.zona-aviso { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--amarillo-claro); font-size: var(--step-ui); }

/* cifras que ruedan */
.roll__digits { display: inline-flex; }
.roll__sep { margin: 0 -0.02em; }
.roll__strip::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9"; white-space: pre; display: block; }
.roll__col { display: inline-block; text-align: center; height: 1em; overflow: clip; line-height: 1; }
.roll__strip { display: block; line-height: 1; transform: translateY(calc(var(--d) * -1em)); }
@media (prefers-reduced-motion: no-preference) {
  .roll:not(.is-in) .roll__strip { transform: none; }
  .roll.is-in .roll__strip { transition: transform 1000ms var(--ease-expo) calc(var(--i, 0) * 70ms); }
}

/* ---------- 2. hoy en España ---------- */
.hoy-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; }
.hoy-sub { color: var(--muted); font-size: var(--step-ui); }
.hoy-medias { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: 28px; }
.hoy-media {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 22px; background: var(--papel);
  border-radius: var(--r); border: 2px solid transparent; transition: border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.hoy-media:hover { border-color: var(--borde); }
.hoy-media:active { transform: scale(.98); }
.hoy-media[aria-current="true"] { border-color: var(--ink); }
.hm-nombre { font-weight: 600; font-size: var(--step-ui); }
.hoy-media[aria-current="true"] .hm-nombre::after { content: " · el tuyo"; color: var(--muted); font-weight: 400; }
.hm-nombre { margin-top: 4px; }
.hm-precio { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.hm-precio .unidad { letter-spacing: 0; }
.hm-var { font-size: var(--step-small); color: var(--muted); }
.hm-var .sube, .hm-var .baja { font-weight: 600; }
.hoy-dato { margin-top: 18px; font-size: var(--step-ui); color: var(--muted); max-width: 80ch; }
.hoy-dato b { color: var(--ink); }
.hoy-dato a { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }

/* ---------- 3. para pagar menos ---------- */
.consejos-rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: 28px; align-items: stretch; }
.consejo { display: flex; flex-direction: column; gap: 12px; padding: clamp(20px, 2vw, 28px); background: var(--papel); border-radius: var(--r); }
.consejo-ahorro { background: var(--amarillo); }
.consejo-etq { font-weight: 700; font-size: var(--step-body); letter-spacing: -0.01em; }
.consejo-cifra { font-size: var(--step-cifra); line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.consejo-texto { font-size: var(--step-body); line-height: 1.4; max-width: 34ch; }
.consejo-nota { font-size: var(--step-small); color: var(--muted); }
.consejo-ahorro .consejo-nota { color: var(--sobre-amarillo); margin-top: auto; }
.consejo-lista li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; margin: 0 -12px; border-radius: 8px; }
.consejo-lista li:nth-child(odd) a { background: var(--bg); }
.consejo-lista li a:hover > span:first-child { text-decoration: underline; text-underline-offset: .2em; }
.cl-valor { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.cl-valor .cifra { font-weight: 700; }
.cl-valor small { font-size: var(--step-small); color: var(--accent-texto); font-variant-numeric: tabular-nums; min-width: 6.5ch; text-align: right; }
.consejo .enlace-flecha { margin-top: auto; align-self: flex-start; min-height: 44px; }

/* ---------- 4. provincias ---------- */
.prov-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; }
.prov-intro { color: var(--muted); font-size: var(--step-ui); max-width: 52ch; }
.prov-columnas { columns: 4; column-gap: 40px; margin-top: 32px; padding: clamp(20px, 2vw, 32px); background: var(--papel); border-radius: var(--r); }
.prov-grupo { break-inside: avoid; margin-bottom: 24px; }
.prov-ccaa { color: var(--muted); font-size: var(--step-small); margin-bottom: 2px; font-weight: 500; }
.prov-grupo a { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; }
.prov-grupo a:hover .prov-nombre { text-decoration: underline; text-underline-offset: .2em; }
.prov-nombre { font-size: var(--step-ui); }
.prov-valor { font-size: var(--step-ui); font-weight: 600; }
.punto { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); display: inline-block; justify-self: center; }
.punto.lleno { background: var(--accent); border-color: var(--accent); }

/* ---------- entradas al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-expo); transition-delay: calc(min(var(--i, 0), 3) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ======================================================================
   PIE EN TESELAS (todas las páginas)
   ====================================================================== */
.pie { max-width: var(--ancho); margin: var(--gap-seccion) auto 0; padding: 0 var(--margin) 24px; }
.interior .pie { margin-top: 72px; }
.teselas { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.tesela { padding: 24px; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; background: var(--surface); border-radius: var(--r); }
.t-frase { grid-column: 1 / 6; }
.t-grande { font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.01em; max-width: 26ch; font-weight: 500; }
.t-legal { font-size: var(--step-small); color: var(--muted); }
.t-nav { grid-column: 6 / 9; justify-content: flex-start; gap: 2px; }
.t-nav a { min-height: 32px; display: flex; align-items: center; }
.t-nav a:hover { text-decoration: underline; text-underline-offset: .2em; }
.t-noticia { grid-column: 9 / 13; transition: background-color var(--t-hover) ease; }
.t-noticia:hover { background: #e2ded5; }
.t-pequena { font-size: var(--step-small); color: var(--muted); }
.t-media { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; }
.t-marca { grid-column: 1 / 9; min-height: 260px; background: var(--amarillo); align-items: center; justify-content: center; overflow: hidden; }
.t-marca .logo { width: min(78%, 560px); height: auto; }
.t-accion { grid-column: 9 / 13; min-height: 260px; background: var(--accent); color: var(--accent-ink); transition: background-color var(--t-hover) ease; }
.t-accion:hover { background: var(--accent-hover); }
.t-accion .t-media { max-width: 12ch; }
.t-accion svg { align-self: flex-end; transition: transform var(--t-ui) var(--ease-out); }
.t-accion:hover svg { transform: translate(4px, -4px); }

/* ======================================================================
   PÁGINAS INTERIORES (municipio, provincia, marcas, noticias)
   ====================================================================== */
.barra { background: var(--amarillo); }
.marco { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margin); }
.barra-fila { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.marca { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: var(--step-body); }
.marca-simbolo { color: var(--ink); flex: none; }
.menu { display: flex; gap: 22px; }
.menu a { color: var(--sobre-amarillo); font-weight: 500; font-size: var(--step-ui); min-height: 44px; display: inline-flex; align-items: center; transition: color var(--t-hover) ease; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--ink); }
.barra-buscar {
  margin-left: auto; display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 260px; padding: 0 14px;
  border: 1px solid rgba(20,20,20,.4); border-radius: var(--r-ctrl); background: var(--papel); color: var(--muted); cursor: pointer;
  transition: border-color var(--t-hover) ease, color var(--t-hover) ease;
}
.barra-buscar:hover, .barra-buscar[aria-expanded="true"] { border-color: var(--ink); color: var(--ink); }
.barra-menu { display: none; min-height: 44px; padding: 0 14px; border: 1px solid rgba(20,20,20,.4); border-radius: var(--r-ctrl); background: transparent; cursor: pointer; margin-left: auto; font-weight: 500; }
.menu-movil { padding: 4px 0 12px; }
.menu-movil a { display: flex; align-items: center; min-height: 48px; font-size: var(--step-body); font-weight: 500; border-top: 1px solid rgba(20,20,20,.18); }
.busqueda-barra { padding: 0 0 20px; }
.busqueda-barra .buscador { max-width: 560px; }

.migas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: var(--step-small); color: var(--muted); }
.migas a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.migas [aria-current] { color: var(--ink); }
.titulo { margin: 12px 0 28px; }
.migas { margin: 24px 0 24px; }
.interior h1 { font-size: var(--step-head); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }
.subtitulo { margin-top: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: var(--step-ui); }
.frescura { display: inline-flex; align-items: center; gap: 6px; }
.punto-vivo { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.interior h2 { font-size: var(--step-lead); line-height: 1.15; letter-spacing: -0.02em; }

/* selector de combustible */
.selector { display: inline-flex; gap: 0; margin-bottom: 20px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--borde); border-radius: var(--r-ctrl); background: var(--papel); }
.selector::-webkit-scrollbar { display: none; }
.selector a { flex: none; min-height: 44px; display: flex; align-items: center; padding: 0 18px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color var(--t-hover) ease, background-color var(--t-hover) ease; }
.selector a + a { border-left: 1px solid var(--linea); }
.selector a:hover { color: var(--ink); background: var(--amarillo-claro); }
.selector a[aria-current="true"] { background: var(--ink); color: #fff; }

/* paneles */
.bloque { background: var(--papel); padding: clamp(18px, 2vw, 28px); margin-bottom: var(--gutter); border-radius: var(--r); }
.bloque > h2, .bloque-cabecera { margin-bottom: 16px; }
.bloque-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.herramientas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nota { color: var(--muted); font-size: var(--step-small); }
.nota a, .frase a, .vacio a, .texto a, .articulo a, .ranking-id a { text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .2em; }
.vacio { color: var(--muted); padding: 12px 14px; border: 1px dashed var(--borde); border-radius: var(--r-ctrl); }
.frase { max-width: 62ch; }
.aviso { font-size: var(--step-small); color: var(--muted); margin: -6px 0 10px; }
.rejilla-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--gutter); align-items: start; margin-bottom: var(--gutter); }
.rejilla-2 > * { margin-bottom: 0; }
.columna { display: flex; flex-direction: column; gap: var(--gutter); }

/* la respuesta: el cartel amarillo del municipio */
.panel { background: var(--amarillo); color: var(--ink); padding: clamp(20px, 2.4vw, 32px); margin-bottom: var(--gutter); border-radius: var(--r); }
.respuesta-etiqueta { color: var(--sobre-amarillo); font-weight: 600; margin-bottom: 6px; font-size: var(--step-ui); }
.respuesta-cuerpo { display: flex; flex-direction: column; gap: 20px; }
.respuesta-precio { font-size: var(--step-cifra); line-height: 1; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.respuesta-precio .unidad { font-size: var(--step-body); letter-spacing: 0; color: var(--sobre-amarillo); }
.respuesta-sitio { margin-top: 12px; font-size: var(--step-body); }
.respuesta-sitio a { text-decoration: underline; text-underline-offset: .2em; }
.respuesta-meta { color: var(--sobre-amarillo); font-size: var(--step-small); margin-top: 2px; }
.panel .boton { align-self: flex-start; }
.hallazgo { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(20,20,20,.18); max-width: 52ch; }
.hallazgo b { font-weight: 600; }
.panel .vacio { color: var(--sobre-amarillo); border-color: rgba(20,20,20,.35); }
.panel .vacio a { color: var(--ink); }
.litros { display: flex; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.litros-txt { font-size: var(--step-small); margin-right: 4px; color: var(--muted); }
.litros button {
  min-height: 40px; min-width: 52px; padding: 0 10px; border: 1px solid rgba(20,20,20,.35); border-radius: var(--r-ctrl);
  background: transparent; color: inherit; font-size: var(--step-ui); cursor: pointer; font-variant-numeric: tabular-nums;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.litros button:hover { border-color: currentColor; }
.litros button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.panel .litros-txt { color: var(--sobre-amarillo); }

/* escalera de precios */
.escalera-bloque { margin-top: 24px; }
.escalera-titulo { font-size: var(--step-small); color: var(--muted); margin-bottom: 2px; }
.panel .escalera-titulo { color: var(--sobre-amarillo); }
.escalera { position: relative; height: 66px; }
.escalera-plot { position: absolute; left: 0; right: 0; top: 20px; height: 24px; }
.escalera-plot svg { width: 100%; height: 100%; }
.escalera .carril { stroke: currentColor; stroke-opacity: .25; stroke-width: 2; vector-effect: non-scaling-stroke; }
.escalera .marca { stroke: currentColor; stroke-opacity: .55; stroke-width: 2; vector-effect: non-scaling-stroke; }
.escalera .marca.barata { stroke: var(--accent); stroke-opacity: 1; stroke-width: 3; }
.esc-min, .esc-max { position: absolute; bottom: 0; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.esc-min { left: 0; color: var(--accent-texto); font-weight: 700; }
.esc-max { right: 0; opacity: .75; }
.esc-media { position: absolute; top: 16px; height: 32px; width: 0; border-left: 1px dashed currentColor; opacity: .6; }
.esc-media-txt { position: absolute; top: 0; transform: translateX(-50%); font-size: var(--step-small); opacity: .8; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* municipio: respuesta a la izquierda, lista a la derecha */
.rejilla-municipio {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); align-items: start;
  grid-template-areas: "respuesta lista" "cerca lista" "evolucion lista"; grid-template-rows: auto auto 1fr;
}
.rejilla-municipio > * { margin-bottom: 0; }
.zona-respuesta { grid-area: respuesta; }
.zona-lista { grid-area: lista; }
.zona-cerca { grid-area: cerca; }
.zona-evolucion { grid-area: evolucion; }

/* lista de gasolineras */
.estacion {
  content-visibility: auto; contain-intrinsic-size: auto 76px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto 52px; gap: 4px 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--linea);
}
.estacion:first-child { border-top: 0; padding-top: 4px; }
.estacion-id { display: flex; flex-direction: column; min-width: 0; }
.estacion-id strong { font-weight: 600; }
.estacion-id > span { color: var(--muted); font-size: var(--step-small); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; }
.estacion-meta .distancia:not(:empty)::before { content: " · "; }
.estacion-precio { text-align: right; }
.estacion-precio > span { display: flex; flex-direction: column; align-items: flex-end; }
.estacion-precio .cifra { font-size: var(--step-lead); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.estacion-precio small { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.es-barata .cifra, .es-barata small { color: var(--accent-texto); }
.estacion-ir {
  justify-self: end; display: flex; align-items: center; justify-content: center; width: 52px; min-height: 44px;
  border: 1px solid var(--borde); border-radius: var(--r-ctrl); font-weight: 600; font-size: var(--step-ui);
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.estacion-ir:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-solo24-activo] .estacion:not([data-24h]) { display: none; }
.todos { margin-top: 12px; border-top: 1px solid var(--linea); padding-top: 12px; }
.todos summary { cursor: pointer; color: var(--muted); font-size: var(--step-ui); min-height: 32px; display: flex; align-items: center; }
.todos summary:hover { color: var(--ink); }
.todos .tabla-envoltura { margin-top: 12px; }

/* filas (municipios, provincias, marcas) */
.filas.columnas-2 { columns: 2; column-gap: 48px; }
.fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--linea); break-inside: avoid; }
.filas > .fila:first-child { border-top: 0; }
.fila > a { display: flex; flex-direction: column; min-width: 0; padding: 2px 0; }
.fila > a strong { font-weight: 500; }
.fila > a:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.fila > a span { color: var(--muted); font-size: var(--step-small); }
.fila-precio { text-align: right; flex: none; }
.fila-precio > span:not(.importe) { display: flex; flex-direction: column; align-items: flex-end; }
.fila-precio .cifra { font-weight: 600; font-size: var(--step-body); }
.fila-precio small { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.fila-desde { display: none; }

/* ranking corto */
.ranking li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--linea); }
.ranking li:first-child { border-top: 0; padding-top: 2px; }
.ranking-id { display: flex; flex-direction: column; min-width: 0; }
.ranking-id strong { font-weight: 600; }
.ranking-id span { color: var(--muted); font-size: var(--step-small); }
.ranking-precio { flex: none; font-weight: 600; font-size: var(--step-body); }
.ranking-2 .ranking { columns: 2; column-gap: 48px; }
.ranking-2 .ranking li { break-inside: avoid; }
.ranking-2 .ranking li:nth-child(6) { border-top: 0; padding-top: 2px; }

.enlaces { display: flex; flex-wrap: wrap; gap: 6px; }
.enlaces a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--borde); border-radius: 999px; font-size: var(--step-ui); transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease; }
.enlaces a:hover { border-color: var(--ink); background: var(--papel); }
.bloque .enlaces + .nota { margin-top: 12px; }

/* evolución */
.evolucion { margin-top: 8px; padding: 0 0 22px 52px; }
.evolucion-plot { position: relative; height: 170px; }
.evolucion-plot svg { width: 100%; height: 100%; overflow: visible; }
.evolucion .rejilla { stroke: rgba(20,20,20,.1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.evolucion .linea { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.eje-y, .eje-x { position: absolute; font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eje-y { left: -52px; width: 44px; text-align: right; transform: translateY(-50%); }
.eje-x { top: calc(100% + 6px); transform: translateX(-50%); }
.eje-x.primero { transform: none; }
.eje-x.ultimo { transform: translateX(-100%); }
.punto-hoy { position: absolute; width: 9px; height: 9px; margin: -6.5px 0 0 -6.5px; box-sizing: content-box; border-radius: 50%; background: var(--accent); border: 2px solid var(--papel); }

/* preguntas */
.faq details { border-top: 1px solid var(--linea); }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 16px; color: var(--muted); max-width: 70ch; }

/* tablas */
.tabla-envoltura { overflow-x: auto; overscroll-behavior-x: contain; }
.tabla { width: 100%; border-collapse: collapse; font-size: var(--step-ui); }
.tabla th { font-weight: 400; font-size: var(--step-small); color: var(--muted); text-align: left; padding: 8px 10px; white-space: nowrap; }
.tabla td { padding: 10px; border-top: 1px solid var(--linea); vertical-align: top; }
.tabla .num { text-align: right; white-space: nowrap; }
.tabla a { text-decoration: underline; text-underline-offset: .2em; }
.celda-sub { display: block; color: var(--muted); font-size: var(--step-small); }

/* noticias y textos */
.noticias li a { display: flex; flex-direction: column; padding: 14px 0; border-top: 1px solid var(--linea); }
.noticias li:first-child a { border-top: 0; padding-top: 0; }
.noticias time { font-size: var(--step-small); color: var(--muted); }
.noticias a:hover span { text-decoration: underline; text-underline-offset: .2em; }
.texto p { max-width: 70ch; }
.texto p + p { margin-top: 10px; }
.rejilla-articulo { display: grid; grid-template-columns: minmax(0, 780px) minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.articulo { max-width: 780px; background: var(--papel); padding: clamp(20px, 3vw, 40px); margin-bottom: var(--gutter); border-radius: var(--r); }
.rejilla-articulo .articulo { margin-bottom: 0; }
.articulo h1 { font-size: var(--step-head); line-height: 1.04; letter-spacing: -0.035em; margin-bottom: 4px; }
.articulo h2 { font-size: var(--step-lead); margin: 32px 0 10px; }
.articulo p + p, .articulo p + .tabla-envoltura, .articulo ul { margin-top: 12px; }
.articulo ul { list-style: disc; padding-left: 20px; }
.articulo li + li { margin-top: 6px; }
.articulo .subtitulo { margin-bottom: 20px; }
.entradilla { font-size: var(--step-lead); line-height: 1.4; }
.paginacion { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0 12px; padding-top: 16px; border-top: 1px solid var(--linea); }
.lateral { position: sticky; top: 24px; }
.lateral .bloque:last-child { margin-bottom: 0; }
.lateral .fila { min-height: 48px; }


/* ======================================================================
   TABLETA Y MÓVIL
   ====================================================================== */
@media (max-width: 1100px) {
  .prov-columnas { columns: 3; }
  .t-frase { grid-column: 1 / 7; }
  .t-nav { grid-column: 7 / 13; }
  .t-noticia { grid-column: 1 / 13; }
  .t-marca { grid-column: 1 / 13; min-height: 180px; }
  .t-accion { grid-column: 1 / 13; min-height: 140px; }
}
@media (max-width: 960px) {
  .rejilla-2, .rejilla-articulo { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: static; }
  .rejilla-municipio { grid-template-columns: minmax(0, 1fr); grid-template-areas: "respuesta" "lista" "cerca" "evolucion"; grid-template-rows: auto; }
  .menu { display: none; }
  .barra-menu { display: inline-flex; align-items: center; }
  .barra-buscar { min-width: 0; margin-left: 0; }
  .cabeza-cuerpo { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  /* En una columna: buscar y combustible, después tu zona y al final los litros. */
  .cabeza-izq { display: contents; }
  .cabeza-izq > * { order: 1; }
  .cabeza-der { order: 2; margin-top: 20px; }
  .cabeza-izq > .cabeza-litros, .cabeza-izq > .cabeza-nota { order: 3; }
  .hoy-medias { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consejos-rejilla { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .consejo-ahorro { grid-column: 1 / -1; }
  .prov-columnas { columns: 2; }
}
@media (max-width: 720px) {
  .cabeza-barra { min-height: 64px; }
  .cabeza-nav { gap: 16px; }
  .cabeza-nav a:not(:first-child) { display: none; }
  .cabeza h1 { font-size: clamp(2.125rem, 9.6vw, 2.75rem); }
  .cabeza-frase { font-size: var(--step-ui); margin-top: 12px; }
  .cabeza-buscar { margin-top: 20px; }
  .cabeza-buscar input { min-height: 56px; font-size: var(--step-body); }
  .cabeza-ubicacion { min-height: 56px; }
  .cabeza-comb { margin-top: 18px; }
  .zona { padding: 16px; border-radius: 16px; }
  .zona-mejor { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .zm-acciones { grid-column: 1; grid-row: auto; flex-direction: row; margin-top: 10px; }
  .zm-ir { flex: 1; }
  .zl { grid-template-columns: minmax(0, 1fr) auto 44px; gap: 4px 10px; }
  .zona-controles { gap: 8px; }
  .hoy-media { padding: 16px; }
  .hoy-media[aria-current="true"] .hm-nombre::after { content: ""; }
  .consejos-rejilla { grid-template-columns: minmax(0, 1fr); }
  .prov-columnas { columns: 1; padding: 16px 20px; }
  .teselas { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tesela { padding: 20px; min-height: 0; }
  .t-marca { grid-column: 1 / -1; order: -2; min-height: 140px; }
  .t-marca .logo { width: 82%; }
  .t-accion { grid-column: 1 / -1; order: -1; min-height: 110px; }
  .t-nav, .t-noticia { grid-column: span 1; }
  .t-frase { grid-column: 1 / -1; }

  .barra-fila { gap: 10px; min-height: 64px; }
  .barra-buscar span { display: none; }
  .barra-buscar { width: 48px; justify-content: center; padding: 0; }
  .selector { display: flex; width: 100%; }
  .selector a { flex: 1 0 auto; justify-content: center; padding: 0 10px; min-height: 48px; }
  .selector .largo { display: none; }
  .filas.columnas-2, .ranking-2 .ranking { columns: 1; }
  .ranking-2 .ranking li:nth-child(6) { border-top: 1px solid var(--linea); padding-top: 12px; }
  .estacion { grid-template-columns: minmax(0, 1fr) auto 48px; gap: 4px 10px; }
  .estacion-ir { width: 48px; min-height: 48px; }
  .herramientas { width: 100%; }
  .herramientas .campo { flex: 1; width: auto; }
  .bloque-cabecera .boton-sec, .herramientas .campo { min-height: 48px; }
  .litros button { min-height: 44px; }
  .panel .boton { align-self: stretch; }
  .evolucion { padding-left: 44px; }
  .eje-y { left: -46px; width: 40px; }
}
@media (max-width: 400px) {
  .t-nav, .t-noticia { grid-column: 1 / -1; }
}

/* ======================================================================
   ESTILO PERIÓDICO: temas, portada de noticias, noticia y calculadora
   ====================================================================== */

/* barra de temas */
.temas { border-top: 1px solid rgba(20, 20, 20, .18); }
.temas-fila { display: flex; gap: 6px 22px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; min-height: 48px; align-items: center; }
.temas-fila::-webkit-scrollbar { display: none; }
.temas-fila a { font-size: var(--step-small); font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; flex: none; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; transition: text-decoration-color var(--t-hover) ease; }
.temas-fila a:hover { text-decoration-color: currentColor; }
.tema-hoy { font-weight: 700 !important; }
.tema-etq { background: var(--negative); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.barra .temas { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margin); }
.cabeza .temas { margin-bottom: 8px; }

/* portada: lo último */
.diario-rejilla { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gutter); margin-top: 28px; align-items: start; }
.diario-principal { background: var(--papel); border-radius: var(--r); overflow: hidden; }
.diario-enlace { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.diario-enlace img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.diario-enlace > span, .diario-enlace > time { padding: 0 24px; }
.diario-tema { color: var(--negative); font-size: var(--step-small); font-weight: 700; }
.diario-titulo { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.diario-enlace:hover .diario-titulo, .diario-item:hover .di-titulo { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .15em; }
.diario-texto { color: var(--muted); font-size: var(--step-ui); }
.diario-fecha, .di-texto time { color: var(--muted); font-size: var(--step-small); }
.diario-lista { display: flex; flex-direction: column; gap: 8px; }
.diario-item { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 16px; align-items: center; padding: 16px; background: var(--papel); border-radius: var(--r); }
.diario-item img { width: 132px; height: 74px; object-fit: cover; border-radius: 10px; }
.di-texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.di-titulo { font-size: var(--step-body); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.di-nota { color: var(--muted); font-size: var(--step-small); line-height: 1.4; }
.di-icono { width: 132px; height: 74px; border-radius: 10px; background: var(--amarillo); display: flex; align-items: center; justify-content: center; }

/* noticia */
.noticia { max-width: 780px; background: var(--papel); padding: clamp(20px, 3vw, 40px); border-radius: var(--r); overflow: hidden; }
.noticia-tema { color: var(--negative); font-weight: 700; font-size: var(--step-small); text-decoration: underline; text-underline-offset: .2em; text-decoration-color: transparent; }
.noticia-tema:hover { text-decoration-color: currentColor; }
.noticia h1 { margin-top: 8px; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.625rem); line-height: 1.1; letter-spacing: -0.025em; }
.noticia-sumario { margin-top: 14px; font-size: var(--step-lead); line-height: 1.35; color: var(--muted); }
.noticia-foto { margin: 24px calc(-1 * clamp(20px, 3vw, 40px)) 0; }
.noticia-foto img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.noticia-foto figcaption { padding: 8px clamp(20px, 3vw, 40px) 0; font-size: var(--step-small); color: var(--muted); }
.noticia-firma { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 18px; padding: 14px 0; border-block: 1px solid var(--linea); }
.noticia-firma p { display: flex; flex-direction: column; font-size: var(--step-small); }
.noticia-firma p span { color: var(--muted); }
.compartir { display: flex; flex-wrap: wrap; gap: 6px; }
.compartir a, .compartir button { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--borde); border-radius: 999px; background: none; cursor: pointer; font-size: var(--step-small); font-weight: 600; }
.compartir a:hover, .compartir button:hover { border-color: var(--ink); }
.noticia-cuerpo { margin-top: 24px; }
.noticia-cuerpo p { max-width: 68ch; line-height: 1.65; }
.noticia-cuerpo p + p, .noticia-cuerpo p + .tabla-envoltura { margin-top: 14px; }
.noticia-cuerpo h2 { font-size: var(--step-lead); margin: 36px 0 10px; letter-spacing: -0.015em; }
.noticia-cuerpo a { text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .2em; }
.noticia-destacado { margin: 28px 0 8px; padding: 20px; background: var(--amarillo); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.noticia-cuerpo .noticia-destacado .boton { text-decoration: none; }
.noticia .paginacion { margin-top: 36px; }
.mas-lista { display: flex; flex-direction: column; gap: 12px; }
.mas-lista a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; font-weight: 600; font-size: var(--step-ui); line-height: 1.3; }
.mas-lista a:hover span { text-decoration: underline; text-underline-offset: .2em; }
.mas-lista img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }

/* lista de noticias */
.noticias-lista { display: flex; flex-direction: column; }
.noticias-lista .diario-item { padding: 18px 0; border-radius: 0; border-top: 1px solid var(--linea); grid-template-columns: minmax(0, 1fr) 176px; }
.noticias-lista li:first-child .diario-item { border-top: 0; padding-top: 4px; }
.noticias-lista img { width: 176px; height: 99px; }

/* calculadora */
.rejilla-calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gutter); align-items: start; margin-bottom: var(--gutter); }
.rejilla-calc > * { margin-bottom: 0; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; margin-top: 8px; }
.campo-calc { display: flex; flex-direction: column; gap: 6px; }
.campo-calc > label:first-child { font-weight: 600; font-size: var(--step-ui); }
.con-unidad { display: flex; align-items: center; border: 1px solid var(--borde); border-radius: var(--r-ctrl); background: var(--papel); }
.con-unidad:focus-within { outline: 2px solid var(--ink); outline-offset: 0; }
.con-unidad input { flex: 1; min-width: 0; min-height: 52px; padding: 0 14px; border: 0; background: none; font-size: var(--step-lead); font-weight: 600; font-variant-numeric: tabular-nums; outline: none; }
.con-unidad span { padding: 0 14px; color: var(--muted); font-size: var(--step-small); white-space: nowrap; }
.casilla { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: var(--step-ui); cursor: pointer; }
.casilla input { width: 20px; height: 20px; accent-color: var(--ink); }
.calc-resultado .respuesta-precio { margin-top: 4px; }
.calc-resultado .boton { margin-top: 20px; }
.deposito-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline; min-height: 52px; padding: 10px 0; border-top: 1px solid var(--linea); }
.deposito-lista li:first-child { border-top: 0; }
.dl-precio { color: var(--muted); font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.dl-total { font-size: var(--step-lead); font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; }
.bloque-cabecera .litros { margin-top: 0; }

@media (max-width: 960px) {
  .diario-rejilla, .rejilla-calc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .diario-item { grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; padding: 14px; }
  .diario-item img, .di-icono { width: 104px; height: 58px; }
  .noticias-lista .diario-item { grid-template-columns: minmax(0, 1fr) 104px; }
  .noticias-lista img { width: 104px; height: 58px; }
  .diario-enlace > span, .diario-enlace > time { padding: 0 16px; }
  .calc-form { grid-template-columns: minmax(0, 1fr); }
  .noticia-firma { flex-direction: column; align-items: flex-start; }
}

/* ======================================================================
   ABIERTA AHORA, MAPA, RUTA Y TENDENCIA
   ====================================================================== */
.ahora { font-weight: 600; }
.ahora.si { color: var(--accent-texto); }
.ahora.no { color: var(--negative); }
.estacion-meta .ahora:not(:empty)::after { content: " · "; color: var(--muted); font-weight: 400; }
[data-abiertas-activo] .estacion[data-abierta="0"] { display: none; }
.zl-ahora { font-size: var(--step-small); }
.zm-ahora { grid-column: 1; font-size: var(--step-small); margin-top: 4px; }
.zm-aviso { grid-column: 1 / -1; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--papel); font-size: var(--step-small); }

/* mapa */
.zona-mapa { height: min(62vh, 520px); margin-top: 16px; border-radius: 14px; overflow: hidden; background: var(--surface); position: relative; z-index: 0; }
.mapa-cargando { padding: 20px; color: var(--muted); font-size: var(--step-small); }
.pin { position: relative; }
.pin span {
  position: absolute; left: 0; bottom: 0; transform: translate(-50%, -6px); white-space: nowrap;
  padding: 3px 8px; border-radius: 8px; background: var(--papel); color: var(--ink); border: 1.5px solid var(--ink);
  font: 700 13px/1.2 var(--font); font-variant-numeric: tabular-nums;
}
.pin span::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.pin-barata span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pin-barata span::after { border-top-color: var(--accent); }
.pin-cerrada span { opacity: .55; }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content { font-size: 14px; line-height: 1.45; }
.leaflet-popup-content a { color: var(--accent-texto); font-weight: 600; }
.pop-precio { font-size: 16px; }

/* ruta */
.ruta-campos { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.ruta-campos .campo-calc input { min-height: 56px; padding: 0 14px; border: 1px solid var(--borde); border-radius: var(--r-ctrl); background: var(--papel); font-size: var(--step-body); }
.ruta-campos .campo-calc input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.ruta-campos .sugerencias { top: 92px; }
.ruta-cambiar { margin-top: 30px; width: 48px; height: 56px; border: 1px solid var(--borde); border-radius: var(--r-ctrl); background: var(--papel); cursor: pointer; font-size: 20px; }
.ruta-cambiar:hover { border-color: var(--ink); }
.enlace-boton { align-self: flex-start; min-height: 40px; padding: 0; border: 0; background: none; cursor: pointer; font-size: var(--step-small); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.ruta-pie { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.ruta-pie .selector { margin: 0; }
.ruta-ir { min-height: 56px; padding: 0 28px; }
.ruta-resultado { margin-top: var(--gutter); }
.tramos li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 48px; gap: 4px 14px; align-items: center; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--linea); }
.tramos li:first-child { border-top: 0; }
.tr-km { font-weight: 700; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.tr-sin { grid-column: 2 / -1; color: var(--muted); font-size: var(--step-small); }
.ruta-coste { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--bg); font-size: var(--step-ui); }
.ruta-coste a { font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

/* ¿repostar hoy o esperar? */
.tendencia { margin-top: var(--gutter); }
.tend { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px 32px; align-items: center; padding: clamp(20px, 2vw, 28px); border-radius: var(--r); background: var(--papel); }
.tend-sube { box-shadow: inset 6px 0 0 var(--negative); }
.tend-baja { box-shadow: inset 6px 0 0 var(--accent); }
.tend-estable, .tend-pocos { box-shadow: inset 6px 0 0 var(--amarillo); }
.tend-texto { display: flex; flex-direction: column; gap: 6px; max-width: 68ch; }
.tend-pregunta { font-size: var(--step-small); font-weight: 700; color: var(--muted); }
.tend-titulo { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.02em; }
.tend-nota { font-size: var(--step-small); color: var(--muted); }
.tend-linea { width: 100%; height: 64px; color: var(--ink); }
.tend-sube .tend-linea { color: var(--negative); }
.tend-baja .tend-linea { color: var(--accent); }
.noticia-telegram { display: inline-flex; margin-top: 12px; font-size: var(--step-small); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 720px) {
  .ruta-campos { grid-template-columns: minmax(0, 1fr); }
  .ruta-cambiar { margin: -4px 0 0; justify-self: end; height: 44px; }
  .ruta-ir { width: 100%; }
  .ruta-pie .selector { width: 100%; }
  .tramos li { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .tr-km { grid-column: 1 / -1; }
  .tend { grid-template-columns: minmax(0, 1fr); }
  .tend-linea { height: 48px; }
  .zona-mapa { height: 60vh; }
}

/* accesos rápidos en el móvil */
.barra-movil { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .barra-movil {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--papel); border-top: 1px solid var(--linea);
    box-shadow: 0 -6px 20px rgba(20, 20, 20, .08); /* taste-skill-ignore: barra fija sobre el contenido */
  }
  .barra-movil a, .barra-movil button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px;
    border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink); border-radius: 10px;
  }
  .barra-movil a[aria-current="page"] { background: var(--amarillo-claro); }
  .barra-movil a:active, .barra-movil button:active { background: var(--amarillo-claro); }
}

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