/* px-lms design system.
   Lifted from the approved concept (docs/mockup-americas-number-1-hater.html)
   and turned into tokens, so a second promotion re-themes by overriding the
   custom properties in promotion.json rather than forking this file. */

:root {
  --bg-deep: #0A1520;
  --bg-panel: #10192B;
  --bg-panel-2: #141F35;
  --navy: #1B2242;
  --teal: #00C896;
  --teal-light: #00B884;
  --teal-alt: #00E5AA;
  --ember: #FF5C4D;
  --white: #F5F7FA;
  --muted: #8A94A6;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 10px;
  --wrap: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--white);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.display { font-family: 'Anton', sans-serif; font-weight: 400; letter-spacing: 0.01em; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 2px solid var(--teal-alt);
  outline-offset: 2px;
}

/* ── Nav ──────────────────────────────────────────────────────────────── */

header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 21, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 32px; max-width: var(--wrap); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand span { font-size: 15px; font-weight: 800; letter-spacing: 0.08em; }
.brand small { display: block; font-size: 9px; color: var(--teal); letter-spacing: 0.14em; font-weight: 600; margin-top: -2px; }
.nav-links { display: flex; gap: 32px; font-size: 14px; color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.active-link { color: var(--white); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.playing-as { font-size: 11px; color: var(--teal-alt); letter-spacing: 0.06em; }

.nav-cta, .btn-primary {
  background: var(--teal); color: #04140F; padding: 10px 20px; border-radius: 6px;
  font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(0, 200, 150, 0.3);
  transition: transform .15s ease, box-shadow .15s ease;
  border: none; font-family: inherit; cursor: pointer;
}
.nav-cta:hover, .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 200, 150, 0.35); }
.btn-primary { padding: 14px 28px; font-size: 14px; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-secondary {
  display: inline-block; padding: 14px 28px; border-radius: 6px; font-size: 14px;
  font-weight: 700; border: 1px solid var(--line); color: var(--white);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal-alt); }

@media (max-width: 760px) { .nav-links { display: none; } }

/* ── Pages ────────────────────────────────────────────────────────────── */

.page { display: none; }
.page.active { display: block; animation: pageIn .35s ease; }
@keyframes pageIn { from { opacity: 0 } to { opacity: 1 } }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: 100px 32px 90px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 700px 400px at 50% -10%, rgba(0, 200, 150, .16), transparent 70%),
    radial-gradient(ellipse 500px 300px at 85% 20%, rgba(255, 92, 77, .08), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0, 200, 150, .08); border: 1px solid rgba(0, 200, 150, .3);
  color: var(--teal-alt); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  padding: 7px 14px; border-radius: 100px; margin-bottom: 28px; text-transform: uppercase;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

h1.headline {
  font-family: 'Anton', sans-serif; font-weight: 400;
  font-size: clamp(48px, 9vw, 108px); line-height: .92; text-transform: uppercase;
}
.strike-wrap { position: relative; color: var(--ember); }
.strike-wrap::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 6px;
  background: var(--ember); transform: rotate(-2.5deg); opacity: .9;
}
.presented { margin-top: 18px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.presented b { color: var(--teal-alt); }
.sub { max-width: 640px; margin: 26px auto 0; color: var(--muted); font-size: 17px; }
.sub strong { color: var(--white); }
.hero-ctas { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 56px; justify-content: center; margin-top: 60px; flex-wrap: wrap; }
.stat .num { font-family: 'Anton', sans-serif; font-size: 34px; color: var(--teal-alt); }
.stat .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* ── Prize ────────────────────────────────────────────────────────────── */

.prize-hero { padding: 80px 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-panel); }
.prize-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.kicker-ember { color: var(--ember); }
.kicker .rule { width: 24px; height: 1px; background: currentColor; display: inline-block; }
.prize-headline { font-family: 'Anton', sans-serif; font-weight: 400; font-size: clamp(38px, 5vw, 62px); line-height: .95; text-transform: uppercase; margin: 16px 0 18px; }
.prize-copy { color: var(--muted); max-width: 440px; margin-bottom: 24px; }
.ticket-svg { width: 100%; height: auto; }
@media (max-width: 860px) { .prize-hero-inner { grid-template-columns: 1fr; } }

/* ── Sections ─────────────────────────────────────────────────────────── */

section#how, section#board, section#rules, section#leaderboard, section#home-board { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head-tight { margin-bottom: 36px; }
.section-head h2 { font-family: 'Anton', sans-serif; font-weight: 400; font-size: clamp(30px, 4vw, 46px); text-transform: uppercase; margin: 14px 0 12px; }
.section-head p { color: var(--muted); }

.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.how-card { position: relative; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; }
.how-num { font-family: 'Anton', sans-serif; font-size: 30px; color: var(--teal); opacity: .5; }
.how-card h3 { font-size: 17px; margin: 10px 0 8px; }
.how-card p { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .how-grid { grid-template-columns: 1fr; } }

/* ── Board ────────────────────────────────────────────────────────────── */

.board-frame { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.board-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--bg-panel-2); flex-wrap: wrap; }
.board-topbar-right { display: flex; align-items: center; gap: 16px; }
.week { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.week span { color: var(--teal-alt); }
.board-source { font-size: 10px; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 4px; }
.locks-in { font-size: 11px; letter-spacing: .1em; color: var(--ember); }
.locks-in .clock { margin-right: 6px; }

.board-filters { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.board-search {
  flex: 1 1 220px; min-width: 180px; background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: 6px; padding: 9px 12px; color: var(--white); font-family: inherit; font-size: 13px;
}
.board-search::placeholder { color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 100px; padding: 7px 14px; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.chip:hover { color: var(--white); border-color: var(--teal); }
.chip.is-on { background: rgba(0, 200, 150, .12); border-color: var(--teal); color: var(--teal-alt); }

.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; padding: 20px; }
.board-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 40px 0; font-size: 14px; }

.rb-card {
  position: relative; background: var(--bg-panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease, transform .15s ease;
}
.rb-card:not(.locked):hover { border-color: rgba(0, 200, 150, .5); transform: translateY(-2px); }
.rb-card.selected { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 6px 22px rgba(0, 200, 150, .18); }
.rb-card.locked { opacity: .42; }
.rb-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rb-name { font-weight: 700; font-size: 15px; }
.rb-team { font-size: 11px; color: var(--teal); letter-spacing: .1em; font-weight: 700; }
.rb-matchup { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.rb-odds { display: flex; justify-content: space-between; align-items: flex-end; }
.rb-odds .lbl { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rb-odds .val { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; color: var(--white); }
.rb-consensus { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.rb-consensus.hot { color: var(--ember); }
.rb-pick-btn {
  width: 100%; background: rgba(0, 200, 150, .1); border: 1px solid rgba(0, 200, 150, .35);
  color: var(--teal-alt); border-radius: 6px; padding: 9px; font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
.rb-pick-btn:hover:not(:disabled) { background: rgba(0, 200, 150, .2); }
.rb-pick-btn:disabled { opacity: .5; cursor: not-allowed; border-color: var(--line); color: var(--muted); background: transparent; }
.rb-card.selected .rb-pick-btn { background: var(--teal); color: #04140F; border-color: var(--teal); }

.torch-stamp {
  position: absolute; inset: 0; pointer-events: none; border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255, 92, 77, .06) 8px 16px);
}
.torch-label { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--ember); }

.board-footer { padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--bg-panel-2); flex-wrap: wrap; }
.submit-status { font-size: 13px; color: var(--muted); }
.submit-status.ready { color: var(--teal-alt); }
.submit-status.error { color: var(--ember); }

/* ── Rules ────────────────────────────────────────────────────────────── */

.rules-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.rule-list { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.rule-list li { display: flex; gap: 16px; }
.rule-mark {
  flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1px solid var(--teal);
  color: var(--teal-alt); display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.rule-list h4 { font-size: 16px; margin-bottom: 5px; }
.rule-list p { color: var(--muted); font-size: 14px; }
.rules-legal { margin-top: 32px; font-size: 12px; color: var(--muted); }

.pot-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.pot-lbl { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.pot-num { font-family: 'Anton', sans-serif; font-size: 36px; margin: 10px 0 4px; text-transform: uppercase; }
.pot-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.pot-row { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pot-row .k { color: var(--muted); }
.pot-row .v { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
@media (max-width: 860px) { .rules-layout { grid-template-columns: 1fr; } }

/* ── Leaderboard ──────────────────────────────────────────────────────── */

.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th {
  text-align: left; padding: 14px 20px; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg-panel-2);
}
.lb-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.lb-table tr.is-me td { background: rgba(0, 200, 150, .06); }
.rank { font-family: 'Anton', sans-serif; color: var(--teal); }
.streak { font-family: 'JetBrains Mono', monospace; color: var(--muted); }
.status-alive { color: var(--teal-alt); font-weight: 700; font-size: 12px; }
.status-out { color: var(--ember); font-weight: 700; font-size: 12px; }

/* ── Footer ───────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--bg-panel); }
.foot-top { display: grid; grid-template-columns: 1.6fr 2fr; gap: 48px; }
.foot-brand p { color: var(--muted); font-size: 13px; margin-top: 14px; max-width: 380px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-col h5 { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.foot-col a { display: block; color: var(--muted); font-size: 13px; padding: 4px 0; }
.foot-col a:hover { color: var(--white); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr; } }

/* ── Modals ───────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(4, 10, 16, .8);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px;
}
.modal-card {
  position: relative; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 34px 30px; width: min(420px, 100%); text-align: center;
  max-height: 90vh; overflow-y: auto;
}
.modal-x { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.modal-check { font-size: 34px; margin-bottom: 12px; }
.modal-title { font-family: 'Anton', sans-serif; font-weight: 400; font-size: 30px; line-height: 1; text-transform: uppercase; }
.modal-title span { color: var(--teal-alt); }
.modal-sub { color: var(--muted); font-size: 14px; margin: 12px 0 22px; }
.modal-pick { background: var(--bg-panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.mp-name { font-size: 20px; font-weight: 700; }
.mp-meta { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 4px; }
.mp-odds-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mp-odds-lbl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; }
.mp-odds-val { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; color: var(--teal-alt); }
.modal-close {
  display: block; width: 100%; background: var(--teal); color: #04140F; border: none;
  border-radius: 6px; padding: 13px; font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer;
}
.modal-change { display: block; width: 100%; margin-top: 10px; background: none; border: none; color: var(--muted); font-size: 13px; font-family: inherit; cursor: pointer; }
.modal-change:hover { color: var(--white); }

.signup-form { text-align: left; display: flex; flex-direction: column; gap: 16px; }
.form-field label, .form-field .label { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.form-field input {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 13px; color: var(--white); font-family: inherit; font-size: 14px;
}
.yn-toggle { display: flex; gap: 8px; }
.yn-btn { flex: 1; background: var(--bg-deep); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 10px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; }
.yn-btn.is-on { border-color: var(--teal); color: var(--teal-alt); background: rgba(0, 200, 150, .1); }
.offer-box { margin-top: 14px; background: rgba(255, 92, 77, .07); border: 1px solid rgba(255, 92, 77, .3); border-radius: var(--radius); padding: 14px; }
.offer-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); font-weight: 700; }
.offer-copy { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.offer-link { font-size: 13px; font-weight: 700; color: var(--teal-alt); }
.form-error { color: var(--ember); font-size: 13px; }
.form-fineprint { font-size: 11px; color: var(--muted); text-align: center; }

/* ── Toast ────────────────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--bg-panel-2); border: 1px solid var(--teal); color: var(--white);
  padding: 12px 20px; border-radius: 100px; font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--ember); }

/* ── Admin ────────────────────────────────────────────────────────────── */

.admin { padding: 32px 32px 80px; display: flex; flex-direction: column; gap: 20px; }
.admin-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { font-size: 11px; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--line); }
.pill-ok { color: var(--teal-alt); border-color: rgba(0, 200, 150, .4); }
.pill-warn { color: var(--ember); border-color: rgba(255, 92, 77, .4); }
.admin-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.admin-card h2 { font-size: 18px; margin-bottom: 16px; }
.admin-card h2 span { font-size: 12px; color: var(--muted); font-weight: 400; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.admin-grid .k { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.admin-grid .v { font-size: 15px; font-weight: 700; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.admin-actions label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.week-input { width: 64px; background: var(--bg-deep); border: 1px solid var(--line); color: var(--white); border-radius: 6px; padding: 6px 8px; font-family: inherit; }
.admin-out { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); max-height: 300px; overflow: auto; white-space: pre-wrap; }
.sigma-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 8px; }

.notfound { padding: 120px 32px; text-align: center; }
.notfound h1 { font-size: 96px; color: var(--teal); }
.notfound p { color: var(--muted); margin: 12px 0 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
