/* =============================================
   BET BUZZ BIG WIN — Design System
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --deep: #1E1B4B;
  --violet: #7C3AED;
  --lavender: #F5F3FF;
  --violet-light: #A78BFA;
  --violet-mid: #5B21B6;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --surface: #ffffff;
  --surface-2: #f9f8ff;
  --border: #e5e1f9;
  --radius: 28px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(124,58,237,0.10);
  --shadow-md: 0 8px 40px rgba(124,58,237,0.16);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --max-prose: 720px;
  --max-site: 1200px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  min-width: 320px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-decoration: underline; }
a:hover { color: var(--violet-mid); }

/* --- Utilities --- */
.mono { font-family: var(--font-mono); }
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--violet); color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; z-index: 9999; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--deep);
  box-shadow: 0 2px 16px rgba(30,27,75,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  height: var(--header-h);
  max-width: var(--max-site);
  margin: 0 auto;
}

.brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; flex-shrink: 0;
  min-width: 0;
}
.brand-name {
  font-size: 1rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}

/* Nav toggle */
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 44px; height: 44px;
  background: none; border: 2px solid rgba(255,255,255,0.25);
  border-radius: 8px; cursor: pointer; padding: 10px 11px;
  flex-shrink: 0; margin-left: auto;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* CTA buttons in header */
.header-cta {
  display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0;
}
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  border-radius: var(--radius);
  padding: 0 0.85rem; height: 44px;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1;
}
.cta-signup {
  background: var(--violet); color: #fff; border: 2px solid var(--violet);
}
.cta-signup:hover { background: var(--violet-mid); border-color: var(--violet-mid); color: #fff; }
.cta-login {
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5);
}
.cta-login:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

/* Main nav */
#main-nav {
  background: var(--deep);
  border-top: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
#main-nav.open { max-height: 600px; }

#main-nav ol {
  list-style: none;
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0.5rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
#main-nav ol > li > a {
  display: block;
  padding: 0.65rem 0.75rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 8px;
  min-height: 44px;
  display: flex; align-items: center;
  transition: background 0.15s, color 0.15s;
}
#main-nav ol > li > a:hover {
  background: rgba(124,58,237,0.25); color: #fff;
}

/* Desktop nav */
@media (min-width: 769px) {
  .nav-toggle { display: none; }
  #main-nav {
    max-height: none !important;
    border-top: none;
    background: rgba(30,27,75,0.6);
    border-bottom: 1px solid rgba(124,58,237,0.2);
  }
  #main-nav ol {
    flex-direction: row; flex-wrap: wrap;
    padding: 0 1rem; gap: 0;
  }
  #main-nav ol > li > a {
    font-size: 0.82rem; padding: 0.55rem 0.7rem;
    white-space: nowrap; min-height: 40px;
  }
  .brand-name { max-width: 220px; font-size: 1.05rem; }
  .cta { font-size: 0.875rem; padding: 0 1.1rem; }
}

/* =============================================
   HERO SECTIONS
   ============================================= */

/* Dot-matrix texture */
.dot-matrix {
  background:
    radial-gradient(circle at 70% 50%, rgba(124,58,237,0.18) 0%, transparent 60%),
    linear-gradient(135deg, var(--deep) 0%, #2d2875 50%, #3b1fa8 100%);
  position: relative;
  overflow: hidden;
}
.dot-matrix::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

/* Home hero */
.hero-section {
  padding: 3rem 1rem 2.5rem;
  color: #fff;
  position: relative;
}
.hero-content { position: relative; z-index: 1; max-width: var(--max-site); margin: 0 auto; }
.hero-media { position: relative; z-index: 1; max-width: var(--max-site); margin: 1.5rem auto 0; }
.hero-media .hero-img { border-radius: var(--radius-sm); }

.eyebrow {
  font-size: 0.75rem; letter-spacing: 0.12em;
  color: var(--violet-light); text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-section h1 {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 0.75rem;
}
.hero-desc {
  font-size: 1.05rem; opacity: 0.85; max-width: 640px;
  margin-top: 0.5rem;
}

/* Article hero */
.article-hero {
  background: linear-gradient(135deg, var(--deep) 0%, #2d2875 100%);
  padding: 2.5rem 1rem 2rem; color: #fff;
}
.article-hero-inner {
  max-width: var(--max-site); margin: 0 auto;
}
.article-hero h1 {
  font-size: clamp(1.35rem, 3.5vw, 2.2rem);
  font-weight: 700; line-height: 1.25;
  margin-bottom: 0.75rem;
}
.article-hero-img { margin-top: 1.5rem; border-radius: var(--radius-sm); overflow: hidden; }
.article-hero-img .hero-img { width: 100%; }

/* FAQ / inner hero */
.faq-hero, .inner-hero {
  background: linear-gradient(135deg, var(--deep) 0%, var(--violet-mid) 100%);
  padding: 2.5rem 1rem 2rem; color: #fff;
  max-width: 100%;
}
.faq-hero h1, .inner-hero h1 {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 700; line-height: 1.25;
  margin-bottom: 0.5rem;
}
.faq-hero > *, .inner-hero > * { max-width: var(--max-site); margin-left: auto; margin-right: auto; }

/* =============================================
   BYLINE
   ============================================= */
.byline {
  font-size: 0.875rem; color: rgba(255,255,255,0.7);
  margin: 0.5rem 0 0.75rem;
}
.byline .author-name { font-weight: 600; color: var(--violet-light); }
.byline time { font-family: var(--font-mono); font-size: 0.8rem; }

/* =============================================
   CONTENT LAYOUT — main > article > div
   ============================================= */
.content-section, .article-body, .faq-body, .inner-body {
  padding: 2rem 1rem;
  max-width: var(--max-site);
  margin: 0 auto;
  width: 100%;
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 900px) {
  .content-with-sidebar {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
  .sidebar { position: sticky; top: calc(var(--header-h) + 1rem); }
}

/* =============================================
   PROSE
   ============================================= */
.prose {
  max-width: var(--max-prose);
  width: 100%;
}
.prose h2 {
  font-size: 1.35rem; font-weight: 700;
  color: var(--deep); margin: 2rem 0 0.25rem;
  line-height: 1.3;
}
.prose h2 + p {
  margin-top: 0;
}
.prose h3 {
  font-size: 1.1rem; font-weight: 600;
  color: var(--deep); margin: 1.5rem 0 0.5rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose a {
  color: var(--violet); font-weight: 500;
  text-decoration: underline;
}
.prose a:hover { color: var(--violet-mid); }
.prose strong { font-weight: 700; color: var(--deep); }
.prose table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: 0.93rem;
  display: block; overflow-x: auto;
}
.prose table th, .prose table td {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
}
.prose table th {
  background: var(--deep); color: #fff;
  font-weight: 600;
}
.prose table tr:nth-child(even) { background: var(--surface-2); }
.prose blockquote {
  border-left: 3px solid var(--violet);
  margin: 1rem 0; padding: 0.75rem 1rem;
  background: var(--lavender); border-radius: 0 8px 8px 0;
  color: var(--deep);
}

/* Heading decoration: h2 + p.subtitle */
.prose h2 + p.subtitle,
h2 + p.subtitle, h2 + p.subhead, h2 + p.desc, h2 + p.lead {
  font-size: 0.95rem; color: var(--text-muted);
  margin-bottom: 1rem; font-style: italic;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}
.sidebar-heading {
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--violet);
  margin-bottom: 0.75rem;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-nav li a {
  display: block; padding: 0.45rem 0.5rem;
  color: var(--text); font-size: 0.875rem;
  text-decoration: none; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  min-height: 44px; display: flex; align-items: center;
}
.sidebar-nav li a:hover { background: var(--lavender); color: var(--violet); }
.trust-box .trust-links { display: flex; flex-direction: column; gap: 0.4rem; }
.trust-links a, .about-link {
  display: block; font-size: 0.85rem; color: var(--violet);
  text-decoration: underline; padding: 0.35rem 0;
  min-height: 44px; display: flex; align-items: center;
}
.trust-links a:hover, .about-link:hover { color: var(--violet-mid); }

/* =============================================
   CHILD LINKS (sibling <a> blocks with <strong>)
   Contract: a > strong, NOT inside li/dt/dd/td
   ============================================= */
.child-links {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 2rem;
}
.child-links > a.child-card {
  display: flex; flex-direction: column; gap: 0.35rem;
  flex: 1 1 260px;
  background: linear-gradient(135deg, var(--lavender) 0%, #ede9fe 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  min-height: 44px;
}
.child-links > a.child-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.child-links > a.child-card > strong {
  font-size: 0.95rem; font-weight: 700;
  color: var(--deep); line-height: 1.35;
}
.child-links > a.child-card > span {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.4;
}

/* =============================================
   STAGE LABEL
   ============================================= */
.stage-label {
  display: inline-block; font-size: 0.72rem;
  font-family: var(--font-mono); letter-spacing: 0.08em;
  background: var(--violet); color: #fff;
  padding: 0.2rem 0.7rem; border-radius: 20px;
  margin-bottom: 0.5rem; text-transform: uppercase;
}

/* =============================================
   ABOUT — Author div
   ============================================= */
.author-section { margin-top: 2.5rem; }
.author-section h2 { font-size: 1.25rem; font-weight: 700; color: var(--deep); }
.author-card {
  background: linear-gradient(135deg, var(--lavender) 0%, #ede9fe 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-top: 1rem;
}
.author-name-large { font-size: 1.15rem; font-weight: 700; color: var(--deep); margin-bottom: 0.25rem; }
.author-credentials { font-size: 0.8rem; color: var(--violet); margin-bottom: 0.75rem; }
.author-bio { font-size: 0.95rem; color: var(--text); line-height: 1.65; }

/* =============================================
   FAQ PROSE
   ============================================= */
.faq-prose details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-prose details summary {
  padding: 1rem 1.25rem; font-weight: 600;
  cursor: pointer; background: var(--surface-2);
  color: var(--deep); font-size: 0.97rem;
  list-style: none; display: flex; justify-content: space-between;
  min-height: 44px; align-items: center;
}
.faq-prose details[open] summary { color: var(--violet); }
.faq-prose details > section, .faq-prose details > p {
  padding: 1rem 1.25rem; font-size: 0.94rem; color: var(--text);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--deep);
  color: rgba(255,255,255,0.8);
  margin-top: 3rem;
  border-top: 2px solid var(--violet);
}

/* footer > div (direct children) */
.site-footer > div { padding: 1.75rem 1rem; }
.site-footer > div + div { border-top: 1px solid rgba(255,255,255,0.1); }

.footer-main {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--max-site); margin: 0 auto;
}
@media (min-width: 640px) {
  .footer-main { grid-template-columns: 1fr 1fr; align-items: start; }
}
.footer-brand .brand-name { font-size: 1rem; font-weight: 700; color: #fff; display: block; margin-bottom: 0.4rem; }
.footer-desc { font-size: 0.83rem; color: rgba(255,255,255,0.55); line-height: 1.5; }
.footer-nav { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.footer-nav li a {
  color: rgba(255,255,255,0.7); font-size: 0.85rem;
  text-decoration: none; padding: 0.3rem 0; display: block;
  min-height: 44px; display: flex; align-items: center;
}
.footer-nav li a:hover { color: var(--violet-light); }

.footer-trust {
  max-width: var(--max-site); margin: 0 auto;
}
.footer-trust .trust-links {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
}
.footer-trust .trust-links a {
  color: var(--violet-light); font-size: 0.85rem;
  text-decoration: underline; min-height: 44px;
  display: inline-flex; align-items: center;
}
.footer-trust .trust-links a:hover { color: #fff; }

.footer-rg {
  max-width: var(--max-site); margin: 0 auto;
  text-align: center;
}
.rg-notice {
  font-size: 0.8rem; color: rgba(255,255,255,0.55);
  line-height: 1.5; margin-bottom: 0.5rem;
}
.copyright { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* =============================================
   MOBILE — prevent horizontal scroll
   ============================================= */
@media (max-width: 768px) {
  /* Hard cap on all content */
  body { overflow-x: hidden; }
  
  .content-section,
  .article-body,
  .faq-body,
  .inner-body {
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 100%;
  }

  .content-with-sidebar {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .prose {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }

  /* Tables scroll inside their own container */
  .prose table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .hero-section,
  .article-hero,
  .faq-hero,
  .inner-hero {
    padding: 2rem 1rem 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .hero-section h1,
  .article-hero h1,
  .faq-hero h1,
  .inner-hero h1 {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .child-links {
    flex-direction: column;
    width: 100%;
  }
  .child-links > a.child-card {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .header-inner {
    padding: 0 0.75rem;
    gap: 0.4rem;
  }
  .brand-name { max-width: 120px; font-size: 0.88rem; }
  .cta { font-size: 0.72rem; padding: 0 0.6rem; height: 40px; }

  .sidebar { width: 100%; }
  .sidebar-card { width: 100%; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr; }
  .footer-trust .trust-links { flex-direction: column; gap: 0; }

  /* Prevent any img from overflowing */
  img, video, iframe, object, embed, canvas, audio, figure { max-width: 100%; }
}

/* Very small screens */
@media (max-width: 400px) {
  body { font-size: 16px; }
  .brand-name { max-width: 90px; }
  .cta { font-size: 0.68rem; padding: 0 0.5rem; }
  .hero-section h1 { font-size: 1.3rem; }
}

/* =============================================
   CONTACT FORM (if page.content has a form)
   ============================================= */
.prose form { display: flex; flex-direction: column; gap: 1rem; }
.prose label { font-weight: 600; font-size: 0.9rem; color: var(--deep); }
.prose input, .prose textarea, .prose select {
  width: 100%; max-width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--font-body);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.2s;
}
.prose input:focus, .prose textarea:focus {
  outline: none; border-color: var(--violet);
}
.prose button[type="submit"] {
  background: var(--violet); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 0.85rem 2rem; font-size: 1rem; font-weight: 700;
  cursor: pointer; width: fit-content;
  transition: background 0.2s;
  min-height: 44px;
}
.prose button[type="submit"]:hover { background: var(--violet-mid); }

/* =============================================
   UTILITIES
   ============================================= */
.subtitle, .subhead, .desc, .lead {
  color: var(--text-muted); font-size: 0.95rem;
  font-style: italic; margin-bottom: 1rem;
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}.tbl-scroll{overflow-x:auto;max-width:100%}