:root {
  --home-teal: #004d40;
  --home-teal-light: #0092a4;
  --home-gold: #f5c842;
  --home-surface: #f7faf9;
  --home-text: #1a2e2a;
  --home-muted: #5f736e;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Roboto, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--home-text);
  background: var(--home-surface);
  line-height: 1.5;
}

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

a {
  color: var(--home-teal-light);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0.5rem 1.25rem;
  background: var(--home-teal);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-mark {
  color: var(--home-gold);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.65rem;
  border-radius: 8px;
  font-weight: 500;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.header-nav a[aria-current="page"],
.nav-dropdown.is-current .nav-dropdown-toggle {
  background: rgba(245, 200, 66, 0.22);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: #fff;
  background: transparent;
  border: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.65rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 0.4rem;
  border-radius: 12px;
  background: #00382e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  z-index: 22;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-menu a {
  white-space: nowrap;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.nav-backdrop {
  display: none;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch a {
  color: #fff;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch a[aria-current="page"] {
  background: var(--home-gold);
  color: #1a2e2a;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem 5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--home-teal) 0%, #00695c 45%, var(--home-teal-light) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(245, 200, 66, 0.18), transparent 30%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  max-width: calc(100% - 1rem);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero h1 {
  margin: 1.25rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-thumb {
  display: block;
  width: 100%;
  max-width: min(560px, 100%);
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.hero-compact {
  padding: 3rem 1.5rem 3.5rem;
}

.hero-subtitle {
  margin: 0 auto 1.25rem;
  max-width: 640px;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.hero-note {
  margin: 0 auto 2rem;
  max-width: 640px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero-cta-hint {
  margin: 0.85rem auto 0;
  max-width: 640px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--home-gold);
  color: #1a2e2a;
}

.btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}

.hero-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  font-size: 3rem;
  opacity: 0.14;
  animation: float 6s ease-in-out infinite;
}

.card-1 { top: 12%; left: 8%; }
.card-2 { top: 18%; right: 10%; animation-delay: 1s; color: #ff8a80; }
.card-3 { bottom: 18%; left: 14%; animation-delay: 2s; color: #ff8a80; }
.card-4 { bottom: 12%; right: 12%; animation-delay: 3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section h2 {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 1.75rem;
  color: var(--home-teal);
}

.section-subtitle {
  text-align: center;
  color: var(--home-muted);
  margin: 0 auto 2rem;
  max-width: 640px;
  line-height: 1.6;
}

.demo-section {
  max-width: 1100px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.feature-card {
  padding: 1.15rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 10px 30px rgba(0, 77, 64, 0.08);
  text-align: center;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.badge-card,
.title-row {
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.06);
}

.badge-card {
  padding: 1.15rem 1rem 1.25rem;
  border-radius: 16px;
  text-align: center;
}

.badge-card img,
.title-row img {
  width: 64px;
  height: 64px;
  display: block;
}

.badge-card img {
  margin: 0 auto 0.75rem;
}

.badge-card h3,
.title-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--home-teal);
}

.badge-card p,
.title-row p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.title-list {
  display: grid;
  gap: 0.75rem;
}

.title-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 14px;
}

.title-row .title-copy {
  min-width: 0;
}

.title-xp {
  font-weight: 700;
  color: var(--home-teal);
  white-space: nowrap;
  font-size: 0.9rem;
}

.xp-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.xp-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--home-teal);
}

.history-article {
  max-width: 760px;
}

.history-article h2 {
  text-align: left;
  margin-top: 2rem;
  font-size: 1.35rem;
}

.history-article h2:first-of-type {
  margin-top: 0;
}

.history-article p,
.history-article li {
  color: var(--home-muted);
  line-height: 1.75;
}

.history-article p {
  margin: 0 0 1rem;
}

.history-article ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.deck-switch-wrap {
  padding-bottom: 0;
}

.deck-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.deck-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.12);
  color: var(--home-teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.deck-switch a[aria-current="page"] {
  background: var(--home-teal);
  color: #fff;
  border-color: var(--home-teal);
}

.suit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.suit-card {
  padding: 1rem 0.75rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 6px 18px rgba(0, 77, 64, 0.05);
  text-align: center;
}

.suit-mark {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.suit-mark.is-red {
  color: #c62828;
}

.suit-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--home-teal);
}

.suit-card p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.high-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1.25rem 0 1.5rem;
}

.high-card {
  margin: 0;
  text-align: center;
}

.high-card img {
  display: block;
  width: 100%;
  max-width: 140px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 77, 64, 0.12);
  background: #fff;
}

.high-card figcaption {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--home-teal);
}

.community-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: #fff;
  border-left: 4px solid var(--home-teal-light);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.08);
}

.community-card p {
  margin: 0 0 0.75rem;
  line-height: 1.65;
}

.community-card p:last-child {
  margin-bottom: 0;
  color: var(--home-muted);
}

.rules-list {
  display: grid;
  gap: 0.75rem;
}

.rules-list details {
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 77, 64, 0.05);
}

.rules-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--home-teal);
  min-height: 44px;
  display: flex;
  align-items: center;
  list-style: none;
}

.rules-list summary::-webkit-details-marker {
  display: none;
}

.rules-list summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.25rem;
  color: var(--home-teal-light);
}

.rules-list details[open] summary::after {
  content: "–";
}

.rules-list details p,
.rules-list details ul,
.rules-list details ol {
  color: var(--home-muted);
  line-height: 1.7;
}

.rules-list ul,
.rules-list ol {
  padding-left: 1.2rem;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
}

.cta-band .btn-primary {
  min-width: 220px;
}

.site-footer {
  background: #0d2b26;
  color: rgba(255, 255, 255, 0.82);
  padding: 1.5rem;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: #fff;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .hero {
    padding: 3rem 1.25rem 4rem;
  }

  .hero-thumb {
    margin-bottom: 1.25rem;
  }

  .hero-compact {
    padding: 2.25rem 1.25rem 2.75rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .suit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .title-row {
    grid-template-columns: 52px 1fr;
  }

  .title-row img {
    width: 52px;
    height: 52px;
  }

  .title-xp {
    grid-column: 2;
  }
}

/* The full nav fits on one row from 961px; below that it moves into the drawer */
@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 18;
    background: rgba(13, 43, 38, 0.45);
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 19;
    width: min(320px, 88vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 5rem 1.25rem 1.5rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    background: var(--home-teal);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.22);
    transform: translateX(100%);
    transition: transform 0.2s ease, visibility 0.2s ease;
    visibility: hidden;
    pointer-events: none;
  }

  body.nav-open .header-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .header-nav a {
    width: 100%;
    padding: 0.7rem 0.85rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    display: none;
  }

  .nav-dropdown-menu,
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu,
  .nav-dropdown.is-open .nav-dropdown-menu {
    display: grid;
    position: static;
    min-width: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 480px) {
  .hero-thumb {
    margin-bottom: 1rem;
    border-radius: 10px;
  }

  .high-cards {
    gap: 0.3rem;
  }

  .high-card figcaption {
    font-size: 0.72rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cta-band {
    flex-direction: column;
  }

  .cta-band .btn {
    width: 100%;
  }

  .feature-grid,
  .badge-grid,
  .suit-grid {
    grid-template-columns: 1fr;
  }
}

.fact-figure {
  margin: 1.25rem 0 1.5rem;
  text-align: center;
}

.fact-figure img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.08);
}

.fact-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.fact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.fact-stat {
  padding: 1.25rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 6px 18px rgba(0, 77, 64, 0.05);
  text-align: center;
}

.fact-stat-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--home-teal);
}

.fact-stat p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.fact-sum {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.fact-sum-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.12);
  color: var(--home-teal);
  font-weight: 700;
}

.fact-sum-chip.is-gold {
  background: var(--home-gold);
  border-color: var(--home-gold);
  color: #1a2e2a;
}

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

@media (max-width: 480px) {
  .fact-stats,
  .suit-grid.suit-grid-3 {
    grid-template-columns: 1fr;
  }

  .fact-figure img {
    padding: 0.6rem;
  }

  .fact-sum-chip {
    width: 100%;
    justify-content: center;
  }
}

.btn-outline {
  color: var(--home-teal);
  border-color: var(--home-teal);
  background: #fff;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin: 1.5rem auto 0;
  max-width: 720px;
}

.share-label {
  margin: 0;
  font-weight: 700;
  color: var(--home-teal);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.share-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 77, 64, 0.16);
  background: #fff;
  color: var(--home-teal);
  font-weight: 700;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.share-btn:hover,
.share-btn:focus-visible {
  background: rgba(0, 77, 64, 0.06);
}

.hero .share-label {
  color: #fff;
}

.hero .share-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero .share-btn:hover,
.hero .share-btn:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.howto-list {
  display: grid;
  gap: 1rem;
}

.howto-step {
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.06);
}

.howto-step h3 {
  margin: 0 0 0.45rem;
  color: var(--home-teal);
  font-size: 1.15rem;
}

.howto-step p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.65;
}

.howto-step ol,
.howto-step ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  color: var(--home-muted);
}

.embed-snippet {
  display: block;
  width: 100%;
  min-height: 110px;
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 77, 64, 0.16);
  background: #fff;
  color: var(--home-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}

.embed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.embed-frame {
  margin: 0;
  padding: 0;
  background: var(--home-surface);
}

.embed-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 1rem;
}

.embed-page #mexico-demo {
  flex: 1;
}

.embed-cta {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

@media (max-width: 480px) {
  .demo-actions {
    flex-direction: column;
  }

  .demo-actions .btn,
  .embed-actions .btn {
    width: 100%;
  }

  .share-btn {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

.page-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.page-toc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.12);
  color: var(--home-teal);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.rules-article h2 {
  text-align: left;
  margin-top: 2.25rem;
  font-size: 1.4rem;
}

.rules-article h2:first-of-type {
  margin-top: 0;
}

.rules-article h3 {
  margin: 1.35rem 0 0.6rem;
  font-size: 1.12rem;
  color: var(--home-teal);
}

.rules-article p,
.rules-article li {
  color: var(--home-muted);
  line-height: 1.75;
}

.rules-article p {
  margin: 0 0 1rem;
}

.rules-article ul,
.rules-article ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.rules-callout {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  border-left: 4px solid var(--home-gold);
  box-shadow: 0 6px 18px rgba(0, 77, 64, 0.06);
}

.rules-callout p {
  margin: 0;
  color: var(--home-text);
}

.rules-figure {
  margin: 1.25rem 0 1.5rem;
  text-align: center;
}

.rules-figure img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.08);
  object-fit: contain;
}

.rules-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.score-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.score-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 77, 64, 0.06);
}

.score-table th,
.score-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 77, 64, 0.08);
  font-size: 0.95rem;
}

.score-table th {
  background: var(--home-teal);
  color: #fff;
  font-weight: 700;
}

.score-table td {
  color: var(--home-text);
}

.score-table tr:last-child td {
  border-bottom: 0;
}

.score-table .is-fall {
  color: #b71c1c;
  font-weight: 700;
}

.feature-stack {
  display: grid;
  gap: 2rem;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 1.15rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.08);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.06);
}

.feature-row:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.feature-row:nth-child(even) .feature-row-copy {
  order: -1;
}

.feature-row img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #f3f7f6;
  object-fit: contain;
}

.feature-row img.feature-phone {
  width: auto;
  max-width: min(320px, 100%);
  max-height: min(640px, 80vh);
  margin: 0 auto;
  background: #0d2b26;
}

.feature-row h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--home-teal);
}

.feature-row p {
  margin: 0 0 0.75rem;
  color: var(--home-muted);
  line-height: 1.65;
}

.feature-row p:last-child {
  margin-bottom: 0;
}

.feature-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.rules-more {
  text-align: center;
  margin: 1.25rem 0 0;
}

.rules-more a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .feature-row,
  .feature-row:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .feature-row:nth-child(even) .feature-row-copy {
    order: 0;
  }
}

@media (max-width: 600px) {
  .feature-row {
    padding: 0.9rem;
  }

  .score-table th,
  .score-table td {
    padding: 0.6rem 0.7rem;
    font-size: 0.88rem;
  }
}

.photo-credit {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.85;
}

.photo-credit a {
  color: inherit;
}

.vs-table {
  min-width: 600px;
}

.vs-table tbody th {
  background: #f3f7f6;
  color: var(--home-teal);
  font-weight: 700;
}

.vs-table tr:last-child th {
  border-bottom: 0;
}

.vs-article .feature-stack {
  margin-bottom: 1.5rem;
}

.vs-sources li {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.vs-disclaimer {
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .vs-table {
    min-width: 0;
  }

  .vs-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .vs-table,
  .vs-table tbody,
  .vs-table tr,
  .vs-table th,
  .vs-table td {
    display: block;
    width: 100%;
  }

  .vs-table tbody th {
    border-bottom: 0;
  }

  .vs-table td {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .vs-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--home-muted);
  }

  .vs-table tr:last-child td:last-child {
    border-bottom: 0;
  }

  .vs-table tr:last-child td {
    border-bottom: 1px solid rgba(0, 77, 64, 0.08);
  }
}

/* Ad placeholders — filled by js/ads.js only when a slot ID is configured */
.ad-slot {
  display: none;
}

.ad-slot.is-active {
  display: block;
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-slot__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-muted);
  margin-bottom: 0.35rem;
}

.ad-slot[data-ad="multiplex"],
.ad-slot[data-ad="home"] {
  max-width: 960px;
  padding: 0 1.5rem;
}

.ad-slot[data-ad="in-article"].is-active {
  min-height: 120px;
}

.ad-slot.is-active:has(ins[data-ad-status="unfilled"]) {
  display: none;
}

@media (max-width: 600px) {
  .ad-slot[data-ad="multiplex"],
  .ad-slot[data-ad="home"] {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .ad-slot.is-active {
    margin: 1.5rem auto;
  }
}

/* Contact page */
.contact-email {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 2.25rem;
  padding: 1.5rem 1.25rem;
  border-radius: 16px;
  background: #fff;
  border-left: 4px solid var(--home-gold);
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.08);
  text-align: center;
}

.contact-email p {
  margin: 0;
  color: var(--home-muted);
}

.contact-email .btn {
  font-size: 1.15rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.rules-callout.contact-operator {
  margin-top: 2rem;
}

@media (max-width: 480px) {
  .contact-email {
    padding: 1.25rem 1rem;
  }

  .contact-email .btn {
    width: 100%;
    font-size: 1.05rem;
  }
}

/* ------------------------------------------------------------------------
   Shop: shared pieces (nav link, live tables, starry night, home teaser)
   ------------------------------------------------------------------------ */

.nav-shop::before {
  content: "";
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.4rem;
  background: url(/assets/shop/peso.svg) center / contain no-repeat;
  flex-shrink: 0;
}

.gold-text {
  background: linear-gradient(92deg, #fff1b8 0%, #f5c842 45%, #e0a325 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.btn-light:hover,
.btn-light:focus-visible {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  transition: box-shadow 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 10px 26px rgba(245, 200, 66, 0.35);
}

/* Price in pesos with the coin from the game */
.price {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  color: #ffe08a;
  white-space: nowrap;
}

.price::before {
  content: "";
  width: 1.1em;
  height: 1.1em;
  background: url(/assets/shop/peso.svg) center / contain no-repeat;
  flex-shrink: 0;
}

.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(233, 238, 247, 0.92);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Live WebGL table (js/live-table.js): the poster shows until the first frame */
.live-table {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 180 / 160;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
}

@supports not (aspect-ratio: 1) {
  .live-table::before {
    content: "";
    display: block;
    padding-top: 88.89%;
  }
}

.live-table > img,
.live-table > canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  transition: opacity 0.45s ease;
}

.live-table > img {
  object-fit: contain;
}

/* The glow just outside the rail fades out before the canvas edge, so no box shows around the table */
.live-table > canvas,
.live-table > img {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 2.4%, #000 97.6%, transparent 100%), linear-gradient(180deg, transparent 0, #000 2.4%, #000 97.6%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 2.4%, #000 97.6%, transparent 100%), linear-gradient(180deg, transparent 0, #000 2.4%, #000 97.6%, transparent 100%);
  mask-composite: intersect;
}

.live-table > canvas {
  opacity: 0;
}

.live-table.is-live > canvas {
  opacity: 1;
}

.live-table.is-live > img {
  opacity: 0;
}

.live-table.is-switching > canvas {
  opacity: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a5f;
  box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.6);
  animation: livePulse 2s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.6); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(255, 90, 95, 0); }
}

/* Animated room backgrounds, ported from the game:
   front/roulette/src/app/components/room-backdrop/room-backdrop.component.css — keep in sync */
.backdrop-host {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.backdrop span {
  position: absolute;
}

/* Starry night — twinkling desert sky with a shooting star */
.backdrop-starry {
  background:
    radial-gradient(circle at 82% 14%, rgba(255, 244, 214, 0.16) 0%, rgba(255, 244, 214, 0.04) 8%, transparent 20%),
    linear-gradient(180deg, #050816 0%, #0b1330 50%, #1b1d3c 78%, #3a2238 100%);
}

.backdrop-starry .moon {
  left: 80.5%;
  top: 11%;
  width: 3%;
  height: 0;
  padding-top: 3%;
  border-radius: 50%;
  background: #fff4d6;
  box-shadow: 0 0 24px 6px rgba(255, 244, 214, 0.3);
}

.backdrop-starry .stars {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  animation: twinkle var(--duration) ease-in-out var(--delay) infinite alternate;
}

.backdrop-starry .stars-1 {
  --duration: 3s;
  --delay: 0s;
  background-image:
    radial-gradient(1.5px 1.5px at 43% 21%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 52% 8%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 11% 70%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 14% 48%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 76% 9%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 66% 29%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 6% 13%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 57% 55%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 10% 32%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 13% 72%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 56% 9%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 74% 17%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 30% 9%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 52%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 8% 30%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 7% 19%, #fff 50%, transparent 100%);
}

.backdrop-starry .stars-2 {
  --duration: 4.5s;
  --delay: -1.5s;
  background-image:
    radial-gradient(1.2px 1.2px at 39% 55%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 20% 71%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 17% 41%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 73% 25%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 15% 26%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 49% 14%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 72% 10%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 74% 9%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 81% 28%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 65% 70%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 56% 42%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 61% 60%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 48% 40%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 33% 25%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 91% 33%, #fff 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 12% 40%, #fff 50%, transparent 100%);
}

.backdrop-starry .stars-3 {
  --duration: 6s;
  --delay: -3s;
  background-image:
    radial-gradient(2px 2px at 69% 65%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 45% 59%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 38% 11%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 17% 67%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 55% 23%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 98% 45%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 21% 64%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 55% 7%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 87% 11%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 73% 42%, #fff 50%, transparent 100%);
}

@keyframes twinkle {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.25;
  }
}

.backdrop-starry .shooting-star {
  top: 10%;
  left: 18%;
  width: 16%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  opacity: 0;
  transform: rotate(18deg);
  animation: shootingStar 11s linear 3s infinite;
}

@keyframes shootingStar {
  0% {
    opacity: 0;
    transform: rotate(18deg) translate3d(0, 0, 0);
  }
  2% {
    opacity: 1;
  }
  7%,
  100% {
    opacity: 0;
    transform: rotate(18deg) translate3d(260%, 0, 0);
  }
}

.backdrop-starry .horizon {
  left: 0;
  right: 0;
  bottom: 0;
  height: 16%;
  background: #090a18;
  opacity: 0.9;
  clip-path: polygon(0 100%, 0 55%, 8% 50%, 12% 30%, 22% 30%, 25% 52%, 40% 60%, 52% 58%, 60% 40%, 63% 22%, 75% 22%, 78% 45%, 88% 55%, 100% 48%, 100% 100%);
}

.backdrop-host.compact .moon {
  box-shadow: 0 0 8px 2px rgba(255, 244, 214, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .backdrop span,
  .live-pill::before {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Home teaser: starry night, a live table and the way into the shop */
.shop-teaser {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #050816;
  scroll-margin-top: var(--header-h);
}

.shop-teaser .backdrop-host {
  z-index: -1;
}

.shop-teaser-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem;
  align-items: center;
}

.shop-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid rgba(245, 200, 66, 0.35);
  color: #ffe08a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-eyebrow::before {
  content: "";
  width: 1.1em;
  height: 1.1em;
  background: url(/assets/shop/peso.svg) center / contain no-repeat;
}

.shop-teaser h2 {
  margin: 1rem 0 1rem;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shop-teaser-copy > p {
  margin: 0 0 1.25rem;
  color: rgba(233, 238, 247, 0.84);
  font-size: 1.05rem;
  line-height: 1.7;
}

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.shop-teaser-stage {
  position: relative;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.shop-teaser-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 115%;
  padding-top: 115%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 146, 164, 0.28) 0%, rgba(245, 200, 66, 0.08) 38%, transparent 62%);
  pointer-events: none;
  z-index: -1;
}

.shop-teaser-stage .live-table {
  width: min(100%, 440px);
}

.shop-teaser-stage figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgba(233, 238, 247, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .shop-teaser-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3.5rem 1.5rem 4rem;
    text-align: center;
  }

  .shop-chips,
  .shop-actions {
    justify-content: center;
  }

  .shop-teaser-stage .live-table {
    width: min(78vw, 400px);
  }
}

@media (max-width: 600px) {
  .shop-teaser-inner {
    padding: 3rem 1rem 3.5rem;
  }
}

@media (max-width: 480px) {
  .shop-actions {
    flex-direction: column;
  }

  .shop-actions .btn {
    width: 100%;
  }
}
