/* Baccarat Statistics — editorial design system */

@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/noto-sans-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/noto-sans-thai-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Serif Thai";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-serif-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Noto Serif Thai";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-serif-thai-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #080808;
  --bg-2: #101010;
  --bg-3: #171717;
  --gold: #c9a45c;
  --gold-2: #e2c47a;
  --text: #f5f5f5;
  --muted: #a5a5a5;
  --line: rgba(255, 255, 255, 0.08);
  --line-gold: rgba(201, 164, 92, 0.4);
  --banker: #c9a45c;
  --player: #f0e2c0;
  --tie: #8d8d8d;
  --header-h: 4.75rem;
  --serif: "Noto Serif Thai", "Noto Sans Thai", serif;
  --sans: "Noto Sans Thai", "Segoe UI", sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 6rem;
  scrollbar-color: #3a3428 var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 0.6px, transparent 0.65px);
  background-size: 4px 4px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-2);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #f3e2b4;
}

.text-link {
  color: var(--gold-2);
  text-decoration: none;
}

.text-link:hover {
  color: #f3e2b4;
  text-decoration: none;
}

h1, h2, h3, p, ul, ol, figure, dl {
  margin-top: 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.05rem, 3.4vw, 3.25rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.45rem;
  margin-bottom: 0.55rem;
}

p, ul, ol {
  margin-bottom: 1rem;
}

strong {
  font-weight: 500;
}

::selection {
  background: rgba(201, 164, 92, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Component: Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-gold);
}

.header-bar {
  position: relative;
  width: min(100% - 2rem, 82rem);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.7rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

.logo:hover {
  color: var(--text);
}

.logo-mark {
  flex: none;
}

.logo-text {
  display: flex;
  align-items: center;
  line-height: 1;
}

.logo-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0;
}

.header-cta {
  flex: none;
}

.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav-toggle-bars {
  width: 16px;
  height: 10px;
  background:
    linear-gradient(var(--gold-2), var(--gold-2)) 0 0 / 16px 1.5px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) 0 50% / 16px 1.5px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) 0 100% / 16px 1.5px no-repeat;
}

.nav-check:focus-visible + .nav-toggle {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
}

.primary-nav {
  display: none;
  flex: 1 0 100%;
}

.nav-check:checked ~ .primary-nav {
  display: block;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0 0.8rem;
  border-top: 1px solid var(--line);
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.8rem 0.15rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gold-2);
}

@media (min-width: 1040px) {
  .header-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-wrap: nowrap;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-right: 0;
  }

  .header-cta {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .nav-check,
  .nav-toggle {
    display: none;
  }

  .primary-nav {
    display: block;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    flex: none;
  }

  .nav-links {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem 1.15rem;
    border-top: 0;
    padding: 0;
  }

  .nav-links a {
    min-height: 44px;
    padding: 0.35rem 0.1rem;
    font-size: 0.95rem;
  }
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Component: buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.btn-gold {
  background: var(--gold);
  color: #1a150d;
}

.btn-gold:hover {
  background: var(--gold-2);
  color: #1a150d;
}

.btn-gold:focus-visible {
  outline-color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-gold);
}

.btn-ghost:hover {
  color: var(--gold-2);
  border-color: var(--gold);
}

.cta-short {
  display: none;
}

@media (max-width: 420px) {
  .cta-full {
    display: none;
  }

  .cta-short {
    display: inline;
  }

  .logo-name {
    font-size: 1.25rem;
  }
}

/* Component: Hero */

.hero {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 82rem);
  margin: 0 auto;
  padding: 3.2rem 0 1rem;
}

.hero-grid {
  display: grid;
  gap: 2.2rem;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.eyebrow::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.8;
}

.idx {
  font-variant-numeric: tabular-nums;
  color: var(--gold-2);
}

.lede {
  font-size: 1.14rem;
  color: #e6e6e6;
  max-width: 42rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1.6rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.figure-note {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-visual {
  margin: 0;
}

@media (min-width: 720px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 980px) {
  .hero {
    padding-top: 4.2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: 3rem;
  }
}

/* Component: Statistics card */

.stat-card,
.panel,
.myth-panel,
.toc,
.figure,
.flow li,
.profile,
.concept,
.help-card {
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid rgba(201, 164, 92, 0.28);
  border-radius: 16px;
}

.stat-card {
  padding: 1rem 1rem 1.05rem;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0;
  margin-bottom: 0.45rem;
}

.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--gold-2);
  margin-bottom: 0.4rem;
}

.stat-meta {
  display: block;
  color: #d7d7d7;
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Component: Figure */

.figure {
  overflow: hidden;
  box-shadow: var(--shadow);
}

.figure img {
  width: 100%;
  background: #000;
  display: block;
}

/* Component: Article layout and Table of contents */

.article-layout {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 82rem);
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
  display: grid;
  gap: 1.5rem;
}

.article-layout > * {
  min-width: 0;
}

.byline {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.7rem;
}

.toc {
  padding: 1.1rem 1rem 0.8rem;
}

.toc h2 {
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li + li {
  border-top: 1px solid var(--line);
}

.toc a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.55rem 0.2rem;
  color: #ddd;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
}

.toc a span {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}

.toc a:hover,
.toc a[aria-current="location"] {
  color: var(--gold-2);
}

.toc a[aria-current="location"] {
  box-shadow: inset 2px 0 0 var(--gold);
}

.section {
  padding: 3.2rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 6rem;
}

.section .lede,
.prose {
  max-width: 68ch;
}

.prose > :last-child {
  margin-bottom: 0;
}

.intro-block {
  padding-top: 0.5rem;
}

.callout {
  margin: 1.4rem 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 2px solid var(--gold);
  max-width: 68ch;
}

.assumption {
  margin: 1.4rem 0 0;
  padding: 1.1rem 1.15rem 0.3rem;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(201, 164, 92, 0.08), transparent 55%),
    var(--bg-2);
  border: 1px solid var(--line-gold);
  border-radius: 16px;
}

.assumption h2,
.assumption h3 {
  font-size: 1.35rem;
}

/* Component: Chart */

.chart {
  margin: 1.6rem 0 0.4rem;
}

.chart-title {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.stack {
  display: flex;
  width: 100%;
  min-height: 3rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stack span {
  min-width: 0.4rem;
}

.swatch-b,
.stack-b,
.edge-fill,
.se-fill {
  background: var(--banker);
}

.swatch-p,
.stack-p {
  background: repeating-linear-gradient(
    -45deg,
    var(--player),
    var(--player) 5px,
    #d9c79a 5px,
    #d9c79a 7px
  );
}

.swatch-t,
.stack-t {
  background: repeating-linear-gradient(
    90deg,
    #9a9a9a,
    #9a9a9a 2px,
    #3c3c3c 2px,
    #3c3c3c 5px
  );
}

.legend {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin: 0.9rem 0 0;
  padding: 0;
}

.legend li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.swatch {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend b {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--gold-2);
}

.donut-layout {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
}

.donut-wrap {
  display: grid;
  place-items: center;
  width: min(100%, 240px);
  margin: 0 auto;
}

.donut-wrap > * {
  grid-area: 1 / 1;
}

.donut-wrap svg {
  width: 100%;
  height: auto;
}

.donut-center {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.bar-list {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.bar-name,
.bar-val {
  font-variant-numeric: tabular-nums;
}

.bar-val {
  color: var(--gold-2);
  min-width: 4.5rem;
  text-align: right;
}

.bar-track {
  height: 0.7rem;
  background: #1c1c1c;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.edge-fill,
.se-fill {
  display: block;
  height: 100%;
  transform-origin: left center;
}

@media (prefers-reduced-motion: no-preference) {
  .edge-fill,
  .se-fill {
    animation: bar-grow 0.8s ease both;
  }
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (min-width: 800px) {
  .legend {
    grid-template-columns: repeat(3, 1fr);
  }

  .donut-layout {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 640px) {
  .bar-row {
    grid-template-columns: 1fr auto;
  }

  .bar-track {
    grid-column: 1 / -1;
  }
}

/* Comparison profiles */

.profile-grid,
.card-grid,
.glossary,
.concept-grid {
  display: grid;
  gap: 0.9rem;
  margin: 1.4rem 0;
}

.profile,
.help-card,
.concept {
  padding: 1.15rem 1.15rem 0.4rem;
}

.profile header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.profile .tag {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.kv {
  display: grid;
  grid-template-columns: minmax(9.5rem, 42%) 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0.8rem 0 1rem;
  font-size: 0.98rem;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .kv {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .kv dd {
    margin-bottom: 0.65rem;
  }
}

@media (min-width: 800px) {
  .profile-grid,
  .concept-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid.three,
  .glossary {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card values */

.value-scroller {
  overflow-x: auto;
  margin: 1.2rem 0;
  padding-bottom: 0.4rem;
}

.value-row {
  display: grid;
  grid-template-columns: repeat(13, 4.7rem);
  gap: 0.55rem;
  width: max-content;
  margin: 0;
  padding: 0.2rem;
  list-style: none;
}

.mini-card {
  display: grid;
  align-content: space-between;
  width: 4.7rem;
  height: 6.5rem;
  padding: 0.45rem 0.4rem 0.5rem;
  border-radius: 8px;
  background: #f4f1ea;
  color: #1a1a1a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.mini-card b {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1;
}

.mini-card i {
  font-style: normal;
  justify-self: end;
  font-size: 0.95rem;
}

.mini-card .pts {
  grid-column: 1 / -1;
  justify-self: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c5140;
}

.zero-card {
  background: #161616;
  color: var(--gold-2);
  border: 1px solid var(--line-gold);
}

.zero-card .pts {
  color: var(--gold);
}

.examples {
  display: grid;
  gap: 0.8rem;
}

.example {
  padding: 1rem 1.05rem 0.2rem;
  border-top: 1px solid var(--line-gold);
  background: var(--bg-2);
  border-radius: 14px;
}

.example p:last-child {
  margin-bottom: 0.85rem;
}

@media (min-width: 800px) {
  .examples.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* Third-card flow */

.flow {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0 1.6rem;
  padding: 0;
  counter-reset: flow;
}

.flow li {
  padding: 1rem 1rem 0.85rem;
  position: relative;
}

.flow-k {
  display: block;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.35rem;
}

.flow h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.flow p {
  margin: 0;
  color: #dedede;
  font-size: 0.98rem;
}

@media (min-width: 980px) {
  .flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    border-top: 1.5px solid var(--gold);
    border-right: 1.5px solid var(--gold);
    transform: rotate(45deg);
    right: -0.55rem;
    top: 1.35rem;
    z-index: 1;
  }
}

/* Beads */

.bead-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.bead-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.beads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.beads li {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.bead-b {
  background: var(--banker);
  color: #1a150d;
}

.bead-p {
  background: transparent;
  color: var(--player);
  border-color: var(--player);
}

.bead-t {
  background: transparent;
  color: #eee;
  border-color: #8d8d8d;
  border-radius: 6px;
}

/* Component: Table */

.scroll-hint {
  display: none;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  background: var(--bg-2);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 44rem;
  font-size: 0.98rem;
}

table.compact {
  min-width: 32rem;
}

caption {
  text-align: left;
  caption-side: bottom;
  padding: 0.9rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 500;
  color: var(--gold-2);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #141414;
}

tbody th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--text);
  font-family: var(--serif);
}

@media (max-width: 720px) {
  .scroll-hint {
    display: block;
  }
}

/* Component: Misconceptions */

.myth-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem 3.4rem 0.7rem 0;
  margin-top: 1rem;
}

.myth-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.myth-tabs button[aria-selected="true"] {
  background: var(--gold);
  color: #1a150d;
  border-color: var(--gold);
}

.js .myth-tabs {
  display: flex;
}

html:not(.js) .myth-tabs {
  display: none;
}

.myth-panel {
  padding: 1.2rem 1.2rem 0.4rem;
  margin-top: 0.4rem;
}

.js .myth-panel {
  display: none;
}

.js .myth-panel.is-active {
  display: block;
}

.myth-panel h3 {
  font-size: 1.45rem;
}

/* Component: FAQ accordion */

.faq-list {
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.95rem 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  line-height: 1.4;
}

.faq-icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--gold-2);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::before {
  width: 10px;
  height: 1.5px;
}

.faq-icon::after {
  width: 1.5px;
  height: 10px;
}

.faq-item[open] .faq-icon::after {
  display: none;
}

.faq-a {
  padding: 0 0 1rem;
  max-width: 68ch;
  color: #e8e8e8;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a {
    animation: faq-in 0.28s ease;
  }
}

@keyframes faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Responsible gambling */

.care {
  margin-top: 0.5rem;
  padding: 1.3rem 1.2rem 0.4rem;
  border-radius: 18px;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(201, 164, 92, 0.08), transparent 50%),
    #101010;
  border: 1px solid var(--line-gold);
}

.care-layout {
  display: grid;
  gap: 1.2rem;
}

.help-links {
  padding-left: 1.1rem;
}

.help-links a {
  font-weight: 500;
}

.nowrap {
  white-space: nowrap;
}

@media (min-width: 860px) {
  .care-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

/* Final CTA */

.close {
  margin-top: 0.5rem;
  padding: 1.6rem 0 0.2rem;
}

.close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

/* Component: Footer */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-gold);
  background: #070707;
  padding: 2.8rem 0 2rem;
}

.footer-inner {
  width: min(100% - 2rem, 82rem);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

.footer-brand p,
.site-footer li,
.site-footer p {
  color: var(--muted);
}

.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0.35rem 0;
}

.site-footer a {
  color: #e5e5e5;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-2);
}

.disclaimer {
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.copyright {
  margin: 0.7rem 0 0;
  color: #8d8d8d;
  font-size: 0.88rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .article-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7.2rem);
    overflow: auto;
  }
}

/* Back to top */

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 35;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: rgba(8, 8, 8, 0.92);
  color: var(--gold-2);
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}

button.btn {
  font-family: inherit;
  cursor: pointer;
}

.legal-trigger {
  display: inline;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: #e5e5e5;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.legal-trigger:hover {
  color: var(--gold-2);
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.legal-modal.is-open {
  display: flex;
}

.legal-dialog {
  position: relative;
  width: min(100%, 40rem);
  max-height: min(86vh, 42rem);
  overflow: auto;
  padding: 1.35rem 1.25rem 1.15rem;
  background: #101010;
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.legal-dialog h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 0.8rem;
  padding-right: 2.6rem;
}

.legal-dialog p,
.legal-dialog li {
  color: #e8e8e8;
}

.legal-dialog ul {
  padding-left: 1.15rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: transparent;
  color: var(--gold-2);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
}

.legal-modal[hidden] {
  display: none !important;
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.js .to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.js .to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .js .to-top {
    transition: opacity 0.25s ease;
  }

  .stat-card,
  .profile,
  .concept,
  .myth-panel,
  .btn {
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .stat-card:hover,
  .profile:hover,
  .concept:hover {
    transform: translateY(-2px);
  }
}

/* Legal pages */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45rem;
  color: #666;
}

.legal {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 46rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.legal h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: 0.6rem;
}

.updated {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Print */

@media print {
  body::before,
  .site-header,
  .to-top,
  .progress,
  .hero-actions,
  .myth-tabs,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  a {
    color: #111;
  }

  .toc {
    position: static;
    max-height: none;
  }
}
