:root {
    --tx-ink: #173129;
    --tx-muted: #607069;
    --tx-line: #dce4df;
    --tx-paper: #ffffff;
    --tx-wash: #f3f6f3;
    --tx-green: var(--color-primary, #0b3e23);
    --tx-green-bright: var(--color-accent-green, #005c22);
    --tx-gold: var(--color-secondary, #c3a26e);
    --tx-radius: 18px;
    --tx-shadow: 0 24px 70px rgba(11, 62, 35, 0.09);
}

/*
 * WordPress aplica subrayado global a todos los enlaces. Elementor lo
 * neutralizaba en las páginas antiguas; ahora el propio tema conserva limpio
 * el encabezado y el pie de las páginas nativas de Transparencia.
 */
.tx-native-transparency #page-container > header a,
.tx-native-transparency #mobile-menu a,
.tx-native-transparency .site-footer a {
    text-decoration: none;
}

.tx-page {
    color: var(--tx-ink);
    background:
        radial-gradient(circle at 88% 8%, rgba(195, 162, 110, 0.17), transparent 26rem),
        linear-gradient(180deg, #f9faf8 0, #fff 38rem);
}

.tx-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.tx-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(17rem, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
    padding: clamp(4rem, 8vw, 7.5rem) 0 clamp(3rem, 6vw, 5.5rem);
    border-bottom: 1px solid var(--tx-line);
}

.tx-kicker {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1.2rem;
    color: var(--tx-green);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tx-kicker::before {
    width: 2.6rem;
    height: 2px;
    content: '';
    background: var(--tx-gold);
}

.tx-title {
    max-width: 16ch;
    margin: 0;
    color: var(--tx-green);
    font-size: clamp(2.55rem, 6vw, 5.7rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: .98;
}

.tx-lead {
    max-width: 42rem;
    margin: 1.5rem 0 0;
    color: var(--tx-muted);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.72;
}

.tx-hero-aside {
    padding: 1.5rem 0 1.5rem 1.8rem;
    border-left: 3px solid var(--tx-gold);
}

.tx-hero-aside strong,
.tx-hero-aside span {
    display: block;
}

.tx-hero-aside strong {
    color: var(--tx-green);
    font-size: 1rem;
}

.tx-hero-aside span {
    margin-top: .45rem;
    color: var(--tx-muted);
    line-height: 1.55;
}

.tx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.5rem;
}

.tx-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 46px;
    padding: .76rem 1rem;
    border: 1px solid var(--tx-green);
    border-radius: 999px;
    background: var(--tx-green);
    color: #fff;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.tx-button:hover,
.tx-button:focus-visible {
    background: var(--tx-green-bright);
    color: #fff;
    transform: translateY(-2px);
}

.tx-button--quiet {
    background: transparent;
    color: var(--tx-green);
}

.tx-button--quiet:hover,
.tx-button--quiet:focus-visible {
    background: rgba(11, 62, 35, .07);
    color: var(--tx-green);
}

.tx-content {
    padding: clamp(3.2rem, 7vw, 6.5rem) 0;
}

.tx-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(15rem, 1fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 2rem;
}

.tx-section-head h2 {
    margin: 0;
    color: var(--tx-green);
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    letter-spacing: -.035em;
    line-height: 1.05;
}

.tx-section-head p {
    margin: 0;
    color: var(--tx-muted);
    line-height: 1.65;
}

.tx-directory {
    overflow: hidden;
    border: 1px solid var(--tx-line);
    border-radius: var(--tx-radius);
    background: var(--tx-paper);
    box-shadow: var(--tx-shadow);
}

.tx-directory-group {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.618fr);
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 2.6rem);
}

.tx-directory-group + .tx-directory-group {
    border-top: 1px solid var(--tx-line);
}

.tx-directory-label {
    margin: 0;
    color: var(--tx-green);
    font-size: 1.12rem;
    font-weight: 700;
}

.tx-directory-label i {
    width: 1.5rem;
    color: var(--tx-gold);
}

.tx-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tx-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
    border-bottom: 1px solid var(--tx-line);
    color: var(--tx-ink);
    font-weight: 600;
    text-decoration: none;
}

.tx-link-list a:hover,
.tx-link-list a:focus-visible {
    color: var(--tx-green-bright);
}

.tx-link-list i {
    flex: 0 0 auto;
    color: var(--tx-gold);
}

.tx-latest {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tx-latest-item {
    display: flex;
    min-height: 15rem;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(1.4rem, 3vw, 2rem);
    border-radius: var(--tx-radius);
    background: var(--tx-green);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--tx-shadow);
    transition: transform .2s ease, background-color .2s ease;
}

.tx-latest-item:nth-child(2) {
    background: #e9eee9;
    color: var(--tx-ink);
}

.tx-latest-item:hover,
.tx-latest-item:focus-visible {
    transform: translateY(-3px);
}

.tx-latest-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tx-latest-item h3 {
    max-width: 28ch;
    margin: 2.5rem 0 0;
    color: inherit;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.22;
}

.tx-tools {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(13rem, 1fr);
    gap: 1rem;
    align-items: end;
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid var(--tx-line);
    border-radius: 14px;
    background: #fff;
}

.tx-field label {
    display: block;
    margin-bottom: .5rem;
    color: var(--tx-green);
    font-size: .82rem;
    font-weight: 700;
}

.tx-input,
.tx-select {
    width: 100%;
    min-height: 48px;
    padding: .72rem .85rem;
    border: 1px solid #bdc9c1;
    border-radius: 9px;
    background: #fff;
    color: var(--tx-ink);
    font: inherit;
}

.tx-input:focus,
.tx-select:focus {
    border-color: var(--tx-green);
    outline: 3px solid rgba(11, 62, 35, .13);
    outline-offset: 1px;
}

.tx-result-count {
    margin: -.7rem 0 1.5rem;
    color: var(--tx-muted);
    font-size: .9rem;
}

.tx-documents {
    overflow: hidden;
    border-top: 3px solid var(--tx-green);
    border-bottom: 1px solid var(--tx-line);
}

.tx-document {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(13rem, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.55rem .25rem;
    border-bottom: 1px solid var(--tx-line);
}

.tx-document[hidden] {
    display: none;
}

.tx-document-label {
    margin: 0 0 .35rem;
    color: var(--tx-gold);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tx-document h2 {
    margin: 0;
    color: var(--tx-green);
    font-size: clamp(1.08rem, 1.5vw, 1.3rem);
    line-height: 1.35;
}

.tx-document-meta {
    color: var(--tx-muted);
    font-size: .9rem;
    line-height: 1.5;
}

.tx-document-meta strong {
    display: block;
    color: var(--tx-ink);
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tx-empty {
    padding: 3rem 1rem;
    color: var(--tx-muted);
    text-align: center;
}

.tx-note {
    margin-top: 2rem;
    padding: 1rem 1.2rem;
    border-left: 3px solid var(--tx-gold);
    background: var(--tx-wash);
    color: var(--tx-muted);
    font-size: .9rem;
    line-height: 1.6;
}

@media (max-width: 820px) {
    .tx-hero,
    .tx-section-head,
    .tx-directory-group,
    .tx-tools {
        grid-template-columns: 1fr;
    }

    .tx-hero-aside {
        padding-left: 1.2rem;
    }

    .tx-link-list,
    .tx-latest {
        grid-template-columns: 1fr;
    }

    .tx-document {
        grid-template-columns: 1fr auto;
    }

    .tx-document-meta {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 560px) {
    .tx-shell {
        width: min(100% - 1.25rem, 1180px);
    }

    .tx-title {
        font-size: clamp(2.35rem, 15vw, 3.6rem);
    }

    .tx-document {
        grid-template-columns: 1fr;
    }

    .tx-document-meta {
        grid-column: auto;
        grid-row: auto;
    }

    .tx-document .tx-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tx-button,
    .tx-latest-item {
        transition: none;
    }
}
