/* Copyright © 2026 Synapse Creative. All rights reserved. */
/* The static pages (How to play, Data, About, Privacy, Terms, 404): Design A, after tokens.css and styles.css
 * (which give the paper, the fonts, the buttons and the top bar). A readable column of notebook text, tables that
 * scroll sideways on a phone, framed screenshots, and the site footer. No script: everything reads with JS off.
 * Mobile first; no horizontal scroll from 360 px (e2e/pages.spec.mjs). */

.page-top { flex-wrap: wrap; row-gap: 0; }
.page-top .topnav { flex-wrap: wrap; justify-content: flex-end; }
.page-top .navlink[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
@media (max-width: 420px) {
  .page-top { justify-content: center; }
  .page-top .topnav { justify-content: center; }
}

.page { max-width: 760px; margin: 0 auto; padding: 8px var(--gutter) 48px; overflow-wrap: break-word; }
/* The language bar under the top bar (tools/site-build.mjs): the page in every language. */
.page-langs { max-width: 760px; margin: 0 auto; padding: 6px var(--gutter) 0; }
.page-langs .lang-bar { margin-right: 0; }
/* A translated Privacy or Terms page: which version applies. */
.page-note { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted-ink); font-size: 0.92rem; }
.page h1 { margin: 18px 0 12px; font: 800 clamp(2.1rem, 8.5vw, 3rem)/1.06 var(--font-head); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.page h1::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 14px; border-radius: 3px; background: var(--accent); }
.page h2 { margin: 40px 0 10px; padding-top: 18px; border-top: 1.5px dashed var(--line-strong); font: 600 1.45rem/1.2 var(--font-head); color: var(--ink); scroll-margin-top: 12px; }
.page h3 { margin: 20px 0 6px; font: 700 1rem/1.3 var(--font-body); color: var(--ink); }
.page p, .page li, .page dd { color: var(--ink); }
.page p + p, .page p + ul, .page ul + p, .page p + ol, .page ol + p { margin-top: 10px; }
.page .lede { font: italic 400 1.22rem/1.55 var(--font-head); color: var(--ink); }
.page ul, .page ol { margin: 0; padding-left: 1.2em; }
.page li + li { margin-top: 6px; }
.page li::marker { color: var(--accent); }
.page a { overflow-wrap: anywhere; }
.page code { font: 500 0.88em/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; padding: 2px 5px; border-radius: 5px; background: var(--paper-2); color: var(--ink); overflow-wrap: anywhere; }
.page .small { font-size: 0.875rem; color: var(--muted-ink); }
.page .meta { margin-top: 4px; color: var(--muted-ink); font-size: 0.9rem; }
.page b, .page strong { font-weight: 700; }
.page pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted-ink); font-size: 0.78rem; }

/* The breadcrumb trail (its BreadcrumbList is in the JSON-LD). */
.crumbs { margin-top: 10px; font-size: 0.85rem; color: var(--muted-ink); }
.crumbs a { color: var(--muted-ink); }

/* "On this page": the section links, as a wrapped row of small tags. */
.toc { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.toc p { font: 700 0.72rem/1.2 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-ink); }
.toc ul { list-style: none; padding: 0; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.toc li + li { margin-top: 0; }
.toc a { font-size: 0.92rem; }

/* A screenshot pasted in the notebook: the 4px ink frame of the game's scenes, a caption under it. */
.shot { margin: 18px auto 6px; max-width: 360px; }
.shot img { display: block; width: 100%; height: auto; border: var(--frame); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.shot figcaption { margin-top: 8px; text-align: center; color: var(--muted-ink); font-size: 0.85rem; }
@media (min-width: 760px) {
  .with-shot { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
  .with-shot .shot { margin-top: 4px; max-width: none; }
}

/* A chip as the game draws it (▲ Love +3). */
.chip-eg { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 12px; font: 700 0.88rem/1.5 var(--font-body); }
.chip-eg.up { background: var(--upbg); color: var(--up-ink); }
.chip-eg.down { background: var(--downbg); color: var(--down); }
.chip-eg.later { background: var(--paper-2); color: var(--muted-ink); }

/* The five stats, each with its colour dot. */
.stats { list-style: none; padding: 0 !important; }
.stats li { position: relative; padding-left: 22px; }
.stats li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--accent)); }
.stats li:nth-child(1) { --dot: var(--stat-wealth); }
.stats li:nth-child(2) { --dot: var(--stat-status); }
.stats li:nth-child(3) { --dot: var(--stat-health); }
.stats li:nth-child(4) { --dot: var(--stat-love); }
.stats li:nth-child(5) { --dot: var(--stat-freedom); }

/* A boxed aside: an example, a definition, the "in short" summary. */
.note-box { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--tealbg); border: 1px solid #cfe3de; }
.note-box p { color: var(--ink); }

/* Tables (the sources): scroll sideways on a narrow screen. styles.css has .table-wrap and .table-hint. */
.page table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 620px; }
.page th, .page td { padding: 9px 11px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.page th { font: 700 0.72rem/1.2 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-ink); background: var(--paper-2); }
.page tr:last-child td { border-bottom: 0; }
.page td.lic, .page td:last-child { white-space: nowrap; }
.page .table-wrap { margin-top: 10px; }
.page .table-wrap + p { margin-top: 10px; }
.page dl { margin: 10px 0 0; }
.page dt { margin-top: 12px; font-weight: 700; }
.page dt code { font-weight: 600; }
.page dd { margin: 4px 0 0; }
.page dl + p { margin-top: 14px; }

.page-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }

/* The site footer: the five pages, the owner. */
.site-foot { max-width: 760px; margin: 0 auto; padding: 18px var(--gutter) 40px; border-top: 1.5px dashed var(--line-strong); color: var(--muted-ink); font-size: 0.88rem; }
.site-foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-foot nav a { display: inline-block; padding: 6px 0; color: var(--ink); }
.site-foot nav a[aria-current="page"] { color: var(--accent-ink); }
.site-foot p { margin-top: 10px; }

/* The 404 page. */
.page.lost { text-align: center; padding-top: 32px; }
.page.lost h1::after { margin-left: auto; margin-right: auto; }
.page.lost .page-cta { justify-content: center; }
