/* ============================================================
   BPAAU · SEO-first, performance-first theme
   Single file · no external fonts · no JS required
   Dark charcoal + gold casino aesthetic
   ============================================================ */

:root {
  --bg:            #0d1117;
  --surface:       #161b22;
  --surface-2:     #1c2230;
  --border:        #30363d;
  --text:          #e6edf3;
  --muted:         #8b949e;
  --gold:          #d4af37;
  --gold-hover:    #e6c44a;
  --green:         #3fb950;
  --rg-bg:         rgba(63, 185, 80, 0.1);
  --gold-tint:     rgba(212, 175, 55, 0.08);
  --gold-border:   rgba(212, 175, 55, 0.25);
  --radius:        12px;
  --radius-sm:     8px;
  --container:     1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }
h1, h2, h3, h4, p, ul, ol { overflow-wrap: break-word; }
h1 { font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
h3 { font-size: clamp(1.1rem, 3vw, 1.25rem); font-weight: 600; line-height: 1.3; margin: 0 0 .4em; }
p  { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #0d1117;
  padding: 8px 16px; z-index: 1000; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #0d1117; }

/* ---------- Header / nav ---------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px; padding: 14px 0;
}
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { height: 56px; width: auto; }
.nav-toggle { display: none; }
.nav-toggle-label {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; width: 48px; height: 48px; padding: 0; margin-left: auto;
  border-radius: 8px; border: 1px solid var(--border);
}
.nav-toggle-label span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav { display: none; flex-direction: column; gap: 8px; width: 100%; padding-bottom: 6px; }
#nav-toggle:checked ~ .nav { display: flex; }
.nav__link {
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text);
  text-decoration: none; font-size: .9rem; white-space: nowrap;
}
.nav__link:hover, .nav__link.is-active { border-color: var(--gold); color: var(--gold); }

@media (min-width: 768px) {
  .nav-toggle-label { display: none; }
  .nav { display: flex !important; flex-direction: row; flex-wrap: wrap; gap: 8px; width: auto; padding-bottom: 0; }
  .brand-logo img { height: 64px; }
}

/* ---------- RG banner ---------- */
.rg-banner {
  background: var(--rg-bg); border: 1px solid var(--green);
  padding: 12px 16px; border-radius: 8px; margin: 20px 0;
  font-size: .875rem; line-height: 1.6;
}
.rg-banner strong { color: var(--green); }
.rg-banner a { color: var(--green); text-decoration: underline; }

/* ---------- Page hero ---------- */
.page-hero { padding: 32px 0 8px; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.lede { font-size: 1.125rem; color: var(--muted); margin-bottom: 24px; }

.author-box {
  display: flex; align-items: center; gap: 14px;
  margin: 8px 0 24px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.author-box__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: var(--gold); color: #0d1117;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.author-box__name { font-weight: 700; margin: 0; }
.author-box__role, .author-box__meta { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 32px 0; }
.section-title { margin-bottom: 20px; }
.section-title__label {
  display: block; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 6px;
}
.section-title h2 { margin: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; overflow: hidden;
}
.card__media { margin: -20px -20px 16px; line-height: 0; }
.card__media img { width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }
.card__tag {
  display: inline-block; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--gold); margin-bottom: 6px;
}
.card__title { margin: 8px 0; }
.card__excerpt { color: var(--muted); line-height: 1.6; margin: 0 0 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; min-height: 48px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  border: none; text-align: center; font-family: inherit; line-height: 1.3;
}
.btn--primary { background: var(--gold); color: #0d1117; }
.btn--primary:hover { background: var(--gold-hover); color: #0d1117; }
.btn--small { padding: 10px 16px; font-size: .875rem; min-height: 44px; }
.btn--block { display: flex; width: 100%; }

/* ---------- Product grid / cards ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.product-card__logo {
  height: 80px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.product-card__logo img { max-height: 70px; max-width: 100%; object-fit: contain; }
.product-card__brand { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.product-card__stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 10px; font-size: .95rem; }
.product-card__offers {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 6px; width: 100%;
}
.product-card__offers li {
  background: var(--surface-2); padding: 8px 10px; border-radius: 6px;
  text-align: center; font-size: .875rem;
}
.product-card .btn { margin-top: auto; width: 100%; }

/* ---------- Score table ---------- */
.score-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.score-table th {
  background: var(--surface); padding: 10px 12px; text-align: left;
  border-bottom: 2px solid var(--border);
}
.score-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--muted); }

/* ---------- FAQ (native details/summary, zero JS) ---------- */
details.faq {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; overflow: hidden; background: var(--surface);
}
details.faq summary {
  padding: 14px 16px; cursor: pointer; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.25rem; color: var(--gold); flex: 0 0 auto; }
details.faq[open] summary::after { content: "\2212"; }
details.faq .faq__body { padding: 0 16px 16px; color: var(--muted); line-height: 1.7; }

/* ---------- Trust badges ---------- */
.trust-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 24px 0; }
.trust-badge { text-align: center; flex: 1 1 140px; max-width: 180px; }
.trust-badge img { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 8px; }
.trust-badge p { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- Callouts ---------- */
.callout {
  background: var(--surface); border-left: 4px solid var(--gold);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 20px 0;
}
.callout--green { border-left-color: var(--green); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Mission box ---------- */
.mission-box {
  background: var(--gold-tint); border: 1px solid var(--gold-border);
  border-radius: 12px; padding: 24px; margin: 20px 0;
}

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.team-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.team-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--gold), #b8941f); color: #0d1117;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 48px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.footer-nav a { color: var(--muted); font-size: .875rem; }
.footer-nav a:hover { color: var(--gold); }
.footer-note { font-size: .8rem; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.footer-note a { color: var(--muted); text-decoration: underline; }

/* ---------- Hero banner image ---------- */
.hero-banner { width: 100%; height: auto; border-radius: 12px; margin-bottom: 24px; }

/* ---------- Category grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.category-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center; text-decoration: none; color: var(--text); display: block;
}
.category-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.category-card:hover { border-color: var(--gold); }

/* ---------- Chips ---------- */
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--border); font-size: .8rem; color: var(--muted);
  text-decoration: none; margin: 2px;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Method steps ---------- */
.method-steps { counter-reset: step; list-style: none; padding: 0; }
.method-steps li {
  counter-increment: step; position: relative;
  padding: 12px 0 12px 48px; border-bottom: 1px solid var(--border);
}
.method-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: #0d1117; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Principles ---------- */
.principles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.principle-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* ---------- Blog cards ---------- */
.blog-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.blog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--text);
}
.blog-card:hover { border-color: var(--gold); }
.blog-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card__meta { font-size: .78rem; color: var(--muted); margin: 0; }

/* ---------- Featured card ---------- */
.featured-card {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; background: var(--surface); margin-bottom: 24px;
}
@media (min-width: 768px) {
  .featured-card { grid-template-columns: 1.1fr 1fr; }
}
.featured-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16/10; }
.featured-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }

/* ---------- CTA row ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   MOBILE OPTIMIZATION ENHANCEMENTS (mobile audit pass)
   CSS-only · zero JS · desktop unaffected
   ============================================================ */

/* ---- New components: hidden on desktop by default ---- */
.nav-backdrop { display: none; }
.mobile-cta   { display: none; }
.back-to-top  { display: none; }

/* ---- Horizontal-scroll wrapper for wide tables ---- */
.table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 16px 0; border: 1px solid var(--border); border-radius: 8px;
}
.table-wrap .score-table { border: 0; min-width: 560px; }

/* ---- Readability: cap article line length to ~60-75 chars ---- */
.section p, .lede { max-width: 900px; }

/* ---- Blog-hub utility classes referenced in markup ---- */
.blog-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip--active { border-color: var(--gold); color: var(--gold); background: var(--gold-tint); }
.featured-card__title { margin: 0; }
.featured-card__excerpt { color: var(--muted); line-height: 1.6; margin: 0; }

/* ============================================================
   MOBILE  (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {
  /* --- Sticky header (subtle, keeps nav reachable) --- */
  .site-header { position: sticky; top: 0; z-index: 90; background: var(--bg); }

  /* --- Touch target: hamburger = 48x48 --- */
  .nav-toggle-label { width: 48px; height: 48px; }

  /* --- Open menu: card container + full-width 48px links --- */
  .nav {
    position: relative; z-index: 85;
    gap: 8px; padding: 10px; width: 100%;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.5);
  }
  .nav__link {
    display: flex; align-items: center; width: 100%; box-sizing: border-box;
    padding: 14px 16px; font-size: 1rem; white-space: normal; min-height: 48px;
  }

  /* --- Hamburger turns into an X while open --- */
  #nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  #nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  #nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* --- Semi-transparent backdrop behind open menu --- */
  .nav-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.55); z-index: 80;
  }
  #nav-toggle:checked ~ .nav-backdrop { display: block; }

  /* --- Grids stack to 1 column --- */
  .product-grid   { grid-template-columns: 1fr; gap: 14px; }
  .blog-card-grid { grid-template-columns: 1fr; gap: 16px; }
  .team-grid      { grid-template-columns: 1fr; }
  .principles-grid{ grid-template-columns: 1fr; }
  /* Category grid: 2 columns */
  .category-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* --- Trust badges: 2-column grid, 48px icons --- */
  .trust-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .trust-badge  { flex: none; max-width: none; }
  .trust-badge img { width: 48px; height: 48px; }

  /* --- Product cards: smaller logos, full-width tall CTA --- */
  .product-card__logo   { height: 64px; }
  .product-card__logo img { max-height: 56px; }
  .product-card .btn    { width: 100%; min-height: 48px; }
  .product-card__offers li { font-size: .92rem; padding: 10px; }

  /* --- Chips: 48px tap targets --- */
  .chip {
    display: inline-flex; align-items: center; min-height: 48px;
    padding: 8px 14px; font-size: .95rem;
  }

  /* --- Footer links: bigger tap area --- */
  .footer-nav { gap: 4px 8px; }
  .footer-nav a { display: inline-block; padding: 12px 8px; font-size: .95rem; }

  /* --- Breadcrumb legible --- */
  .breadcrumb { font-size: .9rem; }

  /* --- Buttons reachable size --- */
  .btn { min-height: 48px; }
  .btn--small { min-height: 48px; padding: 10px 16px; font-size: .95rem; }

  /* --- Sticky bottom CTA bar (1XAUD, affiliate) --- */
  .mobile-cta {
    display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(0,0,0,.4);
  }
  .mobile-cta .btn {
    width: 100%; min-height: 50px; background: var(--gold); color: #0d1117; font-size: 1rem;
  }
  /* Reserve bottom space so the fixed bar never covers footer/content */
  body { padding-bottom: 78px; }

  /* --- Back-to-top (CSS-only, always visible on mobile) --- */
  .back-to-top {
    display: flex; position: fixed; bottom: 92px; right: 14px; z-index: 99;
    width: 48px; height: 48px; border-radius: 50%;
    align-items: center; justify-content: center;
    background: var(--gold); color: #0d1117; font-size: 22px; font-weight: 700;
    text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.45);
  }
}

@media (min-width: 768px) {
  /* Ensure the mobile-only bars stay out of the way on desktop */
  .mobile-cta, .back-to-top, .nav-backdrop { display: none !important; }
}

/* ---------- Article content readability ---------- */
.article-content { max-width: 780px; margin: 0 auto; }
.article-content p { margin-bottom: 1.15em; line-height: 1.75; }
.article-content h2 { margin-top: 2em; padding-top: .2em; }
.article-content h3 { margin-top: 1.5em; }
.article-content ul, .article-content ol { margin: 0 0 1.2em; padding-left: 1.4em; line-height: 1.75; }
.article-content li { margin-bottom: .4em; }
.article-content img { border-radius: 10px; margin: 1.5em 0; }

/* ---------- Inline product banners (horizontal popout restored as content) ----------
   Placed inline between content sections — never a popup/interstitial.
   Link carries rel="sponsored nofollow noopener" target="_blank". */
.inline-banner { display: block; margin: 28px 0; line-height: 0; }
.inline-banner img {
  width: 100%; height: auto; display: block; border-radius: 12px;
}

/* ---------- Vertical product banners (desktop-only inline row) ---------- */
.vertical-banners { display: none; }
@media (min-width: 1024px) {
  .vertical-banners {
    display: flex; gap: 16px; justify-content: center; margin: 24px 0;
  }
  .vertical-banners a { line-height: 0; }
  .vertical-banners img { max-height: 400px; width: auto; border-radius: 8px; }
}

/* ---------- Blog-hub category showcase (overlaid category images) ---------- */
.category-showcase {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin: 24px 0;
}
.category-showcase a { text-decoration: none; }

/* ---------- Popular pokie game cards ----------
   Dark charcoal + gold theme, CSS-only. Each card links out to the
   assigned protected operator's register page (sponsored nofollow). */
.game-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin: 24px 0;
}
.game-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
.game-card:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.game-card__media {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--surface-2);
}
.game-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.game-card__body {
  padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.game-card__name { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.25; }
.game-card__provider { margin: 0; font-size: .78rem; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; }
.game-card__tagline { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.game-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.game-card__rtp {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: var(--gold-tint); border: 1px solid var(--gold-border);
  color: var(--gold); font-size: .74rem; font-weight: 700;
}
.game-card__operator { font-size: .74rem; color: var(--muted); }
.game-card__cta {
  margin: 10px 14px 14px; width: auto; align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  min-height: 44px;
}
@media (max-width: 600px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card__body { padding: 10px 10px 8px; }
  .game-card__name { font-size: .9rem; }
  .game-card__cta { margin: 8px 10px 10px; min-height: 44px; font-size: .9rem; }
}
@media (min-width: 1024px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
}



/* ===== Inline Figures (full-width section images) ===== */
.inline-figure {
  display: block;
  float: none;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 16px auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #161b22);
  border: 1px solid var(--border, #30363d);
}
.inline-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.inline-figure figcaption {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #8b949e;
  text-align: center;
  font-style: italic;
}
