/* ============================================
   Freedom Radio AI — "Bleu Nuit"
   Deep navy immersive radio + editorial design
   Inspired by freedom.fr blue palette
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
    --bg: #060a14;
    --surface: #0b1222;
    --surface-raised: #121c30;
    --surface-hover: #1a263c;

    --accent: #5a8fbe;
    --accent-dim: rgba(90, 143, 190, 0.10);
    --accent-glow: rgba(90, 143, 190, 0.28);
    --accent-text: #7db0d9;

    --accent-deep: #014f8b;
    --accent-bright: #8dc4ec;

    --live: #ef4444;
    --live-dim: rgba(239, 68, 68, 0.12);
    --live-glow: rgba(239, 68, 68, 0.35);

    --entraide: #10b981;
    --entraide-dim: rgba(16, 185, 129, 0.10);

    --text: #e4e8f0;
    --text-secondary: #8d95a8;
    --text-muted: #4e5670;

    --border: rgba(100, 135, 169, 0.08);
    --border-accent: rgba(90, 143, 190, 0.18);

    --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
    --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

    --max-w: 760px;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 5px;

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 8px 32px rgba(2, 8, 20, 0.35);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.55), 0 12px 48px rgba(2, 8, 20, 0.4);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* ---------- Base ---------- */
body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-text);
    text-decoration: none;
}

audio {
    accent-color: var(--accent);
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ---------- Grain Texture Overlay ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.024;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---------- Top Navigation ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 56px;
    background: rgba(6, 10, 20, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(1.1) drop-shadow(0 0 6px rgba(90, 143, 190, 0.3));
    transition: filter 0.3s ease;
}

.topbar-brand:hover .brand-logo {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(90, 143, 190, 0.5));
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    display: none;
}

.brand-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.brand-ai {
    color: var(--accent-text);
    margin-left: 0.1em;
}

/* Mode Switch */
.mode-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--surface);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border);
}

.mode-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    white-space: nowrap;
}

.mode-btn:hover {
    color: var(--text-secondary);
}

.mode-btn.active {
    color: #fff;
    background: var(--accent-deep);
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(1, 79, 139, 0.4);
}

/* Live indicator */
.topbar-live {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--live);
    display: block;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--live-glow);
}

.live-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--live);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* ---------- Player Section ---------- */
.player {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: all 0.5s var(--ease-out);
}

.player-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 350px;
    background: radial-gradient(ellipse, rgba(1, 79, 139, 0.12) 0%, rgba(90, 143, 190, 0.04) 40%, transparent 70%);
    pointer-events: none;
    opacity: 0.8;
}

.player-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 1.5rem 2.5rem;
    max-width: var(--max-w);
    margin: 0 auto;
}

/* Audio Visualizer Bars */
.player-viz {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 44px;
    margin-bottom: 0.5rem;
}

.player-viz span {
    display: block;
    width: 3px;
    border-radius: 1.5px;
    background: linear-gradient(to top, var(--accent-deep), var(--accent-bright));
    opacity: 0.6;
    animation: viz 1.3s ease-in-out infinite;
    transform-origin: bottom;
}

.player-viz span:nth-child(1)  { height: 18px; animation-duration: 0.9s;  animation-delay: 0.00s; }
.player-viz span:nth-child(2)  { height: 28px; animation-duration: 1.1s;  animation-delay: 0.05s; }
.player-viz span:nth-child(3)  { height: 22px; animation-duration: 0.8s;  animation-delay: 0.10s; }
.player-viz span:nth-child(4)  { height: 36px; animation-duration: 1.2s;  animation-delay: 0.03s; }
.player-viz span:nth-child(5)  { height: 14px; animation-duration: 1.0s;  animation-delay: 0.15s; }
.player-viz span:nth-child(6)  { height: 30px; animation-duration: 0.95s; animation-delay: 0.08s; }
.player-viz span:nth-child(7)  { height: 40px; animation-duration: 1.3s;  animation-delay: 0.02s; }
.player-viz span:nth-child(8)  { height: 24px; animation-duration: 0.85s; animation-delay: 0.12s; }
.player-viz span:nth-child(9)  { height: 34px; animation-duration: 1.15s; animation-delay: 0.06s; }
.player-viz span:nth-child(10) { height: 16px; animation-duration: 0.9s;  animation-delay: 0.14s; }
.player-viz span:nth-child(11) { height: 26px; animation-duration: 1.05s; animation-delay: 0.09s; }
.player-viz span:nth-child(12) { height: 38px; animation-duration: 1.25s; animation-delay: 0.01s; }
.player-viz span:nth-child(13) { height: 20px; animation-duration: 0.88s; animation-delay: 0.11s; }
.player-viz span:nth-child(14) { height: 32px; animation-duration: 1.1s;  animation-delay: 0.04s; }
.player-viz span:nth-child(15) { height: 12px; animation-duration: 0.92s; animation-delay: 0.16s; }
.player-viz span:nth-child(16) { height: 36px; animation-duration: 1.18s; animation-delay: 0.07s; }
.player-viz span:nth-child(17) { height: 22px; animation-duration: 0.82s; animation-delay: 0.13s; }
.player-viz span:nth-child(18) { height: 28px; animation-duration: 1.08s; animation-delay: 0.03s; }
.player-viz span:nth-child(19) { height: 16px; animation-duration: 0.96s; animation-delay: 0.10s; }
.player-viz span:nth-child(20) { height: 24px; animation-duration: 1.14s; animation-delay: 0.06s; }

@keyframes viz {
    0%, 100% { transform: scaleY(0.35); opacity: 0.3; }
    50%      { transform: scaleY(1);    opacity: 0.7; }
}

/* Player info */
.player-meta {
    text-align: center;
}

.player-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: var(--live);
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    box-shadow: 0 0 16px var(--live-glow);
    animation: badge-glow 2.5s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 12px var(--live-glow); }
    50%      { box-shadow: 0 0 24px var(--live-glow), 0 0 48px rgba(239, 68, 68, 0.15); }
}

.player-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.player-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Audio element container */
.player-audio {
    width: 100%;
    max-width: 440px;
}

.player-audio audio {
    width: 100%;
    height: 44px;
    border-radius: 22px;
}

/* ---------- Transcript Section ---------- */
.transcript {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: all 0.5s var(--ease-out);
}

.transcript-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem 1.5rem 1.25rem;
}

.transcript-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.transcript-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.transcript-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

.transcript-feed {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    max-height: 140px;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-secondary);
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-hover) transparent;
}

.transcript-feed::-webkit-scrollbar {
    width: 4px;
}

.transcript-feed::-webkit-scrollbar-thumb {
    background: var(--surface-hover);
    border-radius: 2px;
}

.transcript-feed:empty::before {
    content: 'En attente de la transcription\2026';
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.88rem;
}

.transcript-chunk {
    opacity: 0;
    animation: chunk-in 0.35s ease forwards;
}

@keyframes chunk-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Articles Section ---------- */
main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 2rem;
    transition: all 0.5s var(--ease-out);
}

.articles-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.articles-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.articles-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

.articles-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ---------- Article Card ---------- */
.article-card {
    background: var(--surface-raised);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.35s var(--ease-out);
    animation: card-in 0.6s var(--ease-out) backwards;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

/* Entraide variant */
.article-entraide {
    border-left: 3px solid var(--entraide);
}

.article-entraide:hover {
    border-color: var(--entraide);
    border-left-color: var(--entraide);
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Cover image */
.article-cover {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.article-cover img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out);
}

.article-card:hover .article-cover img {
    transform: scale(1.02);
}

/* Category badges */
.article-badge-wrap {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
}

.article-badge-inline {
    position: relative;
    top: auto;
    left: auto;
    padding: 1.25rem 1.5rem 0;
}

.cat-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-xs);
}

.cat-actu {
    background: var(--accent-deep);
    color: #fff;
}

.cat-entraide {
    background: var(--entraide);
    color: #fff;
}

/* Article content */
.article-content {
    padding: 1.5rem 1.75rem 1.75rem;
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.65rem;
}

.article-summary {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
    font-weight: 300;
}

/* Expandable article body */
.article-expand {
    margin-bottom: 1.25rem;
}

.expand-trigger {
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-text);
    padding: 0.4rem 0;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.expand-trigger::-webkit-details-marker {
    display: none;
}

.expand-trigger::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--accent-text);
    border-bottom: 2px solid var(--accent-text);
    transform: rotate(-45deg);
    transition: transform 0.25s var(--ease-out);
    flex-shrink: 0;
}

details[open] .expand-trigger::before {
    transform: rotate(45deg);
}

.expand-trigger:hover {
    color: var(--accent-bright);
}

.article-text {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text-secondary);
    padding-top: 0.75rem;
    white-space: pre-line;
    animation: text-reveal 0.4s var(--ease-out);
}

@keyframes text-reveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Audio in article */
.article-audio {
    background: rgba(1, 79, 139, 0.06);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

.audio-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.audio-icon {
    font-size: 0.85rem;
    color: var(--accent-text);
}

.audio-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.audio-loader {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent-text);
    border-radius: 50%;
    animation: audio-spin 0.6s linear infinite;
    margin-left: auto;
}

.article-audio.is-loading .audio-loader {
    display: block;
}

.article-audio.is-loading .audio-label::after {
    content: " — chargement\2026";
    font-weight: 400;
    font-style: italic;
    text-transform: none;
}

@keyframes audio-spin {
    to { transform: rotate(360deg); }
}

.article-audio audio {
    width: 100%;
    height: 36px;
    border-radius: 18px;
}

/* Article metadata footer */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.meta-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.meta-model {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(90, 143, 190, 0.06);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}

/* ---------- Empty State ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem;
    text-align: center;
}

.empty-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px dashed var(--text-muted);
    margin-bottom: 1.5rem;
    animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

.empty-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 360px;
}

/* ---------- Article Card Links ---------- */
.article-cover-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.article-title-link:hover {
    color: var(--accent-text);
}

/* ---------- Cover AI Disclaimer Badge ---------- */
.article-cover {
    position: relative;
}

.cover-ai-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-align: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.article-cover:hover .cover-ai-badge,
.detail-cover:hover .cover-ai-badge {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem 0 1rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.pagination-btn {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-text);
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
    background: transparent;
    transition: all 0.25s var(--ease-out);
}

.pagination-btn:hover:not(.disabled) {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent-bright);
}

.pagination-btn.disabled {
    color: var(--text-muted);
    border-color: var(--border);
    cursor: default;
    opacity: 0.5;
}

.pagination-info {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

/* ---------- Article Detail Page ---------- */
.detail-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar-back {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-text);
    text-decoration: none;
    transition: color 0.2s;
}

.topbar-back:hover {
    color: var(--accent-bright);
}

.detail-main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.detail-article {
    background: var(--surface-raised);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.detail-cover img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

.detail-content {
    padding: 2rem 2rem 2.5rem;
}

.detail-badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-time {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.detail-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 1rem;
}

.detail-summary {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 300;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* AI Disclaimer inline */
.ai-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(90, 143, 190, 0.06);
    border: 1px solid var(--border-accent);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.ai-disclaimer-icon {
    flex-shrink: 0;
    color: var(--accent-text);
    margin-top: 1px;
}

.detail-body-text {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
    white-space: pre-line;
}

/* Detail metadata */
.detail-meta {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* AI Reminder at bottom */
.ai-reminder {
    padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-reminder strong {
    color: var(--live);
    font-weight: 600;
}

/* ---------- Related Articles ---------- */
.related-section {
    margin-bottom: 2rem;
}

.related-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ---------- Disclaimer ---------- */
.disclaimer {
    background: rgba(1, 79, 139, 0.05);
    border-top: 1px solid var(--border-accent);
}

.disclaimer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.disclaimer p {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.disclaimer strong {
    color: var(--accent-text);
    font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.footer-stack {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ---------- Mode States ---------- */

/* Listen mode: hide articles, expand player */
[data-mode="listen"] #articles-section {
    display: none;
}

[data-mode="listen"] .player-content {
    padding-top: 4rem;
    padding-bottom: 3.5rem;
}

[data-mode="listen"] .player-title {
    font-size: 3rem;
}

[data-mode="listen"] .transcript-feed {
    max-height: 200px;
}

/* Read mode: minimize player, show transcript + articles */
[data-mode="read"] .player {
    border-bottom-color: var(--border);
}

[data-mode="read"] .player-glow {
    display: none;
}

[data-mode="read"] .player-content {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1.25rem;
}

[data-mode="read"] .player-viz {
    display: none;
}

[data-mode="read"] .player-meta {
    text-align: left;
    flex: 1;
    min-width: 0;
}

[data-mode="read"] .player-badge {
    margin-bottom: 0;
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    vertical-align: middle;
    margin-right: 0.5rem;
}

[data-mode="read"] .player-title {
    font-size: 1.15rem;
    display: inline;
}

[data-mode="read"] .player-sub {
    display: none;
}

[data-mode="read"] .player-audio {
    max-width: 280px;
    flex-shrink: 0;
}

[data-mode="read"] .player-audio audio {
    height: 36px;
}

[data-mode="read"] .transcript-feed {
    max-height: 220px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .topbar {
        padding: 0 0.75rem;
        height: 50px;
    }

    .brand-name {
        font-size: 0.92rem;
    }

    .mode-btn {
        font-size: 0.72rem;
        padding: 0.3rem 0.6rem;
    }

    .live-text {
        display: none;
    }

    .player-content {
        padding: 2rem 1rem 2rem;
        gap: 1.25rem;
    }

    .player-title {
        font-size: 1.8rem;
    }

    .player-sub {
        font-size: 0.82rem;
    }

    .player-viz span {
        width: 2px;
        gap: 2px;
    }

    .transcript-inner {
        padding: 0.75rem 1rem 1rem;
    }

    .transcript-feed {
        max-height: 110px;
        font-size: 0.85rem;
    }

    main {
        padding: 1.75rem 1rem 1.5rem;
    }

    .articles-title {
        font-size: 1.45rem;
    }

    .articles-feed {
        gap: 1.5rem;
    }

    .article-cover img {
        max-height: 240px;
    }

    .article-content {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .article-title {
        font-size: 1.25rem;
    }

    .article-summary {
        font-size: 0.92rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .detail-content {
        padding: 1.5rem 1.25rem 2rem;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .detail-summary {
        font-size: 1rem;
    }

    .detail-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination {
        gap: 0.5rem;
    }

    .pagination-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.75rem;
    }

    /* Read mode compact player on mobile */
    [data-mode="read"] .player-content {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    [data-mode="read"] .player-meta {
        text-align: center;
    }

    [data-mode="read"] .player-audio {
        max-width: 100%;
    }

    /* Listen mode */
    [data-mode="listen"] .player-title {
        font-size: 2.2rem;
    }

    [data-mode="listen"] .player-content {
        padding-top: 3rem;
        padding-bottom: 2.5rem;
    }
}

@media (max-width: 480px) {
    .topbar {
        gap: 0.25rem;
    }

    .mode-switch {
        gap: 1px;
        padding: 2px;
    }

    .mode-btn {
        font-size: 0.68rem;
        padding: 0.25rem 0.5rem;
    }

    .player-title {
        font-size: 1.5rem;
    }

    .player-viz {
        gap: 2px;
    }

    .player-viz span {
        width: 2px;
    }

    .article-content {
        padding: 1rem;
    }

    .article-title {
        font-size: 1.15rem;
    }

    .articles-title {
        font-size: 1.25rem;
    }

    [data-mode="listen"] .player-title {
        font-size: 1.8rem;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
