/*
Theme Name: RedGem Security News
Description: A modern WordPress theme with dark mode support for displaying security news, exploits, and CVE data. Customized for RedGem security platform.
Version: 2.14.0
Author: RedGem Team
License: GPL v2 or later
Text Domain: redgem-security-news
*/

/* ===== Design Tokens ===== */
:root {
  --red-500: #dc2626;
  --red-600: #b91c1c;
  --red-700: #991b1b;
  --amber-500: #f59e0b;
  --green-500: #10b981;
  --cyan-500: #991b1b;
  --orange-500: #f97316;
  --critical-color: #991b1b;

  --bg-0: #ffffff;
  --bg-1: #f8f9fb;
  --bg-2: #eef1f6;
  --bg-3: #dde3ed;
  --fg-0: #111827;
  --fg-1: #374151;
  --fg-2: #6b7280;
  --fg-3: #9ca3af;
  --border: #dde3ed;
  --shadow: rgba(0,0,0,0.05);
  --shadow-md: rgba(0,0,0,0.07);

  --link-hover: #991b1b;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="dark"] {
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #f87171;
  --amber-500: #fbbf24;
  --green-500: #34d399;
  --cyan-500: #b91c1c;
  --orange-500: #fb923c;
  --critical-color: #fca5a5;

  --bg-0: #0f172a;
  --bg-1: #1e293b;
  --bg-2: #334155;
  --bg-3: #475569;
  --fg-0: #ffffff;
  --fg-1: #f1f5f9;
  --fg-2: #94a3b8;
  --fg-3: #64748b;
  --border: #334155;
  --shadow: rgba(0,0,0,0.25);
  --shadow-md: rgba(0,0,0,0.35);

  --link-hover: #f87171;
}

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-0);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
}

a { color: var(--red-500); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--link-hover); }

h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.3; color: var(--fg-0); }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-0);
  transition: box-shadow 0.3s, background 0.2s;
}
.header--scrolled {
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 1px 3px var(--shadow), 0 4px 16px var(--shadow-md);
}

/* Gradient accent strip */
.header-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--red-500), var(--red-700) 40%, var(--amber-500) 100%);
}

/* Main bar */
.header-bar {
  border-bottom: 1px solid var(--border);
}
.header-bar .header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  height: 56px;
  gap: 0.5rem;
}

.header-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.header-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* Site Branding */
.site-branding { line-height: 1; flex-shrink: 0; }

.site-title-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--fg-0);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.site-title-link:hover { color: var(--fg-0); opacity: 0.85; }

.site-title-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.site-title-text { letter-spacing: -0.01em; }
.site-title-suffix { font-weight: 400; color: var(--fg-2); }

.site-logo { display: inline-flex; align-items: center; }
.header-logo {
  height: 30px;
  max-height: 30px;
  width: auto;
  max-width: 180px;
  display: block;
  object-fit: contain;
}

/* Nav */
.main-navigation {
  display: flex !important;
  align-items: center;
}

.nav-menu {
  display: flex !important;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-menu li a {
  display: block;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-menu li a:hover {
  background: var(--bg-2);
  color: var(--fg-0);
}
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
  background: var(--bg-2);
  color: var(--red-500);
  font-weight: 600;
}

/* Search Trigger (command-palette style) */
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 34px;
  padding: 0 0.6rem 0 0.7rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-3);
  font-size: 0.8125rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.search-trigger:hover {
  border-color: var(--fg-3);
  background: var(--bg-2);
  color: var(--fg-1);
}
.search-trigger-label { pointer-events: none; }
.search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--fg-3);
  line-height: 1;
}

/* Search Overlay (command palette) */
.search-overlay {
  position: fixed !important;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.2s, visibility 0.2s;
}
.search-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
}
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.search-palette {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 1rem;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--shadow);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.search-overlay.open .search-palette {
  transform: translateY(0) scale(1);
}
.search-palette-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
}
.search-palette-icon {
  color: var(--fg-3);
  flex-shrink: 0;
}
.search-palette-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--fg-0);
  outline: none;
  min-width: 0;
}
.search-palette-input::placeholder { color: var(--fg-3); }
.search-palette-close {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.search-palette-close kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--fg-3);
  line-height: 1.4;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: var(--fg-2);
  position: relative;
}
.theme-toggle:hover {
  background: var(--bg-2);
  border-color: var(--fg-3);
}
.theme-icon-sun,
.theme-icon-moon {
  position: absolute;
  transition: opacity 0.25s, transform 0.3s;
}
.theme-icon-sun { opacity: 1; transform: rotate(0deg); }
.theme-icon-moon { opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .theme-icon-sun { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: rotate(0deg); }

/* Login / Register Buttons */
.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-0);
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-header-login:hover {
  background: var(--bg-2);
  border-color: var(--fg-3);
  color: var(--fg-0);
}

.btn-header-register {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--red-500);
  border-radius: 999px;
  transition: all 0.15s;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.25);
}
.btn-header-register:hover {
  background: var(--red-600);
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

/* User Menu Dropdown */
.user-menu { position: relative; }

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-0);
  transition: background 0.15s, border-color 0.15s;
}
.user-menu-toggle:hover {
  background: var(--bg-2);
  border-color: var(--fg-3);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-2);
}

.user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chevron-icon { transition: transform 0.2s; color: var(--fg-3); }
.user-menu-toggle[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px var(--shadow-md), 0 0 0 1px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  padding: 0.35rem 0;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
}
.dropdown-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 2px solid var(--bg-2);
}
.dropdown-user-info { display: flex; flex-direction: column; min-width: 0; }
.dropdown-display-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-email {
  font-size: 0.6875rem;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-1);
  border-radius: var(--radius);
  margin: 0 0.35rem;
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--bg-2); color: var(--fg-0); }
.dropdown-item svg { color: var(--fg-3); flex-shrink: 0; }

.dropdown-item-danger { color: var(--red-500); }
.dropdown-item-danger:hover { background: rgba(220,38,38,0.06); color: var(--red-600); }
.dropdown-item-danger svg { color: var(--red-500); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.3rem 0.85rem;
}

/* Search Toggle Mobile */
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-1);
  border-radius: 999px;
}
.search-toggle:hover { background: var(--bg-2); }

/* ===== Header Ticker ===== */
.header-ticker {
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
}
.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--red-500);
  border-radius: 999px;
  flex-shrink: 0;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: ticker-pulse 1.5s ease-in-out infinite;
}
@keyframes ticker-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ticker-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg-2);
  font-size: 0.8125rem;
  overflow: hidden;
}
.ticker-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.ticker-stat svg { color: var(--fg-3); flex-shrink: 0; }
.ticker-stat strong { color: var(--fg-0); font-weight: 600; }
.ticker-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===== Page Hero ===== */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero-content {
  max-width: 680px;
}
.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.hero-highlight {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0;
  max-width: 560px;
}

.hero-quick-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.quick-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.quick-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg-0);
  line-height: 1;
}
.quick-stat-value.quick-stat-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green-500);
  font-size: 1.1rem;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green-500);
  border-radius: 50%;
  animation: ticker-pulse 1.5s ease-in-out infinite;
}
.quick-stat-label {
  font-size: 0.75rem;
  color: var(--fg-3);
  font-weight: 500;
}
.quick-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===== Security Statistics Chart ===== */
.security-stats-chart {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.chart-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg-0);
  margin: 0;
}

.chart-title svg {
  color: var(--fg-3);
}

.chart-tabs, .chart-period-tabs, .vendor-period-tabs, .vendor-type-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-2);
  padding: 0.25rem;
  border-radius: var(--radius);
}

.vendor-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.vendor-type-tabs .type-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.vendor-type-tabs .type-tab:hover {
  background: var(--bg-3);
  color: var(--text-primary);
}

.vendor-type-tabs .type-tab.active {
  background: var(--primary);
  color: white;
}

.chart-tab, .period-tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-1);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chart-tab:hover, .period-tab:hover {
  color: var(--fg-0);
  background: var(--bg-0);
}

.chart-tab.active {
  color: var(--bg-0);
  background: var(--red-500);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.period-tab.active {
  color: var(--bg-0);
  background: var(--amber-500);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-content {
  position: relative;
}

.chart-periods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.chart-period {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.period-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-2);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.period-total {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fg-0);
  margin-bottom: 1rem;
  line-height: 1;
}

.severity-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.severity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
}

.severity-item.severity-critical {
  background: rgba(153, 27, 27, 0.1);
  border-color: var(--critical-color);
}

.severity-item.severity-high {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red-500);
}

.severity-item.severity-medium {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--amber-500);
}

.severity-item.severity-low {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--green-500);
}

[data-theme="dark"] .severity-item.severity-critical {
  background: rgba(252, 165, 165, 0.15);
}

[data-theme="dark"] .severity-item.severity-high {
  background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .severity-item.severity-medium {
  background: rgba(251, 191, 36, 0.15);
}

[data-theme="dark"] .severity-item.severity-low {
  background: rgba(52, 211, 153, 0.15);
}

.severity-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-1);
}

.severity-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg-0);
  padding: 0.25rem 0.5rem;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  min-width: 32px;
  text-align: center;
}

.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--fg-2);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--red-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Daily Chart ===== */
.daily-chart-container {
  padding: 1rem 0;
}

.daily-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 0.25rem;
  height: 220px;
  padding: 1rem 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  border-bottom: 2px solid var(--border);
}

.chart-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: opacity 0.2s ease;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 50px;
  height: 100%;
}

.chart-bar-stack {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: center !important;
  height: 180px !important;
  position: relative;
  flex-grow: 1;
}

.chart-bar-wrapper {
  width: 100% !important;
  max-width: 32px !important;
  display: flex !important;
  flex-direction: column-reverse !important;
  border-radius: 4px;
  overflow: hidden !important;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.chart-bar-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chart-bar-segment {
  width: 100% !important;
  min-height: 4px !important;
  transition: opacity 0.2s;
  cursor: pointer;
  flex-shrink: 0 !important;
  display: block !important;
}

.chart-bar-segment.severity-critical {
  background-color: #991b1b !important;
  background: #991b1b !important;
}

[data-theme="dark"] .chart-bar-segment.severity-critical {
  background-color: #dc2626 !important;
  background: #dc2626 !important;
}

.chart-bar-segment.severity-high {
  background-color: #ef4444 !important;
  background: #ef4444 !important;
}

.chart-bar-segment.severity-medium {
  background-color: #f59e0b !important;
  background: #f59e0b !important;
}

.chart-bar-segment.severity-low {
  background-color: #10b981 !important;
  background: #10b981 !important;
}

/* Chart hover effects */
.chart-day:hover {
  opacity: 0.8;
}

.chart-bar-segment:hover {
  opacity: 0.9 !important;
  transform: scaleX(1.05);
}

.chart-bar-total {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--fg-0);
  margin-top: 0.25rem;
  min-height: 14px;
  text-align: center;
}

.chart-day-label {
  font-size: 0.625rem;
  color: var(--fg-3);
  text-align: center;
  white-space: nowrap;
  margin-top: 0.5rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

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

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-sm);
}

.legend-color.severity-critical {
  background: var(--critical-color);
}

.legend-color.severity-high {
  background: var(--red-500);
}

.legend-color.severity-medium {
  background: var(--amber-500);
}

.legend-color.severity-low {
  background: var(--green-500);
}

.legend-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-2);
}

/* Responsive for Chart */
@media (max-width: 768px) {
  .security-stats-chart {
    padding: 1.25rem;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .chart-periods {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .period-total {
    font-size: 2rem;
  }
  
  .daily-chart {
    height: 180px;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
  }
  
  .chart-day {
    max-width: 40px;
  }
  
  .chart-bar-wrapper {
    max-width: 24px;
  }
  
  .chart-day-label {
    font-size: 0.5rem;
  }
  
  .chart-legend {
    gap: 1rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .security-stats-chart {
    padding: 1rem;
  }
  
  .chart-tabs {
    width: 100%;
  }
  
  .chart-tab {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .period-total {
    font-size: 1.75rem;
  }
  
  .daily-chart {
    height: 160px;
    gap: 0.1rem;
  }
  
  .chart-day {
    max-width: 30px;
  }
  
  .chart-bar-wrapper {
    max-width: 18px;
  }
  
  .chart-bar-total {
    font-size: 0.55rem;
  }
  
  .chart-day-label {
    font-size: 0.45rem;
  }
  
  .chart-legend {
    gap: 0.75rem;
  }
  
  .legend-label {
    font-size: 0.625rem;
  }
}

/* ===== End Security Statistics Chart ===== */

/* ===== Trending Section ===== */
.trending-section {
  margin-bottom: 3rem;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.trending-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.trending-title {
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--fg-1);
}

.trending-title svg {
  color: var(--accent);
}

.trending-date {
  font-size: 0.875rem;
  color: var(--fg-3);
}

.trending-content {
  min-height: 200px;
}

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

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-1);
  transition: all 0.2s ease;
}

.trending-item:hover {
  border-color: var(--accent);
  background: var(--bg-2);
  transform: translateY(-2px);
}

.trending-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--bg-1);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

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

.trending-item-title {
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  color: var(--fg-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}

.severity-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.severity-badge.severity-critical {
  background: rgba(153, 27, 27, 0.2);
  color: var(--red-500);
}

.severity-badge.severity-high {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-400);
}

.severity-badge.severity-medium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-500);
}

.severity-badge.severity-low {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-500);
}

.severity-badge.severity-unknown {
  background: rgba(107, 114, 128, 0.2);
  color: var(--fg-3);
}

.vendor-badge {
  padding: 0.25rem 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.75rem;
}

.trending-date {
  color: var(--fg-3);
}

/* ===== Tag Statistics Section ===== */
.tag-stats-section {
  margin-bottom: 3rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.tag-period-tabs {
  display: flex;
  gap: 0.5rem;
}

.tag-content {
  min-height: 250px;
  padding: 2rem 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-1);
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tag-item:hover {
  border-color: var(--accent);
  background: var(--bg-2);
  color: var(--accent);
  transform: translateY(-2px);
}

.tag-count {
  background: var(--accent);
  color: var(--bg-1);
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== Vendor Statistics Chart ===== */
.vendor-stats-chart {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.vendor-content {
  position: relative;
}

.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.vendor-card {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.25s;
}

.vendor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-md);
  border-color: var(--red-500);
}

.vendor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.vendor-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg-0);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.vendor-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red-500);
  padding: 0.25rem 0.75rem;
  background: var(--bg-2);
  border-radius: var(--radius);
}

.vendor-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.vendor-severity-bar {
  position: relative;
  width: 100%;
  height: 32px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

.vendor-severity-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  transition: width 0.5s ease;
  position: relative;
  flex-shrink: 0;
  min-width: 2px;
}

.vendor-severity-fill.severity-critical {
  background: var(--critical-color);
}

.vendor-severity-fill.severity-high {
  background: var(--red-500);
}

.vendor-severity-fill.severity-medium {
  background: var(--amber-500);
}

.vendor-severity-fill.severity-low {
  background: var(--green-500);
}

[data-theme="dark"] .vendor-severity-fill.severity-critical {
  background: rgba(252, 165, 165, 0.8);
}

[data-theme="dark"] .vendor-severity-fill.severity-high {
  background: rgba(239, 68, 68, 0.8);
}

[data-theme="dark"] .vendor-severity-fill.severity-medium {
  background: rgba(251, 191, 36, 0.8);
}

[data-theme="dark"] .vendor-severity-fill.severity-low {
  background: rgba(52, 211, 153, 0.8);
}

.vendor-severity-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

/* Severity badges in breakdown */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.severity-badge strong {
  font-weight: 700;
  font-size: 0.875rem;
}

.severity-badge.badge-critical {
  background: rgba(220, 38, 38, 0.15);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.severity-badge.badge-high {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.severity-badge.badge-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.severity-badge.badge-low {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .severity-badge.badge-critical {
  background: rgba(252, 165, 165, 0.2);
  color: #FCA5A5;
  border-color: rgba(252, 165, 165, 0.4);
}

[data-theme="dark"] .severity-badge.badge-high {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .severity-badge.badge-medium {
  background: rgba(251, 191, 36, 0.2);
  color: #FBBF24;
  border-color: rgba(251, 191, 36, 0.4);
}

[data-theme="dark"] .severity-badge.badge-low {
  background: rgba(52, 211, 153, 0.2);
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.4);
}

/* Numbers inside bars */
.vendor-severity-fill {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--fg-2);
}

.no-data svg {
  margin-bottom: 1rem;
  color: var(--fg-3);
}

.no-data h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg-0);
  margin: 0 0 0.5rem 0;
}

.no-data p {
  font-size: 0.875rem;
  color: var(--fg-2);
  margin: 0;
  max-width: 400px;
}

/* Responsive for Vendor Chart */
@media (max-width: 768px) {
  .vendor-stats-chart {
    padding: 1.25rem;
  }
  
  .vendor-grid {
    grid-template-columns: 1fr;
  }
  
  .vendor-name {
    font-size: 0.9rem;
    max-width: 60%;
  }
  
  .vendor-total {
    font-size: 1.25rem;
  }
  
  .vendor-severity-bar {
    height: 28px;
  }
  
  .vendor-severity-label {
    font-size: 0.6875rem;
  }
  
  .severity-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }
  
  .severity-badge strong {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .vendor-stats-chart {
    padding: 1rem;
  }
  
  .vendor-card {
    padding: 1rem;
  }
  
  .vendor-severity-bar {
    height: 24px;
  }
  
  .vendor-severity-label {
    font-size: 0.625rem;
    padding: 0 0.5rem;
  }
  
  .severity-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
    gap: 0.25rem;
  }
  
  .severity-badge strong {
    font-size: 0.75rem;
  }
  
  .vendor-breakdown {
    gap: 0.375rem;
  }
}

/* ===== End Vendor Statistics Chart ===== */

/* ===== Chart Tooltip ===== */
.chart-tooltip {
  position: fixed;
  display: none;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 150px;
  pointer-events: none;
}

[data-theme="dark"] .chart-tooltip {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tooltip-date {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tooltip-total {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.tooltip-total strong {
  color: var(--text-primary);
  font-weight: 700;
}

.tooltip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0;
}

.tooltip-item strong {
  font-weight: 700;
  margin-left: 0.5rem;
}

.tooltip-item.tooltip-critical {
  color: #DC2626;
}

.tooltip-item.tooltip-high {
  color: #EF4444;
}

.tooltip-item.tooltip-medium {
  color: #D97706;
}

.tooltip-item.tooltip-low {
  color: #059669;
}

[data-theme="dark"] .tooltip-item.tooltip-critical {
  color: #FCA5A5;
}

[data-theme="dark"] .tooltip-item.tooltip-high {
  color: #F87171;
}

[data-theme="dark"] .tooltip-item.tooltip-medium {
  color: #FBBF24;
}

[data-theme="dark"] .tooltip-item.tooltip-low {
  color: #34D399;
}

/* ===== End Chart Tooltip ===== */



/* ===== Page Intro (non-front) ===== */
.page-intro {
  padding: 2rem 0 0.5rem;
}
.page-heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.page-subheading {
  font-size: 0.95rem;
  color: var(--fg-2);
  margin: 0;
}

/* ===== Main Content ===== */
.main-content {
  padding: 1.5rem 0 3rem;
}

/* ===== Featured Card ===== */
.featured-card {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.25s, border-color 0.25s;
  position: relative;
}
.featured-card:hover {
  box-shadow: 0 8px 32px var(--shadow-md);
  border-color: var(--red-500);
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-500), var(--amber-500));
}
.featured-card-link {
  display: block;
  padding: 1.75rem;
  color: inherit;
  text-decoration: none;
}
.featured-card-link:hover { color: inherit; }
.featured-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber-500);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  margin-bottom: 1rem;
}
.featured-card-badge svg { color: var(--amber-500); }
.featured-card-body { max-width: 100%; }
.featured-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.featured-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  color: var(--fg-0);
}
.featured-card-desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-2);
  margin-bottom: 1rem;
  max-width: 720px;
}
[data-theme="dark"] .featured-card-desc {
  color: var(--fg-0);
}
.featured-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.featured-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.featured-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--fg-3);
}
.featured-card-date svg { color: var(--fg-3); }
.featured-card-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red-500);
  transition: gap 0.2s;
}
.featured-card:hover .featured-card-readmore { gap: 0.5rem; }

/* ===== Grid Section Header ===== */
.grid-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}
.grid-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg-0);
}
.grid-section-title svg { color: var(--fg-3); }

/* ===== News Card Grid ===== */
.security-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ===== Security News Table ===== */
.security-news-table {
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.advisories-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: var(--bg-0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px var(--shadow);
  border: 1px solid var(--border);
}

.advisories-table thead {
  background: var(--bg-2);
}

.advisories-table th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--fg-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.advisories-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.advisories-table tbody tr {
  transition: background-color 0.2s ease;
}

.advisories-table tbody tr:hover {
  background: var(--bg-1);
  cursor: pointer;
}

.advisories-table tbody tr:hover .advisory-title-link {
  transform: translateX(2px);
}

.advisories-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table Columns */
.col-severity { width: 100px; }
.col-id { width: 120px; }
.col-title { width: auto; min-width: 250px; }
.col-vendor { width: 120px; }
.col-product { width: 140px; }
.col-date { width: 100px; }
.col-type { width: 70px; }

/* Severity Badge */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-critical {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.severity-high {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fed7aa;
}

.severity-medium {
  background: #fef3c7;
  color: #ca8a04;
  border: 1px solid #fde68a;
}

.severity-low {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.severity-unknown {
  background: var(--bg-3);
  color: var(--fg-3);
  border: 1px solid var(--border);
}

.cvss-score {
  font-size: 0.6875rem;
  opacity: 0.8;
}

/* Advisory ID */
.advisory-id {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  display: inline-block;
}

/* Advisory Title */
.advisory-title-link {
  color: inherit;
  text-decoration: none;
  display: block;
  cursor: pointer;
  transition: all 0.2s ease;
}

.advisory-title-link:hover {
  background: var(--bg-1);
  border-radius: 4px;
  padding: 0.25rem;
  margin: -0.25rem;
}

.advisory-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-1);
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.title-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advisory-title-link:hover .advisory-title {
  color: var(--accent);
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.advisory-desc {
  font-size: 0.8125rem;
  color: var(--fg-3);
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 2.8em;
}

.desc-text {
  display: inline;
}

.advisory-title-link:hover .advisory-desc {
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}

/* Product Version */
.product-version {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-3);
  margin-top: 0.25rem;
}

/* Advisory Date */
.advisory-date {
  font-size: 0.8125rem;
  color: var(--fg-2);
}

/* Advisory Type */
.advisory-type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--bg-3);
  color: var(--fg-2);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.type-cve {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.type-exploit {
  background: #fefce8;
  color: #ca8a04;
  border-color: #fef3c7;
}

.type-news {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.news-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  overflow: hidden;
  list-style: none;
  position: relative;
}
.news-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red-500), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.news-card:hover {
  box-shadow: 0 6px 24px var(--shadow-md);
  border-color: var(--red-500);
  transform: translateY(-2px);
}
.news-card:hover::after { opacity: 1; }

.news-card-link {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.news-card-link:hover { color: inherit; }

/* Card Top Row */
.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.news-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  color: #fff;
}
.tag-cve { background: var(--red-500); }
.tag-exploit { background: var(--orange-500); }
.tag-vulnerability { background: transparent; color: var(--fg-1);; }
[data-theme="dark"] .tag-vulnerability { color: #ffffff; border-color: var(--fg-3); }

.news-cvss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: #fff;
}
.cvss-critical { background: #991b1b; }
[data-theme="dark"] .cvss-critical { background: #dc2626; }
.cvss-high { background: var(--red-500); }
.cvss-medium { background: var(--amber-500); color: #111; }
[data-theme="dark"] .cvss-medium { color: #fff; }
.cvss-low { background: var(--green-500); }

/* Card Title */
.news-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--fg-0);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Card Description */
.news-card-desc {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fg-1);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  flex: 1;
}
[data-theme="dark"] .news-card-desc {
  color: var(--fg-0);
}

/* Card Meta */
.news-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.meta-item {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--fg-2);
  background: var(--bg-2);
  border-radius: var(--radius-sm);
}
.meta-item.meta-version {
  font-family: 'Monaco','Menlo',monospace;
  color: var(--red-500);
  background: transparent;
  border: 1px solid var(--border);
}
.meta-id { font-family: 'Monaco','Menlo',monospace; font-size: 0.65rem; }

/* Card Footer */
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.news-card-date {
  font-size: 0.75rem;
  color: var(--fg-3);
}
.news-card-source {
  font-size: 0.75rem;
  color: var(--fg-3);
  text-transform: capitalize;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}
.pagination-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pagination-links a,
.pagination-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--fg-1);
  background: var(--bg-0);
  transition: all 0.15s;
  text-decoration: none;
}
.pagination-links a:hover {
  background: var(--red-500);
  color: #fff;
  border-color: var(--red-500);
}
.pagination-links .current {
  background: var(--red-500);
  color: #fff;
  border-color: var(--red-500);
}

/* ===== No Posts ===== */
.no-posts {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--fg-2);
}
.no-posts-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg-3);
}
.no-posts h2 { margin-bottom: 0.5rem; }

/* ===== RedGem Banner ===== */
.redgem-banner {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 1.5rem;
}
.banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(220,38,38,0.05));
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: var(--radius-lg);
  color: var(--red-500);
  flex-shrink: 0;
}
.banner-text {
  flex: 1;
  min-width: 0;
}
.banner-text h3 {
  font-size: 1.125rem;
  margin-bottom: 0.35rem;
}
.banner-text p {
  font-size: 0.875rem;
  color: var(--fg-2);
  margin: 0;
  max-width: 560px;
}
.banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.btn-primary {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  background: var(--red-500);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--red-700);
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  background: transparent;
  color: var(--fg-1);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
}
.btn-secondary:hover {
  border-color: var(--red-500);
  color: var(--red-500);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 0;
  margin-top: 2rem;
  position: relative;
}
.footer-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--red-500), var(--red-700) 40%, var(--amber-500) 100%);
}

.footer-top {
  display: flex;
  gap: 3rem;
  padding: 2.5rem 0 2rem;
}

.footer-brand {
  flex: 0 0 280px;
  min-width: 0;
}
.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.footer-brand-title h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.footer-tagline {
  font-size: 0.8125rem;
  color: var(--fg-2);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.4rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-2);
  transition: all 0.15s;
}
.footer-social a:hover {
  background: var(--red-500);
  border-color: var(--red-500);
  color: #fff;
}

.footer-links-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  min-width: 0;
}

.footer-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  color: var(--fg-0);
}
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.35rem; }
.footer-section ul li a {
  font-size: 0.8125rem;
  color: var(--fg-2);
  transition: color 0.15s;
}
.footer-section ul li a:hover { color: var(--red-500); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-info p {
  font-size: 0.75rem;
  color: var(--fg-3);
  margin-bottom: 0.15rem;
}
.footer-info a {
  color: var(--fg-2);
}
.footer-info a:hover {
  color: var(--red-500);
}
.footer-badges {
  display: flex;
  gap: 0.5rem;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--fg-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.footer-badge svg { color: var(--green-500); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 1.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--fg-3);
  margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--fg-2); font-weight: 500; }
.breadcrumb a:hover { color: var(--red-500); }
.breadcrumb-sep { color: var(--fg-3); user-select: none; }
.breadcrumb-current { color: var(--fg-1); font-weight: 500; }

/* ===== Single Post ===== */
.single-post { max-width: 860px; margin: 0 auto; word-break: break-word; }

.entry-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.entry-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.entry-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  color: #fff;
}
.entry-type-badge.type-cve { background: var(--red-500); }
.entry-type-badge.type-exploit { background: var(--orange-500); }
.entry-type-badge.type-vulnerability { background: transparent; color: var(--fg-1); border: 1px solid var(--border); }
[data-theme="dark"] .entry-type-badge.type-vulnerability { color: #ffffff; border-color: var(--fg-3); }

.entry-cvss-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 999px;
  color: #fff;
}
.entry-cvss-badge.cvss-critical { background: #991b1b; }
[data-theme="dark"] .entry-cvss-badge.cvss-critical { background: #dc2626; }
.entry-cvss-badge.cvss-high { background: var(--red-500); }
.entry-cvss-badge.cvss-medium { background: var(--amber-500); }
.entry-cvss-badge.cvss-low { background: var(--green-500); }

.entry-title {
  font-size: 1.85rem;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--fg-2);
  font-size: 0.8125rem;
}
.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.entry-meta svg { color: var(--fg-3); flex-shrink: 0; }

.entry-content { margin-bottom: 2.5rem; }
[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry-content p {
  color: #ffffff;
}

/* Entry Footer */
.entry-footer {
  border-top: 2px solid var(--border);
  padding-top: 2rem;
  margin-top: 3rem;
}
.entry-tags {
  margin-bottom: 1.5rem;
}
.tags-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 0.6rem;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-list a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-1);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.15s;
}
.tag-list a:hover {
  background: var(--red-500);
  color: #fff;
  border-color: var(--red-500);
}

/* Post Navigation */
.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-top: 0.75rem;
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.35rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--fg-1);
  transition: all 0.2s;
}
.post-nav-link:hover {
  border-color: var(--red-500);
  color: var(--fg-0);
  box-shadow: 0 4px 16px var(--shadow-md);
  transform: translateY(-2px);
}
.post-nav-next { text-align: right; }
.post-nav-dir {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red-500);
}
.post-nav-title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--fg-1);
}
.post-nav-link:hover .post-nav-title { color: var(--fg-0); }

/* RedGem CTA Card */
.redgem-cta-card {
  margin-top: 3rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}
.redgem-cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-500), var(--amber-500));
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 1.75rem 2rem;
  flex-wrap: wrap;
}
.cta-text h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.cta-text p { font-size: 0.875rem; color: var(--fg-2); margin: 0; max-width: 500px; line-height: 1.6; }
.cta-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ===== Security Detail (single post JSON card) ===== */
.security-detail { margin-bottom: 2.5rem; }

/* CVSS Hero */
.cvss-hero {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}
.cvss-hero--critical { background: transparent; border-color: rgba(153,27,27,0.35); }
.cvss-hero--high     { background: transparent; border-color: rgba(220,38,38,0.35); }
.cvss-hero--medium   { background: transparent; border-color: rgba(245,158,11,0.35); }
.cvss-hero--low      { background: transparent; border-color: rgba(16,185,129,0.35); }

[data-theme="dark"] .cvss-hero--critical { background: transparent; border-color: rgba(239,68,68,0.4); }
[data-theme="dark"] .cvss-hero--high     { background: transparent; border-color: rgba(239,68,68,0.35); }
[data-theme="dark"] .cvss-hero--medium   { background: transparent; border-color: rgba(251,191,36,0.35); }
[data-theme="dark"] .cvss-hero--low      { background: transparent; border-color: rgba(52,211,153,0.35); }

.cvss-hero-score {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  flex-shrink: 0;
}
.cvss-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.cvss-hero--critical .cvss-number { color: var(--critical-color); }
.cvss-hero--high .cvss-number     { color: var(--red-500); }
.cvss-hero--medium .cvss-number   { color: var(--amber-500); }
.cvss-hero--low .cvss-number      { color: var(--green-500); }
.cvss-max { font-size: 0.875rem; color: var(--fg-3); font-weight: 500; }

.cvss-hero-info { flex: 1; min-width: 0; }
.cvss-severity-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  color: var(--fg-0);
}
.cvss-vector-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.cvss-vector-row code {
  font-family: 'Monaco','Menlo',monospace;
  font-size: 0.6875rem;
  color: var(--fg-2);
  background: transparent;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  word-break: break-all;
  line-height: 1.5;
  border: 1px solid var(--border);
}
[data-theme="dark"] .cvss-vector-row code {
  color: #ffffff;
}

/* Copy Button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-1);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
[data-theme="dark"] .copy-btn {
  color: #ffffff;
}
.copy-btn:hover { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.copy-btn--small { padding: 0.25rem 0.45rem; border-radius: var(--radius-sm); }
.copy-btn--small svg { width: 14px; height: 14px; }

/* Detail Block */
.detail-block {
  margin-bottom: 2rem;
}
.detail-block-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  color: var(--fg-0);
  border-bottom: 2px solid var(--border);
}
.detail-block-title svg { color: var(--red-500); flex-shrink: 0; }
.detail-block-body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--fg-1);
  padding: 0.25rem 0;
}
[data-theme="dark"] .detail-block-body {
  color: #ffffff;
}
.detail-block--ai {
  background: transparent;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan-500);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.detail-block--ai .detail-block-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.5rem;
}
.detail-block--ai .detail-block-body {
  padding: 0;
}
.description-text {
  word-break: break-word;
}
[data-theme="dark"] .description-text {
  color: #ffffff;
}
.description-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0.75rem 0;
  border: 1px solid var(--border);
}

/* Direct Link */
.direct-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--red-500);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}
.direct-link-btn:hover {
  background: var(--red-600);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

/* Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2rem;
}
.detail-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.detail-card:hover {
  box-shadow: 0 4px 16px var(--shadow-md);
  border-color: var(--fg-3);
}
.detail-card--ai { border-left: 3px solid var(--cyan-500); }
.detail-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red-500);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.detail-card-title svg { color: var(--red-500); flex-shrink: 0; opacity: 0.7; }
.detail-card--ai .detail-card-title { color: var(--cyan-500); }
.detail-card--ai .detail-card-title svg { color: var(--cyan-500); }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  font-size: 0.8125rem;
  gap: 1rem;
}
.info-row:first-of-type { padding-top: 0; }
.info-row:last-of-type { padding-bottom: 0; }
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-label { color: var(--fg-3); font-weight: 500; flex-shrink: 0; min-width: 70px; }
.info-value { color: var(--fg-0); text-align: right; word-break: break-word; font-weight: 500; }
.info-value.mono { font-family: 'Monaco','Menlo',monospace; font-size: 0.8125rem; color: var(--red-500); background: transparent; padding: 0.15rem 0.5rem; border-radius: var(--radius-sm); }

.info-row--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.info-value--list {
  text-align: left;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--fg-1);
  background: transparent;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  width: 100%;
}
[data-theme="dark"] .info-value,
[data-theme="dark"] .info-value--list {
  color: #ffffff;
}
[data-theme="dark"] .ref-link {
  color: #ffffff;
}
[data-theme="dark"] .post-nav-title {
  color: #ffffff;
}

/* CWE Chips */
.cwe-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.35rem; }
.cwe-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: var(--red-500);
  border-radius: 999px;
  transition: all 0.2s;
}
.cwe-chip:hover { background: var(--red-600); color: #fff; transform: translateY(-1px); }

/* References */
.reference-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ref-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--fg-1);
  font-size: 0.8125rem;
  transition: all 0.2s;
  overflow: hidden;
}
.ref-link:hover {
  border-color: var(--red-500);
  color: var(--red-500);
  background: transparent;
  transform: translateX(3px);
}
.ref-link svg { color: var(--fg-3); flex-shrink: 0; transition: color 0.15s; }
.ref-link:hover svg { color: var(--red-500); }
.ref-host { font-weight: 600; flex-shrink: 0; }
.ref-path { color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* JSON Drawer */
.json-drawer {
  border-top: 2px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}
.json-drawer-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-0);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.json-drawer-toggle:hover { background: transparent; border-color: var(--red-500); }
.json-drawer-toggle svg { color: var(--fg-3); flex-shrink: 0; }
.json-drawer-toggle .drawer-title { flex: 1; }
.json-drawer-toggle .drawer-arrow { transition: transform 0.2s; }
.json-drawer-toggle[aria-expanded="true"] .drawer-arrow { transform: rotate(180deg); }

.json-drawer-content {
  margin-top: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: transparent;
  overflow: hidden;
}
.json-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.json-content {
  background: transparent;
  padding: 1.25rem;
  margin: 0;
  font-family: 'Monaco','Menlo',monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--fg-1);
  white-space: pre;
  tab-size: 2;
}
[data-theme="dark"] .json-content {
  color: #ffffff;
}

/* JSON Syntax Highlighting */
.json-key { color: var(--red-500); font-weight: 600; }
.json-string { color: var(--green-500); }
.json-number { color: var(--amber-500); font-weight: 600; }
.json-boolean { color: var(--cyan-500); font-weight: 600; }
.json-null { color: var(--fg-3); font-style: italic; }

/* ===== Comments ===== */
.comments-area {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-1);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.comments-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--red-500);
}
.comments-title { font-size: 1.125rem; margin-bottom: 0; }
.comments-count { font-size: 0.875rem; color: var(--fg-2); font-weight: 400; }
.comment-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-0);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.comment-item:hover { box-shadow: 0 2px 8px var(--shadow); }
.comment-avatar img { border-radius: 50%; border: 2px solid var(--red-500); }
.comment-content { flex: 1; min-width: 0; }
.comment-meta { margin-bottom: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.comment-author { font-weight: 600; color: var(--red-500); }
.comment-date { font-size: 0.75rem; color: var(--fg-2); }
.comment-awaiting-moderation { font-size: 0.75rem; color: var(--amber-500); font-style: italic; }
.comment-text { margin-bottom: 0.5rem; line-height: 1.6; color: var(--fg-0); }
.comment-actions { display: flex; gap: 0.75rem; }
.reply-link a, .edit-link a {
  font-size: 0.75rem;
  color: var(--red-500);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  transition: all 0.15s;
}
.reply-link a:hover, .edit-link a:hover { background: var(--red-500); color: #fff; }
.security-comment-form { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.comment-reply-title { font-size: 1.125rem; margin-bottom: 1rem; }
.comment-notes {
  background: var(--bg-2);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border-left: 3px solid var(--cyan-500);
}
.comment-notes p { margin-bottom: 0.4rem; font-size: 0.8125rem; color: var(--fg-2); }
.comment-notes p:last-child { margin-bottom: 0; }
.required { color: var(--red-500); font-weight: 600; }
.comment-form-author, .comment-form-email, .comment-form-url { margin-bottom: 0.75rem; }
.comment-form-author label, .comment-form-email label, .comment-form-url label, .comment-form-comment label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--fg-0);
}
.comment-form-author input, .comment-form-email input, .comment-form-url input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--fg-0);
  font-size: 0.875rem;
  transition: border-color 0.15s;
}
.comment-form-author input:focus, .comment-form-email input:focus, .comment-form-url input:focus {
  outline: none;
  border-color: var(--red-500);
}
.comment-form-comment textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font);
  resize: vertical;
  min-height: 100px;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}
.comment-form-comment textarea:focus { outline: none; border-color: var(--red-500); }
.submit-comment-btn {
  background: var(--red-500);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.875rem;
}
.submit-comment-btn:hover { background: var(--red-700); transform: translateY(-1px); }
.comments-closed { text-align: center; padding: 1.5rem; background: var(--bg-2); border-radius: var(--radius); }
.comments-closed p { margin: 0; color: var(--fg-2); font-style: italic; }
.comment-navigation { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.nav-previous a, .nav-next a { color: var(--red-500); font-weight: 500; }
.comment-item .comment-item { margin-left: 1.5rem; margin-top: 0.75rem; border-left: 2px solid var(--red-500); }

/* ===== Responsive — Tablet (≤ 1024px) ===== */
@media (max-width: 1024px) {
  .security-news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  /* Table responsive adjustments */
  .col-vendor,
  .col-product {
    display: none;
  }
  
  .col-title {
    min-width: 200px;
  }
  
  .col-id {
    width: 100px;
  }
  
  .advisory-id {
    font-size: 0.6875rem;
    max-width: 80px;
  }
  
  .advisory-title {
    font-size: 0.8125rem;
    max-width: 200px;
  }
  
  .advisory-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 1;
    max-height: 1.5em;
  }
}

/* ===== Responsive — Mobile (≤ 768px) ===== */
@media (max-width: 768px) {
  body { font-size: 14px; }

  .container { padding: 0 0.75rem; }

  /* Header */
  .header-container { height: 52px; gap: 0.35rem; }
  .header-divider { display: none; }
  .search-trigger { display: none !important; }

  /* Ticker */
  .ticker-inner { gap: 0.65rem; }
  .ticker-stats { font-size: 0.75rem; gap: 0.5rem; }

  /* Page hero */
  .page-hero { padding: 1.5rem 0 1rem; gap: 1rem; }
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle { font-size: 0.875rem; }
  .hero-quick-stats { gap: 0.75rem; padding: 0.75rem 1rem; flex-wrap: wrap; }
  .quick-stat-value { font-size: 1.05rem; }
  .quick-stat-label { font-size: 0.6875rem; }

  /* Featured card */
  .featured-card-link { padding: 1.25rem; }
  .featured-card-title { font-size: 1.15rem; }
  .featured-card-desc { font-size: 0.8125rem; }
  .featured-card-badge { margin-bottom: 0.75rem; }

  /* Page intro */
  .page-intro { padding: 1.25rem 0 0.25rem; }
  .page-heading { font-size: 1.3rem; }
  .page-subheading { font-size: 0.8rem; }

  /* News grid */
  .main-content { padding: 1rem 0 2rem; }
  .security-news-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  
  /* Table mobile adjustments */
  .advisories-table {
    font-size: 0.8125rem;
  }
  
  .advisories-table th,
  .advisories-table td {
    padding: 0.75rem 0.4rem;
  }
  
  .col-type {
    display: none;
  }
  
  .col-severity {
    width: 80px;
  }
  
  .col-id {
    width: 80px;
  }
  
  .col-date {
    width: 80px;
  }
  
  .col-title {
    min-width: 150px;
  }
  
  .advisory-title {
    font-size: 0.75rem;
    max-width: 150px;
  }
  
  .advisory-desc {
    font-size: 0.6875rem;
    -webkit-line-clamp: 1;
    max-height: 1.3em;
  }
  
  .advisory-id {
    font-size: 0.625rem;
    max-width: 60px;
  }
  
  .severity-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.625rem;
  }
  .news-card-link { padding: 0.9rem; }
  .news-card-title { font-size: 0.875rem; -webkit-line-clamp: 3; }
  .news-card-desc { font-size: 0.8rem; -webkit-line-clamp: 2; }
  .news-card-top { margin-bottom: 0.5rem; }
  .news-card-footer { padding-top: 0.5rem; }
  .news-card-meta { gap: 0.25rem; }
  .meta-item { font-size: 0.625rem; padding: 0.1rem 0.3rem; }

  /* Grid section header */
  .grid-section-header { margin-bottom: 0.75rem; padding-bottom: 0.5rem; }
  .grid-section-title { font-size: 0.95rem; }

  /* Banner */
  .redgem-banner { padding: 1.25rem; margin-top: 0.75rem; border-radius: var(--radius-lg); }
  .banner-content { flex-direction: column; text-align: center; gap: 1rem; }
  .banner-icon { display: none; }
  .banner-text h3 { font-size: 1rem; }
  .banner-text p { font-size: 0.8rem; }
  .banner-actions { justify-content: center; width: 100%; }
  .banner-actions .btn-primary,
  .banner-actions .btn-secondary {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.75rem;
  }

  /* Pagination */
  .pagination { margin: 1.25rem 0; }
  .pagination-links { flex-wrap: wrap; justify-content: center; gap: 0.2rem; }
  .pagination-links a,
  .pagination-links span { min-width: 32px; height: 32px; font-size: 0.75rem; }

  /* Single post */
  .single-post { padding: 0 0.15rem; }
  .entry-header { margin-bottom: 1.5rem; padding-bottom: 1.25rem; }
  .entry-title { font-size: 1.25rem; }
  .entry-badges { margin-bottom: 0.75rem; }
  .entry-meta { font-size: 0.75rem; gap: 0.5rem; }
  .entry-content { margin-bottom: 1.5rem; }

  /* Security detail cards */
  .cvss-hero { flex-direction: column; text-align: center; gap: 1rem; padding: 1.25rem; border-radius: var(--radius-lg); }
  .cvss-number { font-size: 2rem; }
  .cvss-vector-row { flex-direction: column; align-items: stretch; }
  .detail-block { margin-bottom: 1.5rem; }
  .detail-block-title { font-size: 1rem; }
  .detail-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .detail-card { padding: 1.1rem 1.15rem; }
  .info-row { font-size: 0.8rem; padding: 0.5rem 0; }
  .post-nav-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; padding: 1.25rem; }
  .cta-actions { justify-content: center; }

  /* JSON drawer */
  .json-drawer { margin-top: 1.75rem; }
  .json-drawer-toggle { padding: 0.75rem 1rem; font-size: 0.8125rem; }
  .json-content { font-size: 0.65rem; padding: 0.85rem; }

  /* Comments */
  .comments-area { padding: 0.85rem; border-radius: var(--radius); }
  .comments-title { font-size: 1rem; }
  .comment-item { flex-direction: column; gap: 0.5rem; padding: 0.6rem; }
  .comment-avatar img { width: 36px !important; height: 36px !important; }
  .comment-meta { font-size: 0.7rem; }
  .comment-text { font-size: 0.8125rem; }
  .comment-item .comment-item { margin-left: 0.5rem; }
  .comment-form-comment textarea { min-height: 80px; font-size: 0.8125rem; }
  .comment-reply-title { font-size: 1rem; }
  .comment-notes { padding: 0.6rem; }
  .comment-notes p { font-size: 0.75rem; }

  /* Footer */
  .site-footer { margin-top: 1.25rem; }
  .footer-top { flex-direction: column; gap: 1.5rem; padding: 1.5rem 0; }
  .footer-brand { flex: none; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-section h4 { font-size: 0.6875rem; margin-bottom: 0.5rem; }
  .footer-section ul li a { font-size: 0.75rem; }
  .footer-bottom { gap: 0.5rem; padding: 1rem 0; }
  .footer-info p { font-size: 0.7rem; }
  .footer-badges { flex-wrap: wrap; }

  .entry-footer { padding-top: 1.25rem; margin-top: 2rem; }
}

/* ===== Responsive — Small phones (≤ 480px) ===== */
@media (max-width: 480px) {
  .container { padding: 0 0.6rem; }
  .page-heading { font-size: 1.15rem; }

  .hero-title { font-size: 1.3rem; }
  .hero-quick-stats { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .quick-stat-divider { width: 100%; height: 1px; }
  .quick-stat { flex-direction: row; gap: 0.5rem; align-items: center; }

  .featured-card-link { padding: 1rem; }
  .featured-card-title { font-size: 1.05rem; }

  .security-news-grid { gap: 0.5rem; }
  
  /* Table small mobile adjustments */
  .col-date,
  .col-id {
    display: none;
  }
  
  .advisories-table th,
  .advisories-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .col-severity {
    width: 70px;
  }
  
  .col-title {
    min-width: 120px;
  }
  
  .severity-badge {
    padding: 0.125rem 0.25rem;
    font-size: 0.625rem;
  }
  
  .advisory-title {
    font-size: 0.6875rem;
    max-width: 120px;
  }
  
  .advisory-desc {
    display: none; /* Hide description on small screens */
  }
}

/* Extra small mobile - card-like layout */
@media (max-width: 360px) {
  .advisories-table {
    min-width: 320px;
  }
  
  .col-severity {
    width: 60px;
  }
  
  .severity-badge {
    padding: 0.1rem 0.2rem;
    font-size: 0.5rem;
  }
  
  .advisory-title {
    font-size: 0.625rem;
    line-height: 1.2;
    max-width: 100px;
  }
  
  .advisory-desc {
    display: none;
  }
  
  .col-title {
    min-width: 100px;
  }
  .news-card-link { padding: 0.75rem; }

  .footer-links-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .banner-actions { flex-direction: column; }
  .banner-actions .btn-primary, .banner-actions .btn-secondary { width: 100%; }
  .entry-title { font-size: 1.1rem; }
  .entry-meta { flex-direction: column; gap: 0.3rem; }
  .cvss-hero { padding: 1rem; }
  .detail-card { padding: 1rem; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn-primary, .cta-actions .btn-secondary { width: 100%; text-align: center; }
}

/* ===== Notification Toast ===== */
.notification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
}
.notification.show { opacity: 1; transform: translateY(0); }
.notification-success { background: var(--green-500); }
.notification-error { background: var(--red-500); }
.notification-info { background: var(--cyan-500); }

@media (max-width: 768px) {
  .notification { left: 0.75rem; right: 0.75rem; bottom: 1rem; text-align: center; }
}

/* ===== Loading ===== */
.loading { display: flex; justify-content: center; padding: 2rem; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--red-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Utilities ===== */
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
}

/* WordPress admin bar support */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .header { top: 0; }
}
