/* ==========================================================================
   Tlahui — Notas
   Hoja de estilo para la sección de notas del sitio Tlahui.

   Todo está anidado bajo .tl para no interferir con el header, el footer
   ni con Bootstrap 5. No se tocan selectores globales (body, h1, a, ...).

   Paleta tomada de la figura del Modelo de Aprendizaje Aumentado:
     navy  #1f2c55   ·   olivo #a5a45c   ·   azul pálido #a9c7de
   ========================================================================== */

.tl {
    --tl-navy: #1f2c55;
    --tl-navy-deep: #16234e;
    --tl-ink: #22283a;
    --tl-muted: #5d6679;
    --tl-olive: #7f7e3c;
    --tl-olive-light: #a5a45c;
    --tl-blue: #a9c7de;
    --tl-wash: #e6ecf4;
    --tl-paper: #fcfcfa;
    --tl-rule: #d9dee6;

    --tl-serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --tl-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --tl-measure: 46rem;
    /* columna de lectura */
    --tl-wide: 64rem;
    /* rejilla ancha del índice y de la figura */

    color: var(--tl-ink);
    background: var(--tl-paper);
    font-family: var(--tl-serif);
    font-size: 1.0625rem;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
}

.tl *,
.tl *::before,
.tl *::after {
    box-sizing: border-box;
}

.tl img {
    max-width: 100%;
    height: auto;
    display: block;
}

.tl a {
    color: var(--tl-navy);
    text-decoration-color: var(--tl-blue);
    text-underline-offset: .18em;
}

.tl a:hover {
    color: var(--tl-olive);
    text-decoration-color: var(--tl-olive-light);
}

.tl a:focus-visible {
    outline: 2px solid var(--tl-olive);
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- contenedores ------------------------------------------------------- */
.tl-wrap {
    max-width: var(--tl-measure);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.tl-wrap--wide {
    max-width: var(--tl-wide);
}

.tl-col {
    max-width: none;
}

/* ==========================================================================
   1. Portada de la nota (amanecer)
   ========================================================================== */
.tl-hero {
    position: relative;
    background: var(--tl-navy-deep);
    color: #fff;
    overflow: hidden;
    padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.tl-hero::before {
    /* el amanecer: luz baja sobre el horizonte */
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(1150px, 145%);
    height: 400px;
    transform: translate(-50%, 46%);
    background: radial-gradient(ellipse at center,
            rgba(165, 164, 92, .44) 0%,
            rgba(169, 199, 222, .15) 46%,
            transparent 70%);
    pointer-events: none;
}

.tl-hero>* {
    position: relative;
}

.tl-kicker {
    font-family: var(--tl-sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--tl-olive-light);
    margin: 0 0 1.6rem;
}

.tl-kicker::after {
    content: "";
    display: block;
    width: 2.75rem;
    height: 2px;
    background: var(--tl-olive-light);
    margin-top: .55rem;
}

.tl-hero h1 {
    font-family: var(--tl-serif);
    font-weight: 400;
    font-size: clamp(2rem, 5.2vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -.015em;
    margin: 0;
    max-width: 22ch;
    text-wrap: balance;
}

.tl-byline {
    margin: 1.9rem 0 0;
    font-family: var(--tl-sans);
    font-size: .95rem;
    line-height: 1.55;
    color: var(--tl-blue);
}

.tl-byline strong {
    color: #fff;
    font-weight: 600;
}

.tl-byline span {
    display: block;
    font-size: .85rem;
    color: rgba(169, 199, 222, .75);
    margin-top: .35rem;
}

/* ==========================================================================
   2. Cuerpo de la nota
   ========================================================================== */
.tl-article {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.tl-article p {
    margin: 0 0 1.35em;
}

.tl-article h2 {
    font-family: var(--tl-serif);
    font-weight: 600;
    font-size: clamp(1.35rem, 2.8vw, 1.7rem);
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--tl-navy);
    margin: 2.9em 0 .9em;
    padding-top: 1.1rem;
    border-top: 2px solid var(--tl-olive-light);
    max-width: 26ch;
    text-wrap: balance;
}

.tl-article h2:first-child {
    margin-top: 0;
}

/* Resumen -------------------------------------------------------------- */
.tl-abstract {
    background: var(--tl-wash);
    border-left: 3px solid var(--tl-navy);
    padding: 1.6rem 1.5rem 1.35rem;
    margin: 0 0 3rem;
    font-size: .98rem;
    line-height: 1.62;
}

.tl-abstract p {
    margin: 0;
}

.tl-abstract .tl-abstract-label {
    display: block;
    font-family: var(--tl-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tl-navy);
    margin-bottom: .6rem;
}

.tl-keywords {
    margin: 1rem 0 0;
    padding-top: .9rem;
    border-top: 1px solid rgba(31, 44, 85, .16);
    font-family: var(--tl-sans);
    font-size: .82rem;
    line-height: 1.5;
    color: var(--tl-muted);
}

/* Figura ----------------------------------------------------------------- */
.tl-figure {
    margin: 3.25rem auto;
    width: min(34rem, 100%);
    /* la figura es cuadrada: limitarla evita que domine la página */
}

.tl-figure img {
    width: 100%;
    border: 1px solid var(--tl-rule);
    background: #fff;
}

.tl-figure figcaption {
    font-family: var(--tl-sans);
    margin-inline: auto;
    font-size: .85rem;
    line-height: 1.55;
    color: var(--tl-muted);
    margin-top: .9rem;
    max-width: 44rem;
}

.tl-figure figcaption b {
    color: var(--tl-navy);
    font-weight: 600;
}

/* Recuadro: cinco preguntas --------------------------------------------- */
.tl-panel {
    background: var(--tl-navy-deep);
    color: #fff;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    margin: 3.25rem 0;
}

.tl-panel h3 {
    font-family: var(--tl-serif);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 0 0 1.4rem;
    color: var(--tl-olive-light);
    max-width: 24ch;
}

.tl-panel ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: tlq;
}

.tl-panel li {
    counter-increment: tlq;
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: .75rem;
    padding: .95rem 0;
    border-top: 1px solid rgba(169, 199, 222, .28);
    font-size: 1rem;
    line-height: 1.55;
}

.tl-panel li::before {
    content: counter(tlq);
    font-family: var(--tl-sans);
    font-size: .9rem;
    font-weight: 600;
    color: var(--tl-blue);
    padding-top: .18em;
}

/* Referencias ------------------------------------------------------------ */
.tl-refs {
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 2px solid var(--tl-navy);
}

.tl-refs h2 {
    border: 0;
    padding-top: 0;
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
}

.tl-refs ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl-refs li {
    font-size: .9rem;
    line-height: 1.55;
    padding-left: 1.5rem;
    text-indent: -1.5rem;
    margin-bottom: .85rem;
    color: var(--tl-muted);
    overflow-wrap: anywhere;
}

.tl-refs a {
    color: var(--tl-olive);
}

.tl-note {
    margin-top: 2.5rem;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--tl-rule);
    font-size: .88rem;
    line-height: 1.6;
    color: var(--tl-muted);
}

.tl-back {
    display: inline-block;
    margin-top: 2.5rem;
    font-family: var(--tl-sans);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--tl-navy);
    border-bottom: 2px solid var(--tl-olive-light);
    padding-bottom: .15rem;
}

.tl-back:hover {
    color: var(--tl-olive);
}

/* ==========================================================================
   3. Índice de notas
   ========================================================================== */
.tl-index-head {
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
    border-bottom: 2px solid var(--tl-navy);
}

.tl-index-head h1 {
    font-family: var(--tl-serif);
    font-weight: 400;
    font-size: clamp(2.25rem, 6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--tl-navy);
    margin: 0 0 1rem;
}

.tl-index-head p {
    margin: 0;
    max-width: 40rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--tl-muted);
}

.tl-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl-item {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 2rem;
    padding: 2.25rem 0;
    border-bottom: 1px solid var(--tl-rule);
    align-items: start;
}

.tl-item:first-child {
    padding-top: 2.5rem;
}

.tl-item-meta {
    font-family: var(--tl-sans);
    font-size: .82rem;
    line-height: 1.5;
    color: var(--tl-muted);
    padding-top: .35rem;
}

.tl-item-meta .tl-date {
    display: block;
    color: var(--tl-navy);
    font-weight: 600;
}

.tl-item-meta .tl-kind {
    display: inline-block;
    margin-top: .5rem;
    padding: .12rem .5rem;
    border: 1px solid var(--tl-olive-light);
    color: var(--tl-olive);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.tl-item h2 {
    font-family: var(--tl-serif);
    font-weight: 500;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    line-height: 1.2;
    letter-spacing: -.012em;
    margin: 0 0 .65rem;
    max-width: 28ch;
    text-wrap: balance;
}

.tl-item h2 a {
    color: var(--tl-navy);
    text-decoration: none;
    background-image: linear-gradient(var(--tl-olive-light), var(--tl-olive-light));
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .25s ease;
}

.tl-item h2 a:hover {
    color: var(--tl-navy-deep);
    background-size: 100% 2px;
}

.tl-item p {
    margin: 0 0 .8rem;
    font-size: .98rem;
    line-height: 1.6;
    color: var(--tl-ink);
    max-width: 46rem;
}

.tl-item-authors {
    font-family: var(--tl-sans);
    font-size: .85rem;
    color: var(--tl-muted);
    margin: 0;
}

/* Nota destacada --------------------------------------------------------- */
.tl-list .tl-item--lead {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2.75rem 0 3rem;
}

@media (min-width: 60em) {
    .tl-list .tl-item--lead {
        grid-template-columns: 1.02fr .98fr;
        gap: 3rem;
        align-items: center;
    }
}

.tl-item--lead .tl-lead-media {
    background: var(--tl-wash);
    padding: 1.25rem;
}

.tl-item--lead .tl-lead-media img {
    width: 100%;
}

.tl-item--lead h2 {
    font-family: var(--tl-serif);
    font-weight: 400;
    font-size: clamp(1.7rem, 4.2vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: -.018em;
    margin: .75rem 0 .9rem;
    max-width: 20ch;
    text-wrap: balance;
}

.tl-item--lead h2 a {
    color: var(--tl-navy);
    text-decoration: none;
}

.tl-item--lead h2 a:hover {
    color: var(--tl-olive);
}

.tl-item--lead p {
    font-size: 1.02rem;
    line-height: 1.62;
    margin: 0 0 1rem;
    max-width: 40rem;
}

.tl-item--lead .tl-item-authors {
    margin-bottom: 1.25rem;
}

.tl .tl-cta,
.tl .tl-back {
    text-decoration: none;
}

.tl .tl-cta {
    color: #fff;
    display: inline-block;
    font-family: var(--tl-sans);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--tl-navy);
    padding: .7rem 1.35rem;
}

.tl .tl-cta:hover {
    background: var(--tl-olive);
    color: #fff;
}

.tl-section-label {
    font-family: var(--tl-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tl-muted);
    margin: 3rem 0 0;
}

.tl-empty {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--tl-wash);
    font-family: var(--tl-sans);
    font-size: .95rem;
    color: var(--tl-muted);
}

/* --- responsivo --------------------------------------------------------- */
@media (max-width: 46em) {
    .tl {
        font-size: 1rem;
    }

    .tl-item {
        grid-template-columns: 1fr;
        gap: .85rem;
    }

    .tl-item-meta {
        padding-top: 0;
    }

    .tl-panel li {
        grid-template-columns: 1.5rem 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tl * {
        transition: none !important;
        animation: none !important;
    }
}

@media print {
    .tl-hero {
        background: #fff;
        color: #000;
    }

    .tl-hero::before {
        display: none;
    }

    .tl-hero h1,
    .tl-byline strong {
        color: #000;
    }

    .tl-panel {
        background: #fff;
        color: #000;
        border: 1px solid #000;
    }

    .tl-back,
    .tl-cta {
        display: none;
    }
}