/**
 * DEFCON Level, Alert Cards & Pages
 * Alert press cards, DEFCON Watch section, shop page, alerts page layout, priority badges, filter links, and support grid.
 *
 * Part of the Defcon site CSS (builds on engine base theme).
 * Load order managed by config/site.php → site_css array.
 */

/* ================================================================
   ALERT CARDS - Professional Square Cards
   ================================================================ */
.alert-press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
/* Ad anchors inside alert grids must span full width, not take a grid cell */
.alert-press-grid > .mv-ad-target,
.alert-press-grid > div[data-google-query-id],
.alert-press-grid > div[id^="av-"],
.alert-press-grid > .adthrive-ad {
  grid-column: 1 / -1;
}

.alert-press-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  position: relative;
}

.alert-press-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(14, 165, 233, 0.06);
}

.alert-press-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-bottom: 2px solid var(--border-medium);
}

.alert-press-label {
  font-size: var(--text-xs);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.alert-press-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: -apple-system, 'SF Mono', monospace;
  line-height: 1.2;
  margin-left: auto;
}

.alert-press-time span {
  display: block;
}

.alert-press-body {
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
  position: relative;
  align-items: center;
}

.alert-press-logo {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-3);
  margin: 0.5rem auto;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  align-self: center;
}

.alert-press-logo:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
}

.alert-press-logo-img {
  max-width: 145px;
  max-height: 145px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  /* Cross-browser image rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  display: block;
  border-radius: 8px;
  margin: 0;
  box-sizing: border-box;
}

.alert-press-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-2);
  text-align: left;
  width: 100%;
}

.alert-press-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1.4;
  margin: 0 0 var(--space-2) 0;
}

.alert-press-title a,
.alert-press-title a:link,
.alert-press-title a:visited,
.alert-press-title a:hover,
.alert-press-title a:focus,
.alert-press-title a:active {
  color: inherit;
  text-decoration: none;
  border: none;
  border-bottom: none;
  transition: color 0.2s;
  display: block;
}

.alert-press-title a:hover,
.alert-press-title a:focus {
  color: var(--text-primary);
}

.alert-press-summary {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.alert-press-button,
.prose .alert-press-button,
.content-block .alert-press-button {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  background: var(--accent-primary);
  /* Hardcoded dark color, .prose a sets color to accent cyan, making text invisible on cyan bg */
  color: #0a0a0f;
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: none;
  transition: all 0.2s ease;
  margin-top: auto;
  text-align: center;
}

.alert-press-button:visited,
.prose .alert-press-button:visited {
  color: #0a0a0f;
}

.alert-press-button:hover,
.prose .alert-press-button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0a0a0f;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.alert-press-button:active {
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}

/* Mobile adjustments for alert cards */
@media (max-width: 768px) {
  .alert-press-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
  }

  .alert-press-card {
    min-height: 360px;
    border-radius: 12px;
  }

  .alert-press-body {
    padding: var(--space-4);
  }

  .alert-press-logo {
    width: 95px;
    height: 95px;
  }

  .alert-press-logo-img {
    max-width: 90px;
    max-height: 90px;
  }

  .alert-press-title {
    font-size: var(--text-base);
    -webkit-line-clamp: 2;
  }

  .alert-press-summary {
    font-size: var(--text-xs);
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 480px) {
  .alert-press-grid {
    grid-template-columns: 1fr;
  }

  .alert-press-card {
    min-height: 320px;
  }
}

/* ================================================================
   DEFCON WATCH SECTION
   ================================================================ */
.defcon-watch {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 2px solid var(--priority-high);
}

.defcon-watch h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
  color: var(--priority-high);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.watch-intro {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  font-size: var(--text-lg);
  line-height: 1.7;
  max-width: 800px;
  /* Component width - not main site width */
}

.watch-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  border-left: 5px solid var(--accent-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

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

.watch-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}

.watch-card ul,
.watch-card ol {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
  line-height: 1.9;
  color: var(--text-secondary);
}

.watch-card li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-2);
  color: var(--text-secondary);
}

.watch-card li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.watch-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.watch-card .btn {
  display: block;
  text-align: center;
}

.watch-card-high {
  border-left-color: var(--priority-critical);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), var(--bg-tertiary));
}

.watch-card-high h3 {
  color: var(--priority-critical);
}

.watch-card-global {
  border-left-color: var(--priority-elevated);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-tertiary));
}

.watch-card-global h3 {
  color: var(--priority-elevated);
}

.watch-card-missile {
  border-left-color: var(--priority-high);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--bg-tertiary));
}

.watch-card-missile h3 {
  color: var(--priority-high);
}

/* BEM-style aliases for watch-card modifiers (used on current-level page) */
.watch-card--domestic {
  border-left-color: var(--priority-critical);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), var(--bg-tertiary));
}

.watch-card--domestic h3 {
  color: var(--priority-critical);
}

.watch-card--global {
  border-left-color: var(--priority-elevated);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-tertiary));
}

.watch-card--global h3 {
  color: var(--priority-elevated);
}

.watch-card--missile {
  border-left-color: var(--priority-high);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--bg-tertiary));
}

.watch-card--missile h3 {
  color: var(--priority-high);
}

.watch-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.watch-card__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.watch-card__tag--high {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
}
.watch-card__tag--elevated {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.watch-card__tag--warning {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.watch-card__updated {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

.missile-list {
  counter-reset: missile-counter;
  list-style: none;
  margin: var(--space-6) 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.missile-list li {
  counter-increment: missile-counter;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  margin-bottom: 0;
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
}

.missile-list li:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateX(4px);
}

.missile-list li::before {
  content: counter(missile-counter);
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, var(--priority-high), #dc2626);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.missile-list-link {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-color: rgba(14, 165, 233, 0.5);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  flex: 1;
  display: block;
  cursor: pointer;
}

.missile-list-link:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-primary);
  text-decoration-thickness: 2px;
}

.watch-note {
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* Shop Links Section */
.shop-links-section {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border-radius: 8px;
  text-align: center;
}

.shop-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  font-size: var(--text-sm);
}

.shop-links a {
  color: var(--accent-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  transition: color var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.shop-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Hide raw pipe separators and add styled ones via CSS */
.shop-links {
  line-height: 2;
}

@media (max-width: 768px) {
  .shop-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
  }

  .shop-links a {
    padding: var(--space-2);
    font-size: var(--text-xs);
  }
}

/* ================================================================
   SHOP PAGE
   ================================================================ */
.shop-section {
  margin-bottom: var(--space-8);
}

.shop-section h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
  color: var(--text-primary);
}

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

.shop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.shop-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(14, 165, 233, 0.06);
}

.shop-card--highlight {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, var(--bg-card) 100%);
}

.shop-card--highlight:hover {
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15);
}

.shop-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
  display: block;
  line-height: 1;
}

.shop-card h3 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-2) 0;
  color: var(--accent-primary);
}

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

.shop-quick-links {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
  padding: var(--space-5);
  background: var(--bg-tertiary);
  border-radius: 8px;
  text-align: center;
}

.shop-quick-links h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.quick-links-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  font-size: var(--text-sm);
}

.quick-links-bar a {
  color: var(--accent-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  transition: color 0.2s;
  white-space: nowrap;
}

.quick-links-bar a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.link-sep {
  color: var(--text-muted);
  opacity: 0.4;
  padding: 0 var(--space-1);
  user-select: none;
}

.affiliate-notice {
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: 8px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.affiliate-notice p {
  margin: 0;
}

.support-section {
  margin-top: var(--space-8);
  padding: var(--space-8) var(--space-6);
  background: var(--bg-tertiary);
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.support-section h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.support-section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-4);
  }

  .shop-card {
    padding: var(--space-4);
  }

  .shop-icon {
    font-size: 1.5rem;
  }

  .quick-links-bar {
    gap: 0;
  }

  .quick-links-bar a {
    padding: var(--space-2);
    font-size: var(--text-xs);
  }
}

/* System Announcement */
.system-announcement {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), var(--bg-tertiary));
  border: 1px solid var(--accent-primary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 8px;
}

.system-announcement p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: var(--text-sm);
}

.system-announcement strong {
  color: var(--accent-primary);
}

.system-announcement a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.system-announcement a:hover {
  color: var(--accent-hover);
}

.current-commands {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.command-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
  align-items: start;
  max-width: 100%;
}

/* Optimize grid for 11 commands - 3 columns on desktop, 2 on tablet, 1 on mobile */
@media (min-width: 1024px) {
  .command-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .missile-list li {
    padding: var(--space-6) var(--space-8);
    min-height: 64px;
    font-size: var(--text-xl);
    gap: var(--space-6);
  }

  .missile-list li::before {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: var(--text-lg);
  }
}

@media (min-width: 1400px) {
  .command-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Ensure proper grid on smaller screens */
@media (max-width: 640px) {
  .command-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

.command-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), border-color var(--transition);
  min-height: 200px;
  justify-content: flex-start;
  text-align: center;
  position: relative;
  min-width: 0;
  /* Allow grid items to shrink below content size */
}

.command-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  background: rgba(14, 165, 233, 0.06);
}

.command-card-logo {
  max-width: 100px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto var(--space-3) auto;
  /* Cross-browser image rendering - explicit pixel values prevent browser differences */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease;
  /* Prevent distortion */
  backface-visibility: hidden;
  transform: translateZ(0);
  flex-shrink: 0;
  /* Force consistent sizing across all browsers */
  box-sizing: border-box;
}

.command-card:hover .command-card-logo {
  transform: scale(1.05) translateZ(0);
}

.command-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-weight: 800;
  font-size: var(--text-base);
  margin-top: auto;
  flex-shrink: 0;
}

/* Level indicator badge, shown on command cards without level-specific alert images */
.level-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  margin: var(--space-2) auto;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.level-indicator--1 { background: #dc2626; color: #fff; border-color: #dc2626; }
.level-indicator--2 { background: #ef4444; color: #fff; border-color: #ef4444; }
.level-indicator--3 { background: #eab308; color: #000; border-color: #eab308; }
.level-indicator--4 { background: #22c55e; color: #fff; border-color: #22c55e; }
.level-indicator--5 { background: #3b82f6; color: #fff; border-color: #3b82f6; }

.command-meta {
  text-align: center;
  width: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  /* Prevent flexbox overflow issues */
}

.command-meta h3 {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.command-meta p {
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.current-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.link-list li a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.link-list li a:hover {
  color: var(--accent-primary);
  padding-left: var(--space-2);
}

@media (max-width: 800px) {
  .current-hero {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ================================================================
   ALERTS PAGE - Clean, Readable Layout
   ================================================================ */
.alert-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: var(--space-6);
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.alert-card {
  display: flex;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  gap: 0;
  min-height: 200px;
}

.alert-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(14, 165, 233, 0.06);
}

/* Alert card used as a direct link (e.g., homepage compact cards without badge image) */
a.alert-card {
  flex-direction: column;
  padding: var(--space-6);
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 200px;
}

.alert-badge {
  flex-shrink: 0;
  width: 160px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  align-self: stretch;
}

.alert-command-logo {
  display: block;
  line-height: 0;
}

.alert-command-logo img {
  max-width: 145px;
  max-height: 145px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.alert-badge:hover {
  background: var(--bg-elevated);
  border-right-color: var(--accent-primary);
}

.alert-badge img {
  max-width: 145px !important;
  max-height: 145px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  /* Cross-browser image rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  /* Force consistent sizing across all browsers */
  box-sizing: border-box;
  margin: 0;
}


/* Alert card with command logo in the body (used on current-level page) */
.alert-card--with-logo {
  flex-direction: column;
  padding: 0;
}

.alert-card--with-logo .alert-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 0, 0, 0.15);
  font-size: var(--text-xs);
}

.alert-card--with-logo .alert-card__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-primary);
  font-size: var(--text-xs);
}

.alert-card--with-logo .alert-card__time {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.alert-card--with-logo .alert-body {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-4);
}

.alert-card--with-logo .alert-card__logo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

.alert-card--with-logo .alert-card__logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}

.alert-card--with-logo .alert-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.alert-title {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
}

.alert-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.alert-title a:hover {
  color: var(--accent-primary);
}

.alert-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.alert-body {
  flex: 1;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.alert-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.alert-card-header time {
  margin-left: auto;
}

.alert-card__label {
  display: inline-block;
  background: var(--level-2, #dc2626);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 4px;
  line-height: 1.4;
}

.alert-command {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
}

.alert-command:hover {
  text-decoration: underline;
}

.alert-body time {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.alert-card-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
}

.alert-card-title a,
.alert-card-title a:link,
.alert-card-title a:visited,
.alert-card-title a:hover,
.alert-card-title a:focus,
.alert-card-title a:active {
  color: var(--accent-primary);
  text-decoration: none;
  border: none;
  border-bottom: none;
  font-weight: 700;
  transition: color 0.2s;
  display: inline;
  line-height: inherit;
}

.alert-card-title a:hover,
.alert-card-title a:focus {
  color: var(--text-primary);
}

.alert-card-excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
  flex-grow: 1;
}

.alert-priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.alert-priority-badge.priority-critical {
  background: rgba(239, 68, 68, 0.15);
  color: var(--priority-critical, #ef4444);
}

.alert-priority-badge.priority-high {
  background: rgba(249, 115, 22, 0.15);
  color: var(--priority-high, #f97316);
}

.alert-priority-badge.priority-elevated {
  background: rgba(234, 179, 8, 0.15);
  color: var(--priority-elevated, #eab308);
}

.alert-priority-badge.priority-standard {
  background: rgba(59, 130, 246, 0.15);
  color: var(--priority-standard, #3b82f6);
}

.alert-priority-badge.priority-low {
  background: rgba(107, 114, 128, 0.15);
  color: var(--priority-low, #9ca3af);
}

.alert-meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.alert-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: auto;
}

.support-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-4);
}

.support-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.support-item img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: var(--space-2);
  display: block;
  margin: 0 auto;
}

.support-item p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.support-item .btn {
  width: 100%;
  margin-bottom: var(--space-2);
}

@media (max-width: 640px) {
  .support-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Alert Filter Links */
.alert-filter-section {
  margin-bottom: var(--space-6);
}

.alert-filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.filter-link {
  padding: var(--space-2) var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.filter-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-link.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

@media (max-width: 640px) {
  .alert-card {
    flex-direction: column;
  }

  .alert-badge {
    width: 100%;
    padding: var(--space-4);
  }

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

