@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg:       #f4f6fc;
  --s1:       #ffffff;
  --s2:       #ffffff;
  --s3:       black;
  --border:   #e2e8f0;
  --border2:  rgba(0, 0, 0, 0.1);
  --accent:   black;
  --warn:     blue;
  --danger:   #f0f0f0;
  --text:     #1e293b;
  --muted:    #64748b;
  --muted2:   #475569;
  --sans:     'Poppins', sans-serif;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
}

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

body { 
  background: var(--bg); 
  color: var(--text); 
  font-family: var(--sans); 
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ── PAGE WRAPPER ── */
.dd-page { padding: 32px 32px 72px; max-width: 1100px; margin: 0 auto; }

/* ── HERO ── */
.dd-hero { text-align: center; margin-bottom: 40px; }
.dd-hero-eyebrow {
  font-family: var(--sans); font-size: 11px; letter-spacing: .25em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 16px;
  font-weight: 700;
}
.dd-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.15; margin-bottom: 18px;
  color: #000000;
}
.dd-hero h1 em { color: var(--accent); font-style: normal; border-bottom: 3px solid #111; }
.dd-hero p {
  color: var(--muted2); font-size: 0.95rem; line-height: 1.75;
  max-width: 620px; margin: 0 auto;
}

/* ── SECTION LABEL ── */
.dd-section { margin-bottom: 48px; }
.dd-section-label {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}
.dd-section-label h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; color: #0f172a; }
.dd-pill {
  font-family: var(--sans); font-size: 9px; letter-spacing: .18em;
  text-transform: uppercase; color: white;
  background: black;
  padding: 4px 10px; border-radius: 4px;
  font-weight: 700;
}

/* ── HERO VALUE PROPOSITION CARDS ── */
.dd-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: #0f172a;
}

.dd-hero-subtitle {
  color: var(--muted2);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 36px;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

.hero-prop-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.prop-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 140px;
  flex: 1 1 calc(20% - 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(0, 0, 0, 0.15);
}

.prop-card.highlight {
  background: #0f172a;
  border-color: #0f172a;
}

.prop-card .pc-num {
  font-family: var(--sans);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 3px;
}

.prop-card.highlight .pc-num {
  color: #ffffff;
}

.prop-card .pc-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.prop-card.highlight .pc-label {
  color: #cbd5e1;
}

/* ── COUNTRY GRID ── */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.country-btn {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  text-align: center; padding-bottom: 14px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--card-shadow);
}
.country-btn:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}
.country-btn img {
  width: 100%; height: 80px; object-fit: cover;
  border-bottom: 1px solid var(--border); display: block;
}
.country-btn .cb-name {
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  margin-top: 10px; padding: 0 8px; line-height: 1.3; color: #0f172a;
}
.country-btn .cb-tag {
  font-family: var(--sans); font-size: .6rem; color: var(--muted);
  margin-top: 4px; letter-spacing: .06em;
}

/* ── DISTRIBUTION & HIGHLIGHTS CARDS ── */
.dist-metric-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.dist-metric-btn {
  font-family: var(--sans); font-size: .65rem; letter-spacing: .1em;
  text-transform: uppercase; background: #ffffff;
  border: 1px solid var(--border); color: var(--muted2);
  border-radius: 20px; padding: 8px 16px; cursor: pointer; transition: all .15s ease;
  box-shadow: var(--card-shadow);
}
.dist-metric-btn:hover { border-color: var(--accent); color: black; }
.dist-metric-btn.active {
  background: black; border-color: black; color: white; font-weight: 600;
}

.dist-scope-row { display: flex; gap: 12px; margin-bottom: 32px; align-items: center; }
.dist-scope-btn {
  font-family: var(--sans); font-size: .65rem; letter-spacing: .12em;
  text-transform: uppercase; background: #ffffff;
  border: 1px solid var(--border); color: var(--muted2);
  border-radius: 6px; padding: 8px 18px; cursor: pointer; transition: all .15s ease;
  box-shadow: var(--card-shadow);
}
.dist-scope-btn:hover { border-color: var(--accent); }
.dist-scope-btn.active {
  background: black; border-color: black; color: white; font-weight: 600;
}
.dist-scope-label {
  font-family: var(--sans); font-size: .65rem; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
}

/* Dynamic Grid for Micro Insights */
.dist-stats-row {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px; 
  margin-bottom: 36px;
}
.dist-stat {
  background: #ffffff; 
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px; 
  padding: 16px 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.dist-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(0, 0, 0, 0.15);
}
.dist-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #0f172a, #475569);
  opacity: 0.08;
  transition: opacity 0.2s ease;
}
.dist-stat:hover::before { opacity: 1; }
.dist-stat .ds-label {
  font-family: var(--sans); font-size: .62rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px;
  margin-top: 2px;
  font-weight: 700;
}
.dist-stat .ds-val {
  font-family: var(--sans); font-size: clamp(1.1rem, 2.5vw, 1.35rem); font-weight: 700; color: #0f172a;
}

.dist-chart-wrap { position: relative; height: 320px; margin-bottom: 32px; background: white; padding: 20px; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.dist-legend {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: var(--sans); font-size: .65rem; color: var(--muted2);
  letter-spacing: .08em; text-transform: uppercase; margin-top: 18px;
  font-weight: 700;
}
.dist-legend-item { display: flex; align-items: center; gap: 8px; }
.dist-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ── COMPARATOR ── */
.comp-controls {
  display: grid; grid-template-columns: 1fr 50px 1fr;
  gap: 16px; align-items: center; margin-bottom: 24px;
}
@media (max-width: 580px) {
  .comp-controls { grid-template-columns: 1fr; gap: 8px; }
  .comp-vs { padding: 8px 0; }
}
.comp-select {
  font-family: var(--sans); font-size: .88rem; font-weight: 500;
  background: #ffffff; color: #0f172a;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; width: 100%; outline: none; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--card-shadow);
  appearance: none;
}
.comp-select:hover, .comp-select:focus { border-color: var(--accent); box-shadow: var(--hover-shadow); }
.comp-vs {
  font-family: var(--sans); font-size: .75rem; color: var(--muted);
  text-align: center; letter-spacing: .15em; font-weight: 700;
}
.comp-metric-select { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.comp-metric-btn {
  font-family: var(--sans); font-size: .65rem; letter-spacing: .1em;
  text-transform: uppercase; background: #ffffff;
  border: 1px solid var(--border); color: var(--muted);
  border-radius: 20px; padding: 6px 14px; cursor: pointer; transition: all .15s;
  box-shadow: var(--card-shadow);
}
.comp-metric-btn.active {
  background: black; border-color: black; color: white; font-weight: 600;
}
.comp-run-btn {
  display: block; margin: 0 auto 32px;
  font-family: var(--sans); font-size: .9rem; font-weight: 700;
  background-color: #ffffff; color: black;
  border: 2px solid black;
  border-radius: 10px; padding: 14px 44px; cursor: pointer; transition: all .25s ease;
  box-shadow: var(--card-shadow);
}
.comp-run-btn:hover { background: black; color: white; transform: translateY(-2px); box-shadow: var(--hover-shadow); }
.comp-results { display: none; }
.comp-results.visible { display: block; animation: modalIn 0.3s ease; }

.comp-table { width: 100%; border-collapse: collapse; margin-bottom: 44px; background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.comp-table th {
  font-family: var(--sans); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding: 14px 18px;
  border-bottom: 2px solid var(--accent); text-align: right; background: #f8fafc;
}
.comp-table th:first-child { text-align: left; }
.comp-table td {
  font-family: var(--sans); padding: 14px 18px;
  border-bottom: 1px solid var(--border); font-size: .88rem;
  color: #334155;
}
.comp-table td:first-child { color: var(--muted2); font-weight: 500; }
.comp-table td:not(:first-child) {
  font-family: var(--sans); font-size: .92rem; font-weight: 700; text-align: right;
}
.comp-table tr:hover td { background: #f1f5f9; }
.cv-win  { color: #26a69a; background: rgba(38, 166, 154, 0.04); }
.cv-lose { color: #64748b; }
.cv-tie  { color: var(--muted); }

.comp-chart-wrap { height: 440px; margin-bottom: 44px; background: white; padding: 24px; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.comp-verdict {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 32px; box-shadow: var(--card-shadow);
}
.comp-verdict h4 {
  font-family: var(--sans); font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px; font-weight: 700;
}
.comp-verdict p { font-family: var(--sans); font-size: .92rem; line-height: 1.8; color: #334155; }
.comp-verdict strong { color: #0f172a; font-weight: 700; }

/* ── INTERACTIVE INFO BADGES ── */
.metric-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: #e2e8f0; color: #475569;
  font-size: 9px; font-weight: 700; font-family: var(--sans);
  cursor: pointer; margin-left: 8px; vertical-align: middle;
  flex-shrink: 0; transition: background .15s, color .15s;
}
.metric-badge:hover { background: #cbd5e1; color: black; }
.metric-name-cell { font-size: .83rem; font-weight: 500; }
.comp-table td:first-child .metric-name-cell { margin-right: 4px; }

/* ── COUNTRY PROFILES INTERACTIVE MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); z-index: 10000;
  align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #f8fafc; border: 1px solid var(--border2);
  border-radius: 16px; width: 100%; max-width: 860px;
  position: relative; overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  z-index: 10001;
}
.modal-flag {
  width: 100%; height: 180px; object-fit: cover;
  display: block; border-bottom: 1px solid var(--border);
  filter: brightness(.65);
}
.modal-flag-overlay {
  position: absolute; top: 0; left: 0; right: 0; height: 180px;
  background: linear-gradient(to bottom, transparent 30%, #f8fafc);
  pointer-events: none;
}
.modal-flag-text { position: absolute; top: 110px; left: 32px; z-index: 2; }
.modal-flag-text h2 {
  font-family: var(--sans); font-size: 2.2rem;
  font-weight: 700; letter-spacing: -.02em; color: #0f172a;
}
.modal-region {
  font-family: var(--sans); font-size: .75rem; color: #475569;
  letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; font-weight: 700;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(15, 23, 42, 0.6); border: none; color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(15, 23, 42, 0.9); }
.modal-body { padding: 32px; }

/* Modal Insights Grid */
.modal-stats {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
  gap: 16px; 
  margin-bottom: 32px;
}
.modal-stat {
  background: #ffffff; 
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px; 
  padding: 16px 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(0, 0, 0, 0.15);
}
.modal-stat .ms-label {
  font-family: var(--sans); font-size: .62rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px;
  font-weight: 700;
}
.modal-stat .ms-val {
  font-family: var(--sans); font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 700; color: #0f172a; line-height: 1.2;
}

.modal-chart-wrap { min-height: 380px; margin-bottom: 32px; background: white; padding: 16px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--card-shadow); overflow: hidden; }
.modal-footer {
  display: flex; justify-content: flex-end;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.modal-cta {
  font-family: var(--sans); font-size: .85rem; font-weight: 700;
  color: black; background-color: #ffffff;
  border: 2px solid black;
  border-radius: 8px; padding: 12px 28px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: all .2s ease;
  box-shadow: var(--card-shadow);
}
.modal-cta:hover { color: #ffffff; background-color: black; transform: translateY(-2px); box-shadow: var(--hover-shadow); }

/* Mobile responsive override so cards don't squish too tightly */
@media (max-width: 768px) {
  .prop-card {
    flex: 1 1 calc(33.33% - 16px);
  }
}

@media (max-width: 480px) {
  .prop-card {
    flex: 1 1 calc(50% - 16px);
    padding: 14px 16px;
  }
}

/* ══════════════════════════════════════════════════════
   SWOT ANALYSIS
   ══════════════════════════════════════════════════════ */

.swot-intro {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--muted2);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 720px;
}

.swot-picker-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.swot-select { max-width: 320px; }

.swot-run-btn {
  margin: 0 !important;
  white-space: nowrap;
}

/* Country header */
.swot-country-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.swot-country-name {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.01em;
}

.swot-ws-badge {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: #0f172a;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
}

/* 2×2 grid */
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Cards — same base as dist-stat */
.swot-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px 22px;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
  overflow: hidden;
}

.swot-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  transition: opacity .2s ease;
}

.swot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

/* Quadrant accent bars + colours */
.swot-s::before { background: linear-gradient(90deg, #2e9000, #52c41a); opacity: 1; }
.swot-w::before { background: linear-gradient(90deg, #cc0000, #ff4d4f); opacity: 1; }
.swot-o::before { background: linear-gradient(90deg, #0066cc, #40a9ff); opacity: 1; }
.swot-t::before { background: linear-gradient(90deg, #b07800, #ffc53d); opacity: 1; }

.swot-s { border-top-color: #b6dfbe; }
.swot-w { border-top-color: #f5c0c0; }
.swot-o { border-top-color: #b3d4f5; }
.swot-t { border-top-color: #f5dfa0; }

/* Card header */
.swot-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.swot-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.swot-s .swot-icon { color: #2e9000; }
.swot-w .swot-icon { color: #cc0000; }
.swot-o .swot-icon { color: #0066cc; }
.swot-t .swot-icon { color: #b07800; }

.swot-card-title {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0;
  flex: 1;
}

.swot-count {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.swot-s .swot-count { background: #d3f0d8; color: #1d6600; }
.swot-w .swot-count { background: #fdd8d8; color: #8b0000; }
.swot-o .swot-count { background: #cde4fa; color: #00448a; }
.swot-t .swot-count { background: #faeec0; color: #7a5200; }

/* List */
.swot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swot-item {
  font-family: var(--sans);
  font-size: .82rem;
  line-height: 1.65;
  color: #334155;
  padding-left: 14px;
  position: relative;
}

.swot-item::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #94a3b8;
}

.swot-item--none {
  color: var(--muted);
  font-style: italic;
}

.swot-item--none::before { content: ''; }

/* Skeleton */
.swot-skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: swotShimmer 1.4s infinite;
  min-height: 180px;
  border: 1px solid var(--border);
}

@keyframes swotShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error / empty states */
.swot-error,
.swot-empty {
  display: none;
  text-align: center;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .85rem;
  padding: 32px 0;
}

@media (max-width: 640px) {
  .swot-grid { grid-template-columns: 1fr; }
  .swot-picker-row { flex-direction: column; align-items: stretch; }
  .swot-select { max-width: 100%; }
}
/* ══════════════════════════════════════════════════════
   SWOT ANALYSIS
   ══════════════════════════════════════════════════════ */

.swot-intro {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--muted2);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 720px;
}

.swot-picker-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.swot-select { max-width: 320px; }

.swot-run-btn {
  margin: 0 !important;
  white-space: nowrap;
}

/* Country header */
.swot-country-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.swot-country-name {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.01em;
}

.swot-ws-badge {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: #0f172a;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
}

/* 2×2 grid */
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Cards — same base as dist-stat */
.swot-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px 22px;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
  overflow: hidden;
}

.swot-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  transition: opacity .2s ease;
}

.swot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

/* Quadrant accent bars + colours */
.swot-s::before { background: linear-gradient(90deg, #2e9000, #52c41a); opacity: 1; }
.swot-w::before { background: linear-gradient(90deg, #cc0000, #ff4d4f); opacity: 1; }
.swot-o::before { background: linear-gradient(90deg, #0066cc, #40a9ff); opacity: 1; }
.swot-t::before { background: linear-gradient(90deg, #b07800, #ffc53d); opacity: 1; }

.swot-s { border-top-color: #b6dfbe; }
.swot-w { border-top-color: #f5c0c0; }
.swot-o { border-top-color: #b3d4f5; }
.swot-t { border-top-color: #f5dfa0; }

/* Card header */
.swot-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.swot-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.swot-s .swot-icon { color: #2e9000; }
.swot-w .swot-icon { color: #cc0000; }
.swot-o .swot-icon { color: #0066cc; }
.swot-t .swot-icon { color: #b07800; }

.swot-card-title {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0;
  flex: 1;
}

.swot-count {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.swot-s .swot-count { background: #d3f0d8; color: #1d6600; }
.swot-w .swot-count { background: #fdd8d8; color: #8b0000; }
.swot-o .swot-count { background: #cde4fa; color: #00448a; }
.swot-t .swot-count { background: #faeec0; color: #7a5200; }

/* List */
.swot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swot-item {
  font-family: var(--sans);
  font-size: .82rem;
  line-height: 1.65;
  color: #334155;
  padding-left: 14px;
  position: relative;
}

.swot-item::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #94a3b8;
}

.swot-item--none {
  color: var(--muted);
  font-style: italic;
}

.swot-item--none::before { content: ''; }

/* Skeleton */
.swot-skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: swotShimmer 1.4s infinite;
  min-height: 180px;
  border: 1px solid var(--border);
}

@keyframes swotShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error / empty states */
.swot-error,
.swot-empty {
  display: none;
  text-align: center;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .85rem;
  padding: 32px 0;
}

@media (max-width: 640px) {
  .swot-grid { grid-template-columns: 1fr; }
  .swot-picker-row { flex-direction: column; align-items: stretch; }
  .swot-select { max-width: 100%; }
}

/* ── MODAL SLIDESHOW CONTROLS ── */
.mcs-title {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 12px;
}

.mcs-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.mcs-btn {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--muted2);
  border-radius: 20px;
  padding: 6px 18px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  box-shadow: var(--card-shadow);
}

.mcs-btn:hover:not(.mcs-btn--active) {
  border-color: #0f172a;
  color: #0f172a;
}

.mcs-btn--active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff !important;
}

.modal-chart-inner {
  width: 100%;
  min-height: 340px;
  overflow: hidden;
  position: relative;
}

.modal-chart-inner svg {
  max-width: 100%;
  display: block;
}

/* ── ALL 19 METRIC SCORES GRID ── */
.modal-all-scores {
  margin-bottom: 24px;
}

.modal-scores-heading {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.modal-scores-sub {
  font-size: .65rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: none;
}

.modal-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.modal-score-chip {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color .15s;
}

.modal-score-chip:hover {
  border-color: #94a3b8;
}

.msc-label {
  font-family: var(--sans);
  font-size: .6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 4px;
}

.msc-qmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: #e2e8f0;
  color: #475569;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
  line-height: 1;
  position: relative;
}

/* tooltip handled by #mcs-tooltip JS element */

.msc-val {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════
   COUNTRY ANALYSIS TOOLS — SUBSECTION LABELS + COMPASS
   ══════════════════════════════════════════════════════ */

.dd-subsection-label {
  margin-bottom: 20px;
}

.dd-subsection-label h3 {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}

.dd-subsection-desc {
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--muted2);
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.dd-tool-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0;
}

/* ── Compass wrapper ── */
.dd-compass-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 0;
}

.ddc-loading {
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  padding: 32px 0;
}

/* ── Controls row ── */
.ddc-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.ddc-axis-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ddc-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 200px;
}

.ddc-label {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.ddc-select {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
  appearance: none;
}

.ddc-select:focus,
.ddc-select:hover { border-color: #0f172a; }

/* ── Country row ── */
.ddc-country-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ddc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ddc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
  cursor: default;
}

.ddc-pill-x {
  cursor: pointer;
  font-weight: 700;
  opacity: .7;
  margin-left: 2px;
}

.ddc-pill-x:hover { opacity: 1; }

.ddc-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ddc-add-btn {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}

.ddc-add-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* ── Chart ── */
.ddc-chart-wrap {
  position: relative;
  height: 400px;
  margin-bottom: 16px;
}

/* ── Legend ── */
.ddc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.ddc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: .72rem;
  color: var(--muted2);
}

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

.ddc-legend-name { font-weight: 600; color: #0f172a; }

.ddc-legend-ws {
  font-size: .65rem;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--muted2);
}

@media (max-width: 640px) {
  .ddc-axis-row { flex-direction: column; }
  .ddc-chart-wrap { height: 300px; }
  .dd-compass-wrap { padding: 16px; }
}

/* ══════════════════════════════════════════════════════
   ACCORDION TOGGLES
   ══════════════════════════════════════════════════════ */

.dd-accordion {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.dd-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}

.dd-accordion-btn:hover {
  background: #f8fafc;
}

.dd-accordion-title {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.dd-accordion-desc {
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.4;
}

.dd-accordion-arrow {
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .25s ease;
}

.dd-accordion-panel {
  display: none;
  padding: 20px 20px 24px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.dd-accordion-panel--open {
  display: block;
}