/* MBNN - The Verge/Wired-inspired Design System */

/* ================================================================
   Design Tokens
   ================================================================ */

:root {
    /* Surfaces */
    --surface-primary: #FFFFFF;
    --surface-secondary: #F5F5F7;
    --surface-tertiary: #EBEBF0;

    /* Text */
    --text-primary: #0F0F14;
    --text-secondary: #6B6B76;
    --text-tertiary: #9898A6;

    /* Border */
    --border: #E5E5EA;
    --border-light: #F0F0F5;

    /* Brand & Accents */
    --brand: #E8336E;
    --accent-breaking: #E8336E;
    --accent-analysis: #5C6BC0;
    --accent-profile: #AB47BC;
    --accent-roundup: #26A69A;
    --accent-briefing: #FF9800;
    --accent-rising: #66BB6A;

    /* Legacy accent colors */
    --accent-daily-briefing: #E8336E;
    --accent-trending: #5C6BC0;
    --accent-spotlight: #AB47BC;
    --accent-keyword: #26A69A;
    --accent-agent: #FF9800;
    --accent-rising-threads: #66BB6A;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.14);

    /* Typography */
    --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --max-width: 1200px;
    --sidebar-width: 320px;
    --reading-width: 720px;
    --header-height: 56px;
}

[data-theme="dark"] {
    --surface-primary: #0F0F14;
    --surface-secondary: #1A1A24;
    --surface-tertiary: #24243A;

    --text-primary: #F0F0F5;
    --text-secondary: #9898A6;
    --text-tertiary: #6B6B76;

    --border: #2A2A3A;
    --border-light: #1F1F30;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
}

/* ================================================================
   Reset & Base
   ================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--surface-secondary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ================================================================
   Breaking News Banner
   ================================================================ */

.breaking-banner {
    background: var(--brand);
    color: #fff;
    position: relative;
    z-index: 200;
    animation: slideDown 0.4s var(--ease);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.breaking-banner-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.breaking-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.breaking-label {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.breaking-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breaking-dismiss {
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    line-height: 1;
    padding: 2px 6px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.breaking-dismiss:hover {
    color: #fff;
}

/* ================================================================
   Header
   ================================================================ */

#header {
    background: var(--surface-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo:hover {
    color: var(--brand);
}

/* Category Nav Pills */
.category-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-radius: 100px;
    white-space: nowrap;
    transition: all 0.2s var(--ease);
    background: transparent;
}

.category-pill:hover {
    color: var(--text-primary);
    background: var(--surface-secondary);
}

.category-pill.active {
    color: #fff;
    background: var(--text-primary);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    background: var(--surface-secondary);
    border-radius: 100px;
    padding: 2px;
}

.lang-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    border-radius: 100px;
    transition: all 0.2s var(--ease);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--text-primary);
    color: var(--surface-primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease);
}

.theme-toggle:hover {
    background: var(--surface-secondary);
    color: var(--text-primary);
}

.theme-icon-dark { display: none; }

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: rgba(232, 51, 110, 0.08);
    border-radius: 100px;
    cursor: pointer;
    animation: fadeIn 0.4s var(--ease);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--brand);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ================================================================
   Main Layout
   ================================================================ */

.main-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 24px;
}

#main-column {
    min-width: 0;
}

/* ================================================================
   Cards - Shared
   ================================================================ */

.card {
    background: var(--surface-primary);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

.card-accent-bar {
    height: 3px;
    width: 100%;
}

.card-type-badge {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
}

.card-meta {
    font-size: 13px;
    color: var(--text-tertiary);
}

.card-read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    transition: color 0.2s var(--ease);
}

.card-read-more:hover {
    color: var(--text-primary);
}

/* ================================================================
   Lead Card (top story, compact)
   ================================================================ */

.lead-card {
    background: var(--surface-primary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    animation: fadeIn 0.6s var(--ease);
}

.lead-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.lead-card-content {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-headline {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.lead-headline a { color: inherit; }
.lead-headline a:hover { color: var(--brand); }

.lead-summary {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.lead-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lead-updates-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-briefing);
    background: rgba(255, 152, 0, 0.1);
    padding: 2px 10px;
    border-radius: 100px;
}

/* ================================================================
   Article Grid (dense 2-column layout)
   ================================================================ */

.article-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.grid-card {
    background: var(--surface-primary);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    animation: fadeIn 0.5s var(--ease);
    animation-fill-mode: both;
}

.grid-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.grid-card-content {
    padding: 16px 20px 20px;
}

.grid-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.grid-card-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.grid-card-headline {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.grid-card-headline a { color: inherit; }
.grid-card-headline a:hover { color: var(--brand); }

.grid-card-summary {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================================================
   Article Detail
   ================================================================ */

.article-detail-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 32px;
}

.article-detail-nav {
    margin-bottom: 20px;
}

.back-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
}

.back-link:hover {
    color: var(--text-primary);
}

.article-detail-header {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 20px;
}

.article-detail-date {
    font-size: 13px;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 8px;
}

.article-detail-headline {
    font-size: 40px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.article-detail-summary {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.article-detail-body {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: 40px;
    max-width: var(--reading-width);
}

.article-detail-body .newsroom-body p {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.75;
    margin-bottom: 20px;
}

.article-detail-body .newsroom-body p:last-child {
    margin-bottom: 0;
}

/* Drop cap for first paragraph */
.article-detail-body .newsroom-body p:first-child::first-letter {
    float: left;
    font-size: 64px;
    font-weight: 900;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 6px;
    color: var(--brand);
}

/* Update sections as callouts */
.article-update-section {
    background: var(--surface-primary);
    border-radius: 12px;
    border-left: 4px solid var(--accent-briefing);
    padding: 24px 32px;
    margin-top: 16px;
}

.article-update-divider {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-briefing);
    margin-bottom: 16px;
}

.article-update-section .newsroom-body p {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.75;
    margin-bottom: 12px;
}

/* Article detail sidebar */
.article-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-sidebar-section {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: 20px;
}

.detail-sidebar-section h4 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.detail-related-link {
    display: block;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    transition: color 0.2s;
}

.detail-related-link:last-child {
    border-bottom: none;
}

.detail-related-link:hover {
    color: var(--brand);
}

.detail-related-type {
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-right: 6px;
}

.update-timeline-item {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.update-timeline-item:last-child {
    border-bottom: none;
}

/* Legacy body_sections */
.newsroom-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.newsroom-section-item {
    border-left: 3px solid var(--brand);
    padding: 12px 20px;
    background: var(--surface-secondary);
    border-radius: 0 8px 8px 0;
}

.newsroom-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.newsroom-section-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.65;
}

/* ================================================================
   Sidebar
   ================================================================ */

#sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-section {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: 20px;
}

.sidebar-section h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-tag {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--surface-secondary);
    transition: all 0.2s var(--ease);
}

.keyword-tag.hot {
    background: rgba(232, 51, 110, 0.08);
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 600;
}

.keyword-tag.warm {
    background: rgba(255, 152, 0, 0.08);
    border-color: var(--accent-briefing);
    color: var(--accent-briefing);
    font-weight: 500;
}

/* Agent List */
.agent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

.agent-item:last-child {
    border-bottom: none;
}

.agent-name {
    color: var(--accent-profile);
    font-weight: 600;
}

.agent-stats {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Sidebar About */
.sidebar-about p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.sidebar-meta-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

.sidebar-status {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.sidebar-sep {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: var(--border);
    margin: 0 6px;
    vertical-align: middle;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}

.status-dot.status-ok { background: #66BB6A; }
.status-dot.status-warn { background: #FF9800; }
.status-dot.status-error { background: #f44336; }

/* ================================================================
   Archive
   ================================================================ */

.newsroom-archive {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.newsroom-archive summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 4px 0;
    user-select: none;
    list-style: none;
}

.newsroom-archive summary::-webkit-details-marker {
    display: none;
}

.newsroom-archive summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-right: 8px;
    transition: transform 0.2s var(--ease);
}

.newsroom-archive[open] summary::before {
    transform: rotate(90deg);
}

.newsroom-archive summary:hover {
    color: var(--text-primary);
}

.archive-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 12px;
}

a.archive-item,
.archive-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s;
}

a.archive-item:hover {
    color: var(--brand);
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-type {
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
    min-width: 72px;
}

.archive-headline {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.archive-time {
    color: var(--text-tertiary);
    font-size: 12px;
    flex-shrink: 0;
}

/* ================================================================
   Dashboard
   ================================================================ */

.dashboard-back {
    margin-bottom: 24px;
}

.dashboard-back a {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
}

.dashboard-section {
    background: var(--surface-primary);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.dashboard-section > h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.sort-controls {
    display: flex;
    gap: 4px;
}

.sort-btn {
    padding: 4px 12px;
    border: 1px solid var(--border);
    background: var(--surface-secondary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 100px;
    transition: all 0.2s var(--ease);
}

.sort-btn:hover {
    background: var(--surface-tertiary);
    color: var(--text-primary);
}

.sort-btn.active {
    background: var(--text-primary);
    color: var(--surface-primary);
    border-color: var(--text-primary);
}

/* Dashboard link */
.dashboard-link {
    text-align: center;
    padding: 20px 0;
}

.dashboard-link a {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    padding: 8px 24px;
    border: 2px solid var(--brand);
    border-radius: 100px;
    transition: all 0.2s var(--ease);
    display: inline-block;
}

.dashboard-link a:hover {
    background: var(--brand);
    color: #fff;
}

/* Dashboard: hero, category, posts (from renderer) */

.hero-card {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 16px;
}

.hero-rank {
    font-size: 32px;
    font-weight: 900;
    color: var(--brand);
    line-height: 1;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

.hero-body {
    flex: 1;
    min-width: 0;
}

.hero-title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.hero-title a {
    color: var(--text-primary);
    font-weight: 700;
}

.hero-title a:hover {
    color: var(--brand);
}

.hero-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

#category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 12px;
    gap: 12px;
}

.category-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-primary);
}

.category-box-large {
    grid-column: span 2;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.category-name { font-weight: 700; }
.category-count { opacity: 0.8; font-size: 11px; }

.category-posts { padding: 4px 0; }

.compact-post {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    gap: 8px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.compact-post:last-child { border-bottom: none; }
.compact-post:hover { background: var(--surface-secondary); }

.compact-rank {
    font-weight: 700;
    color: var(--text-tertiary);
    min-width: 18px;
    text-align: right;
    flex-shrink: 0;
}

.compact-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    font-weight: 600;
}

.compact-score {
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.compact-comments {
    color: var(--text-tertiary);
    font-size: 11px;
    flex-shrink: 0;
}

.compact-empty {
    padding: 12px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Post items */
.post-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.post-item:last-child { border-bottom: none; }
.post-item:hover { background: var(--surface-secondary); }

.post-rank {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-tertiary);
    min-width: 32px;
    text-align: right;
    padding-top: 2px;
    flex-shrink: 0;
}

.post-item[data-rank="1"] .post-rank,
.post-item[data-rank="2"] .post-rank,
.post-item[data-rank="3"] .post-rank {
    color: var(--brand);
}

.post-score {
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.score-value {
    font-size: 16px;
    font-weight: 700;
    display: block;
}

.score-label {
    font-size: 10px;
    color: var(--text-tertiary);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-hot { color: #d32f2f; }
.score-warm { color: #e65100; }
.score-mild { color: #f57f17; }
.score-cool { color: var(--text-tertiary); }

.post-body {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.post-title a {
    color: var(--text-primary);
    font-weight: 600;
}

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

.post-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-submolt { color: var(--accent-analysis); font-weight: 600; }
.meta-author { color: var(--text-secondary); }
.meta-author.is-agent { color: var(--accent-profile); }
.meta-stats { color: var(--text-tertiary); }
.meta-time { color: var(--text-tertiary); }

.post-item.hot {
    border-left: 3px solid var(--brand);
    background: rgba(232, 51, 110, 0.03);
}

/* Submolt stats */
.submolt-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}

.submolt-stat-item:last-child { border-bottom: none; }
.submolt-stat-name { color: var(--accent-analysis); font-weight: 600; }
.submolt-stat-count { color: var(--text-tertiary); }

/* ================================================================
   Loading & Empty States
   ================================================================ */

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.loading-small {
    color: var(--text-tertiary);
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    background: var(--surface-primary);
    border-radius: 12px;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* Stale warning */
.stale-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: var(--accent-briefing);
    padding: 10px 16px;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
    border-radius: 8px;
}

/* ================================================================
   Footer
   ================================================================ */

#footer {
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    margin-top: 40px;
    background: var(--surface-primary);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-text a {
    color: var(--text-secondary);
}

.footer-text a:hover {
    color: var(--brand);
}

/* ================================================================
   Animations
   ================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s var(--ease) both;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 1024px) {
    .lead-headline {
        font-size: 28px;
    }

    .lead-card-content {
        padding: 24px 20px;
    }

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

    #category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-box-large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding: 16px 12px;
        gap: 16px;
    }

    .header-inner {
        flex-direction: column;
        padding: 10px 12px;
        gap: 8px;
    }

    .header-left {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .category-nav {
        width: 100%;
        order: 1;
    }

    .lead-headline {
        font-size: 24px;
    }

    .lead-card-content {
        padding: 20px 16px;
    }

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

    .grid-card-headline {
        font-size: 16px;
    }

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

    .article-detail-header {
        padding: 24px 16px;
    }

    .article-detail-headline {
        font-size: 28px;
    }

    .article-detail-body {
        padding: 24px 16px;
    }

    #category-grid {
        grid-template-columns: 1fr;
    }

    .category-box-large {
        grid-column: span 1;
    }

    .sort-controls {
        flex-wrap: wrap;
    }

    .article-detail-sidebar {
        order: -1;
    }
}

/* ================================================================
   Print
   ================================================================ */

@media print {
    #header,
    #sidebar,
    .breaking-banner,
    .dashboard-link,
    .back-link,
    .card-read-more,
    #footer {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }

    .article-detail-body {
        box-shadow: none;
        border: none;
    }
}
