/* serpientejuego.com — page layout and look (design v6). Needs tokens.css. Game styles: game.css
   The page uses only the --site-* / --brand… tokens, so a game theme never changes the page;
   the page turns dark only with the system dark mode. */

/* ---------- Fonts: Baloo 2 (headings) + Nunito (text), OFL, our own server ----------
   Variable woff2, latin + latin-ext subsets; font-display: swap. The "Fallback" faces are
   Arial resized to the same width (size-adjust), so the swap barely moves anything (CLS). */
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/baloo2-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: "Baloo 2"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/baloo2-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/assets/fonts/nunito-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: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* metric fallbacks (measured against Arial: width ratio + Baloo/Nunito ascent and descent) */
@font-face { font-family: "Baloo 2 Fallback"; font-weight: 400 800;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Roboto Bold");
  size-adjust: 93%; ascent-override: 116%; descent-override: 56%; line-gap-override: 0%; }
@font-face { font-family: "Nunito Fallback"; font-weight: 400 500;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Roboto");
  size-adjust: 99%; ascent-override: 102%; descent-override: 35%; line-gap-override: 0%; }
@font-face { font-family: "Nunito Fallback"; font-weight: 600 1000;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Roboto Bold");
  size-adjust: 97%; ascent-override: 104%; descent-override: 36%; line-gap-override: 0%; }

* { box-sizing: border-box; }
/* the game theme's color-scheme must not reach the page (scrollbars, form controls) */
html, html[data-theme] { -webkit-text-size-adjust: 100%; color-scheme: light; }
/* anchor jumps (#abrir-original…) stop below the sticky 61 px header, with a little air */
html { scroll-padding-top: 76px; }
@media (prefers-color-scheme: dark) { html, html[data-theme] { color-scheme: dark; } }
body {
  margin: 0; background: var(--site-bg); color: var(--site-ink);
  font: 400 var(--fs-md)/var(--lh-body) var(--site-font-body);
}
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--site-snake); outline-offset: 2px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-4); }
.prose { max-width: var(--content-max); margin: 0 auto; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--space-2); top: var(--space-2); z-index: 50; background: var(--site-card); color: var(--site-ink);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); }

/* Placeholder text (until the owner approves the real content) */
.ph { color: var(--site-muted); }
.ph::before {
  content: "PENDIENTE"; font: 700 10px/1 var(--site-font-body); letter-spacing: .06em;
  background: var(--site-hover); color: var(--site-muted); border: 1px dashed var(--site-line);
  border-radius: var(--radius-sm); padding: 3px 5px; margin-right: 6px; vertical-align: 2px;
}

/* ---------- Header (C1, C2): white, 2 px brand line, sticky. Height stays 61 px (59 + 2) ---------- */
header.site { background: var(--site-bg); border-bottom: 2px solid var(--brand); position: sticky; top: 0; z-index: 10; }
.hdr { display: flex; align-items: center; gap: var(--space-3); min-height: 59px; position: relative; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brand); flex: none;
  font: 800 1.375rem/1 var(--site-font-head); letter-spacing: -.2px; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo .wm-b { color: var(--site-apple); }
nav.main { display: flex; gap: 2px; margin-left: auto; align-items: center; }
nav.main a { color: var(--site-ink); text-decoration: none; font-size: var(--fs-sm); font-weight: 700;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); }
nav.main a:hover { background: var(--site-hover); }
nav.main a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.lang { display: flex; border: 2px solid var(--brand); border-radius: var(--radius-pill); overflow: hidden; margin-left: var(--space-2); }
.lang a { padding: 5px 10px !important; border-radius: 0 !important; font-size: var(--fs-xs) !important; font-weight: 800 !important; color: var(--brand) !important; }
.lang a[aria-current="true"] { background: var(--brand) !important; color: var(--on-brand) !important; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: var(--fs-sm); flex: none;
  color: var(--site-ink); padding: 6px 10px; border-radius: var(--radius-pill); background: var(--amber-soft); text-decoration: none; }
/* scroll snake apple counter (Part D): icon + n/N, only on screens ≥ 441 px */
.snake-count { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 5px 10px; border-radius: var(--radius-pill);
  border: 2px solid var(--site-apple); color: var(--site-ink); background: var(--site-card);
  font: 800 var(--fs-xs)/1 var(--site-font-body); font-variant-numeric: tabular-nums; }
.snake-count svg { width: 14px; height: 14px; flex: none; }
.snake-count.bump { animation: sj-bump .35s ease-out; }
@keyframes sj-bump { 50% { transform: scale(1.15); } }
.menu-btn { display: none; width: var(--tap); height: var(--tap); border: 0; background: var(--site-hover); flex: none;
  border-radius: var(--radius-md); color: var(--site-ink); cursor: pointer; }

/* ---------- Game zone (pages with the game): H1 + reto bar + game, nothing else above ---------- */
.game-zone { padding: var(--space-5) 0 var(--space-6); }
h1 { font: 800 var(--fs-2xl)/var(--lh-tight) var(--site-font-head); color: var(--site-ink); text-align: center; margin: 0 0 var(--space-4); }
.reto-bar {
  max-width: var(--board-max); margin: 0 auto var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  align-items: center; justify-content: space-between; background: var(--amber-soft); border: 1.5px solid var(--amber); color: var(--site-ink);
  border-radius: 16px; padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); min-height: 42px;
}
.reto-bar .meta { color: var(--site-ink); opacity: .82; }
.reto-bar a { font-weight: 800; white-space: nowrap; color: var(--brand); }
.under-game { max-width: var(--board-max); margin: var(--space-4) auto 0; text-align: center; }
.under-game p { margin: 0 0 var(--space-3); }

/* Buttons (C9): main = apple pill with a 3 px darker edge; ghost = white + brand border. ≥ 44 px */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap);
  padding: 0 var(--space-5); border-radius: var(--radius-pill); border: 0; cursor: pointer; text-decoration: none;
  background: var(--apple-btn); color: #FFFFFF; box-shadow: 0 3px 0 var(--apple-btn-edge);
  font: 800 1.125rem/1 var(--site-font-head); margin-bottom: 3px; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--apple-btn-edge); }
.btn.ghost { background: var(--site-card); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); margin-bottom: 0; }
.btn.ghost:active { transform: none; }

/* Computers: the game is only as wide as fits in the first screen, so H1 + reto bar + HUD + the
   whole board (card border included) show without scrolling, with >= 16 px left below.
   Width = canvas height that fits × the board's own cols/rows (--sj-c / --sj-r, set by
   html[data-sj-board], see game.css) + the 2 px card border; never wider than --board-max,
   never narrower than 400 px (then scrolling is fine). Pure CSS (no JS sizes), so the empty
   placeholder gets the same size (CLS 0). Heights are fixed (line-height × font-size, fixed bar
   and HUD), so the result is the same with Baloo 2 or with the fallback font.
   --sj-above = all fixed heights that are not canvas:
   header 61 + zone padding 24 + H1 (38 px × 1.2) + 16 + reto bar 42 + 12 + HUD 50 (card top border
   included) + bottom card border 1 + 16 gap + 2 spare. */
@media (min-width: 761px) {
  .game-zone {
    --sj-above: calc(61px + 24px + 38px * 1.2 + 16px + 42px + 12px + 50px + 1px + 16px + 2px);
    --sj-w: max(400px, min(var(--board-max), calc((100vh - var(--sj-above)) * var(--sj-c, 17) / var(--sj-r, 15) + 2px)));
  }
  @supports (height: 100svh) {
    .game-zone { --sj-w: max(400px, min(var(--board-max), calc((100svh - var(--sj-above)) * var(--sj-c, 17) / var(--sj-r, 15) + 2px))); }
  }
  /* reto bar: always one line of fixed height (info left, «Jugar el reto →» right), so the
     reserved height above is exact whatever the font. 13 px and up to 820 px wide so even the
     longest reto line fits; on a very narrow window an over-long part is cut with … */
  .reto-bar { flex-wrap: nowrap; height: 42px; white-space: nowrap; gap: 0 var(--space-3);
    max-width: 820px; font-size: var(--fs-xs); }
  .reto-bar > span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .reto-bar > a { flex: none; margin-left: auto; }
}
/* short laptop screens: tighter spacing and a slightly smaller H1 (same text) leave more room for the board
   (header 61 + 12 + H1 28 px × 1.2 + 8 + reto bar 42 + 8 + HUD 50 + border 1 + gap 16 + 2 spare) */
@media (min-width: 761px) and (max-height: 820px) {
  .game-zone { padding-top: var(--space-3); --sj-above: calc(61px + 12px + 28px * 1.2 + 8px + 42px + 8px + 50px + 1px + 16px + 2px); }
  .game-zone h1 { font-size: 1.75rem; margin-bottom: var(--space-2); }
  .game-zone .reto-bar { margin-bottom: var(--space-2); }
}

/* ---------- Page hero (pages without the game) ---------- */
.hero { padding: var(--space-6) 0; text-align: center; }
.hero h1 { margin-bottom: var(--space-3); }
.hero p { margin: 0 auto var(--space-4); max-width: var(--content-max); }

/* ---------- Content ---------- */
main.content { padding: var(--space-7) 0; position: relative; }
main.content > .wrap { position: relative; z-index: 1; }
section { margin: 0 0 var(--space-7); }
h2 { font: 800 var(--fs-xl)/var(--lh-tight) var(--site-font-head); color: var(--brand); margin: 0 0 var(--space-3); }
h3 { font: 700 var(--fs-lg)/var(--lh-tight) var(--site-font-head); color: var(--site-ink); margin: var(--space-5) 0 var(--space-2); }
p { margin: 0 0 var(--space-3); }
/* C12: the first paragraph under «¿Qué es…?» as a cream card (styling only) */
/* content images (our own art): fixed ratio from width/height attrs, so no layout shift */
.fig { display: block; width: 100%; height: auto; margin: var(--space-3) auto var(--space-4); border-radius: 16px; border: 1px solid var(--site-line); }
.fig-sm { max-width: 360px; }
.fig-md { max-width: 400px; }
.fig-lg { max-width: 560px; }
.under-game .disclaimer { font-size: .875rem; color: var(--site-muted); }
.lead-card { background: var(--cream); border-left: 6px solid var(--site-apple); border-radius: 12px; padding: 14px 18px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-4); }
.card { background: var(--site-card); border: 1px solid var(--site-line); border-radius: 14px; padding: var(--space-4); box-shadow: var(--site-shadow); }
.card h3 { margin-top: 0; font-size: var(--fs-md); color: var(--brand); }
.kbd { display: inline-block; min-width: 28px; padding: 2px 7px; border: 1px solid var(--site-line); border-bottom-width: 3px;
  border-radius: var(--radius-sm); background: var(--site-card); color: var(--site-ink); font: 600 var(--fs-xs)/1.5 var(--font-mono); text-align: center; }
/* Tables (C7): a card with a brand header row */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--site-card); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--site-line); box-shadow: var(--site-shadow); font-size: var(--fs-sm); margin: var(--space-3) 0; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--site-line); vertical-align: top; }
.tbl th { background: var(--brand); color: var(--on-brand); font: 700 var(--fs-md)/1.3 var(--site-font-head); border-bottom: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.n { font-variant-numeric: tabular-nums; font-weight: 800; }
.pill { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--site-hover); margin: 2px 4px 2px 0; }
.notice { background: var(--site-card); border: 1px solid var(--site-line); border-left: 4px solid var(--brand);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--fs-sm); }

/* FAQ (C8): every <details> is a card, the question in Baloo 2 brand */
details { background: var(--site-card); border: 1px solid var(--site-line); border-radius: 14px; margin: 0 0 var(--space-2); }
summary { cursor: pointer; padding: var(--space-3) var(--space-4); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary h3 { flex: 1; min-width: 0; margin: 0; font: 700 var(--fs-md)/1.35 var(--site-font-head); color: var(--brand); }
summary::after { content: "+"; flex: none; font-weight: 800; color: var(--brand); }
details[open] summary::after { content: "–"; }
details p { padding: 0 var(--space-4) var(--space-3); margin: 0; }

/* Modos table (Part E): a tiny animated board in front of each mode name (aria-hidden; the text is the info) */
.mode-board { display: block; width: 128px; height: 96px; border-radius: 10px; flex: none; background: #b3d96b; }
.modes-tbl td:first-child { width: 1%; white-space: nowrap; }
.modes-tbl .mode-cell { display: flex; align-items: center; gap: 12px; }
.modes-tbl td { vertical-align: middle; }

/* Reto diario page: streak + history */
.streak-box { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-3) 0; }
.streak-box .card { flex: 1; min-width: 140px; text-align: center; }
.streak-box b { display: block; font: 800 var(--fs-2xl)/1.1 var(--site-font-head); }
.badge { display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--site-hover);
  font-size: var(--fs-xs); font-weight: 700; margin: 2px 4px 2px 0; opacity: .55; }
.badge.on { background: var(--amber); color: #1F2A22; opacity: 1; }

/* today's setup line (same box as the reto bar, no link on the right) and the share example */
.reto-bar.reto-today { justify-content: flex-start; }
.share-sample { background: var(--site-card); border: 1px solid var(--site-line); border-radius: 14px; padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-3); max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; }
.share-sample code { font-family: inherit; font-size: var(--fs-sm); }

/* ---------- Footer (C10): deep brand green, light text; same links and text ---------- */
footer.site { background: var(--brand-deep); color: var(--footer-ink); padding: var(--space-6) 0; font-size: var(--fs-sm); }
footer .links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
footer .links a { color: var(--footer-ink); font-weight: 600; }
footer .links a:hover { color: #FFFFFF; }
footer .link-btn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-weight: 600;
  color: var(--footer-ink); text-decoration: underline; }
footer .link-btn:hover { color: #FFFFFF; }
footer .link-btn[hidden] { display: none; }

/* cookie banner (consent.js): a small bar at the bottom, below the game sheets (z-index 1000) */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--site-card); color: var(--site-ink);
  border-top: 2px solid var(--brand); box-shadow: 0 -6px 20px rgba(31, 42, 34, .14); padding: var(--space-2) var(--space-3); }
.consent-in { max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-4); }
.consent p { flex: 1 1 300px; margin: 0; font-size: var(--fs-xs); line-height: 1.4; }
.consent p a { color: var(--brand); font-weight: 800; }
.consent-btns { display: flex; gap: var(--space-3); }
.consent .btn { min-width: 128px; font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .consent { animation: sj-consent .25s ease-out; }
  @keyframes sj-consent { from { transform: translateY(100%); } }
}
@media (max-width: 560px) { .consent-btns { width: 100%; } .consent .btn { flex: 1; min-width: 0; } }
/* phones: a lower banner, so the game stays in view (same text and buttons) */
@media (max-width: 480px) {
  .consent { padding: 6px 8px; }
  .consent-in { gap: 6px; }
  .consent p { flex-basis: 100%; font-size: 13px; line-height: 1.3; }
  .consent-btns { gap: var(--space-2); }
  .consent .btn { min-height: 36px; padding: 4px 8px; font-size: .875rem; line-height: 1.2; white-space: nowrap; }
}
@media print { .consent { display: none; } }
footer .meta { color: var(--footer-ink); margin-top: var(--space-4); font-size: var(--fs-xs); }

/* ---------- Guide page (/como-jugar/) ---------- */
main.content.guide { padding-top: var(--space-4); }
.guide-top { text-align: center; }
.guide-top h1 { margin-bottom: var(--space-2); }
.crumbs, .page-meta { font-size: var(--fs-xs); color: var(--site-muted); margin: 0 0 var(--space-3); }
.crumbs a { color: inherit; display: inline-block; padding: 12px 6px; margin: -12px -6px; }
.note { font-size: .9em; color: var(--site-muted); }
.btn-row { text-align: center; margin: var(--space-4) 0 var(--space-5); }
.toc { background: var(--site-card); border: 1px solid var(--site-line); border-radius: 14px; box-shadow: var(--site-shadow);
  padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-7); font-size: .95em; }
.toc-title { font: 700 var(--fs-md)/1.3 var(--site-font-head); color: var(--brand); margin: 0 0 var(--space-1); }
.toc ol { columns: 2; column-gap: var(--space-5); margin: 0; padding-left: 1.4em; }
.toc li { break-inside: avoid; }
.toc li a { display: block; min-height: var(--tap); padding: 10px 0; box-sizing: border-box; }
/* numbered steps: round brand numbers; tips: brand dots; errors: apple dots (no symbols in the text) */
.steps, .dots { list-style: none; padding: 0; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 var(--space-3); min-height: 30px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font: 800 var(--fs-sm)/30px var(--site-font-head); text-align: center; }
.dots li { position: relative; padding-left: 24px; margin: 0 0 var(--space-2); }
.dots li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.dots.errors li::before { background: var(--site-apple); }
/* mode cards: board | text */
.mode-card { display: grid; grid-template-columns: 128px 1fr; gap: var(--space-4); align-items: start; background: var(--site-card);
  border: 1px solid var(--site-line); border-radius: 14px; box-shadow: var(--site-shadow); padding: var(--space-4); margin: var(--space-3) 0; }
.mode-card h3 { margin: 0 0 var(--space-2); color: var(--brand); }
.mode-card p { margin: 0 0 var(--space-2); }
.mode-link { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 800; color: var(--brand); }
.mode-link::after { content: "\00a0→"; }
.tbl .kbd { margin: 1px 0; }
/* Ajustes table (3 columns): on phones every row is a small card */
@media (max-width: 560px) {
  .toc ol { columns: 1; }
  .mode-card { grid-template-columns: 1fr; }
  .mode-card .mode-board { margin: 0 auto; }
  .tbl.stack-tbl, .tbl.stack-tbl tbody, .tbl.stack-tbl tr, .tbl.stack-tbl td { display: block; width: auto; }
  .tbl.stack-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tbl.stack-tbl tr { padding: 10px 14px; border-bottom: 1px solid var(--site-line); }
  .tbl.stack-tbl tr:last-child { border-bottom: 0; }
  .tbl.stack-tbl td { padding: 0; border: 0; }
  .tbl.stack-tbl td:first-child { font-size: .8em; color: var(--site-muted); }
  .tbl.stack-tbl td:nth-child(2) { font-weight: 800; }
}

/* /sobre-nosotros/ «Quiénes somos»: small round photo beside the text, centred above it on phones */
.who { display: flex; gap: var(--space-4); align-items: flex-start; }
.who-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--site-line); }
@media (max-width: 560px) { .who { flex-direction: column; align-items: center; gap: var(--space-3); } }
/* /autor/: photo, small label, name, role; quick facts box; quote */
.author-hero { padding-bottom: 0; }
.author-photo { display: block; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin: var(--space-3) auto; border: 1px solid var(--site-line); }
.hero .eyebrow { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: var(--space-2); }
.author-hero h1 { margin-bottom: var(--space-2); }
.hero .subtitle { color: var(--site-muted); }
.hero .social { display: flex; justify-content: center; gap: var(--space-3); margin-bottom: 0; }
.social a { display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; color: var(--brand);
  border: 2px solid var(--brand); background: var(--site-card); }
.social svg { width: 22px; height: 22px; fill: currentColor; }
main.content.author { padding-top: var(--space-5); }
.facts-box { background: var(--site-card); border: 1px solid var(--site-line); border-radius: 14px; box-shadow: var(--site-shadow);
  padding: var(--space-4); margin: 0 0 var(--space-7); }
.facts-title { font: 700 var(--fs-md)/1.3 var(--site-font-head); color: var(--brand); margin: 0 0 var(--space-3); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-5); margin: 0; }
.facts dt { font-size: var(--fs-xs); font-weight: 800; color: var(--site-muted); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
blockquote { margin: var(--space-4) 0; padding: var(--space-2) var(--space-4); border-left: 6px solid var(--brand);
  background: var(--cream); border-radius: 12px; }
blockquote p { margin: 0; font-weight: 600; }
/* legal pages: wide tables scroll inside their own box, never the page */
.tbl-wrap { overflow-x: auto; margin: var(--space-3) 0; }
.tbl-wrap .tbl { margin: 0; }
code { font-family: var(--font-mono); font-size: .9em; }
.tbl code { white-space: nowrap; }

.page-meta { text-align: center; }

/* ---------- Scroll snake (Part D): an SVG behind the content, in side lanes ---------- */
.scroll-snake { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
.scroll-snake .ss-apple { transition: transform .25s ease-out, opacity .25s; transform-box: fill-box; transform-origin: center; }
.scroll-snake .ss-apple.eaten { transform: scale(0); opacity: 0; }
/* narrow screens: the text column gets wider side padding, the lane lives in it (text never under the snake) */
@media (max-width: 859px) {
  main[data-scroll-snake] > .prose { padding-left: 34px; padding-right: 34px; }
}
@media print { .scroll-snake, .snake-count { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .scroll-snake .ss-apple { display: none; }
  .snake-count.bump { animation: none; }
}

/* ---------- Header menu: ☰ up to 1099 px, so the logo, counter, 🔥 and the links never crowd or wrap
   (also at 200 % zoom on laptops). The header keeps its 61 px height. ---------- */
nav.main a { white-space: nowrap; }
@media (max-width: 1099px) {
  .hdr { position: static; }          /* the open menu is as wide as the header itself (no sideways scroll) */
  nav.main { display: none; position: absolute; top: 61px; left: 0; right: 0;
    background: var(--site-bg); flex-direction: column; align-items: stretch; padding: var(--space-2) var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--site-line); box-shadow: 0 8px 28px rgba(31, 42, 34, .14); }
  nav.main.open { display: flex; }
  nav.main a { padding: var(--space-3); font-size: var(--fs-md); }
  .lang { margin: var(--space-2) 0 0; align-self: flex-start; }
  .menu-btn { display: grid; place-items: center; }
  .streak, .snake-count { margin-left: auto; }
  .snake-count + .streak { margin-left: 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .game-zone { padding: var(--space-3) 0 var(--space-5); }
  .game-zone .wrap { padding: 0 var(--space-2); }
  h1 { font-size: 1.375rem; margin-bottom: var(--space-3); }
  .reto-bar { font-size: var(--fs-xs); min-height: 68px; }   /* filled by JS: 3 lines on phones, keep the space (CLS) */
  .cards { grid-template-columns: 1fr; }
  .tbl th, .tbl td { padding: 8px 10px; }
}
/* phones up to 440 px: the header is full, no apple counter there (the snake still eats) */
@media (max-width: 440px) {
  .snake-count { display: none; }
  .snake-count + .streak { margin-left: auto; }
  /* 3-column tables (e.g. the Google comparison) must fit between the scroll snake's lanes */
  .tbl { font-size: .875rem; }
  .tbl th { font-size: .9375rem; }
  .tbl th, .tbl td { padding: 8px 6px; }
}
/* the smallest phones (320 px): logo, 🔥 and ☰ fit in one row without sideways scroll; tables a bit smaller */
@media (max-width: 359px) {
  .hdr { gap: 8px; }
  .logo { font-size: 20px; }
  .tbl { font-size: .8125rem; }
  .tbl th { font-size: .875rem; }
  .tbl th, .tbl td { padding: 7px 5px; }
}
/* phones: the modos table stacks — board, then the mode name, then the text */
@media (max-width: 560px) {
  .modes-tbl, .modes-tbl thead, .modes-tbl tbody, .modes-tbl tr, .modes-tbl td { display: block; width: auto; }
  .modes-tbl thead tr { display: flex; }
  .modes-tbl thead th { flex: 1; }
  .modes-tbl td:first-child { width: auto; white-space: normal; border-bottom: 0; padding-bottom: 4px; }
  .modes-tbl .mode-cell { flex-direction: column; align-items: flex-start; gap: 6px; }
  .modes-tbl td + td { padding-top: 0; }
}

/* /historia/: timeline figure (own drawing, theme colours) */
.timeline-fig { margin: var(--space-5) 0; }
.tl { display: block; width: 100%; height: auto; }
.tl-mobile { display: none; }
.tl-body { fill: none; stroke: var(--brand); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.tl-stripe { fill: none; stroke: var(--cream); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 18; opacity: .55; }
.tl-head { fill: var(--brand); }
.tl-eye { fill: var(--cream); }
.tl-tongue { fill: none; stroke: var(--site-apple); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tl-apple { fill: var(--site-apple); }
.tl-leaf { fill: var(--brand); }
.tl-year { font: 800 30px/1 var(--site-font-head); fill: var(--site-ink); }
.tl-name { font: 700 19px/1 var(--site-font-body); fill: var(--site-muted); }
@media (max-width: 640px) {
  .tl-desktop { display: none; }
  .tl-mobile { display: block; max-width: 360px; margin: 0 auto; }
  .tl-year { font-size: 26px; }
  .tl-name { font-size: 17px; }
}

/* /historia/: myth badges, summary box list, sources */
.verdict { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; font-size: .8em; color: #fff; vertical-align: .1em; margin-right: .3em; }
.verdict.no { background: #B3261E; }   /* white mark: contrast 6.5 in every theme */
.verdict.yes { background: var(--brand); color: var(--on-brand); }
.facts-box .dots { margin: 0; }
.facts-box .dots li:last-child { margin-bottom: 0; }
.sources { font-size: .9em; color: var(--site-muted); }
.sources a { color: inherit; }
/* 10+ links: two-digit numbers of the second column need a wider gap */
.toc ol:has(> li:nth-child(10)) { column-gap: calc(var(--space-5) + 1.4em); }

/* tap targets of 24 px or more for the stand-alone links: bigger hit area, same layout */
.mode-cell a, .reto-bar a, .page-meta a { display: inline-block; padding-block: 4px; margin-block: -4px; }
.mode-cell a { min-width: 24px; }   /* «Paz» alone is 23 px wide */
