/* ==========================================================================
   components.css — buttons, banner, long-form article furniture,
                    data tables, FAQ accordion, ToC, CTA
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.4;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--c-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(211, 33, 33, .4);
}
.btn--primary:hover {
  color: #fff;
  background: var(--c-red-dark);
  box-shadow: 0 6px 20px rgba(211, 33, 33, .55);
}

.btn--gold {
  background: var(--grad-gold);
  color: #2b1a00;
  box-shadow: 0 4px 14px rgba(243, 183, 15, .35);
}
.btn--gold:hover { color: #2b1a00; }

.btn--ghost {
  border: 1px solid var(--c-border-strong);
  color: var(--c-text);
}
.btn--ghost:hover { border-color: var(--c-gold); color: var(--c-gold); }

@media (max-width: 600px) {
  .btn { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); }
}

/* --------------------------------------------------------------------------
   Reading progress bar
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--grad-gold);
  transition: width .1s linear;
}

/* --------------------------------------------------------------------------
   Top banner
   -------------------------------------------------------------------------- */
.banner { padding-top: var(--sp-5); }

.banner__img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Section shell — copy sits directly on the page background.
   Only tables (and the discrete widgets below) get their own surface.
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--sp-5);
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}

/* --------------------------------------------------------------------------
   Headings inside long-form content
   -------------------------------------------------------------------------- */
h1.section-title {
  margin-bottom: var(--sp-4);
  text-align: center;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2.section-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-4);
  text-align: left;
  color: #fff;
  font-size: var(--fs-2xl);
}

/* accent bar */
h2.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  bottom: .15em;
  width: 5px;
  border-radius: 3px;
  background: var(--grad-gold);
}

/* Feature heading — centred, gold, with a rule running out to each side */
h2.section-title--feature {
  justify-content: center;
  gap: var(--sp-4);
  padding-left: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--c-gold);
}

h2.section-title--feature::before,
h2.section-title--feature::after {
  content: "";
  position: static;
  flex: 1 1 auto;
  max-width: 200px;
  width: auto;
  height: 1px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent, var(--c-gold));
}

h2.section-title--feature::after {
  background: linear-gradient(90deg, var(--c-gold), transparent);
}

@media (max-width: 600px) {
  h2.section-title--feature::before,
  h2.section-title--feature::after { max-width: 40px; }
}

/* Lead paragraph under a feature heading */
.section-lede {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   Game tiles — 6 across on desktop, 3 on tablet, 2 on phones
   -------------------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-4);
  margin-block: var(--sp-6);
}

.tiles .tile {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--transition), filter var(--transition);
}

.tiles .tile img {
  width: 100%;
  height: auto;
  display: block;
}

.tiles .tile:hover,
.tiles .tile:focus-visible {
  transform: translateY(-6px);
  filter: drop-shadow(0 10px 18px rgba(243, 183, 15, .28));
}

@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); } }

.section-text h3 {
  position: relative;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-3);
  padding-left: var(--sp-5);
  color: var(--c-gold-light);
  font-size: var(--fs-xl);
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}

.section-text h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--c-red);
  transform: rotate(45deg);
}

.section-text > h3:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   Body copy
   -------------------------------------------------------------------------- */
.section-text { color: var(--c-text); }

.section-text p {
  margin-bottom: var(--sp-4);
  color: var(--c-text);
  line-height: 1.8;
}

.section-text p:last-child { margin-bottom: 0; }

/* Opening paragraph of the page reads larger */
.section-text--lead p:first-of-type,
.section:first-of-type .section-text p:first-of-type {
  font-size: var(--fs-lg);
  color: #fff;
}

.section-text a {
  color: var(--c-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.section-text a:hover { color: var(--c-gold-light); }

.section-text em { color: var(--c-gold-light); font-style: italic; }

/* --------------------------------------------------------------------------
   Lists — bulleted list as feature ticks, ordered list as numbered steps
   -------------------------------------------------------------------------- */
.section-text ul {
  display: grid;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
  padding: 0;
  list-style: none;
}

.section-text ul > li {
  position: relative;
  padding-left: var(--sp-6);
  line-height: 1.7;
}

.section-text ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(243, 183, 15, .15);
  border: 1px solid var(--c-gold);
}

.section-text ul > li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: .72em;
  width: 5px;
  height: 8px;
  border-right: 2px solid var(--c-gold);
  border-bottom: 2px solid var(--c-gold);
  transform: rotate(45deg);
}

/* Ordered list → numbered step cards */
.section-text ol {
  counter-reset: step;
  display: grid;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
  padding: 0;
  list-style: none;
}

.section-text ol > li {
  counter-increment: step;
  position: relative;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-7) + var(--sp-2));
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  line-height: 1.7;
  transition: border-color var(--transition), transform var(--transition);
}

.section-text ol > li:hover {
  border-color: rgba(243, 183, 15, .4);
  transform: translateX(3px);
}

.section-text ol > li::before {
  content: counter(step);
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad-red);
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-sm);
  box-shadow: 0 2px 10px rgba(211, 33, 33, .45);
}

/* --------------------------------------------------------------------------
   Data tables
   -------------------------------------------------------------------------- */
.table-scroll {
  position: relative;
  margin: var(--sp-5) 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--c-red) transparent;
}

.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, .05); }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--c-red);
  border-radius: 4px;
}

.section-text table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  text-align: left;
}

.section-text caption {
  padding: var(--sp-3) var(--sp-4);
  background: rgba(71, 0, 0, .55);
  border-bottom: 1px solid var(--c-border-strong);
  color: var(--c-gold);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-align: left;
  letter-spacing: .02em;
}

.section-text thead th {
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(180deg, #3a0d0d, #2a0909);
  color: var(--c-gold-light);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  border-bottom: 2px solid var(--c-red);
}

.section-text tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  vertical-align: top;
}

/* first column reads as a row label */
.section-text tbody td:first-child {
  color: #fff;
  font-weight: 600;
}

.section-text tbody tr:nth-child(even) { background: rgba(255, 255, 255, .035); }
.section-text tbody tr:hover { background: rgba(243, 183, 15, .07); }
.section-text tbody tr:last-child td { border-bottom: 0; }

.section-text table a { color: var(--c-gold); }

@media (max-width: 600px) {
  .section-text table { font-size: var(--fs-xs); }
  .section-text thead th,
  .section-text tbody td { padding: var(--sp-2) var(--sp-3); }
}

/* --------------------------------------------------------------------------
   FAQ accordion (native <details>)
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: var(--sp-3); }

.faq__item {
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.faq__item[open] {
  border-color: rgba(243, 183, 15, .45);
  box-shadow: var(--shadow-sm);
}

.faq__q {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  cursor: pointer;
  list-style: none;
  transition: background var(--transition);
}

.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: rgba(255, 255, 255, .04); }

.faq__q h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: var(--fs-base);
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
}

.faq__q h3::before { content: none; }

/* chevron */
.faq__q::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-right: var(--sp-1);
  border-right: 2px solid var(--c-gold);
  border-bottom: 2px solid var(--c-gold);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--transition);
}

.faq__item[open] .faq__q::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq__item[open] .faq__q h3 { color: var(--c-gold); }

.faq__a {
  padding: 0 var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-3);
}

.faq__a p { margin: 0; color: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   Table of contents (built by main.js from the H2s)
   -------------------------------------------------------------------------- */
.toc {
  margin: var(--sp-4) auto;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .03);
}

.toc[open] { border-color: var(--c-border-strong); }

/* the collapsed bar */
.toc__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-gold);
  transition: background var(--transition);
}

.toc__title::-webkit-details-marker { display: none; }
.toc__title:hover { background: rgba(255, 255, 255, .04); }

/* chevron sits at the end of the bar */
.toc__title::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--transition);
}

.toc[open] .toc__title::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

/* `display:grid` would override the UA rule that hides a closed <details>
   child, leaving the list painted over the copy below — so gate it on [open]. */
.toc__list { display: none; }

.toc[open] .toc__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2) var(--sp-5);
  margin: 0;
  padding: var(--sp-2) var(--sp-4) var(--sp-4);
  list-style: none;
  counter-reset: toc;
  border-top: 1px solid var(--c-border);
}

@media (max-width: 700px) {
  .toc[open] .toc__list { grid-template-columns: 1fr; }
}

.toc__list li { counter-increment: toc; }

.toc__list a {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  flex-shrink: 0;
  color: var(--c-red);
  font-weight: 700;
}

.toc__list a:hover,
.toc__list a.is-active {
  background: rgba(255, 255, 255, .05);
  color: var(--c-gold);
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding-block: var(--sp-4) 0;
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: var(--sp-2);
  color: var(--c-text-dim);
}

.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-gold); }
.breadcrumb [aria-current="page"] { color: var(--c-gold); }

/* --------------------------------------------------------------------------
   Page head (supporting pages)
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: var(--sp-5) var(--sp-2);
  text-align: center;
}

.page-head h1 {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Notice / responsible gaming
   -------------------------------------------------------------------------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  background: rgba(71, 0, 0, .35);
  border: 1px solid var(--c-border-strong);
  border-left: 4px solid var(--c-gold);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.age-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--c-red);
  border-radius: 50%;
  color: var(--c-red);
  font-weight: 800;
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta {
  margin: var(--sp-7) auto var(--sp-5);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  background: linear-gradient(135deg, rgba(71, 0, 0, .95), rgba(28, 25, 24, .95));
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-lg);
}

.cta__title { margin-bottom: var(--sp-3); color: #fff; }
.cta__text { max-width: 620px; margin: 0 auto var(--sp-5); color: var(--c-text-muted); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-red);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: #fff; filter: brightness(1.1); }

/* --------------------------------------------------------------------------
   Author byline
   -------------------------------------------------------------------------- */
.page-head__meta {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-text-dim);
}

.byline--home { text-align: center; margin-bottom: var(--sp-4); }

.byline__author {
  color: var(--c-gold);
  text-decoration: none;
  font-weight: 600;
}

.byline__author:hover { color: var(--c-gold-light); text-decoration: underline; }
