/* Payments Map. Night globe as the stage; the interface is an instrument panel around it.
   Colour lives in the data (payment type), never in decoration. */
:root {
  --space: #07090c;
  --surface: #0f1318;
  --surface-2: #151a21;
  --surface-3: #1c232c;
  --hair: #232b35;
  --hair-2: #2e3742;
  --ink: #e8ecf1;
  --ink-2: #c3cbd5;
  --ink-3: #9aa4b2;
  --ink-4: #7e8998;
  --accent: #3ddc97;
  --t-card: #5ab8f0;
  --t-wallet: #3ddc97;
  --t-bank: #a98bf5;
  --t-cash: #f5b54a;
  --t-bnpl: #f27ba6;
  --t-mobile: #ff8a5b;
  --t-other: #8a94a3;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --side-w: 420px;
  --detail-w: 440px;
  --top: 72px;
  --sheet-h: 52dvh;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--space); color: var(--ink); }
body {
  font: 14px/1.45 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: #2f5747; color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-4); }
.eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.press { transition: transform 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease); }
.press:active { transform: scale(0.97); }
.glass-pill { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 999px; }
.glass { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), 0 12px 32px rgb(0 0 0 / 0.4); border-radius: 18px; }
.tab { font-variant-numeric: tabular-nums; }

/* ---------- Stage ---------- */
.room { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse 70% 60% at 60% 50%, #0b1016, var(--space) 70%); }
.stars, .map, .halo, .tags { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars { z-index: 0; }
.map { z-index: 1; }
.map .maplibregl-canvas { outline: none; }
.halo { z-index: 2; pointer-events: none; }
.tags { z-index: 3; pointer-events: none; }
.placeholder { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none; transition: opacity 0.6s var(--ease); padding-left: calc(var(--side-w) + 32px); }
.placeholder span { width: min(66vh, 52vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #0f1e24, #0a1216 60%, #06090b); box-shadow: 0 0 80px rgb(61 220 151 / 0.12), inset 0 0 0 1px #1f3a31; }
.ready .placeholder { opacity: 0; }
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { z-index: 4; }
.maplibregl-ctrl-attrib { background: rgb(15 19 24 / 0.8) !important; color: var(--ink-4) !important; font-size: 10.5px; border-radius: 8px 0 0 0; }
.maplibregl-ctrl-attrib a { color: var(--ink-3) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1) opacity(0.6); }

.chrome { position: absolute; inset: 0; z-index: 10; pointer-events: none; transition: opacity 0.5s var(--ease); }
.chrome > * { pointer-events: auto; }
.touring .chrome { opacity: 0; }
.touring .chrome > * { pointer-events: none; }

/* ---------- Top bar ---------- */
.topbar { position: absolute; inset: 0 0 auto; height: 64px; display: flex; align-items: center; gap: 16px; padding: 12px 16px; pointer-events: none; }
.topbar::before { content: ''; position: absolute; inset: 0 0 -24px; z-index: -1; background: linear-gradient(rgb(7 9 12 / 0.82), rgb(7 9 12 / 0.5) 60%, transparent); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.mark { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #2a323c; display: grid; place-items: center; font: 500 12px var(--mono); color: var(--accent); background: var(--space); }
.word { font: 600 16px var(--display); color: var(--ink); }
.word span { color: var(--ink-4); }
.crumb { font: 500 12px var(--mono); color: var(--ink-4); margin-left: 2px; }
.ticker { flex: 1 1 auto; min-width: 0; max-width: 560px; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 0 0 14px; overflow: hidden; margin-left: 8px; }
.ticker-label { flex: none; display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding-right: 10px; border-right: 1px solid var(--hair-2); height: 18px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ticker-mask { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%); }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-s, 70s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.tick { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; white-space: nowrap; font-size: 13px; color: var(--ink-2); border-radius: 8px; }
.tick:hover { color: var(--ink); }
.tick b { font: 500 12.5px var(--mono); }
.tick span { font: 400 11.5px var(--mono); color: var(--ink-4); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; padding: 4px; height: 44px; flex: none; }
.nav a { text-decoration: none; font-size: 13px; color: var(--ink-3); padding: 0 12px; height: 34px; display: inline-flex; align-items: center; border-radius: 999px; transition: background-color 0.16s, color 0.16s; }
.nav a:hover { color: var(--ink); background: rgb(255 255 255 / 0.05); }
.nav a.on { background: var(--surface-3); color: var(--ink); }
.nav a.cta { background: var(--accent); color: #0a0c0f; font-weight: 600; margin-left: 4px; }
.nav a.cta:hover { background: #5be6a9; }
.cta-mobile { display: none; }
.lang { flex: none; display: inline-flex; gap: 2px; padding: 3px; height: 44px; align-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 999px; font: 500 12px var(--mono); }
.lang a { min-width: 36px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--ink-3); text-decoration: none; transition: background-color 0.16s, color 0.16s; }
.lang a:hover { color: var(--ink); }
.lang a.on { background: var(--surface-3); color: var(--ink); }

/* ---------- Sidebar ---------- */
.sidebar { position: absolute; left: 16px; top: var(--top); bottom: 16px; width: var(--side-w); display: flex; }
.panel { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--hair), 0 12px 32px rgb(0 0 0 / 0.35); overflow: hidden; }
.grip { display: none; }
.scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.intro { flex: none; padding: 14px 12px 0; }
.title-row { display: flex; align-items: flex-start; gap: 8px; padding: 2px 8px 0; }
h1 { flex: 1; margin: 0; font: 700 23px/1.12 var(--display); letter-spacing: -0.02em; }
.icon-btn { width: 36px; height: 36px; margin: -6px -6px 0 0; border-radius: 999px; display: grid; place-items: center; color: var(--ink-3); }
.icon-btn:hover { background: rgb(255 255 255 / 0.06); color: var(--ink); }
.lede { margin: 6px 8px 14px; font-size: 13px; line-height: 1.45; color: var(--ink-3); text-wrap: pretty; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 8px; }
.live { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgb(61 220 151 / 0.18); }

/* Segmented control: inset track, a sliding surface on the active option. */
.seg { position: relative; display: flex; padding: 3px; border-radius: 999px; background: var(--space); box-shadow: inset 0 0 0 1px var(--hair); isolation: isolate; }
.seg button { position: relative; z-index: 1; flex: 1; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: color 0.2s; }
.seg.mono button { font: 500 12px var(--mono); padding: 0 10px; }
.seg button[aria-checked='true'], .seg button[aria-selected='true'] { color: var(--ink); }
.seg button b { font: 400 11px var(--mono); color: var(--ink-4); }
.seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05); transition: transform 0.42s var(--ease), width 0.42s var(--ease); }

.pulse { margin-top: 12px; border-radius: 18px; background: var(--surface-2); overflow: hidden; }
.pulse-top { display: flex; justify-content: space-between; padding: 14px 16px 0; }
.pulse-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 6px 16px 16px; }
.hero-num { font: 700 64px/0.86 var(--display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.hero-sub { margin: 10px 0 0; font-size: 11px; color: var(--ink-4); }
.bars { width: min(44%, 176px); flex: none; }
.bars .cols { display: flex; align-items: flex-end; gap: 4px; height: 46px; }
.bars .cols span { flex: 1; min-height: 2px; border-radius: 2px; background: rgb(255 255 255 / 0.4); transition: height 0.5s var(--ease), background-color 0.3s; }
.bars .cols span:first-child { background: var(--ink); }
.bars .cols span:hover { background: var(--accent); }
.bars .lab { display: flex; justify-content: space-between; margin-top: 6px; font: 400 10px var(--mono); color: var(--ink-4); }
.types { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgb(255 255 255 / 0.06); }
.type { padding: 11px 14px; text-align: left; transition: background-color 0.2s, opacity 0.2s; border-left: 1px solid rgb(255 255 255 / 0.06); }
.type:nth-child(3n + 1) { border-left: 0; }
.type:nth-child(n + 4) { border-top: 1px solid rgb(255 255 255 / 0.06); }
.type:hover { background: rgb(255 255 255 / 0.03); }
.type .k { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.type .k i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.type .v { display: block; margin-top: 4px; font: 600 18px/1 Inter, sans-serif; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.type:disabled { opacity: 0.45; cursor: default; }
.type:disabled:hover { background: none; }
.type[aria-pressed='false'] { background: var(--space); }
.type[aria-pressed='false'] .v { color: var(--ink-4); }
.type[aria-pressed='false'] .k i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.pulse-note { margin: 0; padding: 8px 16px; border-top: 1px solid rgb(255 255 255 / 0.06); font-size: 10.5px; line-height: 1.4; color: var(--ink-4); }

.search { position: relative; margin-top: 12px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 14px; border-radius: 14px; background: var(--space); box-shadow: inset 0 0 0 1px var(--hair-2); transition: box-shadow 0.2s; }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--ink-3); }
.search > svg { color: var(--ink-4); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 14px; }
.search input::placeholder { color: var(--ink-4); }
.search input::-webkit-search-cancel-button { filter: invert(0.6); }
kbd { font: 500 11px var(--mono); color: var(--ink-4); padding: 3px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--hair-2); }
.results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: min(420px, 55vh); overflow: auto; padding: 6px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair-2), 0 18px 40px rgb(0 0 0 / 0.55); scrollbar-width: thin; }
.results .grp { padding: 8px 10px 4px; }
.results .none { padding: 14px; color: var(--ink-4); font-size: 13px; }
.res { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; text-align: left; }
.res[aria-selected='true'], .res:hover { background: rgb(255 255 255 / 0.06); }
.res .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .meta { font: 400 11px var(--mono); color: var(--ink-4); white-space: nowrap; }
.res mark { background: none; color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.chip:hover { background: rgb(255 255 255 / 0.05); color: var(--ink); }
.chip svg { width: 14px; height: 14px; }
.select-chip { background: var(--surface-3); color: var(--ink); padding-right: 4px; margin-right: 4px; }
.select-chip:hover { background: #232b35; }
.select-chip select { appearance: none; -webkit-appearance: none; background: none; border: 0; color: inherit; font: inherit; padding: 0 18px 0 0; cursor: pointer; outline: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%239aa4b2' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; background-size: 14px; }
.select-chip select option { background: var(--surface-2); color: var(--ink); }

.rail-wrap { display: none; }
.tabs-wrap { flex: none; padding: 14px 12px 8px; background: var(--surface); }
.tabs button { padding: 0 6px; }
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 6px 10px; scrollbar-width: thin; scrollbar-color: #3a4450 transparent; overscroll-behavior: contain; }
.grp-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 10px 12px 6px; background: var(--surface); }
.row { scroll-margin: 40px 0 8px; width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 14px; text-align: left; transition: background-color 0.15s; animation: rowin 0.35s var(--ease) both; }
@keyframes rowin { from { opacity: 0; transform: translateY(4px); } }
.row:hover { background: rgb(255 255 255 / 0.04); }
.row.on { background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); }
.row .body { flex: 1; min-width: 0; }
.row .nm { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { display: block; margin-top: 1px; font-size: 12px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub em { font-style: normal; color: var(--ink-3); }
.row .val { flex: none; font: 500 12px var(--mono); color: var(--ink-2); text-align: right; }
.row .val small { display: block; font-size: 10.5px; color: var(--ink-4); font-weight: 400; }
.iso { position: relative; flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font: 500 11.5px var(--mono); color: var(--ink-2); background: var(--surface-3); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); }
.iso::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--c, transparent); box-shadow: 0 0 0 2px var(--surface); }
.iso.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; }
.mono-tile { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font: 600 11px var(--display); letter-spacing: 0.02em; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-4); font-size: 13px; }
.side-foot { flex: none; display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid rgb(255 255 255 / 0.06); font-size: 11.5px; color: var(--ink-4); }
.side-foot a { text-decoration: none; color: var(--ink-3); white-space: nowrap; }
.side-foot a:hover { color: var(--ink); }
.resize { position: absolute; right: -8px; top: 20px; bottom: 20px; width: 16px; display: flex; align-items: center; justify-content: center; cursor: col-resize; touch-action: none; border-radius: 999px; outline: none; }
.resize span { width: 4px; height: 48px; border-radius: 999px; background: rgb(232 236 241 / 0.2); transition: background-color 0.2s; }
.resize:hover span, .resize:focus-visible span, .resize.drag span { background: rgb(232 236 241 / 0.7); }
.reopen { position: absolute; left: 16px; top: calc(var(--top) + 4px); height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 12.5px; color: var(--ink-2); }
.reopen:hover { color: var(--ink); }

/* ---------- Detail drawer ---------- */
.detail { position: absolute; right: 16px; top: var(--top); bottom: 16px; width: var(--detail-w); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--hair), 0 12px 32px rgb(0 0 0 / 0.4); overflow: hidden; animation: drawer 0.5s var(--drawer) both; }
@keyframes drawer { from { opacity: 0; transform: translateX(24px); } }
.detail .grip { display: none; }
.d-head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px 12px 16px; border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.d-head .t { flex: 1; min-width: 0; }
.d-head h2 { margin: 0; font: 700 22px/1.1 var(--display); letter-spacing: -0.02em; }
.d-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }
.d-nav { display: flex; gap: 2px; margin: -4px -4px 0 0; }
.round { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-3); }
.round:hover { background: rgb(255 255 255 / 0.06); color: var(--ink); }
.round svg { width: 14px; height: 14px; }
.d-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 18px; scrollbar-width: thin; scrollbar-color: #3a4450 transparent; overscroll-behavior: contain; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.headline { margin: 12px 2px 14px; font: 600 17px/1.3 var(--display); letter-spacing: -0.01em; text-wrap: pretty; }
.headline span { color: var(--c); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.kpi { padding: 12px 14px; border-left: 1px solid rgb(255 255 255 / 0.06); min-width: 0; }
.kpi:nth-child(3n + 1) { border-left: 0; }
.kpi:nth-child(n + 4) { border-top: 1px solid rgb(255 255 255 / 0.06); }
.kpi .eyebrow { display: block; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b { display: block; margin-top: 5px; font: 600 19px/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi small { font: 400 10.5px var(--mono); color: var(--ink-4); }
.tile { margin-top: 12px; padding: 14px; border-radius: 18px; background: rgb(255 255 255 / 0.028); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), inset 0 1px 0 rgb(255 255 255 / 0.04); }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.tile-head .eyebrow b { color: var(--ink-2); font-weight: 500; }
.shares { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.shares li { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; overflow: hidden; font-size: 13.5px; }
.shares li > i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 18%, transparent); border-right: 2px solid var(--c); transform-origin: left; animation: grow 0.7s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.shares li span, .shares li b { position: relative; }
.shares li span { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shares li b { font: 500 12.5px var(--mono); color: var(--ink); }
.cats { display: flex; flex-direction: column; gap: 10px; }
.cat-line { display: grid; grid-template-columns: 102px 1fr; gap: 10px; align-items: baseline; font-size: 12.5px; }
.cat-line > span:first-child { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.cat-line > span:first-child i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; background: rgb(255 255 255 / 0.05); color: var(--ink-2); white-space: nowrap; }
button.pill:hover { background: rgb(255 255 255 / 0.1); color: var(--ink); }
.pill.local { color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.caps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.caps div { padding: 8px; border-radius: 10px; background: rgb(255 255 255 / 0.035); text-align: center; }
.caps b { display: block; font: 600 15px var(--display); }
.caps span { font-size: 10.5px; color: var(--ink-4); }
.note { margin: 10px 2px 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cta-tile { margin-top: 12px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgb(61 220 151 / 0.12), rgb(61 220 151 / 0.03)); box-shadow: inset 0 0 0 1px rgb(61 220 151 / 0.22); }
.cta-tile p { margin: 0 0 12px; font: 500 15px/1.35 var(--display); text-wrap: pretty; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: #0a0c0f; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.btn:hover { background: #5be6a9; }
.src { margin: 14px 4px 0; font-size: 11px; color: var(--ink-4); line-height: 1.45; }

/* ---------- Dock ---------- */
.dock { position: absolute; left: calc(var(--side-w) + 32px); right: 16px; bottom: 16px; height: 196px; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--hair), 0 12px 32px rgb(0 0 0 / 0.35); overflow: hidden; transition: right 0.5s var(--drawer), left 0.3s var(--ease); }
.detail-open .dock { right: calc(var(--detail-w) + 32px); }
.side-closed .dock { left: 16px; }
.dock-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 12px 6px 18px; }
.dock-head .eyebrow { white-space: nowrap; }
.dock-sub { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-ctrl { margin-left: auto; display: flex; gap: 2px; }
.dock-track { flex: 1; min-height: 0; display: flex; gap: 8px; padding: 4px 12px 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.dock-track::-webkit-scrollbar { display: none; }
.card { flex: none; width: 272px; scroll-snap-align: start; display: flex; flex-direction: column; padding: 12px 14px; border-radius: 16px; text-align: left; background: rgb(255 255 255 / 0.028); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); transition: background-color 0.2s, box-shadow 0.2s; }
.card:hover { background: rgb(255 255 255 / 0.05); }
.card.on { box-shadow: inset 0 0 0 1px var(--c); }
.card .c-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); }
.card .c-top span { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .c-top i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.card .c-top b { font: 500 12px var(--mono); color: var(--c); }
.card h3 { margin: 8px 0 4px; font: 600 17px/1.15 var(--display); letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dock-restore { position: absolute; bottom: 16px; left: calc(var(--side-w) + 32px); height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 12.5px; color: var(--ink-2); }
.side-closed .dock-restore { left: 16px; }

/* ---------- Map controls ---------- */
.controls { position: absolute; right: 16px; top: var(--top); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; transition: right 0.5s var(--drawer); }
.detail-open .controls { right: calc(var(--detail-w) + 32px); }
.pill-btn { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; font-size: 12.5px; color: var(--ink-2); }
.pill-btn:hover, .pill-btn[aria-expanded='true'] { color: var(--ink); background: var(--surface-2); }
.layers-wrap { position: relative; }
.layers { position: absolute; right: 0; top: calc(100% + 6px); width: 240px; padding: 12px 8px 8px; z-index: 5; }
.layers .eyebrow { padding: 0 8px 6px; display: block; }
.lay { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-size: 13px; text-align: left; color: var(--ink-2); }
.lay:hover { background: rgb(255 255 255 / 0.05); }
.lay .sw { margin-left: auto; width: 30px; height: 18px; border-radius: 999px; background: var(--hair-2); position: relative; transition: background-color 0.2s; }
.lay .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); transition: transform 0.25s var(--ease), background-color 0.2s; }
.lay[aria-checked='true'] .sw { background: rgb(61 220 151 / 0.35); }
.lay[aria-checked='true'] .sw::after { transform: translateX(12px); background: var(--accent); }
.zoom { display: flex; flex-direction: column; padding: 3px; border-radius: 14px; }
.zoom button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-3); }
.zoom button:hover { background: rgb(255 255 255 / 0.06); color: var(--ink); }
.legend { width: 196px; padding: 10px 12px 10px; }
.legend .ramp { height: 8px; margin: 8px 0 4px; border-radius: 4px; }
.legend .ends { display: flex; justify-content: space-between; font: 400 10.5px var(--mono); color: var(--ink-4); }
.focus-chip { position: absolute; top: calc(var(--top) + 4px); left: calc(var(--side-w) + 32px + (100vw - var(--side-w) - 48px) / 2); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; font-size: 13px; white-space: nowrap; animation: chipin 0.3s var(--ease) both; }
.side-closed .focus-chip { left: 50%; }
@keyframes chipin { from { opacity: 0; transform: translate(-50%, -6px); } }
.focus-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.focus-chip b { font-weight: 600; }
.focus-chip span { color: var(--ink-4); font: 400 11.5px var(--mono); }

/* ---------- On-map elements ---------- */
.tag-line { position: absolute; inset: 0; overflow: visible; }
.tag { position: absolute; left: 0; top: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 10px; background: var(--space); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.09); pointer-events: auto; white-space: nowrap; animation: tagin 0.3s var(--ease) both; transition: box-shadow 0.2s, background-color 0.2s; }
.tag:hover, .tag.on { background: var(--surface); box-shadow: 0 0 0 1px var(--c); }
@keyframes tagin { from { opacity: 0; scale: 0.95; } }
.tag .mono-tile { width: 30px; height: 30px; border-radius: 8px; font-size: 10.5px; }
.tag .tn { display: block; font: 600 13.5px/1.2 var(--display); }
.tag .tm { display: flex; align-items: center; gap: 5px; font-size: 11px; line-height: 1.2; color: var(--ink-3); }
.tag .tm b { font: 500 11px var(--mono); color: var(--c); }
.hover-card { position: fixed; z-index: 30; left: 0; top: 0; width: 248px; padding: 12px 14px; border-radius: 14px; background: rgb(15 19 24 / 0.96); box-shadow: inset 0 0 0 1px var(--hair-2), 0 16px 40px rgb(0 0 0 / 0.5); pointer-events: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hover-card .h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hover-card .h b { font: 600 15px var(--display); }
.hover-card .h span { font: 500 11px var(--mono); color: var(--ink-4); }
.hover-card .l { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.hover-card .l i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.hover-card .l em { font-style: normal; font-family: var(--mono); color: var(--c); font-size: 12px; }
.hover-card .m { margin-top: 4px; font-size: 11.5px; color: var(--ink-4); }
.tour-card { position: absolute; z-index: 25; left: 32px; bottom: 32px; width: min(420px, calc(100vw - 32px)); padding: 18px 20px; border-radius: 20px; background: rgb(15 19 24 / 0.92); box-shadow: inset 0 0 0 1px var(--hair-2), 0 18px 48px rgb(0 0 0 / 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tour-card .eyebrow { display: flex; justify-content: space-between; }
.tour-card h3 { margin: 10px 0 2px; font: 700 34px/1 var(--display); letter-spacing: -0.03em; }
.tour-card h3 span { color: var(--c); }
.tour-card p { margin: 8px 0 0; color: var(--ink-3); font-size: 13.5px; }
.tour-card .prog { height: 2px; margin-top: 14px; background: rgb(255 255 255 / 0.08); border-radius: 2px; overflow: hidden; }
.tour-card .prog i { display: block; height: 100%; background: var(--c); animation: prog var(--dur, 6s) linear both; transform-origin: left; }
@keyframes prog { from { transform: scaleX(0); } }
.tour-card .exit { margin-top: 12px; font-size: 12px; color: var(--ink-4); }
.noscript { position: absolute; inset: 40% 0 auto; text-align: center; z-index: 50; }

/* Narrow desktops: with both panels open the strip has no room, so the map keeps what is left. */
@media (min-width: 768px) and (max-width: 1240px) {
  .detail-open .dock, .detail-open .dock-restore { display: none; }
  .ticker { display: none; }
}

/* Short laptop screens: give the list the room the footnote and intro take. */
@media (min-width: 768px) and (max-height: 980px) {
  .pulse-note { display: none; }
}
@media (min-width: 768px) and (max-height: 820px) {
  .lede { display: none; }
  .title-row { margin-bottom: 10px; }
  .hero-num { font-size: 52px; }
}

/* ---------- Phones: the sidebar becomes a sheet over the map ---------- */
@media (max-width: 767px) {
  :root { --top: 104px; }
  .topbar { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .crumb { display: none; }
  .word { font-size: 15px; }
  .nav { display: none; }
  .lang { margin-left: auto; height: 36px; padding: 2px; }
  .lang a { height: 30px; min-width: 32px; }
  .cta-mobile { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #0a0c0f; font-weight: 600; font-size: 13px; text-decoration: none; }
  .ticker { order: 3; flex: 1 0 100%; max-width: none; margin: 0; height: 38px; }
  .ticker-label { font-size: 10.5px; }
  .placeholder { padding: 0 0 52dvh; }
  .placeholder span { width: 70vw; }
  .sidebar, .detail { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--sheet-h); transition: height 0.38s var(--drawer); }
  .sheet-drag .sidebar, .sheet-drag .detail { transition: none; }
  .panel, .detail { border-radius: 24px 24px 0 0; box-shadow: inset 0 1px 0 var(--hair-2), 0 -12px 32px rgb(0 0 0 / 0.45); }
  .detail { animation: sheetin 0.45s var(--drawer) both; z-index: 5; }
  @keyframes sheetin { from { transform: translateY(40px); opacity: 0; } }
  .grip, .detail .grip { display: flex; flex: none; justify-content: center; align-items: center; width: 100%; height: 26px; touch-action: none; cursor: grab; }
  .grip span { width: 38px; height: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.2); }
  .scroll { overflow-y: auto; display: block; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
  .intro { padding-top: 0; display: flex; flex-direction: column; }
  /* On a phone the way in comes first: search, then the numbers. */
  .title-row { order: 0; }
  .lede { order: 1; margin-bottom: 10px; }
  .search { order: 2; margin-top: 0; }
  .actions { order: 3; }
  .actions .chip:last-child { display: none; }
  .head-row { order: 4; margin-top: 10px; }
  .pulse { order: 5; }
  .pulse-note, kbd { display: none; }
  .icon-btn#close-side { display: none; }
  h1 { font-size: 22px; }
  .list { overflow: visible; padding-bottom: 24px; }
  .tabs-wrap { position: sticky; top: 0; z-index: 3; }
  .side-foot, .resize, .reopen, .dock, .dock-restore, .tags { display: none !important; }
  .rail-wrap { display: block; padding: 16px 0 0; }
  .rail-wrap .eyebrow { display: block; padding: 0 20px 8px; }
  .rail { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail .card { width: 248px; min-height: 148px; }
  .d-head { padding-top: 4px; }
  .d-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .controls { top: calc(var(--top) + 4px); right: 12px; }
  .detail-open .controls { right: 12px; }
  .zoom { display: none; }
  .legend { display: none !important; }
  .layers { width: 220px; }
  .focus-chip { left: 12px !important; right: 120px; transform: none; top: calc(var(--top) + 4px); max-width: calc(100vw - 140px); overflow: hidden; animation: none; }
  .focus-chip b { overflow: hidden; text-overflow: ellipsis; }
  .hover-card { display: none !important; }
  .tour-card { left: 12px; right: 12px; bottom: 16px; width: auto; }
  .tour-card h3 { font-size: 28px; }
  .maplibregl-ctrl-bottom-right { bottom: var(--sheet-h); }
  .sheet-full .maplibregl-ctrl-bottom-right, .sheet-full .controls, .sheet-full .focus-chip { display: none; }
  .kpi b { font-size: 17px; }
}
@media (max-width: 380px) {
  .hero-num { font-size: 54px; }
  .type { padding: 10px 10px; }
  .type .k { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .ticker-track { animation: none; }
}

/* Light globe view: phones, and any screen too short for the full map. map-boot.js sets html.lite. */
.lite-view { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: calc(68px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); text-align: center; opacity: 0; visibility: hidden; pointer-events: none; background: radial-gradient(ellipse 80% 55% at 50% 52%, rgb(61 220 151 / 0.07), transparent 70%), var(--space); }
.lite-view h2 { margin: 0; font: 700 26px/1.15 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.lite-lede { margin: 0 0 6px; color: var(--ink-3); font-size: 14px; }
.lite-note { margin: 8px 0 0; max-width: 300px; color: var(--ink-4); font-size: 12px; }
.lite-view .globe-wrap { display: flex; flex-direction: column; width: min(100%, 640px, calc(100dvh - 268px)); min-width: 220px; }
.lite-view #globe { will-change: transform; }
.lite-view .globe-jump { position: static; order: 2; width: 100%; height: auto; margin-top: 10px; clip-path: none; overflow: visible; }
.lite-view .globe-jump:focus-within { position: static; transform: none; width: 100%; display: block; padding: 0; background: none; border: 0; box-shadow: none; }
.lite-view .globe-jump span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lite-view .globe-jump select { width: 100%; font-size: 16px; }
html.lite .lite-view { opacity: 1; visibility: visible; pointer-events: auto; }
html.lite .stars, html.lite .map, html.lite .halo, html.lite .tags, html.lite .placeholder, html.lite .hover-card, html.lite .tour-card,
html.lite .sidebar, html.lite .detail, html.lite .dock, html.lite .dock-restore, html.lite .controls, html.lite .focus-chip, html.lite .reopen, html.lite .ticker {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
}
html.switching .lite-view, html.switching .stars, html.switching .map, html.switching .halo, html.switching .tags,
html.switching .sidebar, html.switching .detail, html.switching .dock, html.switching .dock-restore, html.switching .controls, html.switching .focus-chip, html.switching .reopen, html.switching .ticker {
  visibility: visible !important; transition: opacity 0.48s var(--ease) !important;
}
html.switching .lite-view { background: none; }
html.lite .topbar::before { display: none; }
#globe-card { text-align: left; color: var(--ink); font-size: 14px; }
#globe-card .iso::after { display: none; }
#globe-card .iso { width: auto; height: auto; display: inline-block; background: none; box-shadow: none; }
#globe svg { fill: #000; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; } /* undo the page's icon defaults */
@media (max-height: 640px) {
  .lite-lede, .lite-note { display: none; }
  .lite-view h2 { font-size: 20px; }
  .lite-view .globe-wrap { width: min(100%, 640px, calc(100dvh - 172px)); }
}
@media (max-height: 500px) {
  .lite-view { flex-direction: row; gap: 16px; padding-top: 60px; padding-bottom: 8px; }
  .lite-view h2 { display: none; }
  .lite-view .globe-wrap { width: min(100%, calc(100dvh - 124px)); }
}
