/* ============================================================
   WESTPICK — custom layer on top of Tailwind tokens.
   Arena-scoreboard atmosphere: spotlight gradient, field grid,
   grain, shimmer skeletons, segmented picks, motion.
   ============================================================ */

:root {
  --c-base: #0A0E14;
  --c-surface: #121821;
  --c-elevated: #1A2230;
  --c-subtle: #243040;
  --c-primary: #F2F5F9;
  --c-secondary: #8A97A8;
  --c-accent: #00E28A;
  --c-accent-hover: #00C878;
  --c-warn: #FFB020;
  --c-danger: #FF4D5E;
  --c-info: #3B9EFF;
  --ease: cubic-bezier(0, 0, 0.2, 1);
  --header-h: 64px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--c-base);
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
  /* Spotlight over the arena + faint field grid */
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(59, 158, 255, 0.10), transparent 65%),
    radial-gradient(900px 500px at 85% 10%, rgba(0, 226, 138, 0.05), transparent 60%),
    linear-gradient(rgba(36, 48, 64, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 64, 0.28) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  background-attachment: fixed;
}

/* Film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }

.num { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* ---------- Focus & a11y ---------- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--c-accent);
  color: #04140C;
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.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;
}

/* Anchor targets don't hide under the sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-subtle);
  border-radius: 12px;
}
.card-elevated {
  background: var(--c-elevated);
  border: 1px solid var(--c-subtle);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease), transform 0.15s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-accent); color: #04140C; }
.btn-primary:hover { background: var(--c-accent-hover); }
.btn-primary:disabled {
  background: var(--c-subtle);
  color: var(--c-secondary);
  cursor: not-allowed;
  transform: none;
}
.btn-ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-subtle);
}
.btn-ghost:hover { border-color: var(--c-secondary); background: rgba(36, 48, 64, 0.35); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--c-subtle);
  background: var(--c-surface);
  color: var(--c-secondary);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.chip:hover { color: var(--c-primary); border-color: var(--c-secondary); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #04140C;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  border: 1px solid var(--c-subtle);
  color: var(--c-secondary);
}
.badge-s { border-color: var(--c-info); color: var(--c-info); }
.badge-age { border-color: var(--c-warn); color: var(--c-warn); font-size: 14px; }

/* ---------- Segmented odds buttons ---------- */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}
.seg-btn {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--c-subtle);
  background: var(--c-elevated);
  color: var(--c-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 6px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease),
    color 0.15s var(--ease), box-shadow 0.2s var(--ease);
  font-variant-numeric: tabular-nums;
}
.seg-btn:hover:not(:disabled) { border-color: var(--c-accent); }
.seg-btn .k {
  font-size: 12px;
  line-height: 16px;
  color: var(--c-secondary);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.seg-btn .v { font-size: 16px; line-height: 22px; font-weight: 700; }
.seg-btn[aria-pressed="true"] {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #04140C;
  box-shadow: 0 0 0 1px var(--c-accent), 0 0 22px rgba(0, 226, 138, 0.35);
}
.seg-btn[aria-pressed="true"] .k { color: rgba(4, 20, 12, 0.7); }
.seg-btn[aria-pressed="true"] .v::before { content: "✓ "; font-size: 12px; }
.seg-btn:disabled, .seg-btn.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--c-surface);
}
.seg-spacer { visibility: hidden; pointer-events: none; }

/* ---------- Event card ---------- */
.event-card { overflow: hidden; transition: border-color 0.2s var(--ease); }
.event-card.is-collapsed .market-extra { display: none; }
.event-card:not(.is-collapsed) [data-expand] svg { transform: rotate(180deg); }
.event-card:hover { border-color: rgba(138, 151, 168, 0.6); }
.event-card.is-closed { opacity: 0.62; }
.event-card.is-closed .seg-btn { pointer-events: none; }

.t-warn { color: var(--c-warn); }
.t-closed { color: var(--c-secondary); }

/* ---------- Skeletons (shimmer, never spinners) ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
  border-radius: 12px;
  border: 1px solid var(--c-subtle);
  min-height: 120px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(138, 151, 168, 0.09), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- Stagger reveal ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { animation: riseIn 0.45s var(--ease) both; }
.reveal-1 { animation-delay: 0.05s; } .reveal-2 { animation-delay: 0.12s; }
.reveal-3 { animation-delay: 0.19s; } .reveal-4 { animation-delay: 0.26s; }
.reveal-5 { animation-delay: 0.33s; } .reveal-6 { animation-delay: 0.40s; }

/* ---------- Toast ---------- */
#wp-toasts {
  position: fixed;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--c-elevated);
  border: 1px solid var(--c-subtle);
  border-left: 3px solid var(--c-accent);
  color: var(--c-primary);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: riseIn 0.2s var(--ease) both;
}
.toast.warn { border-left-color: var(--c-warn); }
.toast.danger { border-left-color: var(--c-danger); }

/* ---------- Sticky layers (mobile) ----------
   Stacking bottom-up: bottom-nav (56) → slip bar (48) → rg-sticky (32) */
.bottom-stack {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1024px) {
  .bottom-stack .bottom-nav { display: none; }
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--c-elevated);
  border-top: 1px solid var(--c-subtle);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  font-size: 11px;
  line-height: 14px;
  color: var(--c-secondary);
  text-decoration: none;
}
.bottom-nav a.is-active, .bottom-nav a:hover { color: var(--c-accent); }
.bottom-nav svg { width: 20px; height: 20px; }

.slip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 6px 16px;
  background: var(--c-accent);
  color: #04140C;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  width: 100%;
  font-size: 15px;
}
@media (min-width: 1024px) { .slip-bar { display: none; } }

.rg-sticky {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 40px 7px 16px;
  background: var(--c-elevated);
  border-top: 1px solid var(--c-warn);
  color: var(--c-primary);
  font-size: 14px;
  line-height: 18px;
  position: relative;
  text-align: center;
  flex-wrap: wrap;
}
.rg-sticky a { color: var(--c-info); text-decoration: underline; }
.rg-sticky .rg-close {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none; border: 0;
  color: var(--c-secondary);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Bottom sheet (mobile slip) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(4, 8, 14, 0.7);
  z-index: 70;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 85vh;
  z-index: 71;
  background: var(--c-elevated);
  border-top: 1px solid var(--c-subtle);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s var(--ease);
  display: flex;
  flex-direction: column;
}
.sheet.is-open { transform: translateY(0); }
.sheet-grip {
  width: 44px; height: 4px;
  border-radius: 999px;
  background: var(--c-subtle);
  margin: 10px auto 4px;
}

/* ---------- Desktop slip rail ---------- */
.slip-rail {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-subtle);
}
.logo {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.logo b { color: var(--c-accent); font-weight: 700; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.tbl th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-secondary);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-subtle);
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid rgba(36, 48, 64, 0.6); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }

/* Rule tables collapse to cards on mobile — no horizontal scroll ever */
@media (max-width: 767px) {
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr {
    border: 1px solid var(--c-subtle);
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--c-surface);
    padding: 6px 0;
  }
  .tbl-cards td { border: 0; padding: 6px 14px; }
  .tbl-cards td[data-th]::before {
    content: attr(data-th);
    display: block;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-secondary);
    margin-bottom: 2px;
  }
  .tbl-cards .r { text-align: left; }
}

/* ---------- Accordion ---------- */
.acc { border: 1px solid var(--c-subtle); border-radius: 12px; background: var(--c-surface); }
.acc + .acc { margin-top: 10px; }
.acc summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+";
  color: var(--c-accent);
  font-size: 20px;
  transition: transform 0.2s var(--ease);
  flex: none;
}
.acc[open] summary::after { transform: rotate(45deg); }
.acc .acc-body { padding: 0 18px 16px; color: var(--c-secondary); }

/* ---------- rg-callout ---------- */
.rg-callout {
  border: 1px solid var(--c-warn);
  border-radius: 12px;
  background: rgba(255, 176, 32, 0.06);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.rg-callout svg { flex: none; color: var(--c-warn); width: 24px; height: 24px; margin-top: 2px; }
.rg-callout a[href^="tel:"] { color: var(--c-primary); font-weight: 700; text-decoration: underline; }

/* ---------- rg-footer zone ---------- */
.rg-footer-zone {
  border: 1px solid var(--c-warn);
  border-radius: 12px;
  padding: 18px 20px;
  background: rgba(255, 176, 32, 0.05);
}
.rg-footer-zone a[href^="tel:"] {
  color: var(--c-primary);
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Modals (age gate / dialogs) ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  z-index: 80;
  background: rgba(4, 8, 14, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--c-elevated);
  border: 1px solid var(--c-subtle);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: riseIn 0.25s var(--ease) both;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  z-index: 75;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--c-elevated);
  border: 1px solid var(--c-subtle);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: riseIn 0.3s var(--ease) both;
}
@media (min-width: 1024px) { .cookie-banner { left: auto; right: 24px; bottom: 24px; } }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--c-subtle);
  position: relative;
  transition: background 0.15s var(--ease);
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-secondary);
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}
.switch input:checked + .track { background: var(--c-accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: #04140C; }
.switch input:disabled + .track { opacity: 0.5; }
.switch input:focus-visible + .track { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ---------- TOC (legal pages) ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow: auto;
  font-size: 14px;
}
.toc a {
  display: block;
  padding: 6px 12px;
  color: var(--c-secondary);
  text-decoration: none;
  border-left: 2px solid var(--c-subtle);
}
.toc a:hover { color: var(--c-primary); }
.toc a.is-active { color: var(--c-accent); border-left-color: var(--c-accent); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-subtle); overflow-x: auto; }
.tab {
  padding: 10px 18px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  color: var(--c-secondary);
  border: 0;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* ---------- QR ---------- */
.qr-box {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 16px;
  display: inline-block;
  line-height: 0;
}
.qr-box svg { width: 240px; height: 240px; display: block; }

/* Section head kicker */
.kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 700;
}
h1, h2 { text-transform: uppercase; font-family: "Barlow Condensed", sans-serif; }

/* Diagonal section divider */
.diag {
  height: 56px;
  background: linear-gradient(-3deg, var(--c-surface) 49.6%, transparent 50.4%);
  opacity: 0.5;
}

/* Horizontal scroll chip row */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

/* Links inside prose */
.prose a { color: var(--c-info); text-decoration: underline; }
.prose p { margin: 0 0 12px; }
.prose ul { list-style: disc; padding-left: 22px; margin: 0 0 12px; }
.prose li { margin: 4px 0; }
.legal-ph {
  border: 1px dashed var(--c-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--c-secondary);
  font-size: 14px;
  font-style: italic;
}

/* ---------- Print (QR screen) ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  body::after { display: none; }
  .site-header, .bottom-stack, .sheet, .sheet-backdrop, .cookie-banner,
  .site-footer, .no-print, #wp-toasts { display: none !important; }
  .qr-box { border: 1px solid #000; }
  .print-block { color: #000; }
}
