/* ---------- design tokens ---------- */
:root {
  --ink-900: #094838;
  --ink-800: #0c5a45;
  --ink-700: #106e54;
  --ink-600: #138062;
  --ink: #0e1f1a;
  --text: #2d3a35;
  --muted: #6b7872;
  --line: #e1e8e4;
  --bg: #f4f7f4;
  --bg-alt: #eaf0eb;
  --card: #ffffff;
  --accent: #07C690;
  --accent-deep: #06A87B;
  --accent-soft: #d8f6e8;

  --green: #1f9e4d;
  --green-deep: #167a3a;
  --green-soft: #d8f0e0;
  --amber: #e87722;
  --amber-deep: #b85910;
  --amber-soft: #fbe1cb;
  --red: #c0392b;
  --red-deep: #952a1f;
  --red-soft: #f6d9d4;

  --shadow-xs: 0 1px 2px rgba(9, 72, 56, 0.05);
  --shadow-sm: 0 1px 2px rgba(9, 72, 56, 0.06), 0 1px 3px rgba(9, 72, 56, 0.04);
  --shadow-md: 0 4px 16px rgba(9, 72, 56, 0.08), 0 2px 6px rgba(9, 72, 56, 0.05);
  --shadow-lg: 0 18px 40px rgba(9, 72, 56, 0.18), 0 6px 14px rgba(9, 72, 56, 0.1);
  --shadow-glow: 0 8px 24px rgba(7, 198, 144, 0.35);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --max: 1400px;
  --gutter: clamp(16px, 3vw, 32px);

  --t-fast: 120ms cubic-bezier(.2,.7,.3,1);
  --t-base: 220ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}
h1, h2, h3, h4 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}
em { font-style: normal; color: var(--accent); }
a { color: var(--ink-700); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--ink-900); text-decoration: underline; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: 8px; top: 8px;
  padding: 8px 14px; background: var(--ink-900); color: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  z-index: 200; transform: translateY(-150%); transition: transform var(--t-base);
}
.skip-link:focus { transform: translateY(0); outline: none; text-decoration: none; color: #fff; }

/* ---------- profile bar ---------- */
.profile-bar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(9,72,56,0.06);
  padding: 8px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  --header-h: 56px;
  min-height: var(--header-h);
}

.profile {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 4px 14px 4px 4px;
  transition: background var(--t-base), transform var(--t-base);
  min-width: 0;
}
.profile:hover { background: rgba(9,72,56,0.04); text-decoration: none; }
.profile:hover .profile-cta { color: var(--ink-700); }

.avatar {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-700) 0%, var(--ink-900) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(9,72,56,0.18);
  background-size: cover;
  background-position: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.avatar.has-photo { background-image: var(--avatar-image); }
.avatar.has-photo::before { content: ''; }

.profile-text {
  display: flex; flex-direction: column;
  min-width: 0;
}
.profile-name {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
  color: var(--ink);
}
.profile-cta {
  font-size: 12.5px;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 1px;
  transition: color var(--t-fast);
}
.li-icon {
  width: 13px; height: 13px;
  color: #0a66c2;
  flex-shrink: 0;
}

/* ---------- header right (pitch + CTA) ---------- */
.header-right {
  display: inline-flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.header-pitch {
  display: inline-flex; flex-direction: column; gap: 1px;
  text-align: right;
  line-height: 1.3;
  max-width: 320px;
}
.header-pitch-main {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
}
.header-pitch-note {
  font-size: 11.5px;
  color: var(--accent-deep);
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* ---------- CTA button ---------- */
.cta-meeting {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--ink-900);
  font-weight: 600; font-size: 13.5px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid rgba(6, 168, 123, 0.4);
  box-shadow: 0 4px 14px rgba(7, 198, 144, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base);
  position: relative;
  white-space: nowrap;
}
.cta-meeting:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(7, 198, 144, 0.5), inset 0 1px 0 rgba(255,255,255,0.5);
  text-decoration: none;
  color: var(--ink-900);
}
.cta-meeting:active { transform: translateY(0); }
.cta-icon { width: 16px; height: 16px; flex-shrink: 0; }
.cta-arrow {
  width: 14px; height: 14px;
  transition: transform var(--t-base);
  flex-shrink: 0;
}
.cta-meeting:hover .cta-arrow { transform: translateX(3px); }

.cta-meeting--lg {
  padding: 14px 24px;
  font-size: 15px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(7, 198, 144, 0.45), inset 0 1px 0 rgba(255,255,255,0.45);
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(165deg, var(--ink-900) 0%, #062b22 50%, var(--ink-800) 100%);
  color: #fff;
  padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(28px, 4vw, 48px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
.hero-blob--1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(7,198,144,0.45) 0%, transparent 70%);
  top: -120px; right: -80px;
}
.hero-blob--2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(7,198,144,0.22) 0%, transparent 70%);
  bottom: -160px; left: -120px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  animation: fadeUp 600ms ease-out both;
}
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(7,198,144,0.1);
  border: 1px solid rgba(7,198,144,0.28);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.hero h1 em { color: var(--accent); font-style: normal; font-weight: 800; }
.hero .lead {
  font-size: clamp(15px, 1.5vw, 18px);
  opacity: 0.78;
  margin: 0 auto 32px;
  max-width: 620px;
  font-weight: 400;
}

/* hero deadline + countdown — the centerpiece */
.hero-deadline {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(7,198,144,0.32);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 20px 60px rgba(0,0,0,0.25);
  animation: fadeUp 800ms ease-out 100ms both;
}
.hero-deadline-row {
  display: flex; align-items: stretch; justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
}
.hero-deadline-block {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 0;
}
.hero-deadline-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.hero-deadline-date {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700; color: #fff; line-height: 1.1;
  letter-spacing: -0.025em; font-variant-numeric: lining-nums;
}
.hero-deadline-count {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800; color: var(--accent); line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-deadline-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
}
@media (max-width: 520px) { .hero-deadline-divider { display: none; } }

.hero-progress {
  margin-top: 22px;
}
.hero-progress-bar {
  display: flex; height: 10px; width: 100%;
  border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.hp-seg {
  display: block; height: 100%;
  transition: width 600ms cubic-bezier(.2,.7,.3,1);
}
.hp-seg--green { background: var(--green); }
.hp-seg--amber { background: var(--amber); }
.hp-seg--red   { background: var(--red); }
.hero-progress-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px;
  margin-top: 14px;
  font-size: 12.5px; color: rgba(255,255,255,0.78);
}
.hero-progress-legend b {
  color: #fff; font-weight: 600; font-variant-numeric: tabular-nums;
  margin-right: 4px;
}
.hero-progress-total { opacity: 0.6; }

.hero-stamp {
  margin-top: 16px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(255,255,255,0.52);
  letter-spacing: 0.02em;
}
.hero-stamp time { font-weight: 600; color: rgba(255,255,255,0.7); }

/* ---------- layout ---------- */
.layout {
  max-width: var(--max);
  margin: clamp(20px, 3vw, 32px) auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

/* ---------- card base ---------- */
.map-card, .detail-card, .grid-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.card-head h2 { font-size: 19px; }

/* ---------- legend ---------- */
.legend { display: flex; gap: 18px; flex-wrap: wrap; }
.legend-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
}
.legend-swatch {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* ---------- map ---------- */
.map-wrap {
  position: relative;
  padding: 18px;
  min-height: 540px;
}
#map { width: 100%; height: 540px; }
#map svg { width: 100%; height: 100%; display: block; overflow: hidden; }
.country {
  cursor: pointer;
  stroke: #ffffff;
  stroke-width: 0.5;
  outline: none;
  transition: filter var(--t-fast), stroke-width var(--t-fast);
}
.country:focus, .country:focus-visible, .country:active { outline: none; -webkit-tap-highlight-color: transparent; }
.country:hover { filter: brightness(1.08); stroke-width: 1.4; stroke: var(--ink-900); }
.country.is-selected { stroke: var(--ink-900); stroke-width: 2; filter: brightness(1.05); }
.country.non-eu { fill: #eef0f4; cursor: default; pointer-events: none; }
.country:focus-visible { stroke: var(--ink-900); stroke-width: 2.4; filter: brightness(1.08); }
.country.is-dim { opacity: 0.18; }

.map-tooltip {
  position: absolute;
  background: var(--ink-900);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  z-index: 10;
  max-width: 240px;
}
.map-tooltip strong { display: block; margin-bottom: 2px; font-size: 14px; }
.map-tooltip .tt-status { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.8; }

/* ---------- detail ---------- */
.detail-card { padding: 24px; min-height: 540px; }
.detail-empty h3, .detail-content h3 { font-size: 22px; }
.detail-empty p {
  color: var(--muted);
  margin: 6px 0 22px;
}
.quicklinks { margin-bottom: 18px; }
.quicklinks h4 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.quicklinks ul { list-style: none; padding: 0; margin: 0; }
.quicklinks li {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13.5px;
}
.quicklinks li:last-child { border-bottom: 1px solid var(--line); }
.quicklinks li a {
  display: block; color: var(--text);
  transition: color var(--t-fast), padding var(--t-fast);
}
.quicklinks li a:hover { color: var(--ink-900); padding-left: 4px; text-decoration: none; }
.quicklinks .pub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* leaderboard (empty state) */
.leaderboard {
  list-style: none; counter-reset: lb;
  padding: 0; margin: 0 0 22px;
  display: grid; gap: 6px;
}
.leaderboard li {
  counter-increment: lb;
  display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  background: var(--card);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  text-align: left;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}
.leaderboard li::before {
  content: counter(lb);
  font-size: 11px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.leaderboard li:hover { transform: translateY(-1px); border-color: var(--ink-700); box-shadow: var(--shadow-sm); }
.leaderboard .lb-name { font-weight: 600; color: var(--ink); }
.leaderboard .lb-date { color: var(--ink-700); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.leaderboard .lb-dot { width: 8px; height: 8px; border-radius: 50%; }

/* methodology */
.methodology {
  margin: 8px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.methodology > summary {
  cursor: pointer; list-style: none;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
  display: flex; align-items: center; gap: 6px;
}
.methodology > summary::-webkit-details-marker { display: none; }
.methodology > summary::after {
  content: '+'; margin-left: auto;
  font-size: 16px; font-weight: 400; color: var(--muted);
  transition: transform var(--t-base);
}
.methodology[open] > summary::after { content: '−'; }
.methodology ul { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 8px; }
.methodology li {
  font-size: 13px; color: var(--text); line-height: 1.5;
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline;
}
.methodology li .m-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.methodology li .m-tag.green { background: var(--green-soft); color: var(--green-deep); }
.methodology li .m-tag.amber { background: var(--amber-soft); color: var(--amber-deep); }
.methodology li .m-tag.red { background: var(--red-soft); color: var(--red-deep); }
.methodology-note { font-size: 12px; color: var(--muted); margin: 8px 0 4px; }

.detail-content { animation: fadeIn 280ms ease-out both; }
.detail-content .country-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.flag-box {
  width: 42px; height: 30px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f0f2f5 0%, #e3e6ec 100%);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-700);
  border: 1px solid var(--line);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.04em;
}
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.status-badge.status-green { background: var(--green-soft); color: var(--green-deep); }
.status-badge.status-amber { background: var(--amber-soft); color: var(--amber-deep); }
.status-badge.status-red { background: var(--red-soft); color: var(--red-deep); }

.detail-content .headline {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.3;
}
.detail-content .summary {
  color: var(--text);
  margin: 0 0 18px;
}

.section-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}
.dates {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.dates li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.dates li:hover { border-color: var(--line); }
.dates li .d-label { color: var(--text); }
.dates li .d-date { color: var(--ink-700); font-weight: 600; font-variant-numeric: tabular-nums; }

.sources {
  list-style: none;
  padding: 0; margin: 0;
  border-top: 1px solid var(--line);
}
.sources li {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.sources a {
  display: block;
  font-weight: 500;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  transition: color var(--t-fast), padding var(--t-fast);
}
.sources a:hover { color: var(--ink-700); padding-left: 4px; text-decoration: none; }
.sources .pub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* ---------- grid section ---------- */
.grid-section {
  max-width: var(--max);
  margin: 0 var(--gutter) 48px;
}
@media (min-width: 1432px) { .grid-section { margin: 0 auto 48px; } }

.grid-head {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  position: sticky; top: 56px; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.grid-head h2 { font-size: 19px; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar input[type=search] {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
  width: 220px;
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.filter-bar input[type=search]:focus {
  outline: none;
  border-color: var(--ink-700);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20,55,95,0.12);
}

.filter-pills { display: flex; gap: 4px; }
.pill {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--t-fast);
  font-family: inherit;
}
.pill:hover { background: var(--bg); }
.pill.is-active {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }

.sort-wrap {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.sort-label { font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.sort-wrap select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 6px 28px 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6373' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--t-fast);
}
.sort-wrap select:focus { outline: none; border-color: var(--ink-700); box-shadow: 0 0 0 3px rgba(20,55,95,0.12); }

.country-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.c-card {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--card);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  display: flex; flex-direction: column; gap: 6px;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.c-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.c-card:focus-visible {
  outline: 2px solid var(--ink-700);
  outline-offset: 2px;
}
.c-card.is-selected {
  outline: 2px solid var(--ink-900);
  outline-offset: -1px;
  box-shadow: var(--shadow-md);
}
.c-card.s-green { border-left-color: var(--green); }
.c-card.s-amber { border-left-color: var(--amber); }
.c-card.s-red { border-left-color: var(--red); }
.c-card .c-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.c-card .c-name {
  font-weight: 600; font-size: 15px; color: var(--ink);
}
.c-card .c-code {
  font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.c-card .c-headline {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.c-card .c-verified {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.c-card .c-verified-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--green-soft, #d8efe1);
  color: var(--green-deep, #094838);
  font-size: 9px;
  font-weight: 700;
}
.c-card.is-hidden { display: none; }

.verified-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-soft, #d8efe1);
  color: var(--green-deep, #094838);
  font-size: 12px;
  font-weight: 500;
}
.verified-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--green-deep, #094838);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.verified-text strong { font-weight: 600; }
.verified-summary {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

/* ---------- footer ---------- */
.site-footer {
  background: linear-gradient(165deg, var(--ink-800) 0%, var(--ink-900) 100%);
  color: rgba(255,255,255,0.85);
  padding: clamp(36px, 5vw, 56px) var(--gutter) clamp(28px, 4vw, 40px);
  margin-top: 24px;
}
.foot-inner { max-width: var(--max); margin: 0 auto; }

/* ---------- discuss CTA band (sits between hero and main) ---------- */
.discuss-band {
  max-width: var(--max);
  margin: 24px auto 0;
  padding: 0 var(--gutter);
}
.discuss-cta {
  display: flex; align-items: center; gap: 24px;
  padding: 28px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}
.discuss-cta-text { flex: 1; min-width: 280px; }
.discuss-cta-text h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.discuss-cta-text p {
  color: var(--muted);
  margin: 0;
  font-size: 14.5px;
  max-width: 560px;
}
.discuss-cta-text .discuss-cta-note {
  margin-top: 10px;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.005em;
}

.foot-disclaimer {
  font-size: 13px; margin: 0; opacity: 0.6; max-width: 720px;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .header-pitch { display: none; }
}

@media (max-width: 720px) {
  .profile-bar {
    padding: 10px 14px;
    gap: 8px;
  }
  .header-right { gap: 8px; }
  .profile { padding: 4px 6px 4px 4px; min-width: 0; flex: 1 1 auto; }
  .profile-text { min-width: 0; flex: 1; overflow: hidden; }
  .profile-name {
    font-size: 13.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .avatar { width: 38px; height: 38px; font-size: 14px; }
  .profile-cta {
    font-size: 11.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .cta-meeting {
    font-size: 12.5px;
    padding: 9px 14px;
    gap: 6px;
    flex-shrink: 0;
  }

  .hero { padding: 40px 16px 32px; }
  .status-stamp { padding: 18px 24px; }

  .map-wrap { padding: 12px; min-height: 380px; }
  #map, .map-wrap { height: auto; }
  #map { height: 380px; }

  .detail-card { padding: 18px; min-height: 0; }
  .grid-section { margin: 0 16px 32px; }
  .country-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .grid-head { padding: 14px 16px; }
  .filter-bar input[type=search] { width: 100%; }
  .filter-bar { width: 100%; }
  .filter-pills { width: 100%; }
  .pill { flex: 1; justify-content: center; }

  .discuss-cta { padding: 22px 20px; gap: 16px; }
  .cta-meeting--lg { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  /* Below ~560px, swap CTA copy to "Book a meeting" via JS-replaced text;
     keep the LinkedIn subtitle short. */
  .profile-cta .cta-text-long { display: none; }
  .profile-cta .cta-text-short { display: inline; }
  .cta-meeting .cta-text-long { display: none; }
  .cta-meeting .cta-text-short { display: inline; }
}
@media (min-width: 561px) {
  .profile-cta .cta-text-short { display: none; }
  .cta-meeting .cta-text-short { display: none; }
}

@media (max-width: 400px) {
  .profile-bar {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .profile { flex: 1 1 100%; }
  .cta-meeting { flex: 1 1 100%; justify-content: center; }
}

/* Dark gradient & legend wrap on narrow */
@media (max-width: 600px) {
  .card-head { padding: 14px 16px; }
  .legend { gap: 10px; }
  .legend-item { font-size: 12px; }
}

/* High-DPI: keep map crisp */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .country { stroke-width: 0.75; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   Week-over-week timeline (header + rail + movers strip)
   ============================================================ */
.timeline-card {
  max-width: var(--max);
  margin: 0 auto 12px;
  padding: 18px var(--gutter) 0;
}
.timeline-card .tl-head {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  gap: 24px;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.timeline-card .tl-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-700);
  font-weight: 600;
}
.timeline-card .tl-title h2 {
  font-size: 20px;
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.timeline-card .tl-rail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  justify-content: flex-end;
}
.timeline-card .tl-line {
  flex: 0 0 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--line), var(--bg-alt));
  align-self: center;
  margin: 0 -2px;
}
.timeline-card .tl-dot {
  position: relative;
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 8px 14px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  font-family: inherit;
}
.timeline-card .tl-dot:hover { border-color: var(--ink-600); color: var(--ink); transform: translateY(-1px); }
.timeline-card .tl-dot.is-active {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
  box-shadow: var(--shadow-md);
}
.timeline-card .tl-dot.is-active .tl-dot-bullet { background: var(--accent); }
.timeline-card .tl-dot-bullet {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink-600);
}
.timeline-card .tl-dot.is-current .tl-dot-bullet { box-shadow: 0 0 0 3px rgba(7,198,144,0.25); }
.timeline-card .tl-dot-badge {
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: -2px;
}
.timeline-card .tl-week-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  padding: 14px 22px 0;
  font-size: 14px;
  color: var(--muted);
}
.timeline-card .tl-week-meta strong { color: var(--ink); font-weight: 700; }
.timeline-card .tl-tally .t-green { color: var(--green-deep); font-weight: 700; }
.timeline-card .tl-tally .t-amber { color: var(--amber-deep); font-weight: 700; }
.timeline-card .tl-tally .t-red   { color: var(--red-deep);   font-weight: 700; }
.timeline-card .tl-movers-count {
  margin-left: auto;
  font-weight: 600;
  color: var(--ink-700);
}

.movers {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.movers .mv-empty {
  margin: 0;
  padding: 14px 18px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}
.mover {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  transition: all var(--t-fast);
  font-family: inherit;
  color: inherit;
  box-shadow: var(--shadow-xs);
}
.mover:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--ink-600); }
.mover .mv-arrow {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.mover.mv-down .mv-arrow { background: var(--red-soft); color: var(--red-deep); }
.mover.mv-up   .mv-arrow { background: var(--green-soft); color: var(--green-deep); }
.mover.mv-strengthened .mv-arrow,
.mover.mv-flat .mv-arrow { background: var(--accent-soft); color: var(--accent-deep); }
.mv-body { display: grid; gap: 4px; min-width: 0; }
.mv-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.mv-tier { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.mv-from, .mv-to {
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.mv-from.t-green, .mv-to.t-green { background: var(--green-soft); color: var(--green-deep); }
.mv-from.t-amber, .mv-to.t-amber { background: var(--amber-soft); color: var(--amber-deep); }
.mv-from.t-red,   .mv-to.t-red   { background: var(--red-soft);   color: var(--red-deep); }
.mv-sep { color: var(--muted); font-weight: 700; }
.mv-headline { font-size: 13px; color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .timeline-card .tl-head { grid-template-columns: 1fr; gap: 12px; }
  .timeline-card .tl-rail { justify-content: flex-start; flex-wrap: wrap; gap: 4px; }
  .timeline-card .tl-line { flex: 0 0 18px; }
  .timeline-card .tl-week-meta { padding: 14px 18px 0; }
  .timeline-card .tl-movers-count { margin-left: 0; width: 100%; }
}

/* ============================================================
   Per-card mover badge in the country grid + map highlight
   ============================================================ */
.c-card .c-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
}
.c-card .c-change-down { background: var(--red-soft);   color: var(--red-deep); }
.c-card .c-change-up   { background: var(--green-soft); color: var(--green-deep); }
.c-card .c-change span:first-child { font-size: 13px; line-height: 1; }

.country.mover-down { stroke: var(--red-deep);   stroke-width: 1.6; }
.country.mover-up   { stroke: var(--green-deep); stroke-width: 1.6; }

/* Tooltip change pill */
.tt-change {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.tt-change.tt-down { color: var(--red-soft); }
.tt-change.tt-up   { color: var(--green-soft); }

/* ============================================================
   Country-detail history strip
   ============================================================ */
.ch-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.ch-track li { margin: 0; }
.ch-step {
  display: grid;
  grid-template-columns: 60px 14px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: all var(--t-fast);
}
.ch-step:hover { border-color: var(--ink-600); background: var(--bg); }
.ch-step.is-active { border-color: var(--ink-900); background: var(--ink-900); color: #fff; }
.ch-step.is-active .ch-week { color: rgba(255,255,255,0.8); }
.ch-week { font-weight: 700; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.ch-dot {
  width: 12px; height: 12px; border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
  justify-self: center;
}
.ch-dot.t-green { background: var(--green); }
.ch-dot.t-amber { background: var(--amber); }
.ch-dot.t-red   { background: var(--red); }
.ch-headline { font-size: 13px; line-height: 1.35; }

/* ============================================================
   Historical-view stamp (banner + back-to-current button)
   ============================================================ */
body.viewing-historical .hero-stamp {
  background: rgba(7,198,144,0.12);
  border: 1px dashed rgba(7,198,144,0.35);
  border-radius: var(--radius);
  padding: 6px 12px;
}
.historic-pill {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent);
  color: var(--ink-900);
  font-weight: 800;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-right: 6px;
}
.link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink-700);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink-900); }
.historic-note {
  margin: 8px 0 0;
  padding: 8px 12px;
  background: rgba(7,198,144,0.08);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
}
