/* BTPI Bitcoin Adoption Study — Design Tokens (Cornell brand) */
:root {
  /* Cornell primary */
  --brand: #B31B1B;            /* Carnelian */
  --brand-deep: #8a1414;
  --ink: #222222;              /* Cornell dark gray (primary) */
  --ink-2: #3a3a3a;
  --ink-3: #5a5a5a;

  /* Cornell secondary / accents */
  --cornell-navy: #073949;     /* Deep navy (primary data color) */
  --cornell-blue: #006699;     /* Cornell Blue link */
  --cornell-warm-gray: #A2998B;
  --cornell-sea-gray: #9FAD9F;
  --cornell-green: #4B7B2B;
  --cornell-orange: #D47500;

  /* Surfaces */
  --paper: #FFFFFF;
  --paper-2: #F7F7F7;          /* Cornell light gray */
  --rule: #E2E0DC;
  --muted: #6a6a6a;
  --bg: var(--paper);
  --fg: var(--ink);
  --surface: #FFFFFF;
  --surface-2: #F7F7F7;
  --card-border: rgba(34,34,34,.10);

  /* Data viz palette aliases */
  --accent-data: var(--cornell-navy);
  --accent-data-2: var(--cornell-blue);
  --accent-warm: var(--brand);              /* Carnelian for notes / highlights */
  --accent-neutral: var(--cornell-warm-gray);
  --accent-green: var(--cornell-green);
}
[data-theme="dark"] {
  --bg: #0b121a;
  --fg: #f1efe9;
  --ink: #f1efe9;
  --ink-2: #c8c6bf;
  --ink-3: #9a988f;
  --paper: #0b121a;
  --paper-2: #101923;
  --rule: #22303d;
  --muted: #8a9aab;
  --surface: #101923;
  --surface-2: #0e1621;
  --accent-data: #6bb3cc;
  --accent-data-2: #9ed1e0;
  --accent-neutral: #b4ada0;
  --card-border: rgba(255,253,248,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02", "onum";
}
.sans, .sans * { font-family: "Söhne", "Inter Tight", "Neue Haas Grotesk", "Helvetica Neue", system-ui, sans-serif; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.eyebrow {
  font-family: "Söhne Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
h1, h2, h3, h4 { font-family: "Tiempos Text", "Source Serif 4", Georgia, serif; font-weight: 500; letter-spacing: -0.01em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(40px, 5.2vw, 72px); letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: 22px; }
a { color: inherit; }

.container { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 clamp(24px, 3.5vw, 80px); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-thick { border: 0; border-top: 2px solid var(--ink); margin: 0; }
button { font: inherit; cursor: pointer; }

/* Chip / tag */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  font-family: "Söhne Mono", monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
}

/* Layout */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar {
  display: flex; align-items: center; gap: 24px; padding: 14px clamp(20px, 3.5vw, 80px);
  max-width: 1680px; margin: 0 auto;
}
.brand-mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--fg); flex-shrink: 0; }
.brand-mark .shield { width: 22px; height: 22px; background: var(--brand); position: relative; flex-shrink: 0; align-self: center; border-radius: 1px;}
.brand-mark .shield::after {
  content: ""; position: absolute; inset: 3px; border: 1.2px solid #fff;
}
.brand-mark .title { font-family: "Tiempos Text", serif; font-size: 15px; letter-spacing: -.005em; white-space: nowrap; }
.brand-mark .sub { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); white-space: nowrap; }
nav.primary { display: flex; gap: 2px; margin-left: auto; }
nav.primary a, nav.primary button {
  background: transparent; border: 0; color: var(--ink-2);
  font-family: "Söhne", system-ui, sans-serif; font-size: 13px;
  padding: 8px 14px; border-radius: 4px; letter-spacing: .01em;
}
nav.primary a:hover, nav.primary button:hover { color: var(--fg); background: var(--surface-2); }
nav.primary a.active, nav.primary button.active { color: var(--fg); background: var(--surface-2); }
nav.primary a.active::before, nav.primary button.active::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: var(--brand); border-radius: 1px; margin-right: 8px; transform: translateY(-1px);
}

.theme-toggle {
  width: 34px; height: 28px; border: 1px solid var(--rule); background: transparent;
  border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.theme-toggle:hover { color: var(--fg); border-color: var(--ink-3); }

/* Page frame */
main { padding: 0 0 120px 0; }
.section { padding: 72px 0; }
.section-narrow { max-width: clamp(800px, 62vw, 1100px); margin: 0 auto; padding: 0 clamp(24px, 3.5vw, 80px); }

/* Hero */
.hero {
  padding: 88px 0 72px; border-bottom: 1px solid var(--rule);
}
.hero .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(48px, 6vw, 120px); }
.hero .meta-row {
  display: flex; gap: 20px; font-family: "Söhne Mono", monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  margin-bottom: 28px;
}
.hero h1 { margin-bottom: 20px; }
.hero .kicker { color: var(--brand); font-weight: 600; }
.hero .lede { font-size: clamp(20px, 1.35vw, 24px); color: var(--ink-2); max-width: 42ch; line-height: 1.45; }
.hero .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);}
.hero .stat {
  padding: 24px 22px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.hero .stat .num { font-family: "Tiempos Text", serif; font-size: 48px; line-height: 1; letter-spacing: -0.02em; }
.hero .stat .num .pct { font-size: .6em; color: var(--ink-3); margin-left: 2px; }
.hero .stat .label { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-top: 8px; }
.hero .stat .caption { font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.35; }

/* Narrative block */
.narrative { padding: 72px 0; border-bottom: 1px solid var(--rule); background: var(--surface); }
.narrative .grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
.narrative h2 { margin-bottom: 32px; max-width: 22ch; }
.narrative p { margin: 0 0 18px; max-width: 62ch; color: var(--ink-2); }
.narrative p.big { font-size: 22px; color: var(--fg); line-height: 1.4; margin-bottom: 28px; max-width: 28ch;}

.callout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 32px 0; }
.callout-grid > div { background: var(--surface); padding: 22px 20px; }
.callout-grid .num { font-family: "Tiempos Text", serif; font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.callout-grid .label { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-top: 8px; }
.callout-grid p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* Charts shared */
.chart-card {
  background: var(--surface); border: 1px solid var(--card-border);
  padding: 28px; position: relative;
}
.chart-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; margin-bottom: 20px;
}
.chart-head h3 { font-family: "Söhne", sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.chart-head .src { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.chart-actions { display: flex; gap: 8px; }
.chart-actions button {
  background: transparent; border: 1px solid var(--rule); padding: 5px 10px;
  font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-2); border-radius: 3px;
}
.chart-actions button:hover { border-color: var(--ink-2); color: var(--fg); }

/* Bars */
.bar-row { display: grid; grid-template-columns: 120px 1fr 52px; gap: 12px; align-items: center; padding: 4px 0; font-size: 13px; }
.bar-row .lbl { font-family: "Söhne", sans-serif; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.bar-row .val { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 14px; background: transparent; position: relative; }
.bar-fill { height: 100%; background: var(--accent-data); }
.bar-row.highlight .bar-fill { background: var(--brand); }
.bar-row.dimmed .bar-fill { background: var(--accent-neutral); }
.bar-row.dimmed .lbl, .bar-row.dimmed .val { color: var(--muted); }

/* Stacked bars (for likert) */
.stack { display: flex; height: 22px; width: 100%; background: var(--surface-2); }
.stack > span { display: block; }

/* Map */
.map-wrap { position: relative; }
.map-svg { width: 100%; height: auto; display: block; }
.map-legend { display: flex; align-items: center; gap: 10px; font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 12px; }
.map-legend .scale { height: 8px; width: 220px; background: linear-gradient(to right, var(--surface-2), var(--brand)); border: 1px solid var(--rule); }

/* Tooltip */
.tip {
  position: fixed; pointer-events: none; background: var(--ink); color: #f6f2ea;
  font-family: "Söhne", sans-serif; font-size: 12px; padding: 8px 10px;
  border-radius: 3px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  max-width: 260px;
}
.tip .tv { font-family: "JetBrains Mono", monospace; color: #fff; font-size: 13px; margin-top: 4px; }

/* Explorer */
.explorer-head { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: end; padding: 56px 0 28px; border-bottom: 1px solid var(--rule);}
.explorer-head h2 { max-width: 20ch;}
.explorer-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-select {
  background: var(--surface); border: 1px solid var(--rule); padding: 10px 14px;
  font-family: "Söhne", sans-serif; font-size: 14px; color: var(--fg);
  border-radius: 0; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23333' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.search-input {
  background: var(--surface); border: 1px solid var(--rule); padding: 10px 14px;
  font-family: "Söhne", sans-serif; font-size: 14px; color: var(--fg); width: 280px;
}

/* Country grid */
.country-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.country-card { background: var(--surface); padding: 14px 14px 16px; border: 0; text-align: left; color: inherit; display: block; }
.country-card:hover { background: var(--surface-2); }
.country-card.active { background: var(--ink); color: var(--paper); }
.country-card.active .eyebrow, .country-card.active .cc-name { color: var(--paper); }
.cc-flag { width: 28px; height: 20px; object-fit: cover; display: block; margin-bottom: 8px; border: 1px solid rgba(0,0,0,.15);}
.cc-name { font-family: "Söhne", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: -0.005em;}
.cc-metric { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Data table (question table) */
.qtable { width: 100%; border-collapse: collapse; font-family: "Söhne", sans-serif; font-size: 13px; }
.qtable th, .qtable td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.qtable th { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.qtable td.num { font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; text-align: right; }
.qtable tr:hover td { background: var(--surface-2); }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 40px 0 60px; background: var(--surface); }
footer .fgrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
footer h4 { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
footer a { display: block; color: var(--ink-2); text-decoration: none; font-size: 13px; padding: 4px 0; font-family: "Söhne", sans-serif; }
footer a:hover { color: var(--brand); }
footer .partners { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);}
footer .partners a { display: inline; padding: 0; font-size: 10px; color: var(--muted); font-family: "Söhne Mono", monospace; letter-spacing: .12em; }
footer .partners a:hover { color: var(--brand); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  background: var(--surface); border: 1px solid var(--ink); padding: 18px 18px 16px;
  width: 290px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
  font-family: "Söhne", sans-serif;
}
.tweaks-panel h4 { font-family: "Söhne Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 12px; font-weight: 500;}
.tweaks-panel .tw-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.tweaks-panel .tw-row:first-of-type { border-top: 0; }
.tweaks-panel input[type=color] { width: 30px; height: 24px; border: 1px solid var(--rule); padding: 0; background: transparent;}
.tweaks-panel select { font: inherit; font-size: 12px; padding: 3px 6px; background: var(--surface-2); border: 1px solid var(--rule); color: var(--fg); }
.tweaks-panel .swatches { display: flex; gap: 6px;}
.tweaks-panel .sw { width: 20px; height: 20px; border: 1px solid var(--rule); cursor: pointer; border-radius: 50%;}
.tweaks-panel .sw.active { outline: 2px solid var(--ink); outline-offset: 2px; }
.tweaks-panel .toggle { display: inline-flex; }
.tweaks-panel .toggle button { background: var(--surface-2); border: 1px solid var(--rule); padding: 4px 8px; font-size: 11px; font-family: "Söhne Mono", monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.tweaks-panel .toggle button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Responsive */
@media (max-width: 900px) {
  .hero .grid, .narrative .grid, .explorer-head, footer .fgrid { grid-template-columns: 1fr; gap: 32px; }
  .country-grid { grid-template-columns: repeat(2, 1fr); }
  .callout-grid { grid-template-columns: 1fr; }
  .hero .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- Tablet / narrow desktop: header wraps, nav scrolls ---------- */
@media (max-width: 1080px) {
  .site-header .bar { flex-wrap: wrap; gap: 10px; padding: 12px 20px; }
  nav.primary {
    margin-left: 0; width: 100%; order: 3;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  nav.primary::-webkit-scrollbar { display: none; }
  nav.primary a, nav.primary button { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- Mobile (phones & small tablets) ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding: 0 18px !important; }
  h1 { font-size: clamp(30px, 8.5vw, 42px) !important; }
  h2 { font-size: clamp(23px, 6.4vw, 30px) !important; }
  h3 { font-size: 19px; }
  .lede { font-size: 16.5px !important; }
  .section { padding-left: 0; padding-right: 0; }

  /* Header: stack brand + scrollable nav */
  .site-header .bar { flex-wrap: wrap; gap: 10px; padding: 11px 18px; }
  .brand-mark .sub { font-size: 9px; letter-spacing: .12em; }
  nav.primary {
    margin-left: 0; width: 100%; order: 3;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  nav.primary::-webkit-scrollbar { display: none; }
  nav.primary a, nav.primary button { flex: 0 0 auto; padding: 9px 11px; font-size: 12.5px; white-space: nowrap; }
  nav.primary a.active::before, nav.primary button.active::before { margin-right: 6px; }

  /* Collapse every multi-column layout to one column */
  .hero .grid, .narrative .grid, .explorer-head, footer .fgrid,
  .callout-grid, .hero .stats { grid-template-columns: 1fr !important; gap: 22px !important; }
  .country-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .section [style*="grid-template-columns"]:not(.qtable-wrap):not([data-keep-cols]):not(.chart-card *) { grid-template-columns: 1fr !important; }
  .section [style*="display:flex"], .section [style*="display: flex"] { flex-wrap: wrap; }

  /* Cards & charts */
  .chart-card { padding: 16px 14px !important; overflow-x: auto; }
  .chart-head { flex-direction: column; align-items: flex-start !important; gap: 8px; }
  .chart-head .src { text-align: left !important; }
  .src, .eyebrow { font-size: 10px; }

  /* Wide tables scroll horizontally instead of squashing */
  .qtable { font-size: 11px; min-width: 560px; }
  .qtable th, .qtable td { padding: 6px 7px !important; }

  /* Touch targets */
  button, select, .chip { min-height: 44px; }
  .chip, .eyebrow button { min-height: 0; }
  select { font-size: 16px; max-width: 100%; }

  /* Globe / map stages fit the screen */
  .globe-stage { max-width: 100%; }
  .globe-tip { white-space: normal; max-width: 68vw; }

  /* Footer */
  footer .fgrid { gap: 26px !important; }

  /* Chart row grids keep their columns on mobile, just tighter */
  .uchart-rows { grid-template-columns: 104px 1fr 44px !important; gap: 5px 8px !important; font-size: 11.5px; }
  .uchart-rows--wide { grid-template-columns: minmax(96px, 132px) 1fr 44px !important; }
  .uchart-rows--cmp { grid-template-columns: 96px 1fr 74px !important; }
  .uchart-rows--stack { grid-template-columns: 104px 1fr !important; }
  .uchart-rows .sans, .uchart-rows .mono { font-size: 11px !important; }
  .uperc-row { grid-template-columns: 1.5fr 1fr 34px 1fr 34px !important; gap: 7px !important; font-size: 11px; }
  .uperc-row > *:nth-child(6) { display: none; }
  .uperc-row > * { font-size: 12px !important; }
  .urisk-row { grid-template-columns: 74px 1fr 40px !important; gap: 8px !important; font-size: 11px; }
  .urisk-row > *:nth-child(n+4) { display: none; }
  .urisk-row > * { font-size: 12px !important; }

  .uchart-rows--bands { grid-template-columns: 92px 1fr !important; gap: 10px !important; }
  .uchart-rows--bands > * { font-size: 10.5px !important; }
  .uchart-rows--cols { gap: 6px !important; }
  .uchart-rows--cols > div { font-size: 9.5px !important; }

  /* Stacked-column charts (CU12/CU13): scroll sideways rather than shrink to slivers */
  .ucols-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-left: 42px !important; }
  .ucols, .ucols-labels { min-width: 600px; }

  /* Wide SVG post charts scroll sideways instead of shrinking to illegibility */
  .uchart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .uchart-scroll .uchart-svg { min-width: 680px; }
  .upies { grid-template-columns: 1fr !important; }
  .upies > div { padding: 14px 16px 16px !important; }

  /* Hide the desktop-only tweaks panel */
  .tweaks-panel { display: none !important; }
}
@media (max-width: 420px) {
  .country-grid { grid-template-columns: 1fr !important; }
  .brand-mark .title { font-size: 14px; }
}

/* Updates post prose */
.upost-prose p { font-size: 17.5px; line-height: 1.62; color: var(--ink-2); max-width: 66ch; margin: 0 0 18px; text-wrap: pretty; }
.upost-prose p strong { color: var(--fg); font-weight: 600; }
.upost-prose p em { font-style: italic; }
.upost-prose a, .upost-prose a:hover { color: var(--cornell-blue); }

/* Hero intro animations + haptic feel */
@keyframes btpiStatReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-interactive {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 220ms ease, transform 220ms cubic-bezier(.22,.61,.36,1);
}
.stat-interactive:hover {
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  transform: translateY(-2px);
}
.stat-interactive:active { transform: translateY(0); }
.stat-interactive .num { transition: color 220ms ease; }
.stat-interactive:hover .num { color: var(--brand); }
.btpi-ripple {
  position: absolute;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .35;
  transform: translate(-50%, -50%) scale(1);
  animation: btpiRipple 650ms cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes btpiRipple {
  to { transform: translate(-50%, -50%) scale(60); opacity: 0; }
}
/* Subtle shimmer sweep after number lands */
.big-num-anim { display: inline-block; position: relative; }
.big-num-anim.landed::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--brand) 55%, transparent) 50%, transparent 65%);
  mix-blend-mode: overlay;
  animation: btpiShimmer 900ms cubic-bezier(.22,.61,.36,1) forwards;
  pointer-events: none;
}
@keyframes btpiShimmer {
  from { transform: translateX(-120%); opacity: 0; }
  20%  { opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* Globe page */
.globe-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 720px;
  margin: 0 auto;
  cursor: grab;
  user-select: none;
}
.globe-stage:active { cursor: grabbing; }
.globe-stage svg { width: 100%; height: 100%; display: block; }
.globe-stage .sphere {
  fill: var(--surface);
  stroke: var(--rule);
  stroke-width: 1;
}
.globe-stage .graticule {
  fill: none;
  stroke: var(--rule);
  stroke-width: .5;
  opacity: .55;
}
.globe-stage .country {
  fill: var(--surface-2);
  stroke: var(--surface);
  stroke-width: .35;
  transition: fill 220ms ease, stroke-width 120ms ease;
}
.globe-stage .country.in-study {
  cursor: pointer;
}
.globe-stage .country.hovered {
  stroke: var(--fg);
  stroke-width: 1.5;
}
.globe-stage .country.selected {
  stroke: var(--fg);
  stroke-width: 2;
}
.globe-tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  font-family: "Inter Tight", sans-serif;
  font-size: 13px;
  color: var(--fg);
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  z-index: 10;
  white-space: nowrap;
  transform: translate(-50%, -120%);
}
.globe-tip .tv { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-2); margin-top: 3px; font-variant-numeric: tabular-nums; }

nav.primary a { text-decoration: none; }
