/* Reusable article-reading layer. It is intentionally scoped to posts. */
:root {
    --shm-article-ink: #111216;
    --shm-article-muted: #626874;
    --shm-article-paper: #fbfaf8;
    --shm-article-rule: rgb(17 18 22 / 0.12);
    --shm-article-soft: #f4f1ed;
    --shm-article-radius: 20px;
    --shm-article-workspace: 132rem;
    --shm-article-reading: 96rem;
    --shm-article-prose: 68ch;
    --shm-article-rail: 22rem;
    --shm-article-space: clamp(2.4rem, 4vw, 6.4rem);
    --shm-article-ease: 180ms cubic-bezier(.2, .7, .2, 1);
}

.shm-editorial-article {
    color: var(--shm-article-ink);
}

.shm-skip-link {
    background: var(--shm-article-ink);
    color: #fff;
    left: 1.6rem;
    padding: 1.2rem 1.6rem;
    position: fixed;
    top: -6rem;
    z-index: 1000;
}

.shm-skip-link:focus { top: 1.6rem; }

.shm-article-header {
    background:
        radial-gradient(circle at 12% 14%, rgb(255 26 117 / .055), transparent 31%),
        radial-gradient(circle at 88% 10%, rgb(181 129 61 / .095), transparent 28%),
        linear-gradient(135deg, #fcfbf8 0%, #fff 52%, #f8f4f0 100%);
    border-bottom: 1px solid var(--shm-article-rule);
    box-shadow: inset 0 -2.4rem 4.8rem rgb(79 54 34 / .025);
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(3.2rem, 6vw, 8rem) clamp(3.2rem, 5vw, 6.4rem);
    position: relative;
}

.shm-article-header::before {
    background-image:
        linear-gradient(rgb(17 18 22 / .022) 1px, transparent 1px),
        linear-gradient(90deg, rgb(17 18 22 / .022) 1px, transparent 1px);
    background-size: 8rem 8rem;
    content: "";
    inset: 0;
    -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / .72), transparent 94%);
    mask-image: linear-gradient(to bottom, rgb(0 0 0 / .72), transparent 94%);
    pointer-events: none;
    position: absolute;
    z-index: -2;
}

.shm-article-header::after {
    border: 1px solid rgb(181 129 61 / .11);
    border-radius: 50%;
    content: "";
    height: clamp(28rem, 42vw, 68rem);
    pointer-events: none;
    position: absolute;
    right: clamp(-34rem, -18vw, -15rem);
    top: clamp(-30rem, -18vw, -12rem);
    width: clamp(28rem, 42vw, 68rem);
    z-index: -1;
}

.shm-article-header-inner {
    margin: 0 auto;
    max-width: var(--shm-article-workspace);
    position: relative;
    text-align: center;
}

.shm-article-crumbs {
    align-items: center;
    color: var(--shm-article-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 1.25rem;
    font-weight: 700;
    gap: .8rem;
    justify-content: center;
    letter-spacing: .03em;
    margin-bottom: 2.8rem;
}

.shm-article-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: .3em; }
.shm-article-crumbs a:hover { color: var(--ghost-accent-color); opacity: 1; }

.shm-article-header .gh-article-tag { display: inline-flex; margin-bottom: 1.8rem; }

.shm-article-header .gh-article-title {
    font-size: clamp(4.2rem, 7vw, 8.8rem);
    letter-spacing: -.06em;
    line-height: .94;
    margin: 0;
    max-width: none;
    text-wrap: balance;
}

.shm-article-header .gh-article-excerpt {
    color: var(--shm-article-muted);
    font-size: clamp(1.9rem, 2.15vw, 2.5rem);
    line-height: 1.42;
    margin: 2.8rem auto 0;
    max-width: 82rem;
}

.shm-article-meta {
    align-items: center;
    border-top: 1px solid var(--shm-article-rule);
    color: var(--shm-article-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 1.25rem;
    font-weight: 650;
    gap: 1rem 1.8rem;
    justify-content: center;
    letter-spacing: .025em;
    margin-top: 3.2rem;
    padding-top: 1.8rem;
}

.shm-article-author { align-items: center; color: var(--shm-article-ink); display: inline-flex; gap: .8rem; }
.shm-article-author img { border-radius: 50%; height: 4rem; object-fit: cover; width: 4rem; }
.shm-article-author a { color: inherit; text-decoration: underline; text-underline-offset: .25em; }

.shm-article-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2.6rem; }
.shm-action-button {
    appearance: none;
    background: #fff;
    border: 1px solid var(--shm-article-rule);
    border-radius: 999px;
    color: var(--shm-article-ink);
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 750;
    line-height: 1;
    padding: 1rem 1.35rem;
    transition: background-color var(--shm-article-ease), border-color var(--shm-article-ease), color var(--shm-article-ease), transform var(--shm-article-ease);
}
.shm-action-button:hover { background: var(--shm-article-ink); border-color: var(--shm-article-ink); color: #fff; transform: translateY(-1px); }
.shm-action-button.is-resource { background: #193c5a; border-color: #193c5a; color: #fff; }
.shm-action-button.is-resource:hover { background: #0f2639; border-color: #0f2639; }
.shm-action-button:focus-visible, .shm-ranking-rail :is(a, button):focus-visible, .shm-skip-link:focus-visible { outline: 3px solid var(--ghost-accent-color); outline-offset: 3px; }
.shm-action-status { color: var(--shm-article-muted); font-size: 1.25rem; min-height: 1.8rem; }

.shm-article-feature { padding-top: clamp(2rem, 3.5vw, 4rem); }
.shm-article-feature > .gh-inner { margin: 0 auto; max-width: 132rem; }
.shm-article-feature-image, .shm-article-feature .shm-image-slot { border-radius: var(--shm-article-radius); display: block; max-height: 72rem; object-fit: cover; width: 100%; }
.shm-article-feature figcaption { color: var(--shm-article-muted); font-size: 1.25rem; line-height: 1.45; margin: 1rem auto 0; max-width: var(--shm-article-reading); }

.shm-reading-progress { background: rgb(17 18 22 / .08); height: 3px; inset: 0 0 auto; position: fixed; transform: scaleX(0); transform-origin: left; z-index: 100; }
.shm-reading-progress span { background: var(--ghost-accent-color); display: block; height: 100%; transform: scaleX(0); transform-origin: left; width: 100%; }

.shm-article-layout { padding-block: var(--shm-article-space); }
.shm-article-layout-inner {
    align-items: start;
    display: grid;
    gap: clamp(3.2rem, 5vw, 7.2rem);
    grid-template-columns: minmax(0, var(--shm-article-reading)) minmax(20rem, 24rem);
    justify-content: center;
    margin: 0 auto;
    max-width: 130rem;
}

.shm-article-main-column { min-width: 0; }
.shm-article-rail-right { position: sticky; top: 11.2rem; }
.shm-rail-label { color: var(--ghost-accent-color); display: block; font-size: 1.05rem; font-weight: 850; letter-spacing: .12em; margin-bottom: 1.2rem; text-transform: uppercase; }

.shm-editorial-article .gh-content { color: #292c32; font-size: clamp(1.78rem, 1.1vw, 1.96rem); line-height: 1.72; max-width: none; }
.shm-editorial-article .gh-content > * + * { margin-top: 2.4rem; }
.shm-editorial-article .gh-content > :is(h2, h3, h4) { color: var(--shm-article-ink); margin-inline: 0; max-width: none; scroll-margin-top: 12rem; text-wrap: balance; width: 100%; }
.shm-editorial-article .gh-content > h2 { font-size: clamp(2.8rem, 3.5vw, 4.4rem); letter-spacing: -.045em; line-height: 1.04; margin-top: clamp(5.2rem, 8vw, 8.8rem); }
.shm-editorial-article .gh-content > h3 { font-size: clamp(2.1rem, 2.4vw, 2.8rem); letter-spacing: -.025em; line-height: 1.12; margin-top: 4.2rem; }
.shm-editorial-article .gh-content > :is(p, ul, ol) { margin-inline: 0; max-width: none; width: 100%; }
.shm-editorial-article .gh-content > :is(ul, ol) { padding-left: 1.4em; }
.shm-editorial-article .gh-content li + li { margin-top: .7rem; }
.shm-editorial-article .gh-content blockquote { border-left: .3rem solid var(--ghost-accent-color); color: var(--shm-article-ink); font-family: var(--font-serif); font-size: clamp(2.5rem, 3.4vw, 3.8rem); line-height: 1.16; margin-inline: 0; max-width: none; padding: 1.2rem 0 1.2rem 2.4rem; }
.shm-editorial-article .gh-content a { color: inherit; text-decoration-color: var(--ghost-accent-color); text-decoration-thickness: .12em; text-underline-offset: .2em; }

.shm-faq-block {
    background:
        radial-gradient(circle at 100% 0, rgb(255 26 117 / .08), transparent 30%),
        linear-gradient(145deg, #f8f5f1 0%, #fff 72%);
    border: 1px solid var(--shm-article-rule);
    border-radius: clamp(1.8rem, 3vw, 2.8rem);
    box-shadow: 0 2.4rem 6rem rgb(32 24 20 / .08);
    margin: clamp(5rem, 8vw, 8rem) 0 0;
    max-width: none;
    overflow: hidden;
    padding: clamp(2.4rem, 5vw, 5.2rem);
    position: relative;
}
.shm-faq-block::before { background: var(--ghost-accent-color); content: ""; height: .4rem; inset: 0 0 auto; position: absolute; }
.shm-faq-block > h2 { font-size: clamp(3rem, 4vw, 4.8rem); letter-spacing: -.05em; line-height: 1; margin: 0 0 1.2rem !important; max-width: 18ch !important; }
.shm-faq-intro { color: var(--shm-article-muted); font-size: clamp(1.65rem, 1.5vw, 1.9rem); margin: 0 0 2.8rem !important; max-width: 68ch !important; }
.shm-faq-block details { background: rgb(255 255 255 / .82); border: 1px solid var(--shm-article-rule); border-radius: 1.4rem; box-shadow: 0 .8rem 2.4rem rgb(17 18 22 / .035); overflow: hidden; transition: border-color var(--shm-article-ease), box-shadow var(--shm-article-ease); }
.shm-faq-block details + details { margin-top: 1rem; }
.shm-faq-block details[open] { border-color: rgb(255 26 117 / .28); box-shadow: 0 1.2rem 3rem rgb(17 18 22 / .06); }
.shm-faq-block summary { color: var(--shm-article-ink); cursor: pointer; font-size: clamp(1.75rem, 2vw, 2.15rem); font-weight: 780; line-height: 1.25; list-style: none; padding: 2rem 5.2rem 2rem 2.2rem; position: relative; }
.shm-faq-block summary::-webkit-details-marker { display: none; }
.shm-faq-block summary::after { color: var(--ghost-accent-color); content: "+"; font-size: 2.6rem; font-weight: 500; position: absolute; right: 2rem; top: 1.45rem; }
.shm-faq-block details[open] summary::after { content: "\2212"; }
.shm-faq-answer { border-top: 1px solid var(--shm-article-rule); padding: 1.8rem 2.2rem 2.2rem; }
.shm-faq-block details p { color: #424650; margin: 0 !important; max-width: none !important; }

.shm-editorial-article .gh-content > h2[id^="preguntas-frecuentes"] {
    border-top: 1px solid var(--shm-article-rule);
    margin-top: clamp(5rem, 8vw, 8rem);
    padding-top: 3rem;
}
.shm-editorial-article .gh-content > h3[id^="faq-"],
.shm-editorial-article .gh-content > h2[id^="preguntas-frecuentes"] ~ h3 {
    border-top: 1px solid var(--shm-article-rule);
    font-size: clamp(1.9rem, 2vw, 2.35rem);
    margin-top: 2.4rem;
    padding-top: 2.4rem;
}

.shm-editorial-article .gh-content > h2[id*="la-visibilidad-produce"],
.shm-editorial-article .gh-content > h2[id*="la-brecha-latinoamericana"] {
    margin-inline: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.shm-table-scroll { -webkit-overflow-scrolling: touch; border: 1px solid var(--shm-article-rule); border-radius: 1.4rem; margin: 3.6rem 0; overflow-x: auto; position: relative; }
.shm-table-scroll table { border-collapse: collapse; margin: 0; min-width: 68rem; width: 100%; }
.shm-table-scroll :is(th, td) { border-bottom: 1px solid var(--shm-article-rule); padding: 1.35rem 1.5rem; text-align: left; vertical-align: top; }
.shm-table-scroll th { background: var(--shm-article-soft); color: var(--shm-article-ink); font-size: 1.12rem; font-weight: 850; letter-spacing: .07em; line-height: 1.3; text-transform: uppercase; }
.shm-table-scroll tr:last-child td { border-bottom: 0; }
.shm-table-scroll tbody tr:hover { background: rgb(255 20 110 / .035); }

.shm-ranking-rail {
    background: linear-gradient(155deg, #111216 0%, #17191f 68%, #25131b 100%);
    border: 1px solid rgb(255 255 255 / .1);
    border-radius: var(--shm-article-radius);
    box-shadow: 0 2.4rem 6rem rgb(17 18 22 / .18);
    color: #fff;
    overflow: hidden;
}
.shm-ranking-rail-heading { padding: 2rem 2rem 1.6rem; }
.shm-ranking-rail-heading .shm-rail-label { margin-bottom: .8rem; }
.shm-ranking-rail-heading strong { display: block; font-size: 1.9rem; letter-spacing: -.025em; line-height: 1.08; }
.shm-ranking-rail-heading p { color: rgb(255 255 255 / .58); font-size: 1.18rem; line-height: 1.4; margin: .8rem 0 0; }
.shm-ranking-rail-stage { min-height: 37rem; }
.shm-ranking-skeleton { animation: shm-ranking-pulse 1.5s ease-in-out infinite; background: linear-gradient(110deg, rgb(255 255 255 / .05) 18%, rgb(255 255 255 / .12) 32%, rgb(255 255 255 / .05) 46%); background-size: 220% 100%; height: 24rem; }
.shm-ranking-loading, .shm-ranking-error { color: rgb(255 255 255 / .62); display: block; font-size: 1.25rem; padding: 1.8rem 2rem; }
.shm-ranking-card { animation: shm-ranking-enter .36s var(--shm-article-ease) both; margin: 0; }
.shm-ranking-card-image { display: block; height: 23rem; overflow: hidden; }
.shm-ranking-card-image img { height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); width: 100%; }
.shm-ranking-card-image:hover img { transform: scale(1.025); }
.shm-ranking-card-body { padding: 1.8rem 2rem 2rem; }
.shm-ranking-card-rank { color: var(--ghost-accent-color); display: block; font-size: 1rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.shm-ranking-card h3 { color: #fff; font-size: 2.2rem; letter-spacing: -.035em; line-height: 1.02; margin: .7rem 0 0; }
.shm-ranking-card p { color: rgb(255 255 255 / .68); font-size: 1.28rem; line-height: 1.48; margin: 1rem 0 0; }
.shm-ranking-card-meta { border-top: 1px solid rgb(255 255 255 / .1); display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-top: 1.4rem; padding-top: 1.2rem; }
.shm-ranking-card-meta span { color: rgb(255 255 255 / .6); font-size: 1.05rem; font-weight: 700; }
.shm-ranking-card-actions { display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; margin-top: 1.5rem; }
.shm-ranking-card-actions :is(a, button) { align-items: center; border-radius: 999px; cursor: pointer; display: inline-flex; font-size: 1.15rem; font-weight: 800; justify-content: center; min-height: 4rem; padding: .9rem 1rem; }
.shm-ranking-profile { border: 1px solid rgb(255 255 255 / .24); color: #fff; }
.shm-ranking-consult { appearance: none; background: var(--ghost-accent-color); border: 1px solid var(--ghost-accent-color); color: #fff; }
.shm-ranking-rail-controls { align-items: center; border-top: 1px solid rgb(255 255 255 / .1); display: flex; justify-content: space-between; padding: 1.2rem 1.5rem; }
.shm-ranking-rail-controls[hidden] { display: none; }
.shm-ranking-rail-controls button { appearance: none; background: transparent; border: 1px solid rgb(255 255 255 / .16); border-radius: 50%; color: #fff; cursor: pointer; height: 3.4rem; width: 3.4rem; }
.shm-ranking-rail-controls span { color: rgb(255 255 255 / .58); font-size: 1.08rem; font-weight: 750; letter-spacing: .06em; }
@keyframes shm-ranking-pulse { to { background-position-x: -220%; } }
@keyframes shm-ranking-enter { from { opacity: 0; transform: translateY(.7rem); } to { opacity: 1; transform: translateY(0); } }

.shm-article-related { background: var(--shm-article-paper); border-top: 1px solid var(--shm-article-rule); padding-block: var(--shm-article-space); }
.shm-article-related-inner { margin: 0 auto; max-width: var(--container-width); }
.shm-related-heading { display: grid; gap: 1rem; margin-bottom: 2.8rem; }
.shm-related-heading h2 { font-size: clamp(3rem, 4vw, 4.8rem); letter-spacing: -.05em; line-height: 1; max-width: 13ch; }
.shm-article-related .gh-feed { display: grid; gap: 2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1279px) {
    .shm-article-layout-inner { grid-template-columns: minmax(0, 1fr); max-width: 104rem; }
    .shm-article-rail-right { margin: 1.6rem auto 0; max-width: 54rem; position: static; width: 100%; }
    .shm-ranking-card { display: grid; grid-template-columns: minmax(18rem, .9fr) 1.1fr; }
    .shm-ranking-card-image { height: 100%; min-height: 28rem; }
}

@media (max-width: 767px) {
    .shm-article-header {
        background:
            radial-gradient(circle at 88% 7%, rgb(181 129 61 / .08), transparent 27%),
            linear-gradient(145deg, #fcfbf8 0%, #fff 58%, #f9f5f2 100%);
        padding-block: 3.4rem 3.2rem;
    }
    .shm-article-header::before { background-size: 5.6rem 5.6rem; opacity: .72; }
    .shm-article-header::after { right: -19rem; top: -17rem; }
    .shm-article-crumbs { margin-bottom: 2rem; }
    .shm-article-header .gh-article-title { font-size: clamp(4rem, 12.5vw, 5.6rem); max-width: none; }
    .shm-article-meta { align-items: flex-start; display: grid; gap: 1rem; }
    .shm-article-actions { gap: .7rem; }
    .shm-action-button { font-size: 1.2rem; padding: .9rem 1.1rem; }
    .shm-article-feature > .gh-inner { padding-inline: 1.6rem; }
    .shm-article-feature-image, .shm-article-feature .shm-image-slot { border-radius: 1.4rem; }
    .shm-article-layout { padding-block: 3.6rem; }
    .shm-article-layout-inner { display: block; }
    .shm-editorial-article .gh-content { font-size: 1.75rem; }
    .shm-editorial-article .gh-content > h2 { margin-top: 5rem; }
    .shm-table-scroll { border-radius: 1rem; margin-inline: -1.6rem; }
    .shm-table-scroll :is(th, td) { padding: 1.15rem 1.2rem; }
    .shm-article-rail-right { margin-top: 4rem; max-width: none; }
    .shm-ranking-card { display: block; }
    .shm-ranking-card-image { height: 30rem; min-height: 0; }
    .shm-article-related .gh-feed { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
