/* rAutomation · datos abiertos (España Automatiza, Atlas, mapa y bloque de portada).
   Hereda la tipografía del tema (Mont). Reglas de la casa: tinta #0C0C0C, etiquetas planas #ADCDFD, bloques negros,
   esquinas rectas, sin sombras ni degradados. Marca: azul #386FF5 y verde #6CE846 como acento.
   Presentación de base de datos: barra de vistas y filtros, tabla con cabecera fija y anchos fijos, lista de registros en
   móvil (< 600 px), columnas, mapa y ficha lateral. Sistema común: filas de 44 px (una línea) o 60 px (dos), cabecera de
   44 px, etiquetas de 22 px, metadatos ≥ 13 px. */
.ram-datos { --ra-tinta: #0C0C0C; --ra-texto: #555; --ra-meta: #6B6B6B; --ra-linea: #EDEDED; --ra-linea2: #CECECE; --ra-fondo: #F5F5F5;
  --ra-celeste: #ADCDFD; --ra-azul: #386FF5; --ra-azul-txt: #0056BD; --ra-verde: #6CE846; --ra-sel: #F2F6FF;
  color: var(--ra-tinta); font-size: 16px; line-height: 1.6; margin: 0 0 40px; }
.ram-datos *, .ram-datos *::before, .ram-datos *::after { box-sizing: border-box; }
.ram-datos a { color: var(--ra-tinta); }
.ram-datos p { margin: 0 0 10px; }
.ram-datos [hidden] { display: none !important; }
.ram-datos a:focus-visible, .ram-datos button:focus-visible, .ram-datos input:focus-visible, .ram-datos select:focus-visible, .ram-datos tr:focus-visible { outline: 2px solid var(--ra-azul); outline-offset: -2px; }
.ram-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* etiquetas (como las de sección del tema) y estados */
.ram-tag { display: inline-block; height: 22px; line-height: 22px; padding: 0 8px; margin: 0 6px 4px 0; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--ra-linea); color: var(--ra-tinta); vertical-align: middle; }
.ram-tag--tipo { background: var(--ra-celeste); }
.ram-tag--coincide { box-shadow: inset 0 -2px 0 var(--ra-azul); }
.ram-tag--nc { background: #fff; color: var(--ra-texto); font-weight: 400; box-shadow: inset 0 0 0 1px var(--ra-linea2); }
.ram-estado { display: inline-flex; align-items: center; gap: 7px; height: 22px; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle; }
.ram-estado::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--ra-linea2); }
.ram-estado--instalado::before { background: var(--ra-verde); }
.ram-estado--piloto::before { background: var(--ra-azul); }
.ram-estado--en-marcha::before { background: var(--ra-celeste); }
.ram-estado--anunciado::before { background: #fff; box-shadow: inset 0 0 0 2px var(--ra-tinta); }
.ram-nd { color: #9A9A9A; }
.ram-mas { display: inline-block; height: 22px; padding: 0 6px; margin: 0 0 4px; border: 1px solid var(--ra-linea2); border-radius: 0; background: #fff; color: var(--ra-tinta); font: inherit; font-size: 12px; font-weight: 600; line-height: 20px; vertical-align: middle; cursor: pointer; }
.ram-mas:hover { border-color: var(--ra-tinta); }
.ram-mas--txt { border: 0; padding: 0; color: var(--ra-meta); cursor: inherit; }
.ram-tag--extra { display: none; }
.es-abierta > .ram-tag--extra { display: inline-block; }
.es-abierta > .ram-mas { display: none; }
.ram-vermas, .ram-volver a { display: inline-block; font-size: 12px; line-height: 22px; padding: 0 8px; background: var(--ra-celeste); color: var(--ra-tinta) !important; text-decoration: none !important; }
.ram-vermas:hover, .ram-volver a:hover { background: var(--ra-tinta); color: #fff !important; }
.ram-volver { margin: 0 0 24px !important; }
.ram-volver a::before { content: "< "; }

/* banda de cifras */
.ram-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 32px; padding: 0; list-style: none; border-top: 3px solid var(--ra-tinta); border-bottom: 1px solid var(--ra-linea2); }
.ram-cifras li { margin: 0; padding: 10px 16px 12px 0; display: flex; align-items: baseline; gap: 10px; }
.ram-cifras li + li { padding-left: 16px; border-left: 1px solid var(--ra-linea2); }
.ram-cifras a { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.ram-cifras a:hover span { text-decoration: underline; }
.ram-cifras strong { flex: none; font-size: 32px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ram-cifras span { font-size: 14px; color: var(--ra-texto); line-height: 1.3; }

/* barra de base de datos */
.ram-barra { margin: 0 0 16px; }
.ram-barra__fila { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ram-barra__fila:first-child { border-bottom: 1px solid var(--ra-tinta); margin-bottom: 14px; flex-wrap: nowrap; }
.ram-vistas { display: flex; gap: 28px; }
.ram-vistas a { display: block; padding: 0 0 10px; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--ra-meta); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ram-vistas a:hover { color: var(--ra-tinta); }
.ram-vistas a.es-activa { color: var(--ra-tinta); border-bottom-color: var(--ra-tinta); }
.ram-cuenta { margin: 0 0 10px auto !important; font-size: 14px; color: var(--ra-texto); white-space: nowrap; }
.ram-cuenta strong { color: var(--ra-tinta); font-weight: 800; font-size: 16px; }
.ram-modo { display: none; margin: 0 0 8px; padding: 0 0 2px; border: 0; border-bottom: 1px solid var(--ra-tinta); border-radius: 0; background: none; color: var(--ra-tinta); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ram-barra__filtros { justify-content: flex-start; }
.ram-campo { display: flex; flex-direction: column; flex: 1 1 150px; min-width: 0; margin: 0; }
.ram-campo--buscar { flex: 2 1 220px; }
.ram-campo > span { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ra-meta); margin: 0 0 4px; }
.ram-campo select, .ram-campo input { width: 100%; height: 40px; margin: 0; padding: 0 12px; font: inherit; font-size: 14px; letter-spacing: 0; color: var(--ra-tinta); background: #fff; border: 1px solid var(--ra-linea2); border-radius: 0; box-shadow: none; -webkit-appearance: none; appearance: none; }
.ram-campo select { padding-right: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%230C0C0C'/%3E%3C/svg%3E") no-repeat right 12px center; text-overflow: ellipsis; }
.ram-campo select:hover, .ram-campo input:hover { border-color: var(--ra-tinta); }
.ram-campo select.es-activo, .ram-campo input.es-activo { border-color: var(--ra-tinta); box-shadow: inset 0 -3px 0 var(--ra-azul); font-weight: 600; }
.ram-aplicar { height: 40px; padding: 0 22px; border: 0; border-radius: 0; background: var(--ra-celeste); color: var(--ra-tinta); font: inherit; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.ram-aplicar:hover { background: var(--ra-tinta); color: #fff; }
.ram-quitar { align-self: center; font-size: 13px; font-weight: 600; padding: 18px 0 0; }
.ram-datos.js .ram-aplicar { display: none; }
.ram-filtrar, .ram-mostrar, .ram-panelf__cab { display: none; }
.ram-activos { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.ram-activo { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; background: var(--ra-celeste); font-size: 13px; font-weight: 600; text-decoration: none; }
.ram-activo:hover { background: var(--ra-tinta); color: #fff !important; }

/* tabla: anchos fijos, una línea por celda, cabecera fija */
.ram-tabla-caja { position: relative; border: 1px solid var(--ra-linea2); background: #fff; }
.ram-tabla { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; line-height: 22px; }
.ram-tabla th, .ram-tabla td { height: 44px; padding: 11px 12px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--ra-linea); border-right: 1px solid #F3F3F3; background: #fff; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ram-tabla thead th { position: sticky; top: 0; z-index: 2; padding: 0; height: 44px; background: var(--ra-fondo); border-bottom: 1px solid var(--ra-tinta); font-size: 13px; font-weight: 600; }
.ram-tabla thead th a, .ram-tabla thead th > span { display: flex; align-items: center; gap: 6px; height: 43px; padding: 0 12px; text-decoration: none; color: var(--ra-tinta); overflow: hidden; }
.ram-tabla thead th a { position: relative; }
.ram-tabla thead th a::after { content: "↕"; position: absolute; right: 3px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ra-meta); opacity: 0; }
.ram-tabla thead th a:hover::after, .ram-tabla thead th a:focus-visible::after { opacity: 1; }
.ram-tabla thead th[aria-sort] { background: #E9EFFB; }
.ram-tabla thead th[aria-sort="ascending"] a::after { content: "↑"; color: var(--ra-tinta); opacity: 1; font-weight: 800; }
.ram-tabla thead th[aria-sort="descending"] a::after { content: "↓"; color: var(--ra-tinta); opacity: 1; font-weight: 800; }
.ram-tabla thead .ram-c-num a { justify-content: flex-end; }
.ram-w-prim { width: 265px; } .ram-w-emp { width: 160px; } .ram-w-est { width: 105px; } .ram-w-tec { width: 200px; } .ram-w-sec { width: 175px; } .ram-w-lug { width: 225px; } .ram-w-fec { width: 100px; }
.ram-w-nom { width: 180px; } .ram-w-tipo { width: 160px; } .ram-w-sede { width: 110px; } .ram-w-tec2 { width: 185px; } .ram-w-pres { width: 190px; } .ram-w-sec2 { width: 195px; } .ram-w-num { width: 105px; }
.ram-tabla .ram-c-prim { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--ra-linea2); white-space: normal; }
.ram-tabla thead .ram-c-prim { z-index: 3; }
.ram-tabla tbody .ram-c-prim { font-weight: 600; }
.ram-tabla tbody .ram-c-prim a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ram-tabla tbody tr[data-id] { cursor: pointer; }
.ram-tabla tbody tr[data-id]:hover > * { background: var(--ra-sel); }
.ram-tabla tbody tr.es-actual > * { background: var(--ra-sel); box-shadow: inset 0 2px 0 var(--ra-azul), inset 0 -2px 0 var(--ra-azul); }
.ram-tabla tbody tr:hover .ram-c-prim a { text-decoration: underline; text-decoration-color: var(--ra-azul); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ram-tabla .ram-c-tags { text-overflow: clip; }
.ram-tabla .ram-c-tags .ram-tag { margin-bottom: 0; }
.ram-tag--ajuste { display: none; }
.es-abierta > .ram-tag--ajuste { display: inline-block; }
.ram-tabla .ram-c-tags.es-abierta { white-space: normal; }
.ram-tabla .ram-c-tags.es-abierta .ram-tag { margin-bottom: 4px; }
.ram-tabla .ram-c-texto { color: var(--ra-texto); }
.ram-tabla .ram-c-num { text-align: right; font-variant-numeric: tabular-nums; }
.ram-tabla .ram-c-fecha { color: var(--ra-texto); font-variant-numeric: tabular-nums; }
.ram-tabla .ram-cero { color: #444; }
.ram-tabla .ram-c-num { padding-left: 8px; padding-right: 12px; }
.ram-tabla thead .ram-c-num a { padding: 0 14px 0 6px; }
.ram-tabla thead th:last-child a, .ram-tabla thead .ram-c-fecha a { white-space: normal; line-height: 15px; }
/* columnas de texto que pueden ocupar dos líneas */
.ram-tabla td.ram-c-sec, .ram-tabla td.ram-c-pres, .ram-tabla td.ram-c-sede, .ram-tabla td.ram-c-emp { white-space: normal; }
.ram-tabla td.ram-c-sec > span, .ram-tabla td.ram-c-pres > span, .ram-tabla td.ram-c-emp > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ram-tabla td.ram-c-sede { display: table-cell; }
.ram-tabla .ram-c-est, .ram-tabla .ram-c-fecha { padding-left: 10px; padding-right: 8px; }
.ram-tabla td.ram-c-tipo { padding-left: 10px; padding-right: 6px; }
.ram-tabla .ram-c-est .ram-estado { font-size: 12.5px; gap: 6px; }
.ram-tabla .ram-c-est .ram-estado::before { width: 9px; height: 9px; }
.ram-tabla tr.ram-oculta { display: none; }
.ram-grupo__cab th { position: sticky; left: 0; height: auto !important; padding: 14px 12px 8px !important; background: #fff !important; border-top: 2px solid var(--ra-tinta); font-size: 13px; color: var(--ra-texto); cursor: default; white-space: normal !important; }
.ram-grupo__cab strong { color: var(--ra-tinta); font-weight: 800; }
.ram-grupo__cab span { display: inline-block; min-width: 22px; margin-left: 6px; padding: 0 6px; background: var(--ra-fondo); color: var(--ra-tinta); font-weight: 600; text-align: center; }
.ram-vacio { padding: 18px 20px; background: var(--ra-fondo); font-size: 15px; margin: 12px 0 !important; }
.ram-paginas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 0; font-size: 14px; color: var(--ra-texto); }
.ram-paginas button { height: 40px; padding: 0 18px; border: 1px solid var(--ra-tinta); border-radius: 0; background: #fff; color: var(--ra-tinta); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.ram-paginas button:hover { background: var(--ra-tinta); color: #fff; }

/* columnas (vista por estado o por tipo) */
.ram-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.ram-kanban--ancha { grid-auto-columns: 260px; }
.ram-kanban__col { background: var(--ra-fondo); padding: 12px; min-width: 0; }
.ram-kanban__cab { display: flex; align-items: center; gap: 4px; margin: 0 0 12px !important; padding: 0; font-size: 13px !important; line-height: 1 !important; font-weight: 600; }
.ram-kanban__cab .ram-tag { margin: 0; }
.ram-kanban__cab span[data-ram-kn] { color: var(--ra-meta); margin-left: 6px; }
.ram-kanban ul { margin: 0; padding: 0; list-style: none; }
.ram-tarjeta { margin: 0 0 8px; padding: 0; }
.ram-tarjeta a { display: block; padding: 12px 14px; background: #fff; border: 1px solid #E2E2E2; text-decoration: none; }
.ram-tarjeta a:hover { border-color: var(--ra-tinta); }
.ram-tarjeta__titulo { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.ram-tarjeta__meta { display: block; font-size: 13px; line-height: 1.35; color: var(--ra-texto); margin: 0 0 8px; }
.ram-tarjeta__tags { display: block; }
.ram-tarjeta__fecha { display: block; font-size: 13px; color: var(--ra-meta); }

/* mapa */
.ram-datos-proyectos [data-ram-vista-panel="mapa"]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.ram-mapa-caja { margin: 0 0 20px; }
.ram-mapa { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ram-tesela { display: flex; flex-direction: column; justify-content: space-between; min-height: 74px; padding: 7px 7px 6px; font-size: 11px; line-height: 1.15; font-weight: 600; overflow-wrap: normal; word-break: normal; hyphens: auto; text-decoration: none; color: var(--ra-tinta); background: var(--ra-fondo); }
.ram-tesela strong { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ram-tesela:hover { outline: 2px solid var(--ra-tinta); outline-offset: -2px; }
.ram-datos .ram-n0 { color: var(--ra-meta); }
.ram-datos .ram-n1 { background: #DCE8FE; }
.ram-datos .ram-n2 { background: var(--ra-celeste); }
.ram-datos .ram-n3 { background: var(--ra-azul); color: #fff; }
.ram-datos .ram-n4 { background: var(--ra-tinta); color: #fff; }
.ram-mapa-leyenda { display: flex; align-items: center; gap: 3px; margin: 10px 0 0 !important; font-size: 13px; color: var(--ra-meta); }
.ram-mapa-leyenda .ram-tesela { display: inline-block; min-height: 0; width: 18px; height: 12px; padding: 0; }
.ram-mapa-leyenda .ram-n0 { margin-right: 2px; }
.ram-mapa-leyenda .ram-n1 { margin-left: 8px; }
.ram-tabla--mapa { table-layout: auto; }
.ram-tabla--mapa tbody tr { cursor: default; }
.ram-tabla--mapa .ram-c-prim { position: static; width: 34%; }
.ram-tabla--mapa td.ram-c-tags { white-space: normal; }

/* registro (ficha) */
.ram-registro { max-width: 820px; display: flex; flex-direction: column; }
.ram-registro > * { order: 4; }
.ram-registro > .ram-registro__cab { order: 1; }
.ram-registro > .ram-registro__resumen { order: 2; }
.ram-registro > .ram-registro__campos { order: 3; }
.ram-registro__clave { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 6px !important; font-size: 16px; }
.ram-registro__clave strong { font-weight: 600; }
.ram-registro__meta { margin: 0 !important; font-size: 14px; color: var(--ra-texto); }
.ram-registro__cab { margin: 0 0 18px; }
.ram-registro__antetitulo { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ra-meta); margin: 0 0 8px !important; }
.ram-registro__titulo { font-size: 30px !important; font-weight: 800 !important; line-height: 1.15 !important; margin: 0 0 14px !important; letter-spacing: -.005em; }
.ram-registro__titulo a { text-decoration: none; }
.ram-registro__tags { margin: 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ram-registro__tags .ram-tag { margin: 0; }
.ram-registro__tags .ram-estado { margin-right: 8px; }
.ram-registro__resumen { font-size: 17px; line-height: 1.6; color: var(--ra-texto); margin: 0 0 22px !important; }
.ram-registro__campos { margin: 0 0 26px; border-top: 1px solid var(--ra-tinta); }
.ram-registro__fila { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ra-linea); }
.ram-registro__fila dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ra-meta); padding-top: 3px; }
.ram-registro__fila dd { margin: 0; font-size: 15px; line-height: 1.5; }
.ram-registro__fila dd .ram-tag { margin-bottom: 4px; }
.ram-registro a:not(.ram-vermas) { text-decoration: underline; text-decoration-color: var(--ra-azul); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ram-registro .ram-registro__titulo a { text-decoration: none; }
.ram-registro__sub { font-size: 13px !important; font-weight: 600 !important; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3 !important; margin: 0 0 12px !important; padding-top: 10px; border-top: 3px solid var(--ra-tinta); }
.ram-cifras-reg { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; margin: 0 0 26px; padding: 0; list-style: none; }
.ram-cifras-reg li { margin: 0 0 12px; }
.ram-cifras-reg strong { display: block; font-size: 26px; font-weight: 800; line-height: 1.15; }
.ram-cifras-reg span { display: block; font-size: 13px; color: var(--ra-texto); }
.ram-fuentes { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: f; }
.ram-fuentes li { counter-increment: f; position: relative; margin: 0; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--ra-linea); font-size: 15px; font-weight: 600; line-height: 1.4; }
.ram-fuentes li::before { content: counter(f, decimal-leading-zero); position: absolute; left: 0; top: 11px; font-size: 13px; font-weight: 400; color: var(--ra-meta); }
.ram-fuentes span { display: block; font-size: 13px; font-weight: 400; color: var(--ra-meta); margin-top: 2px; }
.ram-fuentes .ram-acredita { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--ra-tinta); font-weight: 600; }
.ram-fuentes .ram-acredita .ram-estado { margin: 0; color: var(--ra-tinta); }

/* ficha lateral */
.ram-velo { position: fixed; inset: 0; z-index: 99998; background: rgba(12, 12, 12, .45); }
.ram-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999; width: 600px; max-width: 100%; background: #fff; display: flex; flex-direction: column; color: var(--ra-tinta); font-size: 16px; line-height: 1.6; }
.ram-panel:focus { outline: 0; }
.ram-panel__barra { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 24px; height: 56px; flex: none; background: var(--ra-tinta); color: #fff; font-size: 13px; }
.ram-panel__pos { flex: 1; font-variant-numeric: tabular-nums; color: #BDBDBD; white-space: nowrap; }
.ram-panel__barra button { height: 40px; padding: 0 12px; border: 0; border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.ram-panel__barra button:hover:not(:disabled) { background: #fff; color: var(--ra-tinta); }
.ram-panel__barra button:disabled { opacity: .35; cursor: default; }
.ram-panel__barra .ram-panel__cerrar { background: var(--ra-celeste); color: var(--ra-tinta); margin-left: 8px; }
.ram-panel__enlace { display: flex; align-items: center; gap: 14px; flex: none; margin: 0 !important; padding: 10px 32px; border-bottom: 1px solid var(--ra-linea); font-size: 13px; }
.ram-panel__enlace a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--ra-azul); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ram-panel__enlace button { padding: 0; border: 0; background: none; color: var(--ra-tinta); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.ram-panel__cuerpo { flex: 1; overflow-y: auto; padding: 24px 32px 40px; -webkit-overflow-scrolling: touch; }
.ram-panel .ram-registro__titulo { font-size: 26px !important; }
.ram-panel .ram-registro__fila { grid-template-columns: 170px minmax(0, 1fr); }
html.ram-sin-scroll { overflow: hidden; }
html.ram-sin-flotante .scrollup { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

/* pie de fuente */
.ram-pie { margin: 24px 0 0; padding: 14px 0 0; border-top: 1px solid var(--ra-linea2); font-size: 14px; line-height: 1.55; color: var(--ra-texto); }
.ram-pie p { margin: 0 0 6px; max-width: 900px; }
.ram-pie__datos { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 8px; padding: 0; list-style: none; }
.ram-pie__datos li { margin: 0; white-space: nowrap; }
.ram-pie__datos li + li::before { content: "·"; margin: 0 8px; color: var(--ra-linea2); }
.ram-pie strong { color: var(--ra-tinta); }
.ram-pie a { text-decoration: underline; }
.ram-pie abbr { text-decoration: none; border: 0; }

/* bloque de portada [ram_portada] */
/* misma separación que las demás secciones de la portada (filete fino y 48 px), como el bloque de clips */
.ram-portada { margin: 0 0 48px; padding: 0 0 48px; border-bottom: 1px solid #DDD; }
.ram-portada__cab { display: flex; align-items: center; gap: 10px; margin: 0 0 30px; }
.ram-portada__cab h2 { margin: 0 !important; font-size: 26px !important; font-weight: 600 !important; line-height: 1.2 !important; }
.ram-portada__rejilla { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 30px; }
.ram-portada__ea { background: var(--ra-tinta); color: #fff; padding: 36px 40px 30px; }
.ram-portada__ea a { color: #fff; }
.ram-portada__ante { display: inline-block; font-size: 12px; font-weight: 600; line-height: 24px; padding: 0 10px; background: var(--ra-celeste); color: var(--ra-tinta); margin: 0 0 18px !important; }
.ram-portada__cifra { margin: 0 0 8px !important; }
.ram-portada__cifra a { display: block; text-decoration: none; font-size: 30px; font-weight: 800; line-height: 1.2; max-width: 620px; }
.ram-portada__cifra strong { display: block; font-size: 88px; line-height: .95; letter-spacing: -.02em; margin-bottom: 6px; }
.ram-portada__cifra strong::after { content: "."; color: var(--ra-verde); }
.ram-portada__cifra a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ram-portada__sub { font-size: 14px; color: #BDBDBD; margin: 0 0 24px !important; }
.ram-portada__sub a { color: #fff; text-decoration: underline; }
.ram-portada__ultimos { margin: 0; padding: 0; list-style: none; border-top: 1px solid #2B2B2B; }
.ram-portada__ultimos li { margin: 0; border-bottom: 1px solid #2B2B2B; }
.ram-portada__ultimos a { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: baseline; padding: 12px 0; text-decoration: none; font-size: 16px; font-weight: 600; line-height: 1.35; }
.ram-portada__ultimos a:hover span:last-child { text-decoration: underline; }
.ram-portada__ultimos .ram-estado { color: #fff; }
.ram-portada__ultimos .ram-estado--anunciado::before { background: transparent; box-shadow: inset 0 0 0 2px #fff; }
.ram-portada__rc { border-top: 3px solid var(--ra-tinta); padding-top: 22px; }
.ram-portada__lema { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0 0 22px !important; }
.ram-portada__rc ul { margin: 0; padding: 0; list-style: none; counter-reset: rc; }
.ram-portada__rc li { counter-increment: rc; margin: 0; border-top: 1px solid var(--ra-linea); }
.ram-portada__rc li a { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; padding: 14px 0; text-decoration: none; font-size: 17px; font-weight: 600; line-height: 1.3; }
.ram-portada__rc li a::before { content: counter(rc, decimal-leading-zero) " —"; font-size: 15px; font-weight: 400; white-space: nowrap; }
.ram-portada__rc li a:hover { text-decoration: underline; }

/* tableta: la tabla se desplaza en horizontal dentro de su caja */
@media (max-width: 1259px) {
  .ram-tabla-caja { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ram-tabla { min-width: 1100px; }
  .ram-tabla--mapa { min-width: 0; }
}
@media (max-width: 991px) {
  .ram-datos-proyectos [data-ram-vista-panel="mapa"]:not([hidden]) { display: block; }
  .ram-portada__rejilla { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .ram-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 26px; }
  .ram-cifras li { padding: 10px 10px 10px 0; flex-direction: column; gap: 2px; }
  .ram-cifras a { flex-direction: column; gap: 2px; }
  .ram-cifras li + li { padding-left: 0; border-left: 0; }
  .ram-cifras li:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--ra-linea2); }
  .ram-cifras li:nth-child(n+3) { border-top: 1px solid var(--ra-linea2); }
  .ram-cifras strong { font-size: 28px; }
  .ram-cifras span { font-size: 13px; }
  .ram-vistas { gap: 18px; }
  .ram-vistas a { font-size: 15px; }
  .ram-tesela { min-height: 48px; padding: 4px; font-size: 9px; }
  .ram-tesela span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ram-tesela strong { font-size: 17px; }
  .ram-mapa { gap: 3px; }
  .ram-registro__titulo { font-size: 24px !important; }
  .ram-registro__fila, .ram-panel .ram-registro__fila { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 9px 0; }
  .ram-panel__cuerpo { padding: 20px 16px 32px; }
  .ram-panel__enlace { padding: 10px 16px; }
  .ram-panel__barra { padding-left: 14px; }
  .ram-panel__barra button { padding: 0 8px; }
  .ram-portada__ea { padding: 26px 20px 20px; }
  .ram-portada__cifra a { font-size: 22px; }
  .ram-portada__cifra strong { font-size: 64px; }
  .ram-portada__lema { font-size: 20px; }
  .ram-portada__ultimos li:nth-child(3) { display: none; }
  .ram-portada__ultimos a { grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 15px; }
  .ram-pie { padding-right: 0; }
}

/* móvil (< 600 px): lista de registros; la tabla queda como vista opcional */
@media (max-width: 599px) {
  .ram-barra__fila:first-child { flex-wrap: wrap; row-gap: 4px; }
  .ram-cuenta { order: 3; flex: 1 0 100%; margin: 0 0 10px !important; }
  .ram-modo { order: 2; margin-left: auto; }
  .ram-datos.js .ram-modo:not([hidden]) { display: inline-block; }
  .ram-pie__datos { display: block; }
  .ram-pie__datos li { white-space: normal; }
  .ram-pie__datos li + li::before { content: none; }
  .ram-barra__filtros { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ram-datos.js .ram-barra__filtros { grid-template-columns: minmax(0, 1fr) auto; }
  .ram-datos.js .ram-filtrar { display: block; height: 40px; padding: 0 14px; border: 1px solid var(--ra-tinta); border-radius: 0; background: #fff; color: var(--ra-tinta); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; align-self: end; }
  .ram-datos.js .ram-filtrar.es-activo { background: var(--ra-celeste); }
  .ram-datos.js .ram-barra:not(.es-abierta) .ram-barra__filtros > .ram-campo:not(.ram-campo--buscar),
  .ram-datos.js .ram-barra:not(.es-abierta) .ram-quitar { display: none; }
  /* filtros abiertos: panel completo con «Mostrar N» */
  .ram-datos.js .ram-barra.es-abierta .ram-barra__filtros { position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 14px; margin: 0; padding: 0 16px 16px; background: #fff; overflow-y: auto; }
  .ram-datos.js .ram-barra.es-abierta .ram-panelf__cab { display: flex; align-items: center; justify-content: space-between; height: 56px; margin: 0 -16px; padding: 0 8px 0 16px; background: var(--ra-tinta); color: #fff; font-size: 16px; flex: none; }
  .ram-panelf__cab button { height: 40px; padding: 0 12px; border: 0; border-radius: 0; background: var(--ra-celeste); color: var(--ra-tinta); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .ram-datos.js .ram-barra.es-abierta .ram-campo { flex: none; }
  .ram-datos.js .ram-barra.es-abierta .ram-filtrar { display: none; }
  .ram-datos.js .ram-barra.es-abierta .ram-quitar { padding: 4px 0; align-self: flex-start; }
  .ram-datos.js .ram-barra.es-abierta .ram-mostrar { display: block; position: sticky; bottom: 0; margin-top: auto; height: 52px; border: 0; border-radius: 0; background: var(--ra-tinta); color: #fff; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .ram-quitar { padding: 0; justify-self: start; }

  /* lista */
  .ram-base:not(.es-tabla-movil) .ram-tabla-caja { border: 0; border-top: 2px solid var(--ra-tinta); overflow: visible; }
  .ram-base:not(.es-tabla-movil) .ram-tabla { display: block; min-width: 0; width: auto; table-layout: auto; }
  .ram-base:not(.es-tabla-movil) .ram-tabla colgroup, .ram-base:not(.es-tabla-movil) .ram-tabla thead { display: none; }
  .ram-base:not(.es-tabla-movil) .ram-tabla tbody { display: block; }
  .ram-base:not(.es-tabla-movil) .ram-tabla tr[data-id] { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 0; row-gap: 4px; min-height: 80px; padding: 13px 0 14px; border-bottom: 1px solid var(--ra-linea2); }
  .ram-base:not(.es-tabla-movil) .ram-tabla tr.ram-oculta { display: none; }
  .ram-base:not(.es-tabla-movil) .ram-tabla tr[data-id] > * { display: block; height: auto; padding: 0; border: 0; background: none !important; position: static; width: auto; min-width: 0; max-width: none; font-size: 13px; line-height: 20px; box-shadow: none !important; white-space: normal; overflow: visible; text-overflow: clip; }
  /* línea 1: empresa (hasta dos líneas) y estado */
  .ram-base:not(.es-tabla-movil) .ram-c-emp { order: 1; flex: 1 1 0; font-size: 14px !important; font-weight: 600; color: var(--ra-tinta); display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden !important; }
  .ram-base:not(.es-tabla-movil) .ram-c-est { order: 2; flex: none; margin-left: 12px; }
  /* línea 2: aplicación (hasta tres líneas) */
  .ram-base:not(.es-tabla-movil) .ram-c-prim { order: 3; flex: 0 0 100%; margin: 2px 0 4px; font-size: 17px !important; line-height: 1.3 !important; }
  .ram-base:not(.es-tabla-movil) .ram-c-prim a { -webkit-line-clamp: 3; }
  /* línea 3: lugar y tecnología (puede ocupar dos líneas); el sector, entero, debajo */
  .ram-base:not(.es-tabla-movil) .ram-c-lug { order: 4; flex: 0 1 auto; color: var(--ra-texto); margin-right: 10px; line-height: 22px !important; }
  .ram-base:not(.es-tabla-movil) .ram-c-tags { order: 5; flex: 0 1 auto; }
  .ram-base:not(.es-tabla-movil) .ram-c-tags .ram-tag { margin: 0 4px 4px 0; }
  .ram-base:not(.es-tabla-movil) .ram-c-tags .ram-tag--ajuste { display: none; }
  .ram-base:not(.es-tabla-movil) .ram-c-tags .ram-mas { display: none; }
  .ram-base:not(.es-tabla-movil) .ram-tabla--proyectos .ram-c-sec { order: 6; flex: 0 0 100%; color: var(--ra-meta); }
  .ram-base:not(.es-tabla-movil) .ram-c-fecha, .ram-base:not(.es-tabla-movil) .ram-c-num { display: none !important; }
  /* Atlas: tipo y sede; nombre; tecnologías; «Presencia en …» */
  .ram-base:not(.es-tabla-movil) .ram-c-tipo { order: 1; flex: none; margin-right: 10px; }
  .ram-base:not(.es-tabla-movil) .ram-c-sede { order: 2; flex: 1 1 0; color: var(--ra-texto); line-height: 22px !important; }
  .ram-base:not(.es-tabla-movil) .ram-tabla--actores .ram-c-tags { order: 4; flex: 0 0 100%; }
  .ram-base:not(.es-tabla-movil) .ram-c-pres { order: 5; flex: 0 0 100%; color: var(--ra-meta); }
  .ram-base:not(.es-tabla-movil) .ram-c-pres > span::before { content: "Presencia en "; }
  .ram-base:not(.es-tabla-movil) .ram-tabla--actores .ram-c-sec { display: none !important; }
  .ram-base:not(.es-tabla-movil) .ram-c-tags:has(> .ram-nd), .ram-base:not(.es-tabla-movil) .ram-c-pres:has(> .ram-nd), .ram-base:not(.es-tabla-movil) .ram-c-sec:has(> .ram-nd), .ram-base:not(.es-tabla-movil) .ram-c-sede:has(> .ram-nd), .ram-base:not(.es-tabla-movil) .ram-c-lug:has(> .ram-nd) { display: none !important; }
  .ram-base:not(.es-tabla-movil) .ram-grupo { display: block; }
  .ram-base:not(.es-tabla-movil) .ram-grupo__cab { display: block; }
  .ram-base:not(.es-tabla-movil) .ram-grupo__cab th { display: block; position: static; padding: 16px 0 8px !important; border-bottom: 1px solid var(--ra-linea2); }
  /* ficha en móvil: lo que acredita, antes */
  .ram-registro > .ram-registro__resumen { order: 4; }
  /* tabla opcional en móvil */
  .ram-base.es-tabla-movil .ram-tabla { font-size: 13px; min-width: 980px; }
  .ram-base.es-tabla-movil .ram-w-prim, .ram-base.es-tabla-movil .ram-w-nom { width: 170px; }
  .ram-kanban, .ram-kanban--ancha { grid-auto-columns: 84%; }
  .ram-paginas { flex-direction: column; align-items: stretch; text-align: center; }
}
@media print { .ram-barra, .ram-panel, .ram-velo { display: none !important; } .ram-tabla-caja { overflow: visible; } }

/* textos de página alrededor de los datos (fuera de .ram-datos) */
.ram-entradilla { font-size: 20px !important; line-height: 1.5 !important; color: #555; max-width: 860px; margin: 0 0 32px !important; }
.ram-faq { margin: 56px 0 0; color: #0C0C0C; }
.ram-faq__t { font-size: 26px !important; font-weight: 600 !important; line-height: 1.2 !important; margin: 0 0 8px !important; padding-top: 14px; border-top: 3px solid #0C0C0C; }
.ram-faq__lista { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.ram-faq__item h3 { font-size: 17px !important; font-weight: 600 !important; line-height: 1.3 !important; margin: 18px 0 8px !important; }
.ram-faq__item p { font-size: 15px; line-height: 1.6; color: #555; margin: 0; }
@media (max-width: 991px) { .ram-faq__lista { grid-template-columns: minmax(0, 1fr); } .ram-entradilla { font-size: 17px !important; margin-bottom: 26px !important; } }
