/* ============================================
   Security News — Modern Dashboard Design System
   ============================================ */

/* Design Tokens */
:root {
    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 56px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Fira Code', Consolas, monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-lg: 1rem;
    --text-xl: 1.25rem;

    /* Spacing (8px scale) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);

    /* Sidebar (always dark) */
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: #f0f2f5;
    --bg-sidebar-active: #ebedf5;
    --text-sidebar: #555566;
    --text-sidebar-active: #1a1a2e;
    --sidebar-accent: #4f6df5;

    /* Light Theme Colors */
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f6f7f9;
    --bg-hover: #ebedf0;
    --text-primary: #1a1a2e;
    --text-secondary: #555566;
    --text-muted: #6e6e82;
    --border-color: #e0e2e8;
    --accent-color: #4862e8;
    --accent-hover: #3b54d4;

    /* Severity colors */
    --critical-bg: #fee2e2;
    --critical-border: #dc2626;
    --critical-text: #991b1b;
    --critical-color: #dc2626;

    --high-bg: #ffedd5;
    --high-border: #ea580c;
    --high-text: #9a3412;
    --high-color: #ea580c;

    --medium-bg: #fef9c3;
    --medium-border: #ca8a04;
    --medium-text: #854d0e;
    --medium-color: #ca8a04;

    --low-bg: #dcfce7;
    --low-border: #16a34a;
    --low-text: #166534;
    --low-color: #16a34a;

    --info-bg: #e0f2fe;
    --info-border: #0369a1;
    --info-text: #075985;
    --info-color: #0369a1;
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #111318;
    --bg-secondary: #1a1d27;
    --bg-tertiary: #222632;
    --bg-hover: #2a2e3a;
    --text-primary: #e8eaf0;
    --text-secondary: #b0b4c0;
    --text-muted: #6b7080;
    --border-color: #2d3040;
    --accent-color: #6b7ff5;
    --accent-hover: #8b9af7;

    --critical-bg: #2a0a0a;
    --critical-border: #dc2626;
    --critical-text: #fca5a5;

    --high-bg: #2a1407;
    --high-border: #ea580c;
    --high-text: #fdba74;

    --medium-bg: #2a2006;
    --medium-border: #ca8a04;
    --medium-text: #fde047;

    --low-bg: #0a2a16;
    --low-border: #16a34a;
    --low-text: #86efac;

    --info-bg: #082f49;
    --info-border: #0369a1;
    --info-text: #7dd3fc;
}

[data-theme="dark"] .sidebar {
    --bg-sidebar: #13161f;
    --bg-sidebar-hover: #1c2030;
    --bg-sidebar-active: #242840;
    --text-sidebar: #a0a8c0;
    --text-sidebar-active: #ffffff;
    --border-color: rgba(255,255,255,0.06);
    --bg-tertiary: rgba(255,255,255,0.08);
    --text-muted: rgba(160,168,192,0.7);
}

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

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

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

a:hover {
    text-decoration: underline;
}

/* ============================================
   App Layout: Sidebar + Topbar + Content
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.25s ease;
    border-right: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-color);
    min-height: var(--topbar-height);
    text-decoration: none;
    color: inherit;
}

.sidebar-brand:hover {
    text-decoration: none;
}

.sidebar-brand img {
    width: 32px;
    height: 32px;
}

.sidebar-brand-text {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-sidebar-active);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4) 0;
}

.sidebar-group-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: var(--space-4) var(--space-6) var(--space-2);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-6);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    border-left: 3px solid transparent;
    font-size: var(--text-sm);
    font-weight: 500;
    user-select: none;
    color: var(--text-sidebar);
    text-decoration: none;
}

.sidebar-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
    text-decoration: none;
}

.sidebar-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    border-left-color: var(--sidebar-accent);
}

.sidebar-item-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-size: var(--text-sm);
}

.sidebar-item-count {
    margin-left: auto;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    min-width: 1.6rem;
    text-align: center;
}

.sidebar-item.active .sidebar-item-count {
    background: rgba(255,255,255,0.15);
    color: var(--text-sidebar-active);
}

.sidebar-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
    font-size: var(--text-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.sidebar-footer-links {
    display: flex;
    gap: var(--space-4);
}

.sidebar-footer a {
    color: var(--text-sidebar);
    text-decoration: none;
}

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

.sidebar-footer-copy {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.sidebar-footer-share {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
}

.sidebar-footer-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-xs);
    transition: all 0.15s;
}

.sidebar-footer-share a:hover {
    border-color: var(--sidebar-accent);
    color: var(--sidebar-accent);
}

.sidebar-footer-hosted {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sidebar-footer-hosted:hover {
    opacity: 1;
}

.hosted-logo {
    height: 18px;
    width: auto;
}

[data-theme="dark"] .hosted-logo {
    filter: invert(1) brightness(1.5);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}

/* ============================================
   Topbar
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 0 var(--space-6);
    z-index: 150;
}

.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
}

.topbar-hamburger:hover {
    background: var(--bg-tertiary);
}

.topbar-search {
    flex: 1;
    position: relative;
    max-width: 480px;
}

.topbar-search-input {
    width: 100%;
    padding: var(--space-2) 2.75rem var(--space-2) 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.topbar-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.topbar-search-input::placeholder {
    color: var(--text-muted);
}

.topbar-search-icon {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--text-sm);
    pointer-events: none;
}

.search-mode-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px 7px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.2;
    letter-spacing: 0.02em;
}
.search-mode-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.search-mode-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.topbar-clock {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}
:root .topbar-clock { color: #3b54d4; }

.clock-time {
    font-size: var(--text-sm);
}

.clock-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 400;
}

.topbar-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-3);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s;
    white-space: nowrap;
}

.topbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.topbar-theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    transition: all 0.15s;
}

.topbar-theme-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.topbar-theme-btn .icon-moon { display: none; }
[data-theme="dark"] .topbar-theme-btn .icon-sun { display: none; }
[data-theme="dark"] .topbar-theme-btn .icon-moon { display: inline; }

/* ============================================
   Content Area
   ============================================ */
.content-area {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - var(--topbar-height));
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ============================================
   Alert Banner
   ============================================ */
.alert-banner {
    background: linear-gradient(135deg, var(--critical-border), #b91c1c);
    color: white;
    padding: var(--space-3) var(--space-6);
    position: relative;
    z-index: 50;
    animation: alertPulse 3s ease-in-out infinite;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.alert-banner.severity-high {
    background: linear-gradient(135deg, var(--high-border), #c2410c);
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

.alert-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
    min-width: 0;
}

.alert-title {
    display: block;
    font-weight: 700;
    font-size: var(--text-sm);
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-message {
    font-size: var(--text-xs);
    opacity: 0.92;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-link {
    color: white;
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background 0.15s;
}

.alert-link:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none;
}

.alert-dismiss-all {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: var(--text-xs);
    cursor: pointer;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}

.alert-dismiss-all:hover {
    background: rgba(255,255,255,0.25);
}

.alert-dismiss {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-1);
    opacity: 0.7;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* Restore Alerts Bar */
.restore-alerts-bar {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    text-align: center;
    margin-bottom: var(--space-4);
}

.restore-alerts-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-xs);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.restore-alerts-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.restore-icon {
    font-size: var(--text-sm);
}

/* ============================================
   Stats Strip
   ============================================ */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-height: 80px;
}

.stat-card-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
    color: var(--text-primary);
}

.stat-card-value.critical {
    color: var(--critical-border);
}

.stat-card-value.high {
    color: var(--high-border);
}

.stat-card-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================
   Filters (inline row)
   ============================================ */
.filters-row {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    align-items: center;
    flex-wrap: wrap;
}

.severity-toggles {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.severity-toggle {
    padding: 0.5rem 0.8rem;
    min-height: 2.5rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.15s;
    border: 1.5px solid transparent;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.severity-toggle:hover {
    opacity: 0.85;
}

.severity-toggle.critical { border-color: var(--critical-border); color: var(--critical-border); }
.severity-toggle.high { border-color: #9a3412; color: #9a3412; }
.severity-toggle.medium { border-color: var(--medium-border); color: #92400e; }
.severity-toggle.low { border-color: var(--low-border); color: var(--low-border); }
:root .severity-toggle.low { border-color: #15803d; color: #15803d; }
.severity-toggle.info { border-color: var(--info-border); color: var(--info-border); }

.severity-toggle.active.critical { background: var(--critical-border); color: white; }
.severity-toggle.active.high { background: #9a3412; color: white; }
.severity-toggle.active.medium { background: var(--medium-border); color: #1a1a1a; }
.severity-toggle.active.low { background: var(--low-border); color: white; }
.severity-toggle.active.info { background: var(--info-border); color: white; }

.filter-period {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
}

.filter-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: border-color 0.15s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.filter-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
}
:root .filter-label { color: var(--text-secondary); }

/* ============================================
   Sort Toggle (Collected / Published)
   ============================================ */
.sort-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sort-toggle-btn {
    background: var(--bg-secondary);
    border: none;
    padding: var(--space-2) var(--space-3);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
    line-height: 1;
}

.sort-toggle-btn:first-child {
    border-right: 1px solid var(--border-color);
}

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

.sort-toggle-btn.active {
    background: var(--accent-color);
    color: white;
}

/* ============================================
   View Toggle (List / Card)
   ============================================ */
.view-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.view-toggle-btn {
    background: var(--bg-secondary);
    border: none;
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: all 0.15s;
    line-height: 1;
}

.view-toggle-btn:first-child {
    border-right: 1px solid var(--border-color);
}

.view-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.view-toggle-btn.active {
    background: var(--accent-color);
    color: white;
}

/* ============================================
   Article List (Expandable Rows)
   ============================================ */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 400px;
}

/* Collapsed row */
.article-row {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background-color 0.1s;
    user-select: none;
    min-width: 0;
    max-width: 100%;
}

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

.article-row:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.article-row.expanded {
    background: var(--bg-tertiary);
}

.article-row-severity {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.article-row-severity.critical { background-color: var(--critical-border); }
.article-row-severity.high { background-color: var(--high-border); }
.article-row-severity.medium { background-color: var(--medium-border); }
.article-row-severity.low { background-color: var(--low-border); }
.article-row-severity.info { background-color: var(--info-border); }

.article-row-title {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.article-row-title .iceland-flag {
    margin-left: var(--space-1);
}

.article-row-source {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
:root .article-row-source { color: var(--text-secondary); }

.article-row .ti-cvss { flex-shrink: 0; }

.article-row-category {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.article-row-category.category-vulnerabilities { background: rgba(220,38,38,0.12); color: #b91c1c; }
.article-row-category.category-attacks { background: rgba(234,88,12,0.12); color: #9a3412; }
.article-row-category.category-updates { background: rgba(37,99,235,0.12); color: #2563eb; }
.article-row-category.category-news { background: rgba(107,114,128,0.12); color: #4b5563; }

[data-theme="dark"] .article-row-category.category-vulnerabilities { background: rgba(220,38,38,0.2); color: #fca5a5; }
[data-theme="dark"] .article-row-category.category-attacks { background: rgba(234,88,12,0.2); color: #fdba74; }
[data-theme="dark"] .article-row-category.category-updates { background: rgba(37,99,235,0.2); color: #93bbfd; }
[data-theme="dark"] .article-row-category.category-news { background: rgba(107,114,128,0.2); color: #d1d5db; }

.article-row-category.category-podcast { background: rgba(139,92,246,0.12); color: #7c3aed; }
[data-theme="dark"] .article-row-category.category-podcast { background: rgba(139,92,246,0.2); color: #c4b5fd; }

.article-row-category.category-digest { background: rgba(16,185,129,0.12); color: #047857; }
[data-theme="dark"] .article-row-category.category-digest { background: rgba(16,185,129,0.2); color: #6ee7b7; }

.digest-stream-row { border-left: 3px solid #10b981; }
[data-theme="dark"] .digest-stream-row { border-left: 3px solid #34d399; }

.digest-badge { background: #10b981 !important; color: #fff !important; }

.podcast-stream-row { border-left: 3px solid #7c3aed; }
[data-theme="dark"] .podcast-stream-row { border-left: 3px solid #a78bfa; }
.podcast-inline-icon { margin-right: 4px; }
.podcast-play-hint { color: #7c3aed; font-size: var(--text-sm); }
[data-theme="dark"] .podcast-play-hint { color: #a78bfa; }

.podcast-stream-card { cursor: pointer; }
.podcast-stream-card .article-card-footer { display: flex; justify-content: space-between; align-items: center; }
.podcast-play-btn { color: #7c3aed; font-size: var(--text-sm); cursor: pointer; }
[data-theme="dark"] .podcast-play-btn { color: #a78bfa; }
.podcast-badge { background: #7c3aed !important; color: #fff !important; }
.podcast-duration-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: var(--radius-sm); background: rgba(124,58,237,0.12); color: #7c3aed; font-size: var(--text-xs); font-weight: 500; vertical-align: middle; }
[data-theme="dark"] .podcast-duration-badge { background: rgba(167,139,250,0.15); color: #a78bfa; }
.podcast-duration-card { background: rgba(124,58,237,0.8) !important; font-size: var(--text-xs) !important; }
.podcast-card-tag { display: inline-block; padding: 1px 6px; margin: 2px 3px 2px 0; border-radius: var(--radius-sm); background: rgba(124,58,237,0.08); color: #7c3aed; font-size: var(--text-xs); }
[data-theme="dark"] .podcast-card-tag { background: rgba(167,139,250,0.12); color: #a78bfa; }
.article-card-tags { padding: 0 var(--space-md); margin-bottom: var(--space-sm); }
.podcast-meta-duration { color: var(--text-secondary); font-size: var(--text-sm); }

.article-row-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    font-family: var(--font-mono);
    min-width: 50px;
    text-align: right;
}

.article-row-chevron {
    font-size: var(--text-xs);
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.article-row.expanded .article-row-chevron {
    transform: rotate(90deg);
}

/* ============================================
   Article Card Grid (alternate view)
   ============================================ */
.articles-list.articles-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-4);
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.article-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    overflow: hidden;
    min-height: 240px;
    box-shadow: var(--shadow-sm);
}

:root .article-card {
    border-color: #d0d3da;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.article-card.severity-critical { border-left: 3px solid var(--critical-border); }
.article-card.severity-high { border-left: 3px solid var(--high-border); }
.article-card.severity-medium { border-left: 3px solid var(--medium-border); }
.article-card.severity-low { border-left: 3px solid var(--low-border); }
.article-card.severity-info { border-left: 3px solid var(--info-border); }

.article-card.expanded {
    box-shadow: 0 0 0 2px var(--accent-color);
    transform: none;
}

.article-card-visual {
    position: relative;
    height: 120px;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-severity-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
}
.severity-bg-critical { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.severity-bg-high { background: linear-gradient(135deg, #ea580c, #7c2d12); }
.severity-bg-medium { background: linear-gradient(135deg, #ca8a04, #713f12); }
.severity-bg-low { background: linear-gradient(135deg, #16a34a, #14532d); }
.severity-bg-info { background: linear-gradient(135deg, #0369a1, #0c4a6e); }

[data-theme="dark"] .article-card-severity-bg { opacity: 0.35; }

.article-card-badges {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    display: flex;
    gap: var(--space-1);
}

.article-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    padding-bottom: 0;
}

.article-card-category {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}

.article-card-category.category-vulnerabilities { background: rgba(220,38,38,0.12); color: #b91c1c; }
.article-card-category.category-attacks { background: rgba(234,88,12,0.12); color: #9a3412; }
.article-card-category.category-updates { background: rgba(37,99,235,0.12); color: #2563eb; }
.article-card-category.category-news { background: rgba(107,114,128,0.12); color: #4b5563; }

[data-theme="dark"] .article-card-category.category-vulnerabilities { background: rgba(220,38,38,0.2); color: #fca5a5; }
[data-theme="dark"] .article-card-category.category-attacks { background: rgba(234,88,12,0.2); color: #fdba74; }
[data-theme="dark"] .article-card-category.category-updates { background: rgba(37,99,235,0.2); color: #93bbfd; }
[data-theme="dark"] .article-card-category.category-news { background: rgba(107,114,128,0.2); color: #d1d5db; }

.article-card-time {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    font-size: var(--text-xs);
    color: white;
    font-family: var(--font-mono);
    background: rgba(0,0,0,0.5);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
}

.article-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    padding: var(--space-2) var(--space-4);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.5;
    padding: var(--space-2) var(--space-4) 0;
    margin: 0;
    border-top: 1px solid var(--border-color);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

:root .article-card-desc {
    border-top-color: #d0d3da;
}

.article-card-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

:root .article-card-footer {
    border-top-color: #d0d3da;
}

.article-card-source {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Expanded panel in card grid spans full width */
.articles-card-grid .article-card-expanded {
    grid-column: 1 / -1;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

/* Expanded detail panel */
.article-expanded {
    display: none;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-6);
    animation: expandIn 0.2s ease-out;
}

.article-expanded.active {
    display: block;
}

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

.expanded-header {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    align-items: flex-start;
}

.expanded-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    flex-shrink: 0;
}

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

.expanded-meta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

.expanded-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: var(--space-2);
}

.expanded-source-info {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

/* Summary in expanded card */
.expanded-summary {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.expanded-summary.severity-critical { border-left-color: var(--critical-border); }
.expanded-summary.severity-high { border-left-color: var(--high-border); }
.expanded-summary.severity-medium { border-left-color: var(--medium-border); }
.expanded-summary.severity-low { border-left-color: var(--low-border); }

/* YouTube embed in expanded */
.expanded-youtube {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
}

.expanded-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Tags in expanded */
.expanded-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.tag-link {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.15s;
}

.tag-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    text-decoration: none;
}

/* CVE tags */
.expanded-cves {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.cve-tag {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.cve-tag:hover {
    text-decoration: none;
    border-color: var(--accent-color);
}

/* CVE article count badge */
.cve-articles-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    background: var(--accent-color);
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    vertical-align: middle;
    transition: opacity 0.15s;
}
.cve-articles-badge:hover, .cve-articles-badge.active {
    opacity: 0.85;
}

/* CVE articles dropdown panel */
.cve-articles-panel {
    width: 100%;
    margin-top: var(--space-2);
    margin-bottom: var(--space-2);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: fadeSlideIn 0.15s ease-out;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.cve-articles-header {
    padding: 0.5rem 0.75rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
}
.cve-article-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border-color);
}
.cve-article-item:last-child { border-bottom: none; }
.cve-article-item:hover { background: var(--bg-tertiary); }
.severity-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.severity-dot.critical { background: var(--severity-critical); }
.severity-dot.high { background: var(--severity-high); }
.severity-dot.medium { background: var(--severity-medium); }
.severity-dot.low { background: var(--severity-low); }
.severity-dot.info { background: var(--severity-info); }
.cve-article-title {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cve-article-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.cve-articles-loading, .cve-articles-empty {
    padding: 0.75rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}

/* MITRE ATT&CK badges */
.expanded-mitre {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.mitre-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    text-decoration: none;
    transition: all 0.15s;
}

.mitre-tactic {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

[data-theme="dark"] .mitre-tactic {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.25);
}

.mitre-technique {
    background: rgba(168, 85, 247, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

[data-theme="dark"] .mitre-technique {
    background: rgba(192, 132, 252, 0.12);
    color: #c084fc;
    border-color: rgba(192, 132, 252, 0.25);
}

.mitre-badge:hover {
    text-decoration: none;
    opacity: 0.85;
}

.mitre-label {
    font-family: var(--font-sans, system-ui);
    font-size: 0.6rem;
    opacity: 0.8;
}

/* Vendor/Product display */
.expanded-vendor {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    background: var(--bg-tertiary);
}

.vendor-label {
    font-weight: 600;
    opacity: 0.7;
}

/* MITRE tags in tag cloud */
.tag-link[href*="mitre-"] {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .tag-link[href*="mitre-"] {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

.tag-link[href*="mitre-"]:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* Related articles/podcasts in expanded */
.expanded-related {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.expanded-related-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

.expanded-related-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.expanded-related-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s;
    font-size: var(--text-sm);
}

.expanded-related-item:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.expanded-related-item .severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.severity-dot.critical { background-color: var(--critical-color); }
.severity-dot.high { background-color: var(--high-color); }
.severity-dot.medium { background-color: var(--medium-color); }
.severity-dot.low { background-color: var(--low-color); }
.severity-dot.info { background-color: var(--info-color); }

.expanded-related-item .rel-title {
    flex: 1;
    font-weight: 500;
    line-height: 1.3;
    min-width: 0;
}

.expanded-related-item .rel-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.expanded-related-item .podcast-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Actions in expanded */
.expanded-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.expanded-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: none;
    font-family: var(--font-sans);
}

.expanded-btn:hover { text-decoration: none; }

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

.expanded-btn-primary:hover {
    background: var(--accent-hover);
}

.expanded-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.expanded-btn-secondary:hover {
    background: var(--bg-hover);
}

/* Summary bullet list styling */
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.5;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.summary-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.summary-list li strong {
    color: var(--text-primary);
}

/* Severity badge */
.severity-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.severity-badge.critical {
    background-color: var(--critical-border);
    color: white;
}

.severity-badge.high {
    background-color: #9a3412;
    color: white;
}

.severity-badge.medium {
    background-color: var(--medium-border);
    color: #1a1a1a;
}

.severity-badge.low {
    background-color: var(--low-border);
    color: white;
}

.severity-badge.info {
    background-color: var(--info-border);
    color: white;
}

.category-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.article-id-badge {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    opacity: 0.6;
}

/* Iceland flag */
.iceland-flag {
    display: inline-block;
    margin-left: var(--space-1);
}

/* ============================================
   Load More Button
   ============================================ */
.load-more {
    text-align: center;
    margin-top: var(--space-6);
}

.load-more button {
    padding: var(--space-2) var(--space-8);
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: background-color 0.15s;
}

.load-more button:hover {
    background: var(--accent-hover);
}
:root .load-more button { background: #3b54d4; }
:root .load-more button:hover { background: #2f44b0; }

/* Loading state */
.loading {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.no-articles,
.no-podcasts,
.no-digest {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Shared empty state for digest & consumer views */
.view-empty {
    text-align: center;
    padding: var(--space-12) var(--space-6);
}
.view-empty-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-4);
    animation: view-empty-pulse 2.5s ease-in-out infinite;
}
@keyframes view-empty-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}
.view-empty-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}
.view-empty-sub {
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto;
}

/* ============================================
   Digest View
   ============================================ */
.digest-view {
    margin-bottom: var(--space-6);
}

.digest-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.digest-header {
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    border-radius: var(--radius-lg);
}

.digest-type-row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--text-xs);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.95;
}

.digest-type-pill {
    background: rgba(255, 255, 255, 0.18);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
}

.digest-new-badge {
    background: #dc2626;
    color: white;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 10px;
}

.digest-time-ago {
    opacity: 0.8;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.digest-keynums {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    align-items: center;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    opacity: 0.95;
}

.digest-keynum {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    color: white;
}

.digest-keynum-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.digest-keynum-muted {
    opacity: 0.65;
    font-size: var(--text-xs);
}

.digest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.digest-audio-btn {
    background: white !important;
    color: var(--accent-color) !important;
    border: 1.5px solid white !important;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-md) !important;
    font-size: var(--text-sm) !important;
    font-weight: 700 !important;
    cursor: pointer;
    font-family: inherit;
}

.digest-audio-btn:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}

.digest-bluf {
    margin: var(--space-4) 0;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-secondary);
    border-left: 4px solid var(--severity-critical, #dc2626);
    border-radius: 6px;
}

.digest-bluf-label {
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--severity-critical, #dc2626);
    margin-bottom: var(--space-2);
}

.digest-bluf-body {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.digest-bluf-body p {
    margin: 0;
}
.digest-bluf-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

.digest-header h2,
.digest-header .digest-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0;
    color: white;
}

.digest-header .digest-meta,
.digest-header .digest-date {
    font-size: var(--text-sm);
    opacity: 0.9;
    color: white;
    background: none;
    border: none;
    padding: 0;
}

.digest-header .digest-actions button {
    background: transparent;
    border: 1.5px solid white;
    color: white;
    width: auto;
    height: auto;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
}

.digest-header .digest-actions button:hover {
    background: white;
    color: var(--accent-color);
}

[data-theme="dark"] .digest-header {
    background: linear-gradient(135deg, #363d6e, #454e8a);
}

[data-theme="dark"] .digest-header .digest-actions button:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.digest-content {
    padding: var(--space-6);
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-primary);
}

.digest-body h2 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--accent-color);
    margin: var(--space-6) 0 var(--space-4) 0;
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--border-color);
}

.digest-body h2:first-child {
    margin-top: 0;
}

.digest-body h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-4) 0 var(--space-2) 0;
}

.digest-body ul {
    margin: var(--space-3) 0;
    padding-left: var(--space-6);
}

.digest-body li {
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.digest-body p {
    margin: var(--space-3) 0;
    color: var(--text-secondary);
}

.digest-body strong {
    color: var(--text-primary);
}

.digest-body code {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.digest-body a {
    color: var(--accent-color);
}

.digest-meta {
    padding: var(--space-4) var(--space-6);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.digest-no-content {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
}

.digest-no-content p {
    margin-bottom: var(--space-4);
}

/* Digest share */
.digest-share {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.digest-share-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-right: var(--space-2);
}

.digest-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.digest-share-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Digest actions (rendered by JS) */
.digest-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.digest-actions button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    color: var(--text-primary);
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all 0.15s;
}

.digest-actions button:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Digest archive modal */
.digest-archive-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.digest-archive-modal.active {
    display: flex;
}

.digest-archive-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--space-6);
}

.digest-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.digest-archive-header h3 {
    margin: 0;
    font-size: var(--text-lg);
}

.digest-archive-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--space-1);
}

.digest-archive-close:hover {
    color: var(--text-primary);
}

/* Digest archive items */
.digest-archive-btn {
    background: transparent;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: var(--text-sm);
    padding: 0;
}

.digest-archive-btn:hover {
    text-decoration: underline;
}

.digest-back-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}

.digest-back-btn:hover {
    background: var(--bg-secondary);
}

.digest-archive-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.digest-archive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.15s;
}

.digest-archive-item:hover {
    border-color: var(--accent-color);
}

.digest-archive-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    cursor: pointer;
    flex: 1;
}

.digest-archive-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.digest-archive-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.digest-archive-count {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.digest-archive-actions {
    display: flex;
    gap: var(--space-2);
}

.digest-archive-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s;
}

.digest-archive-link:hover {
    background: var(--accent-color);
    color: white;
}

/* ============================================
   Consumer Security View
   ============================================ */
.consumer-view {
    margin-bottom: var(--space-6);
}

/* Advisory disclaimer (SPA + server-rendered) */
.advisory-disclaimer {
    padding: 0.75rem 1rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}
[data-theme="dark"] .advisory-disclaimer {
    background: #332b00;
    border-color: #665500;
}
.advisory-disclaimer-ai {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.advisory-disclaimer-age {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.advisory-stale {
    background: #fff3e0;
    border-color: #ff9800;
}
[data-theme="dark"] .advisory-stale {
    background: #3e2700;
    border-color: #b36b00;
}
.advisory-stale .advisory-disclaimer-age {
    color: #e65100;
    font-weight: 600;
}
[data-theme="dark"] .advisory-stale .advisory-disclaimer-age {
    color: #ff9800;
}

/* ============================================
   Podcasts View
   ============================================ */
.podcasts-view {
    margin-bottom: var(--space-6);
}

.podcasts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.podcasts-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.podcast-filter {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.podcast-filter label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.podcast-filter select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.podcasts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-4);
}

.podcast-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}

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

/* Severity on podcast cards (for articles using podcast-card layout) */
.podcast-card.severity-critical { border-left: 3px solid var(--critical-border); }
.podcast-card.severity-high { border-left: 3px solid var(--high-border); }
.podcast-card.severity-medium { border-left: 3px solid var(--medium-border); }
.podcast-card.severity-low { border-left: 3px solid var(--low-border); }
.podcast-card.severity-info { border-left: 3px solid var(--info-border); }

.podcast-card-inner {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
}

.podcast-image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.podcast-info {
    flex: 1;
    min-width: 0;
}

.podcast-show {
    font-size: var(--text-xs);
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.podcast-category {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
}

.podcast-category.category-vulnerabilities { background: rgba(220,38,38,0.12); color: #b91c1c; }
.podcast-category.category-attacks { background: rgba(234,88,12,0.12); color: #9a3412; }
.podcast-category.category-updates { background: rgba(37,99,235,0.12); color: #2563eb; }
.podcast-category.category-news { background: rgba(107,114,128,0.12); color: #4b5563; }

.podcast-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podcast-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.published-date {
    opacity: 0.7;
    font-size: 0.9em;
}

.podcast-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: var(--space-2);
}

.podcast-tags .tag-link {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
}

.podcast-duration {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.podcast-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 0 var(--space-4) var(--space-3);
    flex: 1;
}

.podcast-description .summary-list {
    list-style: disc !important;
    padding-left: 1.5rem !important;
    margin: 0;
}

.podcast-description .summary-list li {
    padding: 0.15rem 0;
    line-height: 1.5;
}

.podcast-description .summary-list li::marker {
    color: var(--accent-color);
}

.podcast-description .summary-list li::before {
    content: none;
}

.podcast-actions {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.podcast-btn {
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.podcast-btn:hover { text-decoration: none; }

.podcast-btn-play {
    background: var(--accent-color);
    color: white;
    border: none;
}

.podcast-btn-play:hover {
    background: var(--accent-hover);
}

.podcast-btn-link,
.podcast-btn-share,
.podcast-btn-related {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.podcast-btn-link:hover,
.podcast-btn-share:hover,
.podcast-btn-related:hover {
    background: var(--bg-hover);
}

/* Podcast Related Articles */
.podcast-related-articles {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.podcast-related-articles:empty {
    display: none;
}

.podcast-related-header {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
}

.podcast-related-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background-color 0.15s;
}

.podcast-related-item:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.podcast-related-info {
    flex: 1;
    min-width: 0;
}

.podcast-related-title {
    font-size: var(--text-xs);
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.1rem;
}

.podcast-related-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ============================================
   Tags View
   ============================================ */
.tags-view {
    margin-bottom: var(--space-6);
}

.tags-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-4);
    padding: 0 var(--space-1);
    gap: var(--space-3);
}

.tags-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tags-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.tags-search {
    position: relative;
    margin-bottom: var(--space-4);
}

.tags-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--text-sm);
    pointer-events: none;
}

.tags-search input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.tags-search input:focus {
    border-color: var(--accent-color);
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

.tag-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    min-height: 52px;
}

.tag-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

[data-theme="dark"] .tag-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tag-card-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    text-align: center;
    overflow: hidden;
}

.tag-card-icon.svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-card-icon.svg-icon img {
    width: 24px;
    height: 24px;
    opacity: 0.55;
    transition: opacity 0.2s;
}

[data-theme="dark"] .tag-card-icon.svg-icon img {
    filter: invert(1);
}

.tag-card:hover .tag-card-icon.svg-icon img {
    opacity: 0.85;
}

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

.tag-card-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-card-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.tags-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-6);
    font-size: var(--text-sm);
}

/* MITRE ATT&CK Matrix */
/* =============================================================================
   Events View
   ============================================================================= */

.events-view {
    margin-bottom: var(--space-6);
}

.events-header {
    margin-bottom: var(--space-4);
    padding: 0 var(--space-1);
}

.events-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.events-header-sub {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.events-stats-strip {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.events-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.events-stat-value {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--accent);
}

.events-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-1);
}

.events-filters {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.events-filter-btn {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.events-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.events-filter-btn.active,
.events-region-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.events-region-btn {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.events-region-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.events-region-filters {
    margin-top: calc(-1 * var(--space-2));
}

.events-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.event-month-header {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    padding: var(--space-3) 0 var(--space-1) 0;
    border-bottom: 2px solid var(--accent);
    margin-top: var(--space-2);
    text-transform: capitalize;
}

.event-card {
    display: flex;
    gap: var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    transition: border-color 0.15s ease;
}

.event-card:hover {
    border-color: var(--accent);
}

.event-card.event-past {
    opacity: 0.5;
}

.event-card.event-now {
    border-left: 3px solid #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-secondary) 30%);
}

.event-now-badge {
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    animation: event-now-pulse 2s ease-in-out infinite;
}

@keyframes event-now-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.event-card-date {
    min-width: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: var(--space-1);
}

.event-card-daterange {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

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

.event-card-top {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-1);
}

.event-type-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-type-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.event-type-green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.event-type-orange {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.event-type-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.event-virtual-badge {
    font-size: var(--text-xs);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.event-card-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.event-card-name a {
    color: var(--text-primary);
    text-decoration: none;
    pointer-events: none;
}

.event-card.expanded .event-card-name a {
    pointer-events: auto;
}

.event-card-name a:hover {
    color: var(--accent);
}

.event-card {
    cursor: pointer;
}

.event-card-details {
    display: none;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-color);
}

.event-card.expanded .event-card-details {
    display: flex;
}

.event-detail-row {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-sm);
    align-items: baseline;
}

.event-detail-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 90px;
    flex-shrink: 0;
}

.event-countdown {
    color: var(--accent);
    font-weight: 600;
}

.event-detail-tags {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.event-tag {
    font-size: var(--text-xs);
    padding: 0 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.event-detail-actions {
    margin-top: var(--space-1);
}

.event-detail-link {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.event-detail-link:hover {
    opacity: 0.85;
}

.event-detail-link-inline {
    color: var(--accent);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
}

.event-detail-link-inline:hover {
    text-decoration: underline;
}

.event-enriched-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.event-enriched-desc {
    flex-direction: column;
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
}

.event-detail-speakers span {
    font-size: var(--text-sm);
    line-height: 1.5;
}

.event-agenda-list {
    margin: 0;
    padding-left: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.event-agenda-list li {
    margin-bottom: var(--space-1);
}

.event-detail-agenda {
    flex-direction: column;
    gap: var(--space-1);
}

.event-detail-agenda .event-detail-label {
    margin-bottom: var(--space-1);
}

.event-card-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-1) 0;
    line-height: 1.4;
}

.event-card-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: flex;
    gap: var(--space-3);
}

.event-card-location::before {
    content: '\1F4CD ';
}

.event-cfp-deadline {
    font-size: var(--text-xs);
    color: var(--accent);
    font-weight: 500;
    margin-top: var(--space-1);
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.event-cfp-deadline.event-cfp-urgent {
    color: var(--critical-color, #ef4444);
    background: rgba(239, 68, 68, 0.08);
    font-weight: 700;
}

@media (max-width: 640px) {
    .event-card {
        flex-direction: column;
        gap: var(--space-1);
    }
    .event-card-date {
        min-width: unset;
    }
    .events-stats-strip {
        gap: var(--space-2);
    }
    .events-stat-card {
        min-width: 80px;
        padding: var(--space-2) var(--space-3);
    }
}

/* =============================================================================
   MITRE ATT&CK View
   ============================================================================= */

.mitre-view {
    margin-bottom: var(--space-6);
}

.mitre-matrix-header {
    margin-bottom: var(--space-4);
    padding: 0 var(--space-1);
}

.mitre-matrix-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.mitre-matrix-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.mitre-matrix-grid {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: var(--space-3);
    -webkit-overflow-scrolling: touch;
}

.mitre-tactic-column {
    min-width: 170px;
    max-width: 200px;
    flex: 1 0 170px;
    display: flex;
    flex-direction: column;
}

.mitre-tactic-header {
    background: #1a466b;
    color: #fff;
    padding: var(--space-3);
    text-align: center;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: background 0.15s;
}

.mitre-tactic-header:hover {
    background: #225a8a;
}

[data-theme="dark"] .mitre-tactic-header {
    background: #1e3a5f;
}

[data-theme="dark"] .mitre-tactic-header:hover {
    background: #274d7a;
}

.mitre-tactic-name {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.3;
}

.mitre-tactic-count {
    display: block;
    font-size: var(--text-xs);
    opacity: 0.8;
    margin-top: 2px;
}

.mitre-technique-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
}

.mitre-technique-cell {
    background: var(--bg-secondary);
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    transition: background 0.15s, border-left 0.15s;
    border-left: 3px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mitre-technique-cell:hover {
    background: var(--bg-tertiary, var(--bg-primary));
    border-left-color: var(--accent-color);
}

.mitre-technique-cell.mitre-active {
    background: var(--bg-tertiary, var(--bg-primary));
    border-left-color: var(--accent-color);
    font-weight: 600;
}

.mitre-technique-name {
    font-size: var(--text-xs);
    color: var(--text-primary);
    line-height: 1.3;
}

.mitre-technique-count {
    font-size: 11px;
    color: var(--text-muted);
}

.mitre-total {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-3);
}

/* MITRE Articles Panel */
.mitre-articles-panel {
    margin-top: var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.mitre-panel-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.mitre-panel-header h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.mitre-panel-id {
    font-weight: 400;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.mitre-panel-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.mitre-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 var(--space-1);
    line-height: 1;
}

.mitre-panel-close:hover {
    color: var(--text-primary);
}

.mitre-article-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mitre-article-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    text-decoration: none;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.mitre-article-item:hover {
    background: var(--bg-primary);
}

.mitre-article-title {
    flex: 1;
    font-size: var(--text-sm);
    line-height: 1.4;
}

.mitre-article-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.mitre-no-results {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-4);
}

/* Inline Audio Player */
.inline-audio-player {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.inline-audio-player audio {
    width: 100%;
    height: 36px;
}

/* Floating Audio Player */
.audio-player-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    z-index: 2000;
    display: none;
    overflow: hidden;
}

.audio-player-popup.active {
    display: block;
}

.audio-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    cursor: move;
    user-select: none;
}

.audio-player-title {
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: var(--space-2);
}

.audio-player-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.audio-player-close:hover {
    background: rgba(255,255,255,0.3);
}

.audio-player-body {
    padding: var(--space-3);
}

.audio-player-body audio {
    width: 100%;
    height: 36px;
}

/* ============================================
   Share Components
   ============================================ */
.share-popup {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-secondary);
    padding: var(--space-2);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
}

.share-popup-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: var(--text-sm);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
}

.share-popup-btn:hover {
    transform: scale(1.1);
}

.share-popup .share-twitter { background: #000; }
.share-popup .share-facebook { background: #1877f2; }
.share-popup .share-linkedin { background: #0a66c2; }
.share-popup .share-email { background: #6b7280; }
.share-popup .share-copy {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    width: auto;
    padding: 0 var(--space-3);
    border-radius: 17px;
    font-size: var(--text-xs);
}

/* Temporary message toast */
.temp-message {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-sidebar);
    color: #fff;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.temp-message.fade-out {
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.share-dropdown {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    min-width: 200px;
    overflow: hidden;
    z-index: 10000;
}

:root .share-dropdown { background-color: #ffffff; }
[data-theme="dark"] .share-dropdown { background-color: #1a1d27; }

.share-dropdown-header {
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.share-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: background-color 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.share-option:hover {
    background: var(--bg-tertiary);
}

.share-icon {
    width: 20px;
    text-align: center;
    font-weight: 600;
}

.share-twitter .share-icon { color: #1da1f2; }
.share-facebook .share-icon { color: #1877f2; }
.share-linkedin .share-icon { color: #0a66c2; }
.share-copy .share-icon { color: var(--accent-color); }

/* Footer share buttons */
.footer-share {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
}

.footer-share span {
    color: var(--text-muted);
}

.footer-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all 0.15s;
}

.footer-share-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

/* ============================================
   Footer
   ============================================ */
.app-footer {
    margin-top: auto;
    padding: var(--space-6) 0;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-xs);
    border-top: 1px solid var(--border-color);
}

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

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

/* Legacy .footer class (for server-rendered pages) */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-6) 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

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

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

/* ============================================
   Shared classes for server-rendered pages
   ============================================ */

/* Page layout */
.page-layout {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-layout-wide {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Page content header (image + info) */
.page-content-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.page-content-header-info {
    flex: 1;
}

/* Page image/icon */
.page-image {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.page-icon-box {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    flex-shrink: 0;
}

/* Page meta badges */
.page-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.page-meta .badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Page title */
.page-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Page buttons */
.page-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.page-btn:hover { opacity: 0.9; text-decoration: none; }
.page-btn-primary { background: var(--accent-color); color: white; }
.page-btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }

.page-btn-outline {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.page-btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Page actions row */
.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Page share section */
.page-share-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.page-share-section h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.page-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-share-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    color: white;
}

.page-share-twitter { background-color: #000; }
.page-share-facebook { background-color: #1877f2; }
.page-share-linkedin { background-color: #0a66c2; }
.page-share-copy {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    border: none;
}

/* Page related section */
.page-related-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.page-related-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.page-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-related-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.page-related-item:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.page-related-severity {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.page-related-title {
    flex: 1;
    font-weight: 500;
    line-height: 1.3;
}

.page-related-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Page back link */
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.page-back:hover {
    text-decoration: underline;
}

/* Article page specifics */
.page-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.page-summary .summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-summary .summary-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.page-summary .summary-list li:last-child {
    border-bottom: none;
}

.page-summary .summary-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.page-summary .summary-list li strong {
    color: var(--text-primary);
}

/* Page tags */
.page-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.page-tag {
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
}

.page-tag:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Source info */
.page-source-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Audio player for podcast page */
.page-audio-player {
    width: 100%;
    margin-bottom: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
}

.page-audio-player audio {
    width: 100%;
}

/* Tags browse page */
.page-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.page-tag-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.page-tag-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-tag-card-name {
    font-weight: 500;
    word-break: break-word;
}

.page-tag-card-count {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Tag page article items */
.page-tag-article {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.page-tag-article:hover {
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.page-tag-article-severity {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.page-tag-article-info {
    flex: 1;
    min-width: 0;
}

.page-tag-article-title {
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.page-tag-article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive for server-rendered pages */
@media (max-width: 600px) {
    .page-content-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .page-image,
    .page-icon-box {
        width: 120px;
        height: 120px;
    }
}

/* Legacy container for server-rendered pages */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Legacy header for server-rendered pages */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4) 0;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-logo {
    width: 36px;
    height: 36px;
}

.logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0;
}

.tagline {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Legacy main for server-rendered pages */
.main {
    flex: 1;
    padding: var(--space-6) 0;
}

/* ============================================
   Responsive: Tablet (768–1024px)
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .topbar {
        left: 0;
    }

    .topbar-hamburger {
        display: flex;
    }

    .content-area {
        margin-left: 0;
        width: 100%;
    }

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

    .topbar-clock {
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* ============================================
   Responsive: Mobile (<768px)
   ============================================ */
@media (max-width: 768px) {
    .content-area {
        padding: var(--space-4);
    }

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .stat-card {
        padding: var(--space-3);
        min-height: 60px;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-period {
        margin-left: 0;
    }

    .article-row-source,
    .article-row-category {
        display: none;
    }

    .article-row-title {
        font-size: var(--text-sm);
    }

    .expanded-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .expanded-image {
        width: 80px;
        height: 80px;
    }

    .expanded-actions {
        flex-direction: column;
    }

    .expanded-btn {
        justify-content: center;
    }

    .podcasts-grid,
    .articles-list.articles-card-grid {
        grid-template-columns: 1fr;
    }

    .mitre-tactic-column {
        min-width: 150px;
        flex: 1 0 150px;
    }

    .tags-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .alert-content {
        flex-wrap: wrap;
    }

    .alert-text {
        flex-basis: calc(100% - 3rem);
    }

    .alert-message {
        white-space: normal;
    }
}

/* ============================================
   Content list styling (used in digest/content)
   ============================================ */
.content-list {
    margin: 0.5rem 0 1rem 0;
    list-style: disc;
    padding-left: 1.5rem;
}

.content-list li {
    padding-left: 0.5rem;
    line-height: 1.5;
}

/* ============================================
   No Related placeholder
   ============================================ */
.no-related {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-2);
    margin: 0;
}

/* ============================================
   Article Related (on cards - legacy support)
   ============================================ */
.article-related-articles,
.article-related-podcasts {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.article-related-articles:empty,
.article-related-podcasts:empty {
    display: none;
}

.article-related-header {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
}

.article-related-article-item,
.article-related-podcast-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background-color 0.15s;
}

.article-related-article-item:hover,
.article-related-podcast-item:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.article-related-article-info,
.article-related-podcast-info {
    flex: 1;
    min-width: 0;
}

.article-related-article-title,
.article-related-podcast-title {
    font-size: var(--text-xs);
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.1rem;
}

.article-related-article-meta,
.article-related-podcast-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.article-related-podcast-item .podcast-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* =============================================================================
   Threat Intel Dashboard
   ============================================================================= */

.threat-intel-view {
    padding: 0;
}

.ti-header {
    margin-bottom: var(--space-4);
}

.ti-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-1);
}

.ti-header-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Stats Strip */
.ti-stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.ti-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    transition: border-color 0.2s;
}
.ti-stat-card:nth-child(1) { border-top: 3px solid var(--accent-color); }
.ti-stat-card:nth-child(2) { border-top: 3px solid var(--critical-color); }
.ti-stat-card:nth-child(3) { border-top: 3px solid #8b5cf6; }
.ti-stat-card:nth-child(4) { border-top: 3px solid #f97316; }

.ti-stat-card:hover {
    border-color: var(--accent-color);
}

.ti-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.ti-stat-value.ti-critical {
    color: var(--severity-critical, #ef4444);
}

.ti-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
}

/* Widget Grid */
.ti-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.ti-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ti-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.ti-widget-header h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
}

.ti-filter-group {
    display: flex;
    gap: var(--space-1);
    flex-shrink: 0;
}

.ti-filter-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.ti-filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.ti-filter-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
.ti-filter-btn.active[data-ti-filter="critical"] { background: var(--critical-border); border-color: var(--critical-border); }
.ti-filter-btn.active[data-ti-filter="high"] { background: #9a3412; border-color: #9a3412; }
.ti-filter-btn.active[data-ti-filter="medium"] { background: var(--medium-border); border-color: var(--medium-border); color: #1a1a1a; }
.ti-filter-btn.active[data-ti-filter="low"] { background: var(--low-border); border-color: var(--low-border); }
.ti-filter-btn.active[data-ti-filter="info"] { background: var(--info-border); border-color: var(--info-border); }
.ti-filter-btn.active[data-ti-filter="kev"] { background: #7c3aed; border-color: #7c3aed; }

/* TI Search Bar */
.ti-search-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-4);
    transition: border-color 0.2s;
}

.ti-search-bar:focus-within {
    border-color: var(--accent-color);
}

.ti-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.ti-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: inherit;
    min-width: 0;
}

.ti-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.ti-search-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.ti-search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 var(--space-1);
    line-height: 1;
    flex-shrink: 0;
}

.ti-search-clear:hover {
    color: var(--text-primary);
}

.ti-widget-body {
    max-height: 420px;
    overflow-y: auto;
    padding: var(--space-2);
}

/* CVE Rows */
.ti-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-2);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    transition: background 0.15s;
    font-size: var(--text-xs);
}

.ti-row:hover {
    background: var(--bg-hover);
}

.ti-row + .ti-row {
    border-top: 1px solid var(--border-color);
}

.ti-row.severity-critical { border-left-color: var(--severity-critical, #ef4444); }
.ti-row.severity-high { border-left-color: var(--severity-high, #f97316); }
.ti-row.severity-medium { border-left-color: var(--severity-medium, #eab308); }
.ti-row.severity-low { border-left-color: var(--severity-low, #22c55e); }

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

.ti-row-title,
.ti-row-header {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.ti-row-cve-id {
    white-space: nowrap;
    font-weight: 700;
}

.ti-row-title a,
.ti-row-header a {
    color: var(--text-primary);
    text-decoration: none;
}

.ti-row-title a:hover,
.ti-row-header a:hover {
    color: var(--accent-color);
}

.ti-row-desc {
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ti-row-meta {
    color: var(--text-muted);
    margin-top: 0.15rem;
    font-size: 0.65rem;
}

/* Expandable CVE rows */
.ti-row-expandable {
    cursor: pointer;
}

.ti-expand-icon::after {
    content: '\25B8';
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    display: inline-block;
}

.ti-row-expandable.expanded .ti-expand-icon::after {
    transform: rotate(90deg);
}

.ti-row-details {
    display: none;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.ti-row-expandable.expanded .ti-row-details {
    display: block;
}

.ti-row-expandable.expanded .ti-row-desc,
.ti-row-expandable.expanded > .ti-row-meta,
.ti-row-expandable.expanded > .ti-row-main > .ti-row-meta,
.ti-row-expandable.expanded .ti-row-date {
    display: none;
}

.ti-detail-desc {
    color: var(--text-secondary, var(--text-muted));
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-size: var(--text-sm);
}

.ti-detail-row {
    font-size: var(--text-xs);
    margin-bottom: 0.25rem;
    line-height: 1.4;
    display: flex;
    gap: 0.4rem;
}

.ti-detail-label {
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.ti-detail-value {
    color: var(--text-secondary, var(--text-muted));
    overflow-wrap: break-word;
    word-break: break-word;
}

.ti-detail-value a {
    color: var(--accent-color);
    text-decoration: none;
}

.ti-detail-value a:hover {
    text-decoration: underline;
}

/* AI Summary */
.ti-cve-summary:empty {
    display: none;
}

.ti-summary-loading {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-style: italic;
    padding: 0.4rem 0;
}

@keyframes ti-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.ti-summary-loading::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent-color);
    margin-right: 0.4rem;
    vertical-align: middle;
    animation: ti-pulse 1.2s ease-in-out infinite;
}

.ti-summary-content {
    font-size: var(--text-xs);
    line-height: 1.6;
    color: var(--text-secondary, var(--text-muted));
    padding: 0.5rem 0.6rem;
    margin: 0.4rem 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--accent-color);
}

.ti-summary-label {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    margin-right: 0.3rem;
    vertical-align: middle;
}

.ti-detail-links {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-color);
    font-size: var(--text-xs);
}

.ti-detail-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.ti-detail-links a:hover {
    text-decoration: underline;
}

/* Badges */
.ti-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
    white-space: nowrap;
}

.ti-badge.kev {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .ti-badge.kev {
    background: rgba(185, 28, 28, 0.2);
    color: #fca5a5;
    border-color: rgba(185, 28, 28, 0.3);
}

.ti-badge.exploit {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

[data-theme="dark"] .ti-badge.exploit {
    background: rgba(194, 65, 12, 0.2);
    color: #fdba74;
    border-color: rgba(194, 65, 12, 0.3);
}

.ti-badge.verified {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .ti-badge.verified {
    background: rgba(21, 128, 61, 0.2);
    color: #86efac;
    border-color: rgba(21, 128, 61, 0.3);
}

/* CVSS Score */
.ti-cvss {
    font-weight: 700;
    font-size: var(--text-xs);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.ti-cvss.critical { background: rgba(239,68,68,0.15); color: var(--severity-critical, #ef4444); }
.ti-cvss.high { background: rgba(249,115,22,0.15); color: var(--severity-high, #f97316); }
.ti-cvss.medium { background: rgba(234,179,8,0.15); color: var(--severity-medium, #eab308); }
.ti-cvss.low { background: rgba(34,197,94,0.15); color: var(--severity-low, #22c55e); }

/* IoC specific */
.ti-ioc-type {
    font-family: monospace;
    font-size: 0.6rem;
    background: var(--bg-tertiary);
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    color: var(--accent-color);
    flex-shrink: 0;
    white-space: nowrap;
}

.ti-ioc-value {
    font-family: monospace;
    font-size: var(--text-xs);
    color: var(--text-primary);
    word-break: break-all;
}

/* Ransomware group name */
.ti-group-name {
    font-family: monospace;
    font-weight: 600;
    color: var(--severity-critical, #ef4444);
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* Exploit EDB ID */
.ti-edb-id {
    font-family: monospace;
    font-size: 0.65rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Article count badge on CVE rows */
.ti-article-count {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    background: var(--accent-color);
    color: #fff;
    margin-left: var(--space-1);
    white-space: nowrap;
}

.ti-article-count:hover {
    opacity: 0.85;
}

/* Clickable threat intel elements */
.ti-clickable, .ti-group-name[data-ti-search], .ti-article-count[data-ti-search] {
    cursor: pointer;
}
.ti-clickable {
    text-decoration: underline dotted;
}
.ti-clickable:hover, .ti-group-name[data-ti-search]:hover, .ti-article-count[data-ti-search]:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Empty state */
.ti-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-6);
    font-size: var(--text-sm);
}

/* Threat Feeds Widget */
.ti-widget-full {
    grid-column: 1 / -1;
}

.ti-header-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 400;
}

.ti-feed-disclaimer {
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    padding: 0.5rem 0.75rem;
    margin: var(--space-3) var(--space-3) 0 var(--space-3);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.7rem;
    color: #7f1d1d;
    line-height: 1.5;
}

[data-theme="dark"] .ti-feed-disclaimer {
    background: #2a1215;
    border-left-color: #dc2626;
    color: #fca5a5;
}

.ti-feed-disclaimer a {
    color: #dc2626;
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.ti-feed-disclaimer a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .ti-feed-disclaimer a {
    color: #f87171;
}

.ti-feed-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
    padding: var(--space-3);
}

.ti-feed-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    background: var(--bg-primary);
}

.ti-feed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.ti-feed-name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.ti-feed-count {
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    min-width: 1.5rem;
    text-align: center;
}

.ti-feed-url {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    margin-bottom: var(--space-2);
    overflow: hidden;
}

.ti-feed-url code {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-family: monospace;
}

.ti-feed-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}

.ti-feed-copy-btn:hover {
    color: var(--accent-color);
    background: var(--bg-secondary);
}

.ti-feed-config {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ti-feed-config summary {
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-1) 0;
}

.ti-feed-config summary:hover {
    color: var(--accent-color);
}

.ti-feed-group {
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.ti-feed-group-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.ti-feed-group-title::-webkit-details-marker { display: none; }
.ti-feed-group-title::before {
    content: '\25B6';
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.ti-feed-group[open] > .ti-feed-group-title::before {
    transform: rotate(90deg);
}
.ti-feed-group-desc {
    font-weight: 400;
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.ti-feed-badges {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}
.ti-feed-risk-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    color: #fff;
    letter-spacing: 0.02em;
}
.ti-feed-risk-high { background: #dc2626; }
.ti-feed-risk-med { background: #ea580c; }
.ti-feed-risk-low { background: #ca8a04; }
.ti-feed-type-badge {
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.ti-feed-func-badge {
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
[data-theme="dark"] .ti-feed-func-badge {
    background: #1e293b;
    color: #93c5fd;
    border-color: #334155;
}
.ti-feed-group > .ti-feed-cards {
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border-color);
}
.ti-feed-table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
}
.ti-feed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-xs);
}
.ti-feed-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.ti-feed-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.ti-feed-table tbody tr:hover {
    background: var(--bg-hover);
}
.ti-feed-td-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.ti-feed-td-url {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
}
.ti-feed-td-url code {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
}
.ti-feed-td-count {
    text-align: right;
    white-space: nowrap;
}
.ti-is-badge {
    display: inline-block;
    background: #0051a5;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.25rem;
    letter-spacing: 0.03em;
}
.ti-source-badge {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.55rem;
    font-weight: 500;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.25rem;
}
.ti-feed-config pre {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    margin-top: var(--space-1);
    overflow-x: auto;
    font-size: 0.65rem;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre;
    font-family: monospace;
}
.ti-feed-loading {
    text-align: center;
    padding: var(--space-4);
    color: var(--text-muted);
    font-size: var(--text-sm);
}
.ti-feed-type-grid {
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border-color);
}
.ti-feed-type-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-color);
}
.ti-feed-type-row:last-child {
    border-bottom: none;
}
.ti-feed-type-row.ti-feed-type-empty {
    opacity: 0.45;
}
.ti-feed-type-label {
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--text-primary);
    width: 70px;
    flex-shrink: 0;
}
.ti-feed-risk-pills {
    display: flex;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}
.ti-feed-risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}
.ti-feed-risk-pill:hover:not(.empty) {
    opacity: 0.8;
    transform: scale(1.05);
}
.ti-feed-risk-pill strong {
    font-weight: 700;
}
.ti-feed-risk-pill-high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.ti-feed-risk-pill-medium {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}
.ti-feed-risk-pill-low {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fef08a;
}
[data-theme="dark"] .ti-feed-risk-pill-high {
    background: #2a1215;
    color: #fca5a5;
    border-color: #5c1d24;
}
[data-theme="dark"] .ti-feed-risk-pill-medium {
    background: #2a1a0e;
    color: #fdba74;
    border-color: #5c3a1e;
}
[data-theme="dark"] .ti-feed-risk-pill-low {
    background: #2a2510;
    color: #fde047;
    border-color: #5c4d1e;
}
.ti-feed-risk-pill.empty {
    opacity: 0.35;
}
.ti-feed-risk-summary {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    flex-wrap: wrap;
}
.ti-feed-risk-summary-item {
    display: flex;
    align-items: center;
}
.ti-feed-risk-summary .ti-feed-risk-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .ti-stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .ti-widget-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .ti-feed-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ti-stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    .ti-stat-card {
        padding: var(--space-2) var(--space-3);
    }
    .ti-stat-value {
        font-size: 1.25rem;
    }
    .ti-widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    .ti-filter-group {
        flex-wrap: wrap;
    }
    .ti-widget-body {
        max-height: 350px;
    }
    .ti-feed-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* =============================================
   Ransomware Group Context Card (article enrichment)
   ============================================= */

.group-context-card {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 0.75rem;
    margin-bottom: var(--space-3);
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.4;
}

.group-context-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

[data-theme="dark"] .group-context-card {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

/* =============================================
   Tools Tab — CVE Search
   ============================================= */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

/* Widget accent borders */
.tools-accent-orange { border-top: 3px solid #f97316; }
.tools-accent-purple { border-top: 3px solid #8b5cf6; }
.tools-accent-blue   { border-top: 3px solid var(--accent-color); }
.tools-accent-green  { border-top: 3px solid #10b981; }

/* Widget subtitle */
.ti-widget-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 400;
}

/* Compact scroll for dashboard widgets */
.tools-widget-scroll {
    max-height: 380px;
    overflow-y: auto;
    padding: var(--space-2);
}

.tools-cve-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    box-sizing: border-box;
}

.tools-cve-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.tools-cve-results {
    margin-top: var(--space-3);
}

.tools-cve-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.tools-cve-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.tools-cve-header a {
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

.tools-cve-header a:hover {
    text-decoration: underline;
}

.tools-cve-desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.tools-cve-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.tools-cve-item-compact {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding: 0.35rem 0;
}

.tools-cve-item-compact a {
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

.tools-cve-short {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.tools-cve-empty {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.tools-recent-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   My Systems CVE Watch
   ============================================ */
.tools-vendor-cve-row {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
}
.tools-vendor-cve-row:last-child { border-bottom: none; }
.tools-vendor-cve-id {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
}
.tools-vendor-cve-id:hover { text-decoration: underline; }
.tools-vendor-cve-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-left: var(--space-2);
}
.tools-vendor-configure {
    display: block;
    text-align: center;
    padding: var(--space-4);
    color: var(--accent-color);
    cursor: pointer;
    font-weight: 500;
}

/* ============================================
   IoC Search
   ============================================ */
.tools-ioc-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: 'SF Mono', 'Fira Code', monospace;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.tools-ioc-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 59,130,246), 0.1);
}
.tools-ioc-results {
    margin-top: var(--space-3);
}
.tools-ioc-result {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-sm);
    flex-wrap: wrap;
}
.tools-ioc-result:last-child { border-bottom: none; }
.tools-ioc-value {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: var(--text-xs);
    color: var(--text-primary);
    word-break: break-all;
    flex: 1;
    min-width: 180px;
}
.tools-ioc-type {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    white-space: nowrap;
}
.tools-ioc-type.ip-port { background: #2563eb22; color: #3b82f6; }
.tools-ioc-type.domain { background: #7c3aed22; color: #8b5cf6; }
.tools-ioc-type.url { background: #059b8522; color: #10b981; }
.tools-ioc-type.hash { background: #d9770622; color: #f59e0b; }
.tools-ioc-threat {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.tools-ioc-malware {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--severity-high, #ef4444);
}
.tools-ioc-risk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.tools-ioc-risk.high { background: var(--severity-critical, #dc2626); }
.tools-ioc-risk.medium { background: var(--severity-medium, #f59e0b); }
.tools-ioc-risk.low { background: var(--severity-low, #22c55e); }
.tools-ioc-source {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   Exploit + KEV Tracker
   ============================================ */
.tools-exploit-kev-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
@media (max-width: 768px) {
    .tools-exploit-kev-grid { grid-template-columns: 1fr; }
}
.tools-exploit-col h4,
.tools-kev-col h4 {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 var(--space-3) 0;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}
.tools-exploit-item,
.tools-kev-item {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-color);
}
.tools-exploit-item:last-child,
.tools-kev-item:last-child { border-bottom: none; }
.tools-exploit-title {
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.4;
}
.tools-exploit-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: 2px;
    flex-wrap: wrap;
}
.tools-exploit-platform {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    background: #7c3aed18;
    color: #8b5cf6;
}
.tools-exploit-cve {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--accent-color);
}
.tools-exploit-link {
    font-size: var(--text-sm);
    color: var(--accent-color);
    text-decoration: none;
    margin-left: var(--space-1);
}
.tools-exploit-link:hover { text-decoration: underline; }
.tools-kev-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.tools-kev-header a { text-decoration: none; color: var(--accent-color); }
.tools-kev-header a:hover { text-decoration: underline; }
.tools-kev-due {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.tools-kev-due.overdue { color: var(--severity-critical, #dc2626); font-weight: 600; }
.tools-kev-action {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

/* ============================================
   Ransomware Tracker
   ============================================ */
.tools-rw-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}
.tools-rw-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 16px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.tools-rw-pill:hover {
    border-color: var(--accent-color);
    background: var(--bg-tertiary);
}
.tools-rw-pill.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}
.tools-rw-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    color: inherit;
}
.tools-rw-pill:not(.active) .tools-rw-count {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
.tools-rw-detail {
    margin-top: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.tools-rw-detail-header {
    font-size: var(--text-base);
    margin-bottom: var(--space-3);
}
.tools-rw-sectors {
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    line-height: 1.6;
}
.tools-rw-sector-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    margin: 1px 2px;
}
.tools-rw-summary-btn {
    margin-top: var(--space-3);
    padding: 6px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.tools-rw-summary-btn:hover {
    background: var(--accent-color);
    color: white;
}
.tools-rw-summary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.tools-rw-profile-text {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: var(--space-3);
    white-space: pre-line;
}

/* ============================================
   Asset Filter (My Systems / Mín kerfi)
   ============================================ */
.asset-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.asset-filter-toggle {
    padding: 0.5rem 0.8rem;
    min-height: 2.5rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.15s;
    border: 1.5px solid var(--accent-color);
    background: var(--bg-tertiary);
    color: var(--accent-color);
    white-space: nowrap;
}

.asset-filter-toggle:hover { opacity: 0.85; }

.asset-filter-toggle.active {
    background: var(--accent-color);
    color: white;
}

.asset-filter-edit {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.asset-filter-edit:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Icelandic News Toggle */
.is-news-toggle {
    padding: 0.5rem 0.8rem;
    min-height: 2.5rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.15s;
    border: 1.5px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    white-space: nowrap;
}

.is-news-toggle:hover { opacity: 0.85; }

.is-news-toggle.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

/* Vendor Configuration Modal */
.vendor-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: var(--space-4);
}

.vendor-modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.vendor-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.vendor-modal-header h3 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.vendor-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.vendor-modal-close:hover { color: var(--text-primary); }

.vendor-search {
    margin: var(--space-3) var(--space-5);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
}

.vendor-search:focus {
    outline: none;
    border-color: var(--accent-color);
}

.vendor-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--space-5);
    min-height: 200px;
    max-height: 50vh;
}

.vendor-list-loading {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.vendor-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-1);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.1s;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.vendor-list-item:hover {
    background: var(--bg-hover);
}

.vendor-list-item input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.vendor-name {
    flex: 1;
    text-transform: capitalize;
}

.vendor-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.vendor-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border-color);
}

.vendor-btn-clear, .vendor-btn-save {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.15s;
    font-family: var(--font-sans);
}

.vendor-btn-clear {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.vendor-btn-clear:hover {
    background: var(--bg-hover);
}

.vendor-btn-save {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.vendor-btn-save:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .vendor-modal-content {
        max-width: 100%;
        max-height: 90vh;
    }
}

/* =============================================================================
   War Room
   ============================================================================= */

.pulse-view {
    padding: 0;
}

.wr-header {
    margin-bottom: var(--space-4);
}

.wr-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-1);
}

.wr-header-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.wr-stats-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.wr-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    border-top: 3px solid var(--accent-color);
}

.wr-stat-card[data-status] {
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.wr-stat-card[data-status]:hover {
    background: var(--bg-tertiary, var(--bg-hover));
}

.wr-stat-card.wr-stat-active {
    border-left-width: 2px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-color: var(--accent-color);
    border-right-color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: var(--bg-tertiary, var(--bg-hover));
}

.wr-stat-card.wr-breaking {
    border-top-color: var(--critical-color, #ef4444);
}

.wr-stat-card.wr-active {
    border-top-color: #3b82f6;
}

.wr-stat-card.wr-trending {
    border-top-color: #f97316;
}

.wr-stat-card.wr-developing {
    border-top-color: #14b8a6;
}

.wr-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.wr-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
}

/* Cluster cards */
.wr-clusters {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.wr-cluster-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.wr-cluster-card:hover {
    border-color: var(--accent-color);
}

.wr-cluster-card[data-status="breaking"] {
    border-left: 4px solid var(--critical-color, #ef4444);
}

.wr-cluster-card[data-status="active"] {
    border-left: 4px solid #3b82f6;
}

.wr-cluster-card[data-status="trending"] {
    border-left: 4px solid #f97316;
}

.wr-cluster-card[data-status="developing"] {
    border-left: 4px solid var(--accent-color);
}

.wr-cluster-card[data-status="blindspot"] {
    border-left: 4px solid #8b5cf6;
}

.wr-cluster-card[data-status="stable"] {
    border-left: 4px solid var(--text-muted);
}

.wr-cluster-card[data-status="fading"] {
    border-left: 4px solid var(--border-color);
    opacity: 0.75;
}

.wr-cluster-header {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.wr-cluster-top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.wr-cluster-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.wr-status-badge {
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    white-space: nowrap;
}

.wr-status-badge.breaking {
    background: var(--critical-color, #ef4444);
    color: #fff;
}

.wr-status-badge.active {
    background: #3b82f6;
    color: #fff;
}

.wr-status-badge.trending {
    background: #f97316;
    color: #fff;
}

.wr-status-badge.developing {
    background: var(--accent-color);
    color: #fff;
}

.wr-status-badge.blindspot {
    background: #8b5cf6;
    color: #fff;
}

.wr-status-badge.stable {
    background: var(--bg-tertiary, #374151);
    color: var(--text-secondary);
}

.wr-status-badge.fading {
    background: var(--border-color);
    color: var(--text-muted);
}

.wr-cluster-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.wr-cluster-meta span {
    white-space: nowrap;
}

.wr-velocity-bar {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 12px;
}

.wr-velocity-bar .wr-vbar {
    width: 3px;
    background: var(--accent-color);
    border-radius: 1px;
    min-height: 2px;
}

.wr-cluster-summary-preview {
    font-size: var(--text-sm);
    line-height: 1.55;
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.wr-cluster-hidden {
    display: none;
}

.wr-search-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-3) 0 var(--space-2);
    flex-wrap: wrap;
}

.wr-search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.55rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.wr-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.wr-search-input::placeholder {
    color: var(--text-muted);
}

.wr-search-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.wr-show-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    margin-top: var(--space-3);
    border-top: 1px dashed var(--border-color);
}

.wr-show-more-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
}

.wr-show-more-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: inherit;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.wr-show-more-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.wr-cluster-tags {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.wr-cluster-tags .tag {
    font-size: 10px;
    padding: 1px 6px;
    background: var(--bg-tertiary, #1f2937);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* Expandable detail */
.wr-cluster-detail {
    display: none;
    padding: 0 var(--space-4) var(--space-4);
    border-top: 1px solid var(--border-color);
}

.wr-cluster-detail.open {
    display: block;
}

.wr-cluster-summary {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-3);
    white-space: pre-wrap;
}

.wr-detail-section {
    margin-bottom: var(--space-3);
}

.wr-detail-section h4 {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--space-2);
}

.wr-detail-section p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.wr-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--border-color);
    padding-left: var(--space-3);
}

.wr-timeline-list li {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    position: relative;
}

.wr-timeline-list li::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-3) - 4px);
    top: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
}

.wr-timeline-time {
    font-weight: 600;
    color: var(--text-muted);
}

.wr-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wr-article-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-xs);
}

.wr-article-list li:last-child {
    border-bottom: none;
}

.wr-article-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.wr-article-list a:hover {
    text-decoration: underline;
}

.wr-article-source {
    color: var(--text-muted);
    margin-left: var(--space-2);
}

.wr-empty {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

@media (max-width: 768px) {
    .wr-stats-strip {
        grid-template-columns: repeat(3, 1fr);
    }
    .wr-cluster-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==== Share buttons (share.js) ==== */
.art-share {
    margin: 1.25rem 0;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
.art-share-row {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    align-items: center;
}
.art-share-label {
    font-size: var(--text-xs); font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-right: 0.5rem;
}
.art-share-btn {
    display: inline-flex; align-items: center; gap: 0.3em;
    padding: 0.35rem 0.75rem;
    font-size: var(--text-xs); font-family: inherit; font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.art-share-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.art-share-btn.art-share-flash {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: var(--bg-primary);
}
@media (max-width: 640px) {
    .art-share-btn { font-size: 0.75rem; padding: 0.3rem 0.55rem; }
}

/* Patch Lag Index tile */
#patch-lag-tile {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}
.patch-lag-heading {
    margin: 0 0 0.25rem 0;
    font-size: 1.1em;
    color: var(--text-primary);
}
.patch-lag-subtle {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin: 0 0 0.75rem 0;
}
.patch-lag-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.patch-lag-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}
.patch-lag-table th, .patch-lag-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92em;
}
.patch-lag-table thead th {
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.patch-lag-good { color: #2c7a2c; font-weight: 600; }
.patch-lag-bad  { color: #c93a3a; font-weight: 600; }
[data-theme="dark"] .patch-lag-good { color: #4ec24e; }
[data-theme="dark"] .patch-lag-bad  { color: #ff6b6b; }
.patch-lag-cve {
    text-decoration: none;
    color: var(--accent-color);
    border-bottom: 1px dotted var(--border-color);
}
.patch-lag-cve:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.patch-lag-cve code {
    color: inherit;
    background: transparent;
}
.patch-lag-caveat {
    font-size: 0.78em;
    color: var(--text-secondary);
    margin: 0.75rem 0 0 0;
    line-height: 1.5;
}
.patch-lag-table th.group-h {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}
.patch-lag-table tr.pl-banner-only td {
    color: var(--text-secondary);
    opacity: 0.65;
}
.patch-lag-table tr.pl-banner-only td:first-child code,
.patch-lag-table tr.pl-banner-only .patch-lag-cve code {
    opacity: 0.85;
}
.patch-lag-table .pl-confirmed-cell {
    border-left: 1px solid var(--border-color);
}
/* "What to do" hint row beneath each confirmed-vulnerable CVE — small,
   muted, indented. Skipped on patched/hidden rows (no action). */
.patch-lag-table tr.pl-action-row td.pl-action {
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.05rem 0.5rem 0.55rem 1.5rem;
    line-height: 1.45;
    border-top: none;
    background: transparent;
}
.patch-lag-table tr.pl-action-row:hover { background: transparent; }

/* ==== Attack Surface board (shared by /attack-surface, /dashboard, inline) ==== */
/* Iceland IoCs panel — mirrors Patch Lag tier pattern. */
.iceland-iocs {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.iceland-iocs-heading {
    font-size: 1.05rem;
    margin: 0 0 0.3rem;
    color: var(--text-primary);
    font-weight: 600;
}
.iceland-iocs .iceland-iocs-caveat {
    margin: 0 0 0.85rem;
    padding-left: 0.65rem;
    border-left: 2px solid rgba(201, 58, 58, 0.45);
    font-style: italic;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
[data-theme="dark"] .iceland-iocs .iceland-iocs-caveat { border-left-color: rgba(255, 107, 107, 0.45); }
/* Inline sub-tenant brands under an operator row (replaces the old standalone
   /by-brand panel). Quiet "↳ Sub-tenants on this ASN: foo (3) · bar (1)" line. */
.op-row-brands {
    margin: -0.15rem 0 0.55rem 1.25rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
/* Visually demote the "[unknown customer on <LIR>]" fallback rows — they
   represent hosting-LIR-level signal that we couldn't attribute to a real
   tenant. Lighter / italic so named-tenant rows pop above them. */
.op-row-unattributed .op-label {
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 400;
}
.op-row-unattributed .op-count {
    color: var(--text-secondary);
}
/* "↳ recent this week: …" strip under a tenant row — slightly more
   present than the hosted-on line (the IPs are actionable). */
.op-row-recent .op-row-brand {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
}
/* "↳ confirmed-C2: 7d:N · 30d:N · 365d:N" multi-window strip. Monospace
   numbers for alignment, slightly emphasised so trend reads at a glance. */
.op-row-windows .op-row-brand {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: var(--text-primary);
    cursor: help;
}
/* 📡 Pipeline-pulse SVG bar chart above the panel — daily IoC ingestion
   over the last 30 days. Inline SVG, per-bar <title> tooltip, theme-aware
   fill via .spark-svg classes. */
.ic-pipeline-pulse {
    margin: 0 0 0.7rem;
    padding: 0.45rem 0.7rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}
.ic-pipeline-pulse-label { color: var(--text-secondary); }
.ic-pipeline-pulse-trail { color: var(--text-secondary); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

/* Per-tenant "↳ activity (30d): [SVG]" sparkline strip under a tenant
   row. Reuses .op-row-brands base styling. */
.op-row-sparkline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.op-row-spark-trail {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

/* Inline-SVG sparkline — shared between pipeline pulse and per-tenant
   rows. .spark-svg-pulse is the larger panel-level one; .spark-svg-row
   is the inline tenant one. */
.spark-svg {
    display: inline-block;
    vertical-align: middle;
    overflow: visible;
}
.spark-svg-baseline {
    stroke: var(--border-color);
    stroke-width: 1;
    opacity: 0.5;
}
.spark-svg-bar {
    fill: rgba(201, 58, 58, 0.65);
    transition: fill 0.1s;
}
.spark-svg-bar:hover { fill: rgba(201, 58, 58, 0.95); cursor: help; }
.spark-svg-bar-zero {
    fill: rgba(128, 128, 128, 0.18);
}
/* Pipeline-startup backfill days — pipeline stamped first_seen = ingest-time
   on the initial backlog, producing a misleading "spike" at the left edge.
   Greyed out so the eye doesn't read them as real-world activity. */
.spark-svg-bar-backfill {
    fill: rgba(128, 128, 128, 0.45);
}
.spark-svg-bar-backfill:hover { fill: rgba(128, 128, 128, 0.7); cursor: help; }
[data-theme="dark"] .spark-svg-bar-backfill {
    fill: rgba(180, 180, 180, 0.4);
}
[data-theme="dark"] .spark-svg-bar-backfill:hover { fill: rgba(180, 180, 180, 0.7); }
[data-theme="dark"] .spark-svg-bar { fill: rgba(255, 107, 107, 0.65); }
[data-theme="dark"] .spark-svg-bar:hover { fill: rgba(255, 107, 107, 0.95); }
[data-theme="dark"] .spark-svg-bar-zero { fill: rgba(200, 200, 200, 0.18); }
/* The pulse one — slightly thicker, deeper accent */
.spark-svg-pulse .spark-svg-bar { fill: rgba(201, 58, 58, 0.75); }
[data-theme="dark"] .spark-svg-pulse .spark-svg-bar { fill: rgba(255, 107, 107, 0.75); }

/* Top-of-panel signal summary — one-line "Signal (30d): N confirmed-C2
   IPs · named: X · hosting LIRs: Y" with rolling-window trail. Replaces
   the urgency cue that disappeared when hosting LIRs got separated out
   of the named-tenant tier groups. Faint red accent so the reader's
   eye catches it; numbers monospaced for at-a-glance reading. */
.ic-signal-summary {
    margin: 0 0 0.85rem;
    padding: 0.6rem 0.85rem;
    background: rgba(201, 58, 58, 0.06);
    border: 1px solid rgba(201, 58, 58, 0.25);
    border-left: 3px solid rgba(201, 58, 58, 0.55);
    border-radius: 0 4px 4px 0;
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .ic-signal-summary {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.3);
    border-left-color: rgba(255, 107, 107, 0.6);
}

/* Data-depth caveat at the top of the tenant panel — small italic note
   while the 365d window is short of a full year of history. */
.ic-data-depth {
    margin: 0 0 0.85rem;
    padding: 0.45rem 0.7rem;
    background: var(--bg-tertiary);
    border-left: 2px solid var(--border-color);
    border-radius: 0 3px 3px 0;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* "▶ Recent blocklist hits" collapsible at the bottom of the tenant panel.
   Holds the full 7d per-IP feed that used to be a standalone panel. */
.ic-routine-feed {
    margin-top: 0.85rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.65rem;
}
.ic-routine-feed > summary {
    cursor: pointer;
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0;
}
.ic-routine-feed > summary::-webkit-details-marker,
.ic-routine-feed > summary::marker { display: none; content: ''; }
.op-row-brands-label { font-weight: 500; }
.op-row-brands .op-row-brand {
    color: var(--text-primary);
    cursor: help;
}
/* Orienter banner above the three Iceland IoC views — visually lighter,
   no panel card, smaller heading; sits in the same .dashview-section flow
   but doesn't look like another data panel. */
.iceland-iocs-orient { margin-bottom: 0.85rem; }
.iceland-iocs-orient .iceland-iocs {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.1rem 0 0.25rem;
}
.iceland-iocs-orient .iceland-iocs-heading {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.3rem;
}
.iceland-iocs-orient .iceland-iocs-caveat {
    border-left: none;
    padding-left: 0;
    font-style: normal;
    margin: 0;
}
.ic-tier { margin: 0.5rem 0 1rem; }
.ic-tier-1 .ic-tier-header {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: rgba(201, 58, 58, 0.10);
    border-left: 3px solid #c93a3a;
    color: var(--text-primary);
}
[data-theme="dark"] .ic-tier-1 .ic-tier-header {
    background: rgba(255, 107, 107, 0.14);
    border-left-color: #ff6b6b;
}
.ic-tier-3 > summary.ic-tier-header {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.ic-tier-3 > summary.ic-tier-header::-webkit-details-marker { display: none; }
.ic-tier-3 > summary.ic-tier-header::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.15s ease;
    color: var(--text-secondary);
}
.ic-tier-3[open] > summary.ic-tier-header::before { transform: rotate(90deg); }
.ic-tier-3 > summary.ic-tier-header:hover { background: var(--bg-primary); }
.ic-table { display: flex; flex-direction: column; }
.ic-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1.6fr) 1fr auto auto auto;
    gap: 0.85rem;
    align-items: baseline;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}
.ic-row-single-source { opacity: 0.7; }
.ic-row-single-source .ic-source-single-high::before {
    content: "⚠ ";
    color: #d97706;
}
.ic-source-multi { color: var(--text-primary); font-weight: 600; }
.ic-source-multi::before { content: "✓ "; color: #2c7a2c; }
[data-theme="dark"] .ic-source-multi::before { color: #4ec24e; }

/* Investigate dropdown — opens links to Shodan / AbuseIPDB / GreyNoise / etc. */
.ic-investigate {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.ic-investigate-trigger {
    list-style: none;
    font-size: 1rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    border: 1px solid transparent;
    color: var(--text-secondary);
}
.ic-investigate-trigger::-webkit-details-marker { display: none; }
.ic-investigate-trigger:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.ic-investigate[open] .ic-investigate-trigger {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.ic-investigate-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    margin-top: 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0;
    min-width: 9rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}
.ic-investigate-menu a {
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    white-space: nowrap;
}
.ic-investigate-menu a:hover { background: var(--bg-tertiary); }
.ic-row:last-child { border-bottom: none; }
.ic-ip-cell { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ic-row .ic-value { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--text-primary); }
.ic-row .ic-hostname {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ic-operator-badge {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(201, 58, 58, 0.18);
    color: var(--text-primary);
    border: 1px solid rgba(201, 58, 58, 0.5);
    width: fit-content;
    cursor: help;
}
[data-theme="dark"] .ic-operator-badge {
    background: rgba(255, 107, 107, 0.18);
    border-color: rgba(255, 107, 107, 0.5);
}
.ic-row-flagged { background: rgba(201, 58, 58, 0.05); }
[data-theme="dark"] .ic-row-flagged { background: rgba(255, 107, 107, 0.06); }
.ic-cpanel-badge {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: fit-content;
    cursor: help;
}
.ic-prefix-badge {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(56, 142, 142, 0.13);
    color: var(--text-primary);
    border: 1px solid rgba(56, 142, 142, 0.45);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}
[data-theme="dark"] .ic-prefix-badge {
    background: rgba(94, 196, 196, 0.16);
    border-color: rgba(94, 196, 196, 0.5);
}
.ic-tor-badge {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(107, 127, 245, 0.18);
    color: var(--text-primary);
    border: 1px solid rgba(107, 127, 245, 0.5);
    width: fit-content;
    cursor: help;
}
[data-theme="dark"] .ic-tor-badge {
    background: rgba(143, 162, 255, 0.18);
    border-color: rgba(143, 162, 255, 0.55);
}
.ic-row-tor { opacity: 0.75; }
.ic-row-tor .ic-source-single-high::before { content: ""; }
.ic-greynoise-badge {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    width: fit-content;
    cursor: help;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.ic-greynoise-malicious {
    background: rgba(201, 58, 58, 0.18);
    border-color: rgba(201, 58, 58, 0.55);
}
[data-theme="dark"] .ic-greynoise-malicious {
    background: rgba(255, 107, 107, 0.18);
    border-color: rgba(255, 107, 107, 0.55);
}
.ic-greynoise-benign {
    background: rgba(44, 122, 44, 0.15);
    border-color: rgba(44, 122, 44, 0.5);
}
[data-theme="dark"] .ic-greynoise-benign {
    background: rgba(78, 194, 78, 0.18);
    border-color: rgba(78, 194, 78, 0.55);
}
.ic-greynoise-riot {
    background: rgba(43, 95, 160, 0.16);
    border-color: rgba(43, 95, 160, 0.55);
}
[data-theme="dark"] .ic-greynoise-riot {
    background: rgba(77, 143, 220, 0.18);
    border-color: rgba(77, 143, 220, 0.55);
}
.ic-greynoise-suspicious {
    background: rgba(217, 119, 6, 0.16);
    border-color: rgba(217, 119, 6, 0.55);
}
[data-theme="dark"] .ic-greynoise-suspicious {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.55);
}
.ic-greynoise-noise {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.ic-row .ic-owner {
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ic-row .ic-threat { color: var(--text-secondary); }
.ic-row .ic-source {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ic-row .ic-when {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .ic-row {
        grid-template-columns: minmax(140px, 1fr) 1fr auto;
        gap: 0.4rem;
    }
    .ic-row .ic-source, .ic-row .ic-when { font-size: 0.7rem; grid-column: span 2; }
    .ic-row .ic-threat { grid-column: span 2; font-size: 0.78rem; }
    .ic-investigate { grid-row: 1; grid-column: 3; }
}
.ic-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.ic-owner-cell { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.ic-tier-badge {
    font-size: 0.85rem;
    cursor: help;
    line-height: 1;
}
.ic-row .ic-owner-cell .ic-owner {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* IS hosting risk tiers panel */
.op-tier { margin: 0.5rem 0 0.85rem; }
details.op-tier > summary.op-tier-header {
    cursor: pointer;
    list-style: none;
    user-select: none;
}
details.op-tier > summary.op-tier-header::-webkit-details-marker { display: none; }
details.op-tier > summary.op-tier-header::before {
    content: "▸";
    margin-right: 0.4rem;
    color: var(--text-secondary);
    transition: transform 0.15s ease;
    display: inline-block;
}
details.op-tier[open] > summary.op-tier-header::before { transform: rotate(90deg); }
.op-tier-header {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    color: var(--text-primary);
}
.op-tier-high .op-tier-header {
    background: rgba(201, 58, 58, 0.12);
    border-left: 3px solid #c93a3a;
}
[data-theme="dark"] .op-tier-high .op-tier-header {
    background: rgba(255, 107, 107, 0.16);
    border-left-color: #ff6b6b;
}
.op-tier-mixed .op-tier-header {
    background: rgba(217, 119, 6, 0.12);
    border-left: 3px solid #d97706;
}
[data-theme="dark"] .op-tier-mixed .op-tier-header {
    background: rgba(245, 158, 11, 0.16);
    border-left-color: #f59e0b;
}
/* 🟠 Unconfirmed HIGH-class tier — single-source flagged-as-HIGH IPs that
   no second feed corroborated. Real signal that needs eyeballs but isn't
   action-grade. Visually between MIXED (amber) and Neutral (grey). */
.op-tier-unconfirmed .op-tier-header {
    background: rgba(234, 88, 12, 0.10);
    border-left: 3px solid #ea580c;
}
[data-theme="dark"] .op-tier-unconfirmed .op-tier-header {
    background: rgba(251, 146, 60, 0.14);
    border-left-color: #fb923c;
}
.op-tier-low .op-tier-header {
    background: rgba(44, 122, 44, 0.12);
    border-left: 3px solid #2c7a2c;
}
[data-theme="dark"] .op-tier-low .op-tier-header {
    background: rgba(78, 194, 78, 0.16);
    border-left-color: #4ec24e;
}
.op-tier-neutral .op-tier-header,
.op-tier-unknown .op-tier-header {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--border-color);
}
/* 🏢 Hosting LIRs — separate section, distinct from the tier classification.
   Neutral muted styling because these are catchall buckets, NOT a tier
   verdict on the LIRs themselves. */
.op-tier-hosting {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border-color);
}
.op-tier-hosting .op-tier-header {
    background: var(--bg-tertiary);
    border-left: 3px dashed var(--border-color);
    font-style: normal;
}
.op-tier-hosting .op-tier-sub {
    margin: 0.35rem 0 0.8rem 0.65rem;
    padding-left: 0.65rem;
    border-left: 2px solid rgba(120, 120, 120, 0.3);
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.78rem;
    line-height: 1.45;
}
.op-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.3rem 0.5rem 0.3rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.op-row-expandable { display: block; padding: 0; }
.op-row-expandable > summary.op-row-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.3rem 0.5rem 0.3rem 0.85rem;
    user-select: none;
}
.op-row-expandable > summary.op-row-summary::-webkit-details-marker { display: none; }
.op-row-expandable > summary.op-row-summary::before {
    content: "▸";
    margin-right: 0.4rem;
    color: var(--text-secondary);
    transition: transform 0.15s ease;
    display: inline-block;
}
.op-row-expandable[open] > summary.op-row-summary::before { transform: rotate(90deg); }
.op-row-expandable > summary.op-row-summary:hover { background: var(--bg-tertiary); }
.op-row-details {
    padding: 0.5rem 0.85rem 0.65rem 1.85rem;
    background: var(--bg-primary);
    font-size: 0.82rem;
}
.op-detail-loading { color: var(--text-secondary); font-style: italic; padding: 0.5rem 0; }
.op-detail-summary {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    font-size: 0.78rem;
    line-height: 1.5;
}
.op-detail-summary > div + div { margin-top: 0.2rem; }
.op-detail-list { display: flex; flex-direction: column; gap: 0.2rem; }
.op-detail-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.85rem;
    align-items: baseline;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.op-detail-row:last-child { border-bottom: none; }
.op-detail-row-tor { opacity: 0.7; }
.op-detail-left { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.op-detail-ip {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: var(--text-primary);
}
.op-detail-host {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: var(--text-secondary);
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.op-detail-badges { display: flex; gap: 0.3rem; margin-top: 0.1rem; flex-wrap: wrap; }
.op-detail-badge {
    font-size: 0.65rem;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    cursor: help;
}
.op-detail-badge-tor {
    background: rgba(107, 127, 245, 0.18);
    border-color: rgba(107, 127, 245, 0.5);
}
[data-theme="dark"] .op-detail-badge-tor {
    background: rgba(143, 162, 255, 0.18);
    border-color: rgba(143, 162, 255, 0.55);
}
.op-detail-badge-multi {
    background: rgba(44, 122, 44, 0.15);
    border-color: rgba(44, 122, 44, 0.5);
    color: var(--text-primary);
}
[data-theme="dark"] .op-detail-badge-multi {
    background: rgba(78, 194, 78, 0.18);
    border-color: rgba(78, 194, 78, 0.55);
}
.op-detail-badge-prefix {
    display: inline-block;
    background: rgba(56, 142, 142, 0.13);
    border-color: rgba(56, 142, 142, 0.45);
    color: var(--text-primary);
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-theme="dark"] .op-detail-badge-prefix {
    background: rgba(94, 196, 196, 0.16);
    border-color: rgba(94, 196, 196, 0.5);
}
.op-detail-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.op-detail-threat { color: var(--text-primary); font-size: 0.82rem; }
.op-detail-source { text-transform: uppercase; letter-spacing: 0.3px; }
.op-detail-when { font-variant-numeric: tabular-nums; }
.op-row:last-child { border-bottom: none; }
.op-label {
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.op-count {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.patch-lag-tier { margin: 0.5rem 0 1rem; }
.patch-lag-tier-1 .patch-lag-tier-header,
.patch-lag-tier-3 .patch-lag-tier-header {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    color: var(--text-primary);
    cursor: default;
}
.patch-lag-tier-1 .patch-lag-tier-header {
    background: rgba(201, 58, 58, 0.10);
    border-left: 3px solid #c93a3a;
}
[data-theme="dark"] .patch-lag-tier-1 .patch-lag-tier-header {
    background: rgba(255, 107, 107, 0.14);
    border-left-color: #ff6b6b;
}
.patch-lag-tier-3 > summary.patch-lag-tier-header {
    cursor: pointer;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--border-color);
    list-style: none;
    user-select: none;
}
.patch-lag-tier-3 > summary.patch-lag-tier-header::-webkit-details-marker { display: none; }
.patch-lag-tier-3 > summary.patch-lag-tier-header::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.15s ease;
    color: var(--text-secondary);
}
.patch-lag-tier-3[open] > summary.patch-lag-tier-header::before { transform: rotate(90deg); }
.patch-lag-tier-3 > summary.patch-lag-tier-header:hover { background: var(--bg-secondary); }
.patch-lag-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    margin: 0.5rem 0 1rem;
}

.as-board { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.as-cat-h {
    background: var(--bg-tertiary);
    padding: 0.5rem 0.85rem;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
/* Severity tiers */
.as-tier { border-bottom: 1px solid var(--border-color); }
.as-tier:last-child { border-bottom: none; }
.as-tier-h {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    user-select: none;
    transition: background 0.15s;
}
.as-tier-h::after { content: " ▾"; opacity: 0.6; font-size: 0.85em; }
.as-tier-h.collapsed::after { content: " ▸"; }
.as-tier-1 .as-tier-h {
    background: rgba(201, 58, 58, 0.12);
    border-left: 4px solid #c93a3a;
    color: #c93a3a;
}
[data-theme="dark"] .as-tier-1 .as-tier-h {
    background: rgba(255, 107, 107, 0.18);
    border-left-color: #ff6b6b;
    color: #ff6b6b;
}
.as-tier-2 .as-tier-h {
    background: rgba(217, 119, 6, 0.10);
    border-left: 4px solid #d97706;
    color: #b45309;
}
[data-theme="dark"] .as-tier-2 .as-tier-h {
    background: rgba(245, 158, 11, 0.14);
    border-left-color: #f59e0b;
    color: #f59e0b;
}
.as-tier-3 .as-tier-h {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--border-color);
    color: var(--text-secondary);
}
.as-tier-h:hover { filter: brightness(1.05); }
.as-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.as-row:last-child { border-bottom: none; }
.as-row .label { color: var(--text-primary); font-weight: 500; font-size: 0.95rem; }
.as-row .why { display: block; font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.15rem; font-weight: 400; }
.as-row .count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    min-width: 4ch;
    text-align: right;
}
.as-row .delta {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.as-row.sev-critical .count { color: #c93a3a; }
.as-row.sev-high     .count { color: #d97706; }
[data-theme="dark"] .as-row.sev-critical .count { color: #ff6b6b; }
[data-theme="dark"] .as-row.sev-high     .count { color: #f59e0b; }
.as-loading { padding: 1rem; text-align: center; color: var(--text-secondary); font-size: var(--text-sm); }
.as-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 0.85rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.as-filter-label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.as-filter-select {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.3rem 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.as-filter-tip { font-size: 0.75rem; color: var(--text-secondary); }
@media (max-width: 640px) {
    .as-row { padding: 0.5rem 0.65rem; gap: 0.5rem; }
    .as-row .label { font-size: 0.85rem; }
    .as-row .why { font-size: 0.72rem; }
    .as-row .count { font-size: 1rem; }
}

/* ==== Dashboard view (inline #dashboardView on homepage) ==== */
.dashboard-view-header { margin: 0 0 1.25rem; }
.dashboard-view-header h2 { font-size: 1.6rem; margin: 0 0 0.4rem; color: var(--text-primary); }
.dashboard-view-sub { color: var(--text-secondary); font-size: 0.9rem; margin: 0; line-height: 1.5; }

/* Active incident strip — shown above summary cards when Iceland incidents exist */
.dashview-incidents { margin: 1.25rem 0 1rem; }
.dashview-incidents:empty { display: none; }

/* "↑ What changed in the last 7 days" delta panel — sits between the
   active-incident strip and the big number cards. Visually lighter than
   the strip (which is loud red); a quiet "this is what's new" tally. */
.dashview-deltas { margin: 0 0 1rem; }
.dashview-deltas:empty { display: none; }
.dv-delta {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid rgba(201, 58, 58, 0.55);
    border-radius: 6px;
    padding: 0.7rem 0.95rem;
}
[data-theme="dark"] .dv-delta { border-left-color: rgba(255, 107, 107, 0.55); }
.dv-delta-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}
.dv-delta-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-primary);
}
.dv-delta-emoji { font-size: 1rem; flex-shrink: 0; }
.dv-delta-text { flex: 1; }
.dv-delta-quiet { color: var(--text-secondary); font-style: italic; }
.dv-delta-row-hot .dv-delta-text { font-weight: 500; }
.dv-incident-intro {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0 0 0.4rem;
    font-style: italic;
    padding-left: 0.65rem;
    border-left: 2px solid rgba(201, 58, 58, 0.45);
}
[data-theme="dark"] .dv-incident-intro { border-left-color: rgba(255, 107, 107, 0.45); }
.dv-incident {
    background: rgba(201, 58, 58, 0.10);
    border: 1px solid rgba(201, 58, 58, 0.4);
    border-left: 4px solid #c93a3a;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
[data-theme="dark"] .dv-incident {
    background: rgba(255, 107, 107, 0.14);
    border-color: rgba(255, 107, 107, 0.45);
    border-left-color: #ff6b6b;
}
.dv-incident-badge {
    background: #c93a3a;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}
[data-theme="dark"] .dv-incident-badge { background: #ff6b6b; color: #1a1d27; }
.dv-incident-victim { font-weight: 700; color: var(--text-primary); font-size: 1rem; }
.dv-incident-meta { font-size: 0.85rem; color: var(--text-secondary); }
.dv-incident-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #c93a3a;
    font-size: 0.95rem;
    margin-left: auto;
}
[data-theme="dark"] .dv-incident-countdown { color: #ff6b6b; }

/* "Data sources & methodology" — collapsed-by-default details under the
   dashboard header. Provenance is important for trust; making it visible
   (but not in-the-way) lets readers verify where each panel's numbers
   come from. */
.dashview-method {
    margin: 0.4rem 0 1rem;
    font-size: 0.85rem;
}
.dashview-method > summary {
    cursor: pointer;
    list-style: none;
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
}
.dashview-method > summary::-webkit-details-marker,
.dashview-method > summary::marker { display: none; content: ''; }
.dashview-method > summary::before {
    content: '▶';
    font-size: 0.65rem;
    color: var(--text-secondary);
    transition: transform 0.15s;
    display: inline-block;
}
.dashview-method[open] > summary::before { transform: rotate(90deg); }
.dashview-method[open] > summary { margin-bottom: 0.5rem; }
.dashview-method-list {
    margin: 0.25rem 0 0.5rem 0;
    padding-left: 1.4rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.dashview-method-list li {
    margin-bottom: 0.45rem;
}
.dashview-method-caveat {
    margin: 0.6rem 0 0;
    padding-left: 0.65rem;
    border-left: 2px solid rgba(201, 58, 58, 0.45);
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.82rem;
    line-height: 1.45;
}
[data-theme="dark"] .dashview-method-caveat { border-left-color: rgba(255, 107, 107, 0.45); }

/* Hosting attribution line above the by-sector chart — hosting is pulled out
   of the bars (it's structurally high, dominates by ~3x the next sector)
   and shown here so the chart focuses on end-user sectors where exposure
   is actually a signal. */
.sc-infra-note {
    margin: 0 0 0.85rem;
    padding: 0.45rem 0.7rem;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    line-height: 1.4;
}
.sc-infra-note:hover { background: var(--bg-secondary); }
.sc-infra-note.active {
    border-style: solid;
    border-color: var(--accent, #c93a3a);
    background: rgba(201, 58, 58, 0.06);
}
[data-theme="dark"] .sc-infra-note.active {
    border-color: rgba(255, 107, 107, 0.55);
    background: rgba(255, 107, 107, 0.06);
}

/* Totals strip — replaces the old 4-card .dashview-cards section. Same 4
   metrics but inline in one ~50px-tall horizontal row instead of a
   400-pixel-tall card grid. The chunky numbers were "look impressive";
   the daily-use answer to "is anything new?" is in the delta panel above. */
.dashview-totals {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin: 0 0 1rem;
    padding: 0.7rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}
.dashview-totals-item .num {
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
}
.dashview-totals-item .lbl {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.dashview-totals-sep {
    color: var(--text-secondary);
    opacity: 0.45;
}
.dashview-totals-crit .num { color: #c93a3a; }
[data-theme="dark"] .dashview-totals-crit .num { color: #ff6b6b; }
.dashview-totals-warn .num { color: #d97706; }
[data-theme="dark"] .dashview-totals-warn .num { color: #ffb86b; }

/* Collapsible "Attack Surface — full breakdown" — was a 600px+ always-on
   wall of static-ish exposure totals (SMB 162, Telnet 80, …). Numbers
   don't change day-to-day, so this is reference material, not a daily-
   check panel. Now collapsed by default; the dashboard footer already
   links to the full /attack-surface page for power use. */
.dashview-as-collapsible {
    margin-bottom: 1.5rem;
}
.dashview-as-collapsible > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.dashview-as-collapsible > summary::-webkit-details-marker,
.dashview-as-collapsible > summary::marker { display: none; content: ''; }
.dashview-as-collapsible > summary::before {
    content: '▶';
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.15s;
    display: inline-block;
}
.dashview-as-collapsible[open] > summary::before { transform: rotate(90deg); }
.dashview-as-collapsible[open] > summary {
    margin-bottom: 0.5rem;
    border-radius: 6px 6px 0 0;
}
.dashview-as-summary-hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-left: auto;
}

.dashview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1rem;
    margin: 0 0 1.5rem;
}
.dashview-group {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.85rem 0.85rem;
    background: var(--bg-secondary);
}
.dashview-group-as { border-top: 3px solid #c93a3a; }
.dashview-group-pl { border-top: 3px solid #d97706; }
[data-theme="dark"] .dashview-group-as { border-top-color: #ff6b6b; }
[data-theme="dark"] .dashview-group-pl { border-top-color: #f59e0b; }
.dashview-group-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.dashview-group-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}
.dashview-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.dashview-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-1px);
}
.dashview-card.warn .num { color: #d97706; }
[data-theme="dark"] .dashview-card.warn .num { color: #f59e0b; }
/* Fade-in: numbers start dim ("…") and fade up to full opacity on first load. */
.dashview-card .num {
    opacity: 0.4;
    transition: opacity 0.5s ease, color 0.3s ease;
}
.dashview-card .num.loaded { opacity: 1; }
.dashview-card .num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    display: block;
}
.dashview-card .lbl {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 0.2rem;
}
.dashview-card.crit .num { color: #c93a3a; }
[data-theme="dark"] .dashview-card.crit .num { color: #ff6b6b; }

.dashview-section { margin-bottom: 1.75rem; }
.dashview-section > h3 {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
    color: var(--text-primary);
    font-weight: 600;
}
.dashview-intro {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 0.85rem;
    line-height: 1.5;
}

/* Sectoral horizontal bar chart */
.sector-chart {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.sector-chart .sector-chart-heading {
    font-size: 1.05rem;
    margin: 0 0 0.3rem;
    color: var(--text-primary);
    font-weight: 600;
}
.sector-chart .dashview-intro { margin: 0 0 0.85rem; }
.sector-chart .sc-row {
    display: grid;
    grid-template-columns: 11rem 1fr 5rem;
    gap: 0.85rem;
    align-items: center;
    padding: 0.4rem 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}
.sector-chart .sc-row:hover { background: var(--bg-tertiary); }
.sector-chart .sc-row.active { background: var(--bg-tertiary); }
.sector-chart .sc-label { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; }
.sector-chart .sc-bar-wrap {
    height: 1.4rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.sector-chart .sc-bar {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 3px;
}
.sector-chart .sc-row.sec-bank      .sc-bar,
.sector-chart .sc-chip.sec-bank     { --sec-color: #2c7a2c; }
.sector-chart .sc-row.sec-gov       .sc-bar,
.sector-chart .sc-chip.sec-gov      { --sec-color: #2b5fa0; }
.sector-chart .sc-row.sec-health    .sc-bar,
.sector-chart .sc-chip.sec-health   { --sec-color: #0f766e; }
.sector-chart .sc-row.sec-edu       .sc-bar,
.sector-chart .sc-chip.sec-edu      { --sec-color: #6b7ff5; }
.sector-chart .sc-row.sec-telco     .sc-bar,
.sector-chart .sc-chip.sec-telco    { --sec-color: #d97706; }
.sector-chart .sc-row.sec-hosting   .sc-bar,
.sector-chart .sc-chip.sec-hosting  { --sec-color: #c93a3a; }
.sector-chart .sc-row.sec-it-svc    .sc-bar,
.sector-chart .sc-chip.sec-it-svc   { --sec-color: #7c3aed; }
.sector-chart .sc-row.sec-media     .sc-bar,
.sector-chart .sc-chip.sec-media    { --sec-color: #db2777; }
.sector-chart .sc-row.sec-tech      .sc-bar,
.sector-chart .sc-chip.sec-tech     { --sec-color: #0891b2; }
.sector-chart .sc-row.sec-transport .sc-bar,
.sector-chart .sc-chip.sec-transport{ --sec-color: #65a30d; }
.sector-chart .sc-row.sec-security  .sc-bar,
.sector-chart .sc-chip.sec-security { --sec-color: #525252; }
.sector-chart .sc-row.sec-business  .sc-bar,
.sector-chart .sc-chip.sec-business { --sec-color: #a16207; }
.sector-chart .sc-row.sec-other     .sc-bar,
.sector-chart .sc-chip.sec-other    { --sec-color: #737373; }
.sector-chart .sc-bar { background: var(--sec-color, var(--accent-color)); }

[data-theme="dark"] .sector-chart .sc-row.sec-bank      .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-bank     { --sec-color: #4ec24e; }
[data-theme="dark"] .sector-chart .sc-row.sec-gov       .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-gov      { --sec-color: #4d8fdc; }
[data-theme="dark"] .sector-chart .sc-row.sec-health    .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-health   { --sec-color: #2dd4bf; }
[data-theme="dark"] .sector-chart .sc-row.sec-edu       .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-edu      { --sec-color: #8fa2ff; }
[data-theme="dark"] .sector-chart .sc-row.sec-telco     .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-telco    { --sec-color: #f59e0b; }
[data-theme="dark"] .sector-chart .sc-row.sec-hosting   .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-hosting  { --sec-color: #ff6b6b; }
[data-theme="dark"] .sector-chart .sc-row.sec-it-svc    .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-it-svc   { --sec-color: #a78bfa; }
[data-theme="dark"] .sector-chart .sc-row.sec-media     .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-media    { --sec-color: #f472b6; }
[data-theme="dark"] .sector-chart .sc-row.sec-tech      .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-tech     { --sec-color: #67e8f9; }
[data-theme="dark"] .sector-chart .sc-row.sec-transport .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-transport{ --sec-color: #a3e635; }
[data-theme="dark"] .sector-chart .sc-row.sec-security  .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-security { --sec-color: #a3a3a3; }
[data-theme="dark"] .sector-chart .sc-row.sec-business  .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-business { --sec-color: #fbbf24; }
[data-theme="dark"] .sector-chart .sc-row.sec-other     .sc-bar,
[data-theme="dark"] .sector-chart .sc-chip.sec-other    { --sec-color: #a3a3a3; }

/* Smaller sectors — chip grid below the top-N bars */
.sector-chart .sc-chips-label {
    margin: 0.85rem 0 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}
.sector-chart .sc-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.4rem;
}
.sector-chart .sc-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border-left: 3px solid var(--sec-color, var(--accent-color));
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.85rem;
}
.sector-chart .sc-chip:hover,
.sector-chart .sc-chip.active { background: var(--bg-primary); }
.sector-chart .sc-chip-label { color: var(--text-primary); font-weight: 500; }
.sector-chart .sc-chip-count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-primary);
}
.sector-chart .sc-count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    font-size: 0.95rem;
}
.sector-chart-loading { padding: 1rem; text-align: center; color: var(--text-secondary); font-size: var(--text-sm); }

.dashview-meta {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.dashview-meta a { color: var(--text-secondary); }

@media (max-width: 640px) {
    .dashview-card .num { font-size: 1.5rem; }
    .dashview-group-cards { grid-template-columns: 1fr; }
    .sector-chart .sc-row { grid-template-columns: 8rem 1fr 3.5rem; gap: 0.5rem; }
    .sector-chart .sc-label { font-size: 0.8rem; }
    .sector-chart .sc-count { font-size: 0.85rem; }
    .sector-chart .sc-chips { grid-template-columns: 1fr 1fr; }
    #patch-lag-tile { padding: 0.75rem 0.85rem; margin: 1rem 0; }
    .patch-lag-table th, .patch-lag-table td { padding: 0.35rem 0.45rem; font-size: 0.82em; }
    .patch-lag-heading { font-size: 1em; }
    .patch-lag-subtle { font-size: 0.78em; }
    .patch-lag-caveat { font-size: 0.72em; }
}

/* ── TTS reader — "Hlusta / Listen" bar (shared by all /analysis articles) ── */
.tts-bar { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1.4rem; font-size: 0.85rem; }
.tts-btn { cursor: pointer; font: inherit; font-size: 0.82rem; padding: 0.32rem 0.85rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); }
.tts-btn:hover, .tts-btn.tts-playing { border-color: var(--accent-color); }
.tts-btn:disabled { opacity: 0.6; cursor: progress; }
.tts-status { color: var(--text-secondary); }
.tts-w { border-radius: 2px; transition: background-color 0.15s; }
.tts-w.tts-on { background: rgba(217, 119, 6, 0.30); box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15); }
