/* BrainBins.com: shared styles
   Layout: one calm reading column (max ~68ch) inside a wider frame for game cards.
   Large type for a 50+ audience. Each game keeps its own identity colour. */

/* Fonts are served from this site (fonts/, SIL Open Font License), not from Google. */
@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/atkinson-hyperlegible-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/atkinson-hyperlegible-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/bricolage-grotesque-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/bricolage-grotesque-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Lora';font-style:italic;font-weight:400;font-display:swap;src:url(fonts/lora-italic-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Lora';font-style:italic;font-weight:500;font-display:swap;src:url(fonts/lora-italic-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  /* Paper and ink: the site has no color of its own, so the games' colors lead.
     The only other color is the BrainBins logo's spectrum (--sp-*). */
  --bg: #fbf9f5;          /* warm paper */
  --surface: #ffffff;
  --ink: #17171c;         /* body text */
  --muted: #5b5b66;       /* secondary text */
  --line: #e7e3dc;        /* hairlines */
  --brand: #17171c;       /* BrainBins ink (buttons, links) */
  --brand-ink: #ffffff;
  --brand-soft: #f2efe8;  /* a shade darker than the paper: panels, callouts */
  --focus: #e08a00;

  /* logo colors: build.py fills these in from marks.py (the BrainBins spectrum and each game's logo) */
  --sp-plum: #b62f94; --sp-red: #e0473c; --sp-orange: #e07a2f; --sp-gold: #f2b544; --sp-teal: #0d9488; --sp-blue: #2563eb; --sp-violet: #6d4aff; --fz-sky: #3292db; --fz-violet: #5333b6; --fz-plum: #b62f94; --fz-burg: #750130; --fz-ring: #d5d9e4; --jd-tile: #1a1a1a; --jd-key: #f2b544; --jd-glint: #fffaf0; --ws-teal: #0d9488; --mg-blue: #2563eb; --mg-light: #dbeafe; --mw-terra: #bd5d38; --mw-card: #fdfaf5;

  /* game identity colours */
  /* game identity colours, read from each live game (Oct 2026) */
  --jiddle: #1a1a1a;  --jiddle-bg: #f5f2ed;   /* Jiddle: ink on cream */
  --fourzle: #b62f94; --fourzle-bg: #f9fafb;  /* Fourzle: plum (its 5-letter word color) on light grey */
  --stack: #0d9488;   --stack-bg: #f2f5f0;    /* Word Stack: teal on sage */
  --stack-soft: #e0f2ef;
  --magic: #2563eb;   --magic-bg: #f9fafb;    /* Magic²: blue on light grey */
  --magic-given: #d9dce2;
  --memory: #bd5d38;  --memory-bg: #f4ede2;   /* MemoryWise: terracotta on parchment */
  --memory-back: #e8dccc; --memory-match: #dfe9d4; --memory-match-ink: #4a6a3a;

  /* each game's buttons on brainbins.com (Play today's ...): its own color, dark enough for white text.
     Word Stack and MemoryWise use the deeper shade each game already has, so the text passes 4.5:1. */
  --jiddle-btn: #1a1a1a;  --jiddle-btn-ink: #f5f2ed;
  --fourzle-btn: #b62f94; --fourzle-btn-ink: #ffffff;
  --stack-btn: #0f766e;   --stack-btn-ink: #ffffff;
  --magic-btn: #2563eb;   --magic-btn-ink: #ffffff;
  --memory-btn: #9c4526;  --memory-btn-ink: #ffffff;

  /* tile feedback colours (Jiddle / Fourzle) */
  --t-green: #3a9e5c; --t-yellow: #d6a520; --t-grey: #7c847f; --t-red: #c8483d;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-verse: "Lora", Georgia, "Times New Roman", serif;

  --step--1: 0.9rem;
  --step-0: 1.125rem;   /* 18px body */
  --step-1: 1.35rem;
  --step-2: 1.7rem;
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.5rem + 3.6vw, 3.8rem);

  --radius: 14px;
  --wrap: 1120px;
  --read: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121214; --surface: #1c1c20; --ink: #f1efe9; --muted: #a8a6a0; --line: #2e2e33;
    --brand: #f1efe9; --brand-ink: #121214; --brand-soft: #232327; --focus: #ffb547;
    --sp-plum: #d45ab5; --sp-red: #f06b60; --sp-orange: #f0995a; --sp-gold: #f2c45e; --sp-teal: #3cc2b4; --sp-blue: #7fa8f5; --sp-violet: #9a82ee; --fz-sky: #5aaef0; --fz-violet: #9a82ee; --fz-plum: #d45ab5; --fz-burg: #d2557f; --fz-ring: #3a4152; --jd-tile: #efe9df; --jd-key: #b07d1a; --jd-glint: #fffaf0; --ws-teal: #3cc2b4; --mg-blue: #7fa8f5; --mg-light: #23324d; --mw-terra: #e3926f; --mw-card: #3a2f25;
    --jiddle: #efe9df; --jiddle-bg: #26231f;
    --fourzle: #d45ab5; --fourzle-bg: #1a1f29;
    --stack: #3cc2b4; --stack-bg: #18231f; --stack-soft: #1d3632;
    --magic: #7fa8f5; --magic-bg: #1a1f29; --magic-given: #33363d;
    --memory: #e3926f; --memory-bg: #2a221a;
    --memory-back: #4a3d30; --memory-match: #2f3d27; --memory-match-ink: #b9d39f;
    --jiddle-btn: #efe9df; --jiddle-btn-ink: #26231f;
    --fourzle-btn: #d45ab5; --fourzle-btn-ink: #111814;
    --stack-btn: #3cc2b4; --stack-btn-ink: #111814;
    --magic-btn: #7fa8f5; --magic-btn-ink: #111814;
    --memory-btn: #e3926f; --memory-btn-ink: #111814;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121214; --surface: #1c1c20; --ink: #f1efe9; --muted: #a8a6a0; --line: #2e2e33;
  --brand: #f1efe9; --brand-ink: #121214; --brand-soft: #232327; --focus: #ffb547;
    --sp-plum: #d45ab5; --sp-red: #f06b60; --sp-orange: #f0995a; --sp-gold: #f2c45e; --sp-teal: #3cc2b4; --sp-blue: #7fa8f5; --sp-violet: #9a82ee; --fz-sky: #5aaef0; --fz-violet: #9a82ee; --fz-plum: #d45ab5; --fz-burg: #d2557f; --fz-ring: #3a4152; --jd-tile: #efe9df; --jd-key: #b07d1a; --jd-glint: #fffaf0; --ws-teal: #3cc2b4; --mg-blue: #7fa8f5; --mg-light: #23324d; --mw-terra: #e3926f; --mw-card: #3a2f25;
  --jiddle: #efe9df; --jiddle-bg: #26231f;
  --fourzle: #d45ab5; --fourzle-bg: #1a1f29;
  --stack: #3cc2b4; --stack-bg: #18231f; --stack-soft: #1d3632;
  --magic: #7fa8f5; --magic-bg: #1a1f29; --magic-given: #33363d;
  --memory: #e3926f; --memory-bg: #2a221a;
  --memory-back: #4a3d30; --memory-match: #2f3d27; --memory-match-ink: #b9d39f;
  --jiddle-btn: #efe9df; --jiddle-btn-ink: #26231f;
  --fourzle-btn: #d45ab5; --fourzle-btn-ink: #111814;
  --stack-btn: #3cc2b4; --stack-btn-ink: #111814;
  --magic-btn: #7fa8f5; --magic-btn-ink: #111814;
  --memory-btn: #e3926f; --memory-btn-ink: #111814;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0; }
.sq { font-size: .62em; vertical-align: super; line-height: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.read { max-width: var(--read); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.muted { color: var(--muted); }
.pending { text-decoration-style: dotted; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; }
.logo-mark { width: 30px; height: 30px; flex: none; }
/* each game's logo, just before its name (cards, game pages) */
.game-mark { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.17em; margin-right: .4em; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--brand); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0; min-height: 52px; padding: 0 1.4rem; border-radius: 999px; font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-quiet:hover { border-color: var(--brand); }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- home hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.hero .wrap { display: grid; gap: 1.5rem; }
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 38ch; }
.promise { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-weight: 600; }
.promise li { display: inline-flex; align-items: center; gap: .45rem; }
.promise li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--brand); }
.promise li:nth-child(4n+1)::before { background: var(--sp-plum); } .promise li:nth-child(4n+2)::before { background: var(--sp-orange); }
.promise li:nth-child(4n+3)::before { background: var(--sp-teal); } .promise li:nth-child(4n+4)::before { background: var(--sp-blue); }

/* ---------- sections ---------- */
section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- game cards ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.25rem; }
.games-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.game { --c: var(--brand); --cbg: var(--brand-soft);
  display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.game.jiddle  { --c: var(--jiddle);  --cbg: var(--jiddle-bg); }
.game.fourzle { --c: var(--fourzle); --cbg: var(--fourzle-bg); }
.game.wordstack { --c: var(--stack);   --cbg: var(--stack-bg); }
.game.magic   { --c: var(--magic);   --cbg: var(--magic-bg); }
.game.memory  { --c: var(--memory);  --cbg: var(--memory-bg); }
/* a game's buttons: on its card and on its own page (class g-KEY on the button) */
.game.jiddle,  .g-jiddle  { --cb: var(--jiddle-btn);  --cbi: var(--jiddle-btn-ink); }
.game.fourzle, .g-fourzle { --cb: var(--fourzle-btn); --cbi: var(--fourzle-btn-ink); }
.game.wordstack, .g-wordstack { --cb: var(--stack-btn); --cbi: var(--stack-btn-ink); }
.game.magic,   .g-magic2  { --cb: var(--magic-btn);   --cbi: var(--magic-btn-ink); }
.game.memory,  .g-memorywise { --cb: var(--memory-btn); --cbi: var(--memory-btn-ink); }
.btn-game { background: var(--cb, var(--brand)); color: var(--cbi, var(--brand-ink)); }
.btn-game:hover { filter: brightness(1.08); }
.game-art { background: var(--cbg); height: 132px; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.game-body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.game-body h3 { color: var(--ink); }
.game.jiddle .game-body h3 { color: var(--ink); }
.verse { font-family: var(--font-verse); font-style: italic; color: var(--muted); line-height: 1.5; }
.game-links { margin-top: auto; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding-top: .4rem; }
.game-links .btn { min-height: 46px; background: var(--cb, var(--c)); color: var(--cbi, var(--surface)); }
.game-links a.how { font-weight: 600; }

/* mini art: drawn in CSS so each card shows the game itself */
.tiles { display: flex; gap: 4px; }
.tile { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; font: 700 .85rem/1 var(--font-body); color: #fff; background: var(--t-grey); }
.tile.g { background: var(--t-green); } .tile.y { background: var(--t-yellow); } .tile.r { background: var(--t-red); }
.tile.o { background: transparent; border: 2px solid var(--t-red); }
.art-levels { display: grid; gap: 8px; justify-items: center; }
.art-levels .tabs { display: flex; gap: 14px; font: 700 .75rem/1 var(--font-body); color: var(--muted); }
.art-levels .tabs b { color: var(--fourzle); border-bottom: 2px solid var(--fourzle); padding-bottom: 3px; }
.art-levels .rows { display: grid; gap: 4px; }
.art-levels .tile { width: 22px; height: 22px; font-size: .75rem; }
.art-pyramid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.art-pyramid .tile { width: 20px; height: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--stack); }
.art-pyramid .tile.g { background: var(--t-green); border-color: var(--t-green); color: #fff; }
.art-square { display: grid; grid-template-columns: repeat(4, 22px); gap: 3px; }
.art-square span { height: 22px; border-radius: 4px; display: grid; place-items: center; font: 700 .72rem/1 var(--font-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.art-square span.given { background: var(--magic-given); }
.art-cards { display: flex; gap: 10px; }
.art-cards span { width: 46px; height: 62px; border-radius: 8px; background: var(--memory-back); display: grid; place-items: center; font-size: 1.4rem; }
.art-cards span.face { background: var(--memory-match); border: 2px solid var(--memory-match-ink); color: var(--memory-match-ink); }
.art-riddle { font-family: var(--font-verse); font-style: italic; color: var(--jiddle); text-align: center; line-height: 1.4; font-size: 1.05rem; padding-inline: 1rem; }

/* ---------- why + different ---------- */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.panel { background: var(--brand-soft); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.points li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .2rem .8rem; }
.points .mark { grid-row: span 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--surface); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.points strong { font-size: 1.1rem; }
.points p { color: var(--muted); grid-column: 2; }

/* ---------- article teasers ---------- */
.reads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.read-card { display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem; border-top: 3px solid var(--brand); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.read-card h3 a { color: var(--ink); text-decoration: none; }
.read-card h3 a:hover { color: var(--brand); }
.kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1.25rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.foot-links a { color: var(--ink); text-decoration: none; font-weight: 600; }

/* ---------- game page ---------- */
.crumbs { font-size: var(--step--1); color: var(--muted); padding-top: 1.25rem; }
.crumbs a { color: var(--muted); }
.game-hero { padding-block: 1.5rem 2.5rem; }
.game-hero .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 2rem; align-items: center; }
.game-hero .lede { font-size: var(--step-1); color: var(--muted); }
.riddle-card { background: var(--jiddle-bg); color: var(--jiddle); border-radius: var(--radius); border: 1px solid var(--line); padding: 2rem 1.5rem; display: grid; gap: 1rem; text-align: center; }
.riddle-card .date { font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.riddle-card blockquote { margin: 0; font-family: var(--font-verse); font-style: italic; font-size: var(--step-2); line-height: 1.35; }
.riddle-card details { font-weight: 600; }
.riddle-card summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.riddle-card .answer { margin-top: .5rem; font-family: var(--font-display); font-size: var(--step-2); letter-spacing: .12em; }

.article { display: grid; gap: 2.75rem; }
.article h2 { font-size: var(--step-2); margin-bottom: .9rem; }
.steps { padding-left: 1.4rem; margin: 0; display: grid; gap: .8rem; }
.steps li::marker { font-family: var(--font-display); font-weight: 700; color: var(--brand); }
.legend { display: grid; gap: .75rem; margin-top: 1rem; }
.legend div { display: flex; align-items: center; gap: .9rem; }
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font-family: var(--font-display); }
.table-scroll { overflow-x: auto; }
.faq { display: grid; gap: .5rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: .6rem; color: var(--muted); }
.callout { background: var(--brand-soft); border-radius: var(--radius); padding: 1.25rem 1.4rem; display: grid; gap: .6rem; }

@media (prefers-reduced-motion: no-preference) {
  .game { transition: transform .2s ease, box-shadow .2s ease; }
  .game:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -14px rgba(0,0,0,.35); }
}

/* benefits block on game pages */
.benefits { display: grid; gap: 1.25rem; }
.benefits h3 { font-size: var(--step-1); margin-bottom: .35rem; }
.refs { font-size: var(--step--1); color: var(--muted); }
.skills-line { margin-top: 1.5rem; }
.skills-line + .callout { margin-top: 1rem !important; }
.card-skills { font-size: var(--step--1); color: var(--muted); margin: 0; }
.story { display: grid; gap: 1rem; }
.story .scene { font-family: var(--font-verse); font-style: italic; font-size: var(--step-1); line-height: 1.5; }
.story .pull { font-family: var(--font-display); font-weight: 650; font-size: var(--step-1); color: var(--brand); }

/* ---------- site-wide additions (full build) ---------- */
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }
.nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.tile.f { background: var(--stack); border-color: var(--stack); color: #fff; }
.art-pyramid .tile.f { background: var(--stack); border-color: var(--stack); color: #fff; }
a.card-title { color: inherit; text-decoration: none; }
a.card-title:hover { text-decoration: underline; }

/* page heads for non-game pages */
.page-head { padding-block: 1.5rem 1rem; }
.page-head .wrap { display: grid; gap: 1rem; }
.page-head .lede { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }

/* long-form reading */
.prose { display: grid; gap: 1.1rem; max-width: var(--read); padding-bottom: 2.5rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.4rem; }
.prose h3 { font-size: var(--step-1); margin-top: .6rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .5rem; }
.prose .answer-first { font-size: var(--step-1); }
.prose .note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--muted); }
.byline { font-size: var(--step--1); color: var(--muted); }
.refs-list { font-size: var(--step--1); color: var(--muted); padding-left: 1.2rem; display: grid; gap: .4rem; }

/* skills page */
.skill-table { width: 100%; border-collapse: collapse; }
.skill-table th, .skill-table td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.skill-table th { font-family: var(--font-display); }
.skill { scroll-margin-top: 1rem; }

/* hub */
.hub-intro { display: grid; gap: .8rem; max-width: var(--read); }
.picker { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.picker li { display: flex; gap: .6rem; flex-wrap: wrap; }
.picker strong { min-width: 15ch; }

/* sources page */
.src { border-top: 1px solid var(--line); padding-block: 1.25rem; display: grid; gap: .6rem; max-width: var(--read); }
.src h2 { font-size: var(--step-1); }
.src .cite { font-size: var(--step--1); color: var(--muted); }
.src dl { margin: 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .4rem 1rem; font-size: 1rem; }
.src dt { font-weight: 700; }
.src dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .src dl { grid-template-columns: 1fr; } }

.placeholder { background: color-mix(in srgb, var(--focus) 18%, var(--surface)); border: 2px dashed var(--focus); border-radius: 10px; padding: .8rem 1rem; }

/* game page showcase cards */
.show-card { border-radius: var(--radius); border: 1px solid var(--line); padding: 2rem 1.5rem; display: grid; place-items: center; min-height: 220px; }
.fourzle-card { background: var(--fourzle-bg); }
.wordstack-card { background: var(--stack-bg); }
.magic-card { background: var(--magic-bg); }
.memory-card { background: var(--memory-bg); }
.art-levels.big .tile { width: 44px; height: 44px; font-size: 1.2rem; }
.art-levels.big .tabs { font-size: 1rem; gap: 1.2rem; }
.art-levels.big .rows { gap: 6px; }
.art-pyramid.big .tile { width: 40px; height: 40px; font-size: 1.1rem; }
.art-pyramid.big { gap: 6px; }
.art-square.big { grid-template-columns: repeat(4, 52px); gap: 5px; }
.art-square.big span { height: 52px; font-size: 1.15rem; }
.art-cards.big { flex-wrap: wrap; max-width: 260px; justify-content: center; }
.art-cards.big span { width: 66px; height: 88px; font-size: 2rem; }
.tile.blank { background: var(--surface); border: 1px solid var(--line); }

/* contact form */
.contact-form { display: grid; gap: .5rem; max-width: 34rem; }
.contact-form label { font-weight: 700; margin-top: .4rem; }
.contact-form input, .contact-form textarea, .contact-form select { font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.contact-form button { justify-self: start; margin-top: .6rem; cursor: pointer; }
.picker li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: .25rem 1rem; }
@media (max-width: 560px) { .picker li { grid-template-columns: 1fr; } }

/* home hero on a full-width soft green band */
.hero { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.tm-note { margin: 2rem 0 1.5rem; }

/* Fourzle ring illustration (cards and game page) */
.art-fz { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.art-ring { display: block; margin: 0 auto; }
.art-ring.big { width: 100%; max-width: 320px; height: auto; }

/* ---------- press kit (/presskit/, unlinked) ---------- */
.pk section { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.pk h2 { margin-bottom: 1rem; }
.pk .prose h3 { font-size: var(--step-0); margin: 1rem 0 .3rem; }
.pk-downloads { display: flex; flex-wrap: wrap; gap: .75rem; padding-block: 1.5rem; }
.pk-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.25rem; margin: 0; }
.pk-facts dt { font-weight: 700; }
.pk-facts dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.pk-facts-wide { max-width: var(--read); }
.pk-swatch { display: inline-block; width: 1em; height: 1em; border-radius: 4px; vertical-align: -0.15em; margin-right: .35em; border: 1px solid var(--line); }
.pk-games { display: grid; gap: 1.5rem; }
.pk-game { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pk-shot img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
.pk-game h3 { font-size: var(--step-2); margin-bottom: .3rem; }
.pk-game p { margin: 0 0 .6rem; }
.pk-line { color: var(--muted); }
.pk-dl { font-weight: 700; margin-top: .6rem !important; }
.pk-logos { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.pk-logos li { display: inline-flex; align-items: center; }
.pk-logos .game-mark { width: 1.6em; height: 1.6em; }
.pk-shots { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; margin-bottom: .75rem; }
.pk-shots img { height: 320px; width: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
@media (max-width: 560px) {
  .pk-game { grid-template-columns: minmax(0, 1fr); }
  .pk-shot { max-width: 180px; }
  .pk-shots img { height: auto; width: 100%; }
  .pk-shots a { flex: 1 1 100%; }
}

/* What's new (news from src/messages.json) */
.news { display: grid; max-width: var(--read); padding-bottom: 2.5rem; }
.news-item { border-top: 1px solid var(--line); padding-block: 1.4rem; display: grid; gap: .55rem; scroll-margin-top: 1rem; }
.news-item:first-child { border-top: 0; padding-top: .5rem; }
.news-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: var(--step--1); color: var(--muted); }
.news-games { color: var(--ink); font-weight: 600; }
.news-item h2 { font-size: var(--step-1); }
.news-link { font-weight: 700; }
