/* ===== Base ===== */
body {
    background-color: #030303;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ===== Utilities ===== */
.text-glow {
    text-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.grid-bg {
    background-size: 100px 200px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* ===== Monotone Logo ===== */
.monotone-logo {
    filter: grayscale(100%) brightness(150%) contrast(0.5);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.monotone-logo:hover {
    opacity: 1;
    filter: grayscale(100%) brightness(200%);
}

/* ===== Beam Lines ===== */
.beam-line {
    stroke-dasharray: 80 1000;
    stroke-linecap: round;
}

/* ===== Sonar Animation ===== */
@keyframes sonar-wave {
    0% { r: 10px; opacity: 0.8; stroke-width: 1px; }
    100% { r: 80px; opacity: 0; stroke-width: 0px; }
}

.animate-sonar {
    animation: sonar-wave 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.delay-1000 { animation-delay: 1s; }
.delay-2000 { animation-delay: 2s; }

/* ===== Gradient Properties ===== */
@property --gradient-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@property --gradient-angle-offset { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@property --gradient-percent { syntax: "<percentage>"; initial-value: 20%; inherits: false; }
@property --gradient-shine { syntax: "<color>"; initial-value: #38BDF8; inherits: false; }

/* ===== Shiny CTA Button ===== */
.shiny-cta {
    --gradient-angle: 0deg;
    --gradient-angle-offset: 0deg;
    --gradient-percent: 20%;
    --gradient-shine: #38BDF8;
    --shadow-size: 2px;
    position: relative;
    overflow: hidden;
    border-radius: 9999px;
    padding: 1.25rem 2.5rem;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(#030303, #030303) padding-box,
        conic-gradient( from calc(var(--gradient-angle) - var(--gradient-angle-offset)), transparent 0%, #0ea5e9 5%, var(--gradient-shine) 15%, #0ea5e9 30%, transparent 40%, transparent 100% ) border-box;
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px #1a1818;
    outline: none;
    transition: --gradient-angle-offset 800ms cubic-bezier(0.25, 1, 0.5, 1), --gradient-percent 800ms cubic-bezier(0.25, 1, 0.5, 1), --gradient-shine 800ms cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s;
    cursor: pointer;
    isolation: isolate;
    outline-offset: 4px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    z-index: 0;
    animation: border-spin 2.5s linear infinite;
}

@keyframes border-spin { to { --gradient-angle: 360deg; } }

.shiny-cta:active { transform: translateY(1px); }

.shiny-cta::before {
    content: ''; pointer-events: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0;
    --size: calc(100% - 6px); --position: 2px; --space: 4px; width: var(--size); height: var(--size);
    background: radial-gradient(circle at var(--position) var(--position), white 0.5px, transparent 0) padding-box;
    background-size: var(--space) var(--space); background-repeat: space;
    mask-image: conic-gradient( from calc(var(--gradient-angle) + 45deg), black, transparent 10% 90%, black );
    border-radius: inherit; opacity: 0.4; pointer-events: none;
}

.shiny-cta::after {
    content: ''; pointer-events: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
    width: 100%; aspect-ratio: 1;
    background: linear-gradient(-50deg, transparent, #0ea5e9, transparent);
    mask-image: radial-gradient(circle at bottom, transparent 40%, black);
    opacity: 0.6; animation: shimmer 4s linear infinite; animation-play-state: running;
}

.shiny-cta span { position: relative; z-index: 2; display: inline-block; }

.shiny-cta span::before {
    content: ''; pointer-events: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1;
    --size: calc(100% + 1rem); width: var(--size); height: var(--size);
    box-shadow: inset 0 -1ex 2rem 4px #0ea5e9; opacity: 0; border-radius: inherit;
    transition: opacity 800ms cubic-bezier(0.25, 1, 0.5, 1); animation: breathe 4.5s linear infinite;
}

@keyframes shimmer { to { transform: translate(-50%, -50%) rotate(360deg);} }

@keyframes breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1);}
    50% { transform: translate(-50%, -50%) scale(1.20);}
}

/* ===== Border Gradient Pseudo ===== */
[style*="--border-gradient"]::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: var(--border-radius-before, inherit);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background: var(--border-gradient);
    pointer-events: none;
}

/* ===== Bilingual System ===== */
body[data-lang="fr"] .en { display: none !important; }
body[data-lang="en"] .fr { display: none !important; }

.lang-btn { cursor: pointer; transition: opacity 0.2s; }
.lang-btn:hover { opacity: 1; }
.lang-btn.active { opacity: 1; color: #38BDF8; }
.lang-btn.inactive { opacity: 0.4; }

/* ===== Marquee ===== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 40s linear infinite;
}

.mask-gradient-fade {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* ===== Glass Cards (Toolkit) ===== */
.glass-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.glass-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(56,189,248,0.25);
    box-shadow: 0 0 40px rgba(56,189,248,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: translateY(-2px);
}

.glass-card:hover .glass-icon {
    color: #38BDF8;
}

/* ===== Breathing Animation ===== */
@keyframes breathe-in-out {
    0%, 100% { transform: scale(0.6); opacity: 0.3; }
    25% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1); opacity: 0.8; }
    75% { transform: scale(0.6); opacity: 0.3; }
}

.breathe-circle {
    animation: breathe-in-out 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.breathe-circle-delayed {
    animation: breathe-in-out 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: 0.5s;
}

.breathe-circle-delayed-2 {
    animation: breathe-in-out 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: 1s;
}

/* ===== Newsroom Mosaic ===== */
.mosaic-grid {
    columns: 3;
    column-gap: 1.25rem;
}

@media (max-width: 1024px) {
    .mosaic-grid { columns: 2; }
}

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

.mosaic-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
}

.mosaic-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.mosaic-card:hover {
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.06);
}

/* Placeholder shown before embeds are pasted */
.embed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    min-height: 220px;
}

/* Make embeds fit their card */
.mosaic-card iframe,
.mosaic-card blockquote,
.mosaic-card .twitter-tweet,
.mosaic-card .instagram-media {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

@keyframes breathe-text {
    0%, 20% { opacity: 1; }
    25%, 45% { opacity: 0; }
    50%, 70% { opacity: 0; }
    75%, 95% { opacity: 0; }
}

@keyframes hold-text {
    0%, 20% { opacity: 0; }
    25%, 45% { opacity: 1; }
    50%, 70% { opacity: 0; }
    75%, 95% { opacity: 0; }
}

@keyframes exhale-text {
    0%, 20% { opacity: 0; }
    25%, 45% { opacity: 0; }
    50%, 70% { opacity: 1; }
    75%, 95% { opacity: 0; }
}

/* ===== Article Page ===== */

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #38BDF8, #0ea5e9);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Article Page Layout */
.layout-article {
    max-width: 90rem;
    margin: 0 auto;
    padding: 7rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    .layout-article {
        grid-template-columns: 200px 1fr;
        max-width: 90rem;
    }
}

@media (max-width: 1024px) {
    .layout-article {
        grid-template-columns: 1fr;
        padding-top: 5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Sidebar Tree */
.sidebar-tree {
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sidebar-tree::-webkit-scrollbar { width: 4px; }
.sidebar-tree::-webkit-scrollbar-track { background: transparent; }
.sidebar-tree::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 9999px; }

.sidebar-tree details summary {
    list-style: none;
    cursor: pointer;
}
.sidebar-tree details summary::-webkit-details-marker { display: none; }

.sidebar-tree details > summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
}

.sidebar-tree details > summary:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
}

.sidebar-tree details > summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid rgba(255,255,255,0.25);
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.sidebar-tree details[open] > summary::before {
    transform: rotate(90deg);
}

.sidebar-tree details > summary a {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.tree-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.tree-link:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
}

.tree-link.active,
.sidebar-tree details > summary.active {
    color: #38BDF8 !important;
    background: rgba(56,189,248,0.06);
    border-left-color: #38BDF8;
    font-weight: 500;
}

.tree-link.active .tree-dot {
    box-shadow: 0 0 10px rgba(56,189,248,0.8);
}

.tree-link.depth-0 {
    font-weight: 500;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

.tree-link.depth-2 {
    font-size: 0.75rem;
    padding-left: 0.5rem;
}

.tree-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38BDF8;
    box-shadow: 0 0 8px rgba(56,189,248,0.6);
    flex-shrink: 0;
}

/* Article Header */
.article-header-block h1 {
    font-family: 'Newsreader', serif;
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.75rem;
}

/* Article Body Container */
#article-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

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

#article-body pre {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
#article-body pre code {
    background: transparent;
    color: #e6edf3;
    font-size: 0.82rem;
    line-height: 1.65;
    padding: 0;
}
#article-body code {
    background: rgba(255,255,255,0.07);
    color: #93c5fd;
    padding: 0.1em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

#article-body iframe {
    max-width: 100%;
}

/* Article Body Typography */
#article-body h2 {
    font-family: 'Newsreader', serif;
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

#article-body h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 3rem;
    height: 1px;
    background: #38BDF8;
    box-shadow: 0 0 8px rgba(56,189,248,0.4);
}

#article-body h3 {
    font-family: 'Newsreader', serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    color: rgba(255,255,255,0.9);
    margin-top: 2.25rem;
    margin-bottom: 0.625rem;
}

#article-body h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

#article-body h5, #article-body h6 {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    margin-top: 1.25rem;
    margin-bottom: 0.375rem;
}

#article-body p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 1.25rem;
}

#article-body strong {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

#article-body em {
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

#article-body a {
    color: #38BDF8;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}
#article-body a:hover { opacity: 0.8; }

#article-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    margin: 2.5rem 0;
}

#article-body ul, #article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: rgba(255,255,255,0.65);
    font-weight: 300;
    line-height: 1.8;
}

#article-body li { margin-bottom: 0.375rem; }

#article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#article-body th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(56,189,248,0.2);
    color: #38BDF8;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#article-body td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    font-weight: 300;
}

#article-body blockquote {
    border-left: 2px solid #38BDF8;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

/* Section Nav Grid */
.section-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.section-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.section-nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, rgba(56,189,248,0.06), transparent 60%);
    transition: opacity 0.3s;
}
.section-nav-link:hover::before { opacity: 1; }

.section-nav-link:hover {
    border-color: rgba(56,189,248,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.section-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    background: rgba(56,189,248,0.08);
    border: 1px solid rgba(56,189,248,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-nav-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}
.section-nav-link:hover .section-nav-label { color: #fff; }

/* Content Tabs */
.content-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 2rem 0 0;
    padding: 0.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.content-tabs::-webkit-scrollbar { display: none; }

.content-tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.content-tabs [role="tab"]:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
}

.content-tabs [role="tab"][aria-selected="true"] {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.content-tabs [role="tab"] svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}
.content-tabs [role="tab"][aria-selected="true"] svg {
    opacity: 1;
    color: #38BDF8;
}

[role="tabpanel"][hidden] { display: none; }

/* Disabled media tab (video / podcast / infographic not yet available) */
.content-tabs [role="tab"].tab-media-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    position: relative;
}
.content-tabs [role="tab"].tab-media-disabled::after {
    content: 'soon';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.45rem;
    font-family: 'Inter', monospace;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #38BDF8;
    opacity: 0.8;
    line-height: 1;
}

/* Article Pagination */
.article-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.pag-card {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    text-decoration: none;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.pag-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(56,189,248,0.25);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.pag-card[rel="next"] { text-align: right; align-items: flex-end; }

.pag-direction {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
}

.pag-direction svg {
    width: 12px;
    height: 12px;
    color: #38BDF8;
    transition: transform 0.3s;
}
.pag-card[rel="prev"]:hover .pag-direction svg { transform: translateX(-3px); }
.pag-card[rel="next"]:hover .pag-direction svg { transform: translateX(3px); }

.pag-title {
    font-family: 'Newsreader', serif;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}
.pag-card:hover .pag-title { color: #38BDF8; }

/* Video Panel */
.video-panel { padding: 2.5rem 0; }
.video-player-wrapper {
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden; background: #000; position: relative;
}
.video-placeholder {
    aspect-ratio: 16 / 9; width: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(56,189,248,0.02));
    position: relative; cursor: pointer;
}
.video-play-circle {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.video-placeholder:hover .video-play-circle {
    background: rgba(56,189,248,0.2);
    border-color: rgba(56,189,248,0.4);
    box-shadow: 0 0 40px rgba(56,189,248,0.15);
    transform: scale(1.05);
}
.video-play-circle svg { width: 28px; height: 28px; color: #fff; margin-left: 3px; }
.video-badge {
    position: absolute; top: 1rem; right: 1rem;
    font-size: 0.625rem; color: rgba(255,255,255,0.5);
    font-family: 'Inter', monospace; letter-spacing: 0.08em; text-transform: uppercase;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
    padding: 0.25rem 0.625rem; border-radius: 9999px;
}
.video-info {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
}
.video-info h3 {
    font-family: 'Newsreader', serif;
    font-size: 1.25rem; font-weight: 500;
    color: #fff; margin-bottom: 0.25rem;
}
.video-info .video-meta {
    font-size: 0.75rem; color: rgba(255,255,255,0.4);
    font-family: 'Inter', monospace; letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}
.video-info p { color: rgba(255,255,255,0.7); font-size: 0.875rem; font-weight: 300; line-height: 1.6; }

.video-chapters { margin-top: 2rem; }
.video-chapters h4 {
    font-size: 0.625rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4); margin-bottom: 0.75rem;
}
.chapter-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; padding: 0; }
.chapter-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.75rem 1rem; border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.01);
    transition: all 0.2s; cursor: pointer;
}
.chapter-item:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.chapter-ts { font-family: 'Inter', monospace; font-size: 0.7rem; color: #38BDF8; letter-spacing: 0.05em; min-width: 2.75rem; }
.chapter-title { flex: 1; font-size: 0.875rem; color: rgba(255,255,255,0.7); font-weight: 400; }

/* Infographic Panel */
.infographic-panel { padding: 2.5rem 0; }
.infographic-header { margin-bottom: 2rem; }
.infographic-header h3 {
    font-family: 'Newsreader', serif;
    font-size: 1.5rem; font-weight: 500;
    color: #fff; margin-bottom: 0.25rem;
}
.infographic-header .infographic-meta {
    font-size: 0.75rem; color: rgba(255,255,255,0.4);
    font-family: 'Inter', monospace; letter-spacing: 0.02em;
}

.infographic-flow {
    position: relative;
    display: flex; flex-direction: column; gap: 0;
}
.infographic-flow::before {
    content: '';
    position: absolute;
    top: 2.5rem; bottom: 2.5rem; left: 1.5rem;
    width: 1px;
    background: linear-gradient(to bottom, #38BDF8, rgba(56,189,248,0.15), #38BDF8);
}
.infographic-step {
    display: flex; align-items: flex-start; gap: 1.25rem;
    padding: 1.25rem 0; position: relative;
}
.step-marker {
    width: 3rem; height: 3rem; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', monospace; font-size: 0.75rem; font-weight: 700;
    color: #000; background: #38BDF8;
    box-shadow: 0 0 16px rgba(56,189,248,0.35);
    position: relative; z-index: 2;
}
.step-content { flex: 1; padding-top: 0.25rem; }
.step-content h4 {
    font-size: 0.9375rem; font-weight: 600;
    color: #fff; margin-bottom: 0.25rem;
}
.step-content p {
    font-size: 0.8125rem; color: rgba(255,255,255,0.7);
    font-weight: 300; line-height: 1.6; margin: 0;
}
.step-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.625rem; }
.step-tag {
    font-size: 0.625rem; font-family: 'Inter', monospace;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: #38BDF8;
    background: rgba(56,189,248,0.08);
    border: 1px solid rgba(56,189,248,0.15);
    padding: 0.2rem 0.5rem; border-radius: 9999px;
}

.infographic-summary {
    margin-top: 2rem;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.summary-stat {
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    padding: 1.25rem; text-align: center;
    position: relative; overflow: hidden;
    transition: all 0.3s;
}
.summary-stat::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.2), transparent);
}
.summary-stat:hover { background: rgba(255,255,255,0.04); border-color: rgba(56,189,248,0.2); }
.stat-value {
    font-family: 'Newsreader', serif;
    font-size: 1.75rem; font-weight: 500;
    color: #38BDF8; line-height: 1; margin-bottom: 0.375rem;
}
.stat-label {
    font-size: 0.625rem; font-family: 'Inter', monospace;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
}

/* References Panel */
.references-text-section ul {
    list-style: none;
    padding: 0;
}

.references-text-section li {
    padding: 0.75rem 1rem;
    border-left: 2px solid rgba(56,189,248,0.15);
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.55);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.6;
    transition: border-color 0.2s;
}

.references-text-section li:hover {
    border-left-color: #38BDF8;
}

.video-ref-card img {
    transition: transform 0.3s;
}
.video-ref-card:hover img {
    transform: scale(1.03);
}

/* References — Data Source Cards (dark mode default) */
.data-src-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.data-src-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.data-src-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.18);
    color: #38BDF8;
}
.data-src-text {
    flex: 1;
    min-width: 0;
}
.ref-src-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s;
    margin: 0;
    line-height: 1.4;
}
.data-src-card:hover .ref-src-label {
    color: #38BDF8;
}
.ref-src-desc {
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.42);
    margin-top: 0.125rem;
    line-height: 1.5;
}
.ref-src-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.18);
    transition: color 0.2s;
}
.data-src-card:hover .ref-src-arrow {
    color: #38BDF8;
}

/* References — Data Source Cards (light mode) */
body.light-theme .data-src-card {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}
body.light-theme .data-src-card:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
body.light-theme .data-src-icon {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.18);
    color: #0284c7;
}
body.light-theme .ref-src-label {
    color: #111827;
}
body.light-theme .data-src-card:hover .ref-src-label {
    color: #0284c7;
}
body.light-theme .ref-src-desc {
    color: #6b7280;
}
body.light-theme .ref-src-arrow {
    color: rgba(0, 0, 0, 0.2);
}
body.light-theme .data-src-card:hover .ref-src-arrow {
    color: #0284c7;
}

/* Article Responsive */
@media (max-width: 1024px) {
    .layout-article aside {
        position: static;
    }
    .sidebar-tree {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .layout-article {
        padding: 4.5rem 1rem 2.5rem;
    }
    .article-header-block h1 { font-size: 1.5rem; }
    .article-pagination { grid-template-columns: 1fr; }
    .pag-card[rel="next"] { text-align: left; align-items: flex-start; }
    .section-nav-grid { grid-template-columns: 1fr; }
    .content-tabs {
        width: 100%;
        border-radius: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .content-tabs [role="tab"] {
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
        border-radius: 0.5rem;
    }
    .content-tabs [role="tab"] span { font-size: 0.65rem; }
    .content-tabs [role="tab"] svg { width: 12px; height: 12px; }
    .video-info { padding: 1rem 1.25rem; }
    .infographic-summary { grid-template-columns: 1fr; }
    #article-body h2 { font-size: 1.5rem; margin-top: 2.25rem; }
    #article-body p { font-size: 1.0625rem; line-height: 1.8; }
    #article-body table { font-size: 0.9rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    #article-body th, #article-body td { padding: 0.625rem 0.75rem; white-space: nowrap; }
    .pag-card { padding: 1.25rem 1.5rem; }
    .sidebar-tree { max-height: 250px; }
}

@media (max-width: 480px) {
    .layout-article {
        padding: 4rem 0.75rem 2rem;
    }
    .article-header-block h1 { font-size: 1.5rem; }
    #article-body h2 { font-size: 1.35rem; }
    #article-body p { font-size: 1rem; }
    .section-nav-link { padding: 0.75rem; }
    .section-nav-icon { width: 28px; height: 28px; }
    .section-nav-label { font-size: 0.75rem; }
    .content-tabs [role="tab"] { padding: 0.3rem 0.5rem; font-size: 0.625rem; gap: 0.3rem; }
}

/* ===== Light Theme (Article Page) ===== */

/* Sidebar tree */
body.light-theme .sidebar-tree details > summary { color: rgba(0,0,0,0.55); }
body.light-theme .sidebar-tree details > summary:hover { color: rgba(0,0,0,0.85); background: rgba(0,0,0,0.04); }
body.light-theme .sidebar-tree details > summary::before { border-left-color: rgba(0,0,0,0.25); }

body.light-theme .tree-link { color: rgba(0,0,0,0.45); }
body.light-theme .tree-link:hover { color: rgba(0,0,0,0.85); background: rgba(0,0,0,0.04); }
body.light-theme .tree-link.depth-0 { color: rgba(0,0,0,0.7); }

body.light-theme .tree-link.active,
body.light-theme .sidebar-tree details > summary.active {
    color: #0284c7 !important;
    background: rgba(2,132,199,0.06);
    border-left-color: #0284c7;
}
body.light-theme .tree-link.active .tree-dot { box-shadow: 0 0 8px rgba(2,132,199,0.6); }

/* Article header */
body.light-theme .article-header-block h1 { color: #111827; }

/* Article body */
body.light-theme #article-body h2 { color: #111827; border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme #article-body h2::after { background: #0284c7; box-shadow: none; }
body.light-theme #article-body h3 { color: #1f2937; }
body.light-theme #article-body h4 { color: #374151; }
body.light-theme #article-body h5, body.light-theme #article-body h6 { color: #4b5563; }
body.light-theme #article-body p { color: #374151; }
body.light-theme #article-body strong { color: #111827; }
body.light-theme #article-body em { color: #6b7280; }
body.light-theme #article-body a { color: #0284c7; }
body.light-theme #article-body hr { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent); }
body.light-theme #article-body ul,
body.light-theme #article-body ol { color: #4b5563; }
body.light-theme #article-body th { border-bottom-color: rgba(2,132,199,0.2); color: #0284c7; }
body.light-theme #article-body td { border-bottom-color: rgba(0,0,0,0.06); color: #6b7280; }
body.light-theme #article-body blockquote { border-left-color: #0284c7; color: #6b7280; }

/* Section nav */
body.light-theme .section-nav-link { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
body.light-theme .section-nav-link:hover { border-color: rgba(2,132,199,0.3); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
body.light-theme .section-nav-label { color: #374151; }
body.light-theme .section-nav-link:hover .section-nav-label { color: #111827; }

/* Content tabs */
body.light-theme .content-tabs { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
body.light-theme .content-tabs [role="tab"] { color: rgba(0,0,0,0.45); }
body.light-theme .content-tabs [role="tab"]:hover { color: rgba(0,0,0,0.7); background: rgba(0,0,0,0.04); }
body.light-theme .content-tabs [role="tab"][aria-selected="true"] {
    color: #111827; background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
body.light-theme .content-tabs [role="tab"][aria-selected="true"] svg { color: #0284c7; }

/* Pagination */
body.light-theme .article-pagination { border-top-color: rgba(0,0,0,0.08); }
body.light-theme .pag-card { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
body.light-theme .pag-card:hover { background: rgba(0,0,0,0.03); border-color: rgba(2,132,199,0.3); box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
body.light-theme .pag-direction { color: rgba(0,0,0,0.4); }
body.light-theme .pag-direction svg { color: #0284c7; }
body.light-theme .pag-title { color: #111827; }
body.light-theme .pag-card:hover .pag-title { color: #0284c7; }

/* References */
body.light-theme .references-text-section li { color: #4b5563; border-left-color: rgba(2,132,199,0.2); }
body.light-theme .references-text-section li:hover { border-left-color: #0284c7; }

/* Codification — Academic Reference List */
.codif-ref-list { list-style: none; padding: 0; }
.codif-ref-item { padding: .65rem 1rem; border-left: 2px solid rgba(56,189,248,.15); margin-bottom: .4rem; transition: border-color .2s; }
.codif-ref-item:hover { border-left-color: #38BDF8; }
.codif-ref-key { display: block; font-size: .8rem; font-weight: 700; color: #38BDF8; margin-bottom: .1rem; font-family: monospace; }
.codif-ref-title { display: block; font-size: .8rem; font-style: italic; color: rgba(255,255,255,.7); margin-bottom: .15rem; }
.codif-ref-note { display: block; font-size: .7rem; color: rgba(255,255,255,.45); }
body.light-theme .codif-ref-item { border-left-color: rgba(2,132,199,.18); }
body.light-theme .codif-ref-item:hover { border-left-color: #0284c7; }
body.light-theme .codif-ref-key { color: #0284c7; }
body.light-theme .codif-ref-title { color: #374151; }
body.light-theme .codif-ref-note { color: #6b7280; }

/* Video panel */
body.light-theme .video-player-wrapper { border-color: rgba(0,0,0,0.08); background: #f8fafc; }
body.light-theme .video-placeholder { background: linear-gradient(135deg, rgba(2,132,199,0.06), rgba(2,132,199,0.02)); }
body.light-theme .video-play-circle { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); }
body.light-theme .video-placeholder:hover .video-play-circle { background: rgba(2,132,199,0.15); border-color: rgba(2,132,199,0.3); box-shadow: 0 0 30px rgba(2,132,199,0.12); }
body.light-theme .video-info { border-top-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
body.light-theme .video-info h3 { color: #111827; }
body.light-theme .video-info .video-meta { color: rgba(0,0,0,0.4); }
body.light-theme .video-info p { color: #4b5563; }
body.light-theme .video-chapters h4 { color: rgba(0,0,0,0.4); }
body.light-theme .chapter-item { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.01); }
body.light-theme .chapter-item:hover { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); }
body.light-theme .chapter-ts { color: #0284c7; }
body.light-theme .chapter-title { color: #4b5563; }

/* Infographic panel */
body.light-theme .infographic-header h3 { color: #111827; }
body.light-theme .infographic-header .infographic-meta { color: rgba(0,0,0,0.4); }
body.light-theme .infographic-flow::before { background: linear-gradient(to bottom, #0284c7, rgba(2,132,199,0.15), #0284c7); }
body.light-theme .step-marker { background: #0284c7; box-shadow: 0 0 12px rgba(2,132,199,0.2); }
body.light-theme .step-content h4 { color: #111827; }
body.light-theme .step-content p { color: #4b5563; }
body.light-theme .step-tag { color: #0284c7; background: rgba(2,132,199,0.06); border-color: rgba(2,132,199,0.15); }
body.light-theme .summary-stat { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
body.light-theme .summary-stat::before { background: linear-gradient(90deg, transparent, rgba(2,132,199,0.12), transparent); }
body.light-theme .summary-stat:hover { background: rgba(0,0,0,0.03); border-color: rgba(2,132,199,0.2); }
body.light-theme .stat-value { color: #0284c7; }
body.light-theme .stat-label { color: rgba(0,0,0,0.4); }

/* Nav bar */
body.light-theme .lang-btn.active { color: #0284c7; }
body.light-theme .lang-btn.inactive { color: #9ca3af; }

/* Reading progress bar - slightly adjusted for light */
body.light-theme #reading-progress { height: 3px; background: linear-gradient(90deg, #0284c7, #0ea5e9); box-shadow: 0 0 8px rgba(2,132,199,0.5); }

/* Article Preloader */
.article-preloader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: all;
}
.article-preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.preloader-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(2,132,199,0.15);
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: preloader-spin 0.7s linear infinite;
}
.preloader-label {
    color: rgba(0,0,0,0.35);
    font-size: 0.625rem;
    letter-spacing: 0.18em;
}
@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

/* ===== Diagram System ===== */
.finta-diagram {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f8fafc;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.finta-diagram.finta-visible {
    opacity: 1;
    transform: translateY(0);
}
.finta-diagram-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0284c7;
    margin-bottom: 1rem;
}
.finta-diagram svg {
    width: 100%;
    height: auto;
    display: block;
}
.finta-diagram table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
}
.finta-diagram th {
    text-align: left;
    padding: 0.625rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    color: #0284c7;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.finta-diagram td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-weight: 400;
    vertical-align: top;
}
.finta-diagram tbody tr:hover {
    background: rgba(2,132,199,0.03);
}
.finta-diagram .ind-green { color: #16a34a; font-weight: 500; }
.finta-diagram .ind-amber { color: #d97706; font-weight: 500; }
.finta-diagram .ind-red { color: #dc2626; font-weight: 500; }
.finta-diagram .cell-green { background: #dcfce7; color: #15803d; }
.finta-diagram .cell-amber { background: #fef3c7; color: #92400e; }
.finta-diagram .cell-red { background: #fee2e2; color: #991b1b; }
.finta-diagram .dash-cell {
    display: inline-block;
    width: 48px;
    height: 20px;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    vertical-align: middle;
}
.finta-diagram-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #eff6ff;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.6;
}
.finta-diagram .finta-diagram-fallback {
    font-style: italic;
    color: #9ca3af;
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem 1rem;
}

@media (max-width: 640px) {
    .finta-diagram {
        padding: 1rem;
        margin: 1.5rem -0.25rem;
        border-radius: 0.75rem;
    }
    .finta-diagram table { font-size: 0.75rem; }
    .finta-diagram th, .finta-diagram td { padding: 0.375rem 0.5rem; }
    .finta-diagram-label { font-size: 0.6rem; }
}

/* ===== Podcast Player ===== */
.podcast-panel {
    padding: 2rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.podcast-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.podcast-icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(56,189,248,0.04));
    border: 1px solid rgba(56,189,248,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38BDF8;
}
.podcast-icon-wrap svg { width: 22px; height: 22px; }

.podcast-title-text {
    font-family: 'Newsreader', serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    letter-spacing: -0.01em;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.podcast-meta-text {
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin: 0;
}

/* Waveform */
.podcast-waveform {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: rgba(56,189,248,0.04);
    border: 1px solid rgba(56,189,248,0.08);
    overflow: hidden;
    padding: 0 12px;
}

.waveform-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.waveform-bar {
    flex: 1;
    height: 20%;
    border-radius: 2px;
    background: rgba(56,189,248,0.25);
    transition: height 0.12s ease;
    min-width: 2px;
}

.podcast-waveform.playing .waveform-bar {
    background: rgba(56,189,248,0.55);
}

/* Timeline */
.podcast-timeline-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    width: 100%;
}

.podcast-time {
    font-family: 'Inter', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.04em;
    white-space: nowrap;
    width: 2.8rem;
    flex-shrink: 0;
}

#podcast-duration { text-align: right; }

.podcast-timeline {
    flex: 1;
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
    outline: none;
}

.podcast-timeline-bg {
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 99px;
    overflow: hidden;
}

.podcast-timeline-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: #38BDF8;
    border-radius: 99px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.podcast-timeline-thumb {
    position: absolute;
    left: 0%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #38BDF8;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    pointer-events: none;
    transition: left 0.1s linear, transform 0.15s;
}
.podcast-timeline:hover .podcast-timeline-thumb,
.podcast-timeline:focus-visible .podcast-timeline-thumb {
    transform: translate(-50%, -50%) scale(1.3);
}
.podcast-timeline:focus-visible {
    box-shadow: 0 0 0 2px rgba(56,189,248,0.4);
    border-radius: 8px;
}

/* Controls */
.podcast-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.podcast-btn {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: color 0.2s, transform 0.15s;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.podcast-btn:hover { color: #38BDF8; transform: scale(1.08); }
.podcast-btn:active { transform: scale(0.95); }

.podcast-btn-skip {
    gap: 2px;
    position: relative;
}
.podcast-btn-skip svg { width: 22px; height: 22px; }

.podcast-skip-label {
    font-size: 0.55rem;
    font-weight: 700;
    font-family: 'Inter', monospace;
    letter-spacing: 0.04em;
    color: inherit;
    line-height: 1;
}

.podcast-btn-play {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    flex-direction: row;
}
.podcast-btn-play:hover {
    background: #38BDF8;
    color: #000;
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(56,189,248,0.3);
}
.podcast-btn-play:active { transform: scale(0.95); }
.podcast-btn-play svg { width: 20px; height: 20px; }
.podcast-btn-play #podcast-play-icon { margin-left: 2px; }

/* Speed */
.podcast-speed-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.podcast-speed-label {
    font-size: 0.65rem;
    font-family: 'Inter', monospace;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
}

.podcast-speed-btns {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    justify-content: center;
}

.podcast-speed-btn {
    font-size: 0.7rem;
    font-family: 'Inter', monospace;
    font-weight: 500;
    color: #6b7280;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.podcast-speed-btn:hover {
    color: #38BDF8;
    border-color: rgba(56,189,248,0.3);
    background: rgba(56,189,248,0.06);
}
.podcast-speed-btn.active {
    color: #38BDF8;
    background: rgba(56,189,248,0.1);
    border-color: rgba(56,189,248,0.3);
}

/* Unavailable */
.podcast-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: #9ca3af;
}
.podcast-unavailable svg { width: 32px; height: 32px; opacity: 0.4; }
.podcast-unavailable p { font-size: 0.875rem; font-weight: 400; margin: 0; }

/* Mobile tweaks */
@media (max-width: 480px) {
    .podcast-btn-play { width: 54px; height: 54px; }
    .podcast-btn-play svg { width: 18px; height: 18px; }
    .podcast-btn-skip svg { width: 20px; height: 20px; }
    .podcast-controls { gap: 1.25rem; }
    .podcast-title-text { font-size: 1rem; }
    .podcast-waveform { height: 44px; }
}

/* ===== Related Links (Cocoon 2+1+1) ===== */
.article-related-block { margin-top: 3rem; }

.related-links-section {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.5rem;
}

.related-links-title {
    font-size: 0.65rem;
    font-family: 'Inter', monospace;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.related-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.related-link-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.related-link-card:hover {
    border-color: #38BDF8;
    background: #f0f9ff;
}
.related-link-card svg { flex-shrink: 0; color: #d1d5db; transition: color 0.2s; }
.related-link-card:hover svg { color: #38BDF8; }

.related-link-pillar { border-color: #38BDF8/20; }
.related-link-pillar .related-link-badge {
    font-size: 0.6rem;
    font-family: 'Inter', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 99px;
    padding: 0.15rem 0.5rem;
    flex-shrink: 0;
}
.related-link-label {
    font-size: 0.8125rem;
    color: #374151;
    font-weight: 400;
    flex: 1;
    line-height: 1.4;
}

/* ===== Finta CTA Banner ===== */
.finta-cta-banner {
    position: relative;
    margin: 2.75rem 0;
    border-radius: 20px;
    overflow: hidden;
    background: #f0f9ff;
    border: 1px solid rgba(56,189,248,0.32);
    padding: 2.25rem 2rem 2rem;
    box-shadow:
        0 0 24px rgba(56,189,248,0.18),
        0 0 60px rgba(56,189,248,0.08);
}
/* top-edge accent line */
.finta-cta-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.6) 30%, rgba(56,189,248,0.6) 70%, transparent);
    pointer-events: none;
}
/* radial glow from top edge */
.finta-cta-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 55% at 50% -10%, rgba(56,189,248,0.16) 0%, transparent 60%),
        radial-gradient(ellipse 40% 28% at 85% 105%, rgba(2,132,199,0.08) 0%, transparent 55%);
}
/* sky-blue grid overlay */
.finta-cta-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(56,189,248,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56,189,248,0.055) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 20%, transparent 80%);
}
.finta-cta-inner {
    position: relative;
    z-index: 1;
}
/* eyebrow label */
.finta-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    font-family: 'Inter', monospace;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #0284c7;
    margin-bottom: 0.75rem;
}
.finta-cta-eyebrow::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8, 0 0 18px rgba(56,189,248,0.55);
    animation: finta-pulse 2.2s ease-in-out infinite;
}
@keyframes finta-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #38bdf8, 0 0 18px rgba(56,189,248,0.55); }
    50%       { opacity: 0.45; box-shadow: 0 0 4px #38bdf8; }
}
/* headline */
.finta-cta-headline {
    font-size: 1.3rem;
    font-family: 'Newsreader', serif;
    font-style: italic;
    font-weight: 400;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 0.4rem;
}
/* sub-headline */
.finta-cta-sub {
    font-size: 0.8125rem;
    color: #334155;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 1.625rem;
}
/* cards grid */
.finta-cta-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.finta-cta-card {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 1.1rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(56,189,248,0.22);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
.finta-cta-card:hover {
    border-color: rgba(56,189,248,0.55);
    box-shadow: 0 0 14px rgba(56,189,248,0.2), 0 0 32px rgba(56,189,248,0.07);
    transform: translateY(-2px);
}
/* icon */
.finta-cta-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(56,189,248,0.1);
    color: #0284c7;
    flex-shrink: 0;
}
/* card body */
.finta-cta-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}
.finta-cta-card-desc {
    font-size: 0.72rem;
    color: #475569;
    line-height: 1.5;
    font-weight: 400;
}
.finta-cta-card-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0284c7;
    line-height: 1.2;
    margin-top: 0.1rem;
}
/* mobile */
@media (max-width: 640px) {
    .finta-cta-banner { padding: 1.75rem 1.25rem 1.5rem; }
    .finta-cta-cards  { grid-template-columns: 1fr; gap: 0.625rem; }
    .finta-cta-headline { font-size: 1.1rem; }
    .finta-cta-sub { font-size: 0.775rem; }
}

/* ===== Codebook Banner variant ===== */
.codebook-cta-banner {
    background: #f0fdf4;
    border-color: rgba(34,197,94,0.28);
    box-shadow: 0 0 24px rgba(34,197,94,0.12), 0 0 60px rgba(34,197,94,0.06);
}
.codebook-cta-banner::before {
    background: linear-gradient(90deg, transparent, rgba(34,197,94,0.5) 30%, rgba(34,197,94,0.5) 70%, transparent);
}
.codebook-cta-banner .finta-cta-glow {
    background:
        radial-gradient(ellipse 80% 55% at 50% -10%, rgba(34,197,94,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 28% at 85% 105%, rgba(21,128,61,0.07) 0%, transparent 55%);
}
.codebook-cta-banner .finta-cta-grid-bg {
    background-image:
        linear-gradient(rgba(34,197,94,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,197,94,0.045) 1px, transparent 1px);
}
.codebook-cta-banner .finta-cta-eyebrow { color: #15803d; }
.codebook-cta-banner .finta-cta-eyebrow::before {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e, 0 0 18px rgba(34,197,94,0.5);
}
.codebook-cta-banner .finta-cta-card { border-color: rgba(34,197,94,0.2); }
.codebook-cta-banner .finta-cta-card:hover {
    border-color: rgba(34,197,94,0.5);
    box-shadow: 0 0 14px rgba(34,197,94,0.18), 0 0 32px rgba(34,197,94,0.06);
}
.codebook-cta-banner .finta-cta-card-icon {
    background: rgba(34,197,94,0.1);
    color: #15803d;
}
.codebook-cta-banner .finta-cta-card-label { color: #15803d; }
.codebook-cta-single {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* ===== Newsletter Bar ===== */
#newsletter-bar { will-change: transform; }

/* ===== Newsletter Popup ===== */
#newsletter-popup { will-change: opacity; }
#newsletter-popup-form.hidden { display: none; }
#newsletter-popup-success.hidden { display: none; }

/* ===== Affiliate Components (light-theme) ===== */

.aff-disclosure {
  display: flex; align-items: flex-start; gap: 0.625rem;
  background: rgba(2,132,199,0.06); border: 1px solid rgba(2,132,199,0.15);
  border-radius: 0.625rem; padding: 0.625rem 0.875rem;
  margin: 1.5rem 0 2rem; font-size: 0.75rem; line-height: 1.5;
  color: #0369a1; font-style: italic;
}
.aff-disclosure svg { flex-shrink: 0; margin-top: 1px; }

.aff-card {
  border: 1px solid rgba(0,0,0,0.08); border-radius: 1rem;
  background: #fff; padding: 1.25rem 1.375rem;
  margin: 1.75rem 0; transition: box-shadow 0.2s, border-color 0.2s;
}
.aff-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); border-color: rgba(2,132,199,0.2); }
.aff-label-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.aff-category {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #0284c7; background: rgba(2,132,199,0.06);
  border: 1px solid rgba(2,132,199,0.15); border-radius: 999px;
  padding: 0.1875rem 0.625rem;
}
.aff-card-title {
  font-size: 1rem; font-weight: 600; color: #111827;
  margin: 0.25rem 0 0.125rem; line-height: 1.35;
  font-family: 'Inter', sans-serif;
}
.aff-card-author { font-size: 0.8125rem; color: #6b7280; margin: 0 0 0.5rem; }
.aff-card-desc { font-size: 0.875rem; color: #4b5563; line-height: 1.65; margin: 0 0 1rem; }
.aff-card-cta {
  display: inline-flex; align-items: center; gap: 0.375rem;
  background: #0284c7; color: #fff !important; font-size: 0.8125rem; font-weight: 600;
  padding: 0.5rem 1.125rem; border-radius: 999px; text-decoration: none !important;
  transition: background 0.15s; opacity: 1 !important;
}
.aff-card-cta:hover { background: #0369a1; }

.aff-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem; margin: 1.75rem 0;
}
.aff-card-grid .aff-card { margin: 0; }

.aff-recovery-note {
  background: rgba(234,179,8,0.07); border: 1px solid rgba(234,179,8,0.25);
  border-radius: 0.625rem; padding: 0.625rem 0.875rem;
  margin-bottom: 0.75rem; font-size: 0.8125rem; color: #92400e; line-height: 1.6;
}

.aff-table-wrap {
  border: 1px solid rgba(0,0,0,0.08); border-radius: 1rem;
  overflow: hidden; margin: 1.75rem 0;
}
.aff-table-header {
  padding: 0.875rem 1.25rem; background: rgba(2,132,199,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #0284c7;
}
.aff-table-row {
  display: grid; grid-template-columns: 2fr 1.2fr 2fr;
  gap: 0; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.aff-table-row:last-child { border-bottom: none; }
.aff-table-row > * {
  padding: 0.75rem 1rem; font-size: 0.8125rem; line-height: 1.5; color: #4b5563;
  border-right: 1px solid rgba(0,0,0,0.06);
}
.aff-table-row > *:last-child { border-right: none; }
.aff-table-head > * { font-weight: 600; color: #374151; background: rgba(0,0,0,0.02); font-size: 0.75rem; }
.aff-table-row a { color: #0284c7 !important; font-weight: 600; text-decoration: none !important; }
.aff-table-row a:hover { text-decoration: underline !important; }

.aff-end-section {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 2px solid rgba(0,0,0,0.08);
}
.aff-end-title {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #9ca3af; margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}
.aff-end-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.625rem;
}
.aff-end-item {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.625rem 0.75rem; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.625rem; background: rgba(0,0,0,0.015);
  text-decoration: none !important; transition: border-color 0.15s, background 0.15s;
}
.aff-end-item:hover { border-color: rgba(2,132,199,0.25); background: rgba(2,132,199,0.03); }
.aff-end-cat { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: #9ca3af; font-weight: 600; }
.aff-end-name { font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1.3; }
.aff-end-item:hover .aff-end-name { color: #0284c7; }

@media (max-width: 640px) {
  .aff-table-row { grid-template-columns: 1fr; }
  .aff-table-row > * { border-right: none; }
  .aff-table-head { display: none; }
  .aff-end-grid { grid-template-columns: 1fr 1fr; }
  .aff-card-grid { grid-template-columns: 1fr; }
}
