/* Tema PowerMatch «ficha técnica»: blanco y tinta, reglas finas en vez de tarjetas, y un solo color de marca, el amarillo
   de la señalización eléctrica. Sin degradados, brillos, sombras ni desenfoques. El verde se reserva para la energía limpia.
   Tipografía: Schibsted Grotesk para el texto e IBM Plex Mono para las cifras y las etiquetas.
   Redefine las variables de Pico para el tema claro y el oscuro (botón de tema en la barra superior). */

:root {
  --pm-letra: 'Schibsted Grotesk', system-ui, sans-serif;
  --pm-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pm-ancho: 1320px;
  --pm-amarillo: #ffd400;
  --pm-carbon: #16181a;
}

:root[data-theme=light] {
  --pm-fondo: #ffffff;
  --pm-fondo-2: #f3f4f1;
  --pm-tinta: #16181a;
  --pm-titulo: #0c0d0e;
  --pm-tenue: #5c6166;
  --pm-borde: #dcdedb;
  --pm-regla: #16181a;
  --pm-campo: #8f9497;
  --pm-senal: var(--pm-amarillo);
  --pm-senal-hover: #f0c800;
  --pm-sobre-senal: var(--pm-carbon);
  --pm-computo: #1f45e0;
  --pm-verde: #0b7a45;
  --pm-verde-fondo: #e3f3ea;
  --pm-rojo: #c02626;
  --pm-rojo-fondo: #fbe9e7;
  --pm-ambar: #7a5700;
  --pm-ambar-fondo: #fff6cc;
  --pm-mapa-fondo: #eceeeb;
}

:root[data-theme=dark] {
  --pm-fondo: #121416;
  --pm-fondo-2: #1c1f22;
  --pm-tinta: #e9eae6;
  --pm-titulo: #fbfbf8;
  --pm-tenue: #9ba0a3;
  --pm-borde: #2e3236;
  --pm-regla: #e9eae6;
  --pm-campo: #6d7276;
  --pm-senal: var(--pm-amarillo);
  --pm-senal-hover: #ffe14d;
  --pm-sobre-senal: var(--pm-carbon);
  --pm-computo: #8ea4ff;
  --pm-verde: #4fd08e;
  --pm-verde-fondo: #12301f;
  --pm-rojo: #ff8a80;
  --pm-rojo-fondo: #3a1c1a;
  --pm-ambar: #ffd966;
  --pm-ambar-fondo: #33290a;
  --pm-mapa-fondo: #1c1f22;
}

:root[data-theme] {
  --pico-font-family: var(--pm-letra);
  --pico-font-family-sans-serif: var(--pm-letra);
  --pico-font-size: 100%;
  --pico-border-radius: 2px;
  --pico-box-shadow: none;
  --pico-text-decoration: underline;
  --pico-background-color: var(--pm-fondo);
  --pico-color: var(--pm-tinta);
  --pico-muted-color: var(--pm-tenue);
  --pico-muted-border-color: var(--pm-borde);
  --pico-h1-color: var(--pm-titulo);
  --pico-h2-color: var(--pm-titulo);
  --pico-h3-color: var(--pm-titulo);
  --pico-h4-color: var(--pm-titulo);
  --pico-primary: var(--pm-tinta);
  --pico-primary-hover: var(--pm-tenue);
  --pico-primary-underline: var(--pm-tenue);
  --pico-primary-focus: var(--pm-campo);
  --pico-primary-background: var(--pm-senal);
  --pico-primary-border: var(--pm-senal);
  --pico-primary-hover-background: var(--pm-senal-hover);
  --pico-primary-hover-border: var(--pm-senal-hover);
  --pico-primary-inverse: var(--pm-sobre-senal);
  --pico-secondary: var(--pm-tinta);
  --pico-secondary-hover: var(--pm-tenue);
  --pico-secondary-underline: var(--pm-tenue);
  --pico-secondary-focus: var(--pm-campo);
  --pico-secondary-background: var(--pm-tinta);
  --pico-secondary-border: var(--pm-tinta);
  --pico-secondary-hover-background: var(--pm-titulo);
  --pico-secondary-hover-border: var(--pm-titulo);
  --pico-secondary-inverse: var(--pm-fondo);
  --pico-button-box-shadow: none;
  --pico-button-hover-box-shadow: none;
  --pico-card-background-color: var(--pm-fondo);
  --pico-card-sectioning-background-color: var(--pm-fondo-2);
  --pico-card-box-shadow: none;
  --pico-form-element-background-color: var(--pm-fondo);
  --pico-form-element-active-background-color: var(--pm-fondo);
  --pico-form-element-selected-background-color: var(--pm-fondo-2);
  --pico-form-element-border-color: var(--pm-campo);
  --pico-form-element-active-border-color: var(--pm-tinta);
  --pico-form-element-focus-color: var(--pm-tinta);
  --pico-form-element-color: var(--pm-tinta);
  --pico-form-element-placeholder-color: var(--pm-tenue);
  --pico-table-border-color: var(--pm-borde);
  --pico-table-row-stripped-background-color: var(--pm-fondo-2);
  --pico-dropdown-background-color: var(--pm-fondo);
  --pico-dropdown-border-color: var(--pm-regla);
  --pico-dropdown-box-shadow: none;
  --pico-dropdown-color: var(--pm-tinta);
  --pico-dropdown-hover-background-color: var(--pm-fondo-2);
}

/* ---------- Base ---------- */
body { min-height: 100vh; overflow-x: clip; }
main.container { max-width: var(--pm-ancho); padding: 2.5rem 2rem 5rem; }
h1, h2, h3, h4 { font-family: var(--pm-letra); font-weight: 500; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.04; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.12; letter-spacing: -.022em; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
h4 { font-size: 1rem; }
/* Los iconos solo quedan en controles: junto a los títulos y en las fichas sobran */
h1 .icono, h2 .icono, h3 .icono { display: none; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
hgroup p, .muted { color: var(--pm-tenue); }
.kicker { margin-bottom: .7rem; font: 500 .82rem var(--pm-mono); color: var(--pm-tenue); }
.kicker + h1 { margin-top: 0; }
.icono { width: 1.1em; height: 1.1em; vertical-align: -.18em; margin-right: .35em; color: currentColor; }
button, [role=button] { font-family: var(--pm-letra); font-weight: 600; font-size: .95rem; }
.secondary.outline:hover, button.outline:hover { background: var(--pm-tinta); color: var(--pm-fondo); }
section[id] { scroll-margin-top: calc(var(--alto-cabecera, 4.5rem) + 1rem); }
[type=checkbox]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181a' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }

/* Logo: símbolo amarillo y nombre en la tipografía de la web */
.marca { display: inline-flex; align-items: center; gap: .5rem; font: 700 1.2rem var(--pm-letra); letter-spacing: -.025em; color: var(--pm-titulo); text-decoration: none; }
.marca:hover { color: var(--pm-titulo); }
.marca-simbolo { flex: none; width: 1.5rem; height: 1.5rem; }
.marca-simbolo rect { fill: var(--pm-senal); }
.marca-simbolo path { fill: var(--pm-sobre-senal); }

/* ---------- Barra superior ---------- */
/* z-index por encima de los paneles y controles de Leaflet (400-1000) para que el mapa pase por debajo al hacer scroll */
body > header { position: sticky; top: 0; z-index: 1100; border-bottom: 1px solid var(--pm-regla); background: var(--pm-fondo); }
body > header.container { max-width: none; padding-inline: max(2rem, calc((100% - var(--pm-ancho)) / 2 + 2rem)); }
body > header nav > ul:first-child { gap: .1rem; }
nav, nav ul { flex-wrap: wrap; }
nav form { margin: 0; }
nav form button { padding: .3rem .8rem; margin: 0; }
nav li { white-space: nowrap; padding-block: .4rem; }
nav a { color: var(--pm-tinta); text-decoration: none; }
nav a:hover { color: var(--pm-tenue); }
nav .marca { margin-right: 1rem; }
nav .enlace-seccion a, details.dropdown.menu-casos > summary { font-size: .95rem; font-weight: 500; }
nav .enlace-seccion a[aria-current], details.dropdown.menu-casos > summary.actual { box-shadow: inset 0 -2px 0 var(--pm-tinta); border-radius: 0; }
nav [role=button] { padding: .45rem 1rem; }
nav a.cambio-modo { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border: 1px solid var(--pm-tinta); border-radius: 2px; font-size: .9rem; font-weight: 500; }
nav a.cambio-modo .icono { margin: 0; width: 1rem; height: 1rem; }
nav a.cambio-modo:hover { background: var(--pm-tinta); color: var(--pm-fondo); }
/* En móvil: el logo y las secciones en una sola fila que se desliza en horizontal */
@media (max-width: 760px) {
  body > header.container { padding-inline: 1rem; }
  main.container { padding: 1.5rem 1rem 4rem; }
  body > header nav > ul:first-child { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  body > header nav > ul:first-child::-webkit-scrollbar { display: none; }
  body > header nav li { padding-block: .25rem; }
  body > header nav > ul:last-child { flex-wrap: nowrap; }
}
/* Pantallas muy estrechas: «Ofrecer en PowerMatch» solo con el icono para que la barra quepa */
@media (max-width: 420px) { nav a.cambio-modo span { display: none; } nav a.cambio-modo { padding: .45rem; } }

/* Modo «Ofrezco»: la barra entera pasa a amarillo, para que se note de un vistazo en qué modo estás */
body > header.barra-ofrezco { --pm-fondo: var(--pm-amarillo); --pm-fondo-2: #f0c800; --pm-tinta: var(--pm-carbon); --pm-titulo: var(--pm-carbon); --pm-tenue: #4a4300; --pm-regla: var(--pm-carbon); --pm-senal: var(--pm-carbon); --pm-sobre-senal: var(--pm-amarillo); --pm-borde: rgba(22, 24, 26, .3); --pm-rojo: #8f1414; }

/* Botón de tema claro/oscuro: se ve el sol en modo oscuro y la luna en modo claro */
nav button.boton-tema { display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; padding: 0; margin: 0; border: 0; border-radius: 2px; background: transparent; color: var(--pm-tinta); }
nav button.boton-tema:hover { background: var(--pm-fondo-2); color: var(--pm-tinta); }
nav button.boton-tema svg { width: 1.2rem; height: 1.2rem; }
[data-theme=dark] .boton-tema .luna, [data-theme=light] .boton-tema .sol { display: none; }

/* Menú «Casos de uso» (desplegable de Pico, con aspecto de enlace de la barra) */
details.dropdown.menu-casos { margin: 0; }
details.dropdown.menu-casos > summary, details.dropdown.menu-casos > summary:not([role]) { height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: var(--pm-tinta); font: inherit; font-size: .95rem; font-weight: 500; line-height: inherit; }
details.dropdown.menu-casos > summary:hover { color: var(--pm-tenue); }
details.dropdown.menu-casos > summary::after { margin-left: .35rem; }
details.dropdown.menu-casos > summary + ul { min-width: 22rem; background: var(--pm-fondo); border: 1px solid var(--pm-regla); }
details.dropdown.menu-casos ul li a { display: flex; align-items: center; color: var(--pm-tinta); font-size: .92rem; }
details.dropdown.menu-casos ul li a:hover { background: var(--pm-fondo-2); color: var(--pm-tinta); }
details.dropdown.menu-casos ul .icono { display: none; }
details.dropdown.menu-casos ul li.todos { border-top: 1px solid var(--pm-borde); }
details.dropdown.menu-casos ul li.todos a { font-weight: 600; }
/* En móvil el menú ocupa el ancho de la pantalla en vez de salirse por la derecha */
@media (max-width: 600px) { details.dropdown.menu-casos > summary + ul { position: fixed; left: 1rem; right: auto; width: calc(100vw - 2rem); min-width: 0; } }

/* Menú de usuario (desplegable de Pico; selectores más específicos que los de Pico) */
details.dropdown.menu-usuario { margin: 0; }
details.dropdown.menu-usuario > summary { position: relative; display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: 2px; background: var(--pm-tinta); }
details.dropdown.menu-usuario > summary::after { display: none; }
details.dropdown.menu-usuario > summary .inicial { font: 600 1rem var(--pm-letra); color: var(--pm-fondo); }
details.dropdown.menu-usuario > summary + ul { min-width: 15rem; background: var(--pm-fondo); border: 1px solid var(--pm-regla); }
details.dropdown.menu-usuario li.cabecera { white-space: normal; border-bottom: 1px solid var(--pm-borde); padding: .6rem 1rem .7rem; line-height: 1.3; }
details.dropdown.menu-usuario button.enlace { background: none; border: 0; color: var(--pm-rojo); padding: 0; width: auto; font-family: inherit; font-size: inherit; font-weight: 500; }

/* ---------- Tarjetas genéricas y formularios ---------- */
article { border: 1px solid var(--pm-borde); }
article > header, article > footer { border-color: var(--pm-borde); }
details > summary[role=button] { width: auto; display: inline-block; }
.filtros { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 1rem; align-items: end; margin-top: 1rem; }
.filtros label, form label { font-size: .85rem; color: var(--pm-tenue); }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.acciones form { margin: 0; }
.acciones button { width: auto; padding: .3rem .8rem; margin: 0; font-size: .85rem; }
.errorlist { color: var(--pm-rojo); list-style: none; padding: 0; font-size: .85rem; }
article.success { border-color: var(--pm-verde); background: var(--pm-verde-fondo); }
article.error { border-color: var(--pm-rojo); background: var(--pm-rojo-fondo); }

/* Tablas: etiquetas tenues y cifras en monoespaciada */
th { color: var(--pm-tenue); font-weight: 400; }
.desglose td:last-child, .importe { text-align: right; white-space: nowrap; font-family: var(--pm-mono); font-size: .92rem; }
.desglose tr.total td { font-weight: 600; color: var(--pm-titulo); border-top: 1px solid var(--pm-regla); }
.precio { font: 500 1.35rem var(--pm-mono); color: var(--pm-titulo); }
.precio-mini { font: 500 .9rem var(--pm-mono); color: var(--pm-titulo); white-space: nowrap; }

/* ---------- Etiquetas ---------- */
.verde, .estado { display: inline-block; padding: .05rem .45rem; border-radius: 2px; font: 500 .74rem var(--pm-mono); }
.verde { color: var(--pm-verde); background: var(--pm-verde-fondo); }
.estado { color: var(--pm-tenue); background: var(--pm-fondo-2); }
.estado-aceptada { color: var(--pm-verde); background: var(--pm-verde-fondo); }
.estado-rechazada, .estado-cancelada { color: var(--pm-rojo); background: var(--pm-rojo-fondo); }
.estado-pendiente { color: var(--pm-ambar); background: var(--pm-ambar-fondo); }
.verificado { color: var(--pm-verde); font-size: .9rem; }
.verificado .icono { margin-right: .15em; }

/* ---------- Cifras: una franja entre dos reglas, sin cajas ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 2rem 0; border-block: 1px solid var(--pm-regla); }
.kpi { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem 1.1rem; border-left: 1px solid var(--pm-borde); }
.kpi:first-child { padding-left: 0; border-left: 0; }
.kpi strong { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; color: var(--pm-titulo); white-space: nowrap; }
.kpi span { font-size: .85rem; color: var(--pm-tenue); line-height: 1.3; }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding-inline: .9rem; }
  .kpi:nth-child(odd) { padding-left: 0; border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--pm-borde); }
}

/* ---------- Portada ---------- */
.portada-hero { padding-block: clamp(1rem, 4vh, 3rem) clamp(1.5rem, 4vh, 2.5rem); }
.portada-hero h1 { max-width: 15ch; margin-bottom: 1.4rem; font-size: clamp(2.7rem, 7.4vw, 6.2rem); line-height: .98; letter-spacing: -.04em; }
.portada-hero-pie { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 3rem; flex-wrap: wrap; }
.portada-hero-pie p { margin: 0; }
.eslogan { color: var(--pm-tenue); font: 400 .9rem var(--pm-mono); }
.portada-bloque { margin-top: clamp(3.5rem, 9vh, 6rem); }
.portada-bloque > h2 { margin-bottom: 1.2rem; }
.bloque-cabecera { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.bloque-cabecera h2 { margin: 0; }
.portada-cifras { margin: clamp(2rem, 5vh, 3rem) 0 0; }

/* Buscador rápido: pestañas de texto Potencia / Cómputo y barra de búsqueda */
.portada-buscar > [data-pestana] { width: 100%; }
.pestanas { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pestanas button { display: inline-flex; align-items: center; gap: .4rem; width: auto; margin: 0; padding: .3rem 0; border: 0; border-radius: 0; background: none; color: var(--pm-tenue); font-size: 1rem; font-weight: 500; }
.pestanas button .icono { display: none; }
.pestanas button:hover { background: none; color: var(--pm-tinta); }
.pestanas button[aria-selected=true] { color: var(--pm-tinta); box-shadow: inset 0 -2px 0 var(--pm-tinta); }
.pildora { display: flex; align-items: stretch; width: 100%; border: 1px solid var(--pm-regla); border-radius: 2px; background: var(--pm-fondo); }
.pildora .campo { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: .6rem 1rem; border-right: 1px solid var(--pm-borde); font: 400 .72rem var(--pm-mono); color: var(--pm-tenue); }
.pildora .campo input, .pildora .campo select { margin: .1rem 0 0; padding: 0; height: auto; border: 0; border-radius: 0; background-color: transparent; box-shadow: none; font: 500 1rem var(--pm-letra); color: var(--pm-tinta); }
.pildora .campo select { padding-right: 1.5rem; background-position: right center; }
.pildora .campo input:focus, .pildora .campo select:focus { box-shadow: none; }
.pildora .campo:focus-within { background: var(--pm-fondo-2); }
.pildora .verde-chip { flex: none; display: flex; align-items: center; gap: .4rem; margin: 0; padding: 0 1rem; font-size: .9rem; font-weight: 500; color: var(--pm-verde); cursor: pointer; white-space: nowrap; }
.pildora .verde-chip input { margin: 0; }
.pildora .verde-chip .icono { display: none; }
.pildora button[type=submit] { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: auto; margin: 0; padding: .8rem 2rem; border: 0; border-radius: 0; font-size: 1.05rem; }
.pildora button .icono { margin: 0; }
@media (max-width: 760px) {
  .pildora { flex-direction: column; }
  .pildora .campo { border-right: 0; border-bottom: 1px solid var(--pm-borde); }
  .pildora .verde-chip { padding: .7rem 1rem; }
}

/* Tablón: ofertas reales de la plataforma, con los mismos datos públicos que el mapa. Toda la fila lleva a la oferta. */
.tablon { width: 100%; margin: 0; }
.tablon th { padding: 0 1rem .5rem 0; border-bottom: 1px solid var(--pm-regla); background: none; font: 400 .75rem var(--pm-mono); color: var(--pm-tenue); }
.tablon td { padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--pm-borde); background: none; vertical-align: baseline; font-size: .95rem; }
.tablon tbody tr { position: relative; }
.tablon tbody tr:hover td { background: var(--pm-fondo-2); }
.tablon a { color: var(--pm-titulo); font-weight: 500; text-decoration: none; }
.tablon a::after { content: ''; position: absolute; inset: 0; }
.tablon-tipo { font: 400 .78rem var(--pm-mono); color: var(--pm-tenue); white-space: nowrap; }
.tablon-computo .tablon-tipo { color: var(--pm-computo); }
.tablon-capacidad, .tablon-precio { font-family: var(--pm-mono); font-size: .9rem; white-space: nowrap; }
.tablon th:last-child, .tablon-precio { text-align: right; padding-right: 0; }
.tablon-energia { color: var(--pm-tenue); font-size: .88rem; }
@media (max-width: 860px) {
  .tablon thead { display: none; }
  .tablon, .tablon tbody { display: block; }
  .tablon tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--pm-borde); }
  .tablon td { display: block; padding: 0; border: 0; }
  .tablon-tipo, .tablon-oferta, .tablon-energia { grid-column: 1 / -1; }
  .tablon-capacidad, .tablon-precio { white-space: normal; }
}

/* Índice de la portada: filas a todo el ancho en lugar de tres tarjetas */
.indice { border-top: 1px solid var(--pm-regla); }
.indice-fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: .4rem 2.5rem; align-items: baseline; padding: 1.3rem 0; border-bottom: 1px solid var(--pm-regla); color: var(--pm-tinta); text-decoration: none; }
.indice-fila strong { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 500; letter-spacing: -.02em; color: var(--pm-titulo); }
.indice-fila > span:nth-child(2) { color: var(--pm-tenue); }
.indice-enlace { font-weight: 500; white-space: nowrap; }
.indice-fila:hover { background: var(--pm-senal); color: var(--pm-sobre-senal); }
.indice-fila:hover strong, .indice-fila:hover > span:nth-child(2) { color: var(--pm-sobre-senal); }
@media (max-width: 760px) { .indice-fila { grid-template-columns: 1fr; } }

/* Mapa de la portada: a todo el ancho, con los filtros a la altura del título */
.portada #mapa { height: min(620px, 72vh); }

/* Llamada a ofertar: banda amarilla de lado a lado, pegada al pie */
main:has(.portada) { padding-bottom: 0; }
body:has(.portada) .pie { margin-top: 0; }
.llamada { --pm-tinta: var(--pm-carbon); --pm-titulo: var(--pm-carbon); margin-bottom: 0; margin-inline: calc(50% - 50vw); padding: clamp(2.5rem, 7vw, 5rem) calc(50vw - 50%); background: var(--pm-amarillo); color: var(--pm-carbon); }
.llamada h2 { max-width: 18ch; margin-bottom: .8rem; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.035em; color: var(--pm-carbon); }
.llamada p { max-width: 36rem; font-size: 1.1rem; color: var(--pm-carbon); }
.llamada [role=button] { display: inline-flex; align-items: center; gap: .5rem; margin: .4rem 0 0; padding: .8rem 1.4rem; border-color: var(--pm-carbon); background: var(--pm-carbon); color: #fff; }
.llamada [role=button]:hover { border-color: #000; background: #000; color: #fff; }
.llamada [role=button] .icono { margin: 0; }

/* ---------- Fichas de resultados: como una hoja de especificaciones ---------- */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.tarjetas article { margin: 0; display: flex; flex-direction: column; }
.tarjetas article:hover { border-color: var(--pm-regla); }
.tarjetas article footer { margin-top: auto; }
.tarjetas .ficha { padding: 0; overflow: hidden; gap: 0; }
.ficha-cabecera { position: relative; display: block; padding: 1.1rem 1.2rem 1rem; color: var(--pm-tinta); border-bottom: 1px solid var(--pm-borde); text-decoration: none; }
.ficha-cabecera:hover { color: var(--pm-tinta); }
.ficha-cabecera p { margin: 0; }
.ficha-sello { position: absolute; top: 1.1rem; right: 1.1rem; }
.ficha-cifra { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding-right: 4rem; }
.ficha-cifra strong { font-size: 2.2rem; font-weight: 500; line-height: 1.05; letter-spacing: -.03em; color: var(--pm-titulo); }
.ficha-cifra span { font: 400 .95rem var(--pm-mono); color: var(--pm-tenue); }
.ficha-computo .ficha-cifra span { width: 100%; }
.ficha-tecnica { margin: 0; padding: .55rem 1.2rem; border-bottom: 1px solid var(--pm-borde); }
.ficha-tecnica > div { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .5rem; padding: .16rem 0; }
.ficha-tecnica dt { margin: 0; font: 400 .72rem/1.5 var(--pm-mono); color: var(--pm-tenue); }
.ficha-tecnica dd { margin: 0; font-size: .82rem; line-height: 1.35; }
/* Localización a la izquierda y empresa a la derecha, siempre en la misma línea: si no caben, ambas se recortan
   con «…» (el texto completo sale al pasar el ratón) */
.ficha-lugar-fila { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .7rem; }
.ficha-lugar { min-width: 0; display: flex; align-items: center; font-size: .95rem; font-weight: 500; white-space: nowrap; }
.ficha-lugar span { overflow: hidden; text-overflow: ellipsis; }
.ficha-lugar .icono { display: none; }
.ficha-ofertante { min-width: 0; font-size: .82rem; color: var(--pm-tenue); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-ofertante .verificado .icono { margin: 0; width: .95rem; height: .95rem; }
.ficha-datos { display: grid; grid-template-columns: 1fr; gap: 0; padding: .3rem 1.2rem; }
.ficha-datos > div { min-width: 0; padding: .5rem 0; border-bottom: 1px solid var(--pm-borde); }
.ficha-datos > div:last-child { border-bottom: 0; }
.ficha-datos .icono { display: none; }
.ficha-etiqueta { display: block; font: 400 .72rem var(--pm-mono); color: var(--pm-tenue); }
.ficha-datos strong { display: block; font-size: .92rem; font-weight: 500; line-height: 1.3; color: var(--pm-tinta); }
.ficha-datos .una-linea { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-coste { color: var(--pm-titulo); font-weight: 600; }
.tarjetas .ficha .ficha-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin: auto 0 0; padding: .9rem 1.2rem; border-top: 1px solid var(--pm-regla); background: none; }
.ficha-precio { margin: 0; display: flex; flex-direction: column; line-height: 1.15; }
.ficha-precio strong { font: 500 1.35rem var(--pm-mono); letter-spacing: -.03em; color: var(--pm-titulo); white-space: nowrap; }
.ficha-precio span { font-size: .75rem; color: var(--pm-tenue); }
.ficha-boton { flex: none; margin: 0; padding: .6rem 1.2rem; }
/* El botón «Solicitar» lleva al formulario de la oferta: que no quede bajo la barra superior fija */
#solicitar { scroll-margin-top: calc(var(--alto-cabecera, 4.6rem) + 1rem); }

/* ---------- Catálogos: buscador, timeline (cómputo) y fichas a la izquierda; mapa fijo a la derecha ---------- */
.buscador { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-areas: "titulo titulo" "busqueda mapa" "timeline mapa" "resultados mapa"; grid-template-rows: auto auto auto 1fr; gap: 1.5rem 2rem; align-items: start; }
.buscador-titulo { grid-area: titulo; }
.buscador-titulo p { margin-bottom: 0; }
.panel-busqueda { grid-area: busqueda; margin: 0; padding-top: .9rem; border-top: 1px solid var(--pm-regla); }
.panel-busqueda .busco { margin-bottom: .2rem; font-size: 1.15rem; }
.panel-busqueda-cuerpo { display: flex; gap: 1rem; align-items: flex-end; }
.panel-busqueda .filtros { flex: 1; margin-top: .6rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.panel-busqueda .filtros input:not([type=checkbox]), .panel-busqueda .filtros select { margin-bottom: .6rem; }
.panel-busqueda button.boton-buscar { flex: none; display: flex; align-items: center; justify-content: center; gap: .4rem; width: 9rem; margin: 0 0 .6rem; padding: .8rem 1rem; font-size: 1.05rem; }
.boton-buscar .icono { margin: 0; }
.quitar-filtros { font-size: .85rem; }
.buscador-mapa { grid-area: mapa; position: sticky; top: calc(var(--alto-cabecera, 4.5rem) + 1.2rem); }
.buscador-mapa #mapa { height: min(560px, calc(100vh - 9rem)); }
.leyenda-mapa { font-size: .85rem; margin: .6rem 0 0; }
.buscador-resultados { grid-area: resultados; }
.buscador-resultados .tarjetas { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 960px) {
  .buscador { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titulo" "busqueda" "mapa" "timeline" "resultados"; grid-template-rows: none; }
  .buscador-mapa { position: static; }
  .panel-busqueda-cuerpo { flex-direction: column; align-items: stretch; gap: 0; }
  .panel-busqueda button.boton-buscar { width: 100%; }
}

/* Timeline semanal de cómputo: por cada día, GPU libres durante todo el día */
.timeline { grid-area: timeline; margin: 0; padding-top: .9rem; border-top: 1px solid var(--pm-regla); }
.timeline-cabecera { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.timeline-cabecera h2 { margin: 0; font-size: 1.15rem; }
.timeline-leyenda { display: flex; gap: 1rem; font: 400 .78rem var(--pm-mono); color: var(--pm-tenue); }
.timeline-leyenda span { display: inline-flex; align-items: center; gap: .4rem; }
.timeline-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--pm-borde); border-block: 1px solid var(--pm-borde); }
.timeline-dia { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; padding: .5rem .3rem .45rem; background: var(--pm-fondo); }
.timeline-dia.hoy { background: var(--pm-fondo-2); box-shadow: inset 0 3px 0 var(--pm-senal); }
.timeline-dia.pasado { opacity: .45; }
.timeline-barras { display: flex; justify-content: center; align-items: flex-end; gap: .3rem; height: 8.5rem; padding-top: 1.2rem; }
.timeline-barra { position: relative; width: min(1.4rem, 40%); height: 100%; display: flex; align-items: flex-end; }
.timeline-barra i { display: block; width: 100%; transition: height .3s; }
.timeline-barra i { background: var(--pm-computo); }
.timeline-barra b { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--alto) + .15rem); font: 500 .75rem var(--pm-mono); color: var(--pm-titulo); }
.timeline-dia small { text-align: center; font: 400 .75rem/1.25 var(--pm-mono); color: var(--pm-tenue); white-space: nowrap; }
.timeline-dia small strong { display: block; color: var(--pm-tinta); font-weight: 500; }
.timeline-nota { font-size: .8rem; margin: .7rem 0 0; }
@media (max-width: 600px) {
  .timeline-dia { padding-inline: 0; }
  .timeline-barras { height: 7rem; gap: .2rem; }
  .timeline-barra b, .timeline-dia small { font-size: .65rem; }
}

/* ---------- Mapa ---------- */
#mapa { height: 440px; isolation: isolate; border: 1px solid var(--pm-regla); border-radius: 2px; background: var(--pm-mapa-fondo); }
/* El fondo de Esri, en gris neutro y sin tinte para que mande el color de los marcadores */
[data-theme=dark] #mapa .leaflet-tile-pane { filter: grayscale(1) brightness(1.3); }
[data-theme=light] #mapa .leaflet-tile-pane { filter: grayscale(1); }
/* Con zoom fraccionario quedan rendijas de 1 px entre mosaicos. Leaflet lo intenta arreglar con plus-lighter, pero
   con el filtro de color deja líneas claras; en su lugar se solapan los mosaicos 1 px con mezcla normal. */
.leaflet-container#mapa img.leaflet-tile { mix-blend-mode: normal; width: 257px !important; height: 257px !important; }
.mapa-filtros { display: flex; gap: .5rem; flex-wrap: wrap; }
.mapa-filtros .chip { display: inline-flex; align-items: center; gap: .45rem; width: auto; margin: 0; padding: .3rem .7rem; border: 1px solid var(--pm-borde); border-radius: 2px; background: transparent; color: var(--pm-tenue); font-size: .85rem; font-weight: 500; }
.mapa-filtros .chip:hover { background: var(--pm-fondo-2); color: var(--pm-tinta); }
.mapa-filtros .chip.activo { border-color: var(--pm-regla); background: transparent; color: var(--pm-tinta); }
.mapa-filtros .chip:not(.activo) .punto { opacity: .35; filter: grayscale(1); }
.punto { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; }
.punto-potencia { background: var(--pm-amarillo); box-shadow: inset 0 0 0 1px var(--pm-carbon); }
.punto-computo { background: var(--pm-computo); }
.punto-verde { background: transparent; border: 2px solid var(--pm-verde); }
.mapa-filtros .chip.activo .punto-verde { background: var(--pm-verde); }
.pin { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--pm-carbon); font: 500 12px var(--pm-mono); color: var(--pm-carbon); cursor: pointer; transition: transform .1s; }
.pin:hover { transform: scale(1.15); }
.pin-potencia { background: var(--pm-amarillo); }
.pin-computo { background: #1f45e0; border-color: #fff; color: #fff; }
.pin-mixto { background: linear-gradient(90deg, var(--pm-amarillo) 50%, #8ea4ff 50%); }
.pin-verde { box-shadow: 0 0 0 3px #17a35e; }
.leaflet-container { font-family: var(--pm-letra); }
/* Leaflet marca marcadores y zoom con role=button: se anulan los estilos de botón de Pico y del tema */
.leaflet-container [role=button] { background: none; box-shadow: none; border: 0; padding: 0; border-radius: 0; }
.leaflet-container .leaflet-bar a[role=button] { width: 30px; height: 30px; background: var(--pm-fondo); color: var(--pm-tinta); border-bottom: 1px solid var(--pm-borde); font: 500 18px/30px var(--pm-letra); text-decoration: none; }
.leaflet-container a { color: var(--pm-tinta); }
.leaflet-bar { border: 1px solid var(--pm-regla) !important; border-radius: 2px !important; }
.leaflet-bar a:hover { background: var(--pm-fondo-2); color: var(--pm-tinta); }
/* Sin marca de agua sobre el mapa: los créditos están en el pie */
.leaflet-control-attribution { display: none !important; }
.tooltip-oferta, .popup-oferta .leaflet-popup-content-wrapper, .popup-oferta .leaflet-popup-tip { background: var(--pm-fondo); color: var(--pm-tinta); border: 1px solid var(--pm-regla); border-radius: 2px; box-shadow: none; }
.tooltip-oferta { padding: .3rem .8rem; max-width: 320px; white-space: normal; }
.tooltip-oferta::before { border-top-color: var(--pm-regla); }
.popup-oferta .leaflet-popup-content { margin: .5rem 1rem; }
.resumen-oferta { display: flex; flex-direction: column; gap: .1rem; padding: .45rem 0; font-size: .85rem; line-height: 1.35; min-width: 240px; }
.resumen-oferta + .resumen-oferta { border-top: 1px solid var(--pm-borde); }
.resumen-grupo { padding: .4rem 0; font-size: .85rem; min-width: 240px; }
.resumen-grupo > strong { display: block; color: var(--pm-titulo); margin-bottom: .3rem; }
.resumen-grupo li { list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: .1rem 0; margin: 0; }
.resumen-grupo ul { padding: 0; margin: 0 0 .3rem; }
.resumen-grupo .punto { margin-right: .4rem; width: .55rem; height: .55rem; }
.resumen-oferta .tipo { font: 400 .72rem var(--pm-mono); color: var(--pm-tenue); }
.resumen-computo .tipo { color: var(--pm-computo); }
.resumen-oferta .titulo { color: var(--pm-titulo); font-size: .95rem; font-weight: 500; }

/* ---------- Modo «Ofrezco»: panel, mis ofertas y solicitudes ---------- */
.panel { max-width: 1080px; }
.panel .nota { font-size: .85rem; margin-top: .6rem; }
.publicar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.publicar a { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--pm-regla); border-radius: 2px; color: var(--pm-tinta); text-decoration: none; }
.publicar a:hover { background: var(--pm-senal); color: var(--pm-sobre-senal); }
.publicar a:hover strong, .publicar a:hover small, .publicar a:hover .mas { color: var(--pm-sobre-senal); }
.publicar-icono { display: none; }
.publicar strong { display: block; font-size: 1.05rem; font-weight: 600; color: var(--pm-titulo); }
.publicar small { color: var(--pm-tenue); }
.publicar .mas { margin-left: auto; font-size: 1.8rem; line-height: 1; color: var(--pm-tinta); }
.lista-solicitudes { display: flex; flex-direction: column; border-top: 1px solid var(--pm-regla); }
.fila-solicitud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--pm-borde); }
.fila-solicitud-texto { display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; }
.fila-solicitud-texto strong { color: var(--pm-titulo); font-weight: 600; }
.fila-solicitud-texto em { font-size: .85rem; color: var(--pm-tenue); }
.fila-solicitud-importe { display: flex; flex-direction: column; text-align: right; }
.fila-solicitud-importe strong { font: 500 1.1rem var(--pm-mono); color: var(--pm-titulo); white-space: nowrap; }
.fila-solicitud-importe small { font-size: .75rem; color: var(--pm-tenue); }
.fila-solicitud > [role=button] { margin: 0; padding: .3rem .8rem; font-size: .85rem; }
@media (max-width: 700px) { .fila-solicitud { grid-template-columns: auto minmax(0, 1fr); } .fila-solicitud-importe { text-align: left; } }
.panel-cabecera { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.mis-ofertas-cabecera { align-items: flex-end; }
.mis-ofertas-cabecera .acciones [role=button] { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.mis-ofertas-cabecera .acciones .icono { margin: 0; }
.titulo-seccion { display: flex; align-items: center; }
.mis-ofertas-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.mi-oferta { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; border: 1px solid var(--pm-borde); border-radius: 2px; }
.mi-oferta-icono { display: none; }
.mi-oferta-tipo { font: 400 .75rem var(--pm-mono); color: var(--pm-tenue); }
.mi-oferta-computo .mi-oferta-tipo { color: var(--pm-computo); }
.mi-oferta strong { font-weight: 500; }
.mi-oferta strong a { color: var(--pm-titulo); text-decoration: none; }
.mi-oferta strong a:hover { text-decoration: underline; }
.mi-oferta > .muted { font: 400 .82rem var(--pm-mono); }
.mi-oferta-pie { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--pm-borde); font-size: .85rem; }

/* Avatar: inicial en un cuadrado de tinta */
.avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 2px; font: 600 1rem var(--pm-letra); color: var(--pm-fondo); background: var(--pm-tinta); }

/* ---------- Mensajes: conversaciones a la izquierda y el chat abierto a la derecha ---------- */
.contador { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 2px; font: 500 .72rem var(--pm-mono); color: var(--pm-sobre-senal); background: var(--pm-senal); }
.punto-aviso { position: absolute; top: -.2rem; right: -.2rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--pm-rojo); box-shadow: 0 0 0 2px var(--pm-fondo); }
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--alto-cabecera, 4.5rem) - 4rem); min-height: 26rem; border: 1px solid var(--pm-regla); border-radius: 2px; overflow: hidden; }
.chat-bandeja { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--pm-regla); }
.chat-bandeja h1 { margin: 0; padding: 1rem 1.2rem; font-size: 1.3rem; letter-spacing: -.02em; border-bottom: 1px solid var(--pm-borde); }
.chat-bandeja > p { padding: 1rem 1.2rem; }
.chat-bandeja nav { display: block; flex: 1; overflow-y: auto; }
.chat-conv { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.2rem; border-bottom: 1px solid var(--pm-borde); border-left: 4px solid transparent; color: var(--pm-tinta); }
.chat-conv:hover { background: var(--pm-fondo-2); color: var(--pm-tinta); }
.chat-conv[aria-current] { background: var(--pm-fondo-2); border-left-color: var(--pm-senal); color: var(--pm-tinta); }
.chat-conv-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .05rem; }
.chat-conv-linea { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.chat-conv-linea strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; font-weight: 600; color: var(--pm-titulo); }
.chat-conv-linea time { flex: none; font: 400 .72rem var(--pm-mono); color: var(--pm-tenue); }
.chat-conv-texto small, .chat-conv-ultimo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-texto small { font-size: .78rem; color: var(--pm-tenue); }
.chat-conv-ultimo { font-size: .85rem; color: var(--pm-tenue); }
.chat-hilo { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-hilo > .chat-vacio { margin: auto; }
.chat-cabecera { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--pm-borde); }
.chat-cabecera-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-cabecera h2 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.chat-cabecera .estado { margin-left: .3rem; font-size: .68rem; vertical-align: .1em; }
.chat-cabecera small { font-size: .82rem; color: var(--pm-tenue); }
.chat-cabecera [role=button] { margin: 0; padding: .3rem .8rem; font-size: .85rem; white-space: nowrap; }
.chat-volver { display: none; }
.chat-volver .icono { margin: 0; }
.chat-mensajes { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem; }
.chat-mensajes .chat-vacio { margin: auto; text-align: center; }
.burbuja { max-width: min(72%, 34rem); padding: .55rem .85rem; align-self: flex-start; overflow-wrap: anywhere; border-radius: 2px; background: var(--pm-fondo-2); }
.burbuja p { margin: 0; font-size: .95rem; }
.burbuja time { display: block; margin-top: .15rem; font: 400 .68rem var(--pm-mono); color: var(--pm-tenue); }
.burbuja.mia { align-self: flex-end; background: var(--pm-tinta); }
.burbuja.mia p, .burbuja.mia time { color: var(--pm-fondo); }
.burbuja.mia time { text-align: right; opacity: .75; }
.chat-enviar { display: flex; align-items: flex-end; gap: .6rem; margin: 0; padding: .8rem 1.2rem; border-top: 1px solid var(--pm-borde); }
.chat-enviar textarea { flex: 1; margin: 0; min-height: 2.6rem; max-height: 8rem; padding-block: .5rem; resize: none; field-sizing: content; }
.chat-enviar button[type=submit] { flex: none; display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; margin: 0; padding: 0; }
.chat-enviar .icono { margin: 0; }
@media (max-width: 760px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--alto-cabecera, 7rem) - 3rem); }
  .chat-bandeja { border-right: 0; }
  .chat-abierto .chat-bandeja, .chat:not(.chat-abierto) .chat-hilo { display: none; }
  .chat-volver { display: block; flex: none; }
  .chat-cabecera { flex-wrap: wrap; padding: .7rem 1rem; }
  .chat-cabecera-texto { flex-basis: 60%; }
  .chat-mensajes { padding: 1rem; }
  .burbuja { max-width: 85%; }
  .chat-enviar { padding: .7rem 1rem; }
}

/* ---------- Casos de uso: bloques separados por una regla, sin dibujos ---------- */
.casos { max-width: 1180px; }
.casos-hero { max-width: 52rem; }
.casos-grupo { margin-top: clamp(2.5rem, 6vh, 3.5rem); }
.casos-grupo > h2 { margin-bottom: 1.1rem; }
.casos-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 2rem; }
.caso { display: flex; flex-direction: column; gap: .45rem; padding: .9rem 0 1.8rem; border-top: 1px solid var(--pm-regla); color: var(--pm-tinta); text-decoration: none; scroll-margin-top: calc(var(--alto-cabecera, 4.6rem) + 1rem); }
.caso:hover strong { text-decoration: underline; text-underline-offset: .18em; }
.caso:target { padding-inline: .9rem; background: var(--pm-senal); }
.caso:target * { color: var(--pm-sobre-senal); }
.caso-visual .icono { display: none; }
.caso-seccion { font: 400 .75rem var(--pm-mono); color: var(--pm-tenue); }
.caso-computo .caso-seccion { color: var(--pm-computo); }
.caso-texto { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.caso-texto strong { font-size: 1.2rem; font-weight: 500; letter-spacing: -.012em; color: var(--pm-titulo); }
.caso-texto > span { font-size: .95rem; color: var(--pm-tenue); line-height: 1.45; }
.caso-texto .caso-enlace { margin-top: auto; padding-top: .3rem; font-weight: 500; color: var(--pm-tinta); }

/* ---------- Sobre nosotros ---------- */
.sobre { max-width: 1080px; }
.sobre-entradilla { max-width: 44rem; font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.45; color: var(--pm-tinta); }
.sobre-bloque { margin-top: clamp(2.5rem, 6vh, 4rem); }
.sobre-bloque > h2 { margin-bottom: 1.2rem; }
.sobre-dos-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem 2.5rem; }
.sobre-dos-columnas p { margin: 0; line-height: 1.6; }
.sobre-cifras { margin: 0; }
.sobre-nota { font-size: .8rem; margin: .6rem 0 0; }
.sobre .pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 2rem; }
.sobre .pilares article { margin: 0; padding: .9rem 0 0; border: 0; border-top: 1px solid var(--pm-regla); background: none; }
.sobre .pilares h3 { margin-bottom: .5rem; }
.sobre .pilares p { color: var(--pm-tenue); }
/* Cómo funciona: tres pasos numerados */
.sobre-pasos { list-style: none; padding: 0; margin: 0; counter-reset: paso; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 2rem; }
.sobre-pasos li { counter-increment: paso; list-style: none; margin: 0; padding: .9rem 0 1.2rem; border-top: 1px solid var(--pm-regla); }
.sobre-pasos li::before { content: '0' counter(paso); display: block; margin-bottom: 1.4rem; font: 400 .85rem var(--pm-mono); color: var(--pm-tenue); }
.sobre-pasos strong { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; color: var(--pm-titulo); }
.sobre-pasos p { margin: .3rem 0 0; color: var(--pm-tenue); }
/* Misión y visión, lado a lado */
.sobre-mision { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 2rem; }
.sobre-mision article { margin: 0; padding: .9rem 0 0; border: 0; border-top: 1px solid var(--pm-regla); background: none; }
.sobre-mision p:last-child { margin: 0; font-size: 1.15rem; line-height: 1.45; color: var(--pm-titulo); }
/* Valores */
.sobre-valores { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem 2rem; }
.sobre-valores h3 { margin-bottom: .4rem; font-size: 1.1rem; }
.sobre-valores p { margin: 0; color: var(--pm-tenue); font-size: .95rem; }
/* Hitos: una regla con marcas cuadradas (vertical en móvil) */
.sobre-hitos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; border-top: 1px solid var(--pm-regla); }
.sobre-hitos li { list-style: none; margin: 0; position: relative; padding-top: 1.1rem; }
.sobre-hitos li::before { content: ''; position: absolute; top: -.4rem; left: 0; width: .75rem; height: .75rem; background: var(--pm-fondo); border: 1px solid var(--pm-regla); }
.sobre-hitos li.hecho::before { background: var(--pm-tinta); }
.sobre-hitos li.ahora::before { background: var(--pm-senal); }
.sobre-hitos span { font-weight: 600; color: var(--pm-titulo); }
.sobre-hitos p { margin: .3rem 0 0; color: var(--pm-tenue); font-size: .92rem; }
@media (max-width: 760px) {
  .sobre-hitos { grid-template-columns: 1fr; gap: 1.2rem; border-top: 0; border-left: 1px solid var(--pm-regla); }
  .sobre-hitos li { padding: 0 0 0 1.2rem; }
  .sobre-hitos li::before { top: .3rem; left: -.4rem; }
}
/* Equipo */
.sobre-equipo { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.sobre-equipo article { margin: 0; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; }
.sobre-equipo strong { display: block; font-weight: 600; color: var(--pm-titulo); }

/* ---------- Pie: siempre oscuro, cierra la página ---------- */
.pie { --pm-tinta: #f2f2ee; --pm-titulo: #ffffff; --pm-tenue: #a6abae; --pm-borde: #373b3f; margin-top: 4rem; padding: 3rem 0 1.6rem; background: var(--pm-carbon); color: var(--pm-tinta); }
.pie .container { max-width: var(--pm-ancho); padding-inline: 2rem; }
[data-theme=dark] .pie { background: #0b0c0d; }
.pie-columnas { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.pie-columnas > div { display: flex; flex-direction: column; gap: .45rem; }
.pie-columnas strong { margin-bottom: .3rem; font: 400 .78rem var(--pm-mono); color: var(--pm-tenue); }
.pie-columnas a { color: var(--pm-tinta); font-size: .95rem; text-decoration: none; }
.pie-columnas a:hover { color: var(--pm-amarillo); }
.pie-marca .marca { font-size: 1.2rem; color: var(--pm-titulo); }
.pie-marca span { color: var(--pm-tenue); font-size: .95rem; }
.pie-legal { display: flex; flex-direction: column; gap: .3rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--pm-borde); color: var(--pm-tenue); }
.pie-legal .verde { padding: 0; background: none; color: inherit; font: inherit; text-decoration: underline; }
.pie-legal .creditos-mapa { font-size: .72rem; opacity: .75; }
@media (max-width: 760px) { .pie-columnas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pie .container { padding-inline: 1rem; } }

/* La factura se imprime en blanco */
@media print {
  nav, .no-imprimir { display: none !important; }
  body { background: #fff !important; color: #000; }
  article { background: #fff; border-color: #ccc; }
  h1, h2, h3, h4, th, .precio, .desglose tr.total td { color: #000 !important; }
}

/* ---------- Formulario de ofertas y ficha técnica de cómputo ---------- */
.form-grupo { margin-top: 1.8rem; padding-top: .8rem; border-top: 1px solid var(--pm-regla); }
.form-grupo h2 { margin-bottom: 0; font-size: 1.15rem; }
.form-grupo .filtros { align-items: start; }
.tabla-tecnica .grupo th { padding-top: 1.1rem; font: 400 .78rem var(--pm-mono); color: var(--pm-titulo); border-bottom-color: var(--pm-regla); }

/* ---------- Ayuda: guías paso a paso ---------- */
.guia-accesos { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.guia { margin-top: clamp(3rem, 8vh, 5rem); padding-top: 1rem; border-top: 1px solid var(--pm-regla); scroll-margin-top: calc(var(--alto-cabecera, 5rem) + 1rem); }
.guia > p:first-of-type { max-width: 44rem; }
.guia-pasos { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: paso; }
.guia-pasos > li { list-style: none; counter-increment: paso; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1rem; margin: 0; padding: 1.2rem 0; border-top: 1px solid var(--pm-borde); }
.guia-pasos > li::before { content: '0' counter(paso); font: 400 .85rem/1.9 var(--pm-mono); color: var(--pm-tenue); }
.guia-paso { min-width: 0; max-width: 54rem; }
.guia-paso h3 { margin-bottom: .35rem; font-size: 1.25rem; }
.guia-paso h4 { margin: 1.2rem 0 .35rem; font-size: 1rem; font-weight: 600; }
.guia-paso p { margin-bottom: .7rem; line-height: 1.55; }
.guia-paso ul { margin-bottom: .7rem; }
.guia-paso table { margin-bottom: .7rem; font-size: .9rem; }
.guia-paso th { font-size: .85rem; }
.guia-formula { display: block; margin: .3rem 0 .8rem; padding: .7rem .9rem; background: var(--pm-fondo-2); font: 400 .9rem/1.5 var(--pm-mono); color: var(--pm-tinta); }
.guia-paso pre { margin-bottom: .7rem; padding: .7rem .9rem; background: var(--pm-fondo-2); font-size: .82rem; overflow-x: auto; }
.guia-nota { font-size: .9rem; color: var(--pm-tenue); }
.guia-indice { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem 2.5rem; margin-top: 1.8rem; }
.guia-indice h2 { margin-bottom: 0; font: 400 .85rem var(--pm-mono); color: var(--pm-tenue); }
.guia-indice .guia-accesos { margin-top: .6rem; }

/* ---------- Acceso a la máquina, en el chat de una solicitud de cómputo ---------- */
.chat-acceso { margin: 0; border-bottom: 1px solid var(--pm-borde); }
.chat-acceso > summary { padding: .6rem 1.2rem; font-size: .9rem; font-weight: 600; }
.chat-acceso[open] { max-height: 55%; overflow-y: auto; }
.chat-acceso-cuerpo { padding: 0 1.2rem 1rem; }
.chat-acceso-cuerpo h3 { margin: .8rem 0 .4rem; font-size: .95rem; }
.chat-acceso-cuerpo pre { margin-bottom: .6rem; padding: .6rem .8rem; background: var(--pm-fondo-2); font-size: .78rem; white-space: pre-wrap; word-break: break-all; }
.chat-acceso-cuerpo .filtros { margin-top: .4rem; }
.chat-acceso-cuerpo .ancho-completo { grid-column: 1 / -1; }
.chat-acceso-cuerpo button { width: auto; margin: 0 0 .4rem; padding: .4rem 1rem; font-size: .88rem; }
.acceso-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem 1rem; margin: .4rem 0 .8rem; }
.acceso-datos dt { font: 400 .72rem var(--pm-mono); color: var(--pm-tenue); }
.acceso-datos dd { margin: 0; }
.acceso-pasos { margin: 0 0 .5rem; padding-left: 1.2rem; font-size: .9rem; }
.acceso-pasos li { margin-bottom: .3rem; }
.aviso-fin { margin: .6rem 0 0; padding: .5rem .8rem; border-left: 3px solid var(--pm-senal); background: var(--pm-fondo-2); font-size: .88rem; }
