/*
 * Tres Marías — estilos del tema.
 * Cabecera, pie, plantillas y las clases .tm-* que reutilizan los widgets de
 * Elementor y los shortcodes del tema.
 */

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text-link);
}

a:hover {
  color: var(--text-link-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: pretty;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.tm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tm-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 60;
  background: var(--sand-050);
  color: var(--ink-900);
  font-size: var(--t-sm);
  font-weight: var(--weight-bold);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}

.tm-skip:focus {
  top: 14px;
}

.tm-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* -------------------------------------------------------- barra superior */

.tm-topbar {
  background: var(--ink-900);
  color: var(--sand-200);
}

.tm-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.tm-topbar__id {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
}

.tm-lectura {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-lectura__label {
  font-size: var(--t-xs);
  color: var(--straw-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tm-lectura button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--straw-400);
  background: transparent;
  color: var(--sand-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  cursor: pointer;
  line-height: 1;
}

/*
 * El hover invierte el botón en vez de aclarar el fondo. Con «Contraste alto»
 * activado --ink-700 vale lo mismo que el fondo de la barra, así que aclararlo
 * no se notaba; y sobre el botón ya pulsado dejaba texto oscuro sobre fondo
 * oscuro, es decir, la etiqueta desaparecía justo al apuntarla.
 */
.tm-lectura button:hover,
.tm-lectura button:focus-visible {
  background: var(--straw-400);
  color: var(--ink-900);
}

.tm-lectura__menos {
  font-size: 14px;
}

.tm-lectura__mas {
  font-size: 17px;
}

.tm-lectura__contraste {
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tm-lectura__contraste[aria-pressed='true'],
.tm-lectura__contraste[aria-pressed='true']:hover {
  background: var(--straw-400);
  color: var(--ink-900);
}

/* ------------------------------------------------------------- cabecera */

.tm-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--sand-050);
  border-bottom: 1px solid var(--border-default);
}

.tm-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.tm-marca {
  text-decoration: none;
  color: var(--ink-900);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.tm-marca:hover {
  color: var(--ink-900);
}

.tm-marca__nombre {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: -0.015em;
}

.tm-marca__bajada {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-500);
  letter-spacing: 0.06em;
}

.tm-marca__logo img {
  max-height: 56px;
  width: auto;
}

.tm-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
}

.tm-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.tm-nav a:hover {
  color: var(--ink-900);
}

.tm-nav .current-menu-item > a,
.tm-nav .current_page_item > a,
.tm-nav .current-menu-parent > a,
.tm-nav .current-post-ancestor > a,
.tm-nav .tm-nav__actual > a {
  color: var(--ink-900);
  box-shadow: inset 0 -2px 0 0 var(--clay-600);
}

.tm-nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 860px) {
  .tm-nav__toggle {
    display: inline-flex;
  }

  .tm-nav {
    flex-basis: 100%;
  }

  .tm-nav[hidden] {
    display: none;
  }

  .tm-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 8px;
  }

  .tm-nav li + li a {
    border-top: 1px solid var(--border-default);
  }

  .tm-nav a {
    padding: 0;
    min-height: 52px;
  }
}

/* ------------------------------------------------------------------- pie */

.tm-footer {
  background: var(--ink-900);
  color: var(--sand-100);
  margin-top: auto;
}

.tm-footer a {
  color: var(--sand-100);
  font-size: var(--t-sm);
}

.tm-footer a:hover {
  color: var(--straw-400);
}

.tm-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(24px, 4vw, 48px);
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(20px, 3vw, 32px);
}

.tm-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-footer__texto {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.65;
  color: var(--sand-200);
  max-width: 32ch;
}

.tm-footer__resolucion {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.7;
  color: var(--straw-400);
}

.tm-footer__titulo {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--straw-400);
}

.tm-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-footer__tel {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--sand-200);
  font-family: var(--font-mono);
}

.tm-footer__firma {
  padding-bottom: clamp(16px, 3vw, 28px);
}

.tm-footer__firma p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 13vw, 150px);
  line-height: 0.85;
  font-weight: var(--weight-bold);
  letter-spacing: -0.04em;
  color: var(--sand-100);
}

/* ------------------------------------------------------ piezas del diseño */

.tm-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-600);
}

.tm-eyebrow--claro {
  color: var(--straw-400);
}

.tm-lead {
  font-family: var(--font-editorial);
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.45;
  color: var(--ink-900);
}

.tm-prose {
  font-size: var(--t-base);
  line-height: 1.75;
  color: var(--ink-700);
}

.tm-time {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-500);
}

.tm-rule {
  height: 1px;
  background: var(--border-default);
  border: 0;
  margin: 0;
}

/* encabezado de sección: 0X — Título — filete */
.tm-sechead {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tm-sechead__num {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  color: var(--clay-600);
}

.tm-sechead__titulo {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.tm-sechead__filete {
  height: 1px;
  background: var(--border-default);
  flex: 1;
}

.tm-sechead__link {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* botones */
.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--text-on-accent);
  border: 1px solid var(--accent);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tm-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-on-accent);
}

.tm-btn--secundario {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--border-strong);
}

.tm-btn--secundario:hover {
  background: var(--sand-200);
  color: var(--ink-900);
  border-color: var(--border-strong);
}

.tm-btn--contorno-claro {
  background: transparent;
  color: var(--sand-100);
  border-color: var(--straw-400);
}

.tm-btn--contorno-claro:hover {
  background: var(--ink-700);
  color: var(--sand-100);
  border-color: var(--straw-400);
}

/* etiquetas de estado */
.tm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--sand-200);
  color: var(--ink-700);
  text-decoration: none;
}

.tm-badge--accent {
  background: var(--accent-soft);
  color: var(--clay-700);
}

.tm-badge--success {
  background: #e4ecdf;
  color: var(--state-success);
}

.tm-badge--warning {
  background: #f2e6d0;
  color: var(--state-warning);
}

/* filtros de categoría */
.tm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-tag {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--ink-700);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tm-tag:hover {
  border-color: var(--ink-900);
  color: var(--ink-900);
}

.tm-tag.is-active {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: var(--sand-100);
}

/* ------------------------------------------------------------- noticias */

.tm-noticias {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 44px);
}

.tm-noticias__conteo {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  color: var(--ink-500);
}

.tm-noticias__vacio {
  margin: 0;
  font-size: var(--t-base);
  color: var(--ink-700);
}

.tm-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.tm-figura {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--sand-200);
}

.tm-figura img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-figura--4x3 {
  aspect-ratio: 4 / 3;
}

.tm-figura--16x10 {
  aspect-ratio: 16 / 10;
}

.tm-figura--21x9 {
  aspect-ratio: 21 / 9;
}

/* noticia destacada */
.tm-destacada {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
  padding-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--border-default);
}

.tm-destacada__cuerpo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.tm-destacada__titulo {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.12;
}

.tm-destacada__resumen {
  margin: 0;
  font-size: var(--t-base);
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 46ch;
}

/* rejilla de tarjetas */
.tm-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.tm-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.tm-card__titulo {
  margin: 0;
  font-size: var(--t-xl);
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.tm-card__titulo a,
.tm-destacada__titulo a {
  color: var(--ink-900);
  text-decoration: none;
}

.tm-card__titulo a:hover,
.tm-destacada__titulo a:hover {
  color: var(--clay-600);
}

.tm-card__resumen {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.65;
  color: var(--ink-700);
}

/* -------------------------------------------------------------- galería */

.tm-galeria {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
}

.tm-galeria li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.tm-galeria__pie {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--ink-700);
}

.tm-galeria .tm-figura {
  aspect-ratio: 3 / 4;
}

.tm-galeria li.es-ancha {
  grid-column: span 2;
}

.tm-galeria li.es-ancha .tm-figura {
  aspect-ratio: 16 / 9;
}

.tm-galeria li.es-cuadrada .tm-figura {
  aspect-ratio: 1;
}

@media (max-width: 560px) {
  .tm-galeria li.es-ancha {
    grid-column: span 1;
  }
}

/* ------------------------------------------------------------------ mapa */

.tm-mapa {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tm-mapa__lienzo {
  width: 100%;
  height: clamp(300px, 34vw, 420px);
  background: var(--sand-100);
}

.tm-mapa .leaflet-container {
  font-family: var(--font-body);
  background: var(--sand-100);
}

.tm-mapa .etiqueta {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-900);
}

.tm-mapa .etiqueta strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

/* --------------------------------------------------------- artículo solo */

.tm-articulo {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.tm-articulo__volver {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tm-articulo__titulo {
  margin: 0;
  font-size: clamp(32px, 5.4vw, 66px);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 26ch;
}

.tm-articulo__cuerpo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}

.tm-articulo__ficha {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tm-articulo__ficha p {
  margin: 0;
}

.tm-articulo__ficha dt {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.tm-articulo__texto {
  max-width: 66ch;
  font-size: var(--t-base);
  line-height: 1.85;
  color: var(--ink-700);
}

.tm-articulo__texto > p:first-of-type {
  font-family: var(--font-editorial);
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.45;
  color: var(--ink-900);
}

.tm-articulo__texto h2 {
  font-size: var(--t-xl);
  margin-top: 1.2em;
}

.tm-articulo__texto ul,
.tm-articulo__texto ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.75;
}

/* --------------------------------------------- cabeceras de página simple */

.tm-pagehead {
  border-bottom: 1px solid var(--border-default);
}

.tm-pagehead--oscura {
  background: var(--ink-900);
  color: var(--sand-100);
  border-bottom: 0;
}

.tm-pagehead__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: clamp(36px, 6vw, 80px);
  padding-bottom: clamp(36px, 6vw, 80px);
}

.tm-pagehead__titulo {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.tm-pagehead__bajada {
  margin: 0;
  font-size: var(--t-lg);
  line-height: 1.6;
  color: var(--ink-700);
  max-width: 56ch;
}

.tm-pagehead--oscura .tm-pagehead__bajada {
  color: var(--sand-200);
}

/* ---------------------------------------------------- plantilla genérica */

.tm-sitio {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tm-main {
  flex: 1;
}

.tm-seccion {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

.tm-paginacion {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
}

.tm-paginacion .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink-700);
}

.tm-paginacion .page-numbers.current,
.tm-paginacion .page-numbers:hover {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--sand-100);
}

/* ------------------------------------------------ Elementor: puentes CSS */

/*
 * Elementor inyecta sus propios contenedores. Estas reglas hacen que el
 * contenido de Elementor herede la tipografía y el ancho del sistema de
 * diseño sin tener que fijarlo widget por widget.
 */
.elementor-widget-text-editor {
  font-size: var(--t-base);
  line-height: 1.75;
  color: var(--ink-700);
}

.elementor-widget-text-editor p:last-child {
  margin-bottom: 0;
}

.elementor .tm-eyebrow,
.elementor .tm-lead {
  max-width: 100%;
}

/*
 * Papeles tipográficos del diseño, pensados para colgarlos de un widget de
 * Elementor con «Avanzado → Clases CSS».
 *
 * Van con doble clase (.tm-body .tm-…) para ganarle al reset de Elementor
 * —que deja los títulos con line-height:1 y sin tamaño— pero sin !important:
 * si alguien toca la tipografía desde el panel de Elementor, esa regla es más
 * específica y sigue mandando.
 *
 * El color siempre sale de una variable, nunca de un hex fijo: así el botón
 * de «Contraste alto» de la barra superior también afecta a lo hecho con
 * Elementor.
 */

.tm-body .tm-h1-hero,
.tm-body .tm-h1-hero .elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.97;
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  max-width: 15ch;
}

.tm-body .tm-h1-pagina,
.tm-body .tm-h1-pagina .elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 74px);
  line-height: 1;
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
}

.tm-body .tm-h2-seccion,
.tm-body .tm-h2-seccion .elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.tm-body .tm-h2-bloque,
.tm-body .tm-h2-bloque .elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.tm-body .tm-h2-proyecto,
.tm-body .tm-h2-proyecto .elementor-heading-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.tm-body .tm-h3,
.tm-body .tm-h3 .elementor-heading-title {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  line-height: 1.22;
  font-weight: var(--weight-bold);
  letter-spacing: -0.015em;
}

.tm-body .tm-num,
.tm-body .tm-num .elementor-heading-title {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

/* la clase .tm-eyebrow también tiene que llegar al título interior */
.tm-body .tm-eyebrow .elementor-heading-title {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: var(--weight-regular);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
}

/* colores de texto ligados al token, para que el contraste alto funcione */
.tm-body .tm-txt-principal,
.tm-body .tm-txt-principal .elementor-heading-title {
  color: var(--ink-900);
}

.tm-body .tm-txt-cuerpo,
.tm-body .tm-txt-cuerpo p {
  color: var(--ink-700);
}

.tm-body .tm-txt-suave {
  color: var(--ink-500);
}

.tm-body .tm-txt-claro,
.tm-body .tm-txt-claro .elementor-heading-title,
.tm-body .tm-txt-claro p {
  color: var(--sand-100);
}

.tm-body .tm-txt-crema,
.tm-body .tm-txt-crema p {
  color: var(--sand-200);
}

.tm-body .tm-txt-acento,
.tm-body .tm-txt-acento .elementor-heading-title {
  color: var(--clay-600);
}

/* tamaños de párrafo del diseño */
.tm-body .tm-txt-lg,
.tm-body .tm-txt-lg p {
  font-size: var(--t-lg);
  line-height: 1.6;
}

.tm-body .tm-txt-sm,
.tm-body .tm-txt-sm p {
  font-size: var(--t-sm);
  line-height: 1.5;
}

.tm-body .tm-lead-el p {
  font-family: var(--font-editorial);
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.45;
  color: var(--ink-900);
}

/* medidas de línea cómodas */
.tm-medida-44 { max-width: 44ch; }
.tm-medida-46 { max-width: 46ch; }
.tm-medida-56 { max-width: 56ch; }

/* filete corto bajo el titular del hero */
.tm-filete-hero {
  height: 1px;
  background: var(--ink-700);
  max-width: 320px;
  width: 100%;
}

/*
 * Botones hechos con el widget «Botón» de Elementor: heredan la forma del
 * sistema de diseño con solo ponerles la clase.
 */
.tm-body .tm-boton .elementor-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  background: var(--accent);
  color: var(--text-on-accent);
  border: 1px solid var(--accent);
  transition: background 0.15s ease, border-color 0.15s ease;
  fill: var(--text-on-accent);
}

.tm-body .tm-boton .elementor-button:hover,
.tm-body .tm-boton .elementor-button:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-on-accent);
}

.tm-body .tm-boton--secundario .elementor-button {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--border-strong);
  fill: var(--ink-900);
}

.tm-body .tm-boton--secundario .elementor-button:hover,
.tm-body .tm-boton--secundario .elementor-button:focus {
  background: var(--sand-200);
  color: var(--ink-900);
  border-color: var(--border-strong);
}

.tm-body .tm-boton--claro .elementor-button {
  background: transparent;
  color: var(--sand-100);
  border-color: var(--straw-400);
  fill: var(--sand-100);
}

.tm-body .tm-boton--claro .elementor-button:hover,
.tm-body .tm-boton--claro .elementor-button:focus {
  background: var(--ink-700);
  color: var(--sand-100);
  border-color: var(--straw-400);
}

/* lista de definiciones de la página de transparencia */
.tm-ficha {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--t-sm);
}

.tm-ficha > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 8px;
}

.tm-ficha > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tm-ficha dt {
  color: var(--ink-500);
}

.tm-ficha dd {
  margin: 0;
  text-align: right;
}

.tm-ficha dd.es-cifra {
  font-family: var(--font-mono);
}

/* lista «Cómo nos organizamos» */
.tm-lista-organos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.tm-lista-organos li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--border-default);
}

.tm-lista-organos li:last-child {
  border-bottom: 1px solid var(--border-default);
}

.tm-lista-organos h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.015em;
}

.tm-lista-organos p {
  margin: 0;
  font-size: var(--t-base);
  line-height: 1.7;
  color: var(--ink-700);
}

/* cifras de la portada */
.tm-cifra {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tm-cifra__valor {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--sand-100);
}

.tm-cifra__texto {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--sand-200);
}

/* bloque de reconocimiento oficial */
.tm-reconocimiento {
  background: var(--ink-900);
  color: var(--sand-100);
  border-radius: var(--radius-sm);
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-reconocimiento p:last-child {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.35;
  max-width: 34ch;
}

/* que las imágenes de Elementor recorten en vez de deformarse */
.tm-recorte img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
