/* ==========================================================================
   EL CRONISTA DEL MAÑANA — DISEÑO EDITORIAL DE PRENSA DIGITAL
   Estética Broadsheet Internacional (Newsprint & Ink)
   ========================================================================== */

:root {
    --bg-paper: #FAF9F5;
    --bg-surface: #FFFFFF;
    --bg-stone: #F2EFE9;
    --bg-dark: #141414;
    --ink-primary: #111111;
    --ink-secondary: #3F3F3D;
    --ink-muted: #5C5A54;
    --rule-light: #E2DFD7;
    --rule-medium: #C9C4B8;
    --rule-control: #8E8B82;
    --rule-heavy: #111111;
    --accent-crimson: #B81D24;
    --accent-navy: #0D3B66;
    --focus-ring: 2px solid var(--accent-navy);
    --font-serif: 'Newsreader', 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-paper);
    color: var(--ink-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--ink-primary);
    color: #FFFFFF;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2000;
    border-radius: 3px;
}

.skip-link:focus {
    left: 12px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 640px) {
    .container { padding: 0 14px; }
}

/* ==========================================================================
   1. BARRA DE MERCADOS EN TIEMPO REAL + SOCIOS VISIBLES EN MÓVIL Y ESCRITORIO
   ========================================================================== */
.market-strip {
    background-color: var(--bg-dark);
    color: #E5E5E0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid #2A2A2A;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.market-strip-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 7px 16px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}

.market-strip-inner::-webkit-scrollbar {
    display: none;
}

.market-partners-pinned {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 8px;
    flex-shrink: 0;
    background: #141414;
    border-left: 1px solid #2A2A2A;
    overflow-x: auto;
    scrollbar-width: none;
}

.market-partners-pinned::-webkit-scrollbar {
    display: none;
}

@media (max-width: 820px) {
    .market-strip {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .market-strip-inner {
        padding: 6px 12px;
        border-bottom: 1px solid #242422;
        -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
        mask-image: linear-gradient(to right, #000 92%, transparent);
    }
    .market-partners-pinned {
        border-left: none;
        padding: 5px 12px;
        background: #1A1A18;
    }
}

.market-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.market-symbol {
    font-weight: 600;
    color: #FFFFFF;
}

.market-up { color: #34D399; }
.market-down { color: #F87171; }

/* ==========================================================================
   2. MARQUESINA DE ÚLTIMA HORA
   ========================================================================== */
.breaking-strip {
    background-color: #1F1F1D;
    color: #FAF9F5;
    display: flex;
    align-items: stretch;
    font-size: 12.5px;
    border-bottom: 2px solid var(--accent-crimson);
}

.breaking-tag {
    background-color: var(--accent-crimson);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.live-indicator {
    width: 6px;
    height: 6px;
    background: #FFFFFF;
    border-radius: 50%;
    animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.breaking-marquee-wrap {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.breaking-marquee-track {
    display: inline-block;
    animation: editorialMarquee 42s linear infinite;
}

.breaking-marquee-track:hover {
    animation-play-state: paused;
}

.breaking-marquee-track a {
    color: #EAE8E1;
    margin-right: 36px;
    font-weight: 500;
}

.breaking-marquee-track a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.marquee-code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #A3A29C;
    margin-right: 5px;
}

@keyframes editorialMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   3. CABECERA PERIODÍSTICA (MASTHEAD)
   ========================================================================== */
.masthead {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--rule-light);
}

.masthead-utility {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule-light);
    font-size: 11.5px;
    color: var(--ink-muted);
    gap: 10px;
}

.masthead-utility-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.masthead-admin-link {
    font-weight: 600;
    color: var(--accent-navy);
    padding: 4px 10px;
    border: 1px solid var(--rule-light);
    border-radius: 3px;
    background: var(--bg-paper);
    white-space: nowrap;
}

.masthead-admin-link:hover {
    background: var(--ink-primary);
    color: #FFFFFF;
    border-color: var(--ink-primary);
}

.masthead-brand {
    text-align: center;
    padding: 22px 0 18px;
}

.masthead-title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--ink-primary);
}

.masthead-subtitle {
    margin-top: 6px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-muted);
}

/* Navegación de Secciones */
.section-nav {
    background-color: var(--bg-surface);
    border-top: 2px solid var(--rule-heavy);
    border-bottom: 1px solid var(--rule-light);
    position: sticky;
    top: 0;
    z-index: 40;
}

.section-nav-track {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding: 2px 0;
}

.section-nav-track::-webkit-scrollbar {
    display: none;
}

.section-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-secondary);
    padding: 11px 13px;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}

.section-link:hover {
    color: var(--ink-primary);
}

.section-link.active {
    color: var(--accent-crimson);
    border-bottom-color: var(--accent-crimson);
}

/* ==========================================================================
   4. HERO SLIDER DINÁMICO (SWIPER.JS)
   ========================================================================== */
.hero-section {
    padding: 26px 0 18px;
    border-bottom: 1px solid var(--rule-light);
}

.hero-swiper {
    background: var(--bg-surface);
    border: 1px solid var(--rule-light);
    position: relative;
}

.hero-slide-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    align-items: stretch;
}

@media (max-width: 900px) {
    .hero-slide-grid {
        grid-template-columns: 1fr;
    }
}

.hero-photo-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-stone);
    overflow: hidden;
}

.hero-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-slide-grid:hover .hero-photo-frame img {
    transform: scale(1.02);
}

.hero-photo-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(17, 17, 17, 0.84);
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 4px 9px;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}

.hero-editorial-panel {
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid var(--rule-light);
}

@media (max-width: 900px) {
    .hero-editorial-panel {
        border-left: none;
        border-top: 1px solid var(--rule-light);
        padding: 18px 16px 22px;
    }
}

.kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.kicker-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-crimson);
}

.kicker-code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-muted);
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(22px, 2.7vw, 33px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.015em;
    color: var(--ink-primary);
    margin-bottom: 12px;
}

.hero-headline a:hover {
    color: var(--accent-navy);
}

.hero-deck {
    font-size: 15px;
    color: var(--ink-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.hero-summary {
    font-size: 13.5px;
    color: var(--ink-muted);
    line-height: 1.55;
    margin-bottom: 18px;
}

.hero-footer-meta {
    padding-top: 14px;
    border-top: 1px solid var(--rule-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ink-muted);
    gap: 10px;
    flex-wrap: wrap;
}

.read-more-link {
    font-weight: 700;
    color: var(--accent-navy);
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more-link:hover {
    color: var(--accent-crimson);
}

/* Controles Swiper Personalizados */
.hero-controls-bar {
    background: var(--bg-surface);
    border: 1px solid var(--rule-light);
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    gap: 12px;
}

.hero-thumbs-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    flex: 1;
}

@media (max-width: 768px) {
    .hero-thumbs-strip {
        display: none;
    }
}

.hero-thumb-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    background: transparent;
    text-align: left;
    transition: all 0.15s ease;
    opacity: 0.65;
}

.hero-thumb-btn:hover,
.hero-thumb-btn.is-active {
    opacity: 1;
    background: var(--bg-paper);
    border-color: var(--rule-medium);
}

.hero-thumb-btn.is-active {
    border-bottom: 2px solid var(--accent-crimson);
}

.hero-thumb-img {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--bg-stone);
}

.hero-thumb-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-nav-arrows {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.swiper-arrow-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--rule-medium);
    background: var(--bg-surface);
    color: var(--ink-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.15s;
}

.swiper-arrow-btn:hover {
    background: var(--ink-primary);
    color: #FFFFFF;
    border-color: var(--ink-primary);
}

.hero-mobile-pagination {
    display: none;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-muted);
}

@media (max-width: 768px) {
    .hero-mobile-pagination { display: block; }
}

/* ==========================================================================
   5. BLOQUES DE PUBLICIDAD EDITORIAL
   ========================================================================== */
.ad-wrapper {
    margin: 20px auto;
    text-align: center;
}

.ad-caption {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.ad-editorial-box {
    background: var(--bg-stone);
    border: 1px solid var(--rule-light);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    color: var(--ink-muted);
}

.ad-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ink-secondary);
}

.ad-sublabel {
    font-size: 11.5px;
    color: var(--ink-muted);
    margin-top: 3px;
}

/* ==========================================================================
   6. GRID EDITORIAL DE NOTICIAS Y HUECOS FOTOGRÁFICOS
   ========================================================================== */
.section-header-rule {
    border-top: 2px solid var(--rule-heavy);
    padding: 12px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink-primary);
}

.section-count {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-muted);
}

/* Tira destacada de 3 columnas */
.featured-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule-light);
    margin-bottom: 28px;
}

@media (max-width: 820px) {
    .featured-trio {
        grid-template-columns: 1fr;
    }
}

/* Layout principal 2 columnas (Contenido + Sidebar) */
.editorial-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 34px;
    padding: 10px 0 56px;
}

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

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 22px;
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.story-card {
    background: var(--bg-surface);
    border: 1px solid var(--rule-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
    border-color: var(--rule-medium);
    box-shadow: 0 6px 18px rgba(17, 17, 17, 0.05);
}

.story-photo-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-stone);
    overflow: hidden;
    border-bottom: 1px solid var(--rule-light);
}

.story-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.story-card:hover .story-photo-box img {
    transform: scale(1.03);
}

.photo-status-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    padding: 2px 6px;
    background: rgba(250, 249, 245, 0.92);
    color: var(--ink-secondary);
    border: 1px solid var(--rule-medium);
    letter-spacing: 0.04em;
}

.story-card-body {
    padding: 16px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-title {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink-primary);
    margin: 6px 0 8px;
}

.story-title a:hover {
    color: var(--accent-navy);
}

.story-deck {
    font-size: 13.5px;
    color: var(--ink-secondary);
    line-height: 1.48;
    margin-bottom: 12px;
}

.story-meta-footer {
    margin-top: auto;
    padding: 10px 18px;
    border-top: 1px solid var(--rule-light);
    background: var(--bg-paper);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    color: var(--ink-muted);
    font-family: var(--font-mono);
}

/* ==========================================================================
   7. SIDEBAR EDITORIAL (TENDENCIAS Y RADAR)
   ========================================================================== */
.sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-panel {
    background: var(--bg-surface);
    border: 1px solid var(--rule-light);
    border-top: 2px solid var(--rule-heavy);
    padding: 18px;
}

.sidebar-panel-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--ink-primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.most-read-list {
    list-style: none;
}

.most-read-item {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--rule-light);
}

.most-read-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.most-read-rank {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--rule-medium);
    line-height: 1;
    min-width: 26px;
}

.most-read-link {
    font-family: var(--font-serif);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-primary);
    display: block;
    margin-bottom: 4px;
}

.most-read-link:hover {
    color: var(--accent-navy);
}

.most-read-meta {
    font-size: 11px;
    color: var(--ink-muted);
    font-family: var(--font-mono);
}

/* ==========================================================================
   8. VISTA DE LECTURA INDIVIDUAL (noticia.php)
   ========================================================================== */
.reading-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 90;
}

.reading-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-crimson);
    transition: width 0.1s linear;
}

.article-sheet {
    background: var(--bg-surface);
    border: 1px solid var(--rule-light);
    padding: 36px 44px;
}

@media (max-width: 768px) {
    .article-sheet {
        padding: 20px 16px;
    }
}

.breadcrumb-line {
    font-size: 11.5px;
    color: var(--ink-muted);
    margin-bottom: 16px;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-line a {
    color: var(--accent-navy);
    font-weight: 600;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3.6vw, 42px);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.02em;
    color: var(--ink-primary);
    margin-bottom: 14px;
}

.article-standfirst {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.45;
    color: var(--ink-secondary);
    margin-bottom: 20px;
}

.article-byline-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--rule-light);
    border-bottom: 1px solid var(--rule-light);
    font-size: 12.5px;
    color: var(--ink-muted);
    gap: 12px;
    margin-bottom: 20px;
}

.share-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.share-btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--rule-medium);
    background: var(--bg-paper);
    color: var(--ink-primary);
    cursor: pointer;
    border-radius: 3px;
    min-height: 38px;
    transition: all 0.15s ease;
}

.share-btn:hover {
    background: var(--ink-primary);
    color: #FFFFFF;
    border-color: var(--ink-primary);
}

.article-lead-figure {
    margin: 0 0 28px;
}

.article-lead-figure .figure-frame {
    aspect-ratio: 16 / 9;
    background: var(--bg-stone);
    border: 1px solid var(--rule-light);
    overflow: hidden;
}

.article-lead-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.figure-caption {
    font-size: 12px;
    color: var(--ink-muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--rule-light);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.article-prose {
    max-width: 68ch;
    font-size: 17px;
    line-height: 1.78;
    color: var(--ink-secondary);
}

.article-prose p {
    margin-bottom: 20px;
}

.article-prose p:first-of-type::first-letter {
    font-family: var(--font-serif);
    float: left;
    font-size: 56px;
    line-height: 0.85;
    padding-right: 10px;
    padding-top: 4px;
    font-weight: 700;
    color: var(--ink-primary);
}

/* Enlaces internos editoriales (bucle de comunicación) */
.editorial-inline-link {
    color: var(--accent-navy);
    font-weight: 600;
    border-bottom: 1.5px solid rgba(13, 59, 102, 0.35);
    padding-bottom: 1px;
}

.editorial-inline-link:hover {
    color: var(--accent-crimson);
    border-bottom-color: var(--accent-crimson);
}

.context-dossier {
    background: var(--bg-paper);
    border-left: 3px solid var(--ink-primary);
    padding: 18px 20px;
    margin: 30px 0;
    font-size: 14.5px;
    color: var(--ink-secondary);
}

.context-dossier-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-primary);
    margin-bottom: 6px;
}

/* ==========================================================================
   9. PIE DE PÁGINA
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: #B8B7B0;
    padding: 42px 0 28px;
    border-top: 3px solid var(--accent-crimson);
    font-size: 13px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2A2A28;
    margin-bottom: 18px;
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11.5px;
    color: #82817B;
}

/* ==========================================================================
   10. TRANSICIONES NATIVAS, ICONOS LUCIDE, BUSCADOR FUSE.JS & LIGHTBOX
   ========================================================================== */
@view-transition {
    navigation: auto;
}

.lucide {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
    vertical-align: -2px;
    flex-shrink: 0;
}

.masthead-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-primary);
    background: var(--bg-paper);
    border: 1px solid var(--rule-medium);
    border-radius: 3px;
    cursor: pointer;
    min-height: 32px;
    transition: all 0.15s ease;
}

.search-trigger-btn:hover {
    background: var(--ink-primary);
    color: #FFFFFF;
    border-color: var(--ink-primary);
}

/* Modal / Drawer de Búsqueda Instantánea */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.72);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 14px 20px;
}

.search-overlay.is-open {
    display: flex;
}

.search-modal {
    background: var(--bg-surface);
    border: 1px solid var(--rule-heavy);
    width: 100%;
    max-width: 680px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.search-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rule-light);
    background: var(--bg-paper);
}

.search-input-field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: var(--font-sans);
    color: var(--ink-primary);
    outline: none;
}

.search-close-btn {
    background: transparent;
    border: 1px solid var(--rule-medium);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-secondary);
    min-height: 34px;
}

.search-results-list {
    overflow-y: auto;
    padding: 8px 0;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--rule-light);
    transition: background 0.12s ease;
}

.search-result-item:hover {
    background: var(--bg-paper);
}

.search-result-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-crimson);
    font-weight: 600;
}

.search-result-title {
    font-family: var(--font-serif);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--ink-primary);
    line-height: 1.3;
}

.search-result-sub {
    font-size: 12.5px;
    color: var(--ink-muted);
}

.figure-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(17, 17, 17, 0.78);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

/* ==========================================================================
   11. PLATAFORMAS ASOCIADAS Y ENLACES DE REFERIDOS
   ========================================================================== */
.ticker-partner-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1E3A5F;
    color: #FFFFFF;
    padding: 2px 9px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.ticker-partner-pill:first-of-type {
    margin-left: auto;
}

.ticker-partner-pill:hover {
    background: var(--accent-crimson);
    color: #FFFFFF;
}

.partner-card {
    background: var(--bg-surface);
    border: 1px solid var(--rule-light);
    border-left: 3px solid var(--accent-navy);
    padding: 15px 16px;
    margin-bottom: 12px;
}

.partner-card:last-child {
    margin-bottom: 0;
}

.partner-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-navy);
}

.partner-headline {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink-primary);
    margin: 4px 0 6px;
}

.partner-desc {
    font-size: 12.5px;
    color: var(--ink-secondary);
    line-height: 1.45;
    margin-bottom: 12px;
}

.partner-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--bg-paper);
    border: 1px dashed #B8B2A4;
    padding: 6px 9px;
    margin-bottom: 11px;
    border-radius: 2px;
    flex-wrap: wrap;
}

.partner-code-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
}

.partner-code-val {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-navy);
    letter-spacing: 0.06em;
}

.partner-code-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FFFFFF;
    border: 1px solid var(--rule-medium);
    color: var(--ink-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 2px;
    cursor: pointer;
    min-height: 28px;
    transition: all 0.15s ease;
    margin-left: auto;
}

.partner-code-copy:hover {
    border-color: var(--accent-navy);
    color: var(--accent-navy);
}

.partner-code-copy.is-copied {
    background: #ECFDF5;
    border-color: #34D399;
    color: #065F46;
}

.partner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ink-primary);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 13px;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.partner-cta:hover {
    background: var(--accent-navy);
    color: #FFFFFF;
}

.article-partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.article-partner-callout {
    background: var(--bg-paper);
    border: 1px solid var(--rule-medium);
    border-left: 3px solid var(--accent-navy);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

/* ==========================================================================
   12. SELECTOR EDITORIAL DE IDIOMAS (ES | EN | 中文 | RU) + ACCESIBILIDAD Y MÓVIL
   ========================================================================== */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--rule-control);
    border-radius: 3px;
    background: var(--bg-paper);
    overflow: hidden;
    flex-shrink: 0;
}

.lang-globe-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    color: var(--ink-muted);
    border-right: 1px solid var(--rule-light);
    height: 36px;
}

.lang-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-secondary);
    padding: 0 9px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--rule-light);
    transition: all 0.15s ease;
    text-decoration: none;
}

.lang-pill:last-child {
    border-right: none;
}

.lang-pill:hover {
    background: var(--bg-stone);
    color: var(--ink-primary);
}

.lang-pill.is-active {
    background: var(--ink-primary);
    color: #FFFFFF;
}

/* Estética impresa, contención CLS e higiene tipográfica multi-idioma */
:lang(zh) .masthead-subtitle { font-style: normal; }
:lang(zh) .masthead-title,
:lang(zh) .hero-headline,
:lang(zh) .article-title,
:lang(zh) .section-heading { letter-spacing: 0; }
:lang(zh) .article-prose p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    font-weight: inherit;
}

.masthead-title,
.hero-headline,
.story-title,
.article-title,
.most-read-link,
.partner-headline {
    overflow-wrap: break-word;
    hyphens: auto;
    text-wrap: balance;
}

.story-photo-box,
.hero-photo-frame,
.article-lead-figure .figure-frame > a {
    display: block;
    width: 100%;
    flex-shrink: 0;
}

.article-lead-figure .figure-frame > a {
    height: 100%;
}

.hero-thumbs-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hero-thumb-btn {
    min-width: 0;
}

.hero-thumb-img {
    width: 56px;
    height: 32px;
}

.kicker-code {
    flex-shrink: 0;
    white-space: nowrap;
}

.hero-photo-badge {
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-meta-footer {
    gap: 6px 12px;
    flex-wrap: wrap;
}

.story-card:hover {
    border-color: var(--ink-primary);
    box-shadow: none;
}

.section-header-rule {
    border-top: 3px double var(--rule-heavy);
    padding-top: 10px;
}

.featured-trio .story-title { font-size: 20.5px; }
.news-grid .story-title { font-size: 18px; }

.share-btn,
.search-close-btn,
.partner-code-copy,
.swiper-arrow-btn,
.search-trigger-btn,
.masthead-admin-link {
    border-color: var(--rule-control);
}

.search-trigger-btn,
.masthead-admin-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.swiper-arrow-btn {
    width: 44px;
    height: 44px;
}

.read-more-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.partner-code-copy {
    min-height: 38px;
    padding: 6px 11px;
}

.partner-cta {
    width: 100%;
    justify-content: space-between;
    min-height: 42px;
}

.partner-auto-note {
    font-size: 11px;
    color: var(--ink-muted);
    background: var(--bg-paper);
    border: 1px dashed var(--rule-medium);
    padding: 7px 9px;
    margin-bottom: 10px;
    border-radius: 2px;
}

.article-partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.ad-wrapper {
    max-width: 100%;
    overflow: hidden;
}

.ad-slot-header { min-height: 60px; }
.ad-slot-sidebar { min-height: 250px; }
.ad-slot-article { min-height: 120px; }

.most-read-rank {
    color: #5C5A54;
}

.ticker-partner-pill {
    min-height: 26px;
    padding: 3px 10px;
}

.ticker-partner-pill:first-of-type {
    margin-left: 0;
}

.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.search-close-btn {
    min-height: 44px;
    min-width: 64px;
}

.search-input-bar:focus-within {
    outline: var(--focus-ring);
    outline-offset: -2px;
}

@media (max-width: 900px) {
    .masthead-utility {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .masthead-utility-left {
        gap: 4px 10px;
    }
    .masthead-utility-sep {
        display: none;
    }
    .masthead-utility-left {
        justify-content: space-between;
    }
    .masthead-actions-group {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
    }
    .hero-summary {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .section-nav-track {
        -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
        mask-image: linear-gradient(to right, #000 92%, transparent);
        scroll-snap-type: x proximity;
    }
}

@media (max-width: 640px) {
    .masthead-brand {
        padding: 12px 0 10px;
    }
    .lang-globe-icon {
        display: none;
    }
    .lang-pill {
        padding: 0 7px;
        min-height: 38px;
    }
    .masthead-actions-group {
        flex-wrap: nowrap;
        gap: 5px;
    }
    .search-trigger-btn {
        min-height: 38px;
        padding: 4px 9px;
    }
    .masthead-admin-link {
        min-height: 38px;
        padding: 4px 9px;
    }
    .search-overlay {
        padding: 12px 10px;
    }
    .search-modal {
        max-height: calc(100dvh - 24px);
    }
}

@media (max-width: 395px) {
    .masthead-admin-label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .live-indicator,
    .breaking-marquee-track {
        animation: none !important;
    }
    .breaking-marquee-wrap {
        overflow-x: auto;
    }
}


