/* Base layer for the redesign. Depends on tokens.css. */
html { background-color: var(--bx-bg-950); }

body {
  font-family: var(--bx-font);
  color: var(--bx-text);
  background-color: var(--bx-bg-950);
  background-image: image-set(
    url("../brand/bg-desktop.avif") type("image/avif"),
    url("../brand/bg-desktop.webp") type("image/webp")
  );
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 767px) {
  body {
    background-image: image-set(
      url("../brand/bg-mobile.avif") type("image/avif"),
      url("../brand/bg-mobile.webp") type("image/webp")
    );
  }
}

.bx-container {
  width: 100%;
  max-width: var(--bx-container);
  margin-inline: auto;
  padding-inline: var(--bx-gutter);
  box-sizing: border-box;
}

.bx-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bx-text-muted);
}

.bx-card {
  background: var(--bx-gradient-panel);
  border: 1px solid var(--bx-border);
  border-radius: var(--bx-r-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--bx-shadow-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Geometry from the Developer Handoff's .bx-button: 52px tall, pill, weight 800. The flat
   12px-radius 600-weight block this replaces was ours, not the designer's. */
.bx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--bx-radius-pill);
  border: 1px solid var(--bx-border);
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--bx-t-fast) ease, filter var(--bx-t-fast) ease,
              box-shadow var(--bx-t-fast) ease, background-color var(--bx-t-fast) ease,
              border-color var(--bx-t-fast) ease;
}
.bx-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.bx-btn:focus-visible { outline: 3px solid var(--bx-focus); outline-offset: 3px; }

/* A table that scrolls sideways has to be reachable by keyboard, or its right-hand columns cannot
   be read without a mouse — that is the scrollable-region-focusable rule. The admin tables carry
   tabindex="0" for that reason, and the ring is the other half: a stop in the tab order that shows
   nothing looks like the focus has vanished. */
div[tabindex="0"]:focus-visible { outline: 3px solid var(--bx-focus); outline-offset: 2px; }
/* The primary button is a lit object, not a fill: a radial highlight over an emerald gradient,
   edged in gold and carrying the green glow. All four of these come from the official component
   sheet, and the gold edge is the part that was most obviously missing. */
.bx-btn--primary {
  color: var(--bx-text-dark);
  background: var(--bx-gradient-primary);
  border-color: var(--bx-gold-300);
  box-shadow: var(--bx-glow-green), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
/* The canvas's deep green: Swap Shells/Gold, Edit, Connect, Play, Top Up. Its own stops
   (#139d78 to #0b6f57) put white 13px type at 3.5:1 on the light end, so these sit one step
   darker — the same green to the eye, 4.6:1 or better under the label everywhere. */
.bx-btn--deep {
  color: #fff;
  background: linear-gradient(180deg, #118565 0%, #0a6450 100%);
  border-color: rgba(76, 245, 178, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 14px rgba(25, 230, 176, 0.18);
}
.bx-btn--deep:hover { background: linear-gradient(180deg, #13916e 0%, #0b6f57 100%); }
.bx-btn--secondary {
  background: linear-gradient(180deg, rgba(8, 79, 69, 0.94), rgba(4, 45, 54, 0.94));
  color: var(--bx-text);
  border-color: var(--bx-border);
  box-shadow: 0 0 18px rgba(34, 242, 177, 0.22);
}

/* The one hero button on the site, from the official sheet's .bx-button--play: a pill, a gold rim
   and a green fill — not the mint of --bx-gradient-primary, which is every other primary button.
   The stops are read off the delivered render rather than copied from the sheet's one-line
   gradient: the render lights both rims and keeps the middle dark, and the sheet flattens that to
   a plain top-to-bottom ramp whose bright half would put white type at 2.6:1. Measured off
   screens/authenticated-home/references/01-*.jpg; the band the label sits on is 4.3:1 or better. */
.bx-btn--play {
  color: var(--bx-text);
  border: 2px solid var(--bx-gold-200);
  border-radius: var(--bx-radius-pill);
  background: linear-gradient(180deg,
    #5BF27A 0%, #27B154 10%, #18823F 26%, #167939 50%,
    #157433 70%, #249B45 88%, #4FE86B 100%);
  /* Not --bx-shadow-play: its 18px and 34px blurs stop at the rim, and on the render the bloom is
     still lit 20px out and reads gold rather than mint. The token's structure is kept — gold ring,
     gold bloom, teal halo — and only the reach is taken from the picture. */
  box-shadow: 0 0 0 2px rgba(255, 232, 166, .95),
              0 0 18px 2px rgba(255, 226, 140, .95),
              0 0 46px 6px rgba(226, 190, 80, .62),
              0 0 92px 18px rgba(214, 186, 72, .34),
              0 0 140px 30px rgba(25, 230, 176, .22);
}
.bx-btn--play:hover {
  box-shadow: 0 0 0 2px var(--bx-gold-200), 0 0 24px 4px rgba(255, 226, 140, 1),
              0 0 58px 12px rgba(226, 190, 80, .76), 0 0 110px 26px rgba(214, 186, 72, .46),
              0 0 160px 40px rgba(25, 230, 176, .3);
}
.bx-btn--play:active {
  box-shadow: 0 0 0 1px var(--bx-gold-300), 0 0 15px rgba(232, 195, 106, .6);
}

.bx-btn--block { width: 100%; min-height: 52px; }
.bx-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.bx-skip {
  position: absolute; left: 16px; top: -100px; z-index: var(--bx-z-overlay, 50);
  padding: 12px 16px; border-radius: var(--bx-r-control);
  background: var(--bx-teal); color: var(--bx-teal-ink); font-weight: 600; text-decoration: none;
}
.bx-skip:focus { top: 16px; outline: 3px solid var(--bx-focus); outline-offset: 3px; }

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

@media (prefers-reduced-motion: reduce) {
  .bx-btn:hover { transform: none; }
}

/* The bottom bar renders only for signed-in players, so :has() is what decides whether the page
   owes it room. The Support FAB moves above it rather than under it. */
@media (max-width: 1023px) {
  body:has(.bx-bottomnav) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body:has(.bx-bottomnav) .bx-fab { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* Long-form text: terms, privacy, how-it-works. Not the card grid the marketing pages use — a wall
   of legal text inside a dark card is harder to read, not more on-brand. The measure is capped
   because a line much wider than about 70 characters loses the reader on the way back to the left
   edge. */
.bx-prose { max-width: 70ch; margin-inline: auto; color: var(--bx-text-2); font-size: 16px; line-height: 1.7; }
.bx-prose h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; color: var(--bx-text); }
.bx-prose h2 { margin: 32px 0 10px; font-size: 20px; font-weight: 700; color: var(--bx-text); }
.bx-prose h3 { margin: 24px 0 8px; font-size: 17px; font-weight: 700; color: var(--bx-text); }
.bx-prose p, .bx-prose li { margin: 0 0 12px; }
.bx-prose ul, .bx-prose ol { padding-left: 22px; }
.bx-prose a { color: var(--bx-teal); }
.bx-prose a:focus-visible { outline: 3px solid var(--bx-focus); outline-offset: 2px; border-radius: 4px; }
.bx-prose hr { margin: 28px 0; border: 0; border-top: 1px solid var(--bx-teal-border); }
.bx-prose__updated { color: var(--bx-text-muted); font-size: 14px; }

/* The Terms acceptance control sits inside the prose flow but is a real form, not more text — it
   gets card treatment and the same button/focus primitives as the rest of the site. */
.bx-prose__accept { margin-top: 32px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.bx-prose__accept-label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 15px; line-height: 1.5; color: var(--bx-text); cursor: pointer; }
.bx-prose__accept-checkbox { width: 22px; height: 22px; min-width: 22px; margin-top: 2px; accent-color: var(--bx-teal); cursor: pointer; }
.bx-prose__accept-checkbox:focus-visible { outline: 3px solid var(--bx-focus); outline-offset: 3px; border-radius: 4px; }
