/**
 * Transparencia (ronda 2) — presentación de Transparencia.dc.html sobre los tokens de tpl_emser2026.
 * Paletas: .em-pal--<clave> define --pal-tint / --pal-ink / --pal-solid / --pal-deep / --pal-glow.
 * Regla V8: «solid» solo para gráficos; texto blanco solo sobre «deep».
 * (C) 2026 EMSER E.S.P. — GPL v2 o posterior.
 */

.tr { --tr-r: 22px; --tr-card: #fff; --tr-muted: #4f6357; color: var(--em-ink); }
.tr a { text-underline-offset: .18em; }
.tr-h2 { margin: 0; font-family: var(--em-font-display); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -.02em; line-height: 1.1; }
.tr-h3 { margin: 0; font-size: 1.125rem; font-weight: 800; }
.tr-kicker { margin: 0 0 10px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; color: var(--em-brand); }
.tr-muted { color: var(--tr-muted); font-size: .9375rem; }
.tr-eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: var(--em-pill);
  background: #d8f0e3; color: #04693c; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.tr-eyebrow--pal { background: none; padding: 0; color: var(--pal-ink, var(--em-brand)); }
.tr-eyebrow a { color: inherit; text-decoration: none; }
.tr-eyebrow a:hover { text-decoration: underline; }

/* ---------- portada: cabecera y buscador ---------- */
.tr-hero {
  position: relative; overflow: hidden; margin: 0 0 28px; padding: clamp(24px, 4vw, 48px);
  border-radius: var(--em-radius-xl, 28px);
  background: radial-gradient(circle at 92% 8%, rgba(15, 169, 192, .16), transparent 42%), linear-gradient(135deg, #f1f8f4 0%, #e9f6ee 60%, #eef7f9 100%);
}
.tr-hero--compact { padding: clamp(20px, 3vw, 32px); }
.tr-hero__title { margin: 0; max-width: 18ch; font-family: var(--em-font-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.tr-hero__title--s { max-width: none; font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.tr-hero__lead { margin: 16px 0 0; max-width: 60ch; font-size: 1.0625rem; line-height: 1.6; color: var(--em-ink-2); }

.tr-search { margin-top: 22px; max-width: 620px; }
.tr-search__label { display: block; margin-bottom: 8px; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--em-brand); }
.tr-search__field {
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 16px; border-radius: var(--em-pill);
  background: #fff; box-shadow: 0 10px 28px rgba(18, 41, 31, .1), inset 0 0 0 1px rgba(18, 41, 31, .1);
}
.tr-search__field:focus-within { box-shadow: 0 10px 28px rgba(18, 41, 31, .1), 0 0 0 3px var(--em-focus); }
.tr-search__field .em-icon { flex: none; opacity: .6; }
.tr-search__field input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--em-ink); }
.tr-search__field input:focus { outline: none; }
.tr-search__btn {
  flex: none; min-height: 46px; padding: 0 22px; border: 0; border-radius: var(--em-pill); cursor: pointer;
  background: var(--em-brand); color: #fff; font: inherit; font-weight: 800;
}
.tr-search__btn:hover { background: var(--em-brand-hover); }
.tr-search__status { margin: 8px 4px 0; min-height: 1.2em; font-size: .875rem; font-weight: 600; color: var(--tr-muted); }

/* ---------- accesos rápidos ---------- */
.tr-quick { margin: 0 0 34px; }
.tr-quick__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.tr-quick__a {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 16px; border-radius: 18px;
  background: var(--pal-tint); color: var(--em-ink); text-decoration: none; transition: transform .18s var(--em-ease, ease);
}
.tr-quick__a:hover { transform: translateY(-3px); color: var(--em-ink); }
.tr-quick__ic { width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--pal-ink); display: flex; align-items: center; justify-content: center; }
.tr-quick__l { font-weight: 800; line-height: 1.25; }
.tr-quick__n { font-size: .8125rem; font-weight: 700; color: var(--pal-ink); }

/* ---------- tarjetas de categorías ---------- */
.tr-cats { margin: 0 0 34px; }
.tr-sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.tr-sechead__note { margin: 0; font-size: .875rem; font-weight: 600; color: var(--tr-muted); }
.tr-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tr-card { display: flex; }
.tr-card__a {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  padding: 20px 20px 18px; border-radius: var(--tr-r); background: var(--tr-card); color: var(--em-ink); text-decoration: none;
  border-top: 4px solid var(--pal-solid); box-shadow: 0 8px 26px rgba(18, 41, 31, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tr-card__a::before { content: ""; position: absolute; top: -60px; right: -60px; width: 150px; height: 150px; border-radius: 50%; background: var(--pal-tint); }
.tr-card__a:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(18, 41, 31, .16); color: var(--em-ink); }
.tr-card__a:hover .tr-card__t { text-decoration: underline; }
.tr-card__top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-card__ic {
  width: 50px; height: 50px; border-radius: 15px 15px 15px 24px; background: var(--pal-deep); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px var(--pal-glow);
}
.tr-card__n { font-family: var(--em-font-display); font-weight: 700; font-size: 2.125rem; line-height: 1; color: var(--pal-ink); }
.tr-card__t { position: relative; font-size: 1.125rem; font-weight: 800; line-height: 1.25; text-wrap: pretty; }
.tr-card__d { position: relative; font-size: .875rem; line-height: 1.5; color: var(--tr-muted); }
.tr-card__meta { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 2px; font-size: .8125rem; font-weight: 700; color: var(--pal-ink); }
.tr-card.is-na .tr-card__a { background: #f3f5f4; border-top-color: #7a8a82; box-shadow: inset 0 0 0 1px var(--em-line-2, rgba(18,41,31,.12)); }
.tr-card.is-na .tr-card__a::before { background: #e6ebe8; }
.tr-card.is-na .tr-card__ic { background: #5c7065; box-shadow: none; }
.tr-card.is-na .tr-card__n, .tr-card.is-na .tr-card__meta { color: #4f6357; }

/* ---------- índice completo ---------- */
.tr-index { margin: 0 0 34px; }
.tr-index__box { background: #fff; border-radius: var(--tr-r); box-shadow: 0 6px 20px rgba(18, 41, 31, .07); }
.tr-index__sum { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 60px; padding: 14px 20px; cursor: pointer; }
.tr-index__sum::-webkit-details-marker { display: none; }
.tr-index__sum .em-icon { margin-left: auto; transition: transform .2s ease; }
.tr-index__box[open] .tr-index__sum .em-icon { transform: rotate(180deg); }
.tr-index__hint { font-size: .875rem; color: var(--tr-muted); }
.tr-index__list { list-style: none; margin: 0; padding: 0; }
.tr-index__list--1 { padding: 0 20px 18px; columns: 2 380px; column-gap: 32px; }
.tr-index__list--1 > .tr-index__item { break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--em-line); }
.tr-index__list--1 > .tr-index__item > a { font-weight: 800; }
.tr-index__list--2, .tr-index__list--3 { margin: 4px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--em-line-2, rgba(18,41,31,.12)); }
.tr-index__item { font-size: .9375rem; line-height: 1.4; }
.tr-index__list--2 > .tr-index__item, .tr-index__list--3 > .tr-index__item { padding: 3px 0; }
.tr-index__item > a { color: var(--em-ink); text-decoration: none; }
.tr-index__item > a:hover { color: var(--em-brand); text-decoration: underline; }
.tr-index__n { font-family: var(--em-font-mono); font-size: .875em; color: var(--em-teal); }
.tr-index__meta { display: inline-block; margin-left: 6px; font-size: .75rem; font-weight: 700; color: var(--tr-muted); }
.tr-index__item.is-na > .tr-index__meta { color: #4f6357; }
.tr-index__item.is-pending > .tr-index__meta { color: #7f4805; }

/* ---------- banda de contratación por año ---------- */
.tr-years { margin: 0 0 34px; border-radius: var(--em-radius-xl, 28px); background: #0f2b21; color: #fff; }
.tr-years__in { display: grid; gap: 24px 48px; align-items: center; padding: clamp(26px, 4vw, 48px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.tr-years__eyebrow { margin: 0 0 10px; font-size: .75rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: #7ff0b4; }
.tr-years .tr-h2 { color: #fff; }
.tr-years__lead { margin: 10px 0 0; max-width: 46ch; line-height: 1.6; color: #cfe0d6; }
.tr-years__all { color: #7ff0b4; font-weight: 800; }
.tr-years__all:hover { color: #fff; }
.tr-years__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.tr-years__y {
  display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); color: #fff; font-weight: 800; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.tr-years__y:hover { background: #7ff0b4; color: #0b2119; }
.tr-years__y:focus-visible { outline: 3px solid #7ff0b4; outline-offset: 2px; }

/* ---------- transparencia pasiva ---------- */
.tr-ask {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin: 8px 0 12px;
  padding: clamp(22px, 3.4vw, 36px); border-radius: var(--tr-r); color: #fff;
  background: linear-gradient(120deg, #04693c 0%, #0a5c4e 55%, #0a6b78 100%);
}
.tr-ask__t { margin: 0 0 6px; font-family: var(--em-font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; color: #fff; }
.tr-ask__p { margin: 0; max-width: 58ch; color: #e6f3ec; line-height: 1.55; }
.tr-ask__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; }
.tr-ask__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; background: #fff; color: #04693c; font-weight: 800; text-decoration: none; }
.tr-ask__btn:hover { background: #d8f0e3; color: #03532f; }
.tr-ask__link { color: #fff; font-weight: 700; }
.tr-ask a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- cabecera de categoría y numeral ---------- */
.tr-cathead {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 22px; align-items: end; margin: 0 0 24px;
  padding: clamp(20px, 3.4vw, 36px); border-radius: var(--em-radius-xl, 28px);
  background: radial-gradient(circle at 95% 0%, var(--pal-tint), transparent 50%), linear-gradient(135deg, #f1f8f4, #f7faf8);
}
.tr-cathead__ic {
  width: 64px; height: 64px; border-radius: 18px 18px 18px 30px; background: var(--pal-deep); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px var(--pal-glow);
}
.tr-cathead__ic .em-icon { width: 28px; height: 28px; }
.tr-cathead__title { margin: 0; font-family: var(--em-font-display); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
.tr-cathead__title--node { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.12; text-wrap: pretty; }
.tr-cathead__lead { margin: 12px 0 0; max-width: 64ch; font-size: 1.0625rem; line-height: 1.6; color: var(--em-ink-2); }
.tr-numbadge {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 40px; padding: 0 10px;
  border-radius: 12px; background: var(--pal-deep); color: #fff; font-family: var(--em-font-sans); font-size: 1.0625rem; font-weight: 900; letter-spacing: 0;
}
.tr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.tr-badges:empty { display: none; }
.tr-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--em-pill); background: #eef1ef; color: #22382e; font-size: .75rem; font-weight: 800; }
.tr-tag--pal { background: var(--pal-tint); color: var(--pal-ink); }
.tr.is-na .tr-cathead__ic, .tr.is-na .tr-numbadge { background: #5c7065; box-shadow: none; }

/* ---------- rejilla con riel ---------- */
.tr-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) { .tr-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; } }
.tr-main { min-width: 0; }
.tr-rail--desk { display: none; }
@media (min-width: 1040px) { .tr-rail--desk { display: block; position: sticky; top: 24px; } .tr-rail--mob { display: none; } }
.tr-rail__box { padding: 14px; border-radius: var(--tr-r); background: #fff; box-shadow: 0 8px 26px rgba(18, 41, 31, .08); max-height: calc(100vh - 48px); overflow-y: auto; }
.tr-rail__all {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; margin-bottom: 10px; border-radius: 14px;
  background: var(--em-brand); color: #fff; font-size: .875rem; font-weight: 800; text-decoration: none;
}
.tr-rail__all:hover { background: var(--em-brand-hover); color: #fff; }
.tr-rail__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-rail__cat { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: #2b4038; font-size: .875rem; font-weight: 600; line-height: 1.3; text-decoration: none; }
.tr-rail__cat:hover { background: #f1f8f4; color: var(--em-brand); }
.tr-rail__n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: #eef1ef; color: #22382e; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 900; }
.tr-rail__item.is-current > .tr-rail__cat { background: var(--pal-tint); color: var(--em-ink); font-weight: 800; }
.tr-rail__item.is-current .tr-rail__n { background: var(--pal-deep); color: #fff; }
.tr-rail__subs { list-style: none; margin: 4px 0 8px 22px; padding: 0 0 0 12px; border-left: 2px solid var(--pal-tint); display: flex; flex-direction: column; gap: 1px; }
.tr-rail__sub { display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: .8125rem; line-height: 1.35; color: #2b4038; text-decoration: none; }
.tr-rail__sub:hover { background: #f1f8f4; color: var(--em-brand); }
.tr-rail__sub.is-active { background: var(--pal-tint); color: var(--em-ink); font-weight: 700; }
.tr-rail__sn { flex: none; font-weight: 800; color: var(--pal-ink); }
.tr-rail--mob { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1040px) { .tr-rail--mob { display: none; } }
.tr-rail--mob .tr-rail__all { margin: 0; }
.tr-rail__more { border-radius: 18px; background: #fff; box-shadow: 0 6px 20px rgba(18, 41, 31, .08); }
.tr-rail__more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px; cursor: pointer; font-weight: 800; }
.tr-rail__more > summary::-webkit-details-marker { display: none; }
.tr-rail__more[open] > summary .em-icon { transform: rotate(180deg); }
.tr-rail__more nav { padding: 0 10px 12px; }

/* ---------- barra de resumen y acordeón ---------- */
.tr-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.tr-bar__sum { margin: 0; font-size: .875rem; font-weight: 700; color: var(--tr-muted); }
.tr-bar__all, .tr-copy {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: #e9f6ee; color: var(--em-brand); font: inherit; font-size: .875rem; font-weight: 800;
}
.tr-bar__all:hover, .tr-copy:hover { background: #d8f0e3; }
.tr-bar__all[hidden], .tr-copy[hidden] { display: none; }
.tr-copy { background: transparent; color: var(--tr-muted); font-weight: 700; padding: 0 12px; }
.tr-desc { margin: 0 0 20px; }

.tr-acc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tr-acc__item { background: #fff; border-radius: 18px; border-left: 4px solid var(--pal-solid); box-shadow: 0 4px 16px rgba(18, 41, 31, .07); scroll-margin-top: 120px; }
.tr-acc__item.is-na { border-left-color: #9aa8a0; }
.tr-acc__item.is-pending { border-left-color: #e8940f; }
.tr-acc__h { margin: 0; font-size: inherit; }
.tr-acc__btn {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 16px 18px; border: 0; background: transparent;
  text-align: left; font: inherit; color: var(--em-ink); text-decoration: none; cursor: pointer; border-radius: 18px;
}
.tr-acc__btn:hover .tr-acc__t { color: var(--em-brand); text-decoration: underline; }
.tr-acc__n {
  flex: none; display: flex; align-items: center; justify-content: center; min-width: 52px; height: 34px; padding: 0 9px;
  border-radius: 10px; background: var(--pal-tint); color: var(--pal-ink); font-size: .875rem; font-weight: 900;
}
.tr-acc__btn[aria-expanded="true"] .tr-acc__n, .tr-acc:not(.is-js) .tr-acc__n { background: var(--pal-deep); color: #fff; }
.tr-acc__item.is-na .tr-acc__n { background: #e6ebe8; color: #4f6357; }
.tr-acc__txt { flex: 1; min-width: 0; }
.tr-acc__t { display: block; font-size: 1.03rem; font-weight: 800; line-height: 1.3; text-wrap: pretty; }
.tr-acc__m { display: block; margin-top: 3px; font-size: .8125rem; font-weight: 600; color: var(--pal-ink); }
.tr-acc__item.is-na .tr-acc__m { color: #4f6357; }
.tr-acc__item.is-pending .tr-acc__m { color: #7f4805; }
.tr-acc__chev { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #f1f8f4; display: flex; align-items: center; justify-content: center; }
.tr-acc__chev .em-icon { transition: transform .2s ease; }
.tr-acc__btn[aria-expanded="true"] .tr-acc__chev .em-icon { transform: rotate(180deg); }
.tr-acc:not(.is-js) .tr-acc__chev { display: none; }
.tr-acc__panel { padding: 0 18px 18px; }
.tr-acc__panel[hidden] { display: none; }
/* Sin salto de maquetación (CLS): con JS disponible (html.em-js, lo pone el script en línea del <head> antes del primer
   pintado) el acordeón se pinta ya plegado y con el espacio de «Abrir todo» y del chevrón reservado, en vez de pintarse
   abierto y plegarse cuando corre transparencia.js. Red de seguridad: si el script no llega a ejecutarse, los paneles
   reaparecen a los 4 s (sin JS real, html.em-nojs, todo sigue abierto desde el principio). */
html.em-js .tr-acc:not(.is-js) .tr-acc__panel { visibility: hidden; max-height: 0; overflow: hidden; padding-block: 0; animation: tr-reveal 0s 4s forwards; }
@keyframes tr-reveal { to { visibility: visible; max-height: none; overflow: visible; padding-block: 0 18px; } }
html.em-js .tr-acc:not(.is-js) .tr-acc__chev { display: flex; }
html.em-js .tr-bar__all[hidden] { display: inline-flex; visibility: hidden; }
.tr-acc__sum { margin: 0 0 10px; color: var(--em-ink-2); line-height: 1.55; }
.tr-acc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.tr-mf { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; font-size: .8125rem; color: var(--tr-muted); }
.tr-mf__k { font-weight: 800; color: #2b4038; }

.tr-sub { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--em-line-2, rgba(18,41,31,.14)); }
.tr-sub__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; font-size: 1rem; font-weight: 800; }
.tr-sub__h a { color: var(--em-ink); text-decoration: none; }
.tr-sub__h a:hover { color: var(--em-brand); text-decoration: underline; }
.tr-sub__n { font-weight: 900; color: var(--pal-ink); }
.tr-sub__m { font-size: .8125rem; font-weight: 600; color: var(--tr-muted); }

/* ---------- estados ---------- */
.tr-na, .tr-pend { display: flex; gap: 12px; margin: 0 0 14px; padding: 15px 16px; border-radius: 14px; }
.tr-na { background: #eef1ef; color: #22382e; }
.tr-pend { background: #fbe8c4; color: #3d2a04; }
.tr-na p, .tr-pend p { margin: 0; line-height: 1.55; font-size: .9375rem; }
.tr-na__t { margin: 0 0 4px; font-size: .9375rem; font-weight: 800; }
.tr-na--l .tr-na__t { font-size: 1.0625rem; }
.tr-na__ic, .tr-pend__ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tr-na__ic { background: #5c7065; }
.tr-pend__ic { background: #7f4805; }

/* ---------- botones ---------- */
.tr-golinks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tr-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: .875rem; font-weight: 800; text-decoration: none; }
.tr-btn--primary { background: var(--em-brand); color: #fff; }
.tr-btn--primary:hover { background: var(--em-brand-hover); color: #fff; }
.tr-btn--soft { background: #e9f6ee; color: var(--em-brand); }
.tr-btn--soft:hover { background: #d8f0e3; color: var(--em-brand-hover); }
.tr-btn--ghost { background: #fff; color: var(--em-brand); box-shadow: inset 0 0 0 1px rgba(18, 41, 31, .16); }
.tr-btn--ghost:hover { background: var(--em-brand); color: #fff; }
.tr-more { margin: 12px 0 0; }
.tr-more a:not(.tr-btn) { font-weight: 800; color: var(--em-brand); }

/* ---------- filas de documento ---------- */
.tr-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 13px 14px; border-radius: 14px; background: #f7faf8; }
.tr-doc.is-featured { box-shadow: inset 3px 0 0 var(--pal-solid, var(--em-brand)); }
.tr-doc__badge {
  flex: none; width: 42px; height: 46px; padding-bottom: 6px; border-radius: 9px 9px 9px 3px;
  display: flex; align-items: flex-end; justify-content: center; background: var(--pal-tint, #d8f0e3); color: var(--pal-ink, #04693c);
  font-size: .625rem; font-weight: 900; letter-spacing: .03em;
}
.tr-doc__body { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.tr-doc__title { display: inline; font-size: .9375rem; font-weight: 700; line-height: 1.35; color: var(--em-ink); overflow-wrap: anywhere; }
a.tr-doc__title { text-decoration: none; }
a.tr-doc__title:hover { color: var(--em-brand); text-decoration: underline; }
.tr-doc__flag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--em-pill); background: var(--pal-tint, #d8f0e3); color: var(--pal-ink, #04693c); font-size: .6875rem; font-weight: 800; vertical-align: 2px; }
.tr-doc__meta { margin: 3px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--tr-muted); }
.tr-doc__note { margin: 4px 0 0; font-size: .8125rem; color: var(--em-ink-2); }
.tr-doc__cta {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: #fff; color: var(--em-brand); font-size: .875rem; font-weight: 800; text-decoration: none; box-shadow: 0 0 0 1px rgba(18, 41, 31, .12);
}
.tr-doc__cta:hover { background: var(--em-brand); color: #fff; }
.tr-docyear { margin: 20px 0 8px; font-size: 1rem; font-weight: 800; color: var(--em-ink-2); }
.tr-docfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.tr-docfilter[hidden] { display: none; }
.tr-docfilter label { font-size: .875rem; font-weight: 700; }
.tr-docfilter input { flex: 1 1 220px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(18, 41, 31, .2); border-radius: 12px; font: inherit; }
.tr-docfilter__s { flex-basis: 100%; margin: 0; font-size: .8125rem; color: var(--tr-muted); min-height: 1.2em; }

/* ---------- numeral ---------- */
.tr-ficha { margin: 0 0 18px; padding: 16px 18px; border-radius: 18px; background: #fff; box-shadow: 0 4px 16px rgba(18, 41, 31, .07); }
.tr-ficha__t { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .9375rem; font-weight: 800; }
.tr-ficha__dl { display: grid; gap: 10px 20px; margin: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.tr-ficha__dl dt { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-muted); }
.tr-ficha__dl dd { margin: 2px 0 0; font-size: .9375rem; font-weight: 600; }
.tr-ficha__legal { margin: 12px 0 0; font-size: .75rem; color: var(--tr-muted); }
.tr-block { margin: 0 0 24px; padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 4px 16px rgba(18, 41, 31, .07); }
.tr-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 12px; }
.tr-block__t { margin: 0 0 12px; font-size: 1.1875rem; font-weight: 800; line-height: 1.3; }
.tr-block__head .tr-block__t { margin: 0; }
.tr-block__t a { color: var(--em-ink); text-decoration: none; }
.tr-block__t a:hover { color: var(--em-brand); text-decoration: underline; }
.tr-block__count, .tr-block__lead { margin: 0; font-size: .8125rem; font-weight: 700; color: var(--pal-ink); }
.tr-block__lead { margin: -4px 0 12px; color: var(--tr-muted); }
.tr-subsec { border-left: 4px solid var(--pal-solid); scroll-margin-top: 120px; }
.tr-subsec.is-na { border-left-color: #9aa8a0; }
.tr-subsec.is-pending { border-left-color: #e8940f; }

.tr-vig { margin: 0 0 18px; }
.tr-vig__t { margin: 0 0 8px; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tr-muted); }
.tr-vig__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-vig__y {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 64px; min-height: 44px; padding: 0 14px;
  border-radius: 12px; background: #fff; color: var(--em-ink); font-weight: 800; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(18, 41, 31, .14);
}
.tr-vig__y:hover { background: var(--pal-tint); }
.tr-vig__y.is-active { background: var(--pal-deep); color: #fff; box-shadow: none; }
.tr-vig__note { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #fdf6e8; color: #5b3f04; font-size: .875rem; }

.tr-modal { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-modal li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--em-pill); background: var(--pal-tint); color: var(--pal-ink); font-size: .8125rem; font-weight: 700; }
.tr-modal__c { padding: 0 7px; border-radius: var(--em-pill); background: #fff; }
.tr-procs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-proc { min-width: 0; padding: 13px 14px; border-radius: 14px; background: #f7faf8; overflow-wrap: anywhere; }
.tr-proc__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tr-proc__t { font-weight: 800; color: var(--em-ink); }
.tr-proc__o { margin: 4px 0 0; font-size: .9375rem; line-height: 1.45; }
.tr-proc__m { margin: 4px 0 0; font-size: .8125rem; color: var(--tr-muted); }
.tr-proc__a { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; font-size: .875rem; font-weight: 800; }
.tr-table td.tr-num { text-align: right; white-space: nowrap; }
.tr-pages { margin-top: 16px; }

/* ---------- anterior / siguiente ---------- */
.tr-pn { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 26px 0 8px; }
.tr-pn__a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: #f1f8f4; color: var(--em-ink); text-decoration: none; }
.tr-pn__a:hover { background: #e9f6ee; }
.tr-pn__a:hover .tr-pn__t { text-decoration: underline; }
.tr-pn__a--next { text-align: right; align-items: flex-end; }
.tr-pn__k { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 800; color: var(--em-brand); }
.tr-pn__t { font-weight: 800; line-height: 1.3; }
@media (max-width: 560px) { .tr-pn { grid-template-columns: minmax(0, 1fr); } .tr-pn__a--next { text-align: left; align-items: flex-start; } }

/* ---------- búsqueda ---------- */
.tr-results__count { margin: 14px 0 0; font-weight: 700; color: var(--em-ink-2); }
.tr-rgroup { margin: 0 0 18px; padding: 18px; border-radius: 18px; background: #fff; border-top: 4px solid var(--pal-solid); box-shadow: 0 4px 16px rgba(18, 41, 31, .07); }
.tr-rgroup__t { margin: 0 0 10px; font-size: 1.1875rem; font-weight: 800; }
.tr-rgroup__t a { color: var(--em-ink); }
.tr-rgroup__k { margin: 12px 0 8px; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pal-ink); }
.tr-rnodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tr-rnodes a { font-weight: 700; color: var(--em-ink); }
.tr-rnodes__n { font-family: var(--em-font-mono); color: var(--em-teal); }
.tr-rnodes__m { margin-left: 6px; font-size: .8125rem; color: var(--tr-muted); }
.tr-results__site { margin: 6px 0 24px; font-weight: 700; }
.tr-empty { margin-bottom: 24px; }

/* ---------- impresión y movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) { .tr-card__a, .tr-quick__a, .tr-acc__chev .em-icon { transition: none; } }
[data-em-motion="off"] .tr-card__a, [data-em-motion="off"] .tr-quick__a { transition: none; }
@media print {
  .tr-rail, .tr-search, .tr-bar__all, .tr-copy, .tr-ask, .tr-pn { display: none !important; }
  .tr-acc__panel[hidden] { display: block !important; }
  .tr-grid { display: block; }
}

/* ---------- alto contraste (panel de accesibilidad; a11y.css fuerza p/h2 a negro y los enlaces de main a #00341d) ----------
   Superficies oscuras y botones rellenos: texto blanco sobre negro, como em-estado en la portada. Los :not(#tr-x) elevan la
   especificidad por encima de la regla genérica de enlaces de a11y.css (0,6,3). */
html[data-em-contrast="high"] :is(.tr-years, .tr-ask) { background: #000 !important; color: #fff !important; outline: 2px solid #fff; outline-offset: -4px; }
html[data-em-contrast="high"] :is(.tr-years, .tr-ask) :is(p, h2, h3, li, span, dt, dd) { color: #fff !important; }
html[data-em-contrast="high"] main :is(.tr-years, .tr-ask) a:not(.tr-ask__btn):not(#tr-x):not(#tr-y) { color: #fff !important; }
html[data-em-contrast="high"] main .tr-years a.tr-years__y:not(#tr-x):not(#tr-y) { background: #000 !important; color: #fff !important; box-shadow: inset 0 0 0 2px #fff; text-decoration: none !important; }
html[data-em-contrast="high"] main .tr-years a.tr-years__y:not(#tr-x):not(#tr-y):hover { background: #fff !important; color: #000 !important; }
html[data-em-contrast="high"] main .tr-ask a.tr-ask__btn:not(#tr-x):not(#tr-y), html[data-em-contrast="high"] main .tr-ask a.tr-ask__btn:not(#tr-x):not(#tr-y) * { background: #fff !important; color: #000 !important; }
html[data-em-contrast="high"] main .tr a:is(.tr-rail__all, .tr-btn--primary, .tr-vig__y.is-active, .tr-btn--ghost:hover):not(#tr-x):not(#tr-y),
html[data-em-contrast="high"] main .tr a:is(.tr-rail__all, .tr-btn--primary, .tr-vig__y.is-active):not(#tr-x):not(#tr-y) :is(span, .em-icon) {
  background: #000 !important; color: #fff !important;
}
html[data-em-contrast="high"] main .tr a:is(.tr-rail__all, .tr-btn--primary, .tr-vig__y.is-active):not(#tr-x):not(#tr-y) { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #000; }
html[data-em-contrast="high"] .tr :is(.tr-numbadge, .tr-cathead__ic, .tr-rail__item.is-current .tr-rail__n, .tr-acc__btn[aria-expanded="true"] .tr-acc__n, .tr-pend__ic, .tr-na__ic) { background: #000 !important; color: #fff !important; }
.tr-vig__list--panel { margin: 4px 0 14px; }

/* ---- 8-oct-2026 · 2.2.2 buscador de normas propio y 7.1.3 esquema de publicación generado ---- */
.tr-nform { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 6px 0 18px; padding: 18px; border-radius: var(--tr-r); background: var(--pal-tint, #f2f7f4); }
@media (min-width: 720px) { .tr-nform { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, .8fr); align-items: start; } .tr-nform__act { grid-column: 1 / -1; } }
.tr-nform label { display: block; margin-bottom: 6px; font-size: .8125rem; font-weight: 800; color: var(--em-ink); }
.tr-nform input, .tr-nform select { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #8a9a90; border-radius: 12px; background: #fff; font: inherit; font-size: 1rem; color: var(--em-ink); }
.tr-nform input:focus-visible, .tr-nform select:focus-visible { outline: 3px solid var(--em-focus, #1b6fd6); outline-offset: 2px; }
.tr-nform__hint { margin: 6px 0 0; font-size: .8125rem; color: var(--tr-muted); }
.tr-nform__act { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.tr-normas__count { margin: 4px 0 10px; font-size: 1rem; font-weight: 800; color: var(--em-ink); }
.tr-esq__table { font-size: .875rem; }
.tr-esq__table th[scope="row"] { min-width: 220px; font-weight: 700; }
.tr-esq__table td { min-width: 110px; vertical-align: top; }
.tr-esq__url { word-break: break-all; min-width: 220px; }
.tr-esq__table tr.is-pending td, .tr-esq__table tr.is-pending th { background: #fff8e6; }
html[data-em-contrast="high"] .tr-nform { background: #fff; box-shadow: inset 0 0 0 2px #000; }
