/* ==========================================================================
   SISTEMA DE DISEÑO · eltiempoen.net (y variante sobria agrometea)
   Copia de producción de rediseno/mockups/sistema.css: mismas clases y
   variables, sin lo que solo servía a los mockups. Móvil primero (390 px);
   escritorio a 1440 px. Hoy solo lo carga /mapas (plantilla propia): sus clases
   (.btn, .num, .hoja, .tabla…) chocan con las de layout.php.

   Idea: un instrumento. Interfaz neutra en tinta sobre papel frío; el color
   pertenece a los datos (rampas fijas) y hay UNA sola señal de interfaz, el
   magenta de la aguja: «ahora», lo seleccionado, el cursor. Las escalas se
   dibujan como reglas graduadas. Lo medido es macizo; lo previsto, hueco o rayado.

   Fuentes propias en /fonts (licencia SIL OFL 1.1, textos junto a los ficheros):
   Bricolage Grotesque (variable: opsz, wdth, wght) e IBM Plex Sans. Sin terceros.

   Tema: claro por defecto; oscuro si el sistema lo pide o con
   <html data-theme="dark">. Marca: <html data-marca="agrometea"> (o en un contenedor).
   ========================================================================== */

/* ---------- 0. FUENTES ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-stretch: 75% 100%; font-display: swap;
  src: url("/fonts/bricolage-grotesque-visor.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-stretch: 75% 100%; font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/ibm-plex-sans-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/ibm-plex-sans-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Respaldos con las métricas de las de arriba (medidas en el navegador frente a Arial): mientras llega la
   fuente, el texto ocupa lo mismo y el cambio no mueve nada (CLS). Bricolage ya no se precarga: así el CSS
   llega antes en móvil lento (LCP de la ficha de 1,20 a 1,09 s con 4G lento y CPU x4) */
@font-face { font-family: "Plex respaldo"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 100.2%; ascent-override: 102.8%; descent-override: 27.9%; line-gap-override: 0%; }
@font-face { font-family: "Bricolage respaldo"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold"); size-adjust: 85.9%; ascent-override: 108.3%; descent-override: 31.4%; line-gap-override: 0%; }

/* ---------- 1. TOKENS ---------- */
:root {
  color-scheme: light;

  /* Neutros (gris frío con sesgo azul, tono 240-255) */
  --bg: #f0f4f7;          /* fondo de página */
  --surface: #ffffff;     /* tarjetas, paneles */
  --raised: #f8fafd;      /* cabeceras de tabla, filas alternas */
  --sunk: #e7ecf0;        /* pistas, huecos, campos */
  --line: #d7dde2;        /* filetes */
  --line-2: #b6bfc6;      /* filetes fuertes, bordes de control */
  --ink: #0f1b2b;         /* texto y botones principales */
  --ink-2: #333e4d;       /* texto secundario fuerte */
  --muted: #535f6c;       /* texto secundario (AA sobre surface y bg) */
  --faint: #77818c;       /* marcas, ticks; NO para texto corrido */
  --on-ink: #ffffff;      /* texto sobre --ink */

  /* Señal de interfaz: la aguja. Solo estado activo, «ahora», foco y cursor. */
  --senal: #c2036d;
  --senal-tinta: #9a0757; /* texto en señal sobre claro */
  --senal-suave: #fee8ef; /* fondo de lo seleccionado */
  --on-senal: #ffffff;

  /* Estados */
  --ok: #1d7d3e;
  --av-amarillo: #f6d732; --av-naranja: #f88b1c; --av-rojo: #df2225;      /* rellenos de aviso (oficiales) */
  --av-amarillo-t: #725a08; --av-naranja-t: #9b4805; --av-rojo-t: #b00c15; /* texto de aviso */
  --sem-si: #2f9e57; --sem-ojo: #e0a514; --sem-no: #d2432f;                /* semáforo agrícola (siempre con forma) */

  /* Modelos: el color es el centro, el trazo es el alcance (ver .mod-*) */
  --m-mf: #c83406;    /* Météo-France · AROME (regional, continuo) */
  --m-mf2: #e27641;   /* Météo-France · ARPEGE (discontinuo) */
  --m-dwd: #145ec1;   /* DWD · ICON-EU */
  --m-dwd2: #4b99d7;  /* DWD · ICON global */
  --m-ec: #0c7b60;    /* ECMWF · IFS */
  --m-ec2: #3aae94;   /* ECMWF · AIFS */
  --m-ec3: #5b7d10;   /* ECMWF · IFS HRES 9 km (oliva: se distingue del IFS 0,25° también con daltonismo) */
  --m-gfs: #996a06;   /* NOAA · GFS */
  --m-gem: #813faa;   /* ECCC · GEM */
  --m-ukmo: #6b727a;  /* UKMO: gris, solo en comparativa */
  --m-media: var(--ink);

  /* Mapa base dibujado */
  --mar: #dbe8f1; --tierra: #f8f7f1; --tierra-alta: #e0ddce;
  --mapa-linea: #576574; --mapa-linea-2: #9ba6b1; --mapa-halo: #ffffff;
  --nube: #77818c;        /* tinta de nube: la opacidad lleva el valor */
  --noche: rgba(60, 80, 130, .10); /* sombreado de noche en gráficos y tablas */

  /* Rampas meteorológicas continuas (mismas paradas que sistema.js). Luminosidad
     monótona (secuenciales) o simétrica (divergentes), calculadas en OKLCH. */
  --pal-temp: linear-gradient(90deg, #311852 0%, #3c3990 12.1%, #2769b7 21.2%, #3aa6cb 30.3%, #6bcac9 36.4%, #9ce4bd 42.4%, #d5f1a7 48.5%, #f7f08e 54.5%, #ffd663 60.6%, #fcaf41 66.7%, #f58028 72.7%, #e14d28 78.8%, #be222a 84.8%, #8c062d 90.9%, #4c0530 100%);
  --pal-precip: linear-gradient(90deg, #caf0f5, #9fe1f1, #70ccee, #46afec, #318be6, #3663db, #483dcc, #511ab0, #4f0088, #47025e, #3b0040, #280427);
  --pal-viento: linear-gradient(90deg, #f6f7e7, #e9f1c3, #d4e995, #aade70, #6bce71, #1db77a, #00997f, #087c77, #0a606c, #074561, #122864, #1d0a44);
  --pal-nieve: linear-gradient(90deg, #f8e8fb, #eccff5, #deb6f0, #c598e7, #a878db, #8557c8, #653eae, #452b8a, #261b5b);
  --pal-presion: linear-gradient(90deg, #2b235d 0%, #444e91 20%, #8398c4 40%, #ccd8ec 50.7%, #f4f2ea 57.3%, #eaddc1 64%, #d3a96f 74.7%, #a9692e 86.7%, #6e351a 100%);
  --pal-nubes: linear-gradient(90deg, transparent, var(--nube));

  /* Tipografía: dos familias */
  --f-titular: "Bricolage Grotesque", "Bricolage respaldo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-texto: "IBM Plex Sans", "Plex respaldo", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  /* Escala de 7 tamaños (mínimo 13 px) + cifra de instrumento */
  --t-1: .8125rem;  /* 13 · etiquetas, tablas densas, pies */
  --t-2: .9375rem;  /* 15 · texto base */
  --t-3: 1.0625rem; /* 17 · texto destacado, frase del día */
  --t-4: 1.25rem;   /* 20 · título de tarjeta */
  --t-5: 1.625rem;  /* 26 · título de sección */
  --t-6: 2.125rem;  /* 34 · H1 */
  --t-7: 3rem;      /* 48 · H1 de portada (solo escritorio) */
  --t-cifra: clamp(3.5rem, 2.4rem + 5vw, 5rem); /* dato grande: 56 a 80 */

  /* Espaciado (base 4) */
  --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 24px; --e-6: 32px; --e-7: 48px; --e-8: 64px;
  /* Radios: pequeños, de instrumento */
  --r-1: 2px; --r-2: 4px; --r-3: 8px; --r-hoja: 16px; --r-pill: 999px;
  /* Sombras: solo para lo que flota */
  --s-1: 0 1px 2px rgba(15, 27, 43, .08);
  --s-2: 0 2px 4px rgba(15, 27, 43, .06), 0 10px 28px -10px rgba(15, 27, 43, .22);
  --s-mapa: 0 1px 2px rgba(15, 27, 43, .16), 0 6px 20px -6px rgba(15, 27, 43, .28); /* paneles sobre el mapa */
  --foco: 0 0 0 2px var(--surface), 0 0 0 4px var(--senal);

  --ancho: 1240px;        /* ancho máximo del contenido */
  --margen: 16px;         /* margen lateral de página */
  --cab-alto: 56px;
  --barra-inf-alto: 60px;
  --control: 40px;        /* alto de control táctil estándar */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c121b; --surface: #141c27; --raised: #1b2431; --sunk: #080d14; --line: #283241; --line-2: #404b5b;
    --ink: #e6ecf2; --ink-2: #c3cbd4; --muted: #9ba6b1; --faint: #717c87; --on-ink: #0c121b;
    --senal: #fc77ac; --senal-tinta: #fe9bbf; --senal-suave: #40192a; --on-senal: #2a0616;
    --ok: #68ca80;
    --av-rojo: #ee3533; --av-amarillo-t: #f2d855; --av-naranja-t: #ffa659; --av-rojo-t: #fe7f78;
    --sem-si: #4fbf78; --sem-ojo: #edb93a; --sem-no: #ee6a55;
    --m-mf: #e6653c; --m-mf2: #f7a97c; --m-dwd: #4c94ec; --m-dwd2: #8ec5ec; --m-ec: #29a987; --m-ec2: #91dcc7; --m-ec3: #a5c95b; --m-gfs: #b78a2c; --m-gem: #b270df; --m-ukmo: #6f757b;
    --mar: #0a121c; --tierra: #1a222d; --tierra-alta: #333c49; --mapa-linea: #8a96a3; --mapa-linea-2: #4a5563; --mapa-halo: #0c121b;
    --nube: #cbd2d9; --noche: rgba(0, 0, 0, .34);
    --s-1: 0 1px 2px rgba(0, 0, 0, .5);
    --s-2: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px -10px rgba(0, 0, 0, .7);
    --s-mapa: 0 1px 2px rgba(0, 0, 0, .6), 0 8px 24px -6px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c121b; --surface: #141c27; --raised: #1b2431; --sunk: #080d14; --line: #283241; --line-2: #404b5b;
  --ink: #e6ecf2; --ink-2: #c3cbd4; --muted: #9ba6b1; --faint: #717c87; --on-ink: #0c121b;
  --senal: #fc77ac; --senal-tinta: #fe9bbf; --senal-suave: #40192a; --on-senal: #2a0616;
  --ok: #68ca80;
  --av-rojo: #ee3533; --av-amarillo-t: #f2d855; --av-naranja-t: #ffa659; --av-rojo-t: #fe7f78;
  --sem-si: #4fbf78; --sem-ojo: #edb93a; --sem-no: #ee6a55;
  --m-mf: #e6653c; --m-mf2: #f7a97c; --m-dwd: #4c94ec; --m-dwd2: #8ec5ec; --m-ec: #29a987; --m-ec2: #91dcc7; --m-ec3: #a5c95b; --m-gfs: #b78a2c; --m-gem: #b270df; --m-ukmo: #6f757b;
  --mar: #0a121c; --tierra: #1a222d; --tierra-alta: #333c49; --mapa-linea: #8a96a3; --mapa-linea-2: #4a5563; --mapa-halo: #0c121b;
  --nube: #cbd2d9; --noche: rgba(0, 0, 0, .34);
  --s-1: 0 1px 2px rgba(0, 0, 0, .5);
  --s-2: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px -10px rgba(0, 0, 0, .7);
  --s-mapa: 0 1px 2px rgba(0, 0, 0, .6), 0 8px 24px -6px rgba(0, 0, 0, .75);
}

/* Variante agrometea: misma estructura, más sobria. Señal verde de campo, neutros
   cálidos, una sola familia tipográfica, radios más blandos y letra base mayor. */
[data-marca="agrometea"] {
  --bg: #f4f3ee; --surface: #ffffff; --raised: #faf9f5; --sunk: #eae8e0; --line: #dcd9cf; --line-2: #bdb9ac;
  --ink: #1c2218; --ink-2: #394033; --muted: #5a6152; --faint: #7f8576;
  --senal: #2d6a2f; --senal-tinta: #24572a; --senal-suave: #e4f0df; --on-senal: #ffffff;
  --mar: #dfe9ec; --tierra: #f7f5ec; --tierra-alta: #e2dcc6;
  --f-titular: var(--f-texto);
  --r-2: 6px; --r-3: 12px;
  --t-2: 1rem; --t-3: 1.125rem;
  --control: 44px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-marca="agrometea"], :root:not([data-theme="light"]) [data-marca="agrometea"] {
    --bg: #11140f; --surface: #191d16; --raised: #20251c; --sunk: #0b0d09; --line: #2c3227; --line-2: #454c3e;
    --ink: #e9ece2; --ink-2: #c8cdbf; --muted: #a0a694; --faint: #767c6b;
    --senal: #8fd08a; --senal-tinta: #a9dea3; --senal-suave: #1f3520; --on-senal: #0c1a0c;
    --mar: #0c1210; --tierra: #1c2119; --tierra-alta: #363c2e;
  }
}
:root[data-theme="dark"][data-marca="agrometea"], :root[data-theme="dark"] [data-marca="agrometea"] {
  --bg: #11140f; --surface: #191d16; --raised: #20251c; --sunk: #0b0d09; --line: #2c3227; --line-2: #454c3e;
  --ink: #e9ece2; --ink-2: #c8cdbf; --muted: #a0a694; --faint: #767c6b;
  --senal: #8fd08a; --senal-tinta: #a9dea3; --senal-suave: #1f3520; --on-senal: #0c1a0c;
  --mar: #0c1210; --tierra: #1c2119; --tierra-alta: #363c2e;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-2)/1.5 var(--f-texto);
  font-variant-numeric: tabular-nums; font-feature-settings: "zero" 0, "ss01" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[data-marca] { background: var(--bg); color: var(--ink); font-size: var(--t-2); }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--senal); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: var(--r-2); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Tipografía */
.tit-1, .tit-2, .tit-3, .tit-4 { font-family: var(--f-titular); font-variation-settings: "wdth" 88; letter-spacing: -.015em; line-height: 1.1; text-wrap: balance; }
.tit-1 { font-size: var(--t-6); font-weight: 700; }
.tit-1--portada { font-size: var(--t-6); }
.tit-2 { font-size: var(--t-5); font-weight: 700; }
.tit-3 { font-size: var(--t-4); font-weight: 600; letter-spacing: -.01em; }
.tit-4 { font-size: var(--t-3); font-weight: 600; letter-spacing: 0; font-variation-settings: "wdth" 94; }
.frase { font-size: var(--t-3); line-height: 1.4; color: var(--ink); max-width: 46ch; text-wrap: pretty; } /* frase del día */
.texto { max-width: 66ch; color: var(--ink-2); }
.nota { font-size: var(--t-1); color: var(--muted); }
.rot { /* rótulo: etiqueta de instrumento */
  font-size: var(--t-1); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.num { font-variant-numeric: tabular-nums; }
.cifra { /* lectura de instrumento */
  font-family: var(--f-titular); font-variation-settings: "wdth" 78; font-weight: 600; font-size: var(--t-cifra);
  line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.cifra small, .cifra__ud { font-size: .38em; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: .08em; vertical-align: .95em; }
.cifra--m { font-size: var(--t-6); } .cifra--s { font-size: var(--t-5); }
.max { color: var(--ink); font-weight: 600; } .min { color: var(--muted); font-weight: 500; } /* máxima y mínima: peso, no color */
@media (min-width: 900px) { .tit-1--portada { font-size: var(--t-7); } }

/* Iconos: un solo juego (sprite de sistema.js), trazo 1,6 sobre rejilla de 24 */
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico--s { width: 16px; height: 16px; } .ico--l { width: 28px; height: 28px; } .ico--xl { width: 40px; height: 40px; stroke-width: 1.4; }
.flecha { display: inline-block; width: 14px; height: 14px; transform: rotate(var(--hacia, 0deg)); } /* viento: --hacia en grados, hacia donde sopla */

/* ---------- 3. MAQUETACIÓN ---------- */
.pagina { width: 100%; max-width: calc(var(--ancho) + 2 * var(--margen)); margin-inline: auto; padding-inline: var(--margen); }
/* iPhone en horizontal (viewport-fit=cover): el texto no se mete bajo la muesca */
@supports (padding: max(0px)) { .pagina { padding-inline: max(var(--margen), env(safe-area-inset-left, 0px)) max(var(--margen), env(safe-area-inset-right, 0px)); } }
.pila { display: flex; flex-direction: column; gap: var(--e-4); min-width: 0; }
.pila--s { gap: var(--e-2); } .pila--l { gap: var(--e-6); } .pila--xl { gap: var(--e-7); }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3); min-width: 0; }
.fila--s { gap: var(--e-2); } .fila--entre { justify-content: space-between; } .fila--base { align-items: baseline; } .fila--no { flex-wrap: nowrap; }
.rejilla { display: grid; gap: var(--e-4); grid-template-columns: minmax(0, 1fr); }
.rejilla > * { min-width: 0; }
@media (min-width: 700px) { .rejilla--2, .rejilla--3, .rejilla--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  :root { --margen: 32px; --cab-alto: 60px; }
  .rejilla--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rejilla--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rejilla--ficha { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--e-6); }   /* contenido + lateral */
  .rejilla--indice { grid-template-columns: 200px minmax(0, 1fr); gap: var(--e-6); }  /* índice fijo + contenido */
}
.desliza { overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; } /* único sitio donde algo puede ser más ancho */
.solo-movil { } .solo-escritorio { display: none !important; }
@media (min-width: 900px) { .solo-movil { display: none !important; } .solo-escritorio { display: revert !important; } }
.oculto-v { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Regla graduada: firma del sistema. Marcas menores cada --paso, mayores cada 5. */
.regla {
  --paso: 8px; height: 8px; color: var(--line-2);
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px calc(var(--paso) * 5)) 0 100% / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px var(--paso)) 0 100% / 100% 50% no-repeat;
}
/* Cabecera de sección: título + regla que llena el resto */
.sec-cab { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px var(--e-3); padding-bottom: var(--e-2); border-bottom: 1px solid var(--ink); }
.sec-cab > :first-child { min-width: 0; }
.sec-cab .regla { flex: 1 1 40px; min-width: 24px; margin-bottom: -9px; align-self: flex-end; }
@media (max-width: 699px) { .sec-cab .regla { display: none; } .sec-cab__acc { margin-left: auto; } }
.sec-cab__acc { font-size: var(--t-1); color: var(--muted); min-width: 0; overflow-wrap: anywhere; }

/* ---------- 4. CABECERA Y NAVEGACIÓN ---------- */
.cab { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); } /* app instalada (barra de estado translúcida) */
.cab__in { display: flex; align-items: center; gap: var(--e-4); height: var(--cab-alto); }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.logo__marca { width: 26px; height: 26px; flex: none; }
.logo__marca .aro { fill: none; stroke: currentColor; stroke-width: 1.8; }
.logo__marca .ticks { stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.logo__marca .aguja { stroke: var(--senal); stroke-width: 2.4; stroke-linecap: round; }
.logo__marca .eje { fill: currentColor; }
.logo__txt { font-family: var(--f-titular); font-variation-settings: "wdth" 84; font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; line-height: 1; }
.logo__txt i { font-style: normal; font-weight: 500; color: var(--muted); }
.nav { display: none; align-items: stretch; gap: var(--e-1); height: 100%; margin-left: var(--e-2); }
.nav__a { display: flex; align-items: center; padding: 0 12px; font-weight: 500; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
.nav__a:hover { color: var(--ink); background: var(--raised); }
.nav__a[aria-current] { color: var(--ink); border-bottom-color: var(--senal); }
.cab__fin { margin-left: auto; display: flex; align-items: center; gap: var(--e-2); min-width: 0; }
.cab .busca { display: none; }
@media (min-width: 900px) { .nav { display: flex; } .cab .busca { display: flex; width: 280px; } }

/* Barra inferior (móvil): Previsión, Mapas, Ahora, Buscar */
.barra-inf { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--barra-inf-alto) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); } /* la barra de inicio del iPhone va DEBAJO de los 60 px, no dentro */
.barra-inf__a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--t-1); font-weight: 500; color: var(--muted); text-decoration: none; border-top: 2px solid transparent; margin-top: -1px; }
.barra-inf__a[aria-current] { color: var(--ink); border-top-color: var(--senal); }
.barra-inf--demo { position: static; } /* barra dentro de un contenedor, no fija a la ventana */
@media (min-width: 900px) { .barra-inf:not(.barra-inf--demo) { display: none; } }

/* Migas */
.migas { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--t-1); color: var(--muted); }
.migas a { text-decoration: none; } .migas a:hover { text-decoration: underline; }
.migas li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }

/* ---------- 5. BUSCADOR ---------- */
.busca { position: relative; display: flex; align-items: center; height: var(--control); background: var(--sunk); border: 1px solid transparent; border-radius: var(--r-2); padding: 0 12px; gap: 8px; color: var(--muted); min-width: 0; }
.busca:focus-within { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.busca input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; color: var(--ink); }
.busca input::placeholder { color: var(--muted); }
.busca kbd { font: 500 var(--t-1) var(--f-texto); color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--r-1); padding: 0 5px; }
.busca--grande { height: 56px; font-size: var(--t-3); background: var(--surface); border: 1.5px solid var(--ink); padding: 0 16px; box-shadow: var(--s-1); }
.busca--mapa { background: var(--surface); box-shadow: var(--s-mapa); }
.busca__res { position: absolute; inset: calc(100% + 4px) -1px auto -1px; z-index: 30; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--s-2); padding: 4px; color: var(--ink); font-size: var(--t-2); }
.busca__res--estatico { position: static; margin-top: 4px; }
.busca__it { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-2); text-decoration: none; }
.busca__it:hover, .busca__it[aria-selected="true"] { background: var(--senal-suave); }
.busca__it b { font-weight: 600; } .busca__it mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--senal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.busca__it small { display: block; font-size: var(--t-1); color: var(--muted); }
.busca__grupo { padding: 8px 10px 2px; }

/* ---------- 6. BOTONES, CHIPS, CONMUTADORES, PESTAÑAS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control); padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--pri { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn--pri:hover { background: var(--ink-2); }
.btn--plano { border-color: transparent; background: none; } .btn--plano:hover { background: var(--sunk); border-color: transparent; }
.btn--s { height: 32px; padding: 0 10px; font-size: var(--t-1); }
.btn--icono { width: var(--control); padding: 0; } .btn--icono.btn--s { width: 32px; }
.btn--mapa { box-shadow: var(--s-mapa); border-color: transparent; }
.btn[aria-pressed="true"] { background: var(--senal-suave); border-color: var(--senal); color: var(--senal-tinta); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.enlace { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--senal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); font-size: var(--t-1); font-weight: 500; color: var(--ink-2); white-space: nowrap; text-decoration: none; }
button.chip:hover, a.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip--activo { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip--dato { border-color: transparent; background: var(--sunk); }         /* etiqueta informativa, no pulsable */
.chip__pt { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.chip--obs::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }               /* medido: macizo */
.chip--prev::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }       /* previsto: hueco */

.seg { display: inline-flex; padding: 3px; background: var(--sunk); border-radius: var(--r-2); gap: 2px; max-width: 100%; }
.seg__op { height: calc(var(--control) - 8px); padding: 0 12px; border: 0; border-radius: var(--r-1); background: none; font-weight: 500; font-size: var(--t-1); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg__op[aria-pressed="true"], .seg__op[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--s-1); }
.seg--mapa { background: var(--surface); box-shadow: var(--s-mapa); }
.seg--mapa .seg__op[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }

.pest { display: flex; gap: var(--e-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pest::-webkit-scrollbar { display: none; }
.pest__it { position: relative; height: 44px; padding: 0 12px; border: 0; background: none; font-weight: 500; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.pest__it:hover { color: var(--ink); }
.pest__it[aria-selected="true"], .pest__it[aria-current] { color: var(--ink); font-weight: 600; }
.pest__it[aria-selected="true"]::after, .pest__it[aria-current]::after { content: ""; position: absolute; inset: auto 8px -1px 8px; height: 2px; background: var(--senal); }
.pest__n { font-size: var(--t-1); color: var(--muted); font-weight: 500; }

.campo { height: var(--control); padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); }
select.campo { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-size: 5px 5px; background-position: right 14px center, right 9px center; background-repeat: no-repeat; }
.campo--s { height: 32px; font-size: var(--t-1); }

/* ---------- 7. TARJETAS Y PIEZAS DE DATO ---------- */
.tarj { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--e-4); min-width: 0; }
.tarj--plana { border: 0; background: none; padding: 0; border-radius: 0; }
.tarj--hundida { background: var(--sunk); border-color: transparent; }
.tarj--flota { box-shadow: var(--s-2); border-color: transparent; }
.tarj__cab { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-3); margin-bottom: var(--e-3); }
.tarj__pie { margin-top: var(--e-3); padding-top: var(--e-3); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .tarj { padding: var(--e-5); } .tarj--densa { padding: var(--e-4); } }

/* Dato actual: cifra + lecturas + procedencia */
.dato { display: grid; gap: var(--e-3); }
.dato__ppal { display: flex; align-items: flex-end; gap: var(--e-4); flex-wrap: wrap; }
.dato__lect { display: grid; grid-template-columns: repeat(3, auto); gap: 2px var(--e-5); }
.lect { display: flex; flex-direction: column; } /* lectura: rótulo + valor */
.lect__v { font-weight: 600; font-size: var(--t-3); } .lect__v small { font-weight: 400; font-size: var(--t-1); color: var(--muted); }

/* Procedencia: toda cifra dice de dónde viene */
.proc { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: var(--t-1); color: var(--muted); }
.proc > * + *::before { content: "·"; margin-right: 8px; color: var(--line-2); }
.proc__pt { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; } /* dato fresco */
.proc__pt--viejo { background: var(--av-naranja); } .proc__pt + *::before { content: none; }
.proc--mapa { background: var(--surface); padding: 4px 10px; border-radius: var(--r-2); box-shadow: var(--s-mapa); color: var(--ink-2); }

/* Confianza: tres segmentos; la forma lleva el dato, no el color */
.conf { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-1); color: var(--muted); white-space: nowrap; }
.conf__b { display: inline-flex; gap: 2px; align-items: flex-end; }
.conf__b i { width: 5px; background: var(--line-2); border-radius: 1px; }
.conf__b i:nth-child(1) { height: 6px; } .conf__b i:nth-child(2) { height: 9px; } .conf__b i:nth-child(3) { height: 12px; }
.conf--baja .conf__b i:nth-child(1), .conf--media .conf__b i:nth-child(-n+2), .conf--alta .conf__b i { background: var(--ink); }

/* Aviso */
.aviso { display: grid; grid-template-columns: 6px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); overflow: hidden; }
.aviso::before { content: ""; background: var(--c); }
.aviso__in { padding: 10px 12px; display: grid; gap: 2px; }
.aviso__niv { font-size: var(--t-1); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ct); }
.aviso--amarillo { --c: var(--av-amarillo); --ct: var(--av-amarillo-t); }
.aviso--naranja { --c: var(--av-naranja); --ct: var(--av-naranja-t); }
.aviso--rojo { --c: var(--av-rojo); --ct: var(--av-rojo-t); }
.aviso--info { --c: var(--ink); --ct: var(--ink-2); }

/* Tira de 7 días: selector */
.dias { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); gap: 0; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); }
.dias::-webkit-scrollbar { display: none; }
.dia { display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; border: 0; background: none; border-left: 1px solid var(--line); position: relative; text-align: center; min-width: 0; }
.dia:first-child { border-left: 0; }
.dia__n { font-size: var(--t-1); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dia__t { font-size: var(--t-3); line-height: 1.1; white-space: nowrap; }
.dia__ll { font-size: var(--t-1); color: var(--ink-2); min-height: 1.5em; white-space: nowrap; }
.dia:hover { background: var(--raised); }
.dia[aria-pressed="true"] { background: var(--senal-suave); }
.dia[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--senal); }
.dia[aria-pressed="true"] .dia__n { color: var(--senal-tinta); }

/* Cinta de 24 h troceada por fenómeno */
.cinta { display: grid; gap: 4px; }
.cinta__tramos { display: flex; height: 36px; border-radius: var(--r-2); overflow: hidden; position: relative; background: var(--sunk); }
.cinta__tr { flex: var(--h, 1) 0 0; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: var(--t-1); font-weight: 500; white-space: nowrap; overflow: hidden; border-left: 1px solid var(--surface); color: var(--ink); min-width: 0; }
.cinta__tr:first-child { border-left: 0; }
.cinta__tr--despejado { background: #ffe9a3; color: #3d3000; } .cinta__tr--despejado-n { background: #2b3a5c; color: #e6ecf7; }
.cinta__tr--nubes-altas { background: #e9eef3; color: #26303b; } .cinta__tr--nuboso { background: #c3ccd5; color: #1a222b; } .cinta__tr--cubierto { background: #98a4b0; color: #0f151b; }
.cinta__tr--lluvia { background: #46afec; color: #04233b; } .cinta__tr--lluvia-f { background: #3663db; color: #fff; }
.cinta__tr--nieve { background: #deb6f0; color: #33124a; } .cinta__tr--tormenta { background: #511ab0; color: #fff; } .cinta__tr--niebla { background: repeating-linear-gradient(0deg, #d3dae1 0 3px, #eef2f5 3px 6px); color: #26303b; }
.cinta__tr--helada { box-shadow: inset 0 -4px 0 #3aa6cb; }
.cinta__horas { display: flex; justify-content: space-between; font-size: var(--t-1); color: var(--muted); }
.cinta__ahora { position: absolute; top: -3px; bottom: -3px; left: var(--x, 0%); width: 2px; background: var(--senal); z-index: 2; }

/* Ficha de modelo (selector del visor) */
.modelo { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; width: 100%; padding: 8px 10px 8px 0; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); text-align: left; overflow: hidden; }
.modelo::before { content: ""; align-self: stretch; margin-block: -8px; background: var(--c, var(--muted)); grid-row: 1 / span 2; }
.modelo__n { font-weight: 600; } .modelo__d { grid-column: 2; font-size: var(--t-1); color: var(--muted); }
.modelo__p { grid-column: 3; grid-row: 1 / span 2; font-size: var(--t-1); color: var(--muted); text-align: right; }
.modelo:hover { border-color: var(--ink); }
.modelo[aria-pressed="true"] { border-color: var(--senal); background: var(--senal-suave); box-shadow: inset 0 0 0 1px var(--senal); }
.modelo[disabled] { opacity: .55; }
/* color y trazo fijos por modelo (para .modelo, .chip__pt, leyendas y gráficos) */
.mod-arome { --c: var(--m-mf); --trazo: none; } .mod-arpege { --c: var(--m-mf2); --trazo: 6 3; }
.mod-iconeu { --c: var(--m-dwd); --trazo: none; } .mod-icon { --c: var(--m-dwd2); --trazo: 6 3; }
.mod-ifs { --c: var(--m-ec); --trazo: none; } .mod-aifs { --c: var(--m-ec2); --trazo: 6 3; }
.mod-ifs9 { --c: var(--m-ec3); --trazo: none; } /* después de .mod-ifs: el catálogo le da también «mod-ifs» */
.mod-gfs { --c: var(--m-gfs); --trazo: none; } .mod-gem { --c: var(--m-gem); --trazo: none; }
.mod-ukmo { --c: var(--m-ukmo); --trazo: 2 3; } .mod-media { --c: var(--m-media); --trazo: 8 4; }
.mod-muestra { display: inline-block; width: 22px; height: 0; border-top: 2.5px solid var(--c); vertical-align: middle; } /* muestra de trazo */
.mod-arpege .mod-muestra, .mod-icon .mod-muestra, .mod-aifs .mod-muestra, .mod-media .mod-muestra, .mod-muestra.mod-arpege, .mod-muestra.mod-icon, .mod-muestra.mod-aifs, .mod-muestra.mod-media { border-top-style: dashed; }
.mod-ukmo .mod-muestra, .mod-muestra.mod-ukmo { border-top-style: dotted; }

/* ---------- 8. TABLAS DENSAS ---------- */
.tabla-caja { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); scrollbar-width: thin; }
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-1); font-variant-numeric: tabular-nums; }
.tabla th, .tabla td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tabla tr:last-child > * { border-bottom: 0; }
.tabla thead th { position: sticky; top: 0; background: var(--raised); font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; z-index: 1; }
.tabla th:first-child, .tabla td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 2; border-right: 1px solid var(--line); }
.tabla thead th:first-child { background: var(--raised); z-index: 3; }
.tabla tbody th { font-weight: 500; color: var(--ink-2); }
.tabla tbody tr:hover > * { background: var(--raised); }
.tabla .ud { color: var(--muted); font-weight: 400; }
.tabla--comoda th, .tabla--comoda td { padding: 11px 12px; font-size: var(--t-2); }
/* Mapa de calor horario: filas = variables, columnas = horas. ETN.calor() pinta td[data-v] */
.tabla--calor td { padding: 0; height: 30px; min-width: 38px; text-align: center; border-bottom: 2px solid var(--surface); border-left: 0; font-weight: 500; }
.tabla--calor thead th { text-align: center; padding: 4px 0; min-width: 38px; text-transform: none; letter-spacing: 0; }
.tabla--calor thead th:first-child { padding: 4px 10px; text-align: left; }
.tabla--calor .noche { background: var(--noche); }
.tabla--calor th.dia-ini, .tabla--calor td.dia-ini { border-left: 1px solid var(--ink); }
.tabla--calor td.ahora, .tabla--calor th.ahora { box-shadow: inset 2px 0 0 var(--senal); }
.tabla--calor tbody tr:hover > td { background: unset; }

/* ---------- 9. GRÁFICOS (SVG) ---------- */
.graf { width: 100%; height: auto; overflow: visible; font: 400 13px var(--f-texto); font-variant-numeric: tabular-nums; }
.g-rejilla { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.g-eje { stroke: var(--ink); stroke-width: 1; shape-rendering: crispEdges; }
.g-tick { fill: var(--muted); font-size: 13px; }
.g-dia { fill: var(--ink-2); font-size: 13px; font-weight: 600; }
.g-noche { fill: var(--noche); }
.g-linea { fill: none; stroke: var(--c, var(--ink)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: var(--trazo, none); }
.g-linea--fina { stroke-width: 1.25; } .g-linea--media { stroke-width: 2.5; }
.g-banda { fill: var(--c, var(--ink)); opacity: .14; stroke: none; }
.g-barra { fill: #318be6; } .g-barra--prob { fill: none; stroke: #318be6; stroke-width: 1; } /* lluvia: paleta precip a 5 mm */
.g-obs { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }               /* medido: punto macizo */
.g-prev { fill: var(--surface); stroke: var(--c, var(--ink)); stroke-width: 1.5; }     /* previsto: punto hueco */
.g-ahora { stroke: var(--senal); stroke-width: 1.5; }
.g-cero { stroke: #3aa6cb; stroke-width: 1; stroke-dasharray: 3 3; }                   /* 0 °C */
.g-rot { fill: var(--ink); font-size: 13px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }

/* ---------- 10. MAPA: contenedor, paneles, leyenda, línea temporal, capas, sonda ---------- */
.mapa { position: relative; overflow: hidden; background: var(--mar); border-radius: var(--r-3); min-height: 240px; isolation: isolate; }
.mapa--pantalla { border-radius: 0; height: 100%; }         /* visor a pantalla completa */
.mapa__lienzo { position: absolute; inset: 0; }             /* aquí dibuja el motor del visor (MapLibre o la vista propia) */
.mapa__lienzo canvas { width: 100%; height: 100%; }
.mapa__z { position: absolute; z-index: 5; display: flex; gap: var(--e-2); pointer-events: none; } /* zona de anclaje para paneles */
.mapa__z > * { pointer-events: auto; }
.mapa__z--ai { top: 12px; left: 12px; } .mapa__z--ad { top: 12px; right: 12px; } .mapa__z--bi { bottom: 12px; left: 12px; } .mapa__z--bd { bottom: 12px; right: 12px; }
.mapa__z--b { bottom: 12px; left: 12px; right: 12px; } .mapa__z--a { top: 12px; left: 12px; right: 12px; }
.mapa__z--col { flex-direction: column; align-items: flex-start; } .mapa__z--ad.mapa__z--col, .mapa__z--bd.mapa__z--col { align-items: flex-end; }
.mapa__inserto { position: absolute; z-index: 4; width: 132px; height: 84px; border: 1px solid var(--ink); border-radius: var(--r-2); overflow: hidden; background: var(--mar); box-shadow: var(--s-mapa); } /* Canarias */
.mapa__inserto span { position: absolute; left: 6px; top: 3px; z-index: 2; font-size: var(--t-1); font-weight: 600; }
.panel { background: var(--surface); border-radius: var(--r-3); box-shadow: var(--s-mapa); min-width: 0; } /* panel flotante */
.panel__cab { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.panel__cuerpo { padding: 8px; }
.zoom { display: grid; background: var(--surface); border-radius: var(--r-2); box-shadow: var(--s-mapa); overflow: hidden; }
.zoom .btn { border: 0; border-radius: 0; } .zoom .btn + .btn { border-top: 1px solid var(--line); }

/* Valor impreso sobre el mapa (rejilla de valores en móvil) y marcador de punto */
.mapa__valor { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: grid; justify-items: center; line-height: 1; pointer-events: none; }
.mapa__valor b { font-family: var(--f-titular); font-variation-settings: "wdth" 80; font-size: var(--t-4); font-weight: 700; color: var(--ink); text-shadow: 0 0 2px var(--mapa-halo), 0 0 2px var(--mapa-halo), 0 0 4px var(--mapa-halo), 0 0 6px var(--mapa-halo); }
.mapa__valor span { font-size: var(--t-1); font-weight: 500; color: var(--ink-2); text-shadow: 0 0 2px var(--mapa-halo), 0 0 3px var(--mapa-halo), 0 0 4px var(--mapa-halo); }
.mapa__punto { position: absolute; z-index: 6; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid var(--senal); border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px var(--mapa-halo); pointer-events: none; }
.mapa__punto::before, .mapa__punto::after { content: ""; position: absolute; background: var(--senal); }
.mapa__punto::before { left: 50%; top: -8px; bottom: -8px; width: 1.5px; margin-left: -.75px; clip-path: polygon(0 0, 100% 0, 100% 26%, 0 26%, 0 74%, 100% 74%, 100% 100%, 0 100%); }
.mapa__punto::after { top: 50%; left: -8px; right: -8px; height: 1.5px; margin-top: -.75px; clip-path: polygon(0 0, 26% 0, 26% 100%, 0 100%, 0 0, 74% 0, 100% 0, 100% 100%, 74% 100%, 74% 0); }
.mapa__est { position: absolute; z-index: 3; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--c, var(--ink)); border: 1.5px solid var(--mapa-halo); } /* estación: medido, macizo */

/* Sonda: valor bajo el cursor */
.sonda { position: absolute; z-index: 7; transform: translate(14px, -50%); background: var(--ink); color: var(--on-ink); border-radius: var(--r-2); padding: 6px 10px; font-size: var(--t-1); white-space: nowrap; box-shadow: var(--s-mapa); display: flex; gap: 10px; align-items: baseline; pointer-events: none; }
.sonda b { font-size: var(--t-2); font-weight: 600; } .sonda span + span::before { content: "·"; margin-right: 10px; opacity: .5; }
.sonda--estatica { position: static; transform: none; display: inline-flex; flex-wrap: wrap; white-space: normal; gap: 2px 10px; }

/* Leyenda de paleta: regla graduada. ETN.leyenda() la rellena; también vale a mano. */
.ley { display: grid; gap: 3px; min-width: 0; font-size: var(--t-1); }
.ley__cab { display: flex; justify-content: space-between; gap: var(--e-3); align-items: baseline; }
.ley__tit { font-weight: 600; } .ley__ud { color: var(--muted); }
.ley__barra { display: flex; height: 12px; border-radius: var(--r-1); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15, 27, 43, .18); background-color: var(--surface); }
.ley__barra i { flex: 1 0 0; }                              /* tramos */
.ley__marcas { display: flex; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ley__marcas span { flex: 1 0 0; text-align: left; position: relative; padding-top: 5px; line-height: 1.1; white-space: nowrap; }
.ley__marcas span::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 1px; background: var(--ink-2); }
.ley__marcas span { transform: translateX(0); }
.ley--cont .ley__marcas { justify-content: space-between; } .ley--cont .ley__marcas span { flex: none; }
.ley--mapa { background: var(--surface); padding: 8px 10px; border-radius: var(--r-2); box-shadow: var(--s-mapa); }
.ley--palabras .ley__marcas span::before { content: none; } .ley--palabras .ley__marcas span { text-align: center; padding-top: 2px; font-weight: 500; }
.pal-temp { background: var(--pal-temp); } .pal-precip { background: var(--pal-precip); } .pal-viento { background: var(--pal-viento); }
.pal-nieve { background: var(--pal-nieve); } .pal-presion { background: var(--pal-presion); } .pal-nubes { background: var(--pal-nubes); }

/* Línea temporal del mapa: una regla con aguja */
.linea-t { --dias: 7; --x: 0%; --ahora: 0%; --carga: 0%; background: var(--surface); border-radius: var(--r-3); box-shadow: var(--s-mapa); padding: 8px 12px 10px; display: grid; gap: 6px; min-width: 0; width: 100%; }
.linea-t__ctl { display: flex; align-items: center; gap: var(--e-2); min-width: 0; }
.linea-t__hora { font-family: var(--f-titular); font-variation-settings: "wdth" 84; font-weight: 700; font-size: var(--t-4); line-height: 1; white-space: nowrap; }
.linea-t__hora small { font: 500 var(--t-1) var(--f-texto); color: var(--muted); margin-left: 6px; }
.linea-t__fin { margin-left: auto; display: flex; align-items: center; gap: var(--e-2); }
.linea-t__pista { position: relative; height: 44px; cursor: pointer; touch-action: none; }
.linea-t__dias { position: absolute; inset: 0 0 auto 0; display: grid; grid-template-columns: repeat(var(--dias), 1fr); font-size: var(--t-1); color: var(--muted); font-weight: 500; }
.linea-t__dias span { padding-left: 5px; white-space: nowrap; overflow: hidden; }
.linea-t__dias span[aria-current] { color: var(--ink); font-weight: 600; }
.linea-t__regla { position: absolute; inset: auto 0 0 0; height: 22px; background-color: var(--sunk); border-radius: var(--r-1);
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px calc(100% / var(--dias))),
    repeating-linear-gradient(90deg, var(--faint) 0 1px, transparent 1px calc(100% / var(--dias) / 8));
  background-size: 100% 100%, 100% 7px; background-position: 0 0, 0 100%; background-repeat: no-repeat; }
.linea-t__carga { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--carga); background: var(--ink-2); border-radius: 0 0 0 var(--r-1); } /* fotogramas precargados */
.linea-t__pasado { position: absolute; left: 0; bottom: 3px; height: 19px; width: var(--ahora); background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line-2) 3px 4px); } /* ya ocurrido / medido */
.linea-t__ahora { position: absolute; left: var(--ahora); bottom: 0; height: 22px; border-left: 1px dashed var(--ink); }
.linea-t__ahora::after { content: "ahora"; position: absolute; left: 4px; top: 0; font-size: var(--t-1); line-height: 1; background: var(--sunk); padding: 0 2px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.linea-t__aguja { position: absolute; left: var(--x); bottom: -2px; top: 16px; width: 2px; margin-left: -1px; background: var(--senal); z-index: 2; }
.linea-t__aguja::before { content: ""; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px; background: var(--senal); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.linea-t--compacta { padding: 6px 10px 8px; } .linea-t--compacta .linea-t__pista { height: 36px; } .linea-t--compacta .linea-t__ahora::after { content: none; }
.linea-t__dias span { text-overflow: ellipsis; }
.linea-t--tramos .linea-t__regla { background-image: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px calc(100% / var(--dias))); background-size: 100% 100%; } /* agrometea: noches, sin horas */
.linea-t__estado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; height: 6px; } /* rejilla de horas: cargado / sin cargar / no disponible */
.linea-t__estado i { background: var(--line-2); } .linea-t__estado i.ok { background: var(--ink-2); } .linea-t__estado i.no { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 4px); }

/* Fila deslizable de días u horas (móvil) */
.carril { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-snap-type: x proximity; }
.carril::-webkit-scrollbar { display: none; }
.carril__it { flex: none; scroll-snap-align: center; min-width: 52px; height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); font-weight: 500; font-size: var(--t-1); display: grid; place-items: center; line-height: 1.1; }
.carril__it b { font-size: var(--t-2); font-weight: 600; }
.carril__it[aria-pressed="true"] { background: var(--senal); border-color: var(--senal); color: var(--on-senal); }

/* Panel de capas */
.capas { display: grid; gap: 2px; }
.capas__grupo { padding: 10px 10px 4px; }
.capa { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: var(--control); padding: 6px 10px; border: 0; border-radius: var(--r-2); background: none; text-align: left; }
.capa:hover { background: var(--sunk); }
.capa__n { font-weight: 500; } .capa__d { display: block; font-size: var(--t-1); color: var(--muted); font-weight: 400; }
.capa__m { width: 36px; height: 8px; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(15, 27, 43, .18); } /* muestra de la paleta */
.capa[aria-pressed="true"] { background: var(--senal-suave); color: var(--senal-tinta); box-shadow: inset 2px 0 0 var(--senal); }
.capa[aria-pressed="true"] .capa__d { color: inherit; opacity: .8; }
.capa--obs .capa__m { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: none; justify-self: end; }
.capas--rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }   /* hoja de capas en móvil */
.capas--rejilla .capa { grid-template-columns: 24px minmax(0, 1fr); border: 1px solid var(--line); min-height: 56px; }
.capas--rejilla .capa__m { display: none; }
.capas--rejilla .capas__grupo { grid-column: 1 / -1; padding: 4px 2px 0; }

/* Interruptor */
.interr { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-1); cursor: pointer; }
.interr input { appearance: none; width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; margin: 0; transition: background .15s; cursor: pointer; }
.interr input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.interr input:checked { background: var(--ink); } .interr input:checked::after { transform: translateX(14px); }

/* Hoja inferior (móvil) */
.hoja { background: var(--surface); border-radius: var(--r-hoja) var(--r-hoja) 0 0; box-shadow: 0 -2px 20px -4px rgba(15, 27, 43, .3); padding: 8px var(--margen) var(--e-4); display: grid; gap: var(--e-3); }
.hoja::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); justify-self: center; }
.hoja--fija { position: absolute; inset: auto 0 0 0; z-index: 20; }

/* ---------- 11. AGROMETEA: decisión y franja semáforo ---------- */
.decision { display: grid; gap: var(--e-3); }
.decision__cab { display: flex; align-items: center; gap: 10px; }
.decision__vered { font-size: var(--t-4); font-weight: 600; line-height: 1.25; text-wrap: balance; font-family: var(--f-titular); }
.estado { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-pill); font-size: var(--t-1); font-weight: 600; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); white-space: nowrap; }
.estado::before { content: ""; width: 10px; height: 10px; background: var(--c); border-radius: 50%; }
.estado--si { --c: var(--sem-si); } .estado--ojo { --c: var(--sem-ojo); } .estado--ojo::before { border-radius: 1px; transform: rotate(45deg) scale(.85); } .estado--no { --c: var(--sem-no); } .estado--no::before { border-radius: 1px; }
/* Franja: una celda por hora o por día. Color + ALTURA (apto alto, dudoso medio, no apto bajo). */
.franja { display: grid; gap: 4px; }
.franja__c { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; height: 28px; align-items: end; border-bottom: 1px solid var(--ink); }
.franja__c i { border-radius: 1px 1px 0 0; }
.franja__c .si { height: 100%; background: var(--sem-si); } .franja__c .ojo { height: 62%; background: var(--sem-ojo); } .franja__c .no { height: 28%; background: var(--sem-no); }
.franja__c .nd { height: 100%; background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 5px); }
.franja__c .sel { outline: 2px solid var(--senal); outline-offset: 1px; }
.franja__e { display: flex; justify-content: space-between; font-size: var(--t-1); color: var(--muted); }
.pregunta { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 12px; align-items: center; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); text-align: left; }
.pregunta .ico { grid-row: 1 / span 2; width: 28px; height: 28px; }
.pregunta b { font-size: var(--t-3); font-weight: 600; } .pregunta span { grid-column: 2; color: var(--muted); font-size: var(--t-1); }
.pregunta[aria-pressed="true"] { border-color: var(--senal); background: var(--senal-suave); box-shadow: inset 0 0 0 1px var(--senal); }

/* ---------- 12. PIE ---------- */
.pie { border-top: 1px solid var(--ink); margin-top: var(--e-8); padding-block: var(--e-6) calc(var(--e-6) + var(--barra-inf-alto) + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: var(--t-1); }
@media (min-width: 900px) { .pie { padding-bottom: var(--e-6); } }

/* ---------- 13. VISOR A PANTALLA COMPLETA ---------- */
.visor { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr); background: var(--mar); }
.visor__col { display: flex; flex-direction: column; gap: var(--e-2); width: 232px; max-height: 100%; }
.visor__col .panel { overflow: auto; scrollbar-width: thin; }

/* ---------- 14. PÁGINAS DE CONTENIDO (diseño nuevo, templates/diseno/) ----------
   Añadido sin tocar lo anterior: el visor no usa ninguna de estas clases. */
.d2 { min-height: 100vh; }
.d2-main { padding-block: var(--e-4) 0; }
@media (min-width: 900px) { .d2-main { padding-top: var(--e-5); } }
.d2-salto { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: var(--r-2); }
.d2-salto:focus { left: 8px; }

/* Cabecera: «Más» como botón con el mismo aspecto que las entradas */
button.nav__a { border-inline: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; gap: 4px; }
.nav__a[aria-expanded="true"] { color: var(--ink); background: var(--raised); }
.d2-busca { position: relative; }
.d2-lupa { display: inline-flex; }
@media (min-width: 900px) { .d2-lupa { display: none; } }
.d2-busca-movil { padding-block: 0 var(--e-2); }
.d2-busca-movil .busca { display: flex; width: 100%; }
@media (min-width: 900px) { .d2-busca-movil { display: none !important; } }
.d2-cuenta { position: relative; }
.d2-cuenta__n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--senal); color: var(--on-senal); font-size: 11px; line-height: 16px; text-align: center; font-weight: 600; }

/* Resultados del buscador global (public/js/buscador.js pinta etn-bus-*) */
.etn-bus-panel { position: absolute; inset: calc(100% + 6px) 0 auto auto; z-index: 45; width: 420px; max-width: calc(100vw - 2 * var(--margen)); max-height: min(70vh, 560px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--s-2); padding: 4px; color: var(--ink); font-size: var(--t-2); }
.etn-bus-panel--movil { inset: calc(100% + 6px) 0 auto 0; width: auto; max-width: none; }
.etn-bus-panel.hidden { display: none; }
.etn-bus-sec { padding: 8px 10px 2px; font-size: var(--t-1); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.etn-bus-it { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-2); text-decoration: none; color: inherit; }
.etn-bus-it:hover, .etn-bus-it.etn-bus-sel { background: var(--senal-suave); }
.etn-bus-ico { font-family: "Material Symbols Outlined"; font-size: 20px; line-height: 1; color: var(--muted); font-weight: normal; font-style: normal; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; overflow: hidden; width: 24px; }
.etn-bus-t b { font-weight: 600; display: block; } .etn-bus-t small { display: block; font-size: var(--t-1); color: var(--muted); }
.etn-bus-t mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--senal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.etn-bus-pais { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: var(--t-1); }
.etn-bus-dato { text-align: right; font-size: var(--t-1); } .etn-bus-dato b { display: block; font-size: var(--t-2); }
.etn-bus-dato small { color: var(--muted); }
.etn-bus-vacio, .etn-bus-pie { padding: 10px; font-size: var(--t-1); color: var(--muted); }
.etn-bus-pie { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
@font-face { font-family: "Material Symbols Outlined"; font-style: normal; font-weight: 400; font-display: block; src: url("/fonts/material-symbols-subset.woff2?v=20261025d") format("woff2"); }

/* Menú «Más»: desplegable ancho en escritorio, hoja sobre la barra inferior en móvil */
.d2-velo { position: fixed; inset: 0; z-index: 55; background: rgba(8, 13, 20, .42); }
.d2-mas { position: fixed; z-index: 60; inset: auto 0 calc(var(--barra-inf-alto) + env(safe-area-inset-bottom, 0px)) 0; background: var(--surface); border-radius: var(--r-hoja) var(--r-hoja) 0 0; box-shadow: var(--s-2); padding: 8px var(--margen) var(--e-3); max-height: 78vh; overflow: auto; }
.d2-mas::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 4px; }
.d2-mas__cab { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0 10px; }
.d2-mas__grupos { display: grid; gap: var(--e-2); }
.d2-mas a.capa, .d2-mas summary.capa { text-decoration: none; color: inherit; min-height: 44px; cursor: pointer; list-style: none; }
.d2-mas summary.capa::-webkit-details-marker { display: none; }
.d2-mas__paises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; padding: 4px 10px 8px 44px; font-size: var(--t-1); }
@media (min-width: 900px) {
  .d2-velo { background: none; }
  .d2-mas { inset: calc(var(--cab-alto) + 4px) var(--margen) auto auto; width: min(1040px, calc(100vw - 2 * var(--margen))); border: 1px solid var(--line-2); border-radius: var(--r-3); padding: var(--e-2); max-height: calc(100vh - var(--cab-alto) - 24px); }
  .d2-mas::before { display: none; }
  .d2-mas__grupos { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
}
.barra-inf button.barra-inf__a { border-inline: 0; border-bottom: 0; background: none; font: inherit; font-size: var(--t-1); font-weight: 500; cursor: pointer; }

/* Boletín y pie */
.d2-boletin { margin-top: var(--e-8); border-top: 1px solid var(--line); background: var(--raised); }
.d2-boletin__in { display: grid; gap: var(--e-4); padding-block: var(--e-6); align-items: center; }
.d2-boletin .campo { flex: 1 1 auto; min-width: 0; }
.d2-boletin [data-ok="1"] { color: var(--ok); } .d2-boletin [data-ok="0"] { color: var(--av-rojo-t); }
@media (min-width: 900px) { .d2-boletin__in { grid-template-columns: 1fr 1fr; } }
.d2-boletin + .pie { margin-top: 0; }
.d2-pie { display: grid; gap: var(--e-5); grid-template-columns: minmax(0, 1fr); }
.d2-pie__marca p { max-width: 64ch; }
.d2-pie__l { display: grid; gap: 4px; }
.d2-pie__l a, .d2-pie__marca a:not(.logo) { color: var(--ink-2); }
/* Enlaces del pie con 44 px de alto en pantallas táctiles (zona de toque cómoda) */
@media (pointer: coarse) { .d2-pie__l { gap: 0; } .d2-pie__l a, .d2-pie a[data-privacidad] { display: inline-flex; align-items: center; min-height: 44px; } }
.d2-pie__copy { margin-top: var(--e-5); padding-top: var(--e-3); border-top: 1px solid var(--line); }
@media (min-width: 700px) { .d2-pie { grid-template-columns: repeat(3, minmax(0, 1fr)); } .d2-pie__marca { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .d2-pie { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } .d2-pie__marca { grid-column: auto; } }

/* Anuncios (App\Publicidad): el hueco con el tono del sistema */
.d2 .etn-anuncio { border-color: var(--line); }
.d2 .etn-anuncio-eti { font: 600 var(--t-1) var(--f-texto); letter-spacing: .07em; color: var(--muted); }

/* Tabla de mapa de calor pintada en el servidor */
.tabla--calor td.f-nd { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line) 3px 4px); }

/* ---------- 15. GRÁFICOS DE SERVIDOR (App\Grafico, copia de worldfires) ---------- */
.g-ud { fill: var(--muted); font-size: 13px; }
.g-rot-tira { fill: var(--muted); font: 600 13px var(--f-texto); letter-spacing: .06em; }
.g-gris { --c: var(--line-2); } .g-acento { --c: var(--senal); } .g-tinta { --c: var(--ink); } .g-senal { --c: var(--senal); } .g-tmin { --c: var(--muted); }
.g-barra-wf { fill: var(--c, var(--line-2)); }
.g-pt { fill: var(--c, var(--ink)); stroke: var(--surface); stroke-width: 1.5; }
.g-pt-hueco { fill: var(--surface); stroke: var(--c, var(--ink)); stroke-width: 1.5; }
.g-pt-c { fill: var(--line-2); opacity: .75; } .g-pt-cit { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; } .g-pt-sel { fill: var(--senal); stroke: var(--surface); stroke-width: 2; }
.g-pt-nota { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.g-anot { fill: var(--ink); font: 600 13px var(--f-texto); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.g-anot--sub { font-weight: 400; fill: var(--muted); }
.g-anot-l { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.g-umbral { stroke: #3aa6cb; stroke-width: 1; stroke-dasharray: 3 3; }
.g-ruptura { stroke: var(--line-2); stroke-width: 1.25; stroke-dasharray: 3 3; }
.g-raya { stroke: var(--line-2); stroke-width: 1.5; } .g-raya-fondo { fill: var(--sunk); }
.g-hoy { fill: var(--senal-suave); }
.g-cifra { font: 600 13px var(--f-texto); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.g-cifra--max { fill: var(--ink); } .g-cifra--min { fill: var(--muted); font-weight: 500; }
.g-bigote { stroke: var(--ink); stroke-width: 1.3; fill: none; }
.g-banda-max { --c: var(--ink); } .g-banda-min { --c: var(--muted); }
.g-normal { --c: var(--ink); opacity: .1; }
.g-prev-rango { stroke: var(--ink); stroke-width: 8; stroke-linecap: round; fill: none; opacity: .85; }
.g-prev-barra { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.g-lluvia { --c: #318be6; }
.g-barra-wf.p-ll-1 { fill: #9fe1f1; } .g-barra-wf.p-ll-2 { fill: #70ccee; } .g-barra-wf.p-ll-3 { fill: #46afec; } .g-barra-wf.p-ll-4 { fill: #318be6; }
.g-barra-wf.p-ll-5 { fill: #3663db; } .g-barra-wf.p-ll-6 { fill: #483dcc; } .g-barra-wf.p-ll-7 { fill: #511ab0; }
.g-barra-wf[class*="p-ll-"] { stroke: var(--muted); stroke-width: .75; }
.graf-caja { container-type: inline-size; min-width: 0; }
.graf-m { display: block; } .graf-d { display: none; }
@container (min-width: 520px) { .graf-m { display: none; } .graf-d { display: block; } }
.graf-fig { display: grid; gap: var(--e-3); min-width: 0; }
.graf-fig__cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--e-2) var(--e-4); }
.graf-fig__cab > :first-child { flex: 1 1 260px; min-width: 0; }
.js .graf-fig__tabla { display: none; }
.js .graf-fig[data-vista="tabla"] .graf-fig__tabla { display: block; }
.js .graf-fig[data-vista="tabla"] .graf-fig__graf, .js .graf-fig[data-vista="tabla"] .graf-fig__extra { display: none; }
html:not(.js) .graf-fig__ctl { display: none; }

/* AEMET en las comparativas de modelos (predicción oficial: cian, trazo continuo fino) */
:root { --m-aemet: #0e7490; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m-aemet: #5cc3d8; } }
:root[data-theme="dark"] { --m-aemet: #5cc3d8; }
.mod-aemet { --c: var(--m-aemet); --trazo: none; }

/* Mapa fijo: la imagen fija del visor /mapas con la costa encima, enlazada al visor (templates/diseno/_mapa_fija.php).
   La imagen va en Mercator sobre su caja; --rel es su relación de aspecto. Sin --z cabe entera y centrada;
   con zoom (--z, --px, --py) el punto queda en el centro. */
.d2-mf { display: block; color: inherit; text-decoration: none; }
.d2-mf__lienzo { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: var(--rel, 1.19); transform: translateX(-50%); }
.d2-mf--zoom .d2-mf__lienzo { top: 50%; height: auto; width: calc(var(--z, 1) * 100%); transform: translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
.d2-mf__img, .d2-mf__costa { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.d2-mf__img { opacity: .9; }
.d2-mf__costa { opacity: .75; }
.d2-mf__c { position: absolute; transform: translate(-4px, -50%); font-size: var(--t-1); font-weight: 600; color: var(--ink); white-space: nowrap; paint-order: stroke; -webkit-text-stroke: 3px var(--surface); text-shadow: none; pointer-events: none; }
.d2-mf__c::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); margin-right: 4px; vertical-align: 2px; -webkit-text-stroke: 0; }
.d2-mf__sonda { left: 50%; top: 50%; }
.d2-mf:hover .btn--mapa, .d2-mf:focus-visible .btn--mapa { background: var(--ink); color: var(--on-ink); }

/* Visor /mapas: AIGFS (NOAA, IA; magenta, discontinuo como las otras IA) y JMA GSM (añil) */
:root { --m-aigfs: #b0207a; --m-jma: #4a4fb5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m-aigfs: #e57ac0; --m-jma: #9fa4f0; } }
:root[data-theme="dark"] { --m-aigfs: #e57ac0; --m-jma: #9fa4f0; }
.mod-aigfs { --c: var(--m-aigfs); --trazo: 6 3; } .mod-jma { --c: var(--m-jma); --trazo: none; }
.mod-aigfs .mod-muestra, .mod-muestra.mod-aigfs { border-top-style: dashed; }
/* Capa aparte (UKMO, CC BY-SA 4.0): etiqueta discreta de su licencia en el selector y la leyenda */
.v-lic { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px solid currentColor; border-radius: var(--r-1); font-size: 10px; font-weight: 500; line-height: 14px; letter-spacing: .02em; color: var(--muted); vertical-align: 1px; white-space: nowrap; }
.ley__lic { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); text-align: left; }

/* ---------- 16. ENVOLTORIO: páginas aún sin plantilla nueva dentro del layout nuevo (templates/diseno/_envoltorio.php) ---------- */
.d2-compat { min-width: 0; }
.d2-compat .material-symbols-outlined { font-family: "Material Symbols Outlined"; }
.d2-compat :where(a) { color: inherit; }
