/* ============================================================
   HALO EFFECT — HTML ARTIFACT COMPONENT LIBRARY
   Injected via <style> into innerHTML-rendered artifacts
   Brand: EGM (Navy #1B3A5C, Teal #0E7C7B, Orange #E8792F)
   ============================================================ */

/* --- Design Tokens (scoped to artifact container) --- */
.halo-artifact {
  --h-navy: #1B3A5C;
  --h-navy-dark: #132A45;
  --h-teal: #0E7C7B;
  --h-teal-light: #12A5A4;
  --h-orange: #E8792F;
  --h-orange-light: #F09A5C;
  --h-light: #F0F5FA;
  --h-white: #FFFFFF;
  --h-gray-100: #F7F8FA;
  --h-gray-200: #E5E7EB;
  --h-gray-300: #D1D5DB;
  --h-gray-500: #6B7280;
  --h-gray-700: #374151;
  --h-gray-900: #111827;
  --h-radius: 10px;
  --h-radius-lg: 16px;
  --h-shadow: 0 4px 14px rgba(27,58,92,0.10);
  --h-shadow-lg: 0 12px 32px rgba(27,58,92,0.14);
  --h-font: 'Inter', system-ui, -apple-system, sans-serif;
  font-family: var(--h-font);
  color: var(--h-gray-900);
  line-height: 1.6;
}

/* --- 1. Hero Section --- */
.hero-section {
  background: linear-gradient(135deg, var(--h-navy) 0%, var(--h-teal) 100%);
  color: var(--h-white);
  padding: 48px 32px;
  border-radius: var(--h-radius-lg);
  text-align: center;
  margin-bottom: 24px;
}
.hero-section h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.hero-section p  { font-size: 16px; opacity: 0.85; max-width: 560px; margin: 0 auto; }

/* --- 2. Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

/* --- 3. Stat Card --- */
.stat-card {
  background: var(--h-white);
  border: 1px solid var(--h-gray-200);
  border-radius: var(--h-radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--h-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--h-shadow-lg); }
.stat-card .stat-value {
  font-size: 36px; font-weight: 800; color: var(--h-teal);
  line-height: 1.2; margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 13px; color: var(--h-gray-500); text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600;
}

/* --- 4. Metric Row --- */
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--h-gray-200);
}
.metric-row:last-child { border-bottom: none; }
.metric-row .metric-name { font-weight: 500; color: var(--h-gray-700); }
.metric-row .metric-val  { font-weight: 700; color: var(--h-navy); font-size: 18px; }

/* --- 5. Data Table --- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--h-gray-200);
  border-radius: var(--h-radius);
  overflow: hidden;
  margin-bottom: 24px;
  font-size: 14px;
}
.data-table th {
  background: var(--h-navy);
  color: var(--h-white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--h-gray-200);
}
.data-table tr:nth-child(even) td { background: var(--h-gray-100); }
.data-table tr:hover td { background: rgba(14,124,123,0.06); }

/* --- 6. Progress Bar --- */
.progress-bar {
  height: 10px;
  background: var(--h-gray-200);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--h-teal), var(--h-teal-light));
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* --- 7. Badge / Tag --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-navy   { background: rgba(27,58,92,0.12);  color: var(--h-navy); }
.badge-teal   { background: rgba(14,124,123,0.12); color: var(--h-teal); }
.badge-orange { background: rgba(232,121,47,0.12); color: var(--h-orange); }
.badge-success{ background: rgba(16,185,129,0.12); color: #059669; }
.badge-danger { background: rgba(239,68,68,0.12);  color: #DC2626; }

/* --- 8. Card Container --- */
.card {
  background: var(--h-white);
  border: 1px solid var(--h-gray-200);
  border-radius: var(--h-radius);
  padding: 24px;
  box-shadow: var(--h-shadow);
  margin-bottom: 20px;
}
.card-header { font-size: 18px; font-weight: 700; color: var(--h-navy); margin-bottom: 12px; }
.card-body   { color: var(--h-gray-700); font-size: 14px; }

/* --- 9. Timeline / Steps --- */
.timeline-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-left: 3px solid var(--h-gray-200);
  margin-left: 12px;
  padding-left: 24px;
  position: relative;
}
.timeline-step::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--h-teal);
  border: 3px solid var(--h-white);
}
.timeline-step.active::before { background: var(--h-orange); }
.timeline-step .step-title { font-weight: 600; color: var(--h-navy); margin-bottom: 4px; }
.timeline-step .step-desc  { font-size: 13px; color: var(--h-gray-500); }

/* --- 10. CTA Button --- */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--h-radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.cta-primary {
  background: var(--h-orange);
  color: var(--h-white);
}
.cta-primary:hover { background: #D06A24; transform: translateY(-1px); box-shadow: var(--h-shadow); }
.cta-secondary {
  background: transparent;
  color: var(--h-navy);
  border: 2px solid var(--h-navy);
}
.cta-secondary:hover { background: var(--h-navy); color: var(--h-white); }

/* --- 11. Divider --- */
.divider {
  border: none;
  height: 1px;
  background: var(--h-gray-200);
  margin: 24px 0;
}

/* --- 12. KPI Banner --- */
.kpi-banner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--h-light);
  border: 1px solid var(--h-gray-200);
  border-radius: var(--h-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.kpi-item { text-align: center; flex: 1; min-width: 120px; }
.kpi-item .kpi-number { font-size: 32px; font-weight: 800; color: var(--h-navy); }
.kpi-item .kpi-label  { font-size: 12px; color: var(--h-gray-500); text-transform: uppercase; letter-spacing: 0.5px; }

/* --- 13. Alert / Callout --- */
.callout {
  padding: 16px 20px;
  border-radius: var(--h-radius);
  border-left: 4px solid;
  margin-bottom: 16px;
  font-size: 14px;
}
.callout-info    { background: rgba(14,124,123,0.08); border-color: var(--h-teal); color: var(--h-gray-700); }
.callout-warning { background: rgba(232,121,47,0.08); border-color: var(--h-orange); color: var(--h-gray-700); }
.callout-success { background: rgba(16,185,129,0.08); border-color: #10B981; color: var(--h-gray-700); }

/* --- 14. Section Header --- */
.section-header {
  font-size: 22px;
  font-weight: 700;
  color: var(--h-navy);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--h-teal);
  margin-bottom: 20px;
}

/* --- 15. Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 600px) { .two-col { grid-template-columns: 1fr; } }

/* --- 16. Comparison Block --- */
.compare-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--h-gray-200);
  border-radius: var(--h-radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.compare-before, .compare-after { padding: 24px; }
.compare-before { background: #FEF2F2; }
.compare-after  { background: #ECFDF5; }
.compare-before h4 { color: #DC2626; margin-bottom: 8px; }
.compare-after h4  { color: #059669; margin-bottom: 8px; }

/* --- 17. Score Gauge (CSS only) --- */
.score-gauge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--h-teal) var(--score, 75%), var(--h-gray-200) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.score-gauge .inner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--h-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--h-navy);
}

/* --- 18. Footer --- */
.artifact-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--h-gray-500);
  border-top: 1px solid var(--h-gray-200);
  margin-top: 32px;
}
.artifact-footer a { color: var(--h-teal); text-decoration: none; }
.artifact-footer a:hover { text-decoration: underline; }

/* --- 19. Icon Utility --- */
.icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; margin-right: 6px; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
