:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #0f172a;
    --muted: #5b6473;
    --line: #dbe2ea;
    --accent: #0f172a;
    --accent-2: #1d4ed8;
    --radius: 1.25rem;
    --shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

body.public-body {
    background: var(--bg);
    color: var(--ink);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: #fff;
    color: #000;
    padding: 0.75rem 1rem;
    z-index: 9999;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.site-header {
    backdrop-filter: saturate(180%) blur(10px);
    background: var(--site-header-bg, #ffffff);
    color: var(--site-header-link, var(--ink));
}

.site-header .site-brand-row,
.site-header .main-navbar,
.site-header .site-mobile-header {
    background: var(--site-header-bg, #ffffff) !important;
}

.site-header .navbar-brand,
.site-header .nav-link,
.site-header .nav-link.active,
.site-header .nav-link:focus,
.site-header .nav-link:hover {
    color: var(--site-header-link, var(--ink)) !important;
}

.site-header .mobile-menu-toggle {
    color: var(--site-header-link, var(--ink));
}

.site-header .mobile-menu-toggle span {
    background: currentColor;
}

.brand-lockup {
    display: inline-flex;
    gap: 0.85rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-shell {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 35%),
        radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.08), transparent 30%),
        var(--bg);
}

.hero-card,
.side-panel,
.status-card,
.error-box,
.auth-shell {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.side-panel,
.error-box,
.auth-shell {
    padding: 1.5rem;
}

.auth-shell {
    max-width: 760px;
}

.status-card {
    padding: 1rem 1.1rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--accent-2);
}

.stats-grid .metric-card {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem;
    height: 100%;
}

.metric-card strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.feature-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.feature-list li + li {
    margin-top: 0.45rem;
}

.next-step-box {
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 1rem;
}

.nav-user-chip .nav-link {
    opacity: 1 !important;
    color: var(--muted) !important;
}

.site-footer {
    border-color: var(--line) !important;
}

code {
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 0.4rem;
    padding: 0.1rem 0.35rem;
}

@media (min-width: 992px) {
    .hero-card,
    .side-panel,
    .error-box,
    .auth-shell {
        padding: 2rem;
    }

    .py-lg-6 {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
}

.article-media {
    margin: 2rem 0;
}

.article-media a {
    display: block;
    border-radius: 1rem;
    overflow: hidden;
    background: #eef2f7;
}

.article-media img {
    display: block;
    width: 100%;
    height: auto;
}

.article-media figcaption {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.public-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.88);
    z-index: 99999;
}

.public-lightbox.is-open {
    display: flex;
}

.public-lightbox img {
    max-width: min(100%, 1180px);
    max-height: 88vh;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.public-lightbox button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    border: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 1.4rem;
    line-height: 1;
}

/* Fase 6: home editorial */
a {
    color: inherit;
}

.main-navbar {
    min-height: 72px;
}

.topic-bar {
    background: rgba(255, 255, 255, 0.96);
}

.topic-bar .container {
    min-height: 42px;
}

.topic-scroll {
    display: flex;
    gap: 1rem;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.topic-scroll::-webkit-scrollbar {
    display: none;
}

.topic-scroll a,
.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.topic-scroll a:hover,
.footer-links a:hover {
    color: var(--ink);
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #f8fafc;
    flex: 0 0 300px;
}

.header-search input {
    border: 0;
    background: transparent;
    padding: 0.45rem 0.85rem;
    width: 100%;
    outline: 0;
    font-size: 0.92rem;
}

.header-search button {
    border: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.45rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.front-page-top {
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.08), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.front-kicker {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
}

.front-kicker span {
    color: var(--ink);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.empty-newsroom,
.lead-story,
.side-story,
.compact-card,
.news-list-item,
.sidebar-card,
.section-card,
.system-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-newsroom,
.system-card {
    padding: 1.5rem;
}

.lead-story {
    overflow: hidden;
}

.story-image,
.side-story-image,
.news-list-image,
.section-card-image {
    display: block;
    overflow: hidden;
    background: #e5eaf2;
    text-decoration: none;
}

.story-image-main {
}

.story-image img,
.side-story-image img,
.news-list-image img,
.section-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.story-image:hover img,
.side-story-image:hover img,
.news-list-image:hover img,
.section-card-image:hover img {
    transform: scale(1.035);
}

.story-body {
    padding: 1.4rem;
}

.story-category {
    display: inline-flex;
    text-decoration: none;
    color: var(--accent-2);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.lead-story h1 {
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
    margin: 0 0 0.85rem;
}

.lead-story h1 a,
.side-story h2 a,
.compact-card h3 a,
.news-list-content h3 a,
.section-card h3 a {
    text-decoration: none;
}

.lead-story h1 a:hover,
.side-story h2 a:hover,
.compact-card h3 a:hover,
.news-list-content h3 a:hover,
.section-card h3 a:hover {
    color: var(--accent-2);
}

.lead-story p {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.side-stories {
    display: grid;
    gap: 1rem;
}

.side-story {
    padding: 0.85rem;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.9rem;
    align-items: start;
}

.side-story-image {
    border-radius: 0.95rem;
}

.side-story h2 {
    font-size: 1.05rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.section-link {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.compact-card,
.sidebar-card,
.section-card {
    padding: 1rem;
}

.compact-card h3,
.section-card h3 {
    font-size: 1.06rem;
    line-height: 1.16;
    letter-spacing: -0.02em;
    margin: 0.1rem 0 0.75rem;
}

.news-list {
    display: grid;
    gap: 1rem;
}

.news-list-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    padding: 1rem;
}

.news-list-image {
    border-radius: 1rem;
}

.news-list-content h3 {
    font-size: 1.35rem;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin: 0 0 0.65rem;
}

.news-list-content p {
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.category-pills {
    display: grid;
    gap: 0.55rem;
}

.category-pills a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.category-pills small {
    color: var(--muted);
    font-weight: 700;
}

.sticky-sidebar {
    position: sticky;
    top: 132px;
}

.section-card-image {
    border-radius: 1rem;
    margin-bottom: 0.85rem;
}

.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(135deg, #f8fafc, #f8fafc 10px, #eef2f7 10px, #eef2f7 20px);
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.ad-slot-horizontal {
    min-height: 110px;
}

.ad-slot-vertical {
    min-height: 260px;
}

.ad-slot-square {
    min-height: 300px;
}

.ad-slot-inline {
    min-height: 96px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
}

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.9);
    z-index: 99999;
}

.lightbox-backdrop[hidden] {
    display: none;
}

.lightbox-backdrop img {
    max-width: min(100%, 1180px);
    max-height: 88vh;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    border: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 1.4rem;
    line-height: 1;
}

@media (min-width: 992px) {
    .empty-newsroom,
    .system-card {
        padding: 2rem;
    }
}

@media (max-width: 991.98px) {
    .front-kicker,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .side-story,
    .news-list-item {
        grid-template-columns: 1fr;
    }

    .side-story-image,
    .news-list-image {
        }

    .sticky-sidebar {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .brand-lockup small {
        display: none;
    }

    .story-body,
    .empty-newsroom,
    .system-card {
        padding: 1.15rem;
    }

    .lead-story h1 {
        font-size: 2rem;
    }
}

/* Fase 7: página individual de noticia */
.article-page {
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.06), transparent 34%),
        linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.breadcrumb-nav {
    font-size: 0.88rem;
}

.breadcrumb-nav a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: var(--accent-2);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}

.article-main,
.article-sidebar .sidebar-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-main {
    overflow: hidden;
}

.article-header {
    padding: clamp(1.35rem, 3vw, 2.5rem) clamp(1.2rem, 4vw, 3rem) 1.25rem;
}

.article-category {
    display: inline-flex;
    margin-bottom: 0.85rem;
    text-decoration: none;
    color: var(--accent-2);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.article-header h1 {
    max-width: 960px;
    font-size: clamp(2.15rem, 5.2vw, 4.75rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 0 0 1rem;
}

.article-standfirst {
    max-width: 800px;
    color: var(--muted);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.article-hero-image {
    margin: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #eef2f7;
}

.article-hero-image a {
    display: block;
    overflow: hidden;
}

.article-hero-image img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.article-hero-image figcaption {
    padding: 0.75rem clamp(1.2rem, 4vw, 3rem);
    color: var(--muted);
    font-size: 0.9rem;
    background: #fff;
}

.article-hero-placeholder {
    min-height: clamp(180px, 34vw, 460px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(29, 78, 216, 0.08)),
        #eef2f7;
}

.article-content {
    max-width: 780px;
    margin-inline: auto;
    padding: clamp(1.35rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2rem);
    font-size: 1.08rem;
    line-height: 1.82;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--ink);
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

.article-content h2 {
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.article-content h3 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.article-content a {
    color: var(--accent-2);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.1rem 1.3rem;
    border-left: 4px solid var(--accent-2);
    background: #f8fafc;
    border-radius: 0 1rem 1rem 0;
    color: #334155;
    font-size: 1.16rem;
    line-height: 1.65;
}

.article-content ul,
.article-content ol {
    padding-left: 1.4rem;
    margin-bottom: 1.35rem;
}

.article-content li + li {
    margin-top: 0.35rem;
}

.article-content figure,
.article-content .article-media {
    margin: 2rem 0;
}

.article-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    background: #eef2f7;
}

.article-inline-image-link {
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    text-decoration: none;
}

.article-content figcaption {
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.article-table-responsive,
.article-content .table-responsive {
    margin: 1.6rem 0;
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow-x: auto;
}

.article-content table {
    width: 100%;
    min-width: 620px;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    border: 1px solid var(--line);
    padding: 0.7rem;
    vertical-align: top;
}

.article-content th {
    background: #f8fafc;
}

.article-content .ad-slot,
.article-ad-placeholder {
    min-height: 118px;
    margin: 2rem 0;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    padding: 1.25rem clamp(1.2rem, 4vw, 3rem) 1.6rem;
    border-top: 1px solid var(--line);
}

.article-tags span {
    color: var(--muted);
    font-weight: 800;
}

.article-tags a,
.article-category-list a {
    display: inline-flex;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.72rem;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.9rem;
}

.article-tags a:hover,
.article-category-list a:hover {
    border-color: #93c5fd;
    color: var(--accent-2);
}

.article-sidebar {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 132px;
}

.article-sidebar .sidebar-card {
    padding: 1rem;
}

.article-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ad-slot {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.ad-slot strong {
    color: #334155;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.ad-slot-sticky {
    min-height: 280px;
}

@media (max-width: 1199.98px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .article-header h1 {
        font-size: 2.25rem;
        line-height: 1;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.72;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .ad-slot-sticky {
        min-height: 140px;
    }
}

/* Phase 8: root listings and registered comments */
.listing-hero {
    background: #fff;
}

.listing-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.listing-card-image {
    display: block;
    overflow: hidden;
    background: #e5e7eb;
}

.listing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.listing-card:hover .listing-card-image img {
    transform: scale(1.035);
}

.listing-card-body {
    padding: 1.1rem;
}

.listing-card h2 a,
.comment-card a {
    color: inherit;
    text-decoration: none;
}

.article-comments-section {
    background: #fff;
}

.comments-shell {
    max-width: 860px;
}

.comment-login-box,
.comment-form,
.comment-card {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.comment-login-box,
.comment-form {
    padding: 1.25rem;
}

.comment-list {
    display: grid;
    gap: 1rem;
}

.comment-card {
    padding: 1rem 1.1rem;
}

.comment-card.is-pending {
    background: #fffaf0;
}

.comment-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.6rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.comment-card-header strong {
    color: var(--ink);
}

.comment-card-body {
    line-height: 1.7;
}

.listing-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    color: var(--muted);
    font-size: 0.95rem;
}

.search-page-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    max-width: 760px;
}

.search-page-form input[type="search"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.75rem 1.1rem;
    background: #fff;
    color: var(--ink);
    outline: none;
}

.search-page-form input[type="search"]:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 0.2rem rgba(15, 23, 42, 0.08);
}

.pagination-nav .page-link {
    border-radius: 999px !important;
    min-width: 2.35rem;
    text-align: center;
    color: var(--ink);
}

.pagination-nav .active .page-link {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

@media (max-width: 575.98px) {
    .search-page-form {
        grid-template-columns: 1fr;
    }

    .search-page-form .btn {
        width: 100%;
    }
}

/* Phase 10: technical performance and CLS-safe ads */
.ad-slot {
    contain: layout paint;
    overflow: hidden;
}

.ad-slot .adsbygoogle {
    width: 100%;
    min-height: inherit;
}

.ad-slot-live {
    background: transparent;
    border-color: transparent;
    border-style: solid;
}

.ad-slot-live.ad-slot-filled {
    background: transparent;
    border-color: transparent;
}

.article-after-content-ad,
.listing-ad {
    margin: 2rem 0;
}

#ad-ad_slot_home_top,
#ad-ad_slot_home_inline,
#ad-ad_slot_article_after_content,
#ad-ad_slot_archive_inline {
    min-height: 118px;
}

#ad-ad_slot_home_sidebar,
#ad-ad_slot_article_sidebar {
    min-height: 300px;
}

@media (max-width: 767.98px) {
    #ad-ad_slot_home_sidebar,
    #ad-ad_slot_article_sidebar {
        min-height: 160px;
    }
}

.site-logo {
    display: block;
    max-width: min(240px, 58vw);
    height: auto;
    object-fit: contain;
}

.site-logo-footer {
    max-width: 220px;
}

.footer-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.footer-contact-text {
    max-width: 28rem;
}


.page-content-shell {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.cookie-notice {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
}

.cookie-notice-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
}

.cookie-notice p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.cookie-notice a {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .cookie-notice-inner {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Ajustes editoriales posteriores */
.site-brand-row {
    padding: 1rem 0 0.85rem;
}

.brand-lockup-centered {
    margin: 0 auto;
    justify-content: center;
    text-align: center;
}

.main-navbar-centered {
    min-height: 48px;
}

.main-navbar-centered .navbar-nav .nav-link {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    font-size: 0.86rem;
}

@media (max-width: 991.98px) {
    .main-navbar-centered {
        padding: 0.5rem 0 0.75rem;
    }

    .main-navbar-centered .navbar-collapse {
        width: 100%;
        padding-top: 0.75rem;
    }

    .story-image img,
    .side-story-image img,
    .news-list-image img,
    .section-card-image img,
    .listing-card-image img {
        height: auto;
        object-fit: contain;
    }
}

/* Ajustes de portada, cabecera móvil y tipografía */
h1, h2, h3, h4, h5, h6,
.lead-story h1,
.side-story h2,
.compact-card h3,
.news-list-content h3,
.section-card h3,
.listing-card h2,
.card-title,
.footer-title {
    font-weight: 800;
}

.site-mobile-header {
    background: var(--site-header-bg, #fff);
}

.mobile-brand {
    min-width: 0;
    max-width: calc(100% - 4rem);
}

.site-logo-mobile {
    max-height: 42px;
    width: auto;
}

.mobile-menu-toggle {
    width: 2.65rem;
    height: 2.65rem;
    border: 0;
    background: transparent;
    border-radius: 0.85rem;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.28rem;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 1.45rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    display: block;
}

.mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.25);
    outline-offset: 2px;
}

.mobile-nav-offcanvas {
    width: min(86vw, 380px);
}

.mobile-nav-title .site-logo {
    max-height: 44px;
    width: auto;
}

.mobile-nav-list {
    gap: 0.2rem;
}

.mobile-nav-list .nav-link {
    padding: 0.75rem 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--line);
}

@media (max-width: 991.98px) {
    .site-header {
        backdrop-filter: none;
    }

    .story-image img,
    .side-story-image img,
    .news-list-image img,
    .section-card-image img,
    .listing-card-image img {
        height: auto !important;
        object-fit: contain !important;
    }

    .story-image,
    .side-story-image,
    .news-list-image,
    .section-card-image,
    .listing-card-image {
        aspect-ratio: auto !important;
    }
}

/* Corrección de scroll horizontal fantasma en frontend */
html,
body.public-body {
    max-width: 100%;
    overflow-x: clip;
}

.public-body main,
.public-body header,
.public-body footer,
.public-body section,
.public-body .container,
.public-body .container-fluid,
.public-body .row,
.public-body [class*="col-"] {
    min-width: 0;
}

.public-body img,
.public-body table,
.public-body iframe,
.public-body video {
    max-width: 100%;
}

@supports not (overflow: clip) {
    html,
    body.public-body {
        overflow-x: hidden;
    }
}

/* Fase 1.0.25: portada, widgets y antispam */
.form-spam-trap {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.front-main-title {
    color: var(--ink);
    font-size: clamp(1.65rem, 3.8vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.045em;
    font-weight: 900;
}

.lead-story h2 {
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
    margin: 0 0 0.85rem;
}

.lead-story h2 a,
.tag-cloud-list a {
    text-decoration: none;
}

.lead-story h2 a:hover {
    color: var(--accent-2);
}

.tag-cloud-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tag-cloud-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--line);
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.38rem 0.58rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.tag-cloud-list a:hover {
    color: var(--accent-2);
    border-color: rgba(29, 78, 216, 0.35);
}

.tag-cloud-list small {
    color: var(--muted);
    font-weight: 700;
}

.tag-cloud-list-modal {
    max-height: 60vh;
    overflow: auto;
    padding-right: 0.25rem;
}

.footer-archives {
    display: grid;
    gap: 0.4rem;
}

.footer-archive-year {
    width: 100%;
    border: 0;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    font-weight: 800;
    text-align: left;
}

.footer-archive-year small,
.footer-archive-months small {
    color: var(--muted);
}

.footer-archive-months {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding: 0.45rem 0.7rem 0.7rem;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 575.98px) {
    .lead-story h2 {
        font-size: 2rem;
    }
}

/* Fase 1.0.25: portada, archivos, páginas y vídeo incrustado */
.lead-story-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
}

/* Fase 1.0.25: archivos más compactos y etiquetas más discretas */
.footer-archive-row .footer-archives {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 0.45rem;
}

.footer-archive-row .footer-archives > [class*="col-"] {
    width: auto;
    max-width: none;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
}

.footer-archive-months {
    display: grid;
    gap: 0.35rem;
    padding: 0.45rem 0.25rem 0.25rem;
}

.footer-archive-months a {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    color: var(--muted);
    text-decoration: none;
    border-radius: 0.65rem;
    padding: 0.35rem 0.55rem;
}

.footer-archive-months a:hover {
    background: #f8fafc;
    color: var(--accent-2);
}

.page-content-full {
    max-width: none;
    padding-top: 0.25rem;
}

.article-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1rem;
    background: #0f172a;
    margin: 1.35rem 0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.article-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* Fase 1.0.26: archivos sin enlaces y etiquetas más compactas */
.footer-archive-months .footer-archive-month {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    color: var(--muted);
    border-radius: 0.65rem;
    padding: 0.3rem 0.45rem;
}

.footer-archive-months a {
    pointer-events: none;
}



/* Fase 1.0.31: visor público de imágenes y últimas noticias */
html.lightbox-open,
body.lightbox-open {
    overflow: hidden;
}

.js-lightbox-trigger,
.article-inline-image-link,
.article-media a,
.article-hero-image a {
    position: relative;
    cursor: zoom-in;
}

.has-zoom-indicator::before,
.article-inline-image-link::before,
.article-media a::before,
.article-hero-image a::before {
    content: "";
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
    z-index: 2;
    pointer-events: none;
}

.has-zoom-indicator::after,
.article-inline-image-link::after,
.article-media a::after,
.article-hero-image a::after {
    content: "🔍";
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    color: #0f172a;
    font-size: 1.22rem;
    line-height: 1;
    font-weight: 900;
    pointer-events: none;
}

.js-lightbox-raw-image {
    cursor: zoom-in;
}

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    background: rgba(2, 6, 23, 0.94);
    z-index: 999999;
}

.lightbox-backdrop[hidden] {
    display: none !important;
}

.public-lightbox {
    position: relative;
    inset: auto;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    background: transparent;
}

.public-lightbox-toolbar {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 3;
    display: flex;
    gap: 0.65rem;
}

.public-lightbox-close,
.public-lightbox-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.public-lightbox-close:hover,
.public-lightbox-zoom:hover,
.public-lightbox-close:focus-visible,
.public-lightbox-zoom:focus-visible {
    background: #ffffff;
    outline: 3px solid rgba(255, 255, 255, 0.35);
}

.public-lightbox-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1rem;
}

.lightbox-backdrop img,
.public-lightbox-stage img {
    display: block;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.85rem;
    background: #ffffff;
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
    cursor: zoom-in;
}

.lightbox-backdrop.is-zoomed .public-lightbox-stage {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 1.25rem 1.25rem;
}

.lightbox-backdrop.is-zoomed img {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

@media (max-width: 575.98px) {
    .has-zoom-indicator::before,
    .article-inline-image-link::before,
    .article-media a::before,
    .article-hero-image a::before {
        right: 0.6rem;
        bottom: 0.6rem;
        width: 2.25rem;
        height: 2.25rem;
    }

    .has-zoom-indicator::after,
    .article-inline-image-link::after,
    .article-media a::after,
    .article-hero-image a::after {
        right: 0.6rem;
        bottom: 0.6rem;
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.08rem;
    }

    .public-lightbox-toolbar {
        top: max(0.75rem, env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
    }

    .public-lightbox-close,
    .public-lightbox-zoom {
        width: 2.65rem;
        height: 2.65rem;
    }
}


.public-lightbox .public-lightbox-close,
.public-lightbox .public-lightbox-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

/* v1.0.32: header configurable desde Ajustes */
.mobile-nav-offcanvas,
.mobile-nav-offcanvas .offcanvas-header,
.mobile-nav-offcanvas .offcanvas-body {
    background: var(--site-header-bg, #ffffff);
    color: var(--site-header-link, var(--ink));
}

/* v1.0.33: dropdowns en menú principal y archivos por fecha en modal */
.main-navbar .dropdown-toggle {
    border: 0;
    background: transparent;
    color: var(--site-header-link, #0f172a);
    font-weight: 800;
}

.main-navbar .dropdown-toggle::after {
    margin-left: .35rem;
    vertical-align: .12em;
}

.main-nav-dropdown {
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 1rem;
    padding: .45rem;
    min-width: 210px;
}

.main-nav-dropdown .dropdown-item {
    border-radius: .75rem;
    font-weight: 700;
    font-size: .92rem;
    padding: .55rem .7rem;
}

.mobile-nav-dropdown-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.mobile-nav-submenu {
    list-style: none;
    margin: .15rem 0 .5rem;
    padding: .35rem .35rem .35rem .85rem;
    border-left: 2px solid #e5e7eb;
}

.mobile-nav-submenu .nav-link {
    font-size: .95rem;
    padding: .45rem .65rem;
}

.footer-archive-row .footer-archives {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.footer-archive-year {
    cursor: pointer;
}

.footer-archive-months a {
    pointer-events: auto;
}

.footer-archive-months-modal {
    display: grid;
    gap: .55rem;
}

.footer-archive-months-modal .footer-archive-month {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    padding: .7rem .85rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    background: #fff;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.footer-archive-months-modal .footer-archive-month:hover {
    transform: translateY(-1px);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.footer-archive-months-modal .footer-archive-month small {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

/* v1.0.39: estilos de header en escritorio */
@media (min-width: 992px) {
    .main-navbar-inline {
        min-height: 74px;
        padding: .75rem 0;
    }

    .main-navbar-inline .container {
        min-height: 58px;
    }

    .main-navbar-inline .navbar-nav {
        flex-wrap: wrap;
        max-width: calc(100% - 220px);
    }

    .main-navbar-inline .navbar-nav .nav-link,
    .site-desktop-header-offcanvas .navbar-brand,
    .main-navbar-centered .navbar-nav .nav-link {
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .045em;
        font-size: .86rem;
    }

    .brand-lockup-inline {
        flex: 0 0 auto;
        min-width: 0;
    }

    .brand-lockup-inline .site-logo {
        max-height: 58px;
        width: auto;
    }

    .site-desktop-header-offcanvas .container {
        min-height: 72px;
    }

    .desktop-menu-toggle {
        color: var(--site-header-link, var(--ink));
        border: 1px solid rgba(15, 23, 42, .08);
        background: rgba(255, 255, 255, .16);
    }

    .site-header-desktop-classic .main-nav-dropdown {
        left: auto;
        right: 0;
    }
}


/* v1.0.40: offcanvas escritorio robusto y botón volver arriba */
.mobile-nav-offcanvas {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(88vw, 420px);
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    z-index: 1080;
    border-left: 1px solid rgba(15, 23, 42, .08);
    transform: translateX(100%);
}

.mobile-nav-offcanvas.show,
.mobile-nav-offcanvas.showing {
    transform: none !important;
}

.mobile-nav-offcanvas .offcanvas-header {
    flex: 0 0 auto;
    min-height: 72px;
}

.mobile-nav-offcanvas .offcanvas-body {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.offcanvas-backdrop {
    z-index: 1070;
}

.scroll-top-button {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1060;
    box-shadow: 0 16px 35px rgba(15, 23, 42, .22);
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(.65rem);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease, background .18s ease;
}

.scroll-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-button:hover,
.scroll-top-button:focus-visible {
    background: #111827;
    color: #ffffff;
}

.scroll-top-button:focus-visible {
    outline: 3px solid rgba(15, 23, 42, .22);
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    .scroll-top-button {
        width: 2.75rem;
        height: 2.75rem;
        right: .85rem;
        bottom: .85rem;
    }
}

/* v1.0.45: AdSense real sin flashes visuales cuando Google devuelve unfilled/bloqueado */
ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

.ad-slot.ad-slot-unfilled,
.ad-slot.ad-slot-blocked {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
}

.ad-slot.ad-slot-live:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
