@font-face { font-family: "Archivo"; src: url("/fonts/archivo-var-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/plex-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/plex-mono-600-latin.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
[hidden] { display: none !important; }
/* Layout: the globe fills the screen; a translucent sheet floats top-left (bottom on phones); tooltip follows the pointer.
   Single dark theme, matching the other lab globes. */
:root {
  color-scheme: dark;
  --space: #070a12; --space-2: #111a2e;
  --sheet: rgba(12, 17, 30, 0.86);
  --ink: #eef0f6; --muted: #9aa3ba; --rule: #2a3550; --accent: #7fe0c0; --nodata: #333c50;
  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
html, body { height: 100%; }
body { margin: 0; background: radial-gradient(ellipse at 60% 45%, var(--space-2), var(--space) 70%) fixed, var(--space); color: var(--ink); font-family: var(--f-body); overflow: hidden; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; touch-action: none; cursor: grab; }
.sheet {
  position: fixed; z-index: 2; box-sizing: border-box;
  top: calc(env(safe-area-inset-top, 0px) + 16px); left: max(16px, env(safe-area-inset-left, 0px));
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100% - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: hidden auto;
  background: var(--sheet); backdrop-filter: blur(10px);
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 14px;
}
.sheet > * { min-width: 0; }
.back { display: block; font: 500 12px/1 var(--f-mono); color: var(--muted); text-decoration: none; letter-spacing: .04em; }
.back:hover { color: var(--accent); }
.eyebrow { font: 500 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { font: 800 32px/0.95 var(--f-display); font-stretch: 78%; letter-spacing: -.02em; margin: 6px 0 0; text-wrap: balance; }
.lede { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.lede strong { color: var(--ink); font-weight: 600; }
.group { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); padding-top: 12px; }
.seg { display: flex; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.seg button { flex: 1; font: 600 13px var(--f-body); padding: 7px 6px; background: transparent; color: var(--ink); border: 0; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--space); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ramp { height: 10px; border-radius: 2px; }
.ticks { position: relative; height: 14px; font: 400 11px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }
.note { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw.nodata { background: var(--nodata); }
.card-name { font: 700 22px/1.05 var(--f-display); font-stretch: 85%; }
.card-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card-nums div { display: flex; flex-direction: column; gap: 3px; }
.big { font: 600 24px/1 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
#filter { box-sizing: border-box; width: 100%; font: 400 14px var(--f-body); background: rgba(255,255,255,0.04); color: var(--ink); border: 1px solid var(--rule); border-radius: 5px; padding: 7px 9px; }
#filter::placeholder { color: var(--muted); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rank button { width: 100%; display: grid; grid-template-columns: 26px 10px 1fr auto; gap: 7px; align-items: center; text-align: left; background: none; border: 0; padding: 4px 6px; border-radius: 4px; color: var(--ink); font: 400 13px var(--f-body); cursor: pointer; }
.rank button:hover, .rank button[aria-current="true"] { background: rgba(127, 224, 192, 0.14); }
.rank .n, .rank .v { font: 400 12px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.rank .n { text-align: right; }
.rank i { width: 10px; height: 10px; border-radius: 2px; }
.rank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin: 0; }
.foot a { color: inherit; }
#tip { position: fixed; z-index: 3; pointer-events: none; background: var(--sheet); border: 1px solid var(--rule); border-radius: 5px; padding: 8px 10px; font-size: 13px; line-height: 1.4; max-width: 240px; backdrop-filter: blur(6px); }
#tip strong { display: block; font: 600 17px var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
#tip .m { font: 400 12px var(--f-mono); color: var(--muted); }
#toggle { display: none; }
@media (max-width: 640px) {
  .sheet { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); max-height: 46%; gap: 10px; padding: 12px 14px; }
  .sheet.collapsed > :not(header) { display: none; }
  #toggle { display: inline-block; font: 600 12px var(--f-body); background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: 4px; padding: 4px 8px; }
  header { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
  h1 { font-size: 26px; }
  .lede { display: none; }
}
