/* ═══════════════════════════════════════════════════════════════════════════
   BUZZER POLITICAL ENGINE — Unified Intelligence Dashboard Theme
   Aligns with ScopeBit Market Inspector visual system.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --bg-abyss: #0b0b0d;
    --bg-deep: #121214;
    --bg-panel: #151518;
    --bg-card: #17171c;
    --bg-card-hover: #1f1f26;
    --bg-glass: rgba(11, 11, 13, 0.88);

    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-teal: #ececf0;
    --accent-blue: #d4d4db;
    --accent-slate: #b8bac6;

    --text-primary: #f5f5f5;
    --text-secondary: #c2c4ce;
    --text-dim: #9597a3;
    --text-accent: #f5f5f5;

    --border-subtle: #28282e;

    --safe-bottom: 0px;
    
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

@supports (padding: env(safe-area-inset-bottom)) {
    :root {
        --safe-bottom: env(safe-area-inset-bottom);
    }
}

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

html {
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) var(--bg-abyss);
}

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.05), transparent 34%),
                radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.03), transparent 32%),
                var(--bg-abyss);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-abyss); }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─── App Layout ────────────────────────────────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #151518 0%, #0f0f12 100%);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1;
}

.sidebar-brand .brand-sub {
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-top: 4px;
}

.close-sidebar-mobile {
    display: none;
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 12px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 12px 6px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    user-select: none;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: #1d1d23;
    color: var(--text-primary);
}

.nav-item.active {
    background: #1f1f26;
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 0 4px 4px 0;
}

.nav-item .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    z-index: 90;
    transition: opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

/* ─── Main Content ──────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-abyss);
    padding-bottom: var(--safe-bottom);
}

/* ─── Top Bar & Filter Bar (Tailwind Managed) ──────────── */
.top-bar {
    backdrop-filter: blur(10px);
    background: rgba(11, 11, 13, 0.88);
}

.filter-bar {
    background: rgba(18, 18, 20, 0.9);
}

.mobile-filter-actions {
    display: none;
    width: 100%;
    align-items: center;
    gap: 8px;
}

.filter-options-btn,
.filter-apply-mobile-btn {
    height: 32px;
    border-radius: 8px;
    border: 1px solid #31313a;
    background: #121218;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-options-btn {
    flex: 1;
}

.filter-options-btn.active {
    background: #1a1a21;
    border-color: #4a4a55;
}

.filter-apply-mobile-btn {
    background: #1c1c24;
    border-color: #44444f;
    min-width: 122px;
}

.filter-options-btn:hover,
.filter-apply-mobile-btn:hover {
    background: #1f1f27;
    border-color: #5a5a66;
}

.filter-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    width: 100%;
}

.filter-title-chip {
    border: 1px solid #31313a;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 700;
    color: #b4b6c2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    background: #121218;
    white-space: nowrap;
}

.filter-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-control-label {
    font-size: 10px;
    color: #a1a1aa;
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.source-control select,
.date-control input,
.limit-control input {
    min-width: 0;
}

.source-control select {
    width: 156px;
}

.filter-apply-btn {
    margin-left: 2px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}
.menu-toggle:hover { color: var(--text-primary); }

.search-icon { pointer-events: none; }



/* ─── Content Area ──────────────────────────────────────────────────────── */
.content-area {
    padding: 18px 24px;
    flex: 1;
}

.page-header {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(23, 23, 28, 0.94) 0%, rgba(15, 15, 18, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.page-header .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-family: var(--font-sans);
    line-height: 1.6;
}

.page-header--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.section-link,
.post-link,
.trend-use-btn,
.trend-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #d6d6db;
    background: linear-gradient(180deg, #f7f7f8 0%, #e5e5e8 100%);
    color: #0b0b0d;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(0,0,0,0.18);
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.section-link:hover,
.post-link:hover,
.trend-use-btn:hover,
.trend-source-link:hover {
    border-color: #e2e2e7;
    background: linear-gradient(180deg, #ffffff 0%, #ececef 100%);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 3px 8px rgba(0,0,0,0.16);
}

.section-link:active,
.post-link:active,
.trend-use-btn:active,
.trend-source-link:active {
    transform: translateY(0);
    background: linear-gradient(180deg, #ededf0 0%, #dfdfe3 100%);
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 56px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: linear-gradient(180deg, rgba(19, 19, 24, 0.98) 0%, rgba(14, 14, 18, 1) 100%);
    color: #f5f5f5;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-family: var(--font-sans);
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.header-action-btn:hover {
    border-color: #71717a;
    background: linear-gradient(180deg, rgba(23, 23, 29, 1) 0%, rgba(16, 16, 21, 1) 100%);
    color: #ffffff;
}

.header-action-btn:active {
    background: linear-gradient(180deg, rgba(16, 16, 20, 1) 0%, rgba(13, 13, 17, 1) 100%);
}

.section-link {
    min-height: 32px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding-inline: 13px;
}

.command-hero {
    margin-bottom: 16px;
    border: 1px solid #2f2f37;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(22, 22, 27, 0.96) 0%, rgba(14, 14, 18, 0.99) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.command-hero::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.12) 50%, transparent 100%);
}

.command-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 0;
    align-items: stretch;
}

.command-hero-main {
    padding: 18px 20px;
}

.command-hero-main h2 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.02;
}

.hero-kicker {
    color: #b7bac6;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-mono);
    margin-bottom: 10px;
}

.hero-subtitle {
    margin-top: 10px;
    color: #c7cad5;
    font-size: 13px;
    line-height: 1.65;
    max-width: 64ch;
}

.hero-filter {
    margin-top: 12px;
    font-size: 10px;
    line-height: 1.55;
    color: #aeb1bc;
    border: 1px solid #32323a;
    border-radius: 8px;
    background: rgba(15, 15, 18, 0.86);
    padding: 8px 10px;
    font-family: var(--font-mono);
}

.hero-context-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.hero-context-card {
    border: 1px solid #32323a;
    border-radius: 10px;
    background: #101014;
    padding: 10px 11px;
}

.hero-context-label {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    color: #8f919c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
}

.hero-context-value {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.45;
    color: #f5f5f5;
    font-weight: 600;
    word-break: break-word;
}

.hero-signal-panel {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px;
    background: rgba(16, 16, 20, 0.6);
}

.signal-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9da1af;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}

.signal-list {
    display: grid;
    gap: 6px;
}

.signal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #32323a;
    border-radius: 8px;
    background: #101014;
    padding: 8px 10px;
}

.signal-item span {
    font-size: 11px;
    color: #b3b6c2;
}

.signal-item strong {
    font-size: 12px;
    color: #f5f5f5;
    font-family: var(--font-mono);
    text-align: right;
}

.signal-footer {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.signal-footer span {
    color: #aeb1bc;
    font-size: 12px;
}

.signal-footer strong {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
}

.signal-footer .is-positive {
    color: #34d399;
}

.signal-footer .is-negative {
    color: #f87171;
}

.hero-pill-group {
    display: none;
}

.hero-pill {
    border: 1px solid #363641;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 10px;
    color: #c7cad5;
    background: rgba(19, 19, 24, 0.95);
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
}

/* ─── Stats Cards Grid ──────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    --stat-accent: #d4d4db;
    background: linear-gradient(180deg, rgba(22, 22, 27, 0.96) 0%, rgba(14, 14, 18, 0.98) 100%);
    border: 1px solid #2f2f37;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    min-height: 124px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.stat-card::before {
    content: none;
}

.stat-card::after {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    width: 34%;
    height: 1px;
    background: rgba(255,255,255,0.18);
    border-radius: 0 0 4px 4px;
}

.stat-card.red { --stat-accent: #f87171; --stat-soft: rgba(248, 113, 113, 0.18); }
.stat-card.amber { --stat-accent: #fbbf24; --stat-soft: rgba(251, 191, 36, 0.16); }
.stat-card.teal { --stat-accent: #34d399; --stat-soft: rgba(52, 211, 153, 0.15); }
.stat-card.blue { --stat-accent: #d4d4db; --stat-soft: rgba(212, 212, 219, 0.16); }
.stat-card.orange { --stat-accent: #fb923c; --stat-soft: rgba(251, 146, 60, 0.16); }

.stat-card:hover {
    border-color: #3a3a44;
    background: linear-gradient(180deg, rgba(24, 24, 30, 0.97) 0%, rgba(15, 15, 19, 0.99) 100%);
}

.stat-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.stat-tag {
    border: 1px solid #35353e;
    background: #111116;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10px;
    color: #c0c3ce;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.stat-icon {
    display: none;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    font-family: var(--font-mono);
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.stat-label {
    margin-top: 7px;
    font-size: 11px;
    color: #d0d3de;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-meta {
    margin-top: 6px;
    font-size: 11px;
    color: #9ea1ad;
    line-height: 1.55;
}

.stat-meter {
    margin-top: auto;
    padding-top: 10px;
    height: 5px;
}

.stat-meter span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--stat-accent), rgba(255, 255, 255, 0.26));
}

/* ─── Charts Grid ───────────────────────────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.charts-grid--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.chart-card {
    background: linear-gradient(180deg, rgba(22, 22, 27, 0.96) 0%, rgba(14, 14, 18, 0.99) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.chart-card .chart-title {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chart-shell {
    height: 216px;
}

.chart-shell--wide {
    height: 200px;
}

.chart-shell--tall {
    height: 232px;
}

.chart-card--wide {
    grid-column: 1 / -1;
}

.chart-card canvas { width: 100% !important; max-height: 232px; }

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 12px;
    align-items: start;
    margin-bottom: 18px;
}

.dashboard-rail {
    display: grid;
    gap: 12px;
}

.rail-card {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 22, 27, 0.96) 0%, rgba(14, 14, 18, 0.99) 100%);
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.rail-card-head {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rail-card-title {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rail-card-note {
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
}

.rail-list {
    display: grid;
    gap: 8px;
}

.rail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rail-row-main {
    min-width: 0;
    flex: 1;
}

.rail-row-label {
    display: block;
    color: #d9dbe3;
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rail-row-bar {
    display: block;
    width: 100%;
    height: 4px;
    margin-top: 6px;
    border-radius: 999px;
    background: #1a1a21;
    overflow: hidden;
}

.rail-row-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(244,244,245,0.88), rgba(156,163,175,0.35));
}

.rail-row-value {
    color: var(--text-primary);
    font-size: 11px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.rail-empty {
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.6;
}

.saved-topic-strip {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 22, 27, 0.96) 0%, rgba(14, 14, 18, 0.99) 100%);
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    margin-bottom: 18px;
}

.saved-topic-strip-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.saved-topic-navs {
    display: none;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.saved-topic-strip.has-pages .saved-topic-navs {
    display: flex;
}

.saved-topic-page-indicator {
    min-width: 34px;
    text-align: center;
    color: var(--text-dim);
    font-size: 10px;
    font-family: var(--font-mono);
}

.saved-topic-nav {
    width: 28px;
    height: 28px;
    border: 1px solid #34343d;
    border-radius: 8px;
    background: #111116;
    color: #f5f5f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.saved-topic-nav:hover:not(:disabled) {
    border-color: #50505a;
    background: #191920;
}

.saved-topic-nav:disabled {
    opacity: 0.38;
    cursor: default;
}

.saved-topic-strip-title {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.saved-topic-strip-note {
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
}

.saved-topic-grid {
    display: grid;
    grid-template-columns: repeat(var(--saved-topic-cols, 4), minmax(0, 1fr));
    gap: 8px;
}

.saved-topic-chip {
    width: 100%;
    min-width: 0;
    border: 1px solid #32323a;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18, 18, 23, 0.98) 0%, rgba(14, 14, 18, 0.98) 100%);
    padding: 10px 11px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.18s ease, background-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.saved-topic-chip:hover {
    border-color: #4a4a55;
    background: linear-gradient(180deg, rgba(22, 22, 28, 0.99) 0%, rgba(16, 16, 21, 0.99) 100%);
}

.saved-topic-chip-title {
    display: block;
    color: #f5f5f5;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-topic-chip-meta {
    display: block;
    color: var(--text-dim);
    font-size: 9px;
    line-height: 1.35;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-feed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-post-row {
    display: block;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 22, 27, 0.96) 0%, rgba(14, 14, 18, 0.98) 100%);
    padding: 12px 13px;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.mini-post-row:hover {
    border-color: #3b3b45;
    background: linear-gradient(180deg, rgba(24, 24, 30, 0.97) 0%, rgba(15, 15, 19, 0.99) 100%);
}

.mini-post-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mini-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mini-post-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #32323a;
    background: #111116;
    flex-shrink: 0;
}

.mini-post-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f5f5f5;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.mini-post-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-post-name {
    color: #f5f5f5;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-post-meta,
.mini-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mini-post-source,
.mini-post-time,
.mini-post-count {
    font-size: 10px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.mini-post-source {
    color: #c2c4ce;
    letter-spacing: 0.04em;
}

.mini-post-body {
    margin-top: 10px;
}

.mini-post-body.has-thumb {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
    align-items: start;
}

.mini-post-copy {
    min-width: 0;
}

.mini-post-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.mini-post-snippet {
    margin-top: 7px;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.55;
}

.mini-post-thumb {
    width: 92px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #32323a;
    background: #101014;
}

.mini-post-footer {
    margin-top: 10px;
}

/* ─── Post Feed (The Intelligence Feed) ─────────────────────────────────── */
.feed-container {
    display: grid;
    gap: 12px;
    max-width: 1120px;
    margin: 0 auto;
}

.post-card {
    background: linear-gradient(180deg, rgba(23, 23, 28, 0.95) 0%, rgba(15, 15, 19, 0.99) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.post-card:hover {
    border-color: #3b3b45;
    transform: translateY(-1px);
}

.post-card .post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.post-card .post-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.post-card .post-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-deep);
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
}

.post-card .post-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.post-card .post-user-info { min-width: 0; }
.post-card .post-username { font-weight: 600; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-card .post-handle { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.post-card .post-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.post-source-badge {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(15, 15, 18, 0.8);
    font-family: var(--font-mono);
}

.post-card .post-date { font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); }
.post-card .post-engagement { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }

.post-body {
    display: block;
}

.post-body.has-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
    align-items: start;
}

.post-copy {
    min-width: 0;
}

.post-card .post-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px;
    line-height: 1.48;
    letter-spacing: -0.01em;
}

.post-card .post-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.68;
    margin-bottom: 10px;
    white-space: pre-wrap;
    letter-spacing: 0.01em;
}

.post-card .read-more {
    border: 1px solid #383840;
    background: rgba(22, 22, 27, 0.95);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-family: var(--font-sans);
    cursor: pointer;
    margin-bottom: 0;
}

.post-card .read-more:hover {
    border-color: #50505a;
    background: #202029;
}

.post-side-media {
    position: relative;
    border: 1px solid #32323a;
    border-radius: 10px;
    overflow: hidden;
    background: #101014;
    min-height: 148px;
}

.post-side-media img {
    width: 100%;
    height: 148px;
    display: block;
    object-fit: cover;
}

.post-side-media-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    min-width: 30px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(11, 11, 13, 0.82);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 10px;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.post-card .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.post-link {
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.tag {
    font-size: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(18, 18, 22, 0.95);
    border: 1px solid #35353e;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
}

.tag.sentiment-positive { border-color: rgba(16, 185, 129, 0.5); color: #34d399; }
.tag.sentiment-negative { border-color: rgba(239, 68, 68, 0.5); color: #f87171; }

/* ─── Trend Items ───────────────────────────────────────────────────────── */
.trend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.trend-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 12px 13px;
    background: linear-gradient(180deg, rgba(25, 25, 31, 0.94) 0%, rgba(16, 16, 20, 0.98) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
}

.trend-item .trend-rank {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(17, 17, 21, 0.9);
    border: 1px solid #35353e;
}

.trend-item .trend-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
}

.trend-item .trend-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    grid-column: 2 / -1;
    margin-top: -2px;
}

.trend-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
}

.trend-item .trend-volume {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.trend-cta,
.trend-use-btn,
.trend-source-link {
    font-size: 9px;
    font-weight: 600;
    padding: 4px 7px;
    letter-spacing: 0.03em;
    font-family: var(--font-sans);
}

.trend-use-btn {
    cursor: pointer;
}

.trend-item.is-clickable {
    cursor: pointer;
    border-color: #383841;
}

.trend-item.is-clickable:hover {
    border-color: #545460;
    background: linear-gradient(180deg, rgba(36, 36, 44, 0.94) 0%, rgba(24, 24, 30, 0.98) 100%);
    transform: translateY(-1px);
}

.trend-item.is-clickable:hover .trend-cta {
    background: #e5e7eb;
    border-color: #ffffff;
}

/* ─── Topic Cards ───────────────────────────────────────────────────────── */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }

.topic-card {
    background: linear-gradient(180deg, rgba(30, 30, 37, 0.94) 0%, rgba(20, 20, 25, 0.98) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.topic-card:hover {
    border-color: #3f3f49;
    background: linear-gradient(180deg, rgba(36, 36, 44, 0.95) 0%, rgba(24, 24, 30, 0.98) 100%);
}

.topic-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-card .topic-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.topic-type-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-type-badge,
.topic-lang-badge {
    border: 1px solid #383842;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
    background: rgba(15, 15, 19, 0.9);
}

.topic-keyword-wrap {
    border: 1px solid #32323a;
    background: rgba(14, 14, 18, 0.92);
    border-radius: 10px;
    padding: 12px;
}

.topic-keyword-title {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.topic-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.topic-chip {
    border: 1px solid #3a3a43;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-secondary);
    background: #1c1c24;
}

.topic-chip-more {
    border-style: dashed;
    color: var(--text-dim);
}

.topic-keyword-plain,
.topic-keyword-empty {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    word-break: break-word;
}

.topic-keyword-empty {
    color: var(--text-dim);
    font-style: italic;
}

.topic-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #31313a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.topic-card .topic-date {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.topic-use-btn {
    border: 1px solid #3e3e47;
    background: #1d1d24;
    color: var(--text-primary);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

.topic-use-btn:hover {
    border-color: #676774;
    background: #272730;
}

/* ─── Endpoint Map ──────────────────────────────────────────────────────── */
.endpoint-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.endpoint-row { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.endpoint-row .ep-name { font-size: 13px; font-weight: 500; font-family: var(--font-mono); color: var(--text-primary); }
.endpoint-row .ep-stat { font-size: 11px; font-family: var(--font-mono); font-weight: 600; padding: 4px 8px; border-radius: 4px; background: var(--bg-deep); border: 1px solid var(--border-subtle); }
.ep-stat .has-data { color: #22c55e; }
.ep-stat .no-data { color: var(--text-dim); }

/* ─── Loading & Empty States ────────────────────────────────────────────── */
.loading-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; gap: 24px; }
.spinner { width: 32px; height: 32px; border: 2px solid var(--border-subtle); border-top-color: var(--text-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: var(--text-secondary); font-family: var(--font-mono); letter-spacing: 1px; }

.empty-state {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    color: var(--text-secondary);
}

.empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    color: var(--text-dim);
    background: var(--bg-deep);
}

.empty-text {
    max-width: 500px;
    font-size: 13px;
    line-height: 1.6;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
    margin: 24px 0;
}

.fade-in {
    animation: fadeIn 0.35s ease both;
}

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

/* ─── Footer ────────────────────────────────────────────────────────────── */
.app-footer { padding: 24px 32px; border-top: 1px solid var(--border-subtle); font-size: 12px; color: var(--text-dim); font-family: var(--font-sans); display: flex; justify-content: space-between; align-items: center; background: var(--bg-abyss); }

.mobile-dock {
    display: none;
}

.dock-shell {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid #28282e;
    border-radius: 22px;
    background: #111114;
    padding: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.dock-link {
    border-radius: 16px;
    padding: 9px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: #a1a1aa;
    transition: background-color 0.18s ease, color 0.18s ease;
    text-decoration: none;
}

.dock-link:hover,
.dock-link.active {
    background: #17171c;
    color: #fff;
}
.app-footer #footer-time { font-family: var(--font-mono); }

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    background: linear-gradient(180deg, rgba(30, 30, 37, 0.95) 0%, rgba(21, 21, 26, 0.98) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-family: var(--font-sans);
    color: var(--text-secondary);
}

.results-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.results-title {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.results-stat {
    font-size: 13px;
    color: var(--text-secondary);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.results-filter {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.results-bar .results-count,
.results-bar .results-total,
.results-bar .results-pages {
    color: var(--text-primary);
    font-weight: 600;
}

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

.btn-load-more {
    background: #1d1d24;
    border: 1px solid #3f3f48;
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    display: inline-flex;
    white-space: nowrap;
}

.btn-load-more:hover {
    background: #272730;
    border-color: #666673;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(245, 245, 245, 0.5);
    outline-offset: 2px;
}

/* ─── Responsive (The Magic for Mobile View) ────────────────────────────── */
.sidebar-open { overflow: hidden; }

@media (max-width: 900px) {
    /* Sidebar becomes a drawer using absolute positioning instead of transform to prevent browser rendering glitches */
    .sidebar { 
        left: -300px; 
        width: 280px; 
        z-index: 1000 !important; 
        border-right: 1px solid var(--border-subtle); 
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: none !important; /* Batalkan transform apapun yang mem-bug Firefox */
    }
    .sidebar.open { 
        left: 0 !important; 
    }
    .sidebar-overlay { display: block; z-index: 900 !important; }
    .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
    .close-sidebar-mobile { display: block; }
    
    .main-content { margin-left: 0; width: 100%; overflow-x: hidden; }
    .menu-toggle { display: block; margin-right: 8px; }
    
    .top-bar { padding: 12px 16px; height: 60px; }
    .filter-bar {
        padding: 10px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        overflow: visible;
    }

    .mobile-filter-actions {
        display: flex;
    }

    .filter-controls-row {
        display: none;
        min-width: 0;
    }

    .filter-controls-row.open {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        border: 1px solid #2f2f37;
        border-radius: 10px;
        background: #0f0f13;
        padding: 12px;
    }

    .filter-title-chip {
        justify-self: start;
    }

    .filter-control {
        width: 100%;
        display: grid;
        grid-template-columns: 68px 1fr;
        align-items: center;
        gap: 8px;
    }

    .source-control .relative {
        width: 100%;
    }

    .source-control select,
    .date-control input,
    .limit-control input {
        width: 100%;
    }

    .filter-apply-btn {
        width: 100%;
        height: 34px;
        margin-left: 0;
        border-radius: 8px;
    }

    .page-header,
    .results-bar {
        padding: 16px;
    }

    .page-header--split {
        flex-direction: column;
        align-items: flex-start;
    }

    .command-hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .command-hero-main {
        padding: 16px;
    }

    .hero-signal-panel {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        padding: 14px 16px;
    }

    .hero-context-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-hero-main h2 {
        font-size: 24px;
    }

    .results-filter {
        white-space: normal;
    }
    
    .content-area { padding: 14px 14px calc(112px + var(--safe-bottom)); }
    .app-footer { padding: 16px 16px calc(92px + var(--safe-bottom)); flex-direction: column; gap: 8px; text-align: center; }

    .mobile-dock {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        padding: 10px 10px calc(10px + var(--safe-bottom));
        background: rgba(11, 11, 13, 0.82);
        backdrop-filter: blur(14px);
        border-top: 1px solid rgba(40, 40, 46, 0.72);
    }

    .dashboard-main-grid,
    .analytics-grid,
    .charts-grid--dashboard,
    .mini-feed-grid {
        grid-template-columns: 1fr;
    }

    .saved-topic-strip {
        margin-bottom: 16px;
    }

    .chart-shell {
        height: 200px;
    }

    .chart-shell--wide,
    .chart-shell--tall {
        height: 210px;
    }

    .mini-post-body.has-thumb {
        grid-template-columns: minmax(0, 1fr) 84px;
    }

    .mini-post-thumb {
        width: 84px;
        height: 72px;
    }
}

@media (max-width: 600px) {
    /* Stack elements vertically for smaller screens */
    .stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .charts-grid { grid-template-columns: 1fr; }
    .topic-grid { grid-template-columns: 1fr; }
    .endpoint-list { grid-template-columns: 1fr; }

    .mobile-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-options-btn,
    .filter-apply-mobile-btn {
        width: 100%;
        min-width: 0;
        height: 34px;
        font-size: 11px;
    }

    .command-hero-main h2 {
        font-size: 22px;
    }

    .page-header h2 {
        font-size: 18px;
    }

    .hero-context-grid {
        grid-template-columns: 1fr;
    }

    .mini-post-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .mini-post-time {
        margin-left: 44px;
    }

    .mini-post-body.has-thumb {
        grid-template-columns: 1fr;
    }

    .mini-post-thumb {
        width: 100%;
        height: 152px;
    }

    .hero-subtitle {
        font-size: 14px;
        line-height: 1.6;
    }

    .hero-filter {
        font-size: 10px;
        line-height: 1.5;
    }

    .stat-card {
        min-height: 116px;
    }

    .stat-value {
        font-size: 22px;
    }

    .post-card { padding: 16px; }
    .post-card .post-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .post-card .post-identity { width: 100%; }
    .post-card .post-meta-right { align-items: flex-start; margin-top: 4px; }
    .post-body.has-media { grid-template-columns: 1fr; }
    .post-side-media { min-height: 180px; }
    .post-side-media img { height: 180px; }
    .post-footer { flex-direction: column; align-items: flex-start; }

    .trend-item {
        grid-template-columns: 34px 1fr;
    }

    .trend-item .trend-meta {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        padding-left: 2px;
    }

    .trend-actions {
        justify-content: flex-start;
    }

    .saved-topic-chip {
        min-width: 0;
    }

    .results-bar {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    .topic-footer {
        align-items: flex-start;
    }
}
