/* ============================================================================
 *  cyber-hud.css — overlay for the 3D globe (#cyber-* IDs only).
 *  IMPORTANT: This file MUST NOT touch .wrapper, .info-panel, .card or any
 *  other rule from style.css. The original sliding info-panel layout
 *  must keep working untouched.
 * ========================================================================== */
/* Country flag glyphs: TalkJS country-flag-emoji-polyfill / Twemoji.
 * License: /static/assets/TwemojiCountryFlags.LICENSE.md */
@font-face {
  font-family: "Twemoji Country Flags";
  src: url("/static/assets/TwemojiCountryFlags.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

:root {
  --c-text:        #f2fbff;
  --c-text-dim:    rgba(212, 231, 236, 0.62);
  --c-accent:      #63ffc7;
  --c-accent-cool: #49d9ff;
  --c-accent-2:    #ff3366;
  --c-warn:        #ffb833;
  --c-glass-bg:    rgba(7, 14, 22, 0.76);
  --c-glass-bg-2:  rgba(7, 18, 22, 0.52);
  --c-glass-border:rgba(114, 255, 208, 0.16);
  --c-edge:        rgba(73, 217, 255, 0.18);
  --c-blur:        blur(16px);
  --hud-edge:      clamp(14px, 1.25vw, 24px);
  --hud-top:       clamp(60px, 6.8vh, 74px);
}

@keyframes cyberSweepPanel {
  0%   { background-position: -220px 0, 0 0; }
  100% { background-position: calc(100% + 220px) 0, 0 0; }
}

@keyframes cyberSweepGlobe {
  0%   { background-position: -360px 0, 0 0, 0 0, 0 0; }
  100% { background-position: calc(100% + 360px) 0, 0 0, 0 0, 0 0; }
}

@keyframes cyberBracketPulse {
  0%, 100% {
    opacity: 0.76;
    filter: drop-shadow(0 0 4px rgba(99,255,199,0.12));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(99,255,199,0.22));
  }
}

@keyframes cyberRadarSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes cyberRadarSpinReverse {
  0%   { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes cyberRadarPulse {
  0%, 100% {
    opacity: 0.4;
    filter: drop-shadow(0 0 10px rgba(73,217,255,0.08));
  }
  50% {
    opacity: 0.82;
    filter: drop-shadow(0 0 18px rgba(99,255,199,0.18));
  }
}

@keyframes cyberCounterSweep {
  0%   { background-position: -160px 0, 0 0, 0 0; }
  100% { background-position: calc(100% + 160px) 0, 0 0, 0 0; }
}

@keyframes cyberCounterDrift {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(-1px); filter: brightness(1.08); }
}

@keyframes cyberChipSweep {
  0%   { background-position: -160px 0, 0 0, 0 0; }
  100% { background-position: calc(100% + 160px) 0, 0 0, 0 0; }
}

@keyframes cyberChipDrift {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 12px rgba(99,255,199,0.05); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 16px rgba(99,255,199,0.16), 0 0 24px rgba(73,217,255,0.08); }
}

@keyframes cyberDiagBlink {
  0%, 100% { opacity: 0.54; }
  50% { opacity: 0.92; }
}

/* ========================================================================== */
/* 1. GLOBE FILL — overlay the inside of the existing .map-container          */
/* ========================================================================== */
#cyber-globe {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 34%, rgba(62, 255, 187, 0.09) 0%, rgba(8, 14, 20, 0) 34%),
    radial-gradient(circle at 50% 118%, rgba(73, 217, 255, 0.13) 0%, rgba(0, 0, 0, 0) 42%),
    radial-gradient(ellipse at center, #04131d 0%, #000 70%);
  overflow: hidden;
  pointer-events: auto;
}
#cyber-globe::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(99,255,199,0) 0%, rgba(99,255,199,0) 44%, rgba(99,255,199,0.12) 50%, rgba(73,217,255,0.04) 54%, rgba(73,217,255,0) 61%, rgba(73,217,255,0) 100%),
    linear-gradient(180deg, rgba(99,255,199,0.09) 0%, rgba(99,255,199,0) 18%),
    repeating-linear-gradient(90deg, rgba(99,255,199,0.04) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(73,217,255,0.035) 0 1px, transparent 1px 58px);
  background-size: 340px 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-position: -360px 0, 0 0, 0 0, 0 0;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.28) 48%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.28) 48%, rgba(0,0,0,0) 100%);
  z-index: 1;
  animation: cyberSweepGlobe 14s linear infinite;
}
#cyber-globe::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14,24,20,0) 0%, rgba(14,24,20,0.28) 100%),
    repeating-linear-gradient(90deg, rgba(58,84,72,0.14) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(58,84,72,0.14) 0 1px, transparent 1px 22px);
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,0) 100%);
  z-index: 2;
  animation: cyberBracketPulse 6s ease-in-out infinite;
}
#cyber-radar {
  position: absolute;
  left: 50%;
  top: 52%;
  width: clamp(480px, 48vw, 980px);
  aspect-ratio: 1;
  transform: translate(-50%, -47%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.82;
  transition: transform 1.2s ease, opacity 1.2s ease;
}
#cyber-radar.focus-lock {
  transform: translate(-50%, -47%) scale(1.14);
  opacity: 0.96;
}
#cyber-radar.focus-lock .core {
  transform: translate(-50%, -50%) scale(1.08);
}
#cyber-radar::before,
#cyber-radar::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
#cyber-radar::before {
  left: 9%;
  right: 9%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(99,255,199,0) 0%, rgba(99,255,199,0.28) 12%, rgba(73,217,255,0.12) 50%, rgba(99,255,199,0.28) 88%, rgba(99,255,199,0) 100%);
}
#cyber-radar::after {
  top: 9%;
  bottom: 9%;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, rgba(73,217,255,0) 0%, rgba(73,217,255,0.18) 10%, rgba(99,255,199,0.1) 50%, rgba(73,217,255,0.18) 90%, rgba(73,217,255,0) 100%);
}
#cyber-radar .ring,
#cyber-radar .sweep,
#cyber-radar .core {
  position: absolute;
  border-radius: 50%;
}
#cyber-radar .ring {
  border: 1px solid rgba(73,217,255,0.14);
  background:
    radial-gradient(circle at center, rgba(73,217,255,0.05) 0%, rgba(73,217,255,0) 66%),
    repeating-conic-gradient(from 0deg, rgba(99,255,199,0.14) 0 2deg, transparent 2deg 18deg);
  -webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask-image: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  box-shadow: inset 0 0 18px rgba(99,255,199,0.05), 0 0 18px rgba(73,217,255,0.04);
}
#cyber-radar .ring-1 { inset: 2%; animation: cyberRadarPulse 8.6s ease-in-out infinite; }
#cyber-radar .ring-2 { inset: 14%; animation: cyberRadarSpin 44s linear infinite; opacity: 0.74; }
#cyber-radar .ring-3 { inset: 26%; animation: cyberRadarSpinReverse 34s linear infinite; opacity: 0.66; }
#cyber-radar .ring-4 { inset: 38%; animation: cyberRadarPulse 5.8s ease-in-out infinite; opacity: 0.58; }
#cyber-radar .sweep {
  inset: 8%;
  background: conic-gradient(from 0deg, rgba(99,255,199,0.28) 0 14deg, rgba(73,217,255,0.08) 14deg 28deg, rgba(0,0,0,0) 32deg 360deg);
  mix-blend-mode: screen;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(farthest-side, transparent 52%, #000 72%, transparent 86%);
  mask-image: radial-gradient(farthest-side, transparent 52%, #000 72%, transparent 86%);
}
#cyber-radar .sweep-1 { animation: cyberRadarSpin 28s linear infinite; }
#cyber-radar .sweep-2 {
  inset: 22%;
  opacity: 0.34;
  animation: cyberRadarSpinReverse 18s linear infinite;
}
#cyber-radar .core {
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(99,255,199,0.42);
  background: radial-gradient(circle, rgba(99,255,199,0.34) 0%, rgba(99,255,199,0.08) 44%, rgba(0,0,0,0) 82%);
  box-shadow: 0 0 18px rgba(99,255,199,0.18), 0 0 34px rgba(73,217,255,0.08);
  animation: cyberRadarPulse 4.6s ease-in-out infinite;
}
#cyber-diags {
  position: absolute;
  inset: 72px 20px 112px 20px;
  z-index: 5;
  pointer-events: none;
}
#cyber-diags .diag-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 156px;
  max-width: 220px;
  padding: 8px 10px 8px 12px;
  border-left: 1px solid rgba(99,255,199,0.24);
  background: linear-gradient(90deg, rgba(5,12,18,0.56) 0%, rgba(5,12,18,0.08) 62%, rgba(5,12,18,0) 100%);
  color: rgba(221,236,240,0.7);
  font: 600 10px/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(99,255,199,0.08);
  animation: cyberDiagBlink 5.2s ease-in-out infinite;
}
#cyber-diags .diag-label::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(99,255,199,0.72), rgba(99,255,199,0));
  transform: translate(-100%, -50%);
}
#cyber-diags .diag-label::after {
  content: '';
  position: absolute;
  left: -40px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(99,255,199,0.88);
  box-shadow: 0 0 10px rgba(99,255,199,0.4), 0 0 16px rgba(73,217,255,0.12);
  transform: translateY(-50%);
}
#cyber-diags .diag-tag { color: rgba(99,255,199,0.92); }
#cyber-diags .diag-text { color: rgba(222,234,241,0.56); letter-spacing: 0.12em; }
#cyber-diags .diag-label.right {
  align-items: flex-end;
  text-align: right;
  padding: 8px 12px 8px 10px;
  border-left: none;
  border-right: 1px solid rgba(73,217,255,0.24);
  background: linear-gradient(270deg, rgba(5,12,18,0.56) 0%, rgba(5,12,18,0.08) 62%, rgba(5,12,18,0) 100%);
}
#cyber-diags .diag-label.right::before {
  left: auto;
  right: -1px;
  background: linear-gradient(270deg, rgba(73,217,255,0.72), rgba(73,217,255,0));
  transform: translate(100%, -50%);
}
#cyber-diags .diag-label.right::after {
  left: auto;
  right: -40px;
}
#cyber-diags .diag-tl { top: 18px; left: 12px; animation-delay: -0.4s; }
#cyber-diags .diag-tr { top: 480px; right: 12px; animation-delay: -1.4s; }
#cyber-diags .diag-bl { bottom: 44px; left: 12px; animation-delay: -2.2s; }
#cyber-diags .diag-br { bottom: 96px; right: 12px; animation-delay: -3s; }
#cyber-stars   { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cyber-vignette{ position: absolute; inset: 0; z-index: 4; pointer-events: none;
                 box-shadow: inset 0 0 250px 70px rgba(0,0,0,0.95); }

/* hide legacy 2D world map; keep .grid-overlay intact (we removed it from DOM) */
#world-map { display: none !important; }

/* ========================================================================== */
/* 2. TOPBAR                                                                  */
/* ========================================================================== */
#cyber-topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  background:
    linear-gradient(180deg, rgba(5, 11, 17, 0.94) 0%, rgba(5, 11, 17, 0.68) 56%, rgba(5, 11, 17, 0.22) 100%),
    repeating-linear-gradient(90deg, rgba(99,255,199,0.05) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(73,217,255,0.03) 0 1px, transparent 1px 18px);
  border-bottom: 1px solid var(--c-glass-border);
  box-shadow: 0 10px 28px rgba(0,0,0,0.42), inset 0 -1px 0 rgba(73,217,255,0.16);
  backdrop-filter: var(--c-blur); pointer-events: auto;
  overflow: hidden;
  isolation: isolate;
  font: 600 13px/1 'JetBrains Mono', monospace; text-transform: uppercase; color: var(--c-text);
}
#cyber-topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(99,255,199,0) 0%, rgba(99,255,199,0) 44%, rgba(99,255,199,0.16) 50%, rgba(73,217,255,0.06) 56%, rgba(73,217,255,0) 64%, rgba(73,217,255,0) 100%),
    linear-gradient(90deg, rgba(99,255,199,0.12) 0%, rgba(99,255,199,0) 18%, rgba(73,217,255,0) 82%, rgba(73,217,255,0.14) 100%);
  background-size: 220px 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat;
  background-position: -220px 0, 0 0;
  pointer-events: none;
  animation: cyberSweepPanel 8.5s linear infinite;
}
#cyber-topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(99,255,199,0.78), rgba(73,217,255,0.66), transparent) center bottom / calc(100% - 40px) 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px top 10px / 20px 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px top 10px / 1px 12px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px top 10px / 20px 1px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px top 10px / 1px 12px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px bottom 8px / 20px 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px bottom 8px / 1px 10px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px bottom 8px / 20px 1px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px bottom 8px / 1px 10px no-repeat;
  pointer-events: none;
  animation: cyberBracketPulse 5.5s ease-in-out infinite;
}
#cyber-topbar > * { position: relative; z-index: 1; }
#cyber-topbar .tb-left  { display: flex; align-items: center; gap: 22px; }
#cyber-topbar .tb-title {
  letter-spacing: 0.24em;
  color: #fff;
  text-shadow: 0 0 16px rgba(99,255,199,0.26), 0 0 24px rgba(73,217,255,0.18);
}
#cyber-topbar .tb-title span {
  color: var(--c-accent);
  text-shadow: 0 0 18px rgba(99,255,199,0.42);
}
#cyber-topbar .tb-tabs  { display: flex; align-items: center; gap: 18px; margin-left: 18px; }
#cyber-topbar .tb-tab {
  position: relative;
  appearance: none;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--c-text-dim);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s, text-shadow 0.3s;
}
#cyber-topbar .tb-tab:not(.tb-tab--static) {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
}
#cyber-topbar .tb-tab--static { cursor: default; }
#cyber-topbar .tb-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
#cyber-topbar .tb-tab:hover,
#cyber-topbar .tb-tab.active {
  color: var(--c-accent);
  text-shadow: 0 0 12px rgba(99,255,199,0.28);
}
#cyber-topbar .tb-tab:hover::after,
#cyber-topbar .tb-tab.active::after { opacity: 1; }
#cyber-topbar .tb-tab:focus-visible,
#cyber-topbar .tb-cta:focus-visible {
  outline: 1px solid var(--c-accent-cool);
  outline-offset: 5px;
  color: #fff;
  text-shadow: 0 0 14px rgba(73,217,255,0.52);
}
#cyber-topbar .tb-cta {
  min-height: 36px;
  padding: 9px 18px;
  background: linear-gradient(180deg, rgba(99,255,199,0.2) 0%, rgba(99,255,199,0.08) 100%);
  border: 1px solid rgba(99,255,199,0.42);
  color: var(--c-accent);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 16px rgba(99,255,199,0.12);
}
#cyber-topbar .tb-cta:hover {
  background: linear-gradient(180deg, rgba(99,255,199,0.3) 0%, rgba(73,217,255,0.18) 100%);
  color: #02130f;
  box-shadow: 0 0 18px rgba(99,255,199,0.34), 0 0 28px rgba(73,217,255,0.16);
}

/* Native informational dialogs opened from the topbar. */
.cyber-info-dialog {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(82vh, 720px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(99,255,199,0.36);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(7,18,24,0.98), rgba(5,11,17,0.99)),
    repeating-linear-gradient(90deg, rgba(99,255,199,0.05) 0 1px, transparent 1px 24px);
  color: var(--c-text);
  box-shadow:
    0 28px 90px rgba(0,0,0,0.76),
    0 0 0 1px rgba(73,217,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 0 42px rgba(99,255,199,0.06);
  font-family: "Inter", sans-serif;
  color-scheme: dark;
}
.cyber-info-dialog[open] {
  animation: cyberDialogIn 180ms ease-out;
}
.cyber-info-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 42%, rgba(73,217,255,0.12), transparent 44%),
    rgba(1,5,9,0.82);
  backdrop-filter: blur(8px);
}
.cyber-info-dialog__panel {
  position: relative;
  margin: 0;
  padding: clamp(22px, 4vw, 38px);
}
.cyber-info-dialog__panel::before,
.cyber-info-dialog__panel::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 18px;
  pointer-events: none;
}
.cyber-info-dialog__panel::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--c-accent);
  border-left: 1px solid var(--c-accent);
}
.cyber-info-dialog__panel::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--c-accent-cool);
  border-bottom: 1px solid var(--c-accent-cool);
}
.cyber-info-dialog__header {
  margin: 0 0 20px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(99,255,199,0.16);
}
.cyber-info-dialog__eyebrow {
  margin: 0 0 8px;
  color: var(--c-accent);
  font: 600 9px/1.3 "JetBrains Mono", monospace;
  letter-spacing: 0.2em;
}
.cyber-info-dialog h2 {
  margin: 0;
  color: #fff;
  font: 650 clamp(21px, 3.5vw, 28px)/1.2 "Inter", sans-serif;
  letter-spacing: 0.03em;
  text-transform: none;
  text-shadow: 0 0 24px rgba(73,217,255,0.24);
}
.cyber-info-dialog__copy {
  color: rgba(232,244,248,0.88);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.72;
}
.cyber-info-dialog__copy p { margin: 0 0 14px; }
.cyber-info-dialog__copy p:last-child { margin-bottom: 0; }
.cyber-info-dialog__link {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 140ms ease, text-shadow 140ms ease;
}
.cyber-info-dialog__link:hover,
.cyber-info-dialog__link:focus-visible {
  color: #fff;
  text-shadow: 0 0 18px rgba(73,217,255,0.45);
}
.cyber-info-dialog__made-in {
  padding-top: 8px;
  color: var(--c-accent);
  letter-spacing: 0.02em;
}
.cyber-info-dialog__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(73,217,255,0.14);
}
.cyber-info-dialog__ok {
  min-width: 68px;
  padding: 7px 18px;
  border: 1px solid rgba(99,255,199,0.52);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(99,255,199,0.2), rgba(99,255,199,0.08));
  color: var(--c-accent);
  font: 700 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(99,255,199,0.1);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.cyber-info-dialog__ok:hover,
.cyber-info-dialog__ok:focus-visible {
  outline: none;
  background: var(--c-accent);
  color: #02130f;
  box-shadow: 0 0 22px rgba(99,255,199,0.38);
}

@keyframes cyberDialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cyber-info-dialog[open] { animation: none; }
}

/* ========================================================================== */
/* 3. LEFT SIDE PANEL (country card + visitor block)                          */
/*    capped to ~70vh and scrollable; sits below the topbar                   */
/* ========================================================================== */
#cyber-side {
  position: absolute; left: var(--hud-edge); top: var(--hud-top); width: clamp(280px, 18vw, 340px); z-index: 6;
  background:
    linear-gradient(180deg, rgba(7,14,22,0.92) 0%, rgba(7,14,22,0.78) 100%),
    repeating-linear-gradient(90deg, rgba(99,255,199,0.05) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(73,217,255,0.03) 0 1px, transparent 1px 22px);
  border: 1px solid var(--c-glass-border);
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(0,0,0,0.56), 0 0 0 1px rgba(73,217,255,0.05), inset 0 1px 0 rgba(255,255,255,0.04), inset 0 0 26px rgba(99,255,199,0.07);
  font: 13px/1.5 'Inter', sans-serif; color: var(--c-text);
  backdrop-filter: var(--c-blur); pointer-events: auto;
  max-height: calc(100vh - clamp(160px, 22vh, 220px)); overflow-y: auto; overflow-x: hidden;
  isolation: isolate;
}
#cyber-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(99,255,199,0) 0%, rgba(99,255,199,0) 44%, rgba(99,255,199,0.16) 50%, rgba(73,217,255,0.05) 56%, rgba(73,217,255,0) 64%, rgba(73,217,255,0) 100%),
    linear-gradient(90deg, transparent, rgba(99,255,199,0.74), rgba(73,217,255,0.56), transparent);
  background-size: 210px 100%, calc(100% - 28px) 1px;
  background-repeat: no-repeat, no-repeat;
  background-position: -210px 0, 14px 0;
  pointer-events: none;
  animation: cyberSweepPanel 9.5s linear infinite;
}
#cyber-side::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset -1px 0 0 rgba(73,217,255,0.14), inset 1px 0 0 rgba(99,255,199,0.1);
  background:
    linear-gradient(var(--c-accent), var(--c-accent)) left 12px top 12px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 12px top 12px / 1px 16px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 12px top 12px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 12px top 12px / 1px 16px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 12px bottom 12px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 12px bottom 12px / 1px 16px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 12px bottom 12px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 12px bottom 12px / 1px 16px no-repeat;
  animation: cyberBracketPulse 6.5s ease-in-out infinite;
}
#cyber-side::-webkit-scrollbar { width: 4px; }
#cyber-side::-webkit-scrollbar-thumb { background: rgba(0,230,255,0.3); border-radius: 4px; }

.side-head  { display: flex; align-items: center; gap: 12px; padding: 14px 16px;
              border-bottom: 1px solid rgba(255,255,255,0.06);
              background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0) 100%); }
.side-head .badge {
  width: 56px;
  height: 40px;
  border: 1px solid rgba(99, 255, 199, 0.55);
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(99,255,199,0.14) 0%, rgba(73,217,255,0.08) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #dfe8ee;
  font: 700 14px/1 'JetBrains Mono', monospace;
  box-shadow: 0 0 14px rgba(99,255,199,0.18), 0 4px 14px rgba(0,0,0,0.4);
}
.side-head .badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-head .badge.has-flag { border-color: rgba(255, 255, 255, 0.32); background: transparent; box-shadow: 0 0 16px rgba(73,217,255,0.20), 0 4px 14px rgba(0,0,0,0.4); }
.side-head .badge.fallback-emoji {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 24px;
  line-height: 1;
  background: rgba(20, 30, 28, 0.5);
}
.side-head .head-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.side-head .name  { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: 0.12em; text-shadow: 0 0 14px rgba(99,255,199,0.16); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-head .head-ip { font: 600 12px/1.2 'JetBrains Mono', monospace; color: var(--c-accent-cool); letter-spacing: 0.04em; text-shadow: 0 0 10px rgba(73,217,255,0.20); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-head .close { color: var(--c-text-dim); cursor: pointer; font-size: 14px; flex: 0 0 auto; }
.side-head .close:hover { color: var(--c-accent-2); }

/* ── Verdict bar (replaces #N MOST-ATTACKED COUNTRY) ───────────────────── */
.side-verdict {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(90deg, rgba(99,255,199,0.05) 0%, rgba(99,255,199,0) 80%);
  transition: background 0.3s;
}
.side-verdict .verdict-label { font-size: 10px; letter-spacing: 0.18em; color: var(--c-text-dim); }
.side-verdict .verdict-value {
  font: 800 18px/1.1 'JetBrains Mono', monospace;
  letter-spacing: 0.07em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255,255,255,0.18);
}
.side-verdict .verdict-explain {
  color: rgba(212,231,236,0.58);
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.025em;
}
.side-verdict[data-tone="good"] { background: linear-gradient(90deg, rgba(99,255,153,0.12) 0%, rgba(99,255,153,0) 80%); }
.side-verdict[data-tone="good"]  .verdict-value { color: #6fffa3; text-shadow: 0 0 18px rgba(111,255,163,0.40); }
.side-verdict[data-tone="warn"] { background: linear-gradient(90deg, rgba(255,210,90,0.12) 0%, rgba(255,210,90,0) 80%); }
.side-verdict[data-tone="warn"]  .verdict-value { color: #ffd25a; text-shadow: 0 0 18px rgba(255,210,90,0.45); }
.side-verdict[data-tone="bad"]  { background: linear-gradient(90deg, rgba(255,90,110,0.14) 0%, rgba(255,90,110,0) 80%); }
.side-verdict[data-tone="bad"]   .verdict-value { color: #ff5a6e; text-shadow: 0 0 18px rgba(255,90,110,0.50); }
.side-verdict[data-tone="muted"] .verdict-value { color: rgba(255,255,255,0.55); }

/* ── Tests list (replaces side-counts) ─────────────────────────────────── */
.side-tests { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.side-test {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  user-select: none;
  outline: none;
}
.side-test:hover { background: rgba(255,255,255,0.025); }
.side-test:focus-visible {
  background: rgba(99,255,199,0.07);
  box-shadow: 0 0 0 1px rgba(99,255,199,0.62), 0 0 18px rgba(99,255,199,0.12);
}
.side-test[aria-expanded="true"] {
  background: linear-gradient(90deg, rgba(99,255,199,0.105), rgba(99,255,199,0.025));
  box-shadow: inset 0 0 0 1px rgba(99,255,199,0.18);
}
.side-test .st-icon { width: 18px; height: 18px; display: inline-flex; color: rgba(255,255,255,0.55); }
.side-test .st-icon svg { width: 100%; height: 100%; }
.side-test .st-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.side-test .st-name { font-size: 12px; font-weight: 600; color: #e6eef2; letter-spacing: 0.02em; }
.side-test .st-status {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: rgba(212,231,236,0.45);
}
.side-test .st-score {
  font: 700 14px/1 'JetBrains Mono', monospace;
  color: #fff;
  min-width: 32px; text-align: right;
  text-shadow: 0 0 10px rgba(255,255,255,0.12);
}
.side-test[data-tone="muted"] .st-score { color: rgba(255,255,255,0.40); }
.side-test[data-tone="good"]  { border-left-color: #6fffa3; }
.side-test[data-tone="good"]  .st-icon  { color: #6fffa3; }
.side-test[data-tone="good"]  .st-score { color: #6fffa3; text-shadow: 0 0 10px rgba(111,255,163,0.30); }
.side-test[data-tone="warn"]  { border-left-color: #ffd25a; }
.side-test[data-tone="warn"]  .st-icon  { color: #ffd25a; }
.side-test[data-tone="warn"]  .st-score { color: #ffd25a; text-shadow: 0 0 10px rgba(255,210,90,0.30); }
.side-test[data-tone="bad"]   { border-left-color: #ff5a6e; }
.side-test[data-tone="bad"]   .st-icon  { color: #ff5a6e; }
.side-test[data-tone="bad"]   .st-score { color: #ff5a6e; text-shadow: 0 0 10px rgba(255,90,110,0.35); }

/* ── Detector explanation popover ────────────────────────────────────────
   Opens only by click/keyboard. Position is supplied by AntiBotStyle so it
   remains compatible with style-src-attr 'none'. */
.st-popup {
  --st-accent: #8fa2ac;
  --st-accent-rgb: 143, 162, 172;
  --st-arrow-y: 34px;
  position: fixed;
  z-index: 2147482000;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #dce9ee;
  background:
    radial-gradient(circle at 0 0, rgba(var(--st-accent-rgb), 0.14), transparent 36%),
    linear-gradient(145deg, rgba(9, 26, 34, 0.985), rgba(3, 13, 20, 0.99));
  border: 1px solid rgba(var(--st-accent-rgb), 0.52);
  border-radius: 14px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.62),
    0 0 32px rgba(var(--st-accent-rgb), 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--st-accent-rgb), 0.65) rgba(255,255,255,0.035);
  animation: st-popover-in 150ms cubic-bezier(.2,.75,.25,1) both;
}
.st-popup[hidden] { display: none !important; }
.st-popup[data-tone="good"]  { --st-accent: #6fffa3; --st-accent-rgb: 111, 255, 163; }
.st-popup[data-tone="warn"]  { --st-accent: #ffd25a; --st-accent-rgb: 255, 210, 90; }
.st-popup[data-tone="bad"]   { --st-accent: #ff5a6e; --st-accent-rgb: 255, 90, 110; }
.st-popup[data-tone="muted"] { --st-accent: #8fa2ac; --st-accent-rgb: 143, 162, 172; }
.st-popup::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: var(--st-arrow-y);
  left: 0;
  width: 8px;
  height: 28px;
  transform: translateY(-50%);
  background: var(--st-accent);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  filter: drop-shadow(0 0 7px rgba(var(--st-accent-rgb), 0.72));
  pointer-events: none;
}
.st-popup[data-placement="left"]::before {
  right: 0;
  left: auto;
  clip-path: polygon(100% 50%, 0 0, 0 100%);
}
.st-popup[data-placement="overlay"]::before {
  top: 0;
  left: 28px;
  width: 30px;
  height: 4px;
  transform: none;
  clip-path: none;
}
.st-popover__header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 15px 14px 13px 16px;
  background: linear-gradient(180deg, rgba(7, 22, 29, 0.99), rgba(7, 22, 29, 0.93));
  border-bottom: 1px solid rgba(var(--st-accent-rgb), 0.19);
  box-shadow: 0 7px 20px rgba(0,0,0,0.16);
}
.st-popover__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  color: var(--st-accent);
  background: rgba(var(--st-accent-rgb), 0.09);
  border: 1px solid rgba(var(--st-accent-rgb), 0.42);
  border-radius: 10px;
  box-shadow: inset 0 0 14px rgba(var(--st-accent-rgb), 0.07), 0 0 16px rgba(var(--st-accent-rgb), 0.08);
}
.st-popover__icon svg { width: 22px; height: 22px; }
.st-popover__heading { min-width: 0; }
.st-popover__category,
.st-popover__section-label {
  font: 700 9px/1.25 'JetBrains Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.st-popover__category { color: var(--st-accent); opacity: 0.88; }
.st-popover__title {
  margin: 4px 0 0;
  color: #f3f8fa;
  font: 700 17px/1.2 'Inter', sans-serif;
  letter-spacing: 0.01em;
}
.st-popover__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: rgba(225,239,243,0.62);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  font: 300 23px/1 'Inter', sans-serif;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.st-popover__close:hover,
.st-popover__close:focus-visible {
  color: var(--st-accent);
  background: rgba(var(--st-accent-rgb), 0.10);
  border-color: rgba(var(--st-accent-rgb), 0.55);
  outline: none;
  transform: scale(1.04);
}
.st-popover__current {
  margin: 14px 14px 0;
  padding: 12px 13px;
  background: linear-gradient(100deg, rgba(var(--st-accent-rgb), 0.11), rgba(var(--st-accent-rgb), 0.025));
  border: 1px solid rgba(var(--st-accent-rgb), 0.22);
  border-left: 3px solid var(--st-accent);
  border-radius: 9px;
}
.st-popover__current-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.st-popover__current .st-popover__section-label { color: var(--st-accent); }
.st-popover__score {
  color: var(--st-accent);
  font: 800 15px/1 'JetBrains Mono', monospace;
  text-shadow: 0 0 12px rgba(var(--st-accent-rgb), 0.38);
}
.st-popover__status {
  margin-bottom: 7px;
  color: #eff7f9;
  font: 650 11px/1.4 'Inter', sans-serif;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.st-d-line {
  position: relative;
  margin-top: 5px;
  padding-left: 12px;
  color: rgba(218,234,239,0.74);
  font: 500 11px/1.5 'JetBrains Mono', monospace;
  overflow-wrap: anywhere;
}
.st-d-line::before {
  content: "";
  position: absolute;
  top: .56em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(189,216,224,0.46);
}
.st-d-line.st-d-clear { color: rgba(153,255,194,0.82); }
.st-d-line.st-d-clear::before { background: #6fffa3; box-shadow: 0 0 7px rgba(111,255,163,.55); }
.st-d-line.st-d-unmeasured { color: rgba(255,218,127,0.78); }
.st-d-line.st-d-unmeasured::before { background: #ffd25a; box-shadow: 0 0 7px rgba(255,210,90,.45); }
.st-d-line.st-d-conflict { color: #ff9aa8; }
.st-d-line.st-d-conflict::before { background: #ff5a6e; box-shadow: 0 0 8px rgba(255,90,110,.62); }
.st-popover__section {
  padding: 15px 16px 0;
}
.st-popover__section:last-child { padding-bottom: 17px; }
.st-popover__section > .st-popover__section-label { color: #64e9ff; }
.st-popover__section--inputs > .st-popover__section-label { color: #a995ff; }
.st-popover__section--risk > .st-popover__section-label { color: #ffd25a; }
.st-popover__copy {
  margin: 7px 0 0;
  color: rgba(222,237,241,0.76);
  font: 450 12px/1.56 'Inter', sans-serif;
}
.st-popover__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.st-popover__chip {
  padding: 5px 8px;
  color: #b8f8ff;
  background: rgba(73,213,236,0.07);
  border: 1px solid rgba(73,213,236,0.22);
  border-radius: 999px;
  font: 650 9px/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.025em;
}
.st-popover__chip:nth-child(3n + 2) {
  color: #d0c6ff;
  background: rgba(169,149,255,0.08);
  border-color: rgba(169,149,255,0.25);
}
.st-popover__chip:nth-child(3n) {
  color: #baffd1;
  background: rgba(111,255,163,0.07);
  border-color: rgba(111,255,163,0.22);
}
@keyframes st-popover-in {
  from { opacity: 0; transform: translateX(-6px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.st-popup[data-placement="left"] { animation-name: st-popover-in-left; }
@keyframes st-popover-in-left {
  from { opacity: 0; transform: translateX(6px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 640px) {
  .st-popup { max-width: calc(100vw - 16px); border-radius: 11px; }
  .st-popover__header { grid-template-columns: 36px minmax(0,1fr) 32px; gap: 9px; padding: 12px; }
  .st-popover__icon { width: 34px; height: 34px; }
  .st-popover__icon svg { width: 19px; height: 19px; }
  .st-popover__title { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-popup,
  .st-popup[data-placement="left"] { animation: none; }
  .st-popover__close,
  .side-test { transition: none; }
}

.side-foot  { padding: 8px 16px; font-size: 10px; color: var(--c-text-dim);
              border-bottom: 1px solid rgba(255,255,255,0.06); }
.side-foot .more { color: var(--c-accent); cursor: pointer; text-shadow: 0 0 12px rgba(99,255,199,0.22); }

.side-you   { padding: 12px 16px; display: grid; grid-template-columns: 88px 1fr;
              column-gap: 12px; row-gap: 6px; font-size: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%); }
.side-you .k { color: rgba(212,231,236,0.56); font-size: 10px; font-weight: 600; letter-spacing: 0.05em; }
.side-you .v { font-family: 'JetBrains Mono', monospace; text-align: right; color: #fff;
               word-break: break-all; min-width: 0; }
.side-you .v.threat-bad { color: var(--c-accent-2); }
.side-you .v.threat-warn { color: #ffc343; }
.side-you .v.threat-ok  { color: var(--c-accent); }

.surface-card__intro {
  margin: 0.4rem 0 0.9rem;
  color: rgba(220, 240, 245, 0.72);
  line-height: 1.55;
}

.surface-summary {
  margin-block-end: 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(91, 245, 235, 0.2);
  border-radius: 0.55rem;
  color: #bfece8;
  background: rgba(5, 24, 32, 0.72);
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.surface-result {
  min-inline-size: 0;
  padding: 0.75rem;
  border: 1px solid rgba(91, 245, 235, 0.18);
  border-radius: 0.65rem;
  background: linear-gradient(150deg, rgba(15, 52, 61, 0.42), rgba(5, 18, 26, 0.74));
}

.surface-result h3 {
  margin: 0 0 0.55rem;
  color: #72f8ef;
}

.surface-preview {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 195, 67, 0.24);
  border-radius: 0.4rem;
  image-rendering: auto;
}

.surface-result dl {
  display: grid;
  gap: 0.35rem;
  margin: 0.65rem 0 0;
}

.surface-result dl div,
.surface-pairs div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.8fr) minmax(0, 1.2fr);
  gap: 0.5rem;
  align-items: baseline;
}

.surface-result dt {
  color: rgba(218, 237, 242, 0.6);
}

.surface-result dd {
  min-inline-size: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.surface-pairs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-block: 0.8rem;
}

.surface-pairs div {
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 195, 67, 0.2);
  border-radius: 0.5rem;
}

.surface-pairs strong {
  color: #ffc343;
  text-align: end;
}

@media (max-width: 980px) {
  .surface-grid,
  .surface-pairs {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== */
/* 4. RIGHT RAIL (module buttons)                                             */
/* ========================================================================== */
#cyber-rail {
  position: absolute; right: var(--hud-edge); top: var(--hud-top); z-index: 6;
  display: flex; flex-direction: column; gap: clamp(10px, 1.3vh, 14px); pointer-events: auto;
}
#cyber-rail .rail-btn {
  width: clamp(42px, 3.2vw, 54px); height: clamp(42px, 3.2vw, 54px); padding: 0; appearance: none;
  background: linear-gradient(180deg, rgba(8,18,26,0.9) 0%, rgba(8,18,26,0.62) 100%); border: 1px solid var(--c-glass-border);
  border-radius: 12px; backdrop-filter: var(--c-blur);
  display: flex; justify-content: center; align-items: center;
  color: var(--c-text); cursor: pointer; transition: 0.2s;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}
#cyber-rail .rail-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: clamp(1.5rem, 2vw, 1.75rem);
  block-size: clamp(1.5rem, 2vw, 1.75rem);
}
#cyber-rail .rail-btn__svg {
  inline-size: 100%;
  block-size: 100%;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#cyber-rail .rail-btn:hover,
#cyber-rail .rail-btn.is-active {
  border-color: var(--c-accent); color: var(--c-accent);
  box-shadow: 0 0 14px rgba(99,255,199,0.24), 0 0 28px rgba(73,217,255,0.12); transform: scale(1.05);
}
#cyber-rail .rail-btn.is-active {
  background: linear-gradient(180deg, rgba(12, 26, 32, 0.98) 0%, rgba(8, 18, 26, 0.84) 100%);
}

/* ========================================================================== */
/* 5. BOTTOM BAR                                                              */
/*    Sits at bottom of .map-container, leaves 400px on the right for the     */
/*    legacy "Advanced view" toggle (.btn-panel).                             */
/* ========================================================================== */
#cyber-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  background:
    linear-gradient(180deg, rgba(7,14,22,0.18) 0%, rgba(4,9,14,0.88) 10%, rgba(4,9,14,0.96) 100%),
    repeating-linear-gradient(90deg, rgba(99,255,199,0.05) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(73,217,255,0.03) 0 1px, transparent 1px 18px);
  border-top: 1px solid var(--c-glass-border);
  padding: clamp(8px, 1.15vh, 12px) var(--hud-edge) clamp(8px, 1vh, 10px); pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 0.9vh, 10px);
  backdrop-filter: var(--c-blur);
  overflow: hidden;
  box-shadow: 0 -18px 48px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.04);
  isolation: isolate;
}
#cyber-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(99,255,199,0) 0%, rgba(99,255,199,0) 44%, rgba(99,255,199,0.15) 50%, rgba(73,217,255,0.05) 56%, rgba(73,217,255,0) 64%, rgba(73,217,255,0) 100%),
    linear-gradient(90deg, transparent, rgba(99,255,199,0.72), rgba(73,217,255,0.52), transparent);
  background-size: 220px 100%, calc(100% - 36px) 1px;
  background-repeat: no-repeat, no-repeat;
  background-position: -220px 0, 18px 0;
  pointer-events: none;
  animation: cyberSweepPanel 9s linear infinite;
}
#cyber-bottom::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(99,255,199,0.06) 0%, rgba(99,255,199,0) 18%, rgba(73,217,255,0) 82%, rgba(73,217,255,0.06) 100%),
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px top 10px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px top 10px / 1px 16px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px top 10px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px top 10px / 1px 16px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px bottom 10px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) left 14px bottom 10px / 1px 16px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px bottom 10px / 24px 1px no-repeat,
    linear-gradient(var(--c-accent-cool), var(--c-accent-cool)) right 14px bottom 10px / 1px 16px no-repeat;
  pointer-events: none;
  animation: cyberBracketPulse 6s ease-in-out infinite;
}
#cyber-numbers { display: flex; justify-content: center; flex-wrap: wrap;
                 gap: 8px clamp(8px, 0.8vw, 14px); font: 600 15px 'JetBrains Mono', monospace;
                 letter-spacing: 1px; color: #fff; align-items: center; width: 100%; }
#cyber-numbers .n {
  position: relative;
  min-width: clamp(72px, 5.2vw, 96px);
  text-align: center;
  padding: 16px 10px 8px;
  overflow: hidden;
  border: 1px solid rgba(114,255,208,0.14);
  border-top-color: rgba(99,255,199,0.3);
  border-radius: 12px;
  background:
    linear-gradient(110deg, rgba(99,255,199,0) 0%, rgba(99,255,199,0) 44%, rgba(99,255,199,0.12) 50%, rgba(73,217,255,0.05) 56%, rgba(73,217,255,0) 63%, rgba(73,217,255,0) 100%),
    linear-gradient(180deg, rgba(16,28,36,0.98) 0%, rgba(8,14,18,0.68) 100%),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 62%);
  background-size: 160px 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: -160px 0, 0 0, 0 0;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(99,255,199,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 16px rgba(99,255,199,0.05), 0 0 22px rgba(73,217,255,0.04);
  animation: cyberCounterSweep 8.6s linear infinite, cyberCounterDrift 5.1s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.42s), calc(var(--i, 0) * -0.28s);
}
#cyber-numbers .n::before {
  content: attr(data-k);
  position: absolute;
  top: 6px;
  left: 10px;
  color: rgba(181,213,222,0.66);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-shadow: none;
}
#cyber-numbers .n::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, rgba(99,255,199,0), rgba(99,255,199,0.5), rgba(73,217,255,0.4), rgba(99,255,199,0));
  opacity: 0.5;
}
#cyber-chips   { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; width: 100%; }
#cyber-chips .chip {
  border: 1px solid rgba(114,255,208,0.14);
  background:
    linear-gradient(110deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 44%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0) 58%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, rgba(11,21,28,0.96) 0%, rgba(8,14,18,0.84) 100%),
    repeating-linear-gradient(90deg, rgba(99,255,199,0.04) 0 1px, transparent 1px 18px);
  background-size: 160px 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: -160px 0, 0 0, 0 0;
  padding: 6px 12px; border-radius: 14px; font: 600 11px 'JetBrains Mono', monospace;
  cursor: pointer; transition: 0.2s; user-select: none;
  min-width: clamp(46px, 3.2vw, 54px); text-align: center;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 12px rgba(99,255,199,0.05);
  animation: cyberChipSweep 7.2s linear infinite, cyberChipDrift 5.3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.28s), calc(var(--i, 0) * -0.22s);
}
#cyber-chips .chip:hover { border-color: var(--c-accent); box-shadow: 0 0 12px rgba(99,255,199,0.22), 0 0 20px rgba(73,217,255,0.08); }
#cyber-chips .chip.off  { opacity: 0.28; filter: saturate(0.55); animation-play-state: paused, paused; }

.ticker {
  position: relative;
  width: 100%;
  height: clamp(22px, 2.6vh, 28px);
  overflow: hidden;
  color: var(--c-text-dim);
  font: 11px/1 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%),
    repeating-linear-gradient(90deg, rgba(72,92,110,0.08) 0 1px, transparent 1px 18px),
    linear-gradient(90deg, rgba(99,255,199,0.05) 0%, rgba(99,255,199,0) 22%, rgba(255,255,255,0.025) 50%, rgba(73,217,255,0) 78%, rgba(73,217,255,0.05) 100%);
}
.ticker::before,
.ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before {
  left: 0;
  background: linear-gradient(90deg, rgba(5,8,16,0.96) 0%, rgba(5,8,16,0) 100%);
}
.ticker::after {
  right: 0;
  background: linear-gradient(270deg, rgba(5,8,16,0.96) 0%, rgba(5,8,16,0) 100%);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  min-width: max-content;
  padding-left: 2px;
}
.ticker-item,
.ticker-track .item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 18px;
  padding: 4px 12px 4px 14px;
  opacity: 0.94;
  flex: 0 0 auto;
  border-left: 1px solid rgba(99,255,199,0.18);
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.ticker-item::before,
.ticker-track .item::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(99,255,199,0.44);
  box-shadow: 0 0 10px rgba(99,255,199,0.32), 0 0 18px rgba(73,217,255,0.16);
  transform: translateY(-50%);
}
.ticker-item .tt-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px currentColor;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 0 14px rgba(99,255,199,0.06);
}
.ticker-item .tt-cc {
  color: rgba(212,231,236,0.48);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 18px;
}
.ticker-item .tt-arrow {
  color: rgba(120,235,255,0.84);
  font-size: 10px;
  text-shadow: 0 0 8px rgba(73,217,255,0.34);
}
.ticker-item .src,
.ticker-item .dst,
.ticker-track .item .src,
.ticker-track .item .dst {
  color: #eef6fb;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.ticker-item .src,
.ticker-track .item .src {
  color: rgba(236,242,248,0.78);
}
.ticker-item .dst,
.ticker-track .item .dst {
  color: #ffffff;
}

/* ========================================================================== */
/* 6. TOOLTIP / USER PIN                                                      */
/* ========================================================================== */
.cy-tip { background: var(--c-glass-bg); border: 1px solid var(--c-glass-border);
          border-radius: 8px; backdrop-filter: var(--c-blur);
          padding: 10px 14px; min-width: 220px;
          box-shadow: 0 10px 20px rgba(0,0,0,0.4); pointer-events: none; color: var(--c-text); }
.cy-tip-h  { border-bottom: 1px solid var(--c-glass-border); padding-bottom: 6px;
             margin-bottom: 8px; font-size: 13px; font-weight: 600;
             display: flex; justify-content: space-between; }
.cy-tip-cc { color: var(--c-text-dim); }
.cy-tip-r  { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.cy-tip-hot{ border-top: 1px dashed var(--c-glass-border); margin-top: 6px;
             padding-top: 6px; color: var(--c-warn); }
.cy-tip-r--class { color: #dceeff; }
.cy-tip-r--ok b { color: #7dffd6; }
.cy-tip-r--warn b { color: #ffd98f; }
.cy-tip-meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center;
      gap: 8px; font-size: 12px; margin: 8px 0 4px; }
.cy-tip-meter__bar { position: relative; height: 6px; border-radius: 999px; overflow: hidden;
      background: rgba(120, 160, 188, 0.16); box-shadow: inset 0 0 0 1px rgba(145, 198, 255, 0.12); }
.cy-tip-meter__bar i { display: block; height: 100%; border-radius: inherit;
        background: linear-gradient(90deg, rgba(120,185,255,0.34), rgba(232,244,255,0.92));
        box-shadow: 0 0 10px rgba(173, 222, 255, 0.4); }
.cy-tip--moon { min-width: 236px; border-color: rgba(144, 214, 255, 0.34);
      box-shadow: 0 0 24px rgba(112, 186, 255, 0.14), 0 14px 30px rgba(0,0,0,0.42);
      background: linear-gradient(180deg, rgba(8,18,30,0.94), rgba(4,11,20,0.94)); }
.cy-tip--moon .cy-tip-cc { color: #bce7ff; letter-spacing: 0.08em; text-transform: uppercase; }
.cy-tip--moon .cy-tip-h b { letter-spacing: 0.12em; text-transform: uppercase; }
.cy-tip--moon .cy-tip-hot { color: #9fe6ff; }

.cyber-moon-tip { position: fixed; left: 0; top: 0; z-index: 140;
                  opacity: 0; transform: scale(0.96); transform-origin: top left;
                  transition: opacity 0.14s ease, transform 0.14s ease;
                  pointer-events: none; }
.cyber-moon-tip.visible { opacity: 1; transform: scale(1); }

.cyber-userpin { position: relative; }
.cyber-userpin .up-dot   { position: absolute; left: -6px; top: -6px;
                           width: 12px; height: 12px; background: var(--c-accent);
                           border-radius: 50%; box-shadow: 0 0 15px var(--c-accent); }
.cyber-userpin .up-pulse { position: absolute; left: -20px; top: -20px;
                           width: 40px; height: 40px; border: 1px solid var(--c-accent);
                           border-radius: 50%; animation: cyberPing 2s infinite; }
.cyber-userpin .up-label { position: absolute; left: 14px; top: -9px;
                           display: inline-flex; align-items: center; gap: 4px;
                           white-space: nowrap; color: #dffdf4;
                           font: 600 12px/1 "Inter", sans-serif;
                           letter-spacing: 0.01em;
                           text-shadow: 0 0 8px rgba(99,255,199,0.78),
                                        0 1px 2px rgba(0,0,0,0.92); }
@keyframes cyberPing { 0% { transform: scale(0.5); opacity: 1; }
                       100% { transform: scale(2.5); opacity: 0; } }

/* ===== Leak detection overlays (cyberLeak API) ===== */
.cyber-leakpin { position: relative; }
.cyber-leakpin .lp-dot   { position: absolute; left: -6px; top: -6px;
                           width: 12px; height: 12px; background: #ff3838;
                           border-radius: 50%; box-shadow: 0 0 18px #ff3838,
                           0 0 4px #fff; }
.cyber-leakpin .lp-ring  { position: absolute; left: -12px; top: -12px;
                           width: 24px; height: 24px; border: 1px solid #ff5050;
                           border-radius: 50%; opacity: 0.7; }
.cyber-leakpin .lp-pulse { position: absolute; left: -22px; top: -22px;
                           width: 44px; height: 44px; border: 1px solid #ff3030;
                           border-radius: 50%; animation: cyberLeakPing 1.6s infinite; }
.cyber-leakpin .lp-label { position: absolute; left: 14px; top: -10px;
                           display: inline-flex; align-items: center; gap: 4px;
                           white-space: nowrap;
                           padding: 3px 8px; background: rgba(20, 4, 4, 0.92);
                           border: 1px solid #ff3030; border-radius: 4px;
                           color: #ffb4b4; font: 600 11px/1 "Inter", monospace;
                           letter-spacing: 1px; text-transform: uppercase;
                           box-shadow: 0 0 12px rgba(255,40,40,0.45); }
.country-flag-glyph,
.flag--emoji,
.map-country-flag,
.flag-wrapper--emoji,
.hfp-h-flag,
.side-head .badge.fallback-emoji {
  font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-variant-emoji: emoji;
  letter-spacing: 0;
  text-transform: none;
}
.country-flag-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 1.25em;
  color: initial;
  line-height: 1;
}
.map-country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  min-width: 16px;
  height: 11px;
  overflow: visible;
  color: initial;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 11px;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}
.map-country-code {
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.map-country-place {
  min-width: 0;
}
@keyframes cyberLeakPing { 0% { transform: scale(0.4); opacity: 1; }
                           100% { transform: scale(2.6); opacity: 0; } }

.cyber-leak-mid { position: relative; cursor: help; }
.cyber-leak-mid .lm-icon { position: absolute; left: -10px; top: -10px;
                           width: 20px; height: 20px; line-height: 20px;
                           text-align: center; background: rgba(40, 6, 6, 0.95);
                           color: #ff5050; border: 1px solid #ff3030;
                           border-radius: 50%; font: 700 13px/20px "Inter", sans-serif;
                           box-shadow: 0 0 10px rgba(255,40,40,0.55); }
.cyber-leak-mid .lm-tip  { position: absolute; left: 16px; top: -14px; white-space: nowrap;
                           padding: 4px 10px; background: rgba(20, 4, 4, 0.96);
                           border: 1px solid #ff3030; border-radius: 4px;
                           color: #ffd0d0; font: 700 11px/1 "Inter", monospace;
                           letter-spacing: 1.2px; text-transform: uppercase;
                           box-shadow: 0 0 14px rgba(255,40,40,0.55);
                           opacity: 0; transform: translateX(-6px) scale(0.92);
                           transform-origin: left center;
                           transition: opacity 0.18s ease, transform 0.18s ease;
                           pointer-events: none; }
.cyber-leak-mid:hover .lm-tip { opacity: 1; transform: translateX(0) scale(1); }
.cyber-leak-mid:hover .lm-icon { box-shadow: 0 0 18px rgba(255,80,80,0.95); }

/* ========================================================================== */
/* 7. RESPONSIVE                                                              */
/* ========================================================================== */
@media (max-width: 1024px) {
  #cyber-topbar .tb-left { min-width: 0; gap: 10px; }
  #cyber-topbar .tb-tabs { gap: 10px; margin-left: 4px; }
  #cyber-topbar .tb-title { font-size: 11px; letter-spacing: 0.16em; }
  #cyber-side  { width: calc(100% - var(--hud-edge) - var(--hud-edge)); max-height: 40vh; top: calc(46px + var(--hud-edge)); }
  #cyber-rail  { display: none; }
  #cyber-radar { width: min(72vw, 540px); top: 54%; opacity: 0.64; }
  #cyber-diags { display: none; }
  #cyber-bottom{ right: 0; padding: 10px 14px; }
  #cyber-numbers{ gap: 14px; font-size: 13px; }
}

@media (max-width: 640px) {
  #cyber-topbar { padding: 0 10px; height: 46px; }
  #cyber-topbar .tb-left { min-width: 0; gap: 10px; }
  #cyber-topbar .tb-title,
  #cyber-topbar .tb-tab--static { display: none; }
  #cyber-topbar .tb-tabs { gap: 9px; margin-left: 0; }
  #cyber-topbar .tb-tab {
    min-width: 44px;
    min-height: 44px;
    padding: 7px 1px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  #cyber-topbar .tb-cta {
    flex: 0 1 auto;
    max-width: 42vw;
    min-width: 0;
    min-height: 44px;
    overflow: hidden;
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .cyber-info-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 12px;
  }
  .cyber-info-dialog__panel { padding: 24px 20px 20px; }
  .cyber-info-dialog__ok { min-height: 38px; }
  #cyber-side   { display: none; }   /* on tiny screens, hide overlay panel */
  #cyber-radar  { display: none; }
  #cyber-bottom { display: none; }
}

/* Strict-CSP runtime classes. Numeric movement is supplied by the
   nonce-bearing AntiBotStyle stylesheet helper. */
body.is-globe-pointer { cursor: pointer; }
.cyber-marker {
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cyber-glyph {
  font: 700 11px monospace;
}
.cy-tip-meter__fill { width: var(--illumination, 0%); }
