/* CoValue OS - Civic Daylight & Warmth Design System
   Universal, Accessible, Culturally Neutral Everyday Civic Architecture
*/

:root {
  /* Color Tokens - Deep Slate (Dark Theme) */
  --bg-primary: #0D1117;
  --bg-surface: #161C24;
  --bg-surface-elevated: #1E2631;
  --bg-surface-hover: #263140;
  --border-subtle: #283342;
  --border-strong: #39485D;

  --text-primary: #F3F4F6;
  --text-secondary: #B8C2CC;
  --text-muted: #93A0B0; /* 6.2:1 WCAG AA+ on #161C24 */
  --text-inverse: #0D1117;

  /* Universal Civic Brand Tokens */
  --un-blue: #4F8BFF;
  --un-blue-light: #7AA7FF;
  --un-blue-dark: #2563EB;
  --civic-cyan: #38BDF8;
  --civic-cyan-glow: rgba(79, 139, 255, 0.35);
  --civic-cyan-light: #2563EB;
  --civic-mint: #34D399;
  --civic-mint-light: #6EE7B7;
  --civic-green: #34D399;
  --civic-amber: #FBBF24;
  --civic-orange: #FB923C;
  --civic-crimson: #F87171;
  --civic-indigo: #818CF8;

  /* 6-Tier Distinction Tokens (Calm, Decoupled from Rating Scores) */
  --tier-1-color: #60A5FA;
  --tier-1-bg: rgba(96, 165, 250, 0.14);
  --tier-2-color: #818CF8;
  --tier-2-bg: rgba(129, 140, 248, 0.14);
  --tier-3-color: #38BDF8;
  --tier-3-bg: rgba(56, 189, 248, 0.14);
  --tier-4-color: #2DD4BF;
  --tier-4-bg: rgba(45, 212, 191, 0.14);
  --tier-5-color: #A78BFA;
  --tier-5-bg: rgba(167, 139, 250, 0.14);
  --tier-6-color: #93A0B0;
  --tier-6-bg: rgba(147, 160, 176, 0.16);

  /* Elevation & Borders */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.48);

  /* Global Multi-Script Font Stack */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Devanagari', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', monospace;
}

[data-theme="light"] {
  /* Warm Daylight (Light Theme) */
  --bg-primary: #F8F7F4;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1EFEA;
  --bg-surface-hover: #E8E5DE;
  --border-subtle: #E6E3DC;
  --border-strong: #CFCBC1;

  --text-primary: #111827;   /* 16.7:1 on #FFFFFF */
  --text-secondary: #4B5563; /* 7.2:1 on #FFFFFF */
  --text-muted: #5C6470;     /* 5.7:1 WCAG AA+ on #FFFFFF */
  --text-inverse: #FFFFFF;

  --un-blue: #1D63ED;
  --un-blue-light: #3B82F6;
  --un-blue-dark: #1E40AF;
  --civic-cyan: #0284C7;
  --civic-cyan-glow: rgba(29, 99, 237, 0.22);
  --civic-mint: #059669;
  --civic-mint-light: #10B981;
  --civic-green: #059669;
  --civic-amber: #D97706;
  --civic-orange: #EA580C;
  --civic-crimson: #DC2626;
  --civic-indigo: #4F46E5;

  --tier-1-color: #1D63ED;
  --tier-1-bg: rgba(29, 99, 237, 0.10);
  --tier-2-color: #4F46E5;
  --tier-2-bg: rgba(79, 70, 229, 0.10);
  --tier-3-color: #0284C7;
  --tier-3-bg: rgba(2, 132, 199, 0.10);
  --tier-4-color: #0D9488;
  --tier-4-bg: rgba(13, 148, 136, 0.10);
  --tier-5-color: #7C3AED;
  --tier-5-bg: rgba(124, 58, 237, 0.10);
  --tier-6-color: #5C6470;
  --tier-6-bg: rgba(92, 100, 112, 0.12);

  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 6px 18px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 14px 32px rgba(17, 24, 39, 0.12);
}

/* Base Reset & Accessibility Safeguards */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--un-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Data Commons Card Grid */
.dc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.dc-card {
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.dc-card:hover {
  border-color: var(--border-strong);
}

/* KPI Hero Tiles (data.un.org standard) */
.dc-kpi-tile {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.dc-kpi-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-strip-color, var(--un-blue));
}

.dc-kpi-tile.mint::before { background: var(--civic-mint); }
.dc-kpi-tile.amber::before { background: var(--civic-amber); }
.dc-kpi-tile.indigo::before { background: var(--civic-indigo); }

.dc-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dc-kpi-value {
  font-size: clamp(16px, 4.2vw, 26px);
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
  line-height: 1.1;
  font-feature-settings: "tnum";
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dc-kpi-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tier Badges */
.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tier-pill.t1 { color: var(--tier-1-color); background-color: var(--tier-1-bg); border: 1px solid rgba(0, 158, 219, 0.28); }
.tier-pill.t2 { color: var(--tier-2-color); background-color: var(--tier-2-bg); border: 1px solid rgba(37, 99, 235, 0.28); }
.tier-pill.t3 { color: var(--tier-3-color); background-color: var(--tier-3-bg); border: 1px solid rgba(2, 132, 199, 0.28); }
.tier-pill.t4 { color: var(--tier-4-color); background-color: var(--tier-4-bg); border: 1px solid rgba(56, 189, 248, 0.28); }
.tier-pill.t5 { color: var(--tier-5-color); background-color: var(--tier-5-bg); border: 1px solid rgba(129, 140, 248, 0.28); }
.tier-pill.t6 { color: var(--tier-6-color); background-color: var(--tier-6-bg); border: 1px solid rgba(148, 163, 184, 0.30); }

/* Score Gauge & Pill */
.score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  font-feature-settings: "tnum";
  flex-shrink: 0;
}

.score-badge .score-max {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 600;
}

/* Unambiguous 5-Level Civic Rating Spectrum (Emerald -> Teal -> Amber -> Orange -> Crimson) */
.score-exceptional { background: rgba(5, 150, 105, 0.14); color: #34D399; border: 1px solid rgba(52, 211, 153, 0.36); }
.score-good        { background: rgba(13, 148, 136, 0.14); color: #2DD4BF; border: 1px solid rgba(45, 212, 191, 0.36); }
.score-average     { background: rgba(217, 119, 6, 0.14);  color: #FBBF24; border: 1px solid rgba(251, 191, 36, 0.36); }
.score-low         { background: rgba(234, 88, 12, 0.14);  color: #FB923C; border: 1px solid rgba(251, 146, 60, 0.38); }
.score-critical    { background: rgba(220, 38, 38, 0.14);  color: #F87171; border: 1px solid rgba(248, 113, 113, 0.38); }

[data-theme="light"] .score-exceptional { background: rgba(5, 150, 105, 0.10); color: #047857; border-color: rgba(5, 150, 105, 0.30); }
[data-theme="light"] .score-good        { background: rgba(13, 148, 136, 0.10); color: #0F766E; border-color: rgba(13, 148, 136, 0.30); }
[data-theme="light"] .score-average     { background: rgba(217, 119, 6, 0.10);  color: #B45309; border-color: rgba(217, 119, 6, 0.30); }
[data-theme="light"] .score-low         { background: rgba(234, 88, 12, 0.10);  color: #C2410C; border-color: rgba(234, 88, 12, 0.32); }
[data-theme="light"] .score-critical    { background: rgba(220, 38, 38, 0.10);  color: #B91C1C; border-color: rgba(220, 38, 38, 0.32); }

/* Representative Card (Clean Border-Only Everyday Aesthetic) */
.rep-card {
  content-visibility: auto;
  contain-intrinsic-size: 85px;
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.rep-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.rep-avatar-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.rep-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rep-content {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rep-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.rep-header > div:first-child {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.rep-header > div:first-child > div:first-child {
  min-width: 0;
  max-width: 100%;
}

.rep-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.rep-role {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
  line-height: 1.2;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rep-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-width: 0;
  max-width: 100%;
}

.rep-locality {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pie Chart Visualizer (SVG Based) */
.pie-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
  width: 100%;
}

.pie-svg {
  transform: rotate(-90deg);
  border-radius: 50%;
  overflow: visible;
}

.pie-slice {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: 50% 50%;
}

.pie-slice:hover {
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.pie-center-label {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.pie-center-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.pie-center-sub {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.5px;
}

/* Category Legend for Pie & Bar Charts */
.dc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  justify-content: center;
}

.dc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  transition: background 0.15s ease;
}

.dc-legend-item:hover {
  background: var(--bg-surface-hover);
}

.dc-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Comparative Bar Chart (Tier-by-Tier Satisfaction) */
.dc-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.dc-bar-label-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}

.dc-bar-track {
  width: 100%;
  height: 10px;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}

.dc-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 4-Pillar Score Sliders */
.pillar-score-row {
  margin-bottom: 14px;
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.pillar-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  outline: none;
}

.pillar-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--un-blue);
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease;
}

.pillar-slider::-webkit-slider-thumb:active {
  transform: scale(1.18);
}

/* Provenance Card (UN Data Commons Standard) */
.provenance-card {
  background-color: transparent !important;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 16px;
}

.provenance-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Buttons */
.btn-civic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-primary {
  background-color: var(--un-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--un-blue-dark);
}

.btn-mint {
  background-color: var(--civic-mint);
  color: #ffffff;
}

.btn-mint:hover {
  background-color: #059669;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--bg-surface-hover);
}

/* ======================================================== */
/* SOCIAL AUTH & CIVIC LOW-ASSURANCE KYC STYLES            */
/* ======================================================== */
.social-login-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-social-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.btn-social-auth:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-google {
  border-color: rgba(66, 133, 244, 0.3);
}
.btn-google:hover {
  background: rgba(66, 133, 244, 0.08);
}

.btn-apple {
  border-color: var(--border-strong);
}

.btn-microsoft:hover {
  background: rgba(0, 164, 239, 0.08);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 10px;
}

/* ======================================================== */
/* PETITION & PROBLEM RESOLVER STYLES                      */
/* ======================================================== */
.btn-solve-problem {
  background: linear-gradient(135deg, #00a3e0 0%, #00f58a 100%);
  color: #0b1528 !important;
  font-weight: 800 !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}

.btn-solve-problem:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.petition-card {
  background: transparent !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.petition-card:hover {
  border-color: var(--border-strong);
}

.petition-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.petition-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}

.petition-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.petition-progress-container {
  margin: 12px 0 10px 0;
}

.petition-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.petition-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--un-blue), var(--civic-mint));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.petition-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 5px;
}

.btn-sign-petition {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  border: none;
  background: var(--civic-mint);
  color: #0b1528;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sign-petition:hover {
  filter: brightness(1.1);
}

.btn-sign-petition.signed {
  background: rgba(0, 245, 138, 0.15);
  color: var(--civic-mint);
  border: 1px solid rgba(0, 245, 138, 0.3);
  cursor: default;
}


/* ======================================================== */
/* UNIVERSAL CIVIC HIERARCHY LADDER & DYNAMIC TIERS         */
/* ======================================================== */
.civic-hierarchy-ladder {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.civic-hierarchy-ladder::-webkit-scrollbar {
  display: none;
}

.ladder-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ladder-step:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.ladder-step.above {
  border-left: 2px solid var(--un-blue);
}

.ladder-step.active {
  background: rgba(0, 245, 138, 0.15);
  color: var(--civic-mint);
  border: 1px solid rgba(0, 245, 138, 0.4);
  font-weight: 800;
  box-shadow: 0 0 10px rgba(0, 245, 138, 0.15);
}

.ladder-step.below {
  opacity: 0.8;
  border-left: 2px solid var(--border-strong);
}

.ladder-badge-current {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--civic-mint);
  color: #0b1528;
  margin-left: 4px;
  text-transform: uppercase;
}

.ladder-arrow {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  user-select: none;
}

.tier-tab.tier-tab-current {
  border-bottom: 2px solid var(--civic-mint) !important;
}

.dept-oversight-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dept-oversight-badge:hover {
  color: var(--text-primary);
  transition: color 0.15s ease;
}

.search-card-dept {
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.search-card-dept:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-1px);
}

/* S1–S5 Verified Country Civic Profile Strip */
.country-civic-profile-strip {
  margin: 0 0 14px 0;
  padding: 10px 14px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
  background: var(--bg-surface, rgba(255, 255, 255, 0.85));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.civic-profile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.civic-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.25));
  background: var(--bg-surface-elevated, rgba(148, 163, 184, 0.08));
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.civic-profile-pill strong {
  font-weight: 700;
}

.civic-profile-pill.is-link {
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.civic-profile-pill.is-link:hover {
  border-color: var(--un-blue, #0077b6);
  color: var(--un-blue, #0077b6);
}

.civic-profile-pill.is-provenance {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

[data-theme="dark"] .civic-profile-pill.is-provenance {
  color: #34d399;
}

.civic-profile-pill.is-s5-alert {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

[data-theme="dark"] .civic-profile-pill.is-s5-alert {
  color: #fbbf24;
}

.civic-profile-wgi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle, rgba(148, 163, 184, 0.25));
}

.civic-wgi-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-secondary);
}

.civic-wgi-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-primary);
}

.civic-wgi-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--border-subtle, rgba(148, 163, 184, 0.22));
  overflow: hidden;
}

.civic-wgi-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--un-blue, #0077b6);
}
