/* ==========================================================================
   ITZA CHESS - marketing site stylesheet
   --------------------------------------------------------------------------
   ONE stylesheet for every page. Nothing is inlined in the HTML.

   HOW THIS FILE IS ORGANISED (search for the banners):
     01  DESIGN TOKENS          all colours / spacing / type live here
     02  RESET + BASE
     03  TYPOGRAPHY
     04  LAYOUT HELPERS         container, section, grids
     05  HEADER + NAVIGATION
     06  BUTTONS, PILLS, CHIPS
     07  HERO
     08  THE LIVING BOARD       the animated demo board (signature element)
     09  STAT STRIP
     10  CARDS + FEATURE GRID
     11  BOARD THEMES + PIECE SETS
     12  OPPONENT ROSTER
     13  BADGES
     14  NUMBERED STEPS
     15  COMPARISON TABLE
     16  NEWS
     17  FAQ ACCORDION
     18  CALL TO ACTION BAND
     19  FOOTER
     20  UTILITIES, MOTION, RESPONSIVE, ACCESSIBILITY
     21  THE SPEED BAND + SETTLEMENT RAIL   (5ms, shown on every page)
     22  DARK THEME + THE THEME SWITCH

   THE ITZA HOUSE IDENTITY (build 18, 2026-11-18)
     The site now wears the identity every ITZA site shares (ITZA Chat, Tab,
     Friend): corporate navy text #0a2540, corporate blue #0c7ffb, brand gold
     #f5c711, the pyramid mark, and the WORDMARK - "ITZA" in blue at a lighter
     weight running straight into the product word in metal gold, set in
     Roboto (self-hosted, fonts/roboto-latin.woff2, the same file Chat and Tab
     ship). Headlines are a heavy grotesque, as on the other sites. The token
     NAMES below are unchanged so no component had to be rewritten; their
     VALUES moved to the house palette.

   DESIGN NOTES FOR WHOEVER MAINTAINS THIS
     - TWO THEMES (owner, 2026-11-18 - this used to say "light only, by
       request"). Light is the default and the house style; dark is a
       switch in the header, remembered on the device, as on ITZA Chat.
       Dark only re-points the tokens (section 22), so components never
       restate a colour and the themes cannot drift apart.
     - ALL body copy is corporate navy (--ink-body, #0a2540 - near-black,
       the house text colour). Nothing is grey. Where a piece of
       text needs to feel secondary we change SIZE / WEIGHT / LETTER-SPACING or
       switch it to royal blue or gold-brown - never to grey.
     - No REMOTE fonts. The site is hosted on the ITZA chain, so it must not
       reach out to Google Fonts or any other CDN. The one font file it uses
       (Roboto, for the wordmark and headlines) ships inside the site.
     - The checkerboard motif (2x2 glyph on eyebrows, faint board texture in the
       hero) is the structural device that ties sections together.
   ========================================================================== */


/* ==========================================================================
   01  DESIGN TOKENS
   ========================================================================== */
:root {

  /* --- Surfaces (house palette: the same values as ITZA Chat's light theme) */
  --paper:        #ffffff;   /* cards, header                              */
  --ivory:        #f4f7f6;   /* page background                            */
  --ivory-deep:   #eaf0f5;   /* alternating band + footer                  */
  --tint-royal:   #e8f2ff;   /* very soft blue wash for callouts           */
  --tint-gold:    #fdf6d6;   /* very soft gold wash for callouts           */

  /* --- Ink (type). Corporate navy, never grey. ------------------------- */
  --ink:          #0a2540;   /* headings                                   */
  --ink-body:     #0a2540;   /* paragraphs                                 */

  /* --- Corporate blue. --royal is the readable ink on light (#0a63c9),
         --royal-bright the brand blue for fills and marks. ---------------- */
  --royal:        #0a63c9;
  --royal-bright: #0c7ffb;
  --royal-deep:   #0b2a4a;   /* corporate navy: dark bands, popovers       */
  --navy-night:   #04182c;   /* the machine layer: speed band, rail        */

  /* --- Brand gold. #f5c711 is graphic gold: fills and marks, never small
         text on light. Readable gold text is --gold-dk. ------------------- */
  --gold-lt:      #fbe48a;
  --gold:         #f5c711;
  --gold-dk:      #8f7205;
  --gold-metal:   linear-gradient(160deg, #ffe066 0%, #f5c711 46%, #d9ae0b 100%);

  /* --- The wordmark (house standard across every ITZA site) ----------- */
  --wm-blue:      #0c7ffb;
  --wm-gold:      #ad8009;   /* flat fallback: clears 3:1 on the page      */
  --wm-gold-metal: linear-gradient(105deg, #8a6206 0%, #c99a10 22%, #f9df6d 40%,
                   #f5c711 52%, #a67c08 72%, #e0b312 88%, #b98a0a 100%);

  /* --- Settlement green: the colour of "it landed" -------------------- */
  --live:         #158a52;
  --live-bright:  #3ddc84;

  /* --- Board (the app's default "Classic Green" theme) ----------------- */
  --sq-light:     #edeed2;
  --sq-dark:      #6e8f4e;
  --frame:        linear-gradient(155deg, #a67c3e, #6d4a1f 45%, #8f6531);

  /* --- Lines + shadows. Navy hairlines and navy-tinted shadows. ------- */
  --rule:         rgba(11, 42, 74, .11);
  --rule-strong:  rgba(11, 42, 74, .20);
  --shadow-sm:    0 1px 2px rgba(10, 37, 64, .06);
  --shadow-md:    0 2px 4px rgba(10, 37, 64, .05), 0 14px 30px -20px rgba(10, 37, 64, .40);
  --shadow-lg:    0 4px 10px rgba(10, 37, 64, .06), 0 34px 60px -34px rgba(10, 37, 64, .48);

  /* --- Type stacks. Roboto ships in fonts/; the rest resolve locally. -- */
  --font-display: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                  'Helvetica Neue', Arial, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                  'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', SFMono-Regular, 'Cascadia Mono',
                  Menlo, Consolas, 'Liberation Mono', monospace;

  /* --- Rhythm ---------------------------------------------------------- */
  --wrap:         1180px;   /* max content width                          */
  --gutter:       24px;
  --radius:       14px;
  --radius-lg:    22px;
  --section-y:    clamp(64px, 8vw, 116px);
}


/* Roboto, variable weight 100-900, latin subset. Self-hosted - the same file
   ITZA Chat and ITZA Tab ship - so the wordmark is identical on every ITZA
   site and the page still makes no third-party request. */
@font-face {
  font-family: 'Roboto'; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url('../fonts/roboto-latin.woff2') format('woff2');
}

/* ==========================================================================
   02  RESET + BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  transition: background .3s ease, color .3s ease;
  background: var(--ivory);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; border: 0; }
a   { color: var(--royal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--royal-bright); }

/* Keyboard focus must always be obvious. Applies site-wide. */
:focus-visible {
  outline: 3px solid var(--royal-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen-reader-only text (used on icon-only controls). */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link - first tab stop on every page. */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--royal-deep); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  font-weight: 600; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }


/* ==========================================================================
   03  TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 800;
  margin: 0 0 .5em;
  letter-spacing: -.028em;
  line-height: 1.08;
}
h1 { font-size: clamp(2.5rem, 5.8vw, 4.4rem); line-height: 1.02; letter-spacing: -.034em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -.032em; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; letter-spacing: -.018em; }
h4 { font-size: 1.06rem; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* Lead paragraph under a headline. */
.lead {
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  max-width: 62ch;
}

/* Eyebrow - the small label above a section title.
   The ::before is a 2x2 chessboard glyph, our structural motif. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-dk);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background:
    linear-gradient(45deg, transparent 49.5%, var(--gold) 50%) no-repeat,
    conic-gradient(var(--royal) 0 25%, transparent 0 50%, var(--royal) 0 75%, transparent 0);
  background-size: 100% 100%, 100% 100%;
  border-radius: 2px;
  opacity: .9;
}
.eyebrow.is-gold { color: var(--gold-dk); }
.eyebrow.is-blue { color: var(--royal); }

/* Headline highlight: the word runs in metal gold, as the hero word does on
   every ITZA site. Flat gold-dk is the fallback where clip:text is missing. */
.mark { color: var(--gold-dk); }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .mark {
    background-image: linear-gradient(94deg, #b8900a 6%, #e3b70f 44%, #9a7608);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}

/* Monospace inline data (ratings, block numbers, notation). */
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }

.section-head { max-width: 66ch; margin-bottom: clamp(34px, 4vw, 54px); }
.section-head.is-centred { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.is-centred .eyebrow { justify-content: center; }


/* ==========================================================================
   04  LAYOUT HELPERS
   ========================================================================== */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 860px; }

.section { padding: var(--section-y) 0; position: relative; }
.section--tint  { background: var(--ivory-deep); }
.section--paper { background: var(--paper); }

/* Hairline gold divider used between bands. */
.section--ruled { border-top: 1px solid var(--rule); }

/* Dark band. Used once, for the speed pitch - the one claim on the site that
   benefits from standing apart from everything around it. Text inside is
   white, per the site's rule that copy is never grey. */
.section--ink {
  background: linear-gradient(160deg, #0b2a4a 0%, #04182c 62%, #071f38 100%);
  color: #fff;
}
.section--ink h2, .section--ink h3, .section--ink p, .section--ink .lead { color: #fff; }
.section--ink .eyebrow.is-gold { color: var(--gold); }
.section--ink .btn-royal {
  background: var(--gold-metal); color: #20180a; border-color: transparent;
}
.section--ink .btn-royal:hover { color: #20180a; filter: brightness(1.06); }

/* Generic responsive grids. Collapse rules live in section 20. */
.grid      { display: grid; gap: 22px; }
.grid-2    { grid-template-columns: repeat(2, 1fr); }
.grid-3    { grid-template-columns: repeat(3, 1fr); }
.grid-4    { grid-template-columns: repeat(4, 1fr); }
.grid-tight{ gap: 16px; }

/* Two-column split: text beside a visual. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 68px);
  align-items: center;
}
.split > * { min-width: 0; }   /* let columns shrink instead of overflowing */
.split--wide-right { grid-template-columns: 0.86fr 1.14fr; }
.split--wide-left  { grid-template-columns: 1.14fr 0.86fr; }


/* ==========================================================================
   05  HEADER + NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 247, 246, .88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .25s ease, background .25s ease;
}
/* .is-stuck is added by js/main.js once the page scrolls. */
.site-header.is-stuck { box-shadow: 0 6px 24px -14px rgba(10, 37, 64, .45); }

.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
/* The pyramid is 180x147 (wider than tall): fix the HEIGHT, never square it. */
.brand img { height: 24px; width: auto; }

/* THE WORDMARK - house standard across every ITZA site: ITZAChess as one
   word, "ITZA" lighter and corporate blue, "Chess" bold and metal gold
   (a gradient painted through the letters; flat --wm-gold where
   background-clip:text is missing). Sized in em so it scales anywhere. */
.brand-word {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 1.22rem; font-weight: 600; color: var(--wm-blue);
  letter-spacing: -.022em; line-height: 1; white-space: nowrap;
}
.brand-word b { font-weight: 800; color: var(--wm-gold); }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .brand-word b {
    background-image: var(--wm-gold-metal);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; white-space: nowrap;
  padding: 9px 13px; border-radius: 8px;
  color: var(--ink-body); text-decoration: none;
  font-size: .95rem; font-weight: 500;
  transition: background .18s ease;
}
.nav a:hover { background: var(--tint-royal); color: var(--ink); }
/* Growing gold underline; also marks the current page via aria-current. */
.nav a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta { margin-left: 10px; }

/* Hamburger - only visible on small screens (see section 20). */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 38px;
  border: 1px solid var(--rule-strong); border-radius: 9px;
  background: var(--paper); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; display: block;
  width: 17px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }


/* ==========================================================================
   06  BUTTONS, PILLS, CHIPS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 100px;
  font-family: var(--font-body); font-size: .97rem; font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  max-width: 100%; text-align: center;
  overflow-wrap: anywhere;          /* a long label wraps instead of overflowing */
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* Primary: the metallic gold from the badge frames. */
.btn-gold {
  background: var(--gold-metal);
  color: #20180a;
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(245, 199, 17, .30);
}
.btn-gold:hover {
  color: #20180a;
  box-shadow: 0 16px 38px rgba(245, 199, 17, .40);
  transform: translateY(-2px);
}

/* Secondary: the house "acting" blue - the sign-in card's gradient. */
.btn-royal {
  background: linear-gradient(160deg, #0c7ffb, #1d6fd0); color: #fff; border-color: transparent;
  box-shadow: 0 10px 24px -12px rgba(12, 127, 251, .75);
}
.btn-royal:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); }

/* Tertiary: outline on paper. */
.btn-ghost {
  background: var(--paper); color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--gold); background: var(--tint-gold); color: var(--ink); }

.btn-sm { padding: 10px 20px; font-size: .86rem; }
.btn-lg { padding: 16px 30px; font-size: 1.03rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Small status pill. Colour carries meaning: gold = live, blue = info. */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink);
}
.pill--live   { border-color: rgba(245, 199, 17, .55); background: var(--tint-gold); color: var(--gold-dk); }
.pill--soon   { border-color: rgba(12, 127, 251, .28);  background: var(--tint-royal); color: var(--royal); }
.pill--dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}

/* Data chip - ratings, counts, versions. */
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 10px; border-radius: 7px;
  background: var(--tint-royal); border: 1px solid rgba(12, 127, 251, .16);
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--royal);
}
.chip--gold { background: var(--tint-gold); border-color: rgba(245, 199, 17, .35); color: var(--gold-dk); }


/* ==========================================================================
   07  HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(48px, 6vw, 84px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}
/* Ambient light: royal glow top-right, gold glow bottom-left. */
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto;
  width: 780px; height: 780px; pointer-events: none;
  background: radial-gradient(circle, rgba(12, 127, 251, .16), transparent 62%);
}
/* Faint chessboard texture - the motif, at 3% so it reads as paper grain. */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 8% 92%, rgba(245, 199, 17, .20), transparent 55%),
    repeating-conic-gradient(rgba(10, 37, 64, .03) 0% 25%, transparent 0% 50%);
  background-size: auto, 68px 68px;
}
.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}
.hero h1 { margin-bottom: .38em; }
.hero .lead { margin-bottom: 30px; }

/* Small reassurance line under the hero buttons. */
.hero-note {
  margin-top: 20px;
  font-size: .88rem;
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
}
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 15px; height: 15px; color: var(--gold-dk); flex: none; }


/* ==========================================================================
   08  THE LIVING BOARD  (signature element)
   --------------------------------------------------------------------------
   A scripted replay of a famous game. There is NO chess engine here: the move
   list is hard-coded coordinates in js/main.js and the board just moves pieces
   between squares. Purely decorative.
   ========================================================================== */
.board-stage { display: grid; gap: 16px; justify-items: center; }

/* Walnut frame around the playing surface. */
.board-frame {
  width: 100%; max-width: 470px;
  padding: 14px;
  border-radius: 16px;
  background: var(--frame);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.board {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: 5px; overflow: hidden;
  /* The light squares are this background; the dark ones are drawn by the
     .board-grid SVG injected by js/main.js. A CSS gradient was tried twice and
     both failed: the 45deg linear idiom draws diagonal stripes, and a conic
     tile antialiases its angular edges so Chrome and Edge render visibly
     uneven squares. Crisp-edged rects do not have either problem. */
  background-color: var(--sq-light);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}

/* Highlight squares for the move just played. */
.board-hl {
  position: absolute; width: 12.5%; height: 12.5%;
  background: rgba(246, 222, 149, .62);
  box-shadow: inset 0 0 0 2px rgba(245, 199, 17, .8);
  transition: left .38s ease, top .38s ease;
  pointer-events: none;
}

/* One node per piece, positioned by percentage and transitioned.
   The piece itself is an inline SVG (js/pieces.js) rather than a Unicode
   character, so it renders identically on every device instead of depending
   on whichever font the browser happens to substitute. */
.piece {
  position: absolute;
  width: 12.5%; height: 12.5%;
  display: flex; align-items: center; justify-content: center;
  transition: left .42s cubic-bezier(.34, .8, .3, 1),
              top  .42s cubic-bezier(.34, .8, .3, 1),
              opacity .2s ease;
  will-change: left, top;
  user-select: none; pointer-events: none;
}
.piece.is-gone { opacity: 0; }

/* The drawn checkerboard. One SVG of 32 rects with antialiasing switched off,
   injected by js/main.js. It replaced a conic-gradient, which rendered with
   soft, uneven square edges in Chrome and Edge because its boundaries are
   angular. Sits under the pieces and never takes a click. */
.board-grid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; pointer-events: none;
}
.board .board-grid rect        { fill: var(--sq-dark); }
.swatch-board .board-grid rect { fill: var(--s-dark); }

/* The shape itself. One set of paths serves both colours; only the fill and
   the outline change. The drop shadow lifts the piece off the square. */
.pc { width: 86%; height: 86%; display: block;
      stroke-linejoin: round; stroke-linecap: round; }
.pc.is-white { fill: #fdfdfb; stroke: #22262b; stroke-width: 1.35;
               filter: drop-shadow(0 1px 1.2px rgba(0, 0, 0, .42)); }
.pc.is-black { fill: #24272e; stroke: #05070b; stroke-width: 1.1;
               filter: drop-shadow(0 1px 1.2px rgba(0, 0, 0, .34)); }

/* Board caption + the little "block stamp" that ties a move to a transaction. */
.board-meta {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  align-items: center; justify-content: center;
  width: 100%; max-width: 470px;
}
.board-stamp {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px; border-radius: 9px;
  background: var(--paper); border: 1px solid var(--rule-strong);
  font-family: var(--font-mono); font-size: .76rem; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.board-stamp b { color: var(--royal); font-weight: 600; }
.board-stamp .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 199, 17, .22);
}
.board-caption { font-size: .82rem; text-align: center; max-width: 470px; }

/* Move ticker beside/below the board. */
.ticker {
  width: 100%; max-width: 470px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow-sm);
  font-family: var(--font-mono); font-size: .82rem;
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  min-height: 62px; align-content: flex-start;
}
.ticker i { font-style: normal; opacity: .55; }
.ticker b { font-weight: 600; }
.ticker .now {
  background: var(--tint-gold); border-radius: 5px;
  padding: 0 5px; box-shadow: inset 0 0 0 1px rgba(245, 199, 17, .5);
}


/* ==========================================================================
   09  STAT STRIP
   ========================================================================== */
.stat-strip {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.stat-strip .wrap {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0;
}
.stat {
  padding: 26px 16px; text-align: center;
  border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600; color: var(--ink); line-height: 1;
  margin-bottom: 7px;
}
.stat span {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase; color: var(--royal);
}


/* ==========================================================================
   10  CARDS + FEATURE GRID
   ========================================================================== */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card h3 { margin-bottom: .45em; }
.card p  { font-size: .95rem; }
.card--hover:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 199, 17, .5);
  box-shadow: var(--shadow-md);
}
.card--flush { padding: 0; overflow: hidden; }
.card--tint  { background: var(--tint-royal); border-color: rgba(12, 127, 251, .14); }
.card--gold  { background: var(--tint-gold);  border-color: rgba(245, 199, 17, .32); }

/* Icon tile at the top of a feature card. */
.icon-tile {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--tint-royal); border: 1px solid rgba(12, 127, 251, .16);
  color: var(--royal);
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile--gold {
  background: var(--tint-gold); border-color: rgba(245, 199, 17, .34); color: var(--gold-dk);
}

/* Tick list used inside cards and feature sections. */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 15px; height: 9px;
  border-left: 2.4px solid var(--gold-dk); border-bottom: 2.4px solid var(--gold-dk);
  transform: rotate(-45deg); border-radius: 1px;
}
.ticks--royal li::before { border-color: var(--royal); }

/* Definition rows - label on the left, value on the right. */
.deflist { display: grid; gap: 0; margin: 0; }
.deflist > div {
  display: flex; justify-content: space-between; gap: 18px;
  flex-wrap: wrap;                       /* wrap rather than force width open */
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.deflist dt, .deflist dd { min-width: 0; }
.deflist > div:last-child { border-bottom: 0; }
.deflist dt { font-weight: 600; margin: 0; }
.deflist dd { overflow-wrap: anywhere; margin: 0; font-family: var(--font-mono); font-size: .86rem; text-align: right; }

/* A pull-quote / callout block. */
.callout {
  border-left: 3px solid var(--gold);
  background: var(--tint-gold);
  padding: 20px 24px; border-radius: 0 12px 12px 0;
}
.callout--royal { border-left-color: var(--royal); background: var(--tint-royal); }
.callout--gold {
  border-left-color: var(--gold);
  background: rgba(245, 199, 17, .10);
  border-top: 1px solid rgba(245, 199, 17, .45);
  border-right: 1px solid rgba(245, 199, 17, .45);
  border-bottom: 1px solid rgba(245, 199, 17, .45);
}
.callout--gold h3 { color: var(--ink); }   /* navy on light, white on dark */
.callout p { font-size: .97rem; }


/* ==========================================================================
   11  BOARD THEMES + PIECE SETS
   ========================================================================== */
.swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

.swatch { text-align: center; }
.swatch-board {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--rule-strong); box-shadow: var(--shadow-sm);
  /* Same crisp-edged SVG grid as the main board; see the note there. */
  position: relative;
  background-color: var(--s-light);
  transition: transform .2s ease;
}
.swatch:hover .swatch-board { transform: translateY(-3px); }
.swatch-name {
  margin-top: 10px; font-size: .84rem; font-weight: 600;
}
.swatch-note { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em;
               text-transform: uppercase; color: var(--royal); }

/* The five shipped board themes. Values mirror the app's palettes. */
.theme-green    { --s-light: #edeed2; --s-dark: #6e8f4e; }
.theme-walnut   { --s-light: #efd9b4; --s-dark: #9d6b3f; }
.theme-brown    { --s-light: #f0d9b5; --s-dark: #b58863; }
.theme-slate    { --s-light: #dee3e6; --s-dark: #7a8b99; }
.theme-contrast { --s-light: #ffffff; --s-dark: #0a0a0a; }

/* Piece-set preview tiles. */
.pieceset {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.pieceset .card { text-align: center; padding: 18px 12px; }

/* Preview row. Drawn pieces on a slip of board, so the tile shows what the
   set actually looks like in play rather than a line of font characters. */
.pieceset-row {
  display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  padding: 6px 4px; margin-bottom: 12px;
  border-radius: 8px; background: var(--sq-light);
  border: 1px solid var(--rule-strong);
}
.pieceset-row .pc { width: 30px; height: 30px; }
.pieceset-row.is-letters {
  font-family: var(--font-display); font-size: 1.32rem; font-weight: 700;
  letter-spacing: .16em; color: var(--ink);
  padding: 13px 4px; gap: 0;
}


/* ==========================================================================
   11b  APP SCREENSHOTS
   --------------------------------------------------------------------------
   Real captures of the running app. Framed rather than dropped flat on the
   page, so a screenshot never reads as part of this site's own interface.
   ========================================================================== */
.shot {
  margin: 0; border-radius: 14px; overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-md);
}
.shot img { width: 100%; height: auto; display: block; }
.shot figcaption {
  padding: 11px 16px 13px;
  border-top: 1px solid var(--rule);
  background: var(--ivory);
  font-size: .81rem; line-height: 1.45;
}
.shot figcaption b { color: var(--royal); }

/* A screenshot used as the wide half of a split section. */
.shot--lead { margin-top: 6px; }

/* Two screenshots side by side. */
.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 780px) { .shot-pair { grid-template-columns: 1fr; } }


/* ==========================================================================
   11c  SPEED COMPARISON
   ========================================================================== */

/* The settlement-figure stack beside the home page speed pitch. */
.stat-stack { display: grid; gap: 12px; align-content: start; }
.stat-big {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 18px; border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
}
.stat-big b {
  font-family: var(--font-mono); font-size: 1.42rem; font-weight: 700;
  color: var(--gold); letter-spacing: -.01em; min-width: 104px;
}
.stat-big span { font-size: .88rem; color: #fff; opacity: .9; }
/* The first row is ours, so it gets the emphasis. */
.stat-big:first-child { background: rgba(245, 199, 17, .14); border-color: var(--gold); }
.stat-big:first-child b { font-size: 1.78rem; }

/* The settlement table. Our row is marked so the eye lands on it. */
.table-wrap {
  /* max-width is what makes overflow-x actually scroll: without it the wrapper
     just grows to the table's width and takes the page with it. */
  overflow-x: auto; max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
/* Base styling. Modelled on table.compare so the two tables on the site match,
   with column widths set explicitly: the notes column takes the slack and the
   first two stay tight to their content. */
.ratings-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.ratings-table th, .ratings-table td {
  padding: 14px 18px; text-align: left; vertical-align: top;
}
.ratings-table thead th {
  background: var(--royal-deep); color: #fff;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
}
.ratings-table tbody tr + tr { border-top: 1px solid var(--rule); }
.ratings-table tbody tr:nth-child(even) { background: var(--ivory); }
.ratings-table td { font-size: .93rem; }
.ratings-table td:first-child  { font-weight: 600; white-space: nowrap; }
/* the figure column: monospace so the numbers line up, and it never wraps */
.ratings-table td:nth-child(2) {
  font-family: var(--font-mono); font-size: .88rem; white-space: nowrap;
}
/* the notes column absorbs the remaining width */
.ratings-table th:last-child, .ratings-table td:last-child { width: 99%; }

.ratings-table tr.is-us { background: rgba(245, 199, 17, .14); }
.ratings-table tr.is-us td { border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }
.ratings-table caption {
  caption-side: top; text-align: left;
  padding: 16px 18px 14px;
  font-size: .84rem; line-height: 1.5; color: var(--ink);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}


/* --- Teaching-colour legend (learn page) ------------------------------
   Mirrors the scale the app dots each legal destination square with, from a
   blunder in red through to a great move in green. */
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}
.legend-dot {
  width: 13px; height: 13px; border-radius: 50%;
  display: inline-block; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18) inset;
}
.dot-blunder { background: #c0392b; }
.dot-weak    { background: #e07a3f; }
.dot-ok      { background: #e3b23c; }
.dot-good    { background: #8bb04a; }
.dot-great   { background: #4a8f3c; }


/* ==========================================================================
   12  OPPONENT ROSTER
   ========================================================================== */
.roster { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.roster--wide { grid-template-columns: repeat(4, 1fr); }

.fighter {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .24s ease, box-shadow .24s ease;
}
.fighter:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.fighter-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivory-deep); }
.fighter-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.fighter:hover .fighter-photo img { transform: scale(1.045); }
/* Scrim so the name stays legible over any photo. */
.fighter-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 10, 26, .88) 0%, rgba(6, 10, 26, .35) 30%, transparent 58%);
}

.fighter-level {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em;
  padding: 4px 9px; border-radius: 6px;
  background: var(--gold-metal); color: #33240a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.fighter-rating {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(255, 255, 255, .92); color: var(--royal-deep);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.fighter-name {
  position: absolute; left: 14px; right: 14px; bottom: 11px; z-index: 2;
  color: #fff; font-family: var(--font-display);
  font-size: 1.06rem; font-weight: 600; line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.fighter-name em {
  display: block; font-style: normal;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-lt); margin-top: 4px;
}
.fighter-body { padding: 15px 16px 18px; }
.fighter-body p { font-size: .89rem; margin: 0; }

/* Level / style / rating, stated as three separate facts. The engine level and
   the opponent's rating are different things and the app treats them that way:
   two opponents can sit on the same level with different ratings. */
.fighter-meta {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--royal);
  margin-bottom: 9px !important; padding-bottom: 9px;
  border-bottom: 1px solid var(--rule);
}
.fighter-meta i { color: var(--gold-dk); font-style: normal; padding: 0 3px; }


/* ==========================================================================
   13  BADGES
   ========================================================================== */
/* The badge PNGs sit on a white plate. `multiply` removes that plate against
   any light surface while keeping the artwork's own drop shadow. */
.badge-shelf {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px;
  align-items: end;
}
.badge {
  text-align: center;
  transition: transform .22s ease;
}
.badge:hover { transform: translateY(-6px) scale(1.04); }
.badge img { width: 100%; mix-blend-mode: multiply; }
.badge span {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 600;
  letter-spacing: .06em; color: var(--ink);
}
.badge-card { text-align: center; }
.badge-card img { width: 100%; max-width: 190px; margin: 0 auto 12px; mix-blend-mode: multiply; }
.badge-card h4 { margin-bottom: .25em; }
.badge-card p  { font-size: .87rem; }

/* The "not yet won" note under the shelf. The blank shield sits beside the
   copy rather than in the grid, so the nine real badges stay in clean rows. */
.locked-note {
  display: grid; grid-template-columns: 118px 1fr;
  gap: 22px; align-items: center;
  max-width: 640px; margin: 34px auto 0;
  padding: 18px 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.locked-note img { width: 100%; mix-blend-mode: multiply; }
.locked-note p   { margin: 0; font-size: .93rem; }

@media (max-width: 560px) {
  .locked-note { grid-template-columns: 84px 1fr; gap: 16px; padding: 16px 18px; }
}


/* ==========================================================================
   14  NUMBERED STEPS   (only used where order genuinely matters)
   ========================================================================== */
.steps { display: grid; gap: 20px; counter-reset: step; }
.steps--4 { grid-template-columns: repeat(4, 1fr); }

.step {
  position: relative; padding-top: 18px;
  border-top: 2px solid var(--rule-strong);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 10px;
  font-family: var(--font-display); font-size: 2.1rem; font-weight: 600;
  line-height: 1; color: transparent;
  -webkit-text-stroke: 1.4px var(--gold-dk);
}
.step h3 { font-size: 1.1rem; margin-bottom: .4em; }
.step p  { font-size: .93rem; }


/* ==========================================================================
   15  COMPARISON TABLE
   ========================================================================== */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
table.compare { width: 100%; border-collapse: collapse; min-width: 620px; }
table.compare th, table.compare td { padding: 15px 18px; text-align: left; }
table.compare thead th {
  background: var(--royal-deep); color: #fff;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
table.compare thead th:first-child { border-radius: 0; }
table.compare tbody tr { border-top: 1px solid var(--rule); }
table.compare tbody tr:nth-child(even) { background: var(--ivory); }
table.compare td:first-child { font-weight: 600; }
table.compare td { font-size: .93rem; }
.yes, .no { font-family: var(--font-mono); font-weight: 700; }
.yes { color: var(--gold-dk); }
.no  { color: var(--royal); }


/* ==========================================================================
   16  NEWS
   --------------------------------------------------------------------------
   Both the 3-item preview on the home page and the full archive on news.html
   are rendered by js/news.js from ONE array, so they can never drift apart.
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.post-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 24px;
  text-decoration: none; color: var(--ink-body);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.post-card:hover {
  transform: translateY(-3px); color: var(--ink-body);
  border-color: rgba(245, 199, 17, .5); box-shadow: var(--shadow-md);
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-date {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .06em; color: var(--ink);
}
.post-tag {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--tint-royal); color: var(--royal);
  border: 1px solid rgba(12, 127, 251, .16);
}
.post-tag[data-tag="Release"]  { background: var(--tint-gold); color: var(--gold-dk); border-color: rgba(217,166,46,.4); }
.post-tag[data-tag="Fix"]      { background: #fdf1ec; color: #9a4220; border-color: rgba(154,66,32,.24); }
.post-tag[data-tag="On-chain"] { background: #eaf4ec; color: #1d6134; border-color: rgba(29,97,52,.22); }
.post-card h3 { font-size: 1.16rem; margin: 0; }
.post-card p  { font-size: .92rem; margin: 0; }
.post-more {
  margin-top: auto; padding-top: 4px;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--royal);
}

/* Full archive: a dated rail down the left. */
.timeline { position: relative; display: grid; gap: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 118px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--gold), rgba(245, 199, 17, .12));
}
.entry { display: grid; grid-template-columns: 118px 1fr; gap: 34px; position: relative; }
.entry-date {
  /* 22px of right padding, not 4: the dot is centred on the 118px rule and is
     12px across, so it starts at 113px. At 4px the day number collided with
     it. This keeps the number clear of the dot at every size. */
  text-align: right; padding-right: 22px;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--ink);
  padding-top: 3px;
}
.entry-date b { display: block; font-size: 1.5rem; font-family: var(--font-display); line-height: 1; }
.entry::before {
  content: ""; position: absolute; left: 113px; top: 12px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px var(--ivory), 0 0 0 5px rgba(245, 199, 17, .35);
}
.entry-body {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-sm);
}
.entry-body h3 { margin-bottom: .35em; }
.entry-body p { font-size: .95rem; }
.entry-body .ticks { margin-top: 14px; }

/* Category filter buttons on news.html */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter {
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  transition: background .18s ease, border-color .18s ease;
}
.filter:hover { border-color: var(--gold); background: var(--tint-gold); }
.filter[aria-pressed="true"] {
  background: var(--royal-deep); border-color: var(--royal-deep); color: #fff;
}


/* ==========================================================================
   17  FAQ ACCORDION
   ========================================================================== */
.faq { display: grid; gap: 12px; }
.qa {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden;
}
.qa-q {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border: 0; background: none;
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; color: var(--ink);
}
.qa-q::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.3rem;
  color: var(--gold-dk); flex: none; transition: transform .22s ease;
}
.qa-q[aria-expanded="true"]::after { transform: rotate(45deg); }
.qa-a { padding: 0 22px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.qa-a p { font-size: .95rem; }
.qa.is-open .qa-a { padding: 0 22px 20px; max-height: 640px; }


/* ==========================================================================
   18  CALL TO ACTION BAND
   ========================================================================== */
/* Gold on corporate navy - the house signature pairing (pillar 10). */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0b2a4a 0%, #04182c 70%);
  color: #fff;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--royal-bright), var(--gold)) 1;
  padding: clamp(56px, 6.5vw, 92px) 0;
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, .025) 0% 25%, transparent 0% 50%);
  background-size: 56px 56px;
}
.cta-band h2, .cta-band .lead, .cta-band p { color: #fff; }
.cta-band .btn-ghost { background: rgba(255, 255, 255, .05); color: #fff; border-color: rgba(255, 255, 255, .28); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .10); border-color: var(--gold); color: #fff; }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.cta-band .lead { margin: 0 auto 28px; }
.cta-band .btn-row { justify-content: center; }
.cta-logo { height: 50px; width: auto; margin: 0 auto 20px; }


/* ==========================================================================
   19  FOOTER
   ========================================================================== */
.site-footer {
  background: var(--ivory-deep);
  border-top: 1px solid var(--rule-strong);
  padding: clamp(48px, 5vw, 72px) 0 30px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px;
  padding-bottom: 34px; border-bottom: 1px solid var(--rule-strong);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand-word { font-size: 1.12rem; }
.footer-brand p { font-size: .9rem; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--royal);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--ink-body); text-decoration: none; font-size: .93rem; }
.footer-col a:hover { color: var(--royal); text-decoration: underline; }

.socials { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.socials a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--rule-strong); color: var(--ink);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.socials a:hover { transform: translateY(-2px); border-color: var(--gold); background: var(--tint-gold); }
.socials svg { width: 18px; height: 18px; }

.footer-base {
  padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 26px;
  align-items: center; justify-content: space-between;
  font-size: .85rem;
}
.footer-base nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-base a { color: var(--ink-body); text-decoration: none; }
.footer-base a:hover { text-decoration: underline; }


/* ==========================================================================
   20  UTILITIES, MOTION, RESPONSIVE, ACCESSIBILITY
   ========================================================================== */
.u-centre     { text-align: center; }

/* Small-type steps. Used for the one-line footnotes under a card's heading --
   e.g. "Never affects any rating." on the game-mode cards. Kept here rather
   than as style="" on the tag so that every page stays free of inline CSS. */
.u-fs-xs      { font-size: .85rem; }
.u-fs-sm      { font-size: .88rem; }
.u-fs-md      { font-size: .94rem; }

/* Centres a fixed-width block (an icon tile) inside a centred card. */
.u-row-centre { display: flex; justify-content: center; }

.u-mt-0       { margin-top: 0; }
.u-mt-24      { margin-top: 24px; }
.u-mt-40      { margin-top: 40px; }
.u-mb-40      { margin-bottom: 40px; }
/* Small print under a section. Secondary by SIZE, not by fading to grey. */
.u-small      { font-size: .84rem; line-height: 1.6; }
.u-mb-0       { margin-bottom: 0; }
.u-max-60     { max-width: 60ch; }
.u-centre-x   { margin-left: auto; margin-right: auto; }

/* Page header used on every inner page. */
.page-head {
  padding: clamp(44px, 5vw, 72px) 0 clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(circle at 88% 0%, rgba(12, 127, 251, .12), transparent 55%),
    var(--ivory);
}
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-top: 4px; }

/* Scroll reveal. js/main.js adds .is-in when the element enters the viewport. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* --- Breakpoints ------------------------------------------------------- */
@media (max-width: 1040px) {
  .roster       { grid-template-columns: repeat(3, 1fr); }
  .roster--wide { grid-template-columns: repeat(3, 1fr); }
  .stat-strip .wrap { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3n) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
}

/* Nine links and Play now need about 1100px on one line, so the nav
   collapses below 1120px - before that the labels broke onto two lines. */
@media (max-width: 1120px) {
  /* Nav collapses into a dropdown panel toggled by .nav-toggle */
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 12px var(--gutter) 20px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1rem; }
  .nav a::after { display: none; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 900px) {
  .hero-grid   { grid-template-columns: 1fr; }
  .split,
  .split--wide-right,
  .split--wide-left { grid-template-columns: 1fr; }
  /* stack definition pairs so neither can force the row wider than the screen */
  .deflist > div { flex-direction: column; gap: 4px; }
  .deflist dd    { text-align: left; }
  .grid-4      { grid-template-columns: repeat(2, 1fr); }
  .grid-3      { grid-template-columns: repeat(2, 1fr); }
  .steps--4    { grid-template-columns: repeat(2, 1fr); }
  .news-grid   { grid-template-columns: 1fr; }
  .swatch-grid { grid-template-columns: repeat(3, 1fr); }
  .badge-shelf { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .pieceset    { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body        { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .roster, .roster--wide    { grid-template-columns: repeat(2, 1fr); }
  .steps--4   { grid-template-columns: 1fr; }
  .swatch-grid{ grid-template-columns: repeat(2, 1fr); }
  .stat-strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat       { padding: 20px 10px; border-bottom: 1px solid var(--rule); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(3n) { border-right: 1px solid var(--rule); }
  .stat:nth-child(2n) { border-right: 0; }
  .footer-grid{ grid-template-columns: 1fr; }
  .card       { padding: 22px; }

  /* News timeline stacks: date above the card. */
  .timeline::before { display: none; }
  .entry      { grid-template-columns: 1fr; gap: 10px; }
  .entry::before { display: none; }
  .entry-date { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .entry-date b { font-size: 1.2rem; }
}

/* --- Respect the OS "reduce motion" setting ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Print ------------------------------------------------------------- */
@media print {
  .site-header, .cta-band, .board-stage, .socials { display: none; }
  body { background: #fff; }
  .card, .entry-body { box-shadow: none; border-color: #ccc; }
}


/* ==========================================================================
   21  THE SPEED BAND + SETTLEMENT RAIL
   --------------------------------------------------------------------------
   ITZA Chess runs on cluster 60000 "Flower" of the ITZA main network, the cluster that
   settles in 5ms (owner, 2026-11-19: cluster 60000 "Flower"). That number is the reason a chain can referee
   bullet chess, so it is stated at the top of EVERY page (.speed-band), first
   in the home hero (.speed-card) and under the demo board (.rail).
   The machine layer is dark navy on every page, and that contrast is the
   point: the chess is light and friendly, the chain underneath it is not.
   ========================================================================== */
.speed-band {
  background: var(--navy-night); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: .8rem; line-height: 1.3;
}
.speed-band .wrap {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 12px; min-height: 36px; padding-top: 6px; padding-bottom: 6px;
  text-align: center;
}
.speed-band .sb-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--live-bright);
}
.speed-band .sb-num {
  font-family: var(--font-display); font-weight: 800; font-size: .98rem;
  letter-spacing: -.02em; color: var(--gold);
}
.speed-band a { color: #9fcbff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.speed-band a:hover { color: #fff; text-decoration: underline; }

/* The live dot: settlement green, with a slow pulse (off under reduced motion). */
.dot-live {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--live-bright); animation: live-pulse 2.4s infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* Home hero: the number itself, big. */
.speed-card {
  display: flex; align-items: center; gap: 18px;
  margin: 26px 0 0; padding: 16px 22px 16px 18px;
  background: var(--navy-night); color: #fff;
  border-radius: 18px; max-width: 520px;
  box-shadow: 0 22px 48px -24px rgba(4, 24, 44, .75);
  border: 1px solid rgba(255, 255, 255, .06);
  position: relative; overflow: hidden;
}
.speed-card::after {          /* the house hairline: blue into gold */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--royal-bright), var(--gold));
}
.speed-card .sc-num {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.6rem, 5vw, 3.4rem); line-height: .9; letter-spacing: -.045em;
  color: var(--gold); flex: none;
}
.speed-card .sc-num small { font-size: .5em; font-weight: 800; letter-spacing: -.02em; margin-left: 2px; }
.speed-card .sc-text { font-size: .9rem; line-height: 1.45; color: #fff; }
.speed-card .sc-text b { display: block; font-size: 1rem; margin-bottom: 2px; }
.speed-card .sc-live {
  display: flex; align-items: center; gap: 7px; margin-top: 6px;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--live-bright);
}

/* Under the demo board: the chain's side of the game, line by line. */
.rail {
  width: 100%; max-width: 470px;
  background: var(--navy-night); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px; padding: 13px 16px;
  font-family: var(--font-mono); font-size: .72rem; line-height: 1.75; color: #fff;
  box-shadow: var(--shadow-md);
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: rgba(255, 255, 255, .62); letter-spacing: .13em; text-transform: uppercase;
  font-size: .6rem; padding-bottom: 9px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.rail-head span { display: inline-flex; align-items: center; gap: 8px; }
.rail-head b { color: var(--gold); font-weight: 700; letter-spacing: .06em; }
.rail-log { min-height: 84px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.rl { display: flex; gap: 10px; white-space: nowrap; overflow: hidden; animation: rl-in .3s ease both; }
@keyframes rl-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.rl .blk { color: rgba(255, 255, 255, .5); flex: none; }
.rl .mv  { color: #9fcbff; min-width: 5.5em; }
.rl .ok  { color: var(--live-bright); margin-left: auto; flex: none; }
.rl .ms  { color: var(--gold); flex: none; }

/* The speed comparison on a dark band: ITZA's row stands out in gold. */
.stat-big.is-us b { color: var(--gold); }
.stat.is-speed b  { color: var(--royal); }

@media (max-width: 640px) {
  .speed-band { font-size: .74rem; }
  .speed-band .sb-more { display: none; }
  .speed-card { gap: 14px; padding: 14px 16px; }
  .rl .ok { display: none; }
}


/* ==========================================================================
   22  DARK THEME + THE THEME SWITCH
   --------------------------------------------------------------------------
   <html data-theme="dark">, set by the small script in every page's head
   (before first paint, so a dark visitor never sees a light flash) and by
   the switch (js/main.js). The values are ITZA Chat's dark theme. The board,
   the opponent portraits and the badge art keep their own colours: they are
   pictures of the app, and the app's board is the same in either theme.
   ========================================================================== */
:root[data-theme="dark"] {
  --paper:        #0b2440;
  --ivory:        #04182c;
  --ivory-deep:   #071f38;
  --tint-royal:   rgba(12, 127, 251, .12);
  --tint-gold:    rgba(245, 199, 17, .09);

  --ink:          #ffffff;
  --ink-body:     #e8eef5;

  --royal:        #6bb2ff;
  --royal-bright: #4d9bff;
  --royal-deep:   #0b2a4a;
  --navy-night:   #021120;

  --gold-lt:      rgba(245, 199, 17, .30);
  --gold-dk:      #f5c711;

  --wm-blue:      #4d9bff;
  --wm-gold:      #f5c711;
  --wm-gold-metal: linear-gradient(105deg, #b98a0a 0%, #f5c711 25%, #ffe98a 42%,
                   #f5c711 55%, #c99a10 75%, #ffd83d 90%, #e0b312 100%);

  --live:         #3ddc84;

  --rule:         rgba(255, 255, 255, .11);
  --rule-strong:  rgba(255, 255, 255, .20);
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, .30);
  --shadow-md:    0 2px 4px rgba(0, 0, 0, .25), 0 14px 30px -20px rgba(0, 0, 0, .70);
  --shadow-lg:    0 4px 10px rgba(0, 0, 0, .30), 0 34px 60px -34px rgba(0, 0, 0, .80);
  color-scheme: dark;
}
:root[data-theme="dark"] .site-header { background: rgba(4, 24, 44, .88); }
:root[data-theme="dark"] .mark {
  color: var(--gold);
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  :root[data-theme="dark"] .mark {
    background-image: linear-gradient(94deg, #f5c711 12%, #ffe98a 52%, #c9a00c);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}
/* the hero's faint board texture and glows, re-lit for a dark page */
:root[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(12, 127, 251, .20), transparent 62%);
}
:root[data-theme="dark"] .hero::after {
  background-image:
    radial-gradient(circle at 8% 92%, rgba(245, 199, 17, .10), transparent 55%),
    repeating-conic-gradient(rgba(255, 255, 255, .025) 0% 25%, transparent 0% 50%);
  background-size: auto, 68px 68px;
}
/* the machine layer is dark in BOTH themes; on a dark page it needs an edge */
:root[data-theme="dark"] .speed-card,
:root[data-theme="dark"] .rail { border-color: rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .section--ink { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
:root[data-theme="dark"] .post-tag[data-tag="Fix"]      { background: rgba(224, 122, 63, .14); color: #ffb48a; border-color: rgba(224, 122, 63, .35); }
:root[data-theme="dark"] .post-tag[data-tag="On-chain"] { background: rgba(61, 220, 132, .12); color: #7fe7ad; border-color: rgba(61, 220, 132, .32); }
:root[data-theme="dark"] .btn-ghost { background: rgba(255, 255, 255, .04); }
:root[data-theme="dark"] .btn-ghost:hover { background: rgba(245, 199, 17, .08); }
:root[data-theme="dark"] .nav-toggle { background: var(--paper); }
:root[data-theme="dark"] img.cta-logo,
:root[data-theme="dark"] .brand img { filter: drop-shadow(0 0 10px rgba(245, 199, 17, .18)); }

/* The switch - the same control as ITZA Chat's: a sliding gold sun that
   becomes a silver moon. A real button, labelled, with its state in
   aria-pressed (true = dark). */








@media print { :root[data-theme="dark"] { color-scheme: light; } }


button.site-mode {
  display:inline-grid; place-items:center; width:40px; height:40px; flex:0 0 40px;
  margin:0; padding:0; border:1px solid currentColor; border-radius:6px;
  background:transparent; color:inherit; cursor:pointer;
}
button.site-mode:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.site-mode svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.site-mode .mode-sun, [data-theme="dark"] .site-mode .mode-moon { display:none; }
[data-theme="dark"] .site-mode .mode-sun { display:block; }

.btn, .pill, .filter, .post-tag, .nav-toggle, .board-stamp { border-radius:6px; }

.nav a.btn, .socials a { border-radius:6px; }
