/* Quantum Curator - Modern Quantum Computing News Site */

:root {
    /* Quantum-inspired color palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #06b6d4;
    --accent: #8b5cf6;

    /* Neutrals */
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-elevated: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;

    /* Topic colors */
    --topic-hardware: #f59e0b;
    --topic-software: #10b981;
    --topic-research: #6366f1;
    --topic-industry: #ec4899;
    --topic-algorithms: #8b5cf6;
    --topic-error-correction: #ef4444;
    --topic-cryptography: #14b8a6;
    --topic-applications: #f97316;
    --topic-policy: #64748b;
    --topic-general: #6366f1;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;

    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.main-nav {
    display: flex;
    gap: var(--space-lg);
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--text);
}

.rss-link {
    background: var(--bg-elevated);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* Main Content */
.site-main {
    flex: 1;
    padding: var(--space-2xl) 0;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Daily Digest */
.daily-digest {
    margin-bottom: var(--space-2xl);
}

.digest-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
}

.digest-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    color: var(--primary-light);
}

.digest-summary {
    color: var(--text-muted);
    line-height: 1.8;
}

.digest-meta {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* Digest expand/collapse */
.digest-expandable {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.digest-expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.digest-toggle {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    padding: var(--space-xs) 0;
    margin-top: var(--space-sm);
}

.digest-toggle:hover {
    color: var(--primary);
}

/* Top Story label */
.top-story-label {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.view-all {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: transform 0.2s, border-color 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.post-topics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.topic-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-muted);
}

/* Topic-specific colors */
.topic-hardware { background: rgba(245, 158, 11, 0.2); color: var(--topic-hardware); }
.topic-software { background: rgba(16, 185, 129, 0.2); color: var(--topic-software); }
.topic-research { background: rgba(99, 102, 241, 0.2); color: var(--topic-research); }
.topic-industry { background: rgba(236, 72, 153, 0.2); color: var(--topic-industry); }
.topic-algorithms { background: rgba(139, 92, 246, 0.2); color: var(--topic-algorithms); }
.topic-error-correction { background: rgba(239, 68, 68, 0.2); color: var(--topic-error-correction); }
.topic-cryptography { background: rgba(20, 184, 166, 0.2); color: var(--topic-cryptography); }
.topic-applications { background: rgba(249, 115, 22, 0.2); color: var(--topic-applications); }
.topic-policy { background: rgba(100, 116, 139, 0.2); color: var(--topic-policy); }
.topic-general { background: rgba(99, 102, 241, 0.2); color: var(--topic-general); }

.post-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.post-title a {
    color: var(--text);
}

.post-title a:hover {
    color: var(--primary-light);
}

.post-summary {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.post-commentary {
    margin-bottom: var(--space-md);
}

.post-commentary blockquote {
    font-style: italic;
    color: var(--text-muted);
    padding-left: var(--space-md);
    border-left: 2px solid var(--primary);
    font-size: 0.875rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-dim);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.post-link {
    margin-left: auto;
    color: var(--primary-light);
}

/* Topics Sidebar */
.topics-sidebar {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.topics-sidebar h2 {
    margin-bottom: var(--space-lg);
}

.topic-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.topic-pill {
    padding: var(--space-sm) var(--space-md);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.topic-pill:hover {
    transform: scale(1.05);
}

.topic-pill .count {
    opacity: 0.7;
}

/* Curator Card */
.curator-card {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.curator-card h2 {
    margin-bottom: var(--space-lg);
}

.curator-info {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.curator-details h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.curator-details p {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.learn-more {
    font-weight: 500;
}

/* Post Full Page */
.post-full {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: var(--space-2xl);
}

.post-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: var(--space-md) 0;
}

.post-meta-full {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.post-body {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.curator-take {
    margin-bottom: var(--space-xl);
}

.curator-take h2 {
    font-size: 1rem;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
}

.commentary {
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.7;
    padding: var(--space-lg);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.curator-attr {
    text-align: right;
    color: var(--text-dim);
    margin-top: var(--space-md);
}

.article-summary {
    margin-bottom: var(--space-xl);
}

.article-summary h2 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.article-summary p {
    color: var(--text-muted);
    line-height: 1.8;
}

.read-original {
    text-align: center;
    padding: var(--space-xl) 0;
}

.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

.post-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

.share-section h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.share-buttons {
    display: flex;
    gap: var(--space-md);
}

.share-btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.nav-links {
    margin-top: var(--space-xl);
}

/* Archive & Topic Pages */
.page-header {
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    color: var(--text-muted);
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: var(--space-sm);
}

.breadcrumb a {
    color: var(--text-dim);
}

.archive-month {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
}

.archive-month h2 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.archive-month h2 a {
    color: var(--text);
}

.article-count {
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--text-dim);
}

.month-articles {
    list-style: none;
}

.month-articles li {
    padding: var(--space-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-articles a {
    color: var(--text-muted);
}

.article-source {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.more-link {
    font-size: 0.875rem;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.topic-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.2s;
}

.topic-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.topic-card h2 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.topic-count {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: var(--space-md);
}

.topic-preview {
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.topic-preview li {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border);
}

.topic-preview li:last-child {
    border-bottom: none;
}

/* About Page */
.about-content {
    max-width: 800px;
}

.about-section {
    margin-bottom: var(--space-2xl);
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    color: var(--primary-light);
}

.about-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.source-list {
    list-style: none;
}

.source-list li {
    padding: var(--space-sm) 0;
    color: var(--text-muted);
}

.source-list strong {
    color: var(--text);
}

.curator-profile {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.curator-links {
    margin-top: var(--space-lg);
}

.curator-links h4 {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: var(--space-sm);
}

.curator-links ul {
    list-style: none;
    display: flex;
    gap: var(--space-md);
}

/* Posts List (Archive Month) */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.post-item {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.post-item .post-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
}

.post-item .post-content {
    flex: 1;
}

.post-item h2 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.post-item h2 a {
    color: var(--text);
}

.archive-nav, .topic-nav {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-info p {
    color: var(--text-muted);
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.social-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.copyright a {
    color: var(--primary-light, #818cf8);
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

.footer-powered {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: var(--space-xs, 0.25rem);
}

.footer-powered a {
    color: var(--primary-light, #818cf8);
    text-decoration: none;
}

.footer-powered a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .header-content {
        flex-direction: column;
        gap: var(--space-md);
    }

    .main-nav {
        gap: var(--space-md);
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .curator-info {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* No posts message */
.no-posts, .no-articles, .no-topics {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-dim);
}

/* ============================================
   MAGAZINE LAYOUT — Hero, Featured, Compact
   ============================================ */

/* --- Image Fallback Backgrounds --- */
.image-fallback {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    position: relative;
}
.image-fallback::after {
    content: "\2699";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    opacity: 0.12;
    color: var(--text);
}
.image-fallback img { display: none; }

.topic-bg-hardware         { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(245,158,11,0.04)); }
.topic-bg-algorithms       { background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(139,92,246,0.04)); }
.topic-bg-error_correction { background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(239,68,68,0.04)); }
.topic-bg-cryptography     { background: linear-gradient(135deg, rgba(20,184,166,0.18), rgba(20,184,166,0.04)); }
.topic-bg-simulation       { background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.04)); }
.topic-bg-sensing          { background: linear-gradient(135deg, rgba(6,182,212,0.18), rgba(6,182,212,0.04)); }
.topic-bg-research         { background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.04)); }
.topic-bg-industry         { background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(236,72,153,0.04)); }
.topic-bg-machine_learning { background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(16,185,129,0.04)); }
.topic-bg-policy           { background: linear-gradient(135deg, rgba(100,116,139,0.18), rgba(100,116,139,0.04)); }
.topic-bg-general          { background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.04)); }

/* --- Magazine Hero --- */
.magazine-hero {
    margin-bottom: var(--space-xl);
}

.hero-article {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color 0.2s;
}

.hero-article.has-image {
    grid-template-columns: 3fr 2fr;
}

.hero-article:hover {
    border-color: var(--primary);
}

.hero-content {
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.3;
    margin: var(--space-xs) 0 var(--space-sm);
}

.hero-title a { color: var(--text); }
.hero-title a:hover { color: var(--primary-light); }

.hero-summary {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-commentary {
    margin-bottom: var(--space-sm);
}

.hero-commentary blockquote {
    font-style: italic;
    color: var(--text-muted);
    padding-left: var(--space-md);
    border-left: 3px solid var(--primary);
    font-size: 0.8125rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-image {
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Featured Grid --- */
.featured-section {
    margin-bottom: var(--space-2xl);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.featured-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.featured-image {
    height: 180px;
    overflow: hidden;
    background: var(--bg-elevated);
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-card:hover .featured-image img {
    transform: scale(1.03);
}

.featured-content {
    padding: var(--space-md) var(--space-lg);
}

.featured-content .post-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.featured-content .post-summary {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.featured-content .post-meta {
    border-top: none;
    padding-top: var(--space-xs);
}

.featured-card.no-image .featured-content {
    padding: var(--space-lg);
}

.featured-card.no-image .featured-content .post-title {
    font-size: 1.0625rem;
}

/* Wide variant for topic pages */
.featured-card--wide {
    display: grid;
    grid-template-columns: 1fr 2fr;
}

.featured-card--wide .featured-image {
    height: auto;
    min-height: 250px;
}

.featured-card--wide .featured-content {
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card--wide .post-title {
    font-size: 1.25rem;
}

/* --- Topic Sections --- */
.topic-section {
    margin-bottom: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.topic-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
}

.topic-accent {
    width: 4px;
    height: 1.25em;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
}

.topic-accent-hardware         { background: var(--topic-hardware); }
.topic-accent-algorithms       { background: var(--topic-algorithms); }
.topic-accent-error_correction { background: var(--topic-error-correction); }
.topic-accent-cryptography     { background: var(--topic-cryptography); }
.topic-accent-simulation       { background: var(--topic-research); }
.topic-accent-sensing          { background: var(--secondary); }
.topic-accent-research         { background: var(--topic-research); }
.topic-accent-industry         { background: var(--topic-industry); }
.topic-accent-machine_learning { background: var(--topic-software); }
.topic-accent-policy           { background: var(--topic-policy); }
.topic-accent-general          { background: var(--topic-general); }

/* --- Compact Article List --- */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.compact-article {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    transition: background 0.15s;
    align-items: center;
}

.compact-article:hover {
    background: var(--bg-elevated);
}

.compact-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
    position: relative;
}

.compact-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-thumbnail.image-fallback::after {
    font-size: 1.25rem;
}

.compact-content {
    flex: 1;
    min-width: 0;
}

.compact-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-title a { color: var(--text); }
.compact-title a:hover { color: var(--primary-light); }

.compact-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.compact-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

/* --- Post Page Hero Image --- */
.post-hero-image {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: 400px;
}

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

/* --- Digest Paragraphs --- */
.digest-summary p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.digest-summary p:last-child {
    margin-bottom: 0;
}

/* ============================================
   SEARCH PAGE
   ============================================ */

.search-page {
    max-width: 900px;
    margin: 0 auto;
}

.search-controls {
    margin-bottom: var(--space-xl);
}

.search-box {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text);
    font-size: 1.25rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box::placeholder {
    color: var(--text-dim);
}

.search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-results-count {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
}

.search-results .compact-list {
    margin-bottom: var(--space-xl);
}

/* ============================================
   MAGAZINE RESPONSIVE OVERRIDES
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .hero-article.has-image {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 220px;
        order: -1;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-card--wide {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile — extends existing 768px breakpoint */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.25rem;
    }

    .hero-image {
        height: 200px;
    }

    .hero-summary {
        font-size: 0.875rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 160px;
    }

    .featured-card--wide {
        grid-template-columns: 1fr;
    }

    .featured-card--wide .featured-image {
        height: 200px;
        min-height: auto;
    }

    .compact-thumbnail {
        width: 64px;
        height: 48px;
    }

    .compact-title {
        font-size: 0.875rem;
    }

    .compact-article {
        padding: var(--space-sm) var(--space-md);
    }
}
