/**
 * ts-page.css — the shared page shell.
 *
 * The club pages, the Teams hub, Games and Competitions had each grown their
 * own copy of the same tokens, the same .wrap, the same heading scale and the
 * same breakpoints. Changing one design decision meant editing four templates
 * and finding out later which one had been missed.
 *
 * This holds what they genuinely share: tokens, the shell, headings,
 * breadcrumbs, the hero, the how-to popover and the sticky footer. Anything
 * specific to one page stays on that page.
 *
 * It does NOT restyle the games themselves. Those are self-contained
 * full-screen interfaces with their own layout needs, and the brief is to
 * leave them compatible.
 */

:root {
  --bg: #0A0E11;
  --s0: #090C0F;
  --s1: #11161B;
  --s2: #161C23;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --fg: #EEF3F7;
  --fg-2: #9FAEBB;
  --fg-3: #6B7A87;
  --cyan: var(--accent-cyan, #00E5FF);
  --r: 12px;
  --r-sm: 9px;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
  --wrap: 920px;
}

/* ── the shell ──────────────────────────────────────────────────────────
   A column the height of the viewport with the main content flexed, so the
   footer sits at the BOTTOM of a short page instead of floating halfway up
   an empty screen, and after the content on a long one. */
.ts-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ts-shell > main { flex: 1 0 auto; }
.ts-shell > .ts-footer { flex: 0 0 auto; }

body { margin: 0; background: var(--bg); color: var(--fg);
       font-family: Inter, system-ui, -apple-system, sans-serif; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 56px; width: 100%;
        box-sizing: border-box; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; }

/* ── the no-JS header ───────────────────────────────────────────────────
   TSNav removes .ts-header and prepends the real bar. This is what a visitor
   sees before the script runs and all a crawler ever sees, so it carries the
   same links in the same order — the nav config lives in ts-nav.js and this
   is generated from it by scripts/pages/shell.js. Full width, with its inner
   content aligned to the same --wrap as the page: the old version constrained
   the whole header, so the account controls floated outside it. */
.ts-header { border-bottom: 1px solid var(--line); background: var(--s1); }
.ts-header .inner { max-width: var(--wrap); margin: 0 auto; padding: 11px 20px;
                    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
                    box-sizing: border-box; }
.ts-header .brand { font-weight: 700; letter-spacing: .04em; color: var(--fg);
                    text-decoration: none; font-family: var(--mono); }
.ts-header nav { display: flex; gap: 15px; flex-wrap: wrap; }
.ts-header nav a { font-size: .82rem; color: var(--fg-2); text-decoration: none; }
.ts-header nav a:hover, .ts-header nav a[aria-current] { color: var(--cyan); }

nav.crumbs { font-size: .76rem; color: var(--fg-3); margin: 16px 0 14px; }
nav.crumbs a { color: var(--fg-2); text-decoration: none; }
nav.crumbs a:hover { color: var(--cyan); }

/* ── hero and section rhythm ───────────────────────────────────────────── */
.hero { padding: 2px 0 0; margin-bottom: 24px; }
.kicker { font-family: var(--mono); font-size: clamp(1.5rem, 5.4vw, 2.1rem); font-weight: 700;
          letter-spacing: -.03em; line-height: 1.12; margin: 0 0 8px; }
.kicker em { font-style: normal; color: var(--cyan); }
.hero h1 { font-size: .95rem; font-weight: 600; color: var(--fg-2); margin: 0 0 6px;
           letter-spacing: 0; }
.lede { color: var(--fg-3); font-size: .84rem; margin: 0; max-width: 62ch; line-height: 1.5; }
.lede b { color: var(--fg-2); font-weight: 600; }

section.band { margin-bottom: 34px; }
h2 { font-family: var(--mono); font-size: 1rem; font-weight: 700; margin: 0 0 3px;
     letter-spacing: -.01em; }
.sublede { color: var(--fg-3); font-size: .78rem; margin: 0 0 14px; max-width: 62ch;
           line-height: 1.5; }
.head { display: flex; align-items: baseline; justify-content: space-between;
        gap: 12px; margin-bottom: 14px; }
.head h2 { margin: 0; }
.head a { font-size: .78rem; color: var(--fg-2); text-decoration: none; white-space: nowrap; }
.head a:hover { color: var(--cyan); }

/* ── how to play ────────────────────────────────────────────────────────
   A question mark on a card. The button is always a SIBLING of the card's
   anchor, never a child: a <button> inside an <a> is invalid and browsers
   disagree about which one a tap belongs to. */
.howto { position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px;
         display: flex; align-items: center; justify-content: center; padding: 0;
         border-radius: 50%; cursor: pointer; border: 1px solid var(--line-2);
         background: rgba(10, 14, 17, .72); color: var(--fg-2); backdrop-filter: blur(3px); }
.howto svg { width: 15px; height: 15px; }
.howto:hover { color: var(--fg); border-color: var(--fg-3); }
.howto:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.howto[aria-expanded="true"] { background: var(--cyan); color: #06181C; border-color: var(--cyan); }
.howpop { position: absolute; z-index: 3; top: 40px; right: 6px; left: 6px; padding: 11px 13px;
          border-radius: 10px; font-size: .77rem; line-height: 1.45; color: var(--fg);
          background: var(--s2); border: 1px solid var(--line-2);
          box-shadow: 0 10px 28px rgba(0, 0, 0, .55); }
.howpop[hidden] { display: none; }

@media (max-width: 620px) {
  .wrap { padding: 0 14px 44px; }
  nav.crumbs { margin: 10px 0 9px; font-size: .72rem; }
  .kicker { font-size: clamp(1.35rem, 7vw, 1.8rem); }
  .hero h1 { font-size: .86rem; }
  .lede { font-size: .79rem; }
  .hero { margin-bottom: 20px; }
  section.band { margin-bottom: 28px; }
  h2 { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── colour roles ────────────────────────────────────────────────────────
   The brand has two accents and the site had quietly dropped one, which is
   how /games/ ended up reading as a blue analytics dashboard.

     cyan   — play. Gameplay actions, links, selected states.
     yellow — build and earn. Creating a game, XP, streaks, achievements.

   The split is a RULE, not decoration: a yellow thing on this site either
   makes something or records something you earned. That is what stops it
   becoming "some buttons are yellow now". */
:root {
  --yellow: var(--accent-yellow, #FFD60A);
  --play: var(--cyan);
  --build: var(--yellow);
}

/* ── the Daily | Featured | Community module ─────────────────────────── */
.tsf { border: 1px solid var(--line-2); border-radius: 14px; background: var(--s1);
       overflow: hidden; }
.tsf-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: var(--s0); }
.tsf-tab { flex: 1; font: inherit; font-family: var(--mono); font-size: .76rem; font-weight: 700;
           letter-spacing: .04em; padding: 12px 8px; min-height: 44px; cursor: pointer;
           background: transparent; color: var(--fg-3); border: 0;
           border-bottom: 2px solid transparent; }
.tsf-tab:hover { color: var(--fg-2); }
.tsf-tab.on { color: var(--fg); border-bottom-color: var(--cyan); background: var(--s1); }
.tsf-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.tsf-panel { padding: 16px 17px 17px; }
.tsf-panel[hidden] { display: none; }
.tsf-panel:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.tsf-wait { font-size: .82rem; color: var(--fg-3); margin: 0; padding: 6px 0; }

.tsf-daily { display: flex; gap: 18px; align-items: flex-start; }
.tsf-dmain { flex: 1; min-width: 0; }
.tsf-eyebrow { display: flex; align-items: center; gap: 6px; font-size: .62rem; font-weight: 700;
               text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); margin: 0 0 6px; }
.tsf-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.tsf-title { font-family: var(--mono); font-size: 1.2rem; font-weight: 700; margin: 0;
             letter-spacing: -.02em; }
.tsf-sub { font-size: .83rem; color: var(--fg-2); margin: 4px 0 0; }
.tsf-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
           font-size: .86rem; font-weight: 700; padding: 10px 18px; min-height: 42px;
           box-sizing: border-box; border-radius: 10px; background: var(--cyan);
           color: #06181C; text-decoration: none; }
.tsf-cta:hover { filter: brightness(1.08); }
.tsf-cta svg { width: 14px; height: 14px; }
/* Building is yellow, everywhere, because that is what yellow means here. */
.tsf-cta.tsf-build { background: var(--build); color: #1A1400; }

/* Streaks are something you earned, so they are yellow too. */
.tsf-streak { flex: 0 0 auto; display: flex; gap: 0; border: 1px solid var(--line);
              border-radius: 10px; overflow: hidden; }
.tsf-streak div { padding: 9px 13px; text-align: center; }
.tsf-streak div + div { border-left: 1px solid var(--line); }
.tsf-streak b { display: block; font-family: var(--mono); font-size: 1.05rem; font-weight: 700;
                font-variant-numeric: tabular-nums; color: var(--yellow); }
.tsf-streak span { font-size: .58rem; text-transform: uppercase; letter-spacing: .1em;
                   color: var(--fg-3); }

.tsf-list { list-style: none; padding: 0; margin: 0; }
.tsf-list a { display: flex; align-items: center; gap: 10px; padding: 11px 2px; min-height: 46px;
              box-sizing: border-box; text-decoration: none; color: var(--fg); font-size: .86rem;
              border-bottom: 1px solid var(--line); }
.tsf-list li:last-child a { border-bottom: 0; }
.tsf-list a:hover { color: var(--cyan); }
.tsf-list a svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--fg-3); }
.tsf-list a:hover svg { color: var(--cyan); }
.tsf-ln { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis;
          white-space: nowrap; }
.tsf-lm { font-size: .74rem; color: var(--fg-3); white-space: nowrap; }
.tsf-lp { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--yellow);
          font-variant-numeric: tabular-nums; white-space: nowrap; }
.tsf-list a svg:last-child { margin-left: auto; }
.tsf-lp + svg { margin-left: 8px !important; }
.tsf-foot { font-size: .73rem; color: var(--fg-3); margin: 11px 0 0; }
.tsf-foot a { color: var(--fg-2); }
.tsf-foot a:hover { color: var(--cyan); }
.tsf-invite p { font-size: .85rem; color: var(--fg-2); margin: 0 0 12px; line-height: 1.5; }

@media (max-width: 620px) {
  .tsf-panel { padding: 14px 13px 15px; }
  .tsf-daily { flex-direction: column; gap: 13px; }
  .tsf-streak { width: 100%; }
  .tsf-streak div { flex: 1; }
  .tsf-title { font-size: 1.05rem; }
  .tsf-cta { width: 100%; justify-content: center; }
  .tsf-tab { font-size: .72rem; letter-spacing: .02em; }
}
