/* lenguaje.css — el lenguaje visual de toda la web (estética v3, 18-nov-2026; web-estetica/fable_18nov; RUMBO §11.3
 * ESTETICA-SIN-PERDER-17NOV y DELEGA-ESTETICA-GRAFICOS-18NOV). base.html la carga en TODAS las páginas, detrás de las hojas comunes
 * (tokens, components, main, sistema, sistema-visual) y delante de la hoja de cada página: solo cambia la forma, nunca el contenido.
 *
 * La tesis: la web ya tiene un sistema correcto; lo que le falta para leerse como una publicación de datos es jerarquía con carácter.
 * Hoy todos los niveles pesan igual (títulos de sección, hallazgos, cifras, notas y chips, todos en Inter 600 y gris), las cajas y las
 * sombras trocean la página y el marino se gasta a la vez en números de sección, enlaces y cifras. Aquí cambia qué se ve primero:
 * 1. El título de sección, en la letra de titular (Archivo 600 / 88, a 26): se distingue a un metro del hallazgo (Inter 600, 18) y de la base.
 * 2. Las cifras, en Archivo 500 / 96 con cifras tabulares y en tinta; la protagonista sigue en marino. El rótulo de cifra, en
 *    minúscula a 14 (las mayúsculas quedan para la línea de tipo, el índice, los chips y los rótulos del pie).
 * 3. Filetes, no cajas: la fila de cifras pierde la tarjeta, la raya de acento y la sombra; la abre una regla de tinta de 2 px (la
 *    misma que abre una tabla); los botones, planos; el índice, sin fondo.
 * 4. Un acento: el marino es para los enlaces, la protagonista y lo activo. El número de sección y los chips pasan a gris; el punto
 *    verde de «Pasa» deja de ser verde (ningún color juzga).
 * 5. La frase que contesta la página (la entradilla de la cabecera) baja debajo del H1, a 18 px y en tinta: la respuesta antes que
 *    las cifras (E1 de DELEGA-ESTETICA-GRAFICOS-18NOV); las acciones, a la derecha, abajo.
 * 6. Lo que no consta se dice en su sitio y con la misma forma en toda la web: el estado vacío es un hueco con filete discontinuo.
 * Las medidas en tokens.css (bloque V3-LENGUAJE). Ninguna regla fuerza la cascada. La guía viva: /_estilo#lenguaje. */

/* ── 1. Títulos de sección en la letra de titular (todas las páginas menos las de casos, que llevan su propio sistema) ───────── */
:where(body:not(.pagina-casos)) .sitio-principal h2 { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; color: var(--color-texto-fuerte); text-wrap: balance; }
.sv .h2 { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; }
.e1 .e1-h2 { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; }
.sv .fo .ficha-seccion-cabeza > h2 { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; }
.sv .fe .fe-borme h2 { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; }
.sv .cmp2 .ficha-seccion-titulo { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; }
.sv .cmp2 .cmpm-fuente-titulo { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.12; letter-spacing: -0.015em; }
/* la prosa legal y la metodología: un paso menos (son subtítulos dentro de un texto largo) */
.sitio-principal .prosa h2 { font-size: var(--v3-fs-subtitulo); margin: var(--sp-8) 0 var(--sp-2); }
/* el título de una capa plegada (fichas por capas) y el de un bloque viejo dentro de una ficha: el mismo titular, un paso menos */
.sv .fo-capa > .capa-cab .h2 { font-size: var(--v3-fs-subtitulo); }
/* La cabecera de sección: el número en gris y pequeño (ya no compite con los enlaces), el chip en gris; el subtítulo a 15 */
.sv .sec-cab { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: baseline; margin-bottom: var(--sp-5); }
.sv .sec-num { font-size: var(--v3-fs-numero); font-weight: 600; letter-spacing: 0.06em; color: var(--color-texto-3); }
.sv .sec-sub { font-size: var(--v3-fs-seccion-sub); line-height: 1.45; margin-top: 6px; }
.sv .sec { padding: var(--v3-sec) 0 calc(var(--v3-sec) + 4px); }
.sv .fo .fo-bloque-viejo > section > .ficha-seccion-cabeza::before { font-size: var(--v3-fs-numero); font-weight: 600; letter-spacing: 0.06em; color: var(--color-texto-3); }
.sv .fo .fo-bloque-viejo > section > .ficha-seccion-cabeza { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: baseline; }
/* El chip tipográfico (estado del registro, «Describe, no juzga»): gris, sin color de juicio en su punto */
.sv .chip { color: var(--color-texto-3); letter-spacing: 0.06em; }
.sv .chip::before { border-color: currentColor; }
.sv .chip.pasa::before { background: var(--color-texto-2); border-color: var(--color-texto-2); }
.sv .chip.hecho::before { background: var(--color-texto-2); border-color: var(--color-texto-2); }
/* un chip largo («El «K de N» por organismo, a la espera de…») se parte en el móvil: con nowrap ensanchaba la página 65 px a 390 (medido en /relaciones) */
@media (max-width: 640px) { .sv .chip { white-space: normal; text-align: left; line-height: 1.3; } }
/* El hallazgo (el título del gráfico) y su base: Inter 600 a 17, en tinta; la base en gris, a la medida de las notas */
.sv .gf-titulo { font-size: var(--v3-fs-hallazgo); font-weight: 600; max-width: 64ch; line-height: 1.35; letter-spacing: -0.005em; }
.sv .gf-base { font-size: var(--fs-dato); color: var(--color-texto-2); }
.sv .gf-fuente { font-size: var(--v3-fs-pie); color: var(--color-texto-3); }
.sv .gf-acc a, .sv .gf-acc button { color: var(--color-texto-3); }
.sv .gf-acc a:hover, .sv .gf-acc button:hover { color: var(--color-acento); }

/* ── 2. Las cifras, en la letra de titular (500 / 96, tabulares) y en tinta; el rótulo de cifra, en minúscula a 14 ─────────── */
.sv .cf .v { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); font-size: var(--v3-fs-cifra); letter-spacing: -0.015em; line-height: 1; color: var(--color-texto-fuerte); font-variant-numeric: tabular-nums lining-nums; }
.sv .cf .v small { font-family: var(--fuente-sans); font-weight: 500; letter-spacing: 0; }
.sv .cf .r { font-size: var(--v3-fs-rotulo-cifra); font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.3; color: var(--color-texto-2); }
.sv .cf .b { font-size: var(--fs-dato); line-height: 1.4; }
.kpi-valor { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); letter-spacing: -0.015em; color: var(--color-texto-fuerte); font-variant-numeric: tabular-nums lining-nums; }
.franja-cifras .kpis-compactos .kpi-valor { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); font-size: var(--v3-fs-cifra); letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; }
.kpi-rotulo { font-size: var(--v3-fs-rotulo-cifra); letter-spacing: 0; text-transform: none; line-height: 1.3; }
.importes-panel .importe-valor { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); font-size: var(--v3-fs-cifra); letter-spacing: -0.015em; color: var(--color-texto-fuerte); font-variant-numeric: tabular-nums lining-nums; }
.importes-panel .importe-rotulo { font-size: var(--v3-fs-rotulo-cifra); letter-spacing: 0; text-transform: none; line-height: 1.3; color: var(--color-texto-2); }
.sv .hechos > .hecho .kn { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); font-size: var(--v3-fs-cifra); letter-spacing: -0.015em; color: var(--color-texto-fuerte); font-variant-numeric: tabular-nums lining-nums; }
.sv .hechos > .hecho .kn small { font-family: var(--fuente-sans); }
.portada-kpis .kpi-valor { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); font-size: var(--v3-fs-cifra); letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; }
.portada-nuevo .pieza-cifra strong { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); font-size: var(--v3-fs-cifra); letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; }
.e1 .e1-cifra { font-family: var(--fuente-titular); font-weight: var(--protagonista-peso); font-stretch: var(--protagonista-ancho); letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; }
/* La frase que lee la cifra del buscador («5.341 contratos con «limpieza viaria»»): el titular de la página de resultados */
.buscador-rejilla .resultados-resumen { font-family: var(--fuente-titular); font-weight: var(--titular-peso); font-stretch: var(--titular-ancho); font-size: var(--v3-fs-seccion); line-height: 1.15; letter-spacing: -0.015em; }
/* la cifra protagonista de la portada, el sello del cursor: sigue en Archivo y en la banda; el resto de la banda, ahora en la misma letra */
.portada-kpis .kpi-rotulo { color: var(--banda-texto-3); }

/* ── 3. Filetes, no cajas: la fila de cifras ───────────────────────────────────────────────────────────────────────────────── */
.sv .cf { margin: var(--sp-4) 0 0; background: none; border: 0; border-top: var(--v3-regla); border-bottom: 1px solid var(--color-borde); border-radius: 0; box-shadow: none; }
.sv .cf > div { padding: var(--sp-3) var(--sp-5) var(--sp-4) 0; border-left: 0; }
.sv .cf > div:first-child { padding-left: 0; }
.sv .cf > div + div { padding-left: var(--sp-5); border-left: 1px solid var(--color-borde-fuerte); }
.sv .cf .v { margin-top: 6px; }
.sv .cf .b { margin-top: 6px; }
.sv .cf .hero .v { margin-top: 6px; }
.sv .cf .cf-estado { font-size: var(--fs-cuerpo); }
/* El pie de la fila: una línea de notas en gris, a 13 */
.sv .cf-pie { margin-top: var(--sp-3); font-size: var(--v3-fs-pie); line-height: 1.5; color: var(--color-texto-3); }
.sv .cf-pie > * { font-size: var(--v3-fs-pie); line-height: 1.5; }
.sv .cf-pie b, .sv .cf-pie strong { font-weight: 400; color: var(--color-texto-2); }
.sv .cf-pie .cf-mas .v { color: var(--color-texto-2); }
.sv .cf-pie .nota-acuerdos-marco { font-size: var(--v3-fs-pie); }
/* El contrato: su panel de importes, con la misma regla; la banda cálida se queda */
.importes-panel { border-top: var(--v3-regla); }
.ficha-contrato .masthead .importes-panel { background: none; border: 0; border-top: var(--v3-regla); border-bottom: 1px solid var(--color-borde); border-radius: 0; box-shadow: none; }
.ficha-contrato .masthead .importes-panel > *, .ficha-contrato .masthead .importes-panel > :first-child { padding: var(--sp-3) var(--sp-5) var(--sp-4) 0; }
.ficha-contrato .masthead .importes-panel > * + * { padding-left: var(--sp-5); border-left: 1px solid var(--color-borde-fuerte); }
.ficha-contrato .masthead .importes-panel > .sello-auditoria, .ficha-contrato .masthead .importes-panel > .nota-basado-am { padding: var(--sp-3) 0; border-left: 0; }
/* Las cifras de antes (.kpis, fuera del sistema visual): la misma regla y sin caja */
.kpis { background: none; border: 0; border-top: var(--v3-regla); border-bottom: 1px solid var(--color-borde); border-radius: 0; }
.kpi { background: none; box-shadow: -1px 0 0 var(--color-borde-fuerte); }
.ficha-kpis .kpis { border-top: var(--v3-regla); }
.portada-kpis { border-top: 0; }
.portada-kpis .kpi { box-shadow: none; }
@media (max-width: 767px) {
    .sv .cf > div, .sv .cf > div:first-child { padding: var(--sp-2) var(--sp-3) var(--sp-3) 0; }
    .sv .cf > div + div { padding-left: var(--sp-3); }
    .sv .cf > div:nth-child(odd) { padding-left: 0; border-left: 0; }
    .sv .cf > div:nth-child(even) { padding-left: var(--sp-3); border-left: 1px solid var(--color-borde-fuerte); }
    .sv .cf > div:nth-child(n+3) { border-top: 1px solid var(--color-borde); }
    .sv .cf > .hero { grid-column: 1 / -1; padding-right: 0; border-left: 0; }
    .sv .cf > .hero ~ div:nth-child(odd) { padding-left: var(--sp-3); border-left: 1px solid var(--color-borde-fuerte); }
    .sv .cf > .hero ~ div:nth-child(even) { padding-left: 0; border-left: 0; }
    .sv .cf > .hero ~ div:nth-child(n+2) { border-top: 1px solid var(--color-borde); }
    .ficha-contrato .masthead .importes-panel > *, .ficha-contrato .masthead .importes-panel > :first-child, .ficha-contrato .masthead .importes-panel > * + * { padding: var(--sp-3) 0; border-left: 0; }
}

/* ── 4. La cabecera de ficha: la frase-respuesta debajo del H1, en tinta y a 18; las acciones a la derecha, abajo. La cabecera, más junta
   (la fila nueva no debe alejar la primera cifra: ≤ 330 px a 1.440) ───────────────────────────────────────────────────────────── */
.sv .masthead > .cab { padding-top: var(--sp-2); }
.sv .cab .migas { margin-bottom: 2px; }
.sv .cab:not(.masthead > .cab) { padding-bottom: var(--sp-4); }
.sv .masthead { padding-bottom: var(--sp-3); }
.sv .masthead + .cuerpo, .sv .cab:not(.masthead > .cab) ~ .cuerpo { margin-top: var(--sp-6); }
.sv .cab:not(.masthead > .cab) + .cf { margin-top: var(--sp-3); }   /* en una página de sección (mercado: 337 px hasta la 1.ª cifra), la fila más cerca de la cabecera: ≤ 330 */
.sv .cab .migas { font-size: var(--fs-nota); }
.sv .rotulo { font-size: var(--fs-rotulo); letter-spacing: 0.08em; color: var(--color-texto-3); }
.sv .rotulo b { color: var(--color-numero); }
.sv .entradilla { font-size: var(--v3-fs-respuesta); line-height: 1.45; color: var(--color-texto); max-width: var(--v3-medida-respuesta); text-wrap: pretty; }
.sv .entradilla b { font-weight: 600; }
.sv .perimetro { font-size: var(--fs-nota); color: var(--color-texto-3); }
.sv .perimetro b { color: var(--color-texto-2); }
@media (min-width: 1024px) {
    .sv .cab:has(> div > .h1) { align-items: start; row-gap: 2px; }
    .sv .cab:has(> div > .h1) > div > .entradilla { grid-column: 1; grid-row: 4; margin: var(--sp-2) 0 0; color: var(--color-texto); }
    .sv .cab:has(> div > .h1) > div > .perimetro { grid-row: 5; margin-top: 6px; }
    .sv .cab:has(> div > .h1) > .cab-acc { grid-column: 2; grid-row: 3 / span 3; align-self: end; justify-content: flex-end; }
    .sv .cab:has(> div > .h1):not(:has(> div > .entradilla)) > .cab-acc { grid-row: 3 / span 2; align-self: end; }
}
@media (max-width: 767px) { .sv .entradilla { font-size: var(--v3-fs-respuesta); } }

/* ── 5. El índice lateral: sin fondo, una raya; los números en gris ───────────────────────────────────────────────────────── */
.sv .idx a { padding: 5px 0 5px 12px; border-radius: 0; color: var(--color-texto-2); }
.sv .idx a b { color: var(--color-texto-3); font-weight: 500; min-width: 1.5em; }
.sv .idx a:hover { background: none; color: var(--color-texto-fuerte); border-left-color: var(--color-borde-fuerte); }
.sv .idx a[aria-current] { background: none; color: var(--color-texto-fuerte); font-weight: 600; border-left-color: var(--color-acento); }
.sv .idx a[aria-current] b { color: var(--color-acento); font-weight: 600; }
.sv .idx-t { color: var(--color-texto-3); }

/* ── 6. Tablas que se escanean: la cabecera en minúscula a 13 (sin mayúsculas espaciadas), la regla de tinta arriba ─────────── */
.sv .td-marco { border-top: var(--v3-regla); }
.sv .td thead th { font-size: var(--v3-fs-tabla-cab); letter-spacing: 0; text-transform: none; color: var(--color-texto-2); }
.sv .td thead th button { letter-spacing: 0; text-transform: none; }
.sv .td .sub { font-size: var(--fs-nota); }
.tabla-marco { border-top: var(--v3-regla); }
.tabla thead th { font-size: var(--v3-fs-tabla-cab); letter-spacing: 0; text-transform: none; color: var(--color-texto-2); }
.sv .cmp2 .tabla thead th, .sv .cmp2 .tabla:not(.tabla-tarjetas) thead th { font-size: var(--v3-fs-tabla-cab); letter-spacing: 0; text-transform: none; }
.lp-tabla thead th { font-size: var(--v3-fs-tabla-cab); letter-spacing: 0; text-transform: none; color: var(--color-texto-2); }
.lp-tabla { border-top: var(--v3-regla); }
/* la tabla del explorador (explorador.css carga después y pone sus propias mayúsculas): una regla más específica */
.sv .exp2 .tabla-explorador > thead > tr > th { font-size: var(--v3-fs-tabla-cab); letter-spacing: 0; text-transform: none; color: var(--color-texto-2); }
.sv .exp2 .tabla-explorador > thead > tr > th[aria-sort] { color: var(--color-acento); }

/* ── 7. Botones y mandos, planos; lo activo, en marino sin sombra ──────────────────────────────────────────────────────────── */
.boton-primario { box-shadow: none; }
.boton-primario:hover { box-shadow: none; }
.boton-secundario { box-shadow: none; }
.cuenta-opcion[aria-current] { box-shadow: 0 0 0 1px var(--color-borde-fuerte); }
.sv .seg:not(.gf-mandos .seg) :is(button[aria-pressed="true"], a[aria-current]) { box-shadow: 0 0 0 1px var(--color-borde-fuerte); }
.res-densidad button[aria-pressed="true"] { box-shadow: none; }
.caja-fila { box-shadow: var(--sombra-tarjeta); }
.caja-fila:focus-within { box-shadow: var(--foco-anillo); }

/* ── 8. El hueco: lo que no consta, en su sitio y con la misma forma en toda la web (qué falta · por qué · qué puedes hacer) ─── */
.vacio { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px var(--sp-3); align-items: start; text-align: left; padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--color-borde-fuerte); border-radius: var(--radio-m); color: var(--color-texto-2); }
.vacio-icono { grid-row: 1 / span 2; width: 16px; height: 16px; margin: 3px 0 0; color: var(--color-texto-3); }
.vacio-titulo { font-size: var(--fs-16); margin: 0; }
.vacio-cuerpo { margin: 0; max-width: 60ch; font-size: var(--fs-14); }
.vacio-cuerpo .acciones { justify-content: flex-start; margin-top: var(--sp-2); }
.sv .gf-vacio-3 { border-color: var(--color-borde-fuerte); }

/* ── 9. La cabecera y el pie del sitio: las secciones a 15, el pie más calmado ────────────────────────────────────────────── */
@media (min-width: 1001px) { .nav-sitio a { font-size: var(--e1-15); letter-spacing: 0.005em; } }
.pie-rejilla { padding-top: var(--sp-10); }
.pie-titulo { font-size: var(--fs-12); letter-spacing: 0.1em; color: var(--color-texto-3); }
.pie-sobre p { font-size: var(--fs-14); color: var(--color-texto-2); }
.pie-cita-texto { color: var(--color-texto-2); }
:root[data-paleta="b"]:not([data-tema="oscuro"]) .pie-sitio .pie-titulo { color: var(--banda-texto-3); }

/* ── 10. Notas y procedencia: la misma voz gris en toda la web ────────────────────────────────────────────────────────────── */
.sv .nota { color: var(--color-texto-2); }
.sv .procedencia { font-size: var(--fs-dato); }
.sv .procedencia .procedencia-titulo, .procedencia-titulo { color: var(--color-texto-3); letter-spacing: 0.08em; }
.sv .linea-aviso { border-left-color: var(--color-borde-fuerte); }
.sv .gf-lectura > summary b { font-weight: 600; }

/* ── Impresión: sin sombras ni cajas tampoco en papel ───────────────────────────────────────────────────────────────────── */
@media print { .sv .cf, .kpis, .importes-panel { border-top: 2px solid #000; } }
