/*
 * Globe Trivia - all styles are scoped under .gt so the widget can be dropped
 * into another site (e.g. a portfolio) without leaking styles.
 * Override the custom properties on .gt to re-theme it.
 */
.gt {
  --gt-bg: #120f3a;
  --gt-text: #f3f1ff;
  --gt-muted: #a9a6d6;
  --gt-faint: #726fa6;
  --gt-accent: #ffd43b;
  --gt-accent-2: #7ee0ff;
  --gt-ink: #1d2340;
  --gt-panel: rgba(24, 20, 66, 0.94);
  --gt-card: #221d5c;
  --gt-line: rgba(190, 180, 255, 0.18);
  --gt-radius: 20px;
  --gt-font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gt-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --gt-spring: cubic-bezier(.34, 1.56, .64, 1);

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  color: var(--gt-text);
  font-family: var(--gt-font);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(1000px 700px at 75% 15%, rgba(124, 92, 255, 0.35), transparent 60%),
    radial-gradient(900px 700px at 10% 95%, rgba(255, 110, 180, 0.2), transparent 60%),
    radial-gradient(700px 500px at 40% 50%, rgba(60, 170, 255, 0.12), transparent 70%),
    var(--gt-bg);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.gt *, .gt *::before, .gt *::after { box-sizing: border-box; }
.gt :where(button) { font: inherit; color: inherit; }
.gt a { color: var(--gt-accent-2); }

/* ── canvases ─────────────────────────────────────────── */
.gt-stars, .gt-globe {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.gt-globe { cursor: grab; touch-action: none; outline: none; transition: opacity .45s ease; }
.gt-globe.is-dragging { cursor: grabbing; }
.gt-globe.is-pointing { cursor: pointer; }
.gt-globe:focus-visible { box-shadow: inset 0 0 0 3px var(--gt-accent-2); }
.gt.is-detail .gt-globe { opacity: 0; pointer-events: none; }

/* ── buttons ─────────────────────────────────────────── */
.gt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--gt-ink); background: #2c2672;
  box-shadow: 0 4px 0 var(--gt-ink);
  font-family: var(--gt-display); font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform .15s var(--gt-spring), box-shadow .15s, background .2s;
}
.gt-btn:hover { background: #3a3394; transform: translateY(-2px); box-shadow: 0 6px 0 var(--gt-ink); }
.gt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gt-ink); }
.gt-btn:focus-visible { outline: 3px solid var(--gt-accent-2); outline-offset: 3px; }
.gt-btn svg { width: 18px; height: 18px; }
.gt-btn--icon { width: 42px; padding: 0; }
.gt-btn--pop { background: var(--gt-accent); color: var(--gt-ink); }
.gt-btn--pop:hover { background: #ffe066; }
.gt-btn--pop:hover svg { animation: gt-wiggle .5s ease; }
@keyframes gt-wiggle { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

/* ── HUD ──────────────────────────────────────────────── */
.gt-hud {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 20px 24px; gap: 12px;
  transition: opacity .35s ease, transform .35s ease;
}
.gt.is-detail .gt-hud, .gt.is-flying .gt-hud { opacity: 0; transform: translateY(-8px); }
.gt.is-detail .gt-hud * { pointer-events: none !important; }

.gt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gt-brand h1 {
  margin: 0; font-family: var(--gt-display); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.01em; line-height: 1.05;
  text-shadow: 0 3px 0 var(--gt-ink);
}
.gt-brand h1 span { color: var(--gt-accent); display: inline-block; animation: gt-float 3.2s ease-in-out infinite; }
.gt-brand p { margin: 6px 0 0; color: var(--gt-muted); font-size: 14px; max-width: 36ch; font-weight: 600; }
@keyframes gt-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }

.gt-tools { display: flex; gap: 10px; pointer-events: auto; }
.gt-search { position: relative; display: flex; align-items: center; }
.gt-search svg { position: absolute; left: 14px; width: 17px; height: 17px; opacity: .7; pointer-events: none; }
.gt-search input {
  width: min(260px, 52vw); height: 42px; padding: 0 16px 0 40px;
  border-radius: 999px; border: 2px solid var(--gt-ink);
  background: #f3f1ff; color: var(--gt-ink); box-shadow: 0 4px 0 var(--gt-ink);
  font: inherit; font-size: 14px; font-weight: 600; outline: none;
  transition: box-shadow .2s;
}
.gt-search svg { color: var(--gt-ink); z-index: 1; }
.gt-search input::placeholder { color: #8a87b5; }
.gt-search input:focus { box-shadow: 0 4px 0 var(--gt-ink), 0 0 0 4px rgba(126, 224, 255, .45); }

.gt-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.gt-hint { color: var(--gt-muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; font-weight: 600; }
.gt-hint kbd {
  font: inherit; font-size: 12px; padding: 1px 8px; border-radius: 7px;
  border: 2px solid var(--gt-ink); background: #f3f1ff; color: var(--gt-ink); box-shadow: 0 2px 0 var(--gt-ink);
}
.gt-legend {
  font-size: 13px; color: var(--gt-muted); font-weight: 600;
  padding: 6px 14px; border-radius: 999px; background: rgba(20, 16, 60, .6); border: 1px solid var(--gt-line);
}
.gt-legend b { color: var(--gt-accent); font-family: var(--gt-display); font-size: 15px; }

/* ── tooltip ──────────────────────────────────────────── */
.gt-tooltip {
  position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none;
  padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.4;
  background: #f3f1ff; color: var(--gt-ink); border: 2px solid var(--gt-ink);
  box-shadow: 0 5px 0 var(--gt-ink);
  opacity: 0; transform: translate(-50%, calc(-100% - 18px)) scale(.8);
  transform-origin: 50% 100%;
  transition: opacity .15s, transform .25s var(--gt-spring); white-space: nowrap;
}
.gt-tooltip::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px;
  background: #f3f1ff; border-right: 2px solid var(--gt-ink); border-bottom: 2px solid var(--gt-ink);
  transform: rotate(45deg);
}
.gt-tooltip.is-on { opacity: 1; transform: translate(-50%, calc(-100% - 18px)) scale(1); }
.gt-tooltip strong { display: flex; align-items: center; gap: 8px; font-family: var(--gt-display); font-size: 16px; font-weight: 600; }
.gt-tooltip img { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; border: 1.5px solid var(--gt-ink); }
.gt-tooltip small { display: block; color: #5f5b8f; font-weight: 600; }
.gt-tip-fact { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; font-weight: 600; }
.gt-tip-fact svg { width: 18px; height: 18px; padding: 2px; border-radius: 6px; background: var(--c); border: 1.5px solid var(--gt-ink); flex: none; }
.gt-tip-fact b { font-family: var(--gt-display); font-size: 15px; background: color-mix(in srgb, var(--c) 55%, transparent); padding: 0 5px; border-radius: 5px; }

/* ── loading ─────────────────────────────────────────── */
.gt-loading {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 50;
  background: var(--gt-bg); transition: opacity .6s ease;
  color: var(--gt-muted); font-family: var(--gt-display); font-size: 18px; letter-spacing: .03em;
}
.gt-loading.is-done { opacity: 0; pointer-events: none; }

/* ── detail view ─────────────────────────────────────── */
.gt-detail {
  position: absolute; inset: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr min(440px, 40%);
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
}
.gt.is-detail .gt-detail { opacity: 1; pointer-events: auto; }
.gt-detail[hidden] { display: none; }

.gt-mapwrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.gt-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; transition: opacity .22s ease; }
.gt-map:active { cursor: grabbing; }
.gt.is-switching .gt-map, .gt.is-switching .gt-bubbles { opacity: 0; }
.gt-map .glow { fill: url(#gt-glow); pointer-events: none; }
.gt-map .ocean { fill: #4cc3ff; }
.gt-map .land {
  stroke: var(--gt-ink); stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  cursor: pointer; transition: filter .2s;
}
.gt-map .land:hover { filter: brightness(1.1); }
/* the focus country's stand-in on the base map: invisible, but still hoverable for its tooltip */
.gt-map .land.is-hit { visibility: hidden; pointer-events: all; cursor: default; }
/* The overlay layers get their own compositor layers, so their animations never repaint the
   detailed base map underneath. The lift layer bobs as a whole (a pure transform animation). */
.gt-map-lift, .gt-map-top { pointer-events: none; will-change: transform; }
.gt-map-top .gt-pt { pointer-events: auto; }
.gt-map-lift { animation: gt-bob 3.2s ease-in-out .6s infinite; }
/* --k is 1 / map zoom (set from JS) so the lift stays the same size on screen */
.gt-map .land.is-focus {
  fill: #ffd43b; stroke-width: 2; cursor: default;
  filter: drop-shadow(0 calc(5px * var(--k)) 0 rgba(16, 20, 50, .4));
  transform: translateY(calc(-3px * var(--k)));
}
.gt-map-zoom { --k: 1; }
@keyframes gt-bob {
  0%, 100% { transform: none; }
  50% { transform: translateY(-4px); }
}
.gt-map .shade { fill: rgba(16, 24, 80, 0.2); fill-rule: evenodd; pointer-events: none; }
.gt-map .shine { fill: rgba(255, 255, 255, 0.28); pointer-events: none; }
.gt-map .rim { fill: none; stroke: var(--gt-ink); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }

.gt-lead {
  stroke: var(--c); stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round;
  opacity: .9; animation: gt-flow 1s linear infinite; pointer-events: none;
  transition: stroke-width .2s;
}
.gt-lead.is-hot { stroke-width: 4.5; opacity: 1; }
@keyframes gt-flow { to { stroke-dashoffset: -18; } }

.gt-pt { cursor: pointer; }
.gt-pt .dot { stroke: var(--gt-ink); stroke-width: 2; }
.gt-pt .halo { fill: none; stroke: #ffd43b; stroke-width: 3; opacity: 0; }
.gt-pt.is-focus { cursor: default; }
.gt-pt.is-focus .halo { transform-box: fill-box; transform-origin: center; animation: gt-ripple 1.8s ease-out infinite; }
.gt-pt.is-hidden { display: none; }
@keyframes gt-ripple { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }

/* fact bubbles floating on the map */
.gt-bubbles { position: absolute; inset: 0; pointer-events: none; transition: opacity .22s ease; }
.gt-bubble {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px 0 5px; border-radius: 999px;
  background: #f3f1ff; color: var(--gt-ink); border: 2px solid var(--gt-ink);
  box-shadow: 0 4px 0 var(--gt-ink);
  translate: -50% -50%;
  animation: gt-pop .55s var(--gt-spring) var(--d) both, gt-float-b 3.4s ease-in-out calc(var(--d) + .6s + var(--f)) infinite;
  transition: scale .2s var(--gt-spring), box-shadow .2s;
}
.gt-bubble:hover, .gt-bubble.is-hot, .gt-bubble:focus-visible { scale: 1.12; z-index: 2; box-shadow: 0 6px 0 var(--gt-ink), 0 0 0 4px color-mix(in srgb, var(--c) 60%, transparent); outline: none; }
.gt-bnum {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gt-ink); color: #fff; font-family: var(--gt-display); font-weight: 700; font-size: 13px;
}
.gt-bicon { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--c); border: 2px solid var(--gt-ink); }
.gt-bicon svg { width: 15px; height: 15px; }
.gt-bval { font-family: var(--gt-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
@keyframes gt-pop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gt-float-b { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.gt-maptools { position: absolute; left: 20px; top: 20px; display: flex; gap: 10px; z-index: 3; }
.gt-zoomtools { position: absolute; left: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.gt-maphint { position: absolute; right: 20px; top: 30px; color: var(--gt-muted); font-size: 12px; font-weight: 600; z-index: 2; pointer-events: none; text-align: right; }

/* side panel */
.gt-panel {
  position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  /* no backdrop-filter: at this opacity the blur was barely visible, but it re-ran on every
     frame that anything else on screen animated */
  background: var(--gt-panel); border-left: 3px solid var(--gt-ink);
  padding: 26px 24px 32px; user-select: text;
  transform: translateX(40px); transition: transform .6s var(--gt-spring);
  scrollbar-width: thin; scrollbar-color: rgba(190,180,255,.3) transparent;
}
.gt.is-detail .gt-panel { transform: none; }
.gt-panel:focus { outline: none; }
.gt-head { display: flex; align-items: center; gap: 14px; }
.gt-flag {
  width: 64px; height: 44px; object-fit: cover; border-radius: 9px; flex: none;
  border: 2.5px solid var(--gt-ink); box-shadow: 0 4px 0 var(--gt-ink); background: rgba(255,255,255,.08);
  transform: rotate(-4deg); animation: gt-wave 4s ease-in-out infinite;
}
@keyframes gt-wave { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg) translateY(-2px); } }
.gt-panel h2 { margin: 0; font-family: var(--gt-display); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; line-height: 1.05; }
.gt-sub { margin: 4px 0 0; color: var(--gt-muted); font-size: 13px; font-weight: 600; }
.gt-sub i { font-style: normal; color: var(--gt-faint); margin: 0 2px; }

.gt-summary {
  display: flex; align-items: center; gap: 8px; margin: 20px 0 14px;
  font-family: var(--gt-display); font-size: 15px; font-weight: 500; color: var(--gt-muted);
}
.gt-summary b { color: var(--gt-accent); font-size: 20px; }
.gt-catpills { display: inline-flex; gap: 4px; margin-left: auto; }
.gt-catpills span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--c); color: var(--gt-ink); border: 2px solid var(--gt-ink); }
.gt-catpills svg { width: 15px; height: 15px; }

/* fact cards */
.gt-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gt-fcard {
  position: relative; padding: 14px 16px 14px; border-radius: var(--gt-radius);
  background: var(--gt-card); border: 2.5px solid var(--gt-ink);
  box-shadow: 0 5px 0 var(--gt-ink), inset 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent);
  outline: none;
  animation: gt-card-in .6s var(--gt-spring) var(--d) backwards;
  transition: transform .2s var(--gt-spring), box-shadow .2s;
}
.gt-fcard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 70px; border-radius: 18px 18px 0 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), transparent);
}
.gt-fcard:hover, .gt-fcard.is-hot, .gt-fcard:focus-visible {
  transform: translateY(-3px) rotate(-.4deg);
  box-shadow: 0 8px 0 var(--gt-ink), inset 0 0 0 2px var(--c);
}
.gt-fcard.is-flash { animation: gt-flash .9s ease; }
@keyframes gt-card-in { 0% { opacity: 0; transform: translateY(26px) scale(.92); } 100% { opacity: 1; transform: none; } }
@keyframes gt-flash {
  0% { box-shadow: 0 5px 0 var(--gt-ink), 0 0 0 0 var(--c); }
  30% { box-shadow: 0 5px 0 var(--gt-ink), 0 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); transform: scale(1.02); }
  100% { box-shadow: 0 5px 0 var(--gt-ink), 0 0 0 16px transparent; }
}

.gt-fhead { position: relative; display: flex; align-items: center; gap: 8px; }
.gt-fnum {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--gt-ink); color: #fff; font-family: var(--gt-display); font-weight: 700; font-size: 12px;
}
.gt-ficon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--c); color: var(--gt-ink); border: 2px solid var(--gt-ink); }
.gt-ficon svg { width: 16px; height: 16px; }
.gt-fcat { font-family: var(--gt-display); font-weight: 600; font-size: 14px; color: var(--c); letter-spacing: .02em; }
.gt-fyr { margin-left: auto; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; background: #f3f1ff; color: var(--gt-ink); border: 2px solid var(--gt-ink); }

.gt-hero-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.gt-hero-main { min-width: 0; }
.gt-hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.gt-hero-num {
  font-family: var(--gt-display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -0.02em;
  color: var(--c); text-shadow: 0 3px 0 var(--gt-ink); font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.gt-delta { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #69db7c; color: var(--gt-ink); border: 2px solid var(--gt-ink); }
.gt-hero-lab { margin-top: 6px; font-weight: 700; font-size: 14px; color: #dcd8ff; }

.gt-ring { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.gt-ring circle { fill: none; stroke-width: 9; }
.gt-ring .trk { stroke: rgba(255,255,255,.1); }
.gt-ring .val { stroke: var(--c); stroke-linecap: round; animation: gt-ring 1.2s cubic-bezier(.2,.8,.2,1) calc(var(--d) + .2s) both; }
@keyframes gt-ring { from { stroke-dashoffset: var(--full); } }

.gt-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 4px 11px 4px 8px; border-radius: 10px; transform: rotate(-2deg);
  background: var(--gt-accent); color: var(--gt-ink); border: 2px solid var(--gt-ink); box-shadow: 0 3px 0 var(--gt-ink);
  font-family: var(--gt-display); font-size: 13px; font-weight: 700;
  animation: gt-sticker .5s var(--gt-spring) calc(var(--d) + .5s) both;
}
.gt-badge svg { width: 15px; height: 15px; }
@keyframes gt-sticker { 0% { transform: rotate(-20deg) scale(0); } 100% { transform: rotate(-2deg) scale(1); } }

/* mini charts */
.gt-viz { margin-top: 12px; }
.gt-track {
  position: relative; height: 12px; border-radius: 999px; border: 2px solid var(--gt-ink);
  container-type: inline-size; /* lets the marker slide with transform (cqw) instead of `left` */
}
.good-low .gt-track { background: linear-gradient(90deg, #69db7c, #ffd43b 50%, #ff6b6b); }
.good-high .gt-track { background: linear-gradient(90deg, #ff6b6b, #ffd43b 50%, #69db7c); }
/* --p is the position along the track (0-100) */
.gt-marker {
  position: absolute; left: 0; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gt-ink); box-shadow: 0 0 0 3px var(--c);
  transform: translateX(calc(var(--p) * 1cqw));
  animation: gt-slide 1.1s var(--gt-spring) calc(var(--d) + .25s) both;
}
@keyframes gt-slide { from { transform: none; } }
.gt-ends { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--gt-muted); }
.gt-ends span:last-child { text-align: right; }
.gt-ends b { color: var(--gt-text); }
.gt-viz-cap { margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--gt-faint); }

.gt-dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; }
.gt-dots i {
  aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.12); border: 1.5px solid rgba(29,35,64,.8);
  animation: gt-pop .4s var(--gt-spring) calc(var(--d) + var(--j) * 25ms) both;
}
.gt-dots i.above { background: color-mix(in srgb, var(--c) 35%, transparent); }
.gt-dots i.on { background: var(--c); border: 2px solid var(--gt-ink); transform: scale(1.5); box-shadow: 0 0 0 3px rgba(255,255,255,.25); animation-name: gt-pop-big; }
@keyframes gt-pop-big { 0% { transform: scale(0); } 100% { transform: scale(1.5); } }

.gt-tiers { display: flex; align-items: flex-end; gap: 6px; height: 54px; }
.gt-tiers i {
  position: relative; flex: 1; height: var(--h); border-radius: 7px 7px 3px 3px;
  background: rgba(255,255,255,.1); border: 2px solid rgba(29,35,64,.9);
  transform-origin: bottom; animation: gt-grow .6s var(--gt-spring) calc(var(--d) + var(--j) * 60ms) both;
}
.gt-tiers i.on { background: var(--c); border-color: var(--gt-ink); }
.gt-tiers span { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 10px; font-weight: 800; color: var(--gt-muted); }
.gt-tiers i.on span { color: var(--gt-ink); }
@keyframes gt-grow { from { transform: scaleY(0); } }

.gt-ftext { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: #e9e6ff; }
.gt-ftext mark {
  color: var(--gt-ink); font-weight: 800; padding: 0 4px; border-radius: 5px;
  background: linear-gradient(transparent 0, var(--c) 0) no-repeat;
  background-size: 100% 100%; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  animation: gt-marker-pen .7s ease-out calc(var(--d) + .7s) backwards;
}
@keyframes gt-marker-pen {
  from { background-size: 0% 100%; color: #fff; }
  to { background-size: 100% 100%; color: var(--gt-ink); }
}
.gt-ctx { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--gt-muted); }

.gt-ffoot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; padding-top: 10px; border-top: 2px dashed rgba(190,180,255,.18); font-size: 12px; }
.gt-tag { padding: 2px 9px; border-radius: 999px; font-weight: 800; color: var(--gt-ink); background: var(--t); border: 2px solid var(--gt-ink); }
.gt-ffoot a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; color: var(--gt-accent-2); min-width: 0; }
.gt-ffoot a:hover { text-decoration: underline; }
.gt-ffoot a svg { width: 13px; height: 13px; flex: none; }

.gt-note { font-size: 14px; color: var(--gt-muted); padding: 14px 16px; margin-top: 20px; border-radius: 14px; border: 2px dashed var(--gt-line); }
.gt-srcs { font-size: 12px; color: var(--gt-faint); margin-top: 26px; }

/* ── responsive ──────────────────────────────────────── */
/* .gt--narrow is toggled from JS based on the widget's own width, so the
   compact layout also kicks in when embedded in a narrow column. */
.gt--narrow .gt-hud { padding: 16px; }
.gt--narrow .gt-hint { display: none; }
.gt--narrow .gt-tools .gt-btn span { display: none; }
.gt--narrow .gt-tools .gt-btn { width: 42px; padding: 0; }
.gt--narrow .gt-detail { grid-template-columns: 1fr; grid-template-rows: 46% 54%; }
.gt--narrow .gt-panel { border-left: 0; border-top: 3px solid var(--gt-ink); padding: 18px 16px 28px; transform: translateY(40px); }
.gt--narrow.is-detail .gt-panel { transform: none; }
.gt--narrow .gt-panel h2 { font-size: 24px; }
.gt--narrow .gt-maptools { left: 16px; top: 16px; }
.gt--narrow .gt-zoomtools { display: none; }
.gt--narrow .gt-maphint { display: none; }
.gt--narrow .gt-bubble { height: 34px; padding: 0 10px 0 4px; gap: 4px; }
.gt--narrow .gt-bnum { display: none; }
.gt--narrow .gt-bval { font-size: 14px; }
.gt--narrow .gt-hero-num { font-size: 34px; }

/* ── performance: don't run loops nobody can see ─────── */
/* scrolled out of view (toggled from JS), or the HUD is hidden behind the detail view */
.gt--paused *, .gt--paused *::before, .gt--paused *::after,
.gt.is-detail .gt-hud * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .gt *, .gt *::before, .gt *::after { animation: none !important; transition-duration: .01ms !important; }
  .gt-ftext mark { background-size: 100% 100%; }
}
