/* mavos-theme.css — navy board palette, type scale and shared chrome for the
   landing, live stream and leaderboard. Token values are the design handoff's
   verbatim hexes; do not approximate them. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --mvs-bg: #050B1C;
  --mvs-surface: #07102A;
  --mvs-surface-2: #0A1531;
  --mvs-surface-3: #0C1839;
  --mvs-pitch: #081434;
  /* Pitch markings — brighter than --mvs-line-faint, which all but vanishes
     against the pitch fill. */
  --mvs-pitch-line: rgba(143,160,204,0.22);
  --mvs-line: #14264F;
  --mvs-line-2: #1A2E5C;
  --mvs-line-3: #0F1F4A;
  --mvs-line-faint: #16295480;
  --mvs-ink: #EDE8DF;
  --mvs-ink-2: #C5D2EE;
  --mvs-ink-3: #A9B6D6;
  --mvs-muted: #8294BE;
  --mvs-muted-2: #8FA0CC;
  --mvs-muted-3: #6C7FAE;
  --mvs-muted-4: #6477A8;
  --mvs-brand: #3878FF;
  --mvs-brand-deep: #0022CC;
  --mvs-brand-mark: #1E5FFF;
  --mvs-up: #37D894;
  --mvs-up-solid: #2EC280;
  --mvs-down: #FF7183;
  --mvs-down-solid: #E05060;

  /* Re-themed per competition by JS setting --mvs-accent on <body>. */
  --mvs-accent: #8E6BFF;

  --mvs-sc: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --mvs-body: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  --mvs-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --mvs-display: 'Exo 2', 'Archivo', sans-serif;
}

html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mvs-bg);
  color: var(--mvs-ink);
  font-family: var(--mvs-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}
a { color: #6D9BFF; }
a:hover { color: var(--mvs-ink); }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--mvs-brand); outline-offset: 2px; }

@keyframes mvsTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes mvsBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes mvsSpin { to { transform: rotate(360deg); } }
@keyframes mvsToastIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Chrome: nav + wordmark ─────────────────────────────────────────────── */
.mvs-nav {
  height: 64px; padding: 0 28px; display: flex; align-items: center; gap: 26px;
  border-bottom: 1px solid var(--mvs-line); background: var(--mvs-bg);
}
.mvs-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mvs-wordmark {
  font-family: var(--mvs-display); font-size: 21px; font-weight: 900;
  letter-spacing: -0.045em; color: #FFFFFF; line-height: 1;
}
.mvs-wordmark em { font-style: normal; color: var(--mvs-brand-mark); }
.mvs-navlink {
  text-decoration: none; font-family: var(--mvs-body);
  font-size: 13px; font-weight: 500; color: var(--mvs-muted);
}
.mvs-navlink:hover { color: var(--mvs-ink); }
.mvs-navlink.active { font-weight: 600; color: var(--mvs-ink); }
.mvs-vote-pill {
  font-family: var(--mvs-mono); font-size: 12px; font-weight: 600;
  color: var(--mvs-accent); border: 1px solid var(--mvs-accent);
  border-radius: 6px; padding: 7px 12px; white-space: nowrap;
  background: none;
}
/* The design's accent borders are the accent at 30% (accent + "4D"). */
@supports (border-color: color-mix(in srgb, red 30%, transparent)) {
  .mvs-vote-pill { border-color: color-mix(in srgb, var(--mvs-accent) 30%, transparent); }
}

/* ── Competition tabs ───────────────────────────────────────────────────── */
.mvs-comptabs {
  padding: 0 28px; display: flex; gap: 26px;
  border-bottom: 1px solid var(--mvs-line); overflow-x: auto;
  -ms-overflow-style: none; scrollbar-width: none;
}
.mvs-comptabs::-webkit-scrollbar { display: none; }
.mvs-comptab {
  font-family: var(--mvs-sc); font-size: 17px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 15px 2px; cursor: pointer; color: var(--mvs-muted-2);
  white-space: nowrap; flex-shrink: 0;
}
.mvs-comptab[aria-selected="true"] { color: var(--mvs-ink); border-bottom-color: var(--mvs-accent); }

/* ── Range switch ───────────────────────────────────────────────────────── */
.mvs-range {
  display: flex; gap: 6px; background: var(--mvs-surface-3);
  border: 1px solid var(--mvs-line-2); border-radius: 8px; padding: 4px;
}
.mvs-range button {
  font-family: var(--mvs-sc); font-size: 15px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 5px; border: none; cursor: pointer;
  background: transparent; color: var(--mvs-muted-2);
}
.mvs-range button[aria-pressed="true"] { background: var(--mvs-line-2); color: var(--mvs-ink); }

/* ── Shared atoms ───────────────────────────────────────────────────────── */
.mvs-bar { display: block; flex-shrink: 0; }
.mvs-bars { display: flex; flex-shrink: 0; }
.mvs-eyebrow {
  font-family: var(--mvs-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
}
.mvs-meta {
  font-family: var(--mvs-body); font-size: 10px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--mvs-muted);
}
.mvs-name {
  font-family: var(--mvs-sc); font-weight: 600; text-transform: uppercase;
  color: var(--mvs-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mvs-val { font-family: var(--mvs-mono); font-weight: 600; transition: color 0.25s; }
.mvs-delta { font-family: var(--mvs-mono); font-weight: 600; }
.mvs-disclaimer { font-family: var(--mvs-body); font-size: 11px; color: var(--mvs-muted); line-height: 1.5; }

/* ── Mobile bottom nav ──────────────────────────────────────────────────── */
.mvs-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--mvs-line); background: rgba(5,11,28,0.96);
  display: flex; align-items: stretch;
}
.mvs-bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-decoration: none; color: var(--mvs-muted-3); font-size: 10px;
  font-family: var(--mvs-body);
}
.mvs-bottomnav a.active { color: var(--mvs-accent); font-weight: 600; }

/* ── Toasts ─────────────────────────────────────────────────────────────── */
#mvs-toasts {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); right: 20px;
  display: flex; flex-direction: column; gap: 8px; z-index: 300; pointer-events: none;
}
.mvs-toast {
  display: flex; align-items: center; gap: 8px; border-radius: 9px; padding: 11px 13px;
  animation: mvsToastIn 0.22s ease-out; pointer-events: all;
  max-width: 300px; min-width: 220px;
  background: var(--mvs-surface-2); border: 1px solid var(--mvs-line-2);
  font-family: var(--mvs-body); font-size: 13px; line-height: 1.4; color: var(--mvs-ink-2);
}
.mvs-toast.error { border-color: rgba(224,80,96,0.45); color: var(--mvs-down); }
.mvs-toast.success { border-color: rgba(46,194,128,0.45); color: var(--mvs-up); }
.mvs-toast-close {
  background: none; border: none; color: var(--mvs-muted); cursor: pointer;
  font-size: 14px; padding: 0; margin-left: 6px; flex-shrink: 0;
}
.grecaptcha-badge { visibility: hidden; }

.mvs-desk { display: block; }
.mvs-mob { display: none; }
@media (max-width: 900px) {
  .mvs-desk { display: none !important; }
  .mvs-mob { display: block; }
}
