/* Bingo Caller — marketing site design system.
   Static HTML/CSS, no build step. Tokens below mirror the APP's real theme
   (src/theme/tokens.ts, src/theme/themes.ts) so the site reads as the app
   people install, not a separate marketing skin.

   BACKWARD COMPATIBILITY: pages this stylesheet did not get rewritten for
   this pass (host.html, r.html, get.html, privacy/terms/rules/delete-account,
   the 8 occasion guides, the 2 generator pages + web/tools/tools.css) all
   reference the ORIGINAL custom-property names (--plum, --plum2, --cream,
   --muted, --orange, --gold, --card, --line) and classes (.wrap, .legal,
   .badge, .chip, .faq, .jump, .checklist, .callout, .prize-card, .mini, …)
   directly. Those names and their VALUES are kept unchanged below — the new
   token layer (spacing/radius/type-scale/shadows) is additive, not a rename. */

:root {
  color-scheme: dark; /* native form controls (host.html selects, tools.css
    number inputs) render dark-appropriate chrome instead of a white default. */

  /* ── Color — plum scene (3-stop gradient + vignette), app accents ────── */
  --plum-900: #2A1A2E; /* darkest — top/bottom of the scene */
  --plum-800: #34203A; /* mid stop */
  --plum-700: #3D2438; /* lightest register */
  --plum: var(--plum-900);   /* legacy alias — unchanged value */
  --plum2: var(--plum-700);  /* legacy alias — unchanged value */
  --card: #3A2440;           /* card/panel surface — unchanged value */
  --line: rgba(255, 255, 255, 0.10);
  --overlay-strong: rgba(42, 26, 46, .92); /* sticky jump-nav backdrop */

  --cream: #FFF4E6;      /* primary text */
  --cream-dim: #E9D9C5;  /* secondary long-form text (legal copy, chips) */
  --muted: #C9B79E;      /* tertiary / caption text */
  --white: #FFFFFF;

  --orange: #FF6B35;
  --orange-light: #FF8A4C; /* CTA gradient top stop */
  --gold: #F4B740;

  /* B-I-N-G-O column hues — accents / section washes / the ball-chip motif */
  --col-b: #CB4A50;
  --col-i: #E07A33;
  --col-n: #2E8C66;
  --col-g: #2E83BC;
  --col-o: #8A57C2;

  /* ── Type — Baloo 2 (display) + Nunito (body), a real modular scale ──── */
  --font-display: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fs-100: 0.75rem;    /* 12px — captions */
  --fs-200: 0.875rem;   /* 14px — small nav / chip text */
  --fs-300: 1rem;       /* 16px — body */
  --fs-400: 1.125rem;   /* 18px — lede / tagline */
  --fs-500: 1.375rem;   /* 22px — card headings */
  --fs-600: 1.75rem;    /* 28px — section h2 */
  --fs-700: 2.25rem;    /* 36px */
  --fs-800: 2.75rem;    /* 44px — generic h1 */
  --fs-900: clamp(2.75rem, 11vw, 4.5rem); /* hero wordmark */

  /* ── Spacing — 4/8pt rhythm ────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ── Radii — matches the app's radius convention exactly ─────────────
     sm → tiny elements, md → rows/inputs, lg → cards/panels, pill → CTAs */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);

  --container: 920px;   /* .wrap — unchanged from the original width */
  --container-narrow: 660px; /* .faq / long-form reading measure */

  --z-sticky: 10;
}

/* ── Reset & base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
body {
  font-family: var(--font-body);
  color: var(--cream);
  background: radial-gradient(120% 90% at 50% 0%, var(--plum-800) 0%, var(--plum-900) 60%, var(--plum-900) 100%),
              linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 12%, transparent 88%, rgba(0, 0, 0, .35) 100%);
  background-blend-mode: normal, multiply;
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }
a { color: var(--gold); }
img { max-width: 100%; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.9em;
}

/* Visible focus ring on every interactive element, in gold. */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--radius-sm);
}

/* ── Base typography ───────────────────────────────────────────────────── */
h1 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; color: var(--cream); font-size: var(--fs-800); }
h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.375rem, 4vw, 1.75rem); text-align: center; margin-bottom: var(--space-4); }
h3 { font-family: var(--font-display); font-weight: 700; color: var(--cream); font-size: var(--fs-500); }
.lede { color: var(--muted); font-size: var(--fs-400); max-width: 62ch; margin-inline: auto; text-align: center; }

/* ── Header / nav (new component; other pages currently use `.back`) ──── */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-3); }
.site-header__brand { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-400); color: var(--cream); text-decoration: none; }
.site-header__brand .accent { color: var(--orange); }
.site-header__nav { display: flex; gap: var(--space-4); }
.site-header__nav a { color: var(--cream); font-weight: 700; font-size: var(--fs-200); text-decoration: none; }
.site-header__nav a:hover { color: var(--gold); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding-block: var(--space-5) var(--space-6); }
.wordmark { text-align: center; }
.wordmark-word { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-900); letter-spacing: 0.5px; line-height: 1; }
.wordmark-cream { color: var(--cream); }
.wordmark-orange { color: var(--orange); }
.wordmark-kicker { display: block; margin-top: var(--space-2); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-300); letter-spacing: 6px; color: var(--gold); }
.hero-tagline { color: var(--muted); font-size: var(--fs-400); margin-top: var(--space-4); max-width: 46ch; margin-inline: auto; }
.trust-pill { display: inline-block; margin-top: var(--space-4); padding: var(--space-2) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--cream); font-weight: 600; font-size: var(--fs-200); }

/* Product shots. Real captures (store/aso/raw/v3), frameless with the app's
   own corner radius — the same treatment the site already used, so a shot
   reads as the app's screen rather than a stock phone render. */
.hero-shot { margin-top: var(--space-6); }
.hero-shot img,
.shot img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: block;
  width: 100%;
  height: auto;
}
.hero-shot img { width: min(280px, 72%); margin-inline: auto; }
.shots {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: var(--space-6);
}
.shot figcaption { margin-top: var(--space-3); color: var(--muted); font-size: var(--fs-200); text-align: center; }
.shots { align-items: start; }
/* The TV capture is landscape. Sharing a row with portrait shots left the row
   ragged and the captions on different baselines, so it always takes its own
   full-width row, centred at a size that still reads as a television. */
.shot-wide { grid-column: 1 / -1; }
.shot-wide img { width: min(560px, 100%); margin-inline: auto; }

/* Legacy hero bits — kept for r.html (invite/bounce page), which renders its
   own logo/subtitle markup directly and links these classes by name. */
.logo { font-size: clamp(42px, 13vw, 64px); font-weight: 800; letter-spacing: 1px; line-height: 1.05; font-family: var(--font-display); }
.logo .go { color: var(--orange); }
.logo-link { text-decoration: none; color: inherit; display: inline-block; }
.sub { color: var(--muted); margin-top: 16px; font-size: clamp(16px, 4vw, 18px); max-width: 560px; margin-inline: auto; }

/* ── Store badges — official assets only, never rebuilt in CSS ──────────
   Anchor padding = 12px (a quarter of the 48px badge height) on every side,
   which doubles as the clear-space the store guidelines require and pushes
   the tap target past the 44px minimum. */
.store-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; align-items: flex-start; margin-top: var(--space-5); }
.store-badge { display: inline-flex; padding: 12px; border-radius: var(--radius-md); }
.store-badge img { height: 48px; width: auto; display: block; }
.store-badge-group { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.store-caption { font-size: var(--fs-100); color: var(--muted); font-weight: 600; }

/* ── Buttons — primary / secondary / ghost ───────────────────────────────
   `.badge`/`.badge.alt` are the ORIGINAL class names (still used verbatim
   by r.html and get.html for their store links) grouped onto the same
   rules so those pages inherit the new look with no HTML changes. */
.btn-primary, .badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 22px; border: none; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-200);
  color: #fff; text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, var(--orange-light), var(--orange));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--shadow-md);
  transition: transform .15s ease;
}
.btn-primary:hover, .badge:hover { transform: translateY(-1px); }
.badge { margin: 6px; }
.btn-secondary, .badge.alt {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 22px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-200);
  color: var(--cream); text-decoration: none; cursor: pointer;
  background: rgba(255, 255, 255, .08); transition: background .15s ease;
}
.btn-secondary:hover, .badge.alt:hover { background: rgba(255, 255, 255, .14); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 9px 20px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-200);
  color: var(--cream); text-decoration: none;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── Cards & grids ────────────────────────────────────────────────────── */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.card h3 { margin-bottom: var(--space-1); }
.card p { color: var(--muted); font-size: var(--fs-300); flex: 1; }
.card .btn-ghost { align-self: flex-start; margin-top: var(--space-2); }

/* Guide & tool cards — the whole card is the link and carries its own spot
   illustration. These are the pages search traffic lands on, so they get
   artwork instead of the bare text chips they used to be. The art is inline
   SVG: it reads the tokens below directly and costs no extra request.
   Colours inside the art are set with `style="fill:var(--…)"` rather than a
   `fill=` attribute, because var() in an SVG presentation attribute is not
   reliable in Safari — and this site's traffic is mostly iOS. */
.card-link { text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.card-link:hover { border-color: var(--gold); transform: translateY(-2px); }
.card-link:hover h3 { color: var(--gold); }
/* The global a:focus-visible rule sets radius-sm; on a card-sized link that
   snaps the corners square, so the card keeps its own radius while focused. */
.card-link:focus-visible { border-radius: var(--radius-lg); }
.card-art { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.card-art text { font-family: var(--font-display); font-weight: 800; }

/* ── Chips (rangechips, guide/tool link grids) ───────────────────────── */
.rangechips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.chip { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 7px 13px; font-size: 14px; color: var(--cream-dim); white-space: nowrap; }
.chip b { color: var(--gold); }
.tag-links { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.tag-links .chip { text-decoration: none; }
.tag-links .chip:hover { border-color: var(--gold); }

/* ── Sections ─────────────────────────────────────────────────────────── */
section { padding-block: clamp(1.75rem, 6vw, 3rem); }

/* ── FAQ / accordions (index + rules) ────────────────────────────────── */
.faq { max-width: var(--container-narrow); margin: 0 auto; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 15px 0; font-weight: 600; list-style: none; position: relative; padding-right: 24px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--gold); font-weight: 800; font-size: 20px; }
details[open] summary::after { content: '\2013'; }
details > p, details > ul { color: var(--muted); padding-bottom: 16px; margin: 0; }
details ul { padding-left: 20px; }

/* ── Legal / long-form pages ──────────────────────────────────────────── */
.legal { padding-block: clamp(40px, 8vw, 56px); }
.legal h1 { font-size: clamp(26px, 7vw, 32px); margin-bottom: 6px; }
.legal .updated { color: var(--muted); margin-bottom: 24px; }
.legal h2 { text-align: left; font-size: clamp(19px, 5vw, 22px); margin: 30px 0 8px; }
.legal p, .legal li { color: var(--cream-dim); margin-bottom: 10px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal ol li { margin-bottom: 8px; }
.legal .lede { margin-bottom: 6px; text-align: left; margin-inline: 0; }
.back { display: inline-block; margin-bottom: 24px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--cream); text-decoration: none; font-weight: 600; font-size: 14px; }
.back:hover { background: rgba(255, 255, 255, .06); }

/* How to Play (rules.html) */
.legal h3 { text-align: left; font-size: 18px; margin: 26px 0 6px; color: var(--gold); }
.jump { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; flex-wrap: wrap; gap: 8px; margin: 18px -20px 28px; padding: 12px 20px; background: var(--overlay-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.jump .badge { margin: 0; padding: 9px 15px; font-size: 14px; text-decoration: none; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 40px 0 8px; }

/* Pictorial prize cards + mini boards (rules.html) */
.prizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.prize-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 16px 20px; text-align: center; display: flex; flex-direction: column; }
.prize-card h4 { color: var(--gold); font-size: 16px; margin-bottom: 6px; }
.prize-card > p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 14px; flex: 1; }
.figure { text-align: center; margin: 18px 0; }
.figure figcaption { color: var(--muted); font-size: 13px; margin-top: 10px; }
.mini { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 3px; width: 100%; max-width: 200px; margin: 0 auto; }
.figure .mini { max-width: 250px; }
.mini .cell { aspect-ratio: 1; border-radius: 4px; background: var(--plum); border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.mini .cell.lit { background: var(--gold); border-color: var(--gold); color: var(--plum); font-weight: 800; }
.mini .cell.free { background: rgba(244, 183, 64, .22); border-color: rgba(244, 183, 64, .45); color: var(--gold); font-size: 12px; }
.mini .cell.blank { background: transparent; border-color: transparent; }
.mini-hdr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; width: 100%; max-width: 250px; margin: 0 auto 4px; }
.mini-hdr span { text-align: center; font-weight: 800; color: var(--orange); font-size: 13px; }

/* Guides (/host-bingo-on-zoom, /classroom-bingo, …) and generator pages */
.legal h1 + .lede { margin-bottom: 20px; }
.legal h2 .num { color: var(--gold); margin-right: 6px; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.callout p:last-child { margin-bottom: 0; }
.checklist { list-style: none; padding-left: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; margin: 14px 0 20px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 8px; color: var(--cream-dim); }
.checklist li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--gold); border-radius: 5px; }
.honest { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.related { margin-top: 30px; }
.related h2 { text-align: left; }
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 6px; }
@media print { .checklist li::before { border-color: #000; } }

/* .cta-box — used by all 8 occasion guides + 2 generator pages, but was only
   ever defined in web/tools/tools.css (which the 8 guide pages never load).
   Defined here so every page that references it renders styled. */
.cta-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; margin: 30px 0 10px; text-align: center; }
.cta-box h2 { margin: 0 0 8px; }
.cta-box p { color: var(--muted); }
.cta-box .badge { margin-top: 10px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 28px 0 60px; text-align: center; color: var(--muted); font-size: 14px; }
footer a { margin: 0 10px; display: inline-block; }

/* ── Breakpoints (mobile-first) ───────────────────────────────────────── */
@media (min-width: 640px) {
  .wrap { padding-inline: var(--space-6); }
  .site-header__nav { font-size: var(--fs-300); }
}
@media (min-width: 768px) {
  .grid-auto { grid-template-columns: repeat(3, 1fr); }
  /* A two-card row (the generators) splits in half, not into thirds. */
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-auto { gap: var(--space-5); }
}

/* CTA alternative line under a badge row (guide/tool pages). */
.cta-alt { margin-top: var(--space-4); font-size: var(--fs-200); }
.cta-alt a { font-weight: 700; }

/* Google's badge artwork carries more internal padding than Apple's, so equal
   HTML heights render the Play lockup visibly smaller — and Play's guidelines
   require its badge to be at least as large as any badge beside it. Sized up
   until the two lockups read as the same size. Apple's own rule (never modify
   the badge) is untouched: this scales the whole asset, nothing inside it. */
.store-badge img[src*="google-play"] { height: 58px; }

/* Data tables in guides (PH Christmas, kitty party, apps compared).
   .table-scroll keeps wide tables from forcing a horizontal page scroll on phones. */
.table-scroll { overflow-x: auto; margin: 14px 0 20px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border: 1px solid var(--line); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--cream-dim); }
.legal th { color: var(--cream); font-weight: 700; }
.legal tbody tr:last-child td { border-bottom: 0; }

[hidden] { display: none !important; }
