/* ============================================================
   ZAILY — "From views to players": the 3D globe of joins (#players, js/globe.js).
   Dark band (.band-ink), same tokens as style.css: green = players, orange = the thing
   you are pointing at. Read in this order: the number, who it was counted on, the globe,
   the owner's words, the button. Loaded after home.css.
   ============================================================ */

#players { scroll-margin-top: 76px; border-top: 0; }   /* under the results list: no light hairline on top of the dark band */
.gl [data-globe]:empty { min-height: 640px; }
.gl { position: relative; overflow: hidden; background: radial-gradient(900px 700px at 28% 58%, #12261A 0%, var(--ink) 68%); padding-block: clamp(44px, 6vw, 80px); }

/* ── HEAD: the number, then who it was counted on ───────── */
.gl-head { margin-bottom: 28px; }
.gl h2 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; max-width: 21ch; }
.gl h2 em { font-style: normal; color: #7FDB4C; font-family: 'IBM Plex Mono', monospace; font-weight: 600; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.gl-sub { margin-top: 16px; color: #B7C0CA; font-size: 1.12rem; }
.gl-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.gl-pcs { display: flex; flex-wrap: wrap; gap: 10px; }
.gl-pc { display: flex; align-items: center; gap: 16px; padding: 12px 20px 12px 16px; background: rgba(255,255,255,.04); border: 1px solid #2D3844; border-radius: 4px; color: inherit; text-align: left; font: inherit; }
button.gl-pc { cursor: pointer; transition: border-color .14s, background .14s; }
button.gl-pc:hover { border-color: #7FDB4C; }
button.gl-pc[aria-pressed="true"] { border-color: #7FDB4C; background: rgba(127,219,76,.1); }
.gl-pc:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gl-pc span { display: flex; flex-direction: column; }
.gl-pc b { font: 700 .95rem 'Archivo', sans-serif; font-variation-settings: 'wdth' 106; color: #fff; }
.gl-pc em { font: 500 .7rem 'IBM Plex Mono', monospace; font-style: normal; color: #7FDB4C; }
/* the logos are transparent wordmarks: they sit straight on the dark band */
.gl-logo { display: block; width: auto; height: auto; max-height: 36px; max-width: 132px; object-fit: contain; flex: none; }

/* ── STAGE: the globe and what it says ──────────────────── */
.gl-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px 48px; align-items: center; }
.gl-globe { position: relative; width: 100%; aspect-ratio: 1; max-width: 760px; }
.gl-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.gl-globe canvas.drag { cursor: grabbing; }
.gl-log { position: absolute; left: 4px; bottom: 4px; display: flex; align-items: center; gap: 11px; max-width: calc(100% - 8px); padding: 9px 13px; background: rgba(14,17,22,.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid #2D3844; border-radius: 3px; color: #E8EDF2; }
.gl-log:empty { display: none; }
.gl-log span { display: flex; flex-direction: column; min-width: 0; }
.gl-log b { font: 600 .9rem 'Archivo', sans-serif; font-variation-settings: 'wdth' 100; }
.gl-log em { font: 400 .68rem 'IBM Plex Mono', monospace; font-style: normal; color: #96A0AC; }
.gl-log.is-pin { border-color: #FFB050; }
.gl-log .x { margin-left: 6px; background: transparent; border: 0; color: #96A0AC; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 2px 6px; }
.gl-log .x:hover { color: #fff; }
.gl-tip { position: absolute; z-index: 4; pointer-events: none; transform: translate(-50%, -150%); display: flex; align-items: center; gap: 9px; padding: 7px 11px; background: rgba(14,17,22,.88); border: 1px solid #34414D; border-radius: 3px; color: #E8EDF2; white-space: nowrap; opacity: 0; transition: opacity .1s; }
.gl-tip.on { opacity: 1; }
.gl-tip span { display: flex; flex-direction: column; }
.gl-tip b { font: 600 .82rem 'Archivo', sans-serif; }
.gl-tip em { font: 400 .68rem 'IBM Plex Mono', monospace; font-style: normal; color: #96A0AC; }

.gl-side { min-width: 0; }
.gl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.gl-tile { display: block; padding: 16px 18px; text-align: left; color: inherit; font: inherit; background: rgba(255,255,255,.03); border: 1px solid #2D3844; border-radius: 4px; }
button.gl-tile { cursor: pointer; transition: border-color .14s, background .14s; }
button.gl-tile:hover { border-color: #7FDB4C; }
button.gl-tile[aria-pressed="true"] { border-color: #7FDB4C; background: rgba(127,219,76,.12); }
.gl-tile:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gl-tile b { display: block; font: 600 clamp(2rem, 3.4vw, 2.8rem)/1 'IBM Plex Mono', monospace; letter-spacing: -.06em; color: #7FDB4C; font-variant-numeric: tabular-nums; }
.gl-tile span { display: block; margin-top: 8px; font: 600 .84rem/1.3 'Archivo', sans-serif; font-variation-settings: 'wdth' 100; color: #C6CED7; }

.gl-lh { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 9px; border-bottom: 1px solid #26313B; }
.gl-lh b { font: 700 .98rem 'Archivo', sans-serif; font-variation-settings: 'wdth' 108; color: #fff; }
.gl-lh em { font: 400 .68rem 'IBM Plex Mono', monospace; font-style: normal; color: #7F8A97; }
.gl-list { list-style: none; }
.gl-list.is-all { max-height: 380px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #34414D transparent; }
.gl-r { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(40px, .8fr) 62px; gap: 12px; align-items: center; padding: 9px 6px; background: transparent; border: 0; border-bottom: 1px solid #1E2830; color: #E8EDF2; text-align: left; cursor: pointer; font: 500 .74rem 'IBM Plex Mono', monospace; transition: background .12s, opacity .16s; }
.gl-r:hover, .gl-r.on { background: rgba(255,176,80,.1); }
.gl-r:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.gl-r.out { opacity: .4; }
.gl-r.out:hover, .gl-r.out.on { opacity: 1; }
.gl-r .nm { font: 600 .9rem 'Archivo', sans-serif; font-variation-settings: 'wdth' 100; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-r .rb { display: block; height: 8px; }
.gl-r .rb i { display: block; height: 100%; background: #7FDB4C; border-radius: 0 2px 2px 0; }
.gl-r.on .rb i { background: #FFB050; }
.gl-r .p { text-align: right; font: 600 1rem 'IBM Plex Mono', monospace; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.gl-r.on .p { color: #FFB050; }
.gl-more { margin-top: 10px; background: transparent; border: 0; padding: 6px 0; font: 600 .76rem 'IBM Plex Mono', monospace; color: #7FDB4C; cursor: pointer; border-bottom: 1px solid transparent; }
.gl-more:hover { border-bottom-color: #7FDB4C; }
.gl-more[hidden] { display: none; }

/* a flag: two letters until the SVG arrives, or when a country has none */
.gl-flag { position: relative; display: inline-block; flex: none; width: 24px; height: 16px; border-radius: 2px; overflow: hidden; background: #26313B; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); vertical-align: middle; }
.gl-flag img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-flag b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 .5rem 'IBM Plex Mono', monospace; color: #96A0AC; }

/* ── THE OWNER'S WORDS ───────────────────────────────────── */
.gl-quote { margin: 44px 0 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px 56px; align-items: center; padding: clamp(26px, 4vw, 44px); background: rgba(255,255,255,.035); border: 1px solid #26313B; border-radius: 4px; }
.gl-q blockquote { font: 500 clamp(1.4rem, 2.6vw, 2.05rem)/1.3 'Source Serif 4', Georgia, serif; letter-spacing: -.01em; color: #fff; border-left: 4px solid #7FDB4C; padding-left: 24px; }
.gl-q figcaption .gl-logo { max-height: 26px; max-width: 110px; }
.gl-q figcaption { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-left: 28px; font: 400 .78rem 'IBM Plex Mono', monospace; color: #96A0AC; }
.gl-facts { display: grid; gap: 20px; }
.gl-facts b { display: block; font: 600 clamp(2.6rem, 5vw, 4rem)/1 'IBM Plex Mono', monospace; letter-spacing: -.06em; color: #7FDB4C; font-variant-numeric: tabular-nums; }
.gl-facts span { display: block; margin-top: 7px; font: 500 .68rem 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: #96A0AC; }

/* ── THE BUTTON ──────────────────────────────────────────── */
.gl-cta { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; margin-top: 28px; padding: 24px 28px; background: rgba(127,219,76,.08); border: 1px solid rgba(127,219,76,.3); border-radius: 4px; }
.gl-cta strong { font: 700 clamp(1.3rem, 2.4vw, 1.8rem)/1.15 'Archivo', sans-serif; font-variation-settings: 'wdth' 112; letter-spacing: -.015em; color: #fff; }
.gl-cta-r { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.gl-micro { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; font: 400 .7rem 'IBM Plex Mono', monospace; color: #96A0AC; }
.gl-micro span::before { content: "✓"; color: #7FDB4C; font-weight: 700; margin-right: 7px; }

/* ── HOW WE COUNT: there for whoever checks, folded for everyone else ── */
.gl-how { margin-top: 22px; }
.gl-how summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 9px; font: 600 .72rem 'IBM Plex Mono', monospace; color: #7F8A97; }
.gl-how summary::-webkit-details-marker { display: none; }
.gl-how summary::before { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid #4A5764; border-radius: 2px; line-height: 1; }
.gl-how[open] summary::before { content: "−"; }
.gl-how summary:hover { color: #C6CED7; }
.gl-how ul { list-style: none; margin-top: 12px; display: grid; gap: 8px; max-width: 84ch; }
.gl-how li { font: 400 .7rem/1.55 'IBM Plex Mono', monospace; color: #7F8A97; }
.gl-save { margin-top: 14px; background: transparent; border: 1px solid #34414D; color: #C6CED7; padding: 8px 14px; font: 600 .72rem 'IBM Plex Mono', monospace; cursor: pointer; }
.gl-save:hover { border-color: #7FDB4C; color: #fff; }
.gl-save:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .gl-tip, .gl-r, .gl-tile, .gl-pc { transition: none; } }
@media (max-width: 960px) {
  .gl-stage { grid-template-columns: 1fr; }
  .gl-globe { max-width: 560px; margin-inline: auto; }
  .gl-quote { grid-template-columns: 1fr; }
  .gl-facts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media (max-width: 640px) {
  .gl-cta { flex-direction: column; align-items: stretch; }
  .gl-cta-r { align-items: stretch; }
  .gl-cta .btn-primary { justify-content: center; }
  .gl-micro { justify-content: flex-start; }
  .gl-r { grid-template-columns: 26px minmax(0, 1fr) 58px; }
  .gl-r .rb { display: none; }
  .gl-log { padding: 7px 10px; }
  .gl-q blockquote { padding-left: 18px; }
  .gl-q figcaption { padding-left: 22px; }
}
