@charset "UTF-8";
/* ==========================================================================
   ARROW PUZZLE — SITE STYLESHEET
   Single consolidated stylesheet. Mobile-first: base rules target the
   smallest viewport, then min-width queries layer up at 480 / 768 / 1024 / 1280.

   CONTENTS
     01  Design tokens
     02  Reset and base
     03  Utilities
     04  Buttons
     05  Layout primitives
     06  Skip link, header, primary navigation
     07  Breadcrumbs
     08  Hero
     09  Cards, grids and sections
     10  Silhouette shape gallery
     11  Difficulty ramp
     12  FAQ accordion
     13  Play page and game shell
     14  Policy layout
     15  Footer
     16  Sticky CTA and storage notice
     17  Reduced motion and forced colours
   ========================================================================== */

/* ==========================================================================
   01  DESIGN TOKENS
   --------------------------------------------------------------------------
   CONTRAST NOTES (WCAG 2.1, computed against --bg-sand #f5eedb)

     --line-brown   #664b38 on sand   6.90:1   passes AA body text
     --text-muted   #7a6252 on sand   4.91:1   passes AA body text
     --text-subtle  #8c7360 on sand   3.83:1   LARGE TEXT ONLY (>=18px or
                                               bold >=14px) and borders
     --accent-blue  #00a0ff on sand   2.43:1   NEVER as text, never behind
                                               text. Decorative fills and
                                               canvas arrow strokes only.
     white on --accent-action #0076c0 4.82:1   passes AA. Use this for every
                                               filled button carrying a label.
     white on --accent-blue           2.81:1   FAILS. Do not pair.
   ========================================================================== */
:root {
  /* Surfaces */
  --bg-sand:      #f5eedb;
  --panel-sand:   #ebdcb9;
  --card-bg:      #fffdf9;
  --card-bg-alt:  #fbf6ea;

  /* Ink */
  --line-brown:    #664b38;
  --line-brown-dk: #4a3424;
  --text-muted:    #7a6252;
  --text-subtle:   #8c7360;

  /* Accent */
  --accent-blue:   #00a0ff;  /* brand / decorative only  */
  --accent-action: #0076c0;  /* filled buttons with text */
  --accent-deep:   #005c96;  /* pressed + button underside */
  --accent-wash:   #e5f4ff;

  /* Semantic */
  --hint-amber:  #ff9f1c;
  --danger-red:  #c1352b;
  --success:     #1f7a4d;

  /* Hairlines */
  --border-soft:   rgba(102, 75, 56, .14);
  --border-strong: rgba(102, 75, 56, .28);

  /* Spacing — 4px base */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;  --sp-5: 24px;
  --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;  --sp-9: 96px;  --sp-10: 128px;

  /* Radius */
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 18px;  --r-xl: 24px;  --r-pill: 999px;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   clamp(1.25rem,  1rem + 1vw,    1.5rem);
  --fs-2xl:  clamp(1.5rem,   1.2rem + 1.5vw, 2rem);
  --fs-3xl:  clamp(1.875rem, 1.4rem + 2.4vw, 2.5rem);
  --fs-4xl:  clamp(2.25rem,  1.5rem + 4vw,   3.5rem);

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-body:  1.65;

  /* Shadows — brown-tinted so elevation reads warm */
  --sh-sm:   0 2px 6px rgba(102, 75, 56, .08);
  --sh-md:   0 8px 24px rgba(102, 75, 56, .10);
  --sh-lg:   0 16px 40px rgba(102, 75, 56, .14);
  --sh-well: inset 0 2px 5px rgba(102, 75, 56, .16);
  --press-up: 0 4px 0 var(--accent-deep);
  --press-dn: 0 1px 0 var(--accent-deep);
  --press-up-brown: 0 4px 0 var(--line-brown-dk);
  --press-dn-brown: 0 1px 0 var(--line-brown-dk);

  /* Motion */
  --dur-fast: 120ms;
  --dur-base: 240ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  /* Layout */
  --wrap:        1140px;
  --wrap-narrow: 720px;
  --gutter:      clamp(16px, 4vw, 32px);
  --header-h:    64px;
}

/* ==========================================================================
   02  RESET AND BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  margin: 0;
  background: var(--bg-sand);
  color: var(--line-brown);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-3);
  color: var(--line-brown-dk);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); font-weight: 800; }
h2 { font-size: var(--fs-3xl); font-weight: 800; }
h3 { font-size: var(--fs-xl);  font-weight: 700; }
h4 { font-size: var(--fs-lg);  font-weight: 700; }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--line-brown-dk); }

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }

strong, b { font-weight: 700; color: var(--line-brown-dk); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--panel-sand);
  padding: .12em .4em;
  border-radius: var(--r-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: var(--sp-6) 0;
}

table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td {
  text-align: left;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
th { color: var(--line-brown-dk); font-weight: 700; }

/* Focus: always visible, never removed without replacement. */
:focus-visible {
  outline: 3px solid var(--accent-action);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-wash); color: var(--line-brown-dk); }

/* ==========================================================================
   03  UTILITIES
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon { flex: none; vertical-align: middle; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 60ch;
}

.section-head { margin-bottom: var(--sp-6); max-width: 62ch; }
.section-head .lead { margin-bottom: 0; }

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust-chips li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
}
.trust-chips .icon { color: var(--success); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--panel-sand);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--line-brown-dk);
}
.pill--accent { background: var(--accent-wash); color: var(--accent-deep); }

/* Water-drop life pips, mirroring the extension HUD. */
.drop-pips { display: inline-flex; gap: 3px; }
.drop-pip path { fill: #d8cbb8; }
.drop-pip.is-lit path { fill: var(--accent-blue); }

/* ==========================================================================
   04  BUTTONS
   Pressable: a hard underside shadow that collapses on activation.
   ========================================================================== */
.btn {
  --btn-bg: var(--accent-action);
  --btn-fg: #fff;
  --btn-shadow: var(--press-up);
  --btn-shadow-active: var(--press-dn);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  min-width: 48px;
  padding: var(--sp-3) var(--sp-5);
  border: 0;
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.btn:hover { color: var(--btn-fg); }
.btn:active {
  transform: translateY(2px);
  box-shadow: var(--btn-shadow-active);
}

.btn--solid { --btn-bg: var(--accent-action); }
.btn--solid:hover { background: var(--accent-deep); }

.btn--brown {
  --btn-bg: var(--line-brown);
  --btn-shadow: var(--press-up-brown);
  --btn-shadow-active: var(--press-dn-brown);
}
.btn--brown:hover { background: var(--line-brown-dk); }

.btn--ghost {
  --btn-bg: var(--card-bg);
  --btn-fg: var(--line-brown-dk);
  --btn-shadow: 0 3px 0 var(--border-strong);
  --btn-shadow-active: 0 1px 0 var(--border-strong);
  border: 1px solid var(--border-soft);
}
.btn--ghost:hover { background: #fff; }

.btn--lg { min-height: 56px; padding: var(--sp-4) var(--sp-6); font-size: var(--fs-lg); }
.btn--sm { min-height: 44px; padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }
.btn--block { width: 100%; }

.btn[aria-disabled="true"],
.btn.is-pending {
  cursor: default;
  box-shadow: none;
  background: var(--panel-sand);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}
.btn.is-pending:active { transform: none; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* Store buttons */
.store-btn { text-align: left; }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.25; }
.store-btn__note {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
}
.store-glyph { flex: none; }

/* ==========================================================================
   05  LAYOUT PRIMITIVES
   ========================================================================== */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-6); }
.section--panel { background: var(--panel-sand); }
.section--card {
  background: var(--card-bg-alt);
  border-block: 1px solid var(--border-soft);
}

@media (min-width: 768px) {
  .section { padding-block: var(--sp-9); }
  .section--tight { padding-block: var(--sp-7); }
}

/* ==========================================================================
   06  SKIP LINK, HEADER, PRIMARY NAVIGATION
   ========================================================================== */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--accent-action);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 238, 219, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--line-brown-dk);
}
.brand-mark { flex: none; }
.brand-word {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Hamburger: a real button, 48x48 target */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--card-bg);
  color: var(--line-brown-dk);
  cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

/* Mobile: nav is a drawer below the header bar. */
.primary-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  display: none;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--gutter) var(--sp-5);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--sh-md);
}
.primary-nav.is-open { display: flex; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list li { margin: 0; }

.nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--line-brown);
  font-weight: 600;
  text-decoration: none;
}
.nav-link:hover { background: rgba(102, 75, 56, .07); color: var(--line-brown-dk); }
.nav-link.is-current {
  background: rgba(102, 75, 56, .1);
  color: var(--line-brown-dk);
  font-weight: 700;
}
.nav-link--accent {
  background: var(--accent-action);
  color: #fff;
  box-shadow: var(--press-up);
}
.nav-link--accent:hover { background: var(--accent-deep); color: #fff; }
.nav-link--accent.is-current { background: var(--accent-deep); color: #fff; }

.nav-stores {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-soft);
}

@media (min-width: 1024px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-5);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-list { flex-direction: row; align-items: center; gap: var(--sp-1); }
  .nav-link { min-height: 40px; font-size: var(--fs-sm); white-space: nowrap; }
  .nav-stores {
    flex-direction: row;
    padding-top: 0;
    border-top: 0;
  }
  .nav-stores .store-btn { min-height: 42px; padding-inline: var(--sp-3); }
  .nav-stores .store-btn__text { font-size: var(--fs-sm); }
}

/* ==========================================================================
   07  BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  padding-block: var(--sp-4) 0;
  font-size: var(--fs-sm);
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin: 0;
  color: var(--text-muted);
}
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--line-brown-dk); }
.breadcrumb-item [aria-current="page"] { color: var(--line-brown-dk); font-weight: 600; }
.breadcrumb-sep { display: inline-flex; opacity: .5; transform: rotate(-90deg); }

/* ==========================================================================
   08  HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-block: var(--sp-7) var(--sp-8);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 20% auto;
  height: 520px;
  background: radial-gradient(closest-side, rgba(0, 160, 255, .13), transparent);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}
.hero-copy h1 { margin-bottom: var(--sp-4); }
.hero-sub {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: var(--sp-5);
}
.hero-actions { margin-bottom: var(--sp-5); }
.hero-stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

/* Animated silhouette board */
.hero-figure {
  position: relative;
  margin: 0;
  padding: var(--sp-5);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}
.hero-figure__board { display: block; width: 100%; height: auto; }
.hero-figure__caption {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
}
.hero-figure__badge {
  position: absolute;
  top: calc(-1 * var(--sp-3));
  left: var(--sp-5);
}

/* Arrows draw themselves in, then the shape name fades up. */
.board-arrow {
  stroke: var(--accent-blue);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.board-arrow--ink { stroke: var(--line-brown); }
.hero-figure .board-arrow {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-in 900ms var(--ease-out) forwards;
}
@keyframes draw-in { to { stroke-dashoffset: 0; } }
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (min-width: 1024px) {
  .hero { padding-block: var(--sp-9) var(--sp-10); }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--sp-8); }
  .hero-figure { animation: float-soft 7s ease-in-out infinite; }
}

/* ==========================================================================
   09  CARDS, GRIDS AND SECTIONS
   ========================================================================== */
.card {
  padding: var(--sp-5);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card--raised { box-shadow: var(--sh-md); }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--text-muted); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--accent-wash);
  color: var(--accent-deep);
}

.grid { display: grid; gap: var(--sp-4); }
/* Order matters: narrower breakpoints first so wider ones win. */
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid { gap: var(--sp-5); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Numbered steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: var(--sp-6); }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--line-brown);
  color: var(--bg-sand);
  font-size: var(--fs-sm);
  font-weight: 800;
}
.step__diagram {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: var(--sp-4) 0;
}

/* Instant-play card */
.play-card {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}
.play-card__preview {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--card-bg-alt);
  border: 1px solid var(--border-soft);
  padding: var(--sp-4);
}
.play-card__hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .play-card { grid-template-columns: 1fr 1fr; align-items: center; padding: var(--sp-6); }
}

/* Install cards */
.install-card { display: flex; flex-direction: column; gap: var(--sp-4); }
.install-card__shot {
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--card-bg-alt);
}
.callout {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--accent-wash);
  border: 1px solid rgba(0, 118, 192, .22);
  font-size: var(--fs-sm);
  color: var(--line-brown-dk);
}
.callout .icon { color: var(--accent-deep); }
.callout--warn {
  background: #fdf3e3;
  border-color: rgba(255, 159, 28, .4);
}
.callout p { margin: 0; }

/* Stat wells */
.stat-row { display: grid; gap: var(--sp-3); }
@media (min-width: 480px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--panel-sand);
  box-shadow: var(--sh-well);
  text-align: center;
}
.stat__value {
  display: block;
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--line-brown-dk);
  line-height: 1.1;
}
.stat__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

/* Scroll reveal, opt-in via JS adding .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   10  SILHOUETTE SHAPE GALLERY
   ========================================================================== */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.shape-grid li { margin: 0; }
.shape-card {
  height: 100%;
  padding: var(--sp-4);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--sh-sm);
}
.shape-card__art {
  display: block;
  width: 100%;
  max-width: 132px;
  height: auto;
  margin: 0 auto var(--sp-3);
}
.shape-card__art path,
.shape-card__art line { stroke: var(--line-brown); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.shape-card__name {
  display: block;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--line-brown-dk);
}
.shape-card__levels {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) { .shape-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .shape-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }

/* ==========================================================================
   11  DIFFICULTY RAMP
   ========================================================================== */
.ramp { margin: 0; padding: 0; list-style: none; }
.ramp li {
  position: relative;
  margin: 0;
  padding: 0 0 var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--border-strong);
}
.ramp li:last-child { padding-bottom: 0; border-left-color: transparent; }
.ramp li::before {
  content: "";
  position: absolute;
  left: -9px; top: 4px;
  width: 15px; height: 15px;
  border-radius: var(--r-pill);
  background: var(--accent-blue);
  border: 3px solid var(--bg-sand);
}
.ramp__level {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.ramp__what { display: block; font-weight: 700; color: var(--line-brown-dk); }
.ramp__detail { font-size: var(--fs-sm); color: var(--text-muted); }

@media (min-width: 1024px) {
  .ramp {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--sp-4);
  }
  .ramp li {
    padding: var(--sp-5) 0 0;
    border-left: 0;
    border-top: 3px solid var(--border-strong);
  }
  .ramp li:last-child { border-top-color: var(--border-strong); }
  .ramp li::before { left: 0; top: -9px; }
}

/* ==========================================================================
   12  FAQ ACCORDION
   Real buttons controlling regions toggled with the hidden attribute.
   ========================================================================== */
.faq { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border-soft); }
.faq li { margin: 0; border-bottom: 1px solid var(--border-soft); }

.faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  min-height: 56px;
  padding: var(--sp-4) 0;
  border: 0;
  background: none;
  color: var(--line-brown-dk);
  font: inherit;
  font-size: var(--fs-lg);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.faq__trigger:hover { color: var(--accent-deep); }
.faq__chev {
  flex: none;
  color: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-out);
}
.faq__trigger[aria-expanded="true"] .faq__chev { transform: rotate(180deg); }
.faq__panel { padding: 0 0 var(--sp-5); max-width: 68ch; color: var(--text-muted); }

/* ==========================================================================
   13  PLAY PAGE AND GAME SHELL
   ========================================================================== */
.play-shell { padding-block: var(--sp-5) var(--sp-7); }

.game-frame {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  justify-content: space-between;
}
.game-hud__group { display: flex; align-items: center; gap: var(--sp-3); }
.game-hud__level {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--line-brown-dk);
  font-variant-numeric: tabular-nums;
}
.game-hud__score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text-muted);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  min-width: 44px; min-height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--card-bg-alt);
  color: var(--line-brown-dk);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}
.icon-btn:hover { background: var(--panel-sand); }
.icon-btn[disabled] { opacity: .45; cursor: default; }
.icon-btn__badge {
  min-width: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent-action);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
}

/* Canvas: CSS-scaled, backing store sized by devicePixelRatio in JS. */
.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 46 / 52;
  max-height: min(70dvh, 620px);
  margin-inline: auto;
  border-radius: var(--r-lg);
  background: var(--card-bg-alt);
  box-shadow: var(--sh-well);
  overflow: hidden;
  touch-action: manipulation;
}
@supports not (height: 1dvh) {
  .canvas-wrap { max-height: min(70vh, 620px); }
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Text alternative for the canvas, updated live by the engine. */
.board-status {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--panel-sand);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
}

/* Level picker */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: var(--sp-2);
  margin: 0; padding: 0;
  list-style: none;
}
.level-grid li { margin: 0; }
.level-chip {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--card-bg);
  color: var(--line-brown-dk);
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.level-chip:hover { background: var(--accent-wash); }
.level-chip[aria-current="true"] {
  background: var(--accent-action);
  color: #fff;
  border-color: var(--accent-deep);
}
.level-chip[disabled] {
  background: var(--panel-sand);
  color: var(--text-subtle);
  cursor: default;
}

/* Progress well */
.progress-well {
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--panel-sand);
  box-shadow: var(--sh-well);
  overflow: hidden;
}
.progress-well__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--accent-blue);
  transition: width var(--dur-base) var(--ease-out);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(74, 52, 36, .55);
}
.modal[hidden] { display: none; }
.modal__panel {
  width: 100%;
  max-width: 420px;
  padding: var(--sp-6);
  background: var(--card-bg);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  text-align: center;
}
.modal__panel h2 { font-size: var(--fs-xl); }
.field {
  width: 100%;
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--card-bg-alt);
  color: var(--line-brown-dk);
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}
.field:focus-visible { border-color: var(--accent-action); }
.form-error { min-height: 1.4em; font-size: var(--fs-sm); font-weight: 600; color: var(--danger-red); }
.form-note { min-height: 1.4em; font-size: var(--fs-sm); color: var(--text-muted); }

@media (min-width: 1024px) {
  .play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--sp-5);
    align-items: start;
  }
  .play-aside { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}

/* Token display, shared by drop-tokens.php */
.token-display {
  padding: var(--sp-4);
  border: 2px dashed var(--line-brown);
  border-radius: var(--r-md);
  background: var(--card-bg-alt);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 800;
  letter-spacing: .14em;
  text-align: center;
  user-select: all;
}

/* ==========================================================================
   14  POLICY LAYOUT
   ========================================================================== */
.policy-shell {
  display: grid;
  gap: var(--sp-6);
  padding-block: var(--sp-6) var(--sp-8);
}

.policy-aside__head {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.policy-aside__head--sub { margin-top: var(--sp-5); }
.policy-aside__list { margin: 0; padding: 0; list-style: none; }
.policy-aside__list li { margin: 0; }
.policy-aside__list a {
  display: block;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.7;
}
.policy-aside__list a:hover { background: rgba(102, 75, 56, .07); color: var(--line-brown-dk); }
.policy-aside__list a.is-current {
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-weight: 700;
}

.policy-body { max-width: 72ch; }
.policy-head { margin-bottom: var(--sp-5); }
.policy-head h1 { font-size: var(--fs-3xl); }
.policy-updated { font-size: var(--fs-sm); color: var(--text-muted); }

.policy-summary {
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--accent-wash);
  border: 1px solid rgba(0, 118, 192, .22);
}
.policy-summary__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--accent-deep);
}
.policy-summary p { color: var(--line-brown-dk); }
.policy-summary__note {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.policy-body section { margin-bottom: var(--sp-6); scroll-margin-top: calc(var(--header-h) + var(--sp-5)); }
.policy-body h2 { font-size: var(--fs-xl); margin-top: 0; }
.policy-body h3 { font-size: var(--fs-lg); }

.policy-contact {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
}
.policy-contact__row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.policy-contact__entity { font-size: var(--fs-sm); color: var(--text-muted); }

.policy-prevnext { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border-soft); }
.policy-prevnext ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin: 0; padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}
.policy-prevnext li { margin: 0; }

@media (min-width: 1024px) {
  .policy-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--sp-8);
    padding-block: var(--sp-7) var(--sp-9);
  }
  .policy-aside__sticky {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-5));
  }
}

/* Policy hub cards */
.policy-hub-grid { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.policy-hub-grid li { margin: 0; }
.policy-hub-card {
  display: flex;
  gap: var(--sp-4);
  height: 100%;
  padding: var(--sp-5);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.policy-hub-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); color: inherit; }
.policy-hub-card__icon { flex: none; color: var(--accent-deep); }
.policy-hub-card strong { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-lg); }
.policy-hub-card span { font-size: var(--fs-sm); color: var(--text-muted); }
@media (min-width: 768px) { .policy-hub-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   15  FOOTER
   ========================================================================== */
.site-footer {
  margin-top: var(--sp-8);
  background: var(--panel-sand);
  border-top: 1px solid var(--border-soft);
}
.footer-grid {
  display: grid;
  gap: var(--sp-6);
  padding-block: var(--sp-7);
}
.footer-col { min-width: 0; }
.site-logo--footer { margin-bottom: var(--sp-4); }
.footer-desc {
  max-width: 40ch;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.trust-chips--footer { margin-top: var(--sp-4); }

.footer-head {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--line-brown-dk);
}
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 0; }
.footer-links a,
.footer-pending {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 44px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--line-brown-dk); text-decoration: underline; }
.footer-pending { color: var(--text-subtle); font-style: italic; }

.footer-base {
  border-top: 1px solid var(--border-soft);
  background: rgba(102, 75, 56, .05);
}
.footer-base-inner { padding-block: var(--sp-5); }
.footer-base p { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.footer-tm { font-size: var(--fs-xs); }

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-7); }
}

/* ==========================================================================
   16  STICKY CTA AND STORAGE NOTICE
   ========================================================================== */
.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 90;
  padding: var(--sp-3) var(--gutter);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 253, 249, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -6px 20px rgba(102, 75, 56, .1);
}
.sticky-cta[hidden] { display: none; }
.sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  max-width: var(--wrap);
  margin-inline: auto;
}
.sticky-cta__label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--line-brown-dk);
}
/* Reserve room so the bar never covers the footer or a focused field. */
body.has-sticky-cta { padding-bottom: 76px; }
@media (min-width: 768px) {
  .sticky-cta { display: none !important; }
  body.has-sticky-cta { padding-bottom: 0; }
}

.storage-notice {
  position: fixed;
  inset-inline: var(--sp-3);
  bottom: var(--sp-3);
  z-index: 95;
  padding: var(--sp-4);
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}
.storage-notice[hidden] { display: none; }
.storage-notice__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  max-width: var(--wrap);
  margin-inline: auto;
}
.storage-notice__icon { color: var(--accent-deep); }
.storage-notice__text {
  flex: 1 1 260px;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
body.has-sticky-cta .storage-notice { bottom: calc(76px + var(--sp-3)); }
@media (min-width: 768px) {
  .storage-notice { inset-inline: auto var(--sp-5); bottom: var(--sp-5); max-width: 460px; }
  body.has-sticky-cta .storage-notice { bottom: var(--sp-5); }
}

/* ==========================================================================
   17  REDUCED MOTION AND FORCED COLOURS
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-figure { animation: none; }
  .hero-figure .board-arrow { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
  .btn:active { transform: none; }
}

@media (forced-colors: active) {
  .btn, .icon-btn, .nav-toggle, .level-chip { border: 1px solid ButtonText; }
  .drop-pip path { fill: ButtonText; }
  .drop-pip:not(.is-lit) path { fill: GrayText; }
}
