/* ============================================================
   Infolenca — Edición 2026 («Tierra y agua» / «Memoria y territorio»)
   Sistema visual propio de la edición: papel, tinta, reglas finas,
   retícula editorial y tipografía de sistema. Se carga solo en las
   páginas de la edición; no altera el diseño del archivo histórico.
   ============================================================ */

.ed-home,
.ed-page,
.ed-article {
    --ed-paper: #faf7f0;
    --ed-surface: #ffffff;
    --ed-ink: #14181f;
    --ed-ink-soft: #2b313b;
    --ed-muted: #5b6470;
    --ed-rule: #d9d2c5;
    --ed-rule-strong: #14181f;
    --ed-forest: #1e5b45;
    --ed-forest-soft: #e4eee8;
    --ed-terra: #8c3b2b;
    --ed-terra-soft: #f3e4df;
    --ed-navy: #203473;
    --ed-amber: #b9722b;
    --ed-amber-soft: #f6ecdf;
    --ed-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --ed-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ed-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ed-radius: 2px;
    --ed-shadow: 0 1px 0 rgba(20, 24, 31, .06);

    background: var(--ed-paper);
    color: var(--ed-ink);
    font-family: var(--ed-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

[data-theme="dark"] .ed-home,
[data-theme="dark"] .ed-page,
[data-theme="dark"] .ed-article {
    --ed-paper: #0f1216;
    --ed-surface: #161b22;
    --ed-ink: #ece7dd;
    --ed-ink-soft: #d7d1c6;
    --ed-muted: #a6afba;
    --ed-rule: #2a313a;
    --ed-rule-strong: #ece7dd;
    --ed-forest: #7fbfa3;
    --ed-forest-soft: #16261f;
    --ed-terra: #d99b88;
    --ed-terra-soft: #2a1a17;
    --ed-navy: #9db0e0;
    --ed-amber: #e0a86a;
    --ed-amber-soft: #2a2116;
    --ed-shadow: 0 1px 0 rgba(255, 255, 255, .04);
}

.ed-home *,
.ed-page *,
.ed-article *,
.ed-home *::before,
.ed-page *::before,
.ed-article *::before,
.ed-home *::after,
.ed-page *::after,
.ed-article *::after {
    box-sizing: border-box;
}

.ed-home a,
.ed-page a,
.ed-article a {
    color: inherit;
    text-decoration: none;
}

.ed-home a:hover,
.ed-page a:hover,
.ed-article a:hover {
    color: var(--ed-terra);
}

.ed-home :focus-visible,
.ed-page :focus-visible,
.ed-article :focus-visible {
    outline: 2px solid var(--ed-navy);
    outline-offset: 3px;
}

.ed-wrap {
    width: min(1200px, 92%);
    margin-inline: auto;
}

.ed-wrap--narrow {
    width: min(820px, 92%);
    margin-inline: auto;
}

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

/* ------------------------------------------------------------
   Mástil y navegación
   ------------------------------------------------------------ */
.ed-masthead {
    border-top: 5px solid var(--ed-rule-strong);
    padding-top: 8px;
    margin-top: 18px;
}

.ed-masthead__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ed-rule);
    color: var(--ed-muted);
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ed-masthead__bar b {
    color: var(--ed-ink);
}

.ed-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 28px;
    padding: 22px 0 16px;
}

.ed-brand__name {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.035em;
}

.ed-brand__name a {
    color: var(--ed-ink);
}

.ed-brand__tag {
    max-width: 34ch;
    margin: 0;
    color: var(--ed-muted);
    font-size: .88rem;
    line-height: 1.45;
}

.ed-brand__tag b {
    display: block;
    color: var(--ed-ink);
    font-weight: 700;
}

.ed-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
    padding: 11px 0;
    border-top: 1px solid var(--ed-rule-strong);
    border-bottom: 1px solid var(--ed-rule-strong);
}

.ed-nav a {
    color: var(--ed-ink-soft);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ed-nav a[aria-current="page"],
.ed-nav a:hover {
    color: var(--ed-terra);
}

/* ------------------------------------------------------------
   Portada
   ------------------------------------------------------------ */
.ed-home__main {
    padding-bottom: 64px;
}

.ed-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 34px;
    padding: 34px 0 30px;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-hero__lead {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ed-hero__rail {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 1px solid var(--ed-rule);
    padding-left: 28px;
}

.ed-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ed-terra);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ed-kicker i {
    display: inline-block;
    width: 26px;
    height: 2px;
    background: currentColor;
}

.ed-kicker--forest {
    color: var(--ed-forest);
}

.ed-lead__art {
    display: block;
    overflow: hidden;
    border: 1px solid var(--ed-rule);
    background: var(--ed-surface);
}

.ed-lead__art img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .6s ease;
}

.ed-lead:hover .ed-lead__art img,
.ed-card:hover .ed-card__art img {
    transform: scale(1.025);
}

.ed-lead__title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.025em;
    text-wrap: balance;
}

.ed-lead__title a:hover {
    color: var(--ed-terra);
}

.ed-lead__dek {
    margin: 0;
    max-width: 62ch;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1.08rem;
    line-height: 1.55;
}

.ed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--ed-muted);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ed-meta__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.ed-brief {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-brief:first-child {
    padding-top: 0;
}

.ed-brief:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ed-brief__art {
    overflow: hidden;
    border: 1px solid var(--ed-rule);
    background: var(--ed-surface);
}

.ed-brief__art img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.ed-brief__num {
    display: block;
    margin-bottom: 4px;
    color: var(--ed-terra);
    font-family: var(--ed-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.ed-brief__title {
    margin: 0 0 6px;
    font-family: var(--ed-serif);
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -.01em;
}

.ed-rail-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ed-rule-strong);
    color: var(--ed-ink);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ed-rail-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ed-rail-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-rail-item__num {
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding-top: 3px;
}

.ed-rail-item__title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.25;
}

.ed-rail-item__title a:hover {
    color: var(--ed-terra);
}

.ed-rail-item__meta {
    margin: 5px 0 0;
    color: var(--ed-muted);
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Franja de datos */
.ed-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-data__item {
    padding: 26px 26px 26px 0;
    border-right: 1px solid var(--ed-rule);
}

.ed-data__item:last-child {
    border-right: 0;
    padding-right: 0;
    padding-left: 26px;
}

.ed-data__item:nth-child(2) {
    padding-left: 26px;
}

.ed-data__value {
    display: block;
    margin-bottom: 8px;
    color: var(--ed-forest);
    font-family: var(--ed-serif);
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}

.ed-data__label {
    margin: 0;
    color: var(--ed-ink-soft);
    font-size: .86rem;
    line-height: 1.45;
}

.ed-data__source {
    display: block;
    margin-top: 8px;
    color: var(--ed-muted);
    font-size: .68rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Bloques de serie */
.ed-series {
    padding: 42px 0 8px;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-series__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 12px 32px;
    align-items: end;
    margin-bottom: 24px;
}

.ed-series__title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}

.ed-series__desc {
    margin: 0;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1rem;
    line-height: 1.5;
}

.ed-series__link {
    color: var(--ed-terra);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 26px;
}

.ed-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.ed-card__art {
    display: block;
    overflow: hidden;
    border: 1px solid var(--ed-rule);
    background: var(--ed-surface);
}

.ed-card__art img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .6s ease;
}

.ed-card__num {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ed-card__num b {
    color: var(--ed-terra);
}

.ed-card__title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.015em;
}

.ed-card__title a:hover {
    color: var(--ed-terra);
}

.ed-card__dek {
    margin: 0;
    color: var(--ed-muted);
    font-size: .86rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Índice completo */
.ed-index {
    padding: 46px 0 20px;
}

.ed-index__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 24px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ed-rule-strong);
}

.ed-index__title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: 1.7rem;
    letter-spacing: -.01em;
}

.ed-index__count {
    color: var(--ed-muted);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ed-index__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 44px;
}

.ed-index__row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-index__num {
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: .72rem;
    font-weight: 700;
}

.ed-index__link {
    font-family: var(--ed-serif);
    font-size: .98rem;
    font-weight: 650;
    line-height: 1.3;
}

.ed-index__link:hover {
    color: var(--ed-terra);
}

.ed-index__meta {
    color: var(--ed-muted);
    font-size: .66rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Nota editorial */
.ed-note {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
    gap: 28px 48px;
    margin: 52px 0 8px;
    padding: 34px 0;
    border-top: 3px solid var(--ed-rule-strong);
    border-bottom: 1px solid var(--ed-rule);
}

.ed-note__title {
    margin: 0 0 10px;
    font-family: var(--ed-serif);
    font-size: 1.5rem;
    line-height: 1.1;
}

.ed-note__text {
    margin: 0;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1.02rem;
    line-height: 1.6;
}

.ed-note__by {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.ed-note__by img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ed-rule);
}

.ed-note__by span {
    display: block;
    font-size: .8rem;
    line-height: 1.4;
}

.ed-note__by b {
    display: block;
    font-size: .86rem;
}

/* ------------------------------------------------------------
   Hub de la edición
   ------------------------------------------------------------ */
.ed-hub__hero {
    padding: 46px 0 34px;
    border-bottom: 3px solid var(--ed-rule-strong);
}

.ed-hub__title {
    max-width: 18ch;
    margin: 14px 0 16px;
    font-family: var(--ed-serif);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: .96;
    letter-spacing: -.035em;
}

.ed-hub__dek {
    max-width: 62ch;
    margin: 0;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1.18rem;
    line-height: 1.55;
}

.ed-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 40px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--ed-rule);
}

.ed-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--ed-muted);
    font-size: .74rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ed-stat b {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: 1.7rem;
    letter-spacing: -.02em;
    text-transform: none;
}

.ed-series-hub {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-series-hub__col {
    padding: 38px 40px 38px 0;
    border-right: 1px solid var(--ed-rule);
}

.ed-series-hub__col:last-child {
    border-right: 0;
    padding-right: 0;
    padding-left: 40px;
}

.ed-series-hub__kicker {
    color: var(--ed-terra);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ed-series-hub__name {
    margin: 10px 0 12px;
    font-family: var(--ed-serif);
    font-size: 2rem;
    line-height: 1.02;
}

.ed-series-hub__desc {
    margin: 0 0 20px;
    color: var(--ed-ink-soft);
    font-size: .95rem;
    line-height: 1.55;
}

.ed-series-hub__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ed-series-hub__list li {
    padding: 10px 0;
    border-top: 1px solid var(--ed-rule);
    font-family: var(--ed-serif);
    font-size: .98rem;
    line-height: 1.3;
}

.ed-series-hub__list a:hover {
    color: var(--ed-terra);
}

/* ------------------------------------------------------------
   Página de serie (categoría)
   ------------------------------------------------------------ */
.ed-series-page__hero {
    padding: 40px 0 30px;
    border-bottom: 3px solid var(--ed-rule-strong);
}

.ed-series-page__title {
    margin: 12px 0 14px;
    font-family: var(--ed-serif);
    font-size: clamp(2.4rem, 5.4vw, 4rem);
    line-height: .98;
    letter-spacing: -.03em;
}

.ed-series-page__dek {
    max-width: 64ch;
    margin: 0;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1.12rem;
    line-height: 1.55;
}

.ed-series-page__count {
    display: inline-block;
    margin-top: 18px;
    color: var(--ed-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* ------------------------------------------------------------
   Artículo
   ------------------------------------------------------------ */
.ed-article {
    padding: 28px 0 72px;
}

.ed-article__head {
    width: min(880px, 92%);
    margin: 0 auto;
    padding: 18px 0 0;
}

.ed-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--ed-muted);
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ed-breadcrumb a:hover {
    color: var(--ed-terra);
}

.ed-article__title {
    margin: 12px 0 16px;
    font-family: var(--ed-serif);
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.01;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.ed-article__dek {
    margin: 0 0 22px;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1.22rem;
    line-height: 1.5;
}

.ed-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 14px 0;
    border-top: 1px solid var(--ed-rule);
    border-bottom: 1px solid var(--ed-rule);
    font-size: .8rem;
    color: var(--ed-muted);
}

.ed-byline__author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ed-ink);
    font-weight: 700;
}

.ed-byline__author img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ed-rule);
}

.ed-byline__review {
    color: var(--ed-muted);
}

.ed-byline__review b {
    color: var(--ed-ink-soft);
}

.ed-share {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.ed-share a,
.ed-share button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ed-rule);
    border-radius: 50%;
    background: transparent;
    color: var(--ed-ink-soft);
    cursor: pointer;
}

.ed-share a:hover,
.ed-share button:hover {
    border-color: var(--ed-ink);
    color: var(--ed-ink);
}

.ed-article__hero {
    width: min(1080px, 94%);
    margin: 26px auto 0;
}

.ed-article__hero figure {
    margin: 0;
}

.ed-article__hero img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--ed-rule);
}

.ed-article__hero figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 18px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ed-rule);
    color: var(--ed-muted);
    font-size: .75rem;
    line-height: 1.45;
}

/* Datos clave */
.ed-keyfacts {
    width: min(1080px, 94%);
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 2px solid var(--ed-rule-strong);
    border-bottom: 1px solid var(--ed-rule);
}

.ed-keyfacts__head {
    grid-column: 1 / -1;
    padding: 10px 0;
    color: var(--ed-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-keyfacts__item {
    padding: 18px 22px 18px 0;
    border-right: 1px solid var(--ed-rule);
}

.ed-keyfacts__item:nth-child(3n) {
    border-right: 0;
    padding-right: 0;
}

.ed-keyfacts__item:nth-child(n+3) {
    padding-left: 22px;
}

.ed-keyfacts__value {
    display: block;
    margin-bottom: 6px;
    color: var(--ed-forest);
    font-family: var(--ed-serif);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}

.ed-keyfacts__label {
    margin: 0;
    color: var(--ed-ink-soft);
    font-size: .82rem;
    line-height: 1.45;
}

.ed-keyfacts__source {
    display: block;
    margin-top: 6px;
    color: var(--ed-muted);
    font-size: .64rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Cuerpo + índice */
.ed-layout {
    display: grid;
    grid-template-columns: minmax(0, 700px) 250px;
    gap: 54px;
    justify-content: center;
    width: min(1080px, 94%);
    margin: 40px auto 0;
}

.ed-article__content {
    font-family: var(--ed-serif);
    font-size: 1.185rem;
    line-height: 1.72;
    color: var(--ed-ink);
    min-width: 0;
}

.ed-article__content > p:first-of-type {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--ed-ink-soft);
}

.ed-article__content p {
    margin: 0 0 1.15em;
}

.ed-article__content h2 {
    margin: 2.2em 0 .55em;
    padding-top: .55em;
    border-top: 1px solid var(--ed-rule);
    font-family: var(--ed-sans);
    font-size: 1.42rem;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.015em;
    scroll-margin-top: 90px;
}

.ed-article__content h2:first-child {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.ed-article__content h3 {
    margin: 1.8em 0 .5em;
    font-family: var(--ed-sans);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.01em;
}

.ed-article__content a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--ed-rule);
}

.ed-article__content a:hover {
    color: var(--ed-terra);
    text-decoration-color: currentColor;
}

.ed-article__content strong {
    font-weight: 700;
}

.ed-article__content ul,
.ed-article__content ol {
    margin: 0 0 1.2em;
    padding-left: 1.3em;
}

.ed-article__content li {
    margin-bottom: .45em;
}

.ed-article__content ol {
    font-variant-numeric: lining-nums;
}

.ed-article__content blockquote {
    margin: 2em 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--ed-terra);
    font-size: 1.32rem;
    font-style: italic;
    line-height: 1.42;
    color: var(--ed-ink-soft);
}

.ed-article__content blockquote p {
    margin: 0;
}

.ed-article__content aside {
    margin: 2.2em 0;
    padding: 22px 24px;
    border-left: 4px solid var(--ed-forest);
    background: var(--ed-forest-soft);
    font-family: var(--ed-sans);
    font-size: .92rem;
    line-height: 1.55;
}

.ed-article__content aside h2,
.ed-article__content aside h3 {
    margin: 0 0 10px;
    border: 0;
    padding: 0;
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ed-forest);
}

.ed-article__content aside ul {
    margin: 0;
    padding-left: 1.1em;
}

.ed-article__content figure {
    margin: 2.2em 0;
}

.ed-article__content figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--ed-rule);
}

.ed-article__content figcaption {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ed-rule);
    color: var(--ed-muted);
    font-family: var(--ed-sans);
    font-size: .78rem;
    line-height: 1.45;
}

.ed-article__content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    font-family: var(--ed-sans);
    font-size: .85rem;
    line-height: 1.4;
}

.ed-article__content caption {
    margin-bottom: 10px;
    color: var(--ed-ink);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
}

.ed-article__content th,
.ed-article__content td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--ed-rule);
    text-align: left;
    vertical-align: top;
}

.ed-article__content thead th {
    border-top: 2px solid var(--ed-rule-strong);
    border-bottom: 1px solid var(--ed-rule-strong);
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ed-article__content tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--ed-rule) 22%, transparent);
}

.ed-article__content .ed-table-source {
    margin-top: -1.2em;
    color: var(--ed-muted);
    font-family: var(--ed-sans);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Índice lateral */
.ed-toc {
    align-self: start;
    position: sticky;
    top: 88px;
    padding-top: 4px;
}

.ed-toc__title {
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ed-rule-strong);
    font-family: var(--ed-sans);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ed-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.ed-toc li {
    counter-increment: toc;
    border-bottom: 1px solid var(--ed-rule);
}

.ed-toc a {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    color: var(--ed-ink-soft);
    font-size: .8rem;
    line-height: 1.35;
}

.ed-toc a::before {
    content: counter(toc, decimal-leading-zero);
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: .66rem;
    padding-top: 2px;
}

.ed-toc a:hover {
    color: var(--ed-terra);
}

.ed-toc__meta {
    margin-top: 16px;
    color: var(--ed-muted);
    font-size: .68rem;
    line-height: 1.5;
}

/* Metodología, fuentes, FAQ, autor */
.ed-block {
    width: min(1080px, 94%);
    margin: 54px auto 0;
    padding-top: 26px;
    border-top: 2px solid var(--ed-rule-strong);
}

.ed-block + .ed-block {
    margin-top: 40px;
}

.ed-block__title {
    margin: 0 0 14px;
    font-family: var(--ed-sans);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ed-method {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 20px 44px;
    align-items: start;
}

.ed-method__text {
    margin: 0;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1rem;
    line-height: 1.6;
}

.ed-method__meta {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .8rem;
    color: var(--ed-muted);
    line-height: 1.6;
}

.ed-method__meta b {
    color: var(--ed-ink);
}

.ed-sources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: src;
}

.ed-sources li {
    counter-increment: src;
    padding: 9px 0 9px 30px;
    border-bottom: 1px solid var(--ed-rule);
    position: relative;
    font-size: .82rem;
    line-height: 1.45;
}

.ed-sources li::before {
    content: "[" counter(src) "]";
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: .7rem;
}

.ed-sources a {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--ed-rule);
}

.ed-sources small {
    display: block;
    margin-top: 2px;
    color: var(--ed-muted);
    font-size: .7rem;
}

.ed-faq {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--ed-rule);
}

.ed-faq details {
    border-bottom: 1px solid var(--ed-rule);
}

.ed-faq summary {
    padding: 16px 34px 16px 0;
    cursor: pointer;
    font-family: var(--ed-serif);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
    list-style: none;
    position: relative;
}

.ed-faq summary::-webkit-details-marker {
    display: none;
}

.ed-faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 14px;
    color: var(--ed-terra);
    font-family: var(--ed-sans);
    font-size: 1.1rem;
    font-weight: 700;
}

.ed-faq details[open] summary::after {
    content: "–";
}

.ed-faq__answer {
    margin: 0 0 18px;
    padding-right: 30px;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1rem;
    line-height: 1.62;
}

.ed-author {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.ed-author img {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ed-rule);
}

.ed-author__name {
    margin: 0 0 4px;
    font-family: var(--ed-serif);
    font-size: 1.25rem;
}

.ed-author__role {
    margin: 0 0 10px;
    color: var(--ed-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ed-author__bio {
    margin: 0;
    color: var(--ed-ink-soft);
    font-size: .9rem;
    line-height: 1.6;
    max-width: 72ch;
}

.ed-author__links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ed-author__links a {
    color: var(--ed-terra);
}

.ed-series-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--ed-rule);
    border-bottom: 1px solid var(--ed-rule);
}

.ed-series-nav__item {
    padding: 18px 24px 18px 0;
}

.ed-series-nav__item + .ed-series-nav__item {
    padding-left: 24px;
    border-left: 1px solid var(--ed-rule);
    text-align: right;
}

.ed-series-nav__label {
    display: block;
    margin-bottom: 6px;
    color: var(--ed-muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ed-series-nav__title {
    font-family: var(--ed-serif);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
}

.ed-related {
    margin-top: 64px;
    padding-top: 26px;
    border-top: 3px solid var(--ed-rule-strong);
}

.ed-related__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 20px;
    margin-bottom: 20px;
}

.ed-related__title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: 1.6rem;
    letter-spacing: -.01em;
}

/* ------------------------------------------------------------
   Páginas institucionales
   ------------------------------------------------------------ */
.ed-page__main {
    padding: 30px 0 70px;
}

.ed-page__head {
    padding: 30px 0 26px;
    border-bottom: 3px solid var(--ed-rule-strong);
}

.ed-page__title {
    margin: 12px 0 14px;
    font-family: var(--ed-serif);
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -.03em;
}

.ed-page__dek {
    max-width: 64ch;
    margin: 0;
    color: var(--ed-ink-soft);
    font-family: var(--ed-serif);
    font-size: 1.14rem;
    line-height: 1.55;
}

.ed-prose {
    width: min(820px, 92%);
    margin: 34px auto 0;
    font-family: var(--ed-serif);
    font-size: 1.1rem;
    line-height: 1.7;
}

.ed-prose h2 {
    margin: 2em 0 .5em;
    padding-top: .5em;
    border-top: 1px solid var(--ed-rule);
    font-family: var(--ed-sans);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.01em;
}

.ed-prose h3 {
    margin: 1.6em 0 .4em;
    font-family: var(--ed-sans);
    font-size: 1rem;
    font-weight: 800;
}

.ed-prose p {
    margin: 0 0 1.1em;
}

.ed-prose ul,
.ed-prose ol {
    margin: 0 0 1.2em;
    padding-left: 1.3em;
}

.ed-prose li {
    margin-bottom: .5em;
}

.ed-prose a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--ed-rule);
}

.ed-prose__note {
    margin: 2em 0;
    padding: 18px 22px;
    border-left: 4px solid var(--ed-forest);
    background: var(--ed-forest-soft);
    font-family: var(--ed-sans);
    font-size: .9rem;
    line-height: 1.55;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1020px) {
    .ed-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    .ed-hero__rail {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--ed-rule);
        padding-top: 22px;
    }

    .ed-rail-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 26px;
    }

    .ed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ed-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
        width: min(760px, 92%);
    }

    .ed-toc {
        position: static;
        order: -1;
        border-top: 1px solid var(--ed-rule);
        border-bottom: 1px solid var(--ed-rule);
        padding: 14px 0;
    }

    .ed-toc ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 20px;
    }

    .ed-article__content {
        font-size: 1.12rem;
    }

    .ed-keyfacts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ed-brand {
        align-items: flex-start;
    }

    .ed-brand__name {
        font-size: clamp(2.6rem, 13vw, 3.8rem);
    }

    .ed-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .ed-nav::-webkit-scrollbar {
        display: none;
    }

    .ed-hero {
        padding-top: 22px;
    }

    .ed-lead__title {
        font-size: clamp(1.75rem, 7.6vw, 2.4rem);
    }

    .ed-rail-list,
    .ed-grid,
    .ed-index__cols,
    .ed-series-hub,
    .ed-series__head,
    .ed-note,
    .ed-method,
    .ed-sources,
    .ed-series-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .ed-series-hub__col,
    .ed-series-hub__col:last-child {
        padding: 26px 0;
        border-right: 0;
        border-bottom: 1px solid var(--ed-rule);
    }

    .ed-series-hub__col:last-child {
        border-bottom: 0;
    }

    .ed-data {
        grid-template-columns: minmax(0, 1fr);
    }

    .ed-data__item,
    .ed-data__item:nth-child(2),
    .ed-data__item:last-child {
        padding: 18px 0;
        border-right: 0;
        border-bottom: 1px solid var(--ed-rule);
    }

    .ed-keyfacts {
        grid-template-columns: minmax(0, 1fr);
    }

    .ed-keyfacts__item,
    .ed-keyfacts__item:nth-child(3n),
    .ed-keyfacts__item:nth-child(n+3) {
        padding: 14px 0;
        border-right: 0;
        border-bottom: 1px solid var(--ed-rule);
    }

    .ed-keyfacts__item:last-child {
        border-bottom: 0;
    }

    .ed-article__title {
        font-size: clamp(1.9rem, 8.6vw, 2.6rem);
    }

    .ed-article__dek {
        font-size: 1.08rem;
    }

    .ed-article__content {
        font-size: 1.06rem;
    }

    .ed-article__content > p:first-of-type {
        font-size: 1.14rem;
    }

    .ed-article__content h2 {
        font-size: 1.24rem;
    }

    .ed-byline {
        gap: 8px 14px;
    }

    .ed-share {
        margin-left: 0;
    }

    .ed-sources {
        gap: 0;
    }

    .ed-toc ol {
        grid-template-columns: minmax(0, 1fr);
    }

    .ed-author {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 16px;
    }

    .ed-author img {
        width: 56px;
        height: 56px;
    }

    .ed-index__row {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .ed-index__meta {
        grid-column: 2;
    }

    .ed-series-nav__item + .ed-series-nav__item {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--ed-rule);
        text-align: left;
    }
}

@media (max-width: 430px) {
    .ed-brief {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 12px;
    }

    .ed-wrap,
    .ed-wrap--narrow,
    .ed-article__head,
    .ed-layout,
    .ed-block,
    .ed-article__hero,
    .ed-keyfacts {
        width: 92%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ed-lead__art img,
    .ed-card__art img {
        transition: none;
    }
}

@media print {
    .ed-nav,
    .ed-share,
    .ed-toc,
    .ed-related,
    .fx-header,
    .fx-footer {
        display: none !important;
    }

    .ed-home,
    .ed-page,
    .ed-article {
        background: #fff;
        color: #000;
    }

    .ed-article__content {
        font-size: 11pt;
    }
}

/* Ajustes de composición de la edición */
.ed-lead {
    display: block;
}

.ed-lead .ed-kicker {
    margin: 0 0 12px;
}

.ed-lead__art {
    display: block;
    margin-bottom: 14px;
}

.ed-lead .ed-lead__title {
    margin: 0 0 12px;
}

.ed-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ed-forest-soft);
    color: var(--ed-forest);
    font-family: var(--ed-sans);
    font-size: .9rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.ed-avatar--lg {
    width: 74px;
    height: 74px;
    font-size: 1.7rem;
}

.ed-layout--single {
    grid-template-columns: minmax(0, 720px);
}

.ed-article__content aside p:last-child {
    margin-bottom: 0;
}

.ed-article__content .ed-faq__answer {
    font-family: var(--ed-serif);
}

@media (max-width: 760px) {
    .ed-lead__title {
        margin-top: 10px;
    }

    .ed-avatar--lg {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

.ed-prose table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    font-family: var(--ed-sans);
    font-size: .88rem;
    line-height: 1.45;
}

.ed-prose caption {
    margin-bottom: 10px;
    color: var(--ed-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-align: left;
    text-transform: uppercase;
}

.ed-prose th,
.ed-prose td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--ed-rule);
    text-align: left;
    vertical-align: top;
}

.ed-prose thead th {
    border-top: 2px solid var(--ed-rule-strong);
    border-bottom: 1px solid var(--ed-rule-strong);
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Las imágenes llevan width/height intrínsecos: sin height:auto el atributo
   height del HTML estira la portada dentro de las tarjetas y recorta el arte. */
.ed-lead__art img,
.ed-card__art img,
.ed-brief__art img,
.ed-article__hero img,
.ed-article__content figure img {
    height: auto;
}

/* Header global en modo edición: menos aire para que los ocho enlaces entren en una línea. */
.ed-mode .fx-nav {
    gap: 0;
}

.ed-mode .fx-nav a {
    padding: 8px 9px;
    font-size: .84rem;
}

.ed-brief__art img {
    object-position: left center;
}

/* Brief sin imagen: el texto ocupa todo el ancho del carril. */
.ed-brief > div:only-child {
    grid-column: 1 / -1;
}

/* La sección de relacionados debe compartir el ancho de la columna editorial. */
.ed-related {
    width: min(1080px, 94%);
    margin-left: auto;
    margin-right: auto;
}

/* Título de tabla: el importador usa <p><strong>…</strong></p>. */
.ed-article__content > p > strong:only-child {
    display: block;
    margin-bottom: 10px;
    font-family: var(--ed-sans);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* En móvil el índice lateral se oculta: el artículo empieza antes y se evita
   un bloque de navegación de 700 px antes del primer párrafo. */
@media (max-width: 760px) {
    .ed-toc {
        display: none;
    }
}

/* Promoción de herramientas en la portada. */
.ed-promo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 34px;
    align-items: center;
    margin: 34px 0 6px;
    padding: 24px 26px;
    border: 1px solid var(--ed-rule);
    border-left: 4px solid var(--ed-forest);
    background: var(--ed-forest-soft);
}

.ed-promo__title {
    margin: 6px 0 6px;
    font-family: var(--ed-serif);
    font-size: 1.6rem;
    line-height: 1.08;
    letter-spacing: -.02em;
}

.ed-promo__dek {
    max-width: 62ch;
    margin: 0;
    color: var(--ed-ink-soft);
    font-size: .9rem;
    line-height: 1.5;
}

.ed-promo__cta {
    display: inline-block;
    padding: 11px 18px;
    border: 1px solid var(--ed-forest);
    color: var(--ed-forest);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ed-promo__cta:hover {
    background: var(--ed-forest);
    color: var(--ed-paper);
}

@media (max-width: 700px) {
    .ed-promo {
        grid-template-columns: minmax(0, 1fr);
    }
}
