/* ============================================================
   ADPL — v2 public site theme
   Loaded after style.css by index.html only (admin and auction
   pages keep their own look). Everything is scoped to body.v2.

   Keeps every colour variable name from style.css, so inline
   styles in the JS (var(--diamond-bright), var(--gold) ...) keep
   working. New: gold is the "champion / qualified" colour; the
   coral --live stays reserved for matches on court.
   ============================================================ */

body.v2 {
  --gold: #F5C451;
  --diamond-bright: #8FCBF0;
  --ink-dim: #8FA6BF;
  --disp: 'Big Shoulders Display', 'Big Shoulders', sans-serif;
  background: var(--court);
  color: var(--ink);
}
body.v2 .display,
body.v2 .tab,
body.v2 .match-teams,
body.v2 .match-score,
body.v2 .slot-heading .slot-num,
body.v2 table.standings td.rank,
body.v2 .team-card .team-name,
body.v2 .lineup-role-group h4,
body.v2 .tab-pill,
body.v2 .btn-pill {
  font-family: var(--disp);
}
body.v2 .section-title { font-size: 38px; font-weight: 900; color: var(--ink); margin-bottom: 4px; }
body.v2 :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- ticker (gold) ---------- */
body.v2 .ticker-wrap {
  background: var(--gold);
  color: #050D1A;
  border: none;
  padding: 0;
  height: 38px;
  display: flex;
  align-items: center;
}
body.v2 .ticker-wrap.empty { display: none; }
body.v2 .ticker-track { animation-duration: 45s; }
body.v2 .ticker-item {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #050D1A;
  margin-right: 26px;
}
body.v2 .ticker-item .sep { margin-right: 10px; }
body.v2 .ticker-item b { color: #050D1A; }
body.v2 .ticker-item .dot { background: #050D1A; }
body.v2 .ticker-wrap.is-live { background: var(--live); }
body.v2 .ticker-wrap.is-live .ticker-item,
body.v2 .ticker-wrap.is-live .ticker-item b { color: #fff; }
body.v2 .ticker-wrap.is-live .ticker-item .dot { background: #fff; }

/* ---------- header ---------- */
body.v2 .topbar {
  display: block;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0;
  background: rgba(10, 25, 48, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
body.v2 .topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 72px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 28px;
}
body.v2 .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
body.v2 .brand-icon { height: 36px; width: auto; cursor: pointer; }
body.v2 .brand-word { font-size: 28px; font-weight: 900; letter-spacing: 0.02em; }
body.v2 .top-nav { display: flex; gap: 22px; flex: 1; }
body.v2 .top-nav a {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
body.v2 .top-nav a:hover { color: var(--ink); }
body.v2 .top-nav a.active { color: var(--ink); border-bottom-color: var(--gold); }
body.v2 .top-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
body.v2 .edition-select { background: var(--card); color: var(--ink); border: 1px solid var(--card-border); border-radius: 999px; padding: 8px 14px; font-size: 14px; max-width: 220px; }

/* ---------- buttons ---------- */
body.v2 .cut-btn {
  display: inline-block;
  box-sizing: border-box;
  min-height: 44px;
  padding: 13px 26px;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
body.v2 .cut-btn.primary { background: var(--diamond); color: #050D1A; }
body.v2 .cut-btn.live { background: var(--live); color: #050D1A; }
body.v2 .cut-btn.dark { background: #050D1A; color: var(--ink); }
body.v2 .cut-btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px rgba(140, 190, 230, 0.45); }
body.v2 .cut-btn:hover { filter: brightness(1.1); }

/* ---------- hero ---------- */
body.v2 .hero { text-align: left; padding: 0; background: none; }
body.v2 .hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px 28px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
}
body.v2 .hero-eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--diamond-bright); font-weight: 600; }
body.v2 .hero-title {
  font-size: clamp(88px, 12vw, 190px);
  white-space: nowrap;
  font-weight: 900;
  line-height: 0.84;
  margin: 6px 0 0;
  color: var(--ink);
  text-shadow: none;
  letter-spacing: -0.01em;
}
body.v2 .hero-title .accent { color: var(--diamond); }
body.v2 .hero-sub { font-size: 18px; line-height: 1.5; color: var(--ink-dim); max-width: 520px; margin: 18px 0 0; }
body.v2 .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; margin-top: 22px; }
body.v2 .follow-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin-top: 18px; padding: 10px 14px;
  background: rgba(245, 196, 81, 0.1);
  border: 1px solid rgba(245, 196, 81, 0.45);
  border-radius: 8px; font-size: 13.5px;
}
body.v2 .follow-bar b { color: var(--gold); }
body.v2 .follow-only { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim); cursor: pointer; }
body.v2 .follow-clear { background: none; border: none; color: var(--diamond-bright); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px 0; min-height: 32px; }

body.v2 .hero-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
body.v2 .champ-card {
  background: var(--gold);
  color: #050D1A;
  padding: 26px 30px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%);
}
body.v2 .champ-label { font-family: var(--disp); font-weight: 800; font-size: 19px; letter-spacing: 0.14em; text-transform: uppercase; }
body.v2 .champ-name { font-size: clamp(38px, 5.5vw, 72px); font-weight: 900; line-height: 0.92; text-transform: uppercase; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.v2 .champ-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #050D1A; flex-shrink: 0; }
body.v2 .champ-meta { font-size: 14px; font-weight: 600; }
body.v2 .champ-card.status { background: var(--card); color: var(--ink); }
body.v2 .champ-card.status .champ-label { color: var(--diamond-bright); }
body.v2 .champ-card.status.live .champ-label { color: #F0805E; }
body.v2 .champ-card.status .vs { font-size: 0.5em; color: var(--ink-dim); }
body.v2 .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
body.v2 .hero-stat { background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; padding: 14px 10px; text-align: center; }
body.v2 .hero-stat .n { font-size: clamp(22px, 5.4vw, 36px); white-space: nowrap; font-weight: 900; line-height: 1; color: var(--diamond-bright); }
body.v2 .hero-stat .l { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }

/* ---------- tabs ---------- */
body.v2 .tabs { position: sticky; top: 72px; z-index: 15; background: var(--court); }
body.v2 .tab { font-weight: 800; font-size: 18px; letter-spacing: 0.05em; }
body.v2 .tab:hover { color: var(--ink); }
body.v2 .tab.active { color: var(--ink); border-bottom-color: var(--gold); }
body.v2 .view { max-width: 1200px; padding-top: 32px; }

/* ---------- match cards ---------- */
body.v2 .match-card { border-radius: 8px; padding: 16px 18px; }
body.v2 .match-card.live { border-color: var(--live); border-left: 6px solid var(--live); }
body.v2 .match-card.followed { border-left: 6px solid var(--gold); background: rgba(245, 196, 81, 0.06); }
body.v2 .match-card.followed.live { border-left-color: var(--live); }
body.v2 .match-teams { font-size: 22px; font-weight: 800; text-transform: uppercase; gap: 10px; }
body.v2 .match-score { font-size: 32px; font-weight: 900; color: var(--diamond-bright); }
body.v2 .slot-heading .slot-num { font-size: 24px; font-weight: 900; color: var(--gold); }

/* ---------- standings ---------- */
body.v2 .table-scroll { background: var(--card); border-radius: 10px; margin-bottom: 24px; }
body.v2 table.standings { margin-bottom: 0; }
body.v2 table.standings td.rank { font-size: 30px; font-weight: 900; line-height: 1; color: var(--diamond); }
body.v2 table.standings tr.bye { background: rgba(245, 196, 81, 0.07); }
body.v2 table.standings tr.bye td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
body.v2 table.standings tr.bye td.rank { color: var(--gold); }
body.v2 .bye-legend .bye-key { display: inline-block; width: 10px; height: 10px; background: var(--gold); margin-right: 6px; vertical-align: middle; }

/* ---------- bracket ---------- */
body.v2 .bracket { gap: 56px; padding: 12px 4px 24px; }
body.v2 .bracket-col { min-width: 210px; gap: 22px; }
body.v2 .bracket-slot {
  position: relative;
  background: var(--card);
  border: none;
  border-left: 4px solid var(--diamond);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  line-height: 1.2;
}
body.v2 .bracket-col:not(:last-child) .bracket-slot::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 56px;
  height: 2px;
  background: rgba(143, 203, 240, 0.4);
}
body.v2 .bracket-slot .stage-label { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 10px; letter-spacing: 0.12em; margin-bottom: 4px; }
body.v2 .bracket-slot.final { background: var(--gold); color: #050D1A; border-left-color: #050D1A; }
body.v2 .bracket-slot.final .stage-label { color: #050D1A; }

/* ---------- follow your team (teams grid) ---------- */
body.v2 .teams-section { max-width: 1200px; margin: 0 auto; padding: 56px 28px 0; text-align: left; }
body.v2 .teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; max-width: none; margin: 16px 0 0; }
body.v2 .teams-grid .team-card { flex: none; width: auto; }
body.v2 .team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-left: 6px solid var(--team-glow-strong, var(--diamond));
  border-radius: 8px;
  padding: 16px;
}
body.v2 .team-card:hover { transform: none; background: #14294A; box-shadow: none; }
body.v2 .team-card.following { border-color: var(--diamond); border-left-color: var(--team-glow-strong, var(--diamond)); background: rgba(76, 155, 217, 0.2); }
body.v2 .team-card img { width: 56px; height: 56px; padding: 6px; margin-bottom: 4px; }
body.v2 .team-card .team-name { font-size: 22px; font-weight: 800; text-transform: uppercase; line-height: 1.05; }
body.v2 .follow-hint { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-dim); }
body.v2 .team-card.following .follow-hint { color: var(--diamond-bright); }

/* ---------- JPL band ---------- */
body.v2 .jpl-band { margin-top: 56px; background: var(--diamond-bright); color: #050D1A; }
body.v2 .jpl-inner { max-width: 1200px; margin: 0 auto; padding: 38px 28px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
body.v2 .jpl-group { display: flex; gap: 24px; align-items: center; flex: 1 1 480px; min-width: 0; }
body.v2 .jpl-group > div { min-width: 0; }
body.v2 .jpl-logo { width: 136px; height: auto; border-radius: 14px; background: #0A1930; padding: 8px; flex-shrink: 0; display: block; }
body.v2 .jpl-eyebrow { font-family: var(--disp); font-weight: 800; font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; }
body.v2 .jpl-title { font-size: clamp(40px, 6vw, 68px); font-weight: 900; line-height: 0.92; text-transform: uppercase; }
body.v2 .jpl-sub { font-size: 15px; font-weight: 600; margin-top: 10px; }

/* ---------- sponsors + footer ---------- */
body.v2 .sponsors-section { max-width: 1200px; margin: 0 auto; padding: 44px 28px 20px; }
body.v2 .site-footer {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 24px 28px 40px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}
body.v2 .footer-links { display: flex; gap: 20px; }
body.v2 .footer-links a { color: var(--ink-dim); text-decoration: none; }
body.v2 .footer-links a:hover { color: var(--gold); }

/* ---------- mobile bottom nav ---------- */
body.v2 .bottom-nav, body.v2 .more-sheet { display: none; }

@media (max-width: 820px) {
  body.v2 { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.v2 .topbar-inner { height: 60px; padding: 0 16px; gap: 12px; }
  body.v2 .brand-icon { height: 30px; }
  body.v2 .brand-word { font-size: 24px; }
  body.v2 .top-nav { display: none; }
  body.v2 .tabs { display: none; }
  body.v2 .hero-inner { grid-template-columns: minmax(0, 1fr); padding: 28px 16px 16px; gap: 22px; }
  body.v2 .hero-title { font-size: clamp(88px, 26vw, 150px); }
  body.v2 .hero-sub { font-size: 16px; }
  body.v2 .champ-card { min-height: 140px; padding: 20px 22px; }
  body.v2 .view { padding: 24px 16px 40px; }
  body.v2 .section-title { font-size: 32px; }
  body.v2 .teams-section { padding: 40px 16px 0; }
  body.v2 .jpl-inner { padding: 30px 16px; }
  body.v2 .jpl-group { gap: 16px; }
  body.v2 .jpl-logo { width: 88px; border-radius: 10px; padding: 5px; }
  body.v2 .sponsors-section { padding: 36px 16px 16px; }
  body.v2 .site-footer { padding: 20px 16px 28px; }
  body.v2 .bracket { gap: 44px; }
  body.v2 .bracket-col:not(:last-child) .bracket-slot::after { width: 44px; }

  body.v2 .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--court);
    border-top: 1px solid var(--card-border);
  }
  body.v2 .bn-item {
    background: none;
    border: none;
    border-top: 3px solid transparent;
    color: var(--ink-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    font-family: var(--disp);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }
  body.v2 .bn-item.active { color: var(--gold); border-top-color: var(--gold); }
  body.v2 .more-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 31;
    min-width: 190px;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  }
  body.v2 .more-sheet button, body.v2 .more-sheet a {
    background: none;
    border: none;
    text-align: left;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
    min-height: 44px;
    box-sizing: border-box;
    cursor: pointer;
  }
  body.v2 .more-sheet button:hover, body.v2 .more-sheet a:hover { background: rgba(140, 190, 230, 0.1); }
  /* keep the "Ask ADPL" chat bubble above the bottom nav */
  .adpl-bot-wrap { bottom: calc(84px + env(safe-area-inset-bottom)) !important; right: 16px !important; }
  .adpl-bot-panel { bottom: calc(84px + env(safe-area-inset-bottom)) !important; max-height: calc(100vh - 120px) !important; }
}

@media (max-width: 520px) {
  body.v2 .last-updated { display: none; }
  body.v2 .edition-select { max-width: 150px; padding: 8px 10px; }
  body.v2 .cut-btn { padding: 12px 20px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body.v2 .ticker-track { animation: none; }
  body.v2 .ticker-wrap { overflow-x: auto; }
}

/* ---------- Join form + follow strip ---------- */
body.v2 .join-section { max-width: 1200px; margin: 0 auto; padding: 56px 28px 8px; text-align: left; scroll-margin-top: 80px; }
body.v2 .follow-strip { max-width: 1200px; margin-left: auto; margin-right: auto; padding: 0 28px; }
body.v2 .follow-strip-inner { padding: 0; }
body.v2 .join-fee { font-size: 18px; color: var(--ink); margin: 0 0 8px; }
body.v2 .join-fee b { color: var(--gold); }
body.v2 .join-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; max-width: 760px; margin-top: 18px; }
body.v2 .join-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim); }
body.v2 .join-form .wide { grid-column: 1 / -1; }
body.v2 .join-form input, body.v2 .join-form select, body.v2 .join-form textarea {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 6px; color: var(--ink);
  padding: 12px; font: inherit; font-size: 16px; text-transform: none; letter-spacing: 0;
}
body.v2 .join-form input:focus, body.v2 .join-form select:focus, body.v2 .join-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
body.v2 .join-form .check { flex-direction: row; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
body.v2 .join-form .check input { width: 20px; height: 20px; }
body.v2 .join-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
body.v2 .join-msg { margin-left: 12px; font-size: 14px; }
body.v2 .join-msg.err { color: #FF8A6B; }
body.v2 .join-done { max-width: 760px; margin-top: 18px; padding: 28px; background: var(--gold); color: #050D1A; border-radius: 8px; }
body.v2 .join-done .display { font-size: 44px; font-weight: 900; text-transform: uppercase; }
body.v2 .follow-strip { margin-top: 40px; }
body.v2 .follow-strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 8px; padding-bottom: 8px; }
body.v2 .follow-strip .fs-label { font-size: 28px; font-weight: 900; text-transform: uppercase; }
body.v2 .follow-strip .fs-links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) {
  body.v2 .join-form { grid-template-columns: 1fr; }
  body.v2 .join-section { padding: 40px 16px 0; }
  body.v2 .follow-strip { padding: 0 16px; }
  body.v2 .top-tools { gap: 8px; }
  body.v2 .top-tools .edition-select { max-width: 120px; }
  body.v2 .top-tools #registerBtn { font-size: 13px; padding: 9px 14px; min-height: 0; }
}
