/*
  Void Meridian header — stabilized layout
  Prefix: sr-vdm
*/

:root,
body.sr-site,
body.sr-flagship {
  --sr-nav-offset: 5.85rem;
  --sr-vdm-max: var(--sr-lane-wide, min(92rem, 100%));
  --sr-vdm-text: #f0f9ff;
  --sr-vdm-muted: rgba(186, 230, 253, 0.72);
  --sr-vdm-gold: #fde68a;
  --sr-vdm-cyan: #22d3ee;
}

@media (min-width: 768px) {
  :root,
  body.sr-site,
  body.sr-flagship { --sr-nav-offset: 6.25rem; }
}

@media (min-width: 1100px) {
  :root,
  body.sr-site,
  body.sr-flagship { --sr-nav-offset: 6.55rem; }
}

.sr-vdm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-vdm {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10050;
  pointer-events: none;
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: var(--sr-vdm-text);
}

.sr-vdm-meridian {
  display: none;
}

.sr-vdm-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--sr-vdm-cyan), var(--sr-vdm-gold), #34d399);
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

.sr-vdm-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--sr-vdm-max);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 0.55rem) var(--sr-page-gutter, clamp(0.75rem, 2vw, 1.25rem)) 0.65rem;
  pointer-events: auto;
}

.sr-vdm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.55rem;
  padding: 0.52rem 0.85rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(186, 230, 253, 0.22);
  background: linear-gradient(180deg, rgba(8, 18, 32, 0.52), rgba(4, 10, 20, 0.58));
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  box-shadow:
    0 16px 48px rgba(2, 8, 20, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sr-vdm.is-scrolled .sr-vdm-bar {
  background: linear-gradient(180deg, rgba(6, 14, 26, 0.68), rgba(3, 8, 16, 0.74));
  border-color: rgba(186, 230, 253, 0.28);
  box-shadow: 0 20px 52px rgba(2, 8, 20, 0.45);
}

.sr-vdm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 9.5rem);
  text-decoration: none;
  color: inherit;
}

.sr-vdm-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.sr-vdm-brand-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-vdm-wordmark {
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
  min-width: 0;
  line-height: 1;
}

.sr-vdm-wordmark__line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.sr-vdm-wordmark__sch {
  font-family: "Syne", "Instrument Sans", system-ui, sans-serif;
  font-size: clamp(0.82rem, 1.6vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sr-cyan-bright, #7dd3fc);
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.sr-vdm-wordmark__rez {
  font-family: "Syne", "Instrument Sans", system-ui, sans-serif;
  font-size: clamp(0.72rem, 1.35vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sr-text-muted, rgba(186, 210, 230, 0.72));
}

.sr-vdm-wordmark__live {
  font-family: "Syne", "Instrument Sans", system-ui, sans-serif;
  font-size: clamp(0.78rem, 1.45vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sr-gold, #c9a962);
  text-shadow: 0 0 14px rgba(201, 169, 98, 0.35);
  animation: sr-wordmark-live 2.4s ease-in-out infinite;
}

.sr-vdm-wordmark__wave {
  flex: 1;
  min-width: 1.2rem;
  max-width: 2.8rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--sr-cyan, #38bdf8), var(--sr-gold, #c9a962), transparent);
  opacity: 0.75;
  animation: sr-wordmark-wave 2.8s ease-in-out infinite;
}

@keyframes sr-wordmark-live {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}

@keyframes sr-wordmark-wave {
  0%, 100% { transform: scaleX(0.65); opacity: 0.45; }
  50% { transform: scaleX(1); opacity: 1; }
}

.sr-vdm-brand-freq {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sr-vdm-muted);
}

.sr-vdm-brand-freq strong {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sr-cyan-bright, #7dd3fc);
}

.sr-vdm-live-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--sr-live, #4ade80);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.65);
  animation: sr-vdm-pulse 1.6s ease-in-out infinite;
}

@keyframes sr-vdm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.sr-vdm-stars {
  display: none;
  align-items: center;
  gap: 0.15rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(2, 8, 18, 0.55);
  border: 1px solid rgba(186, 230, 253, 0.1);
  flex: 0 0 auto;
}

.sr-vdm-star {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--sr-vdm-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.sr-vdm-star-node {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  border: 1px solid rgba(129, 140, 248, 0.4);
  background: rgba(8, 18, 32, 0.85);
  flex-shrink: 0;
}

.sr-vdm-star:hover {
  color: var(--sr-vdm-text);
  background: rgba(186, 230, 253, 0.08);
}

.sr-vdm-star.is-active {
  color: var(--sr-gold-bright, #dcc07a);
  background: var(--sr-gold-soft, rgba(201, 169, 98, 0.16));
  border: 1px solid rgba(201, 169, 98, 0.28);
}

.sr-vdm-star.is-active .sr-vdm-star-node {
  background: var(--sr-gold, #c9a962);
  border-color: var(--sr-gold, #c9a962);
}

.sr-vdm-ops {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.sr-vdm-aud,
.sr-vdm-utc {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
  padding-right: 0.35rem;
  border-right: 1px solid rgba(186, 230, 253, 0.1);
}

.sr-vdm-aud-k,
.sr-vdm-utc span:first-child {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sr-vdm-muted);
}

.sr-vdm-aud strong,
.sr-vdm-utc time {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.68rem;
}

.sr-vdm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.42rem;
  border: 1px solid rgba(186, 230, 253, 0.12);
  border-radius: 0.55rem;
  background: rgba(2, 8, 18, 0.55);
  color: var(--sr-vdm-text);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sr-vdm-icon svg {
  width: 0.92rem;
  height: 0.92rem;
}

.sr-vdm-icon--gold {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
}

.sr-vdm-flag {
  display: inline-flex;
  width: 1rem;
  height: 0.72rem;
  border-radius: 0.12rem;
  overflow: hidden;
}

.sr-vdm-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sr-vdm-lang {
  position: relative;
}

.sr-vdm-lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 9rem;
  padding: 0.3rem;
  border-radius: 0.65rem;
  background: rgba(4, 10, 22, 0.96);
  border: 1px solid rgba(186, 230, 253, 0.16);
  box-shadow: 0 16px 40px rgba(2, 8, 20, 0.5);
  z-index: 30;
}

.sr-vdm-lang-opt {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.42rem 0.5rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--sr-vdm-text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.sr-vdm-lang-opt:hover { background: rgba(186, 230, 253, 0.08); }
.sr-vdm-lang-opt.is-active { background: rgba(251, 191, 36, 0.12); color: #fde68a; }

.sr-vdm-lang-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sr-vdm-burger,
.sr-vdm-burger::before,
.sr-vdm-burger::after {
  display: block;
  width: 0.95rem;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sr-vdm-burger { position: relative; }
.sr-vdm-burger::before,
.sr-vdm-burger::after {
  content: "";
  position: absolute;
  left: 0;
}
.sr-vdm-burger::before { top: -4px; }
.sr-vdm-burger::after { top: 4px; }

.sr-vdm-icon--menu[aria-expanded="true"] .sr-vdm-burger { background: transparent; }
.sr-vdm-icon--menu[aria-expanded="true"] .sr-vdm-burger::before { top: 0; transform: rotate(45deg); }
.sr-vdm-icon--menu[aria-expanded="true"] .sr-vdm-burger::after { top: 0; transform: rotate(-45deg); }

/* Nexus logo */
.sr-nexus-mark {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 3.65rem;
  height: 3.65rem;
  align-items: center;
  justify-content: center;
}

.sr-nexus-mark-ring {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.28);
  animation: sr-nexus-ring 6s linear infinite;
}

@keyframes sr-nexus-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sr-nexus-mark-glow {
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28), transparent 72%);
  animation: sr-nexus-glow 3.5s ease-in-out infinite;
}

@keyframes sr-nexus-glow {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.sr-nexus-logo {
  position: relative;
  z-index: 1;
  width: 3.05rem;
  height: 3.05rem;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.32));
}

.sr-nexus-logo .sr-nexus-wave,
.sr-nexus-logo .sr-nexus-wave-b {
  animation: sr-nexus-wave 2.8s ease-in-out infinite;
}

@keyframes sr-nexus-wave {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Legacy meridian — hidden */
.sr-meridian-mark {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 2.45rem;
  height: 2.45rem;
  align-items: center;
  justify-content: center;
}

.sr-meridian-mark-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.sr-meridian-mark-flare {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 68%);
}

.sr-meridian-mark-pulse {
  display: none;
}

.sr-meridian-logo {
  position: relative;
  z-index: 1;
  width: 2rem;
  height: 2rem;
}

/* Drawer */
.sr-vdm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(2, 6, 18, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sr-vdm-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sr-vdm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10045;
  width: min(20rem, 90vw);
  height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: linear-gradient(180deg, rgba(4, 10, 22, 0.98), rgba(2, 6, 14, 0.99));
  border-left: 1px solid rgba(129, 140, 248, 0.2);
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.sr-vdm-drawer.is-open { transform: translateX(0); }

.sr-vdm-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sr-vdm-drawer-live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.06);
  font-size: 0.78rem;
}

.sr-vdm-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sr-vdm-drawer-link {
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sr-vdm-text);
}

.sr-vdm-drawer-link:hover { background: rgba(186, 230, 253, 0.06); }
.sr-vdm-drawer-link.is-active {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
}

.sr-vdm-drawer-link--star { color: #fde68a; }

.sr-vdm-drawer-lang {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sr-vdm-lang-pill {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(186, 230, 253, 0.14);
  background: rgba(4, 10, 22, 0.55);
  color: var(--sr-vdm-text);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
}

.sr-vdm-lang-pill.is-active {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

body.sr-cmd-drawer-open { overflow: hidden; }

@media (min-width: 960px) {
  .sr-vdm-stars { display: inline-flex; }
  .sr-vdm-aud,
  .sr-vdm-utc { display: flex; }
  .sr-vdm-icon--menu { display: none; }
  .sr-vdm-brand-title { max-width: 16rem; }
}

@media (max-width: 959px) {
  .sr-vdm-brand-freq { display: none; }
  .sr-vdm-brand {
    max-width: calc(100% - 8.75rem);
    gap: 0.45rem;
  }
  .sr-vdm-wordmark__sch { font-size: 0.76rem; }
  .sr-vdm-wordmark__rez,
  .sr-vdm-wordmark__live { font-size: 0.68rem; }
  .sr-vdm-wordmark__wave { display: none; }
  .sr-nexus-mark { width: 3.1rem; height: 3.1rem; flex-shrink: 0; }
  .sr-nexus-logo { width: 2.55rem; height: 2.55rem; }
  .sr-vdm-icon {
    width: 2.15rem;
    height: 2.15rem;
  }
}

@media (max-width: 420px) {
  .sr-vdm-bar { min-height: 3.45rem; padding: 0.48rem 0.62rem; gap: 0.45rem; }
  .sr-vdm-brand { max-width: calc(100% - 7.85rem); }
  .sr-vdm-wordmark__sch { font-size: 0.72rem; }
  .sr-vdm-lang-code { display: none; }
}

.sr-hzn, .sr-obs { display: none !important; }

/* Footer FAB clearance + promo dock stacking */
@media (max-width: 959px) {
  html body.sr-site footer.footer-premium.sr-footer-pro {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body.sr-site .sr-footer-pro__legalbar {
    padding-right: 0.25rem;
  }
}

html body.sr-site .sr-promo-fab.is-visible.is-near-footer,
html body.sr-site .sr-promo-dock.is-visible.is-near-footer {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(16px) !important;
}
