/* ==========================================================================
   Ready to Deal — readytodealapp.com
   Plain CSS, no framework and no build step.

   Ground: the game's own tones. Bordeaux felt carries the page, gold frames
   and cream type sit on it, and the app's cream "paper" returns wherever the
   app's own screens are shown. Every colour is one of the official tokens
   below, or a transparency of one.

   Contents
     01  Fonts & tokens          09  Hand (sticky story)
     02  Reset & base            10  Tables (deck + stage)
     03  Type primitives         11  The app (sticky phone)
     04  Buttons & stores        12  Try a drill (game)
     05  Header & menu           13  Schools
     06  Hero                    14  Gallery, numbers, get the app
     07  Marquee                 15  Footer & mobile CTA
     08  Manifesto               16  Motion states & reduced motion
                                 17  Responsive
   ========================================================================== */

/* ------------------------------------------------------------------ 01 */
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand — crimson & bordeaux */
  --crimson: #dc143c;
  --crimson-dark: #a50f2d;
  --bordeaux: #6e0a1e;
  --felt: #5a0a1e;
  --bordeaux-deep: #3b0512;
  --night: #24030a; /* bordeaux-deep, one step darker: edges and the footer */

  /* Brand — gold & cream */
  --gold: #d8b45a;
  --gold-alt: #c9a24a;
  --cream: #f1e2bc;
  --cream-deep: #eec996;
  --on-gold: #2a2008;

  /* The app's warm "paper" */
  --paper: #f7f1e8;
  --paper-alt: #f0ebdf;
  --paper-warm: #efe4d4;
  --ink: #1b1412;
  --ink-2: #4a3c36;
  --ink-3: #6a5a50;
  --gold-ink: #7a5200;

  /* Roulette colours, for the drill */
  --wheel-red: #c8102e;
  --wheel-black: #15191e;
  --wheel-green: #0e7a3b;
  --correct: #2ecc71;
  --wrong: #ff4438;

  /* Transparencies */
  --gold-12: rgba(216, 180, 90, 0.12);
  --gold-25: rgba(216, 180, 90, 0.25);
  --gold-45: rgba(216, 180, 90, 0.45);
  --cream-70: rgba(241, 226, 188, 0.72);
  --cream-50: rgba(241, 226, 188, 0.5);
  --cream-15: rgba(241, 226, 188, 0.15);

  --gold-text: linear-gradient(180deg, #f1e2bc 0%, #d8b45a 46%, #c9a24a 100%);
  --gold-fill: linear-gradient(180deg, #eec996 0%, #d8b45a 55%, #c9a24a 100%);

  /* Layout */
  --max: 80rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --header-h: 76px;
  --sheet: clamp(28px, 4.5vw, 64px);

  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Montserrat", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  background: var(--bordeaux-deep);
}
/* Lenis drives the scroll itself. */
html.lenis,
html.lenis body {
  height: auto;
  scroll-behavior: auto;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--cream);
  background: var(--bordeaux-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* A grain over everything: the felt. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Blending a full-screen layer over video is work a phone should not be given. */
@media (hover: none), (max-width: 900px) {
  body::before {
    display: none;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--gold);
  color: var(--on-gold);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--gold-fill);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ------------------------------------------------------------------ 03 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-center {
  justify-content: center;
}
.spark {
  width: 0.72em;
  height: 0.72em;
  flex: none;
  fill: currentColor;
}

.gold {
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Keeps descenders and the italic overhang inside the painted box. */
  padding-bottom: 0.08em;
}
.ink-red {
  color: var(--crimson-dark);
}

.section-head {
  max-width: 62rem;
}
.section-title {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.section-title-ink {
  color: var(--bordeaux);
}
.section-lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.02rem, 1.25vw, 1.2rem);
  color: var(--cream-70);
}
.section-lead-ink {
  color: var(--ink-2);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* ------------------------------------------------------------------ 04 */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: box-shadow 0.3s var(--ease), background-color 0.3s, color 0.3s, filter 0.3s;
  will-change: transform;
}
.button-small {
  min-height: 42px;
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
}
.button-gold {
  background: var(--gold-fill);
  color: var(--on-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 24px -10px rgba(216, 180, 90, 0.7);
}
.button-gold:hover {
  filter: brightness(1.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 16px 34px -10px rgba(216, 180, 90, 0.85);
}
.button-bordeaux {
  background: linear-gradient(180deg, var(--bordeaux), var(--felt));
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--gold-45), 0 14px 30px -14px rgba(59, 5, 18, 0.8);
}
.button-bordeaux:hover {
  box-shadow: inset 0 0 0 1.5px var(--gold), 0 18px 36px -14px rgba(59, 5, 18, 0.9);
}
.button .icon {
  transition: transform 0.35s var(--ease);
}
.button:hover .icon {
  transform: translateX(4px);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 190px;
  min-height: 62px;
  padding: 0.6rem 1.7rem 0.7rem;
  border-radius: 18px;
  text-align: left;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(110, 10, 30, 0.92), rgba(59, 5, 18, 0.92));
  box-shadow: inset 0 0 0 1.5px var(--gold-45), inset 0 1px 0 rgba(241, 226, 188, 0.22), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.35s var(--ease), background 0.35s, color 0.35s;
  will-change: transform;
}
.store-small {
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-70);
  transition: color 0.35s;
}
.store-big {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.42rem;
  line-height: 1.15;
}
.store:hover {
  color: var(--on-gold);
  background: var(--gold-fill);
  box-shadow: inset 0 0 0 1.5px var(--cream), 0 22px 44px -16px rgba(216, 180, 90, 0.6);
}
.store:hover .store-small {
  color: rgba(42, 32, 8, 0.75);
}

/* Play / pause on anything that moves on its own. */
.media-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--cream);
  background: rgba(36, 3, 10, 0.62);
  box-shadow: inset 0 0 0 1px var(--gold-45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0.75;
  transition: opacity 0.25s, background-color 0.25s;
}
.media-toggle:hover,
.media-toggle:focus-visible {
  opacity: 1;
  background: rgba(110, 10, 30, 0.9);
}
.media-toggle svg {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.media-toggle .icon-play,
.media-toggle.is-paused .icon-pause {
  display: none;
}
.media-toggle.is-paused .icon-play {
  display: block;
}

/* ------------------------------------------------------------------ 05 */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: transform 0.5s var(--ease), background-color 0.4s, box-shadow 0.4s;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(47, 4, 14, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 -1px 0 var(--gold-25);
  opacity: 0;
  transition: opacity 0.4s;
}
.site-header.is-scrolled::before {
  opacity: 1;
}
.site-header.is-hidden {
  transform: translateY(-105%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 22%;
  box-shadow: 0 0 0 1.5px var(--gold-45), 0 8px 18px -8px rgba(0, 0, 0, 0.7);
}
.brand-word {
  width: auto;
  height: 30px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.4rem);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.1vw, 2.1rem);
}
.nav-links a {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream-70);
  transition: color 0.25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-current {
  color: var(--cream);
}
.nav-links a:hover::after,
.nav-links a.is-current::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--gold-45);
  background: rgba(59, 5, 18, 0.6);
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--cream);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) {
  top: 18px;
}
.nav-toggle span:nth-child(2) {
  top: 26px;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 22px;
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ 06 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(1.5rem, 6vh, 4.5rem));
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 46% at 50% 4%, rgba(220, 20, 60, 0.3), transparent 70%),
    radial-gradient(120% 80% at 50% 0%, var(--bordeaux) 0%, var(--felt) 34%, var(--bordeaux-deep) 72%);
}
/* The table: a wide band along the bottom, rising out of the felt. */
.hero-media {
  position: absolute;
  inset: auto 0 0 0;
  z-index: -2;
  height: min(41.7vw, 82svh);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 30%, #000 56%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 30%, #000 56%);
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
/* A bordeaux scrim: the words sit on the game's own colour, and the table comes clear below them. */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(36, 3, 10, 0) 78%, rgba(36, 3, 10, 0.6) 100%),
    radial-gradient(58% 34% at 50% 66%, rgba(59, 5, 18, 0.82), rgba(59, 5, 18, 0) 100%),
    linear-gradient(to bottom, rgba(90, 10, 30, 0) 0%, rgba(59, 5, 18, 0.55) 48%, rgba(59, 5, 18, 0.5) 70%, rgba(59, 5, 18, 0) 90%);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-title {
  margin-top: clamp(0.9rem, 2vh, 1.5rem);
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(3.3rem, 9.6vw, 9.6rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-shadow: 0 18px 50px rgba(36, 3, 10, 0.55);
}
.hero-title .line {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.06em 0.12em;
  margin-bottom: -0.1em;
}
.hero-title .line > span {
  display: inline-block;
}
.hero-title .gold {
  font-style: italic;
  padding-right: 0.08em;
  text-shadow: none;
  filter: drop-shadow(0 16px 30px rgba(36, 3, 10, 0.6));
}
.hero-lead {
  max-width: 39rem;
  margin-top: clamp(1rem, 2.6vh, 1.8rem);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--cream);
  text-shadow: 0 2px 18px rgba(36, 3, 10, 0.9);
}
.hero .store-row {
  margin-top: clamp(1.3rem, 3.4vh, 2.3rem);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.4rem;
  margin-top: clamp(1rem, 2.4vh, 1.6rem);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(36, 3, 10, 0.95);
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
}
.hero-facts li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}
.hero-toggle {
  right: var(--gutter);
  bottom: 22px;
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(-50%);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(36, 3, 10, 0.9);
}
/* A chip that keeps turning, like the cue to spin. */
.scroll-cue-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--crimson) 0 42%, transparent 43%),
    repeating-conic-gradient(var(--cream) 0 22.5deg, var(--crimson) 22.5deg 45deg);
  box-shadow: 0 0 0 1.5px var(--gold), 0 10px 22px -8px rgba(0, 0, 0, 0.8);
  animation: chip-turn 6s linear infinite;
}
@keyframes chip-turn {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------ 07 */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(1rem, 2.2vw, 1.7rem) 0;
  background: linear-gradient(180deg, var(--bordeaux), var(--felt));
  box-shadow: inset 0 1px 0 var(--gold-45), inset 0 -1px 0 var(--gold-45);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.8rem);
  width: max-content;
  padding-right: clamp(1.4rem, 3vw, 2.8rem);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.2vw, 3.6rem);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--cream);
  will-change: transform;
}
.marquee-track .spark {
  width: 0.36em;
  height: 0.36em;
  fill: var(--gold);
}
.marquee-track span:nth-of-type(even) {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--gold);
}

/* ------------------------------------------------------------------ 08 */
.manifesto {
  position: relative;
  padding: clamp(6rem, 17vh, 12rem) 0 clamp(6rem, 18vh, 13rem);
  background:
    radial-gradient(50% 60% at 85% 20%, rgba(220, 20, 60, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bordeaux-deep), var(--night));
}
.manifesto-text {
  max-width: 21em;
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 4.1rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.manifesto-text em {
  font-style: italic;
  color: var(--gold);
}
.manifesto-text .word {
  display: inline-block;
  opacity: 0.16;
  will-change: opacity;
}

/* ------------------------------------------------------------------ 09 */
.hand {
  position: relative;
  background: linear-gradient(180deg, var(--night), var(--bordeaux-deep) 50%, var(--night));
}
.hand-sticky {
  padding: clamp(4rem, 10vh, 7rem) 0;
  background: radial-gradient(50% 56% at 68% 50%, rgba(110, 10, 30, 0.95), rgba(110, 10, 30, 0) 76%);
}
.hand-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.66fr) minmax(0, 1.5fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hand-title {
  margin-top: 1rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.5rem, 5.2vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.015em;
}
.hand-title .gold {
  font-style: italic;
}

.steps {
  position: relative;
  display: grid;
  gap: 1.6rem;
  margin-top: clamp(1.6rem, 4vh, 2.8rem);
}
.step {
  position: relative;
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
}
.step h3 {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.7vw, 2.5rem);
  line-height: 1.1;
  color: var(--cream);
}
.step p {
  max-width: 27rem;
  margin-top: 0.7rem;
  color: var(--cream-70);
}

.step-rail {
  display: none;
  gap: 8px;
  margin-top: 2rem;
}
.step-rail span {
  position: relative;
  flex: 1;
  max-width: 64px;
  height: 3px;
  border-radius: 3px;
  background: var(--cream-15);
  overflow: hidden;
}
.step-rail i {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.step-rail-light span {
  background: rgba(110, 10, 30, 0.16);
}
.step-rail-light i {
  background: var(--crimson-dark);
}

.stage-note {
  margin-top: 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: var(--cream-50);
}

/* Devices -------------------------------------------------------------- */
.device {
  position: relative;
  margin: 0;
  background: linear-gradient(145deg, #2c1a12, #0d0607 60%);
  box-shadow:
    0 0 0 1.5px var(--gold-45),
    inset 0 0 0 1.5px rgba(241, 226, 188, 0.12),
    0 50px 90px -30px rgba(0, 0, 0, 0.85),
    0 20px 40px -20px rgba(36, 3, 10, 0.9);
}
.device-screen {
  position: relative;
  overflow: hidden;
  background: var(--night);
}
.device-screen > img,
.device-screen > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.device-landscape {
  padding: clamp(6px, 0.8vw, 11px);
  border-radius: clamp(20px, 2.9vw, 40px);
}
.device-landscape .device-screen {
  aspect-ratio: 1280 / 590;
  border-radius: clamp(15px, 2.2vw, 30px);
}
.device-portrait {
  width: 100%;
  padding: 8px;
  border-radius: 13.5% / 6.2%;
}
.device-portrait .device-screen {
  aspect-ratio: 390 / 844;
  border-radius: 11.5% / 5.3%;
}

/* Stacked media: one shows at a time. */
[data-step-media] {
  opacity: 0;
  transition: opacity 0.6s var(--ease-in-out), transform 0.9s var(--ease);
  transform: scale(1.04);
}
[data-step-media].is-active {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ 10 */
.tables {
  position: relative;
  padding: clamp(5rem, 13vh, 9rem) 0 calc(clamp(5rem, 13vh, 9rem) + var(--sheet));
  background:
    radial-gradient(55% 40% at 12% 0%, rgba(220, 20, 60, 0.16), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--bordeaux-deep) 22%, var(--felt) 100%);
}

.deck {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.5rem, 1.3vw, 1.1rem);
  margin-top: clamp(2.4rem, 6vh, 4rem);
  padding: 1.4rem 0 1.6rem;
}
.deck-card {
  position: relative;
  flex: none;
  height: clamp(132px, 15.5vw, 218px);
  border-radius: 14%;
  filter: saturate(0.7) brightness(0.62);
  transform: translateY(10px);
  transition: transform 0.6s var(--ease), filter 0.5s;
}
.deck-card img {
  width: auto;
  height: 100%;
  pointer-events: none;
}
.deck-card:hover {
  filter: saturate(0.95) brightness(0.9);
  transform: translateY(0);
}
.deck-card.is-active {
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(216, 180, 90, 0.38));
  transform: translateY(-12px) scale(1.06);
}
/* The time left before the next table, under the active card. */
.deck-card::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -14px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
  transform: scaleX(var(--left, 0));
  transform-origin: 0 50%;
  opacity: 0;
}
.deck-card.is-active::after {
  opacity: 1;
}

.felt-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.8rem, 4vw, 4rem);
  margin-top: clamp(1.4rem, 3vh, 2.4rem);
}
/* With scripts the panels share one place (so the page never jumps when the table changes); without, they follow
   one another. */
.table-panels {
  position: relative;
  display: grid;
  gap: 3rem;
}
.js .table-panels {
  gap: 0;
}
.js .table-panel {
  grid-area: 1 / 1;
}
.js .table-panel:not(.is-active) {
  visibility: hidden;
}
.panel-count {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-70);
}
.panel-count b {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0;
  color: var(--gold);
  margin-right: 0.2em;
}
.table-panel h3 {
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.3rem, 4.4vw, 4rem);
  line-height: 1.02;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.1em;
}
.panel-lead {
  margin-top: 0.7rem;
  color: var(--cream-70);
}
.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.mode {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 36px;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--cream-70);
  box-shadow: inset 0 0 0 1px var(--cream-15);
}
button.mode {
  color: var(--cream);
  box-shadow: inset 0 0 0 1px var(--gold-45);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
button.mode::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
}
button.mode:hover {
  background: var(--gold-12);
  box-shadow: inset 0 0 0 1px var(--gold);
}
button.mode.is-active {
  color: var(--on-gold);
  background: var(--gold-fill);
  box-shadow: none;
}

/* ------------------------------------------------------------------ 11 */
/* A sheet of the app's paper, laid over the felt. */
.pocket,
.schools {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--sheet) * -1);
  border-radius: var(--sheet) var(--sheet) 0 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(238, 201, 150, 0.34) 0%, rgba(247, 241, 232, 0) 18%, rgba(241, 226, 188, 0.5) 46%, rgba(247, 241, 232, 0) 70%, rgba(238, 201, 150, 0.3) 100%),
    linear-gradient(180deg, var(--paper), var(--paper-warm));
  box-shadow: 0 -30px 60px -30px rgba(36, 3, 10, 0.6);
}
.pocket .eyebrow,
.schools .eyebrow {
  color: var(--gold-ink);
}
.pocket-sticky {
  padding: clamp(4.5rem, 11vh, 8rem) 0;
}
.pocket-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.pocket-phone {
  justify-self: center;
  width: clamp(220px, 23vw, 318px);
  perspective: 1400px;
}
.pocket-phone .device {
  box-shadow:
    0 0 0 1.5px rgba(122, 82, 0, 0.5),
    0 60px 80px -34px rgba(59, 5, 18, 0.55),
    0 24px 40px -20px rgba(59, 5, 18, 0.45);
}
.steps-light {
  margin-top: 0;
  gap: 3rem;
}
.steps-light .step h2 {
  margin-top: 1rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.5vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.015em;
  color: var(--bordeaux);
}
.steps-light .step p:not(.eyebrow) {
  max-width: 29rem;
  margin-top: 1.2rem;
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ 12 */
.play {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--sheet) * -1);
  padding: calc(clamp(5rem, 13vh, 9rem)) 0 calc(clamp(5rem, 13vh, 9rem) + var(--sheet));
  border-radius: var(--sheet) var(--sheet) 0 0;
  background:
    radial-gradient(50% 55% at 78% 46%, rgba(220, 20, 60, 0.2), transparent 72%),
    linear-gradient(180deg, var(--felt) 0%, var(--bordeaux-deep) 60%, var(--night) 100%);
  box-shadow: 0 -30px 60px -30px rgba(36, 3, 10, 0.5);
}
.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.play .section-title .gold {
  font-style: italic;
}
.odds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
.odds div {
  min-width: 108px;
  padding: 0.8rem 1.1rem 0.9rem;
  border-radius: 18px;
  background: rgba(36, 3, 10, 0.45);
  box-shadow: inset 0 0 0 1px var(--gold-25);
}
.odds dt {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-70);
}
.odds dd {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--gold);
}
.odds .odds-advanced {
  opacity: 0.4;
  transition: opacity 0.4s;
}
.play[data-level="advanced"] .odds .odds-advanced {
  opacity: 1;
}
.odds dd::before {
  content: "× ";
  font-size: 0.55em;
  font-weight: 600;
  color: var(--cream-50);
}
.play-foot {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--cream-50);
}

/* The drill itself, drawn like the app draws it: paper, a bordeaux board, cream keys. */
.game {
  position: relative;
  width: 100%;
  max-width: 460px;
  justify-self: center;
  padding: clamp(0.9rem, 2vw, 1.3rem);
  border-radius: 34px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-warm));
  box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 7px rgba(36, 3, 10, 0.55), 0 0 0 8.5px var(--gold-45), 0 60px 90px -30px rgba(0, 0, 0, 0.8);
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.game-level {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(110, 10, 30, 0.09);
}
.chip-toggle {
  min-height: 34px;
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
  transition: background-color 0.3s, color 0.3s;
}
.chip-toggle.is-active {
  color: var(--cream);
  background: var(--bordeaux);
}
.game-score {
  display: flex;
  gap: 0.9rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.game-score b {
  font-size: 0.95rem;
  color: var(--bordeaux);
}
.game-board {
  position: relative;
  margin-top: 0.8rem;
  padding: 1rem 0.9rem 0;
  border-radius: 22px;
  overflow: hidden;
  text-align: center;
  color: var(--cream);
  background: radial-gradient(90% 80% at 50% 35%, var(--bordeaux), var(--felt) 60%, var(--bordeaux-deep));
  box-shadow: inset 0 0 0 1.5px var(--gold-45), inset 0 14px 30px -18px rgba(0, 0, 0, 0.6);
}
.game-question {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.2;
}
.game-sub {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
.game-layout {
  margin: 0.7rem auto 0;
  max-width: 400px;
}
.game-layout svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.game-timer {
  height: 5px;
  margin: 0.8rem -0.9rem 0;
  background: rgba(36, 3, 10, 0.6);
}
.game-timer span {
  display: block;
  height: 100%;
  background: var(--gold-fill);
  transform-origin: 0 50%;
}
.game-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.7rem;
  padding: 0.45rem 1rem 0.5rem;
  border-radius: 16px;
  background: rgba(238, 201, 150, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(122, 82, 0, 0.35);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.game-answer-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.game-answer-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.game-answer.is-correct {
  background: rgba(46, 204, 113, 0.16);
  box-shadow: inset 0 0 0 2px var(--correct);
}
.game-answer.is-wrong {
  background: rgba(255, 68, 56, 0.13);
  box-shadow: inset 0 0 0 2px var(--wrong);
}
.game-feedback {
  min-height: 2.7em;
  margin-top: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--ink-2);
}
.game-feedback b {
  color: var(--bordeaux);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 0.4rem;
}
.keypad button {
  min-height: 48px;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff9ee;
  box-shadow: inset 0 0 0 1px rgba(122, 82, 0, 0.22), 0 4px 0 -1px rgba(122, 82, 0, 0.18), 0 8px 14px -8px rgba(59, 5, 18, 0.35);
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.2s;
  touch-action: manipulation;
}
.keypad button:hover {
  background: #fff;
}
.keypad button:active,
.keypad button.is-down {
  transform: translateY(3px);
  box-shadow: inset 0 0 0 1px rgba(122, 82, 0, 0.3), 0 1px 0 -1px rgba(122, 82, 0, 0.18);
}
.keypad [data-key="back"] {
  background: var(--paper-warm);
}
.keypad .key-ok {
  color: var(--cream);
  background: linear-gradient(180deg, var(--bordeaux), var(--felt));
  box-shadow: inset 0 0 0 1px rgba(59, 5, 18, 0.5), 0 4px 0 -1px var(--bordeaux-deep), 0 8px 14px -8px rgba(59, 5, 18, 0.6);
}
.keypad .key-ok:hover {
  background: linear-gradient(180deg, var(--crimson-dark), var(--bordeaux));
}
.game.is-locked .keypad {
  opacity: 0.32;
  pointer-events: none;
}
/* Once a number is settled the pad dims and the way on sits over it: the card keeps its size. */
.keypad-wrap {
  position: relative;
  margin-top: 0.4rem;
}
.keypad-wrap .keypad {
  margin-top: 0;
}
.game-next {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 62%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 18px 34px -10px rgba(59, 5, 18, 0.55);
}
.game-next[hidden] {
  display: none;
}

/* The layout fragment (SVG) */
.cell-red {
  fill: var(--wheel-red);
}
.cell-black {
  fill: var(--wheel-black);
}
.cell-line {
  fill: none;
  stroke: var(--cream);
  stroke-width: 1.6;
  stroke-opacity: 0.85;
}
.cell-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
}
.cell-win {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.5;
}
.chip-face {
  fill: #2f55c9; /* a colour chip, as on the table: never mistaken for a red number */
  stroke: #fff;
  stroke-width: 1.3;
}
.chip-edge {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 3.4 4.2;
}
.chip-count {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
}
.chip {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* ------------------------------------------------------------------ 13 */
.schools {
  z-index: 4;
  padding: clamp(5rem, 13vh, 9rem) 0 calc(clamp(5rem, 13vh, 9rem) + var(--sheet));
}
.schools .section-title {
  font-size: clamp(2.3rem, 4.7vw, 4.3rem);
}
.schools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.school-steps {
  display: grid;
  gap: 1.3rem;
  margin: 2.2rem 0 2.4rem;
}
.school-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
}
.school-steps li > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--cream);
  background: linear-gradient(180deg, var(--bordeaux), var(--felt));
  box-shadow: 0 0 0 1.5px var(--gold), 0 10px 18px -10px rgba(59, 5, 18, 0.7);
}
.school-steps h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.2;
  color: var(--bordeaux);
}
.school-steps p {
  max-width: 30rem;
  margin-top: 0.25rem;
  color: var(--ink-2);
}
.schools-phones {
  position: relative;
  justify-self: center;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1.08;
  perspective: 1400px;
}
.schools-phones .device {
  position: absolute;
  width: 49%;
  box-shadow:
    0 0 0 1.5px rgba(122, 82, 0, 0.5),
    0 60px 80px -34px rgba(59, 5, 18, 0.55),
    0 24px 40px -20px rgba(59, 5, 18, 0.45);
}
.device-back {
  top: 0;
  left: 4%;
  transform: rotate(-7deg);
}
.device-front {
  right: 4%;
  bottom: 0;
  transform: rotate(5deg);
}

/* ------------------------------------------------------------------ 14 */
.numbers {
  position: relative;
  z-index: 5;
  margin-top: calc(var(--sheet) * -1);
  padding: clamp(4.5rem, 11vh, 7.5rem) 0 clamp(3rem, 8vh, 5rem);
  border-radius: var(--sheet) var(--sheet) 0 0;
  background: linear-gradient(180deg, var(--felt), var(--bordeaux-deep));
  box-shadow: 0 -30px 60px -30px rgba(36, 3, 10, 0.5);
}
.gallery {
  overflow: hidden;
  margin-bottom: clamp(3.5rem, 9vh, 6rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.gallery-track {
  display: flex;
  gap: clamp(0.9rem, 1.8vw, 1.5rem);
  width: max-content;
  padding: 1.5rem clamp(0.9rem, 1.8vw, 1.5rem) 2.2rem 0;
  will-change: transform;
}
.gallery-track figure {
  flex: none;
  width: clamp(150px, 15.5vw, 212px);
  border-radius: 13% / 6%;
  overflow: hidden;
  background: var(--night);
  box-shadow: 0 0 0 1.5px var(--gold-45), 0 0 0 6px rgba(13, 6, 7, 0.9), 0 0 0 7px var(--gold-25), 0 34px 40px -24px rgba(0, 0, 0, 0.8);
}
.gallery-track figure:nth-child(even) {
  transform: translateY(18px);
}
.gallery-track img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  text-align: center;
}
.numbers-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.numbers-grid b {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(3.2rem, 8.2vw, 7.4rem);
  line-height: 1;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: lining-nums tabular-nums;
}
.numbers-grid span {
  margin-top: 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-70);
}

.get {
  position: relative;
  z-index: 5;
  overflow: hidden;
  padding: clamp(5rem, 14vh, 10rem) 0 clamp(5rem, 13vh, 9rem);
  text-align: center;
  background: linear-gradient(180deg, var(--bordeaux-deep), var(--night));
}
.get-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(220, 20, 60, 0.42) 0%, rgba(110, 10, 30, 0.5) 34%, transparent 66%);
  pointer-events: none;
}
.get-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.get-mark {
  width: 112px;
  height: 112px;
  border-radius: 22%;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 9px rgba(36, 3, 10, 0.5), 0 0 0 10.5px var(--gold-45), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.get-title {
  margin-top: 2rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.8rem, 8.4vw, 7.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.get-title .gold {
  font-style: italic;
}
.get-lead {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--cream-70);
}
.get-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.6rem 2.4rem;
  margin-top: 2.4rem;
}
.qr {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.2rem 0.7rem 0.7rem;
  border-radius: 22px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  line-height: 1.5;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px var(--gold-25);
  background: rgba(36, 3, 10, 0.4);
}
.qr img {
  width: 96px;
  height: 96px;
  padding: 7px;
  border-radius: 14px;
  background: var(--paper);
}
.qr span {
  max-width: 7em;
}
.get-note {
  max-width: 34rem;
  margin-top: 2.2rem;
  font-size: 0.86rem;
  color: var(--cream-50);
}

/* ------------------------------------------------------------------ 15 */
.site-footer {
  position: relative;
  z-index: 5;
  padding: clamp(3rem, 8vh, 5rem) 0 2rem;
  background: var(--night);
  box-shadow: inset 0 1px 0 var(--gold-25);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 6vw, 6rem);
}
.footer-brand p {
  max-width: 28rem;
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--cream-70);
}
.footer-brand .disclaimer {
  font-size: 0.8rem;
  color: var(--cream-50);
}
.footer-links {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 1.5rem;
}
.footer-links h3 {
  margin-bottom: 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-links a {
  display: block;
  width: fit-content;
  padding: 0.3rem 0;
  font-size: 0.92rem;
  color: var(--cream-70);
  transition: color 0.25s;
}
.footer-links a:hover {
  color: var(--cream);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: clamp(2rem, 6vh, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--cream-15);
  font-size: 0.8rem;
  color: var(--cream-50);
}
.footer-bottom a:hover {
  color: var(--cream);
}

.mobile-cta {
  display: none;
}

/* ------------------------------------------------------------------ 16 */
/* With scripts: the sticky stories, and the start states the animations leave from.
   Without scripts none of this applies and the page reads top to bottom. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}
.js [data-intro] {
  opacity: 0;
}
.js [data-intro-line] {
  transform: translateY(115%);
}
.js .hero-media {
  opacity: 0;
}
.js [data-lines] .l {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.js [data-lines] .l > span {
  display: inline-block;
  transform: translateY(112%);
}

/* Each step carries its own picture (site.js builds them) wherever the stories are not pinned. */
.has-figures .hand-stage,
.has-figures .pocket-phone {
  display: none;
}
.has-figures .hand-grid,
.has-figures .pocket-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}
.step-figure {
  margin-top: 1.4rem;
}
.step-figure.device-portrait {
  width: min(64vw, 280px);
}
.step-figure .device-screen > img,
.step-figure .device-screen > video {
  opacity: 1;
  transform: none;
}

@media (min-width: 901px) {
  .sticky-stories .has-figures .hand-stage,
  .sticky-stories .has-figures .pocket-phone {
    display: block;
  }
  .sticky-stories .has-figures .hand-grid {
    grid-template-columns: minmax(0, 0.66fr) minmax(0, 1.5fr);
    max-width: calc(var(--max) + var(--gutter) * 2);
  }
  .sticky-stories .has-figures .pocket-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: calc(var(--max) + var(--gutter) * 2);
  }
  .sticky-stories .step-figure {
    display: none;
  }
  .sticky-stories .hand[data-stepper] {
    height: 430vh;
  }
  .sticky-stories .pocket[data-stepper] {
    height: 430vh;
  }
  .sticky-stories [data-stepper] .hand-sticky,
  .sticky-stories [data-stepper] .pocket-sticky {
    position: sticky;
    top: 0;
    display: grid;
    align-items: center;
    height: 100vh;
    height: 100svh;
    padding: var(--header-h) 0 1.5rem;
    overflow: clip;
  }
  .sticky-stories [data-stepper] .steps {
    display: grid;
    gap: 0;
  }
  .sticky-stories [data-stepper] .step {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(34px);
    transition: opacity 0.5s var(--ease-in-out), transform 0.7s var(--ease), visibility 0s 0.5s;
  }
  .sticky-stories [data-stepper] .step.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.6s var(--ease-in-out) 0.12s, transform 0.8s var(--ease) 0.12s, visibility 0s;
  }
  .sticky-stories [data-stepper] .step.is-past {
    transform: translateY(-34px);
  }
  .sticky-stories [data-stepper] .step-rail {
    display: flex;
  }
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-cue-chip {
    animation: none;
  }
  /* Gentle motion: they still fade in (site.js), without moving. */
  .js [data-reveal],
  .js [data-intro],
  .js .hero-media {
    transform: none;
  }
  .js [data-intro-line],
  .js [data-lines] .l > span {
    transform: none;
  }
  .manifesto-text .word {
    opacity: 1;
  }
  [data-step-media],
  .sticky-stories [data-stepper] .step,
  .sticky-stories [data-stepper] .step.is-past,
  .deck-card,
  .deck-card.is-active,
  .deck-card:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------------ 17 */
/* Large screens: the whole page grows a step, so it does not sit small in the middle. */
@media (min-width: 1700px) {
  html {
    font-size: 112.5%;
  }
}
@media (min-width: 2300px) {
  html {
    font-size: 131.25%;
  }
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 1.1rem;
  }
  .nav-links a {
    font-size: 0.84rem;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 66px;
  }

  /* Menu */
  .nav-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    padding: calc(var(--header-h) + 1rem) var(--gutter) 2.5rem;
    background:
      radial-gradient(80% 50% at 50% 0%, rgba(220, 20, 60, 0.28), transparent 70%),
      linear-gradient(180deg, var(--bordeaux), var(--bordeaux-deep) 60%, var(--night));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-in-out), visibility 0s 0.4s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s var(--ease-in-out), visibility 0s;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.4rem;
  }
  .nav-links a {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    color: var(--cream);
  }
  .nav-links li {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  }
  .nav.is-open .nav-links li {
    opacity: 1;
    transform: none;
    transition-delay: calc(0.06s * var(--i, 0) + 0.1s);
  }
  .nav-cta {
    min-height: 54px;
    padding-inline: 2.2rem;
    font-size: 1rem;
  }
  .brand,
  .nav-toggle {
    position: relative;
    z-index: 2;
  }
  body.menu-open {
    overflow: hidden;
  }

  /* Hero: the wheel fills the lower half. */
  .hero-media {
    height: 50svh;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.55) 34%, #000 62%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.55) 34%, #000 62%);
  }
  .hero-video {
    object-position: 74% 100%;
  }
  .hero-toggle {
    bottom: 16px;
  }
  .scroll-cue {
    display: none;
  }

  .hand-grid,
  .felt-stage,
  .pocket-grid,
  .play-grid,
  .schools-grid,
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps,
  .steps-light {
    gap: 3.2rem;
  }
  .step-figure.device-portrait {
    margin-inline: auto;
  }
  .steps-light .step {
    text-align: center;
  }
  .steps-light .step p:not(.eyebrow) {
    margin-inline: auto;
  }
  .steps-light .step-figure {
    margin-top: 2rem;
  }

  .deck {
    justify-content: flex-start;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .deck::-webkit-scrollbar {
    display: none;
  }
  .deck-card {
    height: 150px;
    scroll-snap-align: center;
  }
  .table-panels {
    min-height: 0;
  }

  .game {
    max-width: 440px;
  }
  .schools-phones {
    order: -1;
    width: min(100%, 400px);
  }
  .numbers-grid {
    grid-template-columns: repeat(6, 1fr);
    row-gap: 2.2rem;
  }
  .numbers-grid li {
    grid-column: span 2;
  }
  .numbers-grid li:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .mobile-cta {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    display: block;
    padding: 0.8rem var(--gutter) calc(0.8rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(36, 3, 10, 0.92), rgba(36, 3, 10, 0));
    transform: translateY(110%);
    transition: transform 0.5s var(--ease);
    pointer-events: none;
  }
  .mobile-cta.is-visible {
    transform: none;
    pointer-events: auto;
  }
  .mobile-cta .button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .brand-word {
    height: 24px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .hero-title {
    font-size: clamp(3.1rem, 17vw, 4.6rem);
  }
  .store-row {
    flex-wrap: nowrap;
    gap: 0.6rem;
    width: 100%;
    max-width: 24rem;
  }
  .store {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 1rem;
  }
  .store-small {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }
  .store-big {
    font-size: 1.2rem;
  }
  .hero-facts {
    gap: 0.4rem 0.9rem;
    font-size: 0.64rem;
    letter-spacing: 0.16em;
  }
  .hero-facts li {
    gap: 0.9rem;
  }
  .odds div {
    flex: 1;
    min-width: 0;
    padding-inline: 0.8rem;
  }
  .odds dt {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
  .footer-links {
    grid-template-columns: minmax(0, 1fr);
  }
  .qr {
    display: none; /* the phone in your hand does not scan itself */
  }
}

/* The narrowest phones. */
@media (max-width: 360px) {
  .brand {
    gap: 0.5rem;
  }
  .brand-word {
    height: 20px;
  }
  .nav-toggle {
    width: 42px;
    height: 42px;
  }
  .nav-toggle span {
    left: 11px;
    right: 11px;
  }
  .nav-toggle span:nth-child(1) {
    top: 16px;
  }
  .nav-toggle span:nth-child(2) {
    top: 24px;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1),
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    top: 20px;
  }
  .store {
    padding-inline: 0.8rem;
  }
  .store-small {
    font-size: 0.54rem;
    letter-spacing: 0.03em;
  }
  .store-big {
    font-size: 1.02rem;
    white-space: nowrap;
  }
}
@media (max-width: 400px) {
  .game-top {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .game-score {
    gap: 0.7rem;
    font-size: 0.66rem;
  }
  .keypad button {
    min-height: 44px;
  }
}

/* Short windows: the hero's own content fills the height, so the scroll cue would sit on the store buttons. */
@media (max-height: 800px) {
  .scroll-cue {
    display: none;
  }
}

/* Small screens with motion: the two stories keep their pinned picture, like on a computer. The device sits under
   the header and the steps scroll beneath it; the current step is lit, the others wait in shadow. */
@media (max-width: 900px) {
  .sticky-stories .step-figure {
    display: none;
  }
  .sticky-stories .hand {
    background: var(--night);
  }
  .sticky-stories .hand-sticky {
    background: none;
    padding-bottom: 2rem;
  }
  .sticky-stories .has-figures .hand-grid,
  .sticky-stories .has-figures .pocket-grid {
    gap: 0;
  }
  .sticky-stories .hand-copy {
    display: contents;
  }
  .sticky-stories .hand-copy > .eyebrow {
    order: 1;
  }
  .sticky-stories .hand-title {
    order: 2;
    margin-bottom: 0.6rem;
  }
  .sticky-stories .has-figures .hand-stage {
    display: block;
    order: 3;
    position: sticky;
    top: var(--header-h);
    z-index: 3;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.9rem var(--gutter) 1.6rem;
    background: linear-gradient(to bottom, var(--night) 0%, var(--night) 80%, rgba(36, 3, 10, 0) 100%);
  }
  .sticky-stories .hand-stage .stage-note {
    display: none;
  }
  .sticky-stories .hand-copy > .steps {
    order: 4;
    gap: 0;
    margin-top: 0;
  }
  .sticky-stories [data-stepper] .step-rail {
    display: none;
  }
  .sticky-stories [data-stepper] .step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 46svh;
    padding: 1.5rem 0;
    opacity: 0.22;
    transition: opacity 0.5s var(--ease-in-out);
  }
  .sticky-stories [data-stepper] .step.is-active {
    opacity: 1;
  }
  .sticky-stories [data-stepper] .step:last-child {
    min-height: 58svh;
  }

  .sticky-stories .has-figures .pocket-phone {
    display: block;
    position: sticky;
    top: var(--header-h);
    z-index: 3;
    justify-self: stretch;
    width: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding: 1rem var(--gutter) 1.7rem;
    background: linear-gradient(to bottom, var(--paper) 0%, var(--paper) 82%, rgba(247, 241, 232, 0) 100%);
  }
  .sticky-stories .pocket-phone .device {
    width: min(42vw, 30svh, 190px);
    margin-inline: auto;
  }
  .sticky-stories .pocket .steps-light h2 {
    font-size: clamp(1.7rem, 7.4vw, 2.4rem);
  }
  .sticky-stories .pocket .steps-light .step p:not(.eyebrow) {
    margin-top: 0.8rem;
    font-size: 0.98rem;
  }
}

@media (max-width: 560px) {
  .odds {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }
}

/* Language picker: a small menu in the header; a plain list inside the phone menu. */
.lang {
  position: relative;
}
.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px var(--gold-45);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lang summary:hover,
.lang[open] summary {
  box-shadow: inset 0 0 0 1px var(--gold);
}
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  min-width: 170px;
  padding: 0.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bordeaux), var(--bordeaux-deep));
  box-shadow: inset 0 0 0 1px var(--gold-45), 0 24px 40px -16px rgba(0, 0, 0, 0.8);
}
.lang-list a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream-70);
}
.lang-list a:hover,
.lang-list a[aria-current="page"] {
  color: var(--cream);
  background: var(--gold-12);
}
/* The languages: one row under the three columns. */
.footer-langs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.2rem;
}
.footer-langs h3 {
  margin: 0 0.4rem 0 0;
}
.footer-langs a[aria-current="page"] {
  color: var(--gold);
}
@media (max-width: 900px) {
  .lang summary {
    font-size: 0.9rem;
  }
  .lang-list {
    position: static;
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Longer slogans (German, French): one size down, so it stays on two lines. */
html[lang="de"] .hero-title,
html[lang="fr"] .hero-title {
  font-size: clamp(2.7rem, 7vw, 7rem);
}

/* ------------------------------------------------------------------ 18 */
/* Dealer guides (guides/): a dark title, the lesson on the cream paper of the app, the drill on the felt. */
.guide-page .site-header {
  transform: none;
}
.guide-hero {
  padding: calc(var(--header-h) + clamp(2.5rem, 7vh, 5rem)) 0 calc(clamp(3rem, 8vh, 5rem) + var(--sheet));
  background:
    radial-gradient(60% 70% at 80% 0%, rgba(220, 20, 60, 0.25), transparent 70%),
    linear-gradient(180deg, var(--bordeaux) 0%, var(--felt) 50%, var(--bordeaux-deep) 100%);
}
.guide-hero-inner {
  max-width: 62rem;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin-bottom: 1.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream-50);
}
.crumbs a {
  color: var(--cream-70);
}
.crumbs a:hover {
  color: var(--cream);
}
.guide-title {
  margin-top: 1rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.guide-lead {
  max-width: 44rem;
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--cream-70);
}
.guide-meta {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cream-50);
}
.guide-meta a {
  color: var(--gold);
}

.guide-sheet {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--sheet) * -1);
  padding: clamp(3rem, 7vh, 5rem) 0 calc(clamp(3rem, 7vh, 5rem) + var(--sheet));
  border-radius: var(--sheet) var(--sheet) 0 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-warm));
}
.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.guide-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}
.guide-device {
  box-shadow: 0 0 0 1.5px rgba(122, 82, 0, 0.5), 0 40px 60px -30px rgba(59, 5, 18, 0.55);
}
.guide-device .device-screen > video {
  opacity: 1;
}
.guide-device figcaption {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.8rem);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-3);
}
.guide-body section + section {
  margin-top: 2.6rem;
}
.guide-body h2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  color: var(--bordeaux);
}
.guide-body p,
.guide-body li {
  max-width: 44rem;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.guide-body p {
  margin-top: 0.9rem;
}
.guide-body ul,
.guide-body ol {
  margin-top: 0.9rem;
  padding-left: 1.3rem;
}
.guide-body ul {
  list-style: disc;
}
.guide-body ol {
  list-style: decimal;
}
.guide-body li + li {
  margin-top: 0.45rem;
}
.guide-body li::marker {
  color: var(--crimson-dark);
  font-weight: 700;
}
.guide-body strong {
  color: var(--ink);
}
.worked {
  margin-top: 1rem;
  padding: 1rem 1.3rem;
  border-radius: 16px;
  border-left: 4px solid var(--crimson-dark);
  background: rgba(255, 251, 243, 0.85);
  box-shadow: inset 0 0 0 1px rgba(122, 82, 0, 0.18);
}
.worked p {
  margin-top: 0.3rem;
}
.worked p:first-child {
  margin-top: 0;
}
.table-wrap {
  margin-top: 1.1rem;
  overflow-x: auto;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(122, 82, 0, 0.25), 0 18px 34px -26px rgba(59, 5, 18, 0.4);
  background: rgba(255, 251, 243, 0.9);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.table-wrap th,
.table-wrap td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(122, 82, 0, 0.14);
  color: var(--ink-2);
}
.table-wrap thead th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(180deg, var(--bordeaux), var(--felt));
  border-bottom: 0;
}
.table-wrap tbody th {
  font-weight: 700;
  color: var(--ink);
}
.table-wrap tbody tr:nth-child(even) {
  background: rgba(238, 201, 150, 0.14);
}
.table-wrap tbody tr:last-child th,
.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}
.table-wrap strong {
  color: var(--bordeaux);
}
.table-times td,
.table-pairs td {
  font-weight: 600;
}

.guide-drill {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--sheet) * -1);
  padding: clamp(4rem, 10vh, 6rem) 0;
  border-radius: var(--sheet) var(--sheet) 0 0;
  background:
    radial-gradient(50% 55% at 78% 46%, rgba(220, 20, 60, 0.2), transparent 72%),
    linear-gradient(180deg, var(--felt) 0%, var(--bordeaux-deep) 100%);
}
.guide-drill-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.guide-drill .section-title {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
}
.game-guide .game-question {
  font-size: 1.35rem;
}
.game-guide .game-layout:empty {
  display: none;
}
.game-guide .game-board .game-sub {
  padding-bottom: 0.2rem;
}
.keypad .key-wide {
  grid-column: 1 / -1;
}
.game-keys {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  text-align: center;
  color: var(--ink-3);
}
.game-keys kbd {
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 0.7rem;
  background: rgba(110, 10, 30, 0.08);
}

.guide-faq {
  padding: clamp(3.5rem, 9vh, 5.5rem) 0;
  background: var(--bordeaux-deep);
}
.guide-faq-inner {
  max-width: 52rem;
}
.guide-faq h2,
.guide-related h2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--cream);
}
.guide-faq details {
  margin-top: 0.8rem;
  border-radius: 16px;
  background: rgba(110, 10, 30, 0.35);
  box-shadow: inset 0 0 0 1px var(--gold-25);
}
.guide-faq summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.2rem;
  font-weight: 700;
  color: var(--cream);
  cursor: pointer;
  list-style: none;
}
.guide-faq summary::-webkit-details-marker {
  display: none;
}
.guide-faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  transition: transform 0.3s;
}
.guide-faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.guide-faq details p {
  padding: 0 1.2rem 1.1rem;
  color: var(--cream-70);
}

.guide-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vh, 6rem) 0;
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 30%, rgba(220, 20, 60, 0.32), transparent 70%),
    linear-gradient(180deg, var(--bordeaux-deep), var(--night));
}
.guide-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.guide-cta .get-mark {
  width: 96px;
  height: 96px;
}
.guide-cta h2 {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  color: var(--cream);
}
.guide-cta p {
  max-width: 38rem;
  margin: 1rem 0 2rem;
  color: var(--cream-70);
}

.guide-related {
  padding: clamp(3.5rem, 9vh, 5.5rem) 0;
  background: var(--night);
}
.guide-hub {
  background: var(--bordeaux-deep);
}
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}
.guide-hub .guide-cards {
  margin-top: 0;
}
.guide-cards a {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
  padding: 1.4rem 1.4rem 1.5rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(110, 10, 30, 0.6), rgba(59, 5, 18, 0.6));
  box-shadow: inset 0 0 0 1px var(--gold-25);
  transition: box-shadow 0.3s, transform 0.4s var(--ease);
}
.guide-cards a:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--gold), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
}
.guide-cards strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--cream);
}
.guide-cards a > span:last-child {
  font-size: 0.92rem;
  color: var(--cream-70);
}

@media (max-width: 900px) {
  .guide-grid,
  .guide-drill-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .guide-aside {
    position: static;
    order: -1;
    margin-bottom: 2.6rem;
  }
}

.play-more {
  margin-top: 1.4rem;
}
.play-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  color: var(--gold);
}
.play-more a:hover .icon {
  transform: translateX(4px);
}
.play-more .icon {
  transition: transform 0.35s var(--ease);
}

.table-wrap td strong {
  white-space: nowrap;
}

/* Links inside the lesson text (start-here pages). */
.guide-body p a,
.guide-body li a,
.guide-body td a {
  font-weight: 700;
  color: var(--crimson-dark);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.guide-body p a:hover,
.guide-body li a:hover,
.guide-body td a:hover {
  color: var(--bordeaux);
}
/* The «maths every croupier needs» table: one card per row on a phone, nothing to scroll sideways. */
@media (max-width: 560px) {
  .table-guides thead {
    display: none;
  }
  .table-guides tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "game link" "what what" "ex ex";
    gap: 0.15rem 0.8rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(122, 82, 0, 0.14);
  }
  .table-guides tbody tr:last-child {
    border-bottom: 0;
  }
  .table-guides th,
  .table-guides td {
    padding: 0;
    border: 0;
  }
  .table-guides th {
    grid-area: game;
  }
  .table-guides td:nth-of-type(1) {
    grid-area: what;
  }
  .table-guides td:nth-of-type(2) {
    grid-area: ex;
  }
  .table-guides td:nth-of-type(3) {
    grid-area: link;
    text-align: right;
  }
}
