/* ============================================================
   World Cup Pulse — hi-fi styling on top of Ultrahuman tokens.
   Dark canvas, charcoal cards, color = data only.
   ============================================================ */

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

/* ── Brand overrides on DS card ── */
.card {
  background: var(--ink-900) !important;
  border-color: var(--stroke-1) !important;
}
.card.is-click:hover { border-color: var(--stroke-2) !important; }

body {
  background: #0E1013;
  color: var(--fg-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  --accent: #4FCF8C;
  --pad: 24px;
  --gap: 16px;
  overscroll-behavior: none;
}

/* ── Ultraverse scrollbar — hidden by default, thin white on hover ── */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar { width: 0; height: 0; background: transparent; display: none; }
*:hover::-webkit-scrollbar { width: 6px; height: 6px; display: block; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.4); }
*::-webkit-scrollbar-corner { background: transparent; }
body.den-compact { --pad: 16px; --gap: 12px; }
body.den-roomy   { --pad: 30px; --gap: 22px; }

/* faint top radial glow */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  display: block;
  background: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(79,207,140,0.04) 0%, transparent 70%);
}

/* review chrome (not part of product) */
.review-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  background: rgba(0,0,0,0.96); backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--stroke-1);
}
.review-bar .tag {
  font: 700 10.5px/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-1); background: var(--ink-700); border: 1px solid var(--stroke-2);
  padding: 5px 10px; border-radius: var(--r-pill); white-space: nowrap; flex-shrink: 0;
}
.surface-nav { display: inline-flex; gap: 2px; background: var(--ink-800); border: 1px solid var(--stroke-1); border-radius: var(--r-pill); padding: 3px; }
.surface-nav a { font: 600 11.5px/1 var(--font-sans); color: var(--fg-3); text-decoration: none; padding: 6px 12px; border-radius: var(--r-pill); transition: color var(--dur-fast), background var(--dur-fast); letter-spacing: .02em; }
.surface-nav a:hover { color: var(--fg-1); background: rgba(255,255,255,0.05); }
.surface-nav a.active { background: rgba(79,207,140,0.1); color: var(--uh-green); }
.review-bar .spacer { flex: 1; }
.vp-seg { display: inline-flex; background: var(--ink-800); border: 1px solid var(--stroke-1); border-radius: var(--r-pill); padding: 3px; }
.vp-seg button { appearance: none; border: 0; background: transparent; color: var(--fg-3); font: 600 11.5px/1 var(--font-sans); padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer; transition: all var(--dur-fast); letter-spacing: .02em; }
.vp-seg button:hover { color: var(--fg-1); background: rgba(255,255,255,0.05); }
.vp-seg button[aria-pressed="true"] { background: rgba(79,207,140,0.1); color: var(--uh-green); }

/* ---- viewport staging ---- */
.stage { position: relative; z-index: 1; display: flex; justify-content: center; padding: 28px 22px 96px; transition: padding var(--dur); }
.viewport { width: 100%; max-width: 1180px; transition: max-width var(--dur) var(--ease-out); }
body[data-vp="mobile"] .stage { padding-top: 36px; }
body[data-vp="mobile"] .viewport {
  max-width: 402px;
  border: 10px solid #0d0d0d; border-radius: 46px;
  box-shadow: 0 0 0 2px var(--stroke-2), 0 40px 90px rgba(0,0,0,0.7);
  overflow: hidden; background: #000;
}
body[data-vp="mobile"] .notch { display: flex; }
.notch { display: none; height: 30px; align-items: center; justify-content: center; }
.notch i { width: 120px; height: 7px; border-radius: 99px; background: #000; box-shadow: inset 0 0 0 1px var(--stroke-2); }

/* ---- product header ---- */
.uh-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad) 12px;
}
.brandmark { display: flex; align-items: center; gap: 11px; }
.brandmark .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--white); position: relative; }
.brandmark .dot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); }
.brandmark b { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brandmark span { display: block; font: 600 9px/1.2 var(--font-sans); letter-spacing: .15em; text-transform: uppercase; color: var(--fg-3); margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.howlink { font: 500 12px/1 var(--font-sans); color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--stroke-2); padding-bottom: 2px; }
.howlink:hover { color: var(--fg-1); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink-600); border: 1px solid var(--stroke-2); }

/* honesty strip — element removed; styles cleared */
.honesty { display: none; }

/* ---- grid scaffold ---- */
.content {
  padding: 0 !important;
  display: block !important;
  height: calc(100vh - 48px);
  position: relative;
  overflow: hidden;
}
.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: 1.15fr 0.85fr; }
.cols-2e { grid-template-columns: 1fr 1fr; }
body[data-vp="mobile"] .cols-2, body[data-vp="mobile"] .cols-2e { grid-template-columns: 1fr; }

.card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-lg); box-shadow: none; padding: var(--pad); position: relative; }
.card.is-click { cursor: pointer; transition: border-color var(--dur-fast); }
.card.is-click:hover { border-color: rgba(255,255,255,0.12); }
.card.is-click:active { opacity: 0.82; }
.card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.eyebrow { font: 600 11px/1.2 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }

/* ---- HERO ---- */
.hero { padding: 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 0; }
body[data-vp="mobile"] .hero-grid { grid-template-columns: 1fr; }
.hero-ringwrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px 24px; background: none; border-right: 1px solid rgba(255,255,255,0.06); }
body[data-vp="mobile"] .hero-ringwrap { border-right: 0; border-bottom: 1px solid var(--stroke-1); }
.ring-stack { position: relative; display: grid; place-items: center; }
.ring-center { position: absolute; text-align: center; }
.ring-center .delta { font-family: var(--font-display); font-weight: 800; font-size: 58px; line-height: 0.9; letter-spacing: -0.03em; color: var(--fg-1); text-shadow: 0 0 28px rgba(79,207,140,0.18); }
.ring-center .delta.is-positive { color: var(--uh-green); text-shadow: 0 0 32px rgba(79,207,140,0.55), 0 0 8px rgba(79,207,140,0.35); }
.ring-center .delta-lab { font: 600 10px/1.3 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-top: 6px; }
.ring-legend { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--fg-3); }
.ring-legend .swatch { display: inline-flex; align-items: center; gap: 6px; }
.ring-legend .sq { width: 10px; height: 10px; border-radius: 3px; }

.hero-body { padding: 28px var(--pad); display: flex; flex-direction: column; gap: 18px; }
.hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scoreline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scoreline .flag { border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.scoreline .vs { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.scoreline .code { font: 700 13px/1 var(--font-sans); letter-spacing: .04em; color: var(--fg-2); }
.hero-headline { font-weight: 700; font-size: 27px; line-height: 1.12; letter-spacing: -0.02em; max-width: 22ch; text-wrap: balance; }
body[data-vp="mobile"] .hero-headline { font-size: 22px; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
body[data-vp="mobile"] .metric-row { grid-template-columns: repeat(2, 1fr); }
.metric { border: 1px solid rgba(255,255,255,0.05); border-radius: var(--r-md); padding: 12px 13px; background: rgba(255,255,255,0.02); }
.metric .m-lab { font: 600 9px/1.2 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); display: flex; align-items: center; gap: 5px; }
.metric .m-lab .ic { width: 6px; height: 6px; border-radius: 50%; }
.metric .m-val { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; margin-top: 7px; font-variant-numeric: tabular-nums; color: var(--fg-1); }
.metric .m-sub { font: 500 10px/1 var(--font-sans); color: var(--fg-3); margin-top: 3px; }
.metric .m-sub.m-bad  { color: rgba(253,148,0,0.8); }
.metric .m-sub.m-good { color: rgba(37,198,112,0.8); }

/* ---- chips / pills ---- */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: var(--r-pill); background: var(--ink-700); border: 1px solid var(--stroke-1); font: 600 11px/1 var(--font-sans); color: var(--fg-2); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip.ghost { background: transparent; }
.flag { display: inline-block; flex: 0 0 auto; border-radius: 3px; }

/* ─── Match selector (replaces scrubber) ──────────────────────────────────── */
.match-selector-wrap {
  padding: var(--pad) var(--pad) calc(var(--pad) - 4px);
}
.ms-label {
  margin-bottom: 12px;
}
.match-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.match-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke-1);
  background: var(--ink-900);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
  min-width: 72px;
}
.match-btn:hover {
  background: var(--ink-800);
  border-color: var(--stroke-2);
}
.match-btn.active {
  background: rgba(79,207,140,0.08);
  border-color: rgba(79,207,140,0.35);
}
.mb-date {
  font: 700 11px/1 var(--font-sans);
  letter-spacing: .06em;
  color: var(--fg-2);
}
.mb-round {
  font: 500 10px/1 var(--font-sans);
  color: var(--fg-3);
  letter-spacing: .03em;
}
.match-btn.active .mb-date { color: var(--accent); }
.match-btn.active .mb-round { color: rgba(79,207,140,0.6); }
.ms-current {
  margin-top: 10px;
  font: 600 13px/1 var(--font-sans);
  color: var(--fg-2);
  letter-spacing: .02em;
}

/* ---- leaderboard ---- */
.lb-tabs { display: inline-flex; gap: 4px; }
.lb-tabs button { appearance: none; border: 0; background: transparent; color: var(--fg-3); font: 600 11px/1 var(--font-sans); padding: 6px 10px; border-radius: var(--r-pill); cursor: pointer; transition: all var(--dur-fast); }
.lb-tabs button[aria-pressed="true"] { background: var(--ink-700); color: var(--fg-1); }
.lb-list { display: flex; flex-direction: column; }
.lb-row { display: grid; grid-template-columns: 22px 30px minmax(0,1fr) 90px 62px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stroke-1); cursor: pointer; transition: transform 480ms var(--ease-out), opacity 480ms, background var(--dur-fast); border-radius: 4px; }
.lb-row:hover { background: rgba(255,255,255,0.03); }
.lb-row:last-child { border-bottom: 0; }
.lb-row:hover .lb-name { color: var(--fg-1); }
.lb-rank { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--fg-3); text-align: center; }
.lb-row[data-top="1"] .lb-rank { color: var(--accent); }
.lb-name { font: 600 13px/1.2 var(--font-sans); color: var(--fg-2); transition: color var(--dur-fast); }
.lb-name small { display: block; font: 500 10px/1 var(--font-sans); color: var(--fg-3); margin-top: 3px; letter-spacing: .04em; text-transform: uppercase; }
.lb-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.lb-bar { height: 4px; border-radius: 4px; transition: width 520ms var(--ease-out); }
.lb-val { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
body[data-vp="mobile"] .lb-row { grid-template-columns: 20px 26px minmax(0,1fr) 56px; }
body[data-vp="mobile"] .lb-track { display: none; }

/* ---- host module ---- */
.host-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.host-side { border: 1px solid rgba(255,255,255,0.05); border-radius: var(--r-md); padding: 18px 16px; text-align: center; background: rgba(255,255,255,0.02); transition: border-color var(--dur-fast), background var(--dur-fast); }
.host-side:hover { background: rgba(255,255,255,0.035); border-color: rgba(255,255,255,0.1); }
.host-side .h-lab { font: 600 10px/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 14px; }
.host-mini-ring { position: relative; display: grid; place-items: center; margin: 0 auto; }
.host-mini-ring .v { position: absolute; font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.host-side .h-stats { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
body[data-vp="mobile"] .host-grid { grid-template-columns: 1fr; }

/* ---- derived stories ---- */
.story .chart { height: 130px; margin-top: 8px; }
.story .big { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; }
.story p { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--fg-3); max-width: 42ch; }

/* ---- coverage ---- */
.cov-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
body[data-vp="mobile"] .cov-grid { grid-template-columns: repeat(3, 1fr); }
.cov-cell { border: 1px solid rgba(255,255,255,0.05); border-radius: var(--r-md); padding: 12px 10px; background: rgba(255,255,255,0.02); }
.cov-cell.locked { border-style: dashed; border-color: var(--stroke-1); opacity: 0.5; }
.cov-cell .flag { margin-bottom: 9px; }
.cov-cell .c-name { font: 600 11px/1 var(--font-sans); color: var(--fg-2); }
.cov-cell .c-n { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; margin-top: 6px; }
.cov-cell .c-sub { font: 500 9px/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-top: 3px; }
.cov-cell.locked .c-sub { color: var(--fg-3); }

/* ---- match detail sheet ---- */
.overlay { position: fixed; inset: 0; z-index: 100; display: none; }
.overlay.open { display: block; }
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--dur); }
.overlay.open .scrim { opacity: 1; }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); background: var(--ink-900); border-left: 1px solid var(--stroke-2); box-shadow: var(--shadow-pop); overflow-y: auto; transform: translateX(40px); opacity: 0; transition: transform var(--dur) var(--ease-out), opacity var(--dur); }
.overlay.open .sheet { transform: none; opacity: 1; }
body[data-vp="mobile"] .sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 90%; border-left: 0; border-top: 1px solid var(--stroke-2); border-radius: 26px 26px 0 0; transform: translateY(60px); }
.sheet-hd { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: rgba(16,16,16,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--stroke-1); }
.sheet-x { appearance: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stroke-2); background: var(--ink-700); color: var(--fg-1); cursor: pointer; font-size: 16px; transition: background var(--dur-fast); }
.sheet-x:hover { background: var(--ink-600); }
.sheet-bd { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.cohort-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cohort-card { border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-md); padding: 16px; text-align: center; }
.cohort-card.win { border-color: rgba(79,207,140,0.4); }
.cohort-card.lose { border-color: rgba(253,148,0,0.4); }
.cohort-card .role { font: 600 9px/1.2 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 10px; }
.cohort-card .name { font: 700 14px/1 var(--font-sans); margin-top: 12px; }
.dev-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.dev-cell { border: 1px solid rgba(255,255,255,0.05); border-radius: var(--r-sm); padding: 12px 8px; text-align: center; background: rgba(255,255,255,0.02); }
.dev-cell .v { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.dev-cell .l { font: 600 8px/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-top: 5px; }
.trace-box { height: 180px; }
.note-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.05); border-radius: var(--r-md); background: rgba(255,255,255,0.02); }
.note-row p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--fg-2); }

/* utility */
.muted { color: var(--fg-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-pill); font: 600 14px/1 var(--font-sans); border: 1px solid transparent; cursor: pointer; transition: transform var(--dur-fast), opacity var(--dur-fast), background var(--dur-fast); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--white); color: #000; }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--fg-1); border-color: var(--stroke-2); }
.btn-ghost:hover { background: var(--ink-700); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; }
}

/* ─── Insights strip (Ultraverse "thoughts" style) ─────────────────────────── */
.insights-wrap {
  padding: 4px 0 2px;
}
.insights-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.insights-hd .eyebrow { flex: 1; }

.insights-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  transition: opacity 120ms ease;
}
.insights-scroll::-webkit-scrollbar { display: none; }
.insights-scroll.ins-transitioning { opacity: 0; }

.insight-card {
  flex: 0 0 auto;
  width: 200px;
  background: var(--ink-900);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid color-mix(in srgb, var(--ic-color, #fff) 40%, transparent);
  border-radius: 14px;
  padding: 16px 16px 18px;
  position: relative;
  overflow: hidden;
  cursor: default;
  animation: ins-fadein 340ms var(--ease-out) both;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.insight-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  border-top-color: color-mix(in srgb, var(--ic-color, #fff) 70%, transparent);
}
@keyframes ins-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* subtle glow behind card */
.ic-glow { display: none; }

.ic-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.ic-icon { font-size: 14px; line-height: 1; }
.ic-label {
  font: 600 10px/1 var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.ic-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.ic-text {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--fg-3);
}

.insight-card.ins-good { border-left-color: var(--ic-color); }
.insight-card.ins-bad  { border-left-color: var(--ic-color); }

/* ---- world map card ---- */
.map-card { padding: 0; overflow: hidden; max-width: 960px; margin: 0 auto; width: 100%; }
.map-legend { display:flex; gap:18px; padding:14px var(--pad); flex-wrap:wrap; justify-content:center; }
.map-legend span { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--fg-2); letter-spacing:.04em; text-transform:uppercase; }
.ml-swatch { display:inline-block; width:9px; height:9px; border-radius:2px; }
.ml-orange { background:#E0A35C; }
.ml-teal   { background:#4FCF8C; }
.ml-blue   { background:rgba(110,144,196,0.85); border-radius:50%; }
#map-container {
  width:100%; height:480px;
  background: #0E1013;
}
body[data-vp="mobile"] #map-container { height:300px; }
/* In fullscreen canvas mode, use explicit pixel height set by JS */
.wc-canvas #map-container { height: 100% !important; min-height: 100% !important; }
.map-fallback { display:flex; align-items:center; justify-content:center; height:100%; padding:30px; text-align:center; color:var(--fg-3); font-size:13px; line-height:1.5; }

/* ── Refresh button ── */
.refresh-btn {
  background: transparent;
  border: 1px solid var(--stroke-2);
  color: var(--fg-2);
  font: 500 11px/1 var(--font-body, sans-serif);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s, border-color 0.15s;
}
.refresh-btn:hover { color: var(--fg-1); border-color: var(--stroke-1); }
.refresh-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Pipeline progress overlay ── */
#pipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 8888;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
}
#pipe-overlay.visible { display: flex; }

.pipe-modal {
  background: var(--ink-900);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  width: min(680px, 94vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pipe-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pipe-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--uh-green, #25C670);
  border-radius: 50%;
  animation: pipe-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes pipe-spin { to { transform: rotate(360deg); } }

.pipe-title { font-size: 14px; font-weight: 600; color: var(--fg-1); }
.pipe-sub   { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

/* Step tracker */
.pipe-steps {
  display: flex;
  gap: 0;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pipe-steps [data-step] {
  flex: 1;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  padding: 5px 4px;
  color: rgba(255,255,255,0.2);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipe-steps [data-step][data-state="active"] {
  color: var(--uh-green, #25C670);
  border-bottom-color: var(--uh-green, #25C670);
}
.pipe-steps [data-step][data-state="done"] {
  color: rgba(255,255,255,0.45);
  border-bottom-color: rgba(255,255,255,0.12);
}

/* Log window */
.pipe-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px 22px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 11px;
  line-height: 1.55;
  max-height: 340px;
  min-height: 160px;
}
.pipe-line { color: rgba(255,255,255,0.38); white-space: pre; }
.pipe-line.ok  { color: rgba(37,198,112,0.85); }
.pipe-line.err { color: rgba(255,90,80,0.9); }
.pipe-line.hd  { color: rgba(255,255,255,0.7); font-weight: 600; margin-top: 6px; }
.pipe-line.bar { color: rgba(100,180,255,0.7); font-weight: 500; }

.pipe-status {
  padding: 12px 22px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.06);
  min-height: 40px;
}
.pipe-status.ok  { color: rgba(37,198,112,0.9); }
.pipe-status.err { color: rgba(255,90,80,0.9); }

body[data-vp="mobile"] .cohort-2 { grid-template-columns: 1fr; }

/* ─── Tab nav (review bar) ─────────────────────────────────────────────────── */
.uh-bar-logo { display:flex; align-items:center; flex-shrink:0; }
.uh-bar-logo img { display:block; }

.tab-nav {
  display: inline-flex;
  gap: 2px;
  background: var(--ink-800);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-pill);
  padding: 3px;
}
.tab-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg-3);
  font: 600 11.5px/1 var(--font-sans);
  padding: 6px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast);
  letter-spacing: .02em;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--fg-1); background: rgba(255,255,255,0.05); }
.tab-btn[aria-pressed="true"] { background: rgba(79,207,140,0.1); color: var(--uh-green); }

/* ─── Data checkpoint strip ─────────────────────────────────────────────────── */
.data-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--pad);
  font: 500 11px/1 var(--font-sans);
  color: var(--fg-3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.02em;
  background: transparent;
}
.ds-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--uh-green); opacity: 0.7;
  animation: ds-pulse 2.4s ease-in-out infinite;
}
@keyframes ds-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.25; }
}
.ds-sep { color: var(--stroke-2); }
.ds-label { color: var(--fg-3); }
.h-counts { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }

/* ─── Real-device responsiveness (the data-vp toggle only sims a phone) ─── */
@media (max-width: 720px) {
  .review-bar { flex-wrap: wrap; height: auto; padding: 8px 14px; gap: 8px; }
  .surface-nav a { padding: 6px 9px; font-size: 11px; }
  .stage { padding: 18px 12px 60px; }
  .cols-2, .cols-2e { grid-template-columns: 1fr !important; }
  .hero-grid { grid-template-columns: 1fr !important; }
  .hero-ringwrap { border-right: 0 !important; border-bottom: 1px solid var(--stroke-1); }
  .metric-row { grid-template-columns: repeat(2, 1fr) !important; }
  .host-grid { grid-template-columns: 1fr !important; }
  .cov-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .scoreline { flex-wrap: wrap; }
  .hero-headline { font-size: 22px; }
  .ring-center .delta { font-size: 48px; }
  #map-container { height: 300px; }
  .cohort-2 { grid-template-columns: 1fr; }
  .refresh-btn { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   Single-view canvas — world map IS the dashboard
   ══════════════════════════════════════════════════════════════ */

/* Single-view layout: hide header, collapse stage padding */
.uh-header { display: none !important; }
body:not([data-vp="mobile"]) .stage { padding: 0 !important; }
body:not([data-vp="mobile"]) .viewport { max-width: 100% !important; }
body:not([data-vp="mobile"]) .content { height: calc(100vh - 48px) !important; }

/* ── Single-view canvas ── */
.wc-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Map fills canvas as background */
.wc-canvas .map-card {
  position: absolute !important;
  inset: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: transparent !important;
  z-index: 0;
}
.wc-canvas .map-legend {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8,8,10,0.72);
  backdrop-filter: blur(12px);
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.07);
  z-index: 15;
  justify-content: center;
}
.wc-canvas #map-container {
  height: 100% !important;
  width: 100% !important;
}

/* Top glass bar — ultraverse style */
.wc-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid #313131;
  z-index: 20;
}
.wc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wc-brand-sep {
  color: rgba(255,255,255,0.2);
  font-size: 14px;
}
.wc-brand-title {
  font: 700 12px/1 var(--font-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.wc-live {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 600 11px/1 var(--font-sans);
  color: var(--fg-2);
}

/* Glass side panels — ultraverse style: lighter glass, #313131 border */
.wc-panel {
  position: absolute;
  top: 60px;
  bottom: 68px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid #313131;
  border-radius: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 10;
}
.wc-panel::-webkit-scrollbar { display: none; }

.wc-left {
  left: 14px;
  width: clamp(280px, 28vw, 380px);
}
.wc-right {
  right: 14px;
  width: clamp(240px, 24vw, 320px);
}

/* Kill every DS background inside panels so the map shows through */
.wc-panel .card,
.wc-panel .metric,
.wc-panel .hero-ringwrap,
.wc-panel .hero-body,
.wc-panel .ring-legend,
.wc-panel .hero-meta,
.wc-panel .card-hd,
.wc-panel .lb-row,
.wc-panel .lb-list,
.wc-panel .insights-wrap {
  background: transparent !important;
  border-color: rgba(255,255,255,0.06) !important;
}
.wc-panel .card {
  border: 0 !important;
  border-radius: 0 !important;
}
.wc-panel .metric {
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 10px !important;
}

/* Hero inside left panel: stack vertically */
.wc-left .hero-grid {
  grid-template-columns: 1fr !important;
}
.wc-left .hero-ringwrap {
  border-right: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 20px 20px 16px !important;
}
.wc-left .hero-body {
  padding: 16px 20px 20px !important;
  gap: 14px !important;
}
.wc-left .metric-row {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* Match selector — bottom glass bar */
.wc-canvas .match-selector-wrap {
  position: absolute !important;
  bottom: 0; left: 0; right: 0;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid #313131;
  z-index: 20;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.wc-canvas .match-selector-wrap::-webkit-scrollbar { display: none; }
.wc-canvas .ms-label { display: none; }
.wc-canvas .match-btns {
  gap: 5px;
  flex-wrap: nowrap;
  min-width: max-content;
}
.wc-canvas .match-btn {
  padding: 7px 10px;
  border-radius: 8px;
  min-width: auto;
  flex-shrink: 0;
}
.wc-canvas .mb-date {
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.wc-canvas .mb-match {
  font: 700 12px/1 var(--font-sans);
  color: var(--fg-1);
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mb-flag { font-size: 14px; line-height: 1; }
.mb-vs {
  font: 500 9px/1 var(--font-sans);
  color: var(--fg-3);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mb-score {
  font: 700 10px/1 var(--font-sans);
  color: var(--accent);
  letter-spacing: .02em;
  margin-top: 2px;
}
.wc-canvas .match-btn {
  position: relative;
  overflow: hidden;
}
.wc-canvas .match-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,207,140,0) 0%, rgba(79,207,140,0.04) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.wc-canvas .match-btn:hover::before { opacity: 1; }
.wc-canvas .match-btn.active {
  background: rgba(79,207,140,0.08) !important;
  border-color: rgba(79,207,140,0.28) !important;
}
.wc-canvas .match-btn.active .mb-date { color: rgba(79,207,140,0.55); }
.wc-canvas .match-btn.active .mb-match { color: var(--accent); }

/* Leaderboard inside right panel */
.wc-right .lb-row {
  padding: 9px 0;
}
.wc-right .card-hd {
  padding: 18px 20px 0;
}
.wc-right .lb-list {
  padding: 0 16px 16px;
}

/* Mobile: stack panels below the map */
body[data-vp="mobile"] .wc-panel {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-height: none;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
body[data-vp="mobile"] .wc-canvas {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
body[data-vp="mobile"] .wc-canvas .map-card {
  position: relative !important;
  height: 280px;
  flex-shrink: 0;
}
body[data-vp="mobile"] .wc-canvas #map-container {
  height: 280px !important;
}
body[data-vp="mobile"] .wc-top-bar { position: relative; }
body[data-vp="mobile"] .wc-canvas .match-selector-wrap { position: relative !important; }

/* ── Hide tweaks panel in fullscreen map view ── */
#tweaks-root { display: none !important; }

/* ── Stadium proximity widget (floats on map between panels) ── */
.wc-proximity {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(4,4,6,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 40px;
  overflow: hidden;
  z-index: 15;
  white-space: nowrap;
}
.wc-prox-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.wc-prox-tab:first-child {
  border-right: 1px solid rgba(255,255,255,0.07);
}
.wc-prox-tab.active {
  background: rgba(79,207,140,0.10);
}
.wc-prox-icon {
  font-size: 14px;
  line-height: 1;
}
.wc-prox-pct {
  font: 800 16px/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg-1);
}
.wc-prox-tab.active .wc-prox-pct { color: var(--accent); }
.wc-prox-label {
  font: 500 9px/1 var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.wc-prox-tab.active .wc-prox-label { color: rgba(79,207,140,0.6); }
.wc-prox-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* ── Map venue dot pulse (Highcharts injects SVG — target via SVG filter) ── */
.wc-canvas #map-container .highcharts-mappoint-series .highcharts-point {
  animation: venue-pulse 2.4s ease-in-out infinite;
}
@keyframes venue-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px rgba(79,207,140,0.8)); }
  50%       { opacity: 0.7; filter: drop-shadow(0 0 10px rgba(79,207,140,1)); }
}

/* ── Legend pill for venues ── */
.ml-green { background: #4FCF8C; }

/* ── Hero card text contrast inside glass ── */
.wc-left .hero-headline {
  font-size: clamp(15px, 1.4vw, 18px) !important;
  line-height: 1.4 !important;
}
.wc-left .eyebrow {
  font-size: 10px !important;
  letter-spacing: .1em !important;
}
.wc-left .metric { padding: 10px !important; }
.wc-left .m-val  { font-size: 20px !important; }

/* ── Right panel label sizing ── */
.wc-right .lb-row { padding: 8px 0 !important; }
.wc-right .lb-name { font-size: 12px !important; }
.wc-right .lb-val  { font-size: 12px !important; }

/* ─────────────────────────────────────────────────────────────────────────
   Compact match pill — floats top-left over the map
───────────────────────────────────────────────────────────────────────── */
.wc-match-pill {
  position: absolute;
  left: 16px;
  top: 66px;
  width: 228px;
  background: rgba(4,4,6,0.76);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 13px 15px;
  z-index: 20;
  pointer-events: none;
}
.mp-teams {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  color: var(--fg-1);
}
.mp-vs {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  padding: 0 2px;
  font-weight: 400;
}
.mp-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mp-rec {
  font-size: 13px;
  font-weight: 700;
  margin-top: 7px;
  letter-spacing: -0.01em;
}
.mp-venue {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
  letter-spacing: .03em;
}
.mp-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  margin-top: 6px;
  line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────────────────
   Country click popup — Jarvis / Iron Man HUD style
───────────────────────────────────────────────────────────────────────── */
@keyframes hud-scan {
  0%   { top: 0; opacity: 0; }
  5%   { opacity: 0.55; }
  95%  { opacity: 0.2; }
  100% { top: 100%; opacity: 0; }
}
@keyframes hud-appear {
  from { opacity: 0; transform: scale(0.92) translateY(8px); clip-path: inset(50% 0 50% 0); }
  to   { opacity: 1; transform: scale(1) translateY(0);      clip-path: inset(0% 0 0% 0); }
}
@keyframes hud-border-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0,200,255,0.25), 0 0 20px rgba(0,200,255,0.08), 0 8px 40px rgba(0,0,0,0.8); }
  50%       { box-shadow: 0 0 0 1px rgba(0,220,255,0.55), 0 0 32px rgba(0,200,255,0.22), 0 8px 40px rgba(0,0,0,0.8); }
}
@keyframes hud-corner-flash {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   Ultraverse country panel
   ═══════════════════════════════════════════════════════ */
.wc-cc-group {
  position: absolute;
  z-index: 200;
  width: 340px;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.wc-cc-group.open { pointer-events: all; }
.wc-cc-group.open .uh-panel,
.wc-cc-group.open .jv-panel {
  animation: cc-pop 260ms cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes cc-pop {
  from { opacity:0; transform:scale(0.94) translateY(10px); }
  to   { opacity:1; transform:scale(1)   translateY(0); }
}

/* card glides in from the docked edge (quick + smooth) */
.wc-cc-group[data-dock="left"]  { animation: cc-slide-l 300ms cubic-bezier(0.16,1,0.3,1) both; }
.wc-cc-group[data-dock="right"] { animation: cc-slide-r 300ms cubic-bezier(0.16,1,0.3,1) both; }
@keyframes cc-slide-l { from { opacity:0; transform: translateX(-14px); } to { opacity:1; transform: none; } }
@keyframes cc-slide-r { from { opacity:0; transform: translateX(14px);  } to { opacity:1; transform: none; } }
.wc-cc-group[data-dock="bottom"] { animation: cc-slide-up 300ms cubic-bezier(0.16,1,0.3,1) both; }
@keyframes cc-slide-up { from { opacity:0; transform: translateY(26px); } to { opacity:1; transform: none; } }

/* Accessibility: honor the OS "reduce motion" setting — neutralize entrances,
   loops (connector dash, live pulse, flicker) and transitions site-wide. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.uh-panel {
  background: rgba(7,8,11,0.97);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  font-family: 'Graphik', -apple-system, BlinkMacSystemFont, sans-serif;
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px rgba(0,0,0,0.85);
  position: relative;
}
/* Colored top accent bar — green by default, overrides if recovery is negative */
.uh-panel::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--uh-green) 0%, rgba(79,207,140,0.3) 100%);
}

.uh-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: rgba(255,255,255,0.4);
  font-size: 13px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 120ms, color 120ms;
  z-index: 10;
}
.uh-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.uh-panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 6px;
}
.uh-country {
  font-size: 14px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(255,255,255,0.9);
}
.uh-reach {
  font-size: 10px; color: rgba(255,255,255,0.25);
  letter-spacing: .04em;
}
.uh-ctx {
  padding: 0 16px 10px;
  font-size: 10.5px; color: rgba(255,255,255,0.3);
  letter-spacing: .02em;
}
.uh-ctx-date { color: rgba(255,255,255,0.18); margin-left: 4px; }
.uh-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0 16px; }

.uh-section {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.uh-section:last-of-type { border-bottom: 0; }

.uh-sec-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.uh-sec-label {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
}
.uh-delta {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
}

/* Comparison bar */
.uh-bar-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.uh-bar-val {
  font-size: 10px; color: rgba(255,255,255,0.35); white-space: nowrap; min-width: 36px;
}
.uh-bar-val:last-child { text-align: right; }
.uh-track {
  flex: 1; height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden; position: relative;
}
.uh-fill {
  position: absolute; top: 0; left: 0; height: 6px;
  border-radius: 3px;
  transition: width 500ms cubic-bezier(0.16,1,0.3,1) 80ms;
}
.uh-fill-base { z-index: 1; }
.uh-fill-match { z-index: 2; opacity: 0.85; }

.uh-bar-legend {
  display: flex; justify-content: space-between;
  font-size: 9px; color: rgba(255,255,255,0.2);
  letter-spacing: .04em; padding: 0 44px;
}

/* Detail rows */
.uh-details { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.uh-detail-row {
  display: flex; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,0.35);
}
.uh-detail-row span:last-child { font-weight: 600; color: rgba(255,255,255,0.6); }
.uh-dim .uh-detail-row span:last-child { color: rgba(255,255,255,0.3); font-weight: 400; }

/* Solo metric (no comparison) */
.uh-metric-solo {
  font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: rgba(255,255,255,0.8);
  margin-bottom: 6px;
}
.uh-unit { font-size: 11px; font-weight: 400; color: rgba(255,255,255,0.3); }
.uh-no-match { font-size: 10.5px; color: rgba(255,255,255,0.22); line-height: 1.5; margin-top: 4px; }

/* Heart section */
.uh-heart-row { display: flex; gap: 20px; }
.uh-heart-col {}
.uh-heart-val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.uh-heart-lab { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,0.3); margin-top: 2px; }
.uh-heart-base { font-size: 9.5px; color: rgba(255,255,255,0.2); margin-top: 1px; }

.uh-science {
  display: block; padding: 10px 16px;
  font-size: 10px; color: rgba(255,255,255,0.2);
  text-decoration: none; border-top: 1px solid rgba(255,255,255,0.04);
  transition: color 120ms;
}
.uh-science:hover { color: rgba(255,255,255,0.5); }

/* ─── Venue spotlight ring on map ──────────────────────────────────────────── */
.venue-spotlight {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 50;
}
.venue-spotlight[style*="bottom"] {
  transform: none;
}
.venue-spotlight::before,
.venue-spotlight::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(79,207,140,0.7);
  border-radius: 50%;
  animation: venue-spotlight-pulse 2s ease-out infinite;
}
.venue-spotlight::before { width: 20px; height: 20px; }
.venue-spotlight::after  { width: 20px; height: 20px; animation-delay: 0.7s; opacity: 0.4; }

@keyframes venue-spotlight-pulse {
  0%   { transform:translate(-50%,-50%) scale(1);   opacity: 0.9; }
  100% { transform:translate(-50%,-50%) scale(3.5); opacity: 0; }
}

.venue-lbl {
  position: absolute;
  left: 50%; top: -38px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(7,8,11,0.92);
  border: 1px solid rgba(79,207,140,0.25);
  border-radius: 6px;
  padding: 4px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.vs-city { font-size: 9px; color: rgba(79,207,140,0.6); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.vs-match { font-size: 10px; color: rgba(255,255,255,0.6); }

/* ── Globe container ───────────────────────────────────────────────────────── */
#map-container canvas {
  display: block !important;
}
.globe-legend {
  position: absolute;
  bottom: 16px; left: 16px;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none; z-index: 10;
}
.gl-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px; color: rgba(255,255,255,0.4);
  font-family: 'Graphik', -apple-system, sans-serif; letter-spacing: .04em;
}
.gl-swatch {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.gl-orange { background: rgba(224,163,92,0.85); }
.gl-teal   { background: rgba(79,207,140,0.85); }
.gl-blue   { background: rgba(110,144,196,0.55); }
.gl-green  { background: rgba(79,207,140,0.85); }

/* ═══════════════════════════════════════════════════════════
   JARVIS Country Card — 3-module biometric panel
   ═══════════════════════════════════════════════════════════ */

.jv-panel {
  position: relative;
  width: 340px;
  background: rgba(3, 9, 18, 0.97);
  border: 1px solid rgba(0, 190, 170, 0.28);
  border-radius: 6px;
  overflow: hidden;
  color: #d8ecf8;
  font-family: 'Graphik', -apple-system, BlinkMacSystemFont, sans-serif;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(0,180,160,0.06),
              0 0 40px rgba(0,180,160,0.07),
              0 24px 64px rgba(0,0,0,0.85);
}
.jv-panel.jv-impact {
  border-color: rgba(255, 110, 20, 0.35);
  box-shadow: 0 0 0 1px rgba(255,100,0,0.06),
              0 0 40px rgba(255,80,0,0.10),
              0 24px 64px rgba(0,0,0,0.85);
}
.jv-panel.jv-positive {
  border-color: rgba(79,207,140,0.28);
  box-shadow: 0 0 0 1px rgba(79,207,140,0.04),
              0 0 40px rgba(79,207,140,0.07),
              0 24px 64px rgba(0,0,0,0.85);
}

/* Scanning line — runs once on open */
.jv-scanline {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(79,207,140,0.85) 20%,
    rgba(79,207,140,1) 50%,
    rgba(79,207,140,0.85) 80%, transparent 100%);
  z-index: 100;
  animation: jv-scan 0.75s ease-in-out forwards;
  pointer-events: none;
}
.jv-panel.jv-impact .jv-scanline {
  background: linear-gradient(90deg,
    transparent 0%, rgba(224,163,92,0.85) 20%,
    rgba(224,163,92,1) 50%,
    rgba(224,163,92,0.85) 80%, transparent 100%);
}
@keyframes jv-scan {
  0%   { top: 0%;   opacity: 1; }
  85%  { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

/* Corner accent brackets */
.jv-corner-tl, .jv-corner-tr, .jv-corner-bl, .jv-corner-br {
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none; z-index: 5;
}
.jv-corner-tl { top: 0; left: 0;
  border-top: 2px solid rgba(79,207,140,0.7);
  border-left: 2px solid rgba(79,207,140,0.7); }
.jv-corner-tr { top: 0; right: 0;
  border-top: 2px solid rgba(79,207,140,0.7);
  border-right: 2px solid rgba(79,207,140,0.7); }
.jv-corner-bl { bottom: 0; left: 0;
  border-bottom: 2px solid rgba(79,207,140,0.7);
  border-left: 2px solid rgba(79,207,140,0.7); }
.jv-corner-br { bottom: 0; right: 0;
  border-bottom: 2px solid rgba(79,207,140,0.7);
  border-right: 2px solid rgba(79,207,140,0.7); }
.jv-panel.jv-impact .jv-corner-tl,
.jv-panel.jv-impact .jv-corner-tr,
.jv-panel.jv-impact .jv-corner-bl,
.jv-panel.jv-impact .jv-corner-br {
  border-color: rgba(217,112,94,0.65);
}

/* Header */
.jv-header {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px 10px;
  border-bottom: 1px solid rgba(79,207,140,0.12);
}
.jv-header-flag { font-size: 20px; flex-shrink: 0; line-height: 1; }
.jv-header-info { flex: 1; min-width: 0; }
.jv-label {
  font-size: 7.5px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(79,207,140,0.5); font-weight: 600;
}
.jv-country-name {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  color: #fff; line-height: 1.2; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jv-wearers-count {
  font-size: 8.5px; color: rgba(255,255,255,0.22);
  letter-spacing: 0.06em; margin-top: 1px;
}
.jv-close {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.35);
  border-radius: 50%; width: 22px; height: 22px;
  cursor: pointer; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 120ms;
}
.jv-close:hover { border-color: rgba(255,255,255,0.3); color: #fff; background: rgba(255,255,255,0.07); }

/* Match badge */
.jv-match-badge {
  padding: 5px 13px;
  font-size: 8.5px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 700;
  background: rgba(255,100,20,0.12);
  color: var(--uh-orange, #ff7820);
  border-bottom: 1px solid rgba(255,100,20,0.18);
  animation: jv-badge-blink 2.4s ease-in-out infinite;
}
.jv-match-badge.jv-badge-ok {
  background: rgba(0,200,180,0.08);
  color: rgba(79,207,140,0.75);
  border-bottom-color: rgba(0,200,180,0.14);
  animation: none;
}
@keyframes jv-badge-blink {
  0%,100% { opacity: 1; } 45% { opacity: 0.65; } 55% { opacity: 0.65; }
}

/* Modules */
.jv-module {
  padding: 11px 13px;
  border-bottom: 1px solid rgba(79,207,140,0.08);
}
.jv-module:last-of-type { border-bottom: 0; }
.jv-mod-label {
  font-size: 7.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(79,207,140,0.45); font-weight: 600; margin-bottom: 8px;
}
.jv-mod-hint { color: rgba(79,207,140,0.28); font-weight: 400; }

/* ── Recovery module ── */
.jv-rec-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 7px;
}
.jv-rec-main { display: flex; align-items: baseline; gap: 4px; }
.jv-rec-score {
  font-size: 40px; font-weight: 800; letter-spacing: -0.03em;
  color: #fff; line-height: 1; font-family: var(--font-display, inherit);
  font-variant-numeric: tabular-nums;
}
.jv-rec-slash { font-size: 15px; color: rgba(255,255,255,0.25); font-weight: 400; }
.jv-rec-delta { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }

.jv-rec-bar-track {
  height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.05); position: relative;
  overflow: hidden; margin-bottom: 3px;
}
.jv-rec-bar-base {
  position: absolute; top: 0; left: 0; height: 100%;
  background: rgba(255,255,255,0.12); border-radius: 3px;
}
.jv-rec-bar-match {
  position: absolute; top: 0; left: 0; height: 100%;
  background: currentColor; border-radius: 3px;
  opacity: 0.7; transition: width 0.8s cubic-bezier(0.2,0.8,0.3,1);
}
.jv-rec-bar-legend {
  display: flex; justify-content: space-between;
  font-size: 8px; color: rgba(255,255,255,0.2); letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.jv-vitals-row { display: flex; gap: 7px; }
.jv-vital {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 5px; padding: 7px 10px;
  flex: 1; text-align: center; min-width: 0;
}
.jv-vital-val { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.jv-vital-lab {
  font-size: 7.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.28); margin-top: 3px; line-height: 1.4;
}

/* ── Sleep architecture module ── */
.jv-stages { display: flex; flex-direction: column; gap: 5px; }
.jv-stage-row {
  display: flex; align-items: center; gap: 8px;
}
.jv-stage-total {
  display: flex; justify-content: space-between;
  margin-top: 3px; padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.jv-stage-name {
  font-size: 7.5px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35); width: 32px; flex-shrink: 0;
}
.jv-stage-track {
  flex: 1; height: 5px; background: rgba(255,255,255,0.05);
  border-radius: 2px; overflow: hidden; position: relative;
}
.jv-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.85s cubic-bezier(0.2,0.8,0.3,1);
  position: absolute; left: 0; top: 0;
}
.jv-fill-deep  { background: #2a6ef5; box-shadow: 0 0 6px rgba(42,110,245,0.5); }
.jv-fill-rem   { background: #4FCF8C; box-shadow: 0 0 6px rgba(79,207,140,0.4); }
.jv-fill-light { background: rgba(255,255,255,0.22); }
.jv-fill-awake { background: rgba(255,130,0,0.55); }
.jv-stage-dur {
  font-size: 9.5px; font-weight: 600; color: rgba(255,255,255,0.55);
  width: 52px; text-align: right; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Sleep timing module ── */
.jv-timing-main {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.jv-timing-col { text-align: center; flex-shrink: 0; }
.jv-timing-time {
  font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: #fff; line-height: 1;
}
.jv-timing-label {
  font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.28); margin-top: 2px; line-height: 1.4;
}
.jv-timing-line {
  flex: 1; position: relative; padding-top: 14px;
}
.jv-timing-bar-track {
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden;
}
.jv-timing-bar-fill {
  background: linear-gradient(90deg, #2a6ef5, #4FCF8C);
  border-radius: 2px;
}
.jv-timing-dur {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  font-size: 8.5px; font-weight: 600; color: rgba(79,207,140,0.8);
  white-space: nowrap; letter-spacing: 0.03em;
}
.jv-timing-delta {
  text-align: center; font-size: 9.5px; color: rgba(255,255,255,0.28);
  margin-top: 2px;
}

/* Science link */
.jv-science {
  display: block; padding: 8px 13px;
  font-size: 9.5px; color: rgba(79,207,140,0.3);
  text-decoration: none; letter-spacing: 0.05em;
  border-top: 1px solid rgba(79,207,140,0.08);
  transition: color 120ms;
}
.jv-science:hover { color: rgba(79,207,140,0.7); }

/* card footer: primary CTA + secondary science link */
/* card footer: two stacked rows — primary CTA, then the science link, each full-width. */
.jv-cta-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 13px; border-top: 1px solid rgba(79,207,140,0.12); }
.jv-cta { display: block; width: 100%; text-align: center; padding: 11px 12px; border-radius: 9px; background: var(--uh-green, #0eff27); color: #04210a; font-weight: 700; font-size: 12px; letter-spacing: .02em; text-decoration: none; transition: filter .15s; }
.jv-cta:hover { filter: brightness(1.08); }
.jv-cta-row .jv-science { display: block; width: 100%; text-align: center; padding: 10px 12px; border: 1px solid rgba(79,207,140,0.6); border-radius: 9px; background: rgba(79,207,140,0.13); color: #7DE3B0; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.jv-cta-row .jv-science:hover { background: rgba(79,207,140,0.22); border-color: rgba(79,207,140,0.85); color: #fff; }

/* Header conversion CTAs — mirrored in the top bar of both the index (flat) and globe pages. */
.uh-hdr-ring { display: inline-flex; align-items: center; gap: 6px; background: var(--uh-green, #0eff27); color: #04210a; font: 700 11px/1 'Graphik', var(--uv-mono, sans-serif); letter-spacing: .02em; text-decoration: none; padding: 8px 14px; border-radius: 999px; white-space: nowrap; transition: filter .15s; }
.uh-hdr-ring:hover { filter: brightness(1.08); }
/* Secondary CTA — outlined emerald pill so it reads as a clear, clickable action next to the filled Ring CTA. */
.uh-hdr-science { display: inline-flex; align-items: center; gap: 6px; color: #6FE0A8; text-decoration: none; font: 700 11px/1 'Graphik', var(--uv-mono, sans-serif); letter-spacing: .02em; white-space: nowrap; padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(79,207,140,0.55); background: rgba(79,207,140,0.10); transition: background .15s, border-color .15s, color .15s; }
.uh-hdr-science:hover { background: rgba(79,207,140,0.18); border-color: rgba(79,207,140,0.85); color: #fff; }
@media (max-width: 600px) { .uh-hdr-science { display: none; } }

/* ── Qualitative country-card rows (no precise numbers) ── */
.jvq-rows { padding: 4px 0; }
.jvq-row { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.jvq-row:last-child { border-bottom: 0; }
.jvq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jvq-name { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,0.6); white-space: nowrap; }
.jvq-val { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #fff; text-align: right; }
.jvq-val.good { color: #4FCF8C; }
.jvq-val.warn { color: #E0A35C; }
.jvq-val.bad  { color: #D9805E; }
.jvq-val.muted { color: rgba(255,255,255,0.4); }
.jvq-val.jvq-num { font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.jvq-arr { font-size: 10.5px; font-weight: 700; margin-left: 4px; opacity: .6; }  /* ↑/↓ vs previous night */
.jvq-sub { font-size: 10.5px; color: rgba(255,255,255,0.42); margin-top: 4px; letter-spacing: .01em; }

/* Sleep-length legend gradient (shared by the flat .flat-legend + the globe .globe-legend) */
.gl-bar { display: flex; align-items: center; gap: 7px; font-size: 9.5px; color: rgba(255,255,255,.55); white-space: nowrap; }
.gl-grad { display: inline-block; width: 74px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, rgb(217,112,94), rgb(224,163,92), rgb(79,207,140)); }
.globe-legend .gl-title { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 3px; }
.jvq-bars { display: inline-flex; gap: 3px; }
.jvq-seg { width: 9px; height: 13px; border-radius: 2px; background: rgba(255,255,255,0.14); }
.jvq-seg.on { background: currentColor; }
.jvq-arrow { font-size: 15px; font-weight: 700; line-height: 1; }
.jvq-approx { font-variant-numeric: tabular-nums; }

/* Number counter flicker on entry */
@keyframes jv-flicker {
  0%  { opacity: 0.2; }
  15% { opacity: 1; }
  25% { opacity: 0.6; }
  35% { opacity: 1; }
  100%{ opacity: 1; }
}
.jv-rec-score { animation: jv-flicker 0.55s ease-out 0.3s both; }

/* During intro, hide the pill too */
body.intro-playing .wc-match-pill { opacity: 0 !important; }

/* ═══════════════════════════════════════════════════════════════
   ULTRAVERSE OVERRIDES — #313131 borders, white/8 glass
   ═══════════════════════════════════════════════════════════════ */

/* match pill: ultraverse glass */
.wc-match-pill {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid #313131 !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
}

/* proximity widget */
.wc-proximity {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid #313131 !important;
}

/* map legend pill */
.wc-canvas .map-legend {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid #313131 !important;
}

/* match buttons: ultraverse border */
.match-btn {
  border-color: #313131 !important;
  background: rgba(255,255,255,0.04) !important;
}
.match-btn:hover {
  background: rgba(255,255,255,0.09) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.match-btn.active {
  background: rgba(79,207,140,0.07) !important;
  border-color: rgba(79,207,140,0.28) !important;
}

/* ═══════════════════════════════════════════════════════════════
   LEGIBILITY PASS — bigger, higher-contrast text in the country
   biometric panel (feedback 2026-06-19: "cards illegible").
   ═══════════════════════════════════════════════════════════════ */
.jv-label          { font-size: 10px;   color: rgba(0,225,205,0.75); letter-spacing: 0.12em; }
.jv-country-name   { font-size: 18px; }
.jv-wearers-count  { font-size: 11px;   color: rgba(255,255,255,0.5); }
.jv-mod-label      { font-size: 10.5px; color: rgba(0,225,205,0.8);   letter-spacing: 0.1em; }
.jv-mod-hint       { color: rgba(0,225,205,0.5); }
.jv-rec-slash      { font-size: 16px;   color: rgba(255,255,255,0.4); }
.jv-rec-delta      { font-size: 15px; }
.jv-rec-bar-legend { font-size: 10px;   color: rgba(255,255,255,0.5); }
.jv-vital-val      { font-size: 17px; }
.jv-vital-lab      { font-size: 9.5px;  color: rgba(255,255,255,0.6); }
.jv-stage-name     { font-size: 10px;   color: rgba(255,255,255,0.65); width: 38px; }
.jv-stage-dur      { font-size: 11.5px; color: rgba(255,255,255,0.8);  width: 66px; }
.jv-timing-time    { font-size: 19px; }
.jv-timing-label   { font-size: 9.5px;  color: rgba(255,255,255,0.6); }
.jv-timing-dur     { font-size: 10px;   color: rgba(0,225,205,0.9); }
.jv-timing-delta   { font-size: 11px;   color: rgba(255,255,255,0.6); }
.jv-science        { font-size: 11.5px; color: rgba(0,225,205,0.65); }

/* connector line: country dot → card (discoverability) */
.wc-conn-line { stroke: var(--accent, #0eff27); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: 0.75; animation: wc-conn-dash 0.6s linear infinite; }
.wc-conn-dot  { fill: var(--accent, #0eff27); opacity: 0.95; }
@keyframes wc-conn-dash { to { stroke-dashoffset: -9; } }

/* panel internal metric tiles */
.wc-panel .metric {
  border-color: #313131 !important;
  background: rgba(255,255,255,0.04) !important;
}

/* leaderboard rows */
.wc-panel .lb-row {
  border-bottom-color: #313131 !important;
}

