/* ==========================================================================
   Core Problem Section — Three Invisible Threats
   Unified section: Citation Laundering + Chain of Custody + Source Intelligence
   Mobile-first: 375 px base, scale up.
   ========================================================================== */

.core-problem {
  padding: var(--sp-24) 0;
  background: var(--vc-bg-body);
}

/* ==========================================================================
   Three Threat Panels — 3-column grid on desktop, stacked on mobile
   ========================================================================== */

.threat-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin: 0 0 var(--sp-12);
}

/* --- Individual panel card ------------------------------------------------ */
.threat-panel {
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-lg, 12px);
  padding: var(--sp-10) var(--sp-8);
  text-align: left;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- Top accent stripe --------------------------------------------------- */
.threat-panel-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.threat-panel--laundering .threat-panel-accent {
  background: var(--vc-red);
}

.threat-panel--custody .threat-panel-accent {
  background: var(--vc-amber, #f59e0b);
}

.threat-panel--intelligence .threat-panel-accent {
  background: var(--vc-accent);
}

/* --- Header (icon + title inline) ---------------------------------------- */
.threat-panel-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* --- Icon ---------------------------------------------------------------- */
.threat-panel-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--vc-bg-depth);
}

.threat-panel-icon svg {
  width: 24px;
  height: 24px;
}

.threat-panel--laundering .threat-panel-icon {
  color: var(--vc-red);
}

.threat-panel--custody .threat-panel-icon {
  color: var(--vc-amber, #f59e0b);
}

.threat-panel--intelligence .threat-panel-icon {
  color: var(--vc-accent);
}

/* --- Title --------------------------------------------------------------- */
.threat-panel-title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--vc-text-primary);
  margin: 0;
  line-height: 1.3;
}

/* --- Description --------------------------------------------------------- */
.threat-panel-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--vc-text-secondary);
  margin: var(--sp-3) 0 0;
}

/* ==========================================================================
   Mini-Diagram — compact 3-node pipeline inside each panel
   ========================================================================== */

.threat-mini-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: var(--sp-4) 0;
}

/* --- mini-node ----------------------------------------------------------- */
.tmd-node {
  font-size: 12px;
  font-weight: 600;
  color: var(--vc-text-primary);
  background: var(--vc-bg-depth);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-sm, 6px);
  padding: 6px 12px;
  white-space: nowrap;
  text-align: center;
}

/* alert node (red) — laundering broken chain */
.tmd-node--alert {
  border-color: var(--vc-red);
  background: var(--vc-red-subtle);
  color: var(--vc-red);
}

/* warn node (amber) — custody gap */
.tmd-node--warn {
  border-color: var(--vc-amber, #f59e0b);
  background: rgba(245, 158, 11, 0.08);
  color: var(--vc-amber, #f59e0b);
}

/* good node (green) — source intelligence grade */
.tmd-node--good {
  border-color: var(--vc-green);
  background: var(--vc-green-subtle, rgba(74, 222, 128, 0.06));
  color: var(--vc-green);
}

/* --- mini-arrow ---------------------------------------------------------- */
.tmd-arrow {
  width: 28px;
  height: 2px;
  background: var(--vc-border-emphasis);
  flex-shrink: 0;
  position: relative;
}

.tmd-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--vc-border-emphasis);
}

/* broken arrow (red dashed) */
.tmd-arrow--broken {
  background: var(--vc-red);
  border-top: 2px dashed var(--vc-red);
  background: none;
  height: 0;
}

.tmd-arrow--broken::after {
  border-left-color: var(--vc-red);
}

/* warn arrow (amber) */
.tmd-arrow--warn {
  background: var(--vc-amber, #f59e0b);
}

.tmd-arrow--warn::after {
  border-left-color: var(--vc-amber, #f59e0b);
}

/* accent arrow (purple) */
.tmd-arrow--accent {
  background: var(--vc-accent);
}

.tmd-arrow--accent::after {
  border-left-color: var(--vc-accent);
}

/* ==========================================================================
   Unified annotation
   ========================================================================== */

.core-problem-annotation {
  font-size: 14px;
  color: var(--vc-accent);
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--sp-12);
  font-weight: 500;
}

/* ==========================================================================
   Consequence Cards — 2x2 grid (unified for all three threats)
   ========================================================================== */

.core-problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.core-problem-card {
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  border-left: 3px solid var(--vc-border-emphasis);
}

.core-problem-card-label {
  font-size: 13px;
  color: var(--vc-text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-2);
  display: block;
}

.core-problem-card-text {
  font-size: 15px;
  color: var(--vc-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Responsive — desktop layout
   ========================================================================== */

@media (min-width: 769px) {
  /* 3-column threat panels — equal width */
  .threat-panels {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Force all headers to same height so diagrams align */
  .threat-panel-header {
    min-height: 56px;
  }

  /* 2-column consequence grid */
  .core-problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Larger mini-arrows on desktop */
  .tmd-arrow {
    width: 36px;
  }
}

/* ==========================================================================
   Panel hover effect — subtle lift
   ========================================================================== */

.threat-panel {
  transition: transform var(--t-fast, 0.2s), box-shadow var(--t-fast, 0.2s);
}

.threat-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Consequence cards: color-coded left border per industry */
.core-problem-card:nth-child(1) { border-left-color: var(--vc-red); }
.core-problem-card:nth-child(2) { border-left-color: var(--vc-amber, #f59e0b); }
.core-problem-card:nth-child(3) { border-left-color: var(--vc-accent); }
.core-problem-card:nth-child(4) { border-left-color: var(--vc-green); }
