/* EV Signal flavor for the global header — visible, restrained, and market-inspired. */
body.ev-theme .ev-header {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.012), rgba(255,255,255,0)),
    #090A0C;
}

/* Stronger signal trace along the lower edge of the header. */
body.ev-theme .ev-header::after {
  content: "";
  position: absolute;
  left: clamp(118px, 14vw, 230px);
  right: 18px;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  opacity: .82;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(255,255,255,.12) 6%,
      rgba(220,38,38,.68) 15%,
      rgba(255,255,255,.14) 26%,
      rgba(52,211,153,.78) 42%,
      rgba(255,255,255,.12) 56%,
      rgba(220,38,38,.58) 70%,
      rgba(52,211,153,.64) 84%,
      transparent 100%);
  box-shadow:
    0 0 8px rgba(220,38,38,.15),
    0 0 12px rgba(52,211,153,.10);
}

/* Add a subtle waveform/market trace behind the quick-link board. */
body.ev-theme .ev-headernav {
  position: relative;
  isolation: isolate;
}

body.ev-theme .ev-headernav::before {
  content: "";
  position: absolute;
  inset: 5px 8px;
  z-index: -1;
  pointer-events: none;
  opacity: .26;
  background:
    linear-gradient(135deg,
      transparent 0 10%,
      rgba(255,255,255,.05) 10.5% 11.5%,
      transparent 12% 19%,
      rgba(220,38,38,.14) 19.5% 21%,
      transparent 21.5% 34%,
      rgba(52,211,153,.14) 34.5% 36%,
      transparent 36.5% 50%,
      rgba(255,255,255,.05) 50.5% 51.5%,
      transparent 52% 66%,
      rgba(220,38,38,.12) 66.5% 68%,
      transparent 68.5% 82%,
      rgba(52,211,153,.12) 82.5% 84%,
      transparent 84.5%);
}

body.ev-theme .ev-home-nav a,
body.ev-theme .ev-headernav__item {
  position: relative;
}

body.ev-theme .ev-home-nav a::after,
body.ev-theme .ev-headernav__item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 24px;
  height: 2px;
  transform: translateX(-50%) scaleX(.72);
  transform-origin: center;
  opacity: .44;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transition: opacity .18s ease, transform .18s ease, width .18s ease, box-shadow .18s ease;
}

body.ev-theme .ev-home-nav a:hover::after,
body.ev-theme .ev-home-nav a:focus-visible::after,
body.ev-theme .ev-headernav__item:hover::after,
body.ev-theme .ev-headernav__item:focus-visible::after {
  width: 38px;
  opacity: .92;
  transform: translateX(-50%) scaleX(1);
  box-shadow: 0 0 8px rgba(255,255,255,.18);
}

/* Live = unmistakable red signal. */
body.ev-theme .ev-headernav__item--signal {
  background:
    linear-gradient(180deg, rgba(220,38,38,.09), rgba(220,38,38,.02));
  box-shadow: inset 0 0 0 1px rgba(220,38,38,.10);
}

body.ev-theme .ev-headernav__item--signal::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 7px;
  width: 16px;
  height: 7px;
  opacity: .78;
  background:
    linear-gradient(135deg,
      transparent 0 14%,
      rgba(220,38,38,.95) 15% 23%,
      transparent 24% 38%,
      rgba(220,38,38,.95) 39% 48%,
      transparent 49% 63%,
      rgba(220,38,38,.95) 64% 73%,
      transparent 74%);
  filter: drop-shadow(0 0 4px rgba(220,38,38,.36));
}

body.ev-theme .ev-headernav__item--signal::after {
  background: linear-gradient(90deg, transparent, rgba(220,38,38,.92), transparent);
}

/* Ranks = green market-rise cue. */
body.ev-theme .ev-headernav__item--charts {
  background:
    linear-gradient(180deg, rgba(52,211,153,.07), rgba(52,211,153,.015));
  box-shadow: inset 0 0 0 1px rgba(52,211,153,.10);
}

body.ev-theme .ev-headernav__item--charts::before {
  content: "↗";
  position: absolute;
  top: 3px;
  right: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #34d399;
  opacity: .92;
  text-shadow: 0 0 7px rgba(52,211,153,.28);
}

body.ev-theme .ev-headernav__item--charts::after {
  background: linear-gradient(90deg, transparent, rgba(52,211,153,.92), transparent);
}

/* Other nav items get a neutral signal-line highlight, not red. */
body.ev-theme .ev-headernav__item:not(.ev-headernav__item--signal):not(.ev-headernav__item--charts):hover {
  background: rgba(255,255,255,.035);
}

/* Guest CTAs get a visible but restrained signal edge. */
body.ev-theme .ev-btn--signin,
body.ev-theme .ev-btn--join {
  position: relative;
  overflow: hidden;
}

body.ev-theme .ev-btn--signin::after,
body.ev-theme .ev-btn--join::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 2px;
  height: 2px;
  opacity: .55;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
}

body.ev-theme .ev-btn--join::after {
  background: linear-gradient(90deg, transparent, rgba(220,38,38,.75), rgba(52,211,153,.72), transparent);
}

/* Give the search field a tiny signal hint so the whole header feels connected. */
body.ev-theme .ev-search--header {
  position: relative;
}

body.ev-theme .ev-search--header::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 1px;
  height: 1px;
  opacity: .28;
  background: linear-gradient(90deg, transparent, rgba(220,38,38,.55), rgba(52,211,153,.48), transparent);
  pointer-events: none;
}

@media (max-width: 700px) {
  body.ev-theme .ev-header::after {
    left: 8px;
    right: 8px;
    opacity: .72;
  }

  body.ev-theme .ev-headernav::before {
    inset: 4px;
    opacity: .22;
  }

  body.ev-theme .ev-headernav__item--charts::before,
  body.ev-theme .ev-headernav__item--signal::before {
    top: 2px;
    right: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ev-theme .ev-home-nav a::after,
  body.ev-theme .ev-headernav__item::after {
    transition: none;
  }
}
