/* cartmark.games: the look of the Cartmark app, so the site reads as the app does. The tokens and the frame
   rules are copied from the app's theme.css, cartmark.css, pages.css and the ux-*.css sheets as merged on
   6 November 2026 (harden-int 2afbc863a), trimmed to the pieces a static site draws; the site-only pieces are
   at the end. Every colour is a token: nothing is hard-coded below :root. No script anywhere: the phone menu
   is a checkbox, in-page tabs are :target panels, folds are <details>. */

:root {
  color-scheme: dark;
  --ink: #f4f5f8; --paper: #11141c; --panel: #1a1f28; --line: #e6e8ef;
  --muted: #a7b0c2; --faint: #232a35; --edge: #343b48; --field-edge: #687183; --shadow: #0a0d13;
  --sidebar-bg: #151a24;
  --accent: #a28ffb; --accent-hover: #b8a9fc; --accent-ink: #11141c; --accent-soft: #4a407f;
  --disclosure: var(--accent); --disclosure-bg: var(--accent-soft);
  --have-yes: #3bf260; --have-no: #ff8f86;
  --avatar-bg: #3a4150; --alert-bg: #c0392b; --alert-ink: #fff;
  --nav-alert: #ffaca4; --danger-bg: #8e3028; --danger-edge: #bc5147; --danger-ink: #ffffff;
  --card-shadow: #0002; --pop-shadow: #0006;
  --body: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --sidebar: 15.5rem;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.6 var(--body); letter-spacing: 0; }
a { color: var(--ink); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { font-family: var(--body); letter-spacing: -.015em; text-transform: none; margin: 0 0 .75rem; }
h1 { font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 750; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 1.2rem; font-weight: 700; line-height: 1.4; }
h3 { font-size: 1rem; font-weight: 650; line-height: 1.4; }
p { margin: 0 0 .75rem; }
ul, ol { margin: 0 0 .75rem; padding-left: 1.3rem; }
li { margin: 0 0 .3rem; }
strong, b { font-weight: 650; }
code { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
img, video { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; min-width: 0; min-height: 0; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 100; padding: .75rem 1rem; background: var(--accent); color: var(--accent-ink); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { margin: 0 0 .65rem; color: var(--muted); font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .16em; }

/* The frame: the sidebar beside the page, as the app's base.html draws it. */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.shell > aside { grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: start; border-right: 1px solid var(--edge); background: var(--sidebar-bg); padding: 1.5rem 0 1rem; display: flex; flex-direction: column; }
.shell > main { grid-column: 2; grid-row: 1; width: 100%; padding: 1.5rem clamp(1rem, 3vw, 3rem); min-width: 0; }
.shell > main [id] { scroll-margin-top: 1.5rem; }
.nav-icon, .chevron, .toolbar-svg, .stat-svg, .field-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.brand { display: block; color: var(--ink); padding: 0 1.25rem 1.25rem; font-size: .9rem; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-lockup { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.brand-mark { width: 2rem; height: 2rem; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-wordmark { font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; }
.brand-row { display: block; }
#menu-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.menu-label { display: none; }
.nav { padding: 0 .65rem; flex: 1; display: flex; flex-direction: column; }
.nav a, .nav summary { display: flex; align-items: center; gap: .75rem; font-size: 1.02rem; line-height: 1.5; padding: .62rem .85rem; border-radius: .45rem; margin: .15rem 0; text-decoration: none; cursor: pointer; color: var(--ink); }
.nav a:hover, .nav summary:hover { background: var(--faint); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav-icon { width: 1.35rem; height: 1.35rem; }
.nav-section { font-size: .74rem; letter-spacing: .1em; padding: 1.5rem .85rem .35rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
details.nav-group > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; border-radius: .35rem; }
details.nav-group > summary::-webkit-details-marker { display: none; }
details.nav-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
details.nav-group > summary .chevron { width: .95rem; height: .95rem; transform: rotate(-90deg); color: var(--muted); }
details.nav-group[open] > summary .chevron { transform: none; }
details.nav-group.holds-current > summary { box-shadow: inset 3px 0 var(--accent); }
.nav-group.nav-foot { margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--edge); }
.nav-badge { margin-left: auto; display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; }
.nav-foot a.nav-soon .nav-badge { background: var(--faint); color: var(--muted); }

/* The top bar: the crumbs where the app's search sits, the one way onward at its end. */
.page-toolbar { display: flex; align-items: center; gap: 1rem; background: var(--paper); border: 0; border-bottom: 1px solid var(--edge); padding: 0 0 1rem; margin-bottom: 1.5rem; min-height: 3.5rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .9rem; flex: 1; min-width: 0; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--ink); overflow-wrap: anywhere; }
.breadcrumbs span[aria-hidden] { color: var(--muted); }
.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

/* Presses and the pieces every page shares. */
a.button, .button { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .55rem 1rem; border: 1px solid var(--field-edge); border-radius: .4rem; background: var(--panel); color: var(--ink); font-weight: 650; text-decoration: none; cursor: pointer; font: inherit; font-weight: 650; }
a.button:hover, .button:hover { border-color: var(--accent); color: var(--ink); }
a.button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
a.button.primary:hover, .button.primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.card { background: var(--panel); border: 1px solid var(--edge); border-radius: .55rem; box-shadow: 0 4px 16px var(--card-shadow); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; }
.pill { display: inline-block; padding: .15rem .5rem; border: 1px solid var(--edge); border-radius: .25rem; font-family: var(--body); font-size: .78rem; line-height: 1.6; white-space: nowrap; }
.pill[aria-current] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.pill.state-ok { background: var(--have-yes); border-color: var(--have-yes); color: var(--paper); font-weight: 650; }
.pill.state-alert { color: var(--accent); border-color: var(--accent); }
.pill.state-muted { color: var(--muted); border-style: dashed; }
.chip { display: inline-block; padding: .1rem .5rem; border: 1px solid var(--edge); border-radius: .3rem; font-size: .8rem; text-decoration: none; background: var(--panel); line-height: 1.6; color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.on { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); text-decoration: none; }
.sys-chip { border: 1px solid var(--edge); border-radius: 999px; padding: .1rem .6rem; color: var(--muted); font-size: .85rem; }
.have-mark::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; border-radius: 50%; vertical-align: .05rem; }
.have-mark.yes::before { background: var(--have-yes); }
.have-mark.no::before { background: var(--muted); }
.row { display: flex; gap: .6rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th { font-family: var(--body); color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: none; letter-spacing: 0; text-align: left; padding: .4rem .5rem; border-bottom: 2px solid var(--edge); }
td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--faint); vertical-align: top; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
.list-card .table-scroll { border: 1px solid var(--edge); border-radius: .4rem; background: var(--paper); }
.list-card .table-scroll th { background: var(--faint); }
.list-card .table-scroll tbody tr:hover { background: var(--faint); }
main summary { cursor: pointer; }
main summary::marker { color: var(--disclosure); font-size: 1.2em; }
footer { color: var(--muted); font-family: var(--body); font-size: .75rem; padding: 2rem 0 1rem; }
footer p { margin: 0 0 .4rem; }
.ok-mark { color: var(--have-yes); }

/* Page tabs, as the game page's mockup draws them. The in-page tabs (the app's page_panels piece) show one
   panel at a time with no script: a link to a panel (#tab-files) or to anything inside it opens it. */
.page-tabs { display: flex; gap: 1.75rem; margin: 0 0 1.5rem; padding: 0; overflow-x: auto; border-bottom: 1px solid var(--edge); scrollbar-width: thin; }
.page-tabs a { flex: none; padding: .65rem .15rem; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-tabs a:hover { color: var(--ink); }
.page-tabs a[aria-current="page"], .tab-strip a[aria-current="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.page-tabs a:focus-visible { outline-offset: -2px; }
@supports selector(:has(*)) {
  .tab-panel { display: none; }
  .tab-panel.tab-default, .tab-panel:target, .tab-panel:has(:target) { display: block; }
  .tab-panels:has(.tab-panel:target, .tab-panel :target) > .tab-default:not(:target):not(:has(:target)) { display: none; }
}
@media print { .tab-panel { display: block !important; } .tab-strip { display: none; } }

/* The page heading: the title, a line of what it is for, one primary press. */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; }
.page-head .muted { margin: .3rem 0 0; font-size: 1.05rem; max-width: 46rem; }
.page-head > a.button { flex: none; white-space: nowrap; }
.list-lead { max-width: 52rem; margin: 0 0 1rem; }

/* Dashboard pieces (Home): the stat chips, the titled rows, the grid of cards. */
.stat-chips { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.stat-chip { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border: 1px solid var(--edge); border-radius: .5rem; background: var(--panel); color: var(--muted); text-decoration: none; }
.stat-chip strong { color: var(--ink); font-size: 1.2rem; font-weight: 750; }
.stat-chip > span { text-align: left; }
.stat-chip:hover { border-color: var(--accent); color: var(--ink); }
.stat-svg { width: 1.35rem; height: 1.35rem; color: var(--muted); }
.home-section { margin: 1.6rem 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.section-head h2 { margin: 0; font-size: 1.45rem; }
.section-head a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.dashboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; align-items: start; margin-top: 1.75rem; }
.dashboard .card { min-width: 0; margin-bottom: 0; }
.dashboard .u-span-all { grid-column: 1 / -1; }
.shelf-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.shelf-card { display: flex; align-items: center; gap: .6rem; height: 100%; padding: .8rem .75rem; border: 1px solid var(--edge); border-radius: .5rem; background: var(--panel); color: var(--ink); text-decoration: none; }
.shelf-card:hover { border-color: var(--accent); color: var(--ink); }
.shelf-card > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.shelf-card small { font-size: .85rem; }
.shelf-card .nav-icon { color: var(--accent); }
.shelf-card .chevron { width: 1rem; height: 1rem; color: var(--muted); transform: rotate(-90deg); }
.shelf-mark { flex: none; min-width: 2.6rem; padding: .25rem .3rem; border-radius: .3rem; background: var(--accent-soft); color: var(--ink); font-size: .68rem; font-weight: 800; text-align: center; letter-spacing: .03em; }
.wide-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1rem; }
.wide-card { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); overflow: hidden; border: 1px solid var(--edge); border-radius: .5rem; background: var(--panel); }
.wide-card:hover { border-color: var(--accent); }
.wide-card .cover-art { aspect-ratio: auto; height: 100%; min-height: 11rem; border: 0; border-radius: 0; }
.wide-copy { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: 1rem; min-width: 0; }
.wide-copy strong a { color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.wide-copy strong a:hover { color: var(--accent); }
.wide-copy small { margin: .35rem 0 auto; line-height: 1.45; }
.wide-copy .chip { margin-top: .6rem; }
.cover-art { display: grid; place-items: center; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid var(--edge); border-radius: .45rem; background: linear-gradient(160deg, var(--accent-soft), var(--faint)); color: var(--ink); text-decoration: none; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-art span { padding: .75rem; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.event-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem 1.25rem; }
.event-list li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; padding: .3rem 0; border-bottom: 1px solid var(--edge); margin: 0; }

/* List pieces (the Games grid): the filter chips, the cards, the boxed rows, the foot. */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1.2rem; min-height: 1.5rem; }
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.game-grid > li { margin: 0; }
.game-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--edge); border-radius: .6rem; background: var(--panel); }
.game-card:hover, .game-card:focus-within { border-color: var(--accent); }
.game-card-art { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(160deg, var(--accent-soft), var(--faint)); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; text-align: center; padding: 0; }
.game-card-art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.game-card-art span { padding: 1rem; }
.game-card-body { display: grid; gap: .35rem; align-content: start; padding: .65rem .9rem .8rem; }
.game-card-body h2 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.game-card-body h2 a { color: var(--ink); text-decoration: none; }
.game-card-body h2 a:hover { color: var(--accent); }
.game-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 0; font-size: .85rem; }
.game-card-line { margin: 0; font-size: .85rem; color: var(--muted); }
.grid-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }
.grid-foot p { margin: 0; }
.stack-list { list-style: none; padding: 0; margin: .5rem 0 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.stack-list > li { margin: 0; }
.stack-item { border: 1px solid var(--edge); border-radius: .5rem; background: var(--panel); padding: .75rem 1rem; overflow-wrap: anywhere; }
.stack-item:hover { border-color: var(--accent); }
.stack-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.stack-head h3 { margin: 0; flex: 1 1 16rem; }
.stack-item p { margin: .4rem 0 0; }
.stack-item p:last-child { margin-bottom: 0; }
.list-section { margin: 0 0 1.75rem; }
.list-section .section-head h2 { font-size: 1.2rem; }
.release-fold > summary { font-weight: 650; }
.release-fold > summary strong { font-size: 1.35rem; font-weight: 750; margin-right: .25rem; }
.release-fold[open] > summary { margin-bottom: .5rem; }
.release-fold > p.muted { font-size: .85rem; line-height: 1.5; border-top: 1px solid var(--edge); padding-top: .5rem; }
.release-fold ul { margin: 0; }
.release-fold li { margin-bottom: .5rem; }
.release-fold .more { display: block; color: var(--muted); font-size: .92rem; margin-top: .2rem; }

/* Detail pieces (the Game page): the hero, then a main column of cards beside a side column. A guide's art is
   a screen, not a cover, so the hero's frame is 4:3 where the app's is 3:4. */
.game-hero { display: flex; gap: 1.75rem; align-items: flex-start; margin: 0 0 1.25rem; }
.game-hero-cover { width: 18rem; flex: none; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: .6rem; border: 1px solid var(--edge); background: var(--panel); box-shadow: 0 .5rem 1.5rem var(--shadow); }
.game-hero-cover.title-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: 1rem; text-align: center; background: linear-gradient(160deg, var(--panel), var(--paper)); }
.game-hero-cover.title-card span { font-size: 2.1rem; font-weight: 750; letter-spacing: .02em; line-height: 1.1; color: var(--accent); text-wrap: balance; }
.game-hero-cover.title-card sup { font-size: .8rem; font-weight: 500; margin-left: .1rem; }
.game-hero-cover.title-card small { color: var(--muted); font-size: .9rem; }
.game-hero-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.game-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.game-hero-meta { margin: 0; color: var(--muted); font-size: 1.05rem; }
.game-hero-chips { gap: .5rem; margin: 0; }
.game-hero-actions { flex-wrap: wrap; margin: 0; }
.game-hero-summary { margin: 0; max-width: 46rem; line-height: 1.5; font-size: 1.05rem; }
.game-hero-status { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 0; padding: .85rem 1.1rem; border: 1px solid var(--edge); border-radius: .6rem; background: var(--panel); }
.game-hero-status.started { border-color: var(--have-yes); }
.game-hero-status-mark { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 50%; border: 2px solid var(--muted); color: var(--muted); font-weight: 700; }
.game-hero-status.started .game-hero-status-mark { border-color: var(--have-yes); background: var(--have-yes); color: var(--paper); }
.game-hero-status-words { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 14rem; min-width: 0; }
.game-hero-status-words strong { font-size: 1.1rem; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.detail-one { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.25rem; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.detail-main > *, .detail-side > * { margin: 0; }
.copy-facts { list-style: none; margin: 0 0 .75rem; padding: 0; border: 1px solid var(--edge); border-radius: .5rem; }
.copy-facts li { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .85rem; margin: 0; }
.copy-facts li + li { border-top: 1px solid var(--edge); }
.copy-facts li > span:first-child { width: 1.25rem; flex: none; text-align: center; color: var(--muted); }
.copy-facts li.matched > span:first-child { color: var(--have-yes); }
.copy-facts li.never > span:first-child { color: var(--have-no); }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li { margin: 0; }
.side-links a { display: block; padding: .45rem 0; border-bottom: 1px solid var(--edge); text-decoration: none; color: var(--ink); }
.side-links li:last-child a { border-bottom: 0; }
.side-links a:hover { color: var(--accent); }
.side-links small { display: block; color: var(--muted); }

/* Reading pieces (guides and documents): one text column, the sections as folds, the links down the side. */
.reading-head .eyebrow { margin: 0 0 .25rem; color: var(--accent); }
.reading-head .eyebrow a { color: inherit; text-decoration: none; }
.reading-head h1 { margin: 0; }
.reading-head > p:not(.eyebrow) { margin: .35rem 0 1.25rem; max-width: 46rem; font-size: 1.05rem; }
.reading-cols { display: grid; grid-template-columns: minmax(0, 46rem) minmax(12rem, 16rem); gap: 1.5rem; align-items: start; }
.reading-side { position: sticky; top: 1.5rem; }
.reading-side .eyebrow { margin-bottom: .5rem; }
.reading-side ol { list-style: none; margin: 0; padding: 0; }
.reading-side li { margin: 0 0 .45rem; }
.reading-side a { text-decoration: underline; text-decoration-color: var(--edge); }
.reading .card { margin-bottom: 1.25rem; }
.reading .section { padding: .75rem 0; border-top: 1px solid var(--edge); }
.reading .section:first-of-type { border-top: 0; padding-top: 0; }
.reading .section > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; list-style: none; font-weight: 650; }
.reading .section > summary::-webkit-details-marker { display: none; }
.reading .section > summary::before { content: "▶"; color: var(--disclosure); font-size: .7em; }
.reading .section[open] > summary::before { content: "▼"; }
.reading .section > summary .muted { font-weight: 400; font-size: .92rem; }
.reading .section > :not(summary) { margin-left: 1.25rem; }
.reading .section[open] > summary { margin-bottom: .6rem; }
.reading-pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.reading-pager a { text-decoration: underline; }

/* The flow card (404): one centred column, the card edged in the accent, its press under a rule. */
.flow { max-width: 40rem; margin: 0 auto 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.flow > * { margin: 0; }
.flow-head .eyebrow { margin: 0 0 .25rem; color: var(--accent); }
.flow-head h1 { margin: 0; }
.flow-card { border-top: 2px solid var(--accent); }
.flow-card h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.flow-press { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--edge); }

/* Site-only pieces, in the same tokens: a figure, a recording, a ledger of does and never does, numbered
   steps, a quoted on-screen line. */
figure { margin: 0 0 1rem; }
figure img, figure video { display: block; width: 100%; border: 1px solid var(--edge); border-radius: .45rem; background: var(--paper); }
figcaption { margin-top: .4rem; color: var(--muted); font-size: .85rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin: 0 0 1rem; }
.shots figure { margin: 0; }
.shots.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin: 0 0 1rem; }
.clips figure { margin: 0; }
.clips video { aspect-ratio: 4 / 3; object-fit: contain; background: var(--shadow); }
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin: 0 0 1rem; }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { padding: .4rem 0 .4rem 1.5rem; border-bottom: 1px solid var(--edge); position: relative; margin: 0; }
.ledger li:last-child { border-bottom: 0; }
.ledger li::before { position: absolute; left: 0; top: .4rem; font-weight: 700; }
.ledger .keeps li::before { content: "✓"; color: var(--have-yes); }
.ledger .shifts li::before { content: "–"; color: var(--have-no); }
.ledger h3 { margin-bottom: .4rem; }
ol.steps { list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: .9rem; }
ol.steps > li { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: .85rem; margin: 0; }
ol.steps > li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-weight: 750; font-size: .9rem; }
ol.steps > li > h3 { margin: .2rem 0 .2rem; }
ol.steps > li > p, ol.steps > li > ul { grid-column: 2; }
ol.steps > li > p:last-child { margin-bottom: 0; }
ol.steps.lettered > li::before { content: attr(data-mark); }
.onscreen { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: .5rem 1rem; padding: .5rem .75rem; border: 1px solid var(--edge); border-radius: .4rem; background: var(--paper); margin: 0 0 .5rem; }
.onscreen span:first-child { color: var(--muted); font-size: .9rem; }
.onscreen code { color: var(--ink); font-family: var(--body); font-size: inherit; }
.note { border-left: 3px solid var(--accent); padding: .5rem .9rem; margin: 0 0 1rem; color: var(--muted); background: var(--faint); border-radius: 0 .4rem .4rem 0; }
.note p:last-child { margin-bottom: 0; }
.sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; padding: .6rem .9rem; border: 1px solid var(--edge); border-radius: .4rem; background: var(--paper); margin: 0 0 .75rem; }
.sum s { color: var(--muted); }
.big { font-size: 1.15rem; }
.term { font-family: var(--mono); font-size: .88em; background: var(--accent-soft); color: var(--ink); padding: 1px 5px; border-radius: 3px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin: 0 0 1rem; }
.three .shelf-card { align-items: flex-start; }
.three .shelf-card strong { display: block; margin-bottom: .2rem; }
.three .shelf-card small { color: var(--muted); }
.stat-chips.figures .stat-chip { flex: 1 1 14rem; }
.stat-chips.figures .stat-chip > span { white-space: nowrap; }
.cta-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.release-line { margin: 0 0 .5rem; }
.release-line .pill { margin-right: .4rem; }

@media (max-width: 960px) {
  .detail-cols { grid-template-columns: minmax(0, 1fr); }
  .reading-cols { grid-template-columns: minmax(0, 1fr); }
  .reading-side { position: static; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .shell > aside { grid-column: 1; grid-row: 1; position: sticky; top: 0; z-index: 20; height: auto; max-height: 80vh; border-right: 0; border-bottom: 1px solid var(--edge); padding: .5rem 0; }
  .shell > main { grid-column: 1; grid-row: 2; width: 100%; padding: 1rem; }
  .shell > main [id] { scroll-margin-top: 7rem; }
  .brand-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 1rem .25rem; }
  .brand-row .brand { min-width: 0; padding: .5rem 0; }
  .brand-lockup { gap: .45rem; }
  .brand-mark { width: 1.5rem; height: 1.5rem; }
  .brand-wordmark { font-size: .95rem; }
  .menu-label { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .75rem; margin: 0 1rem .5rem; border: 1px solid var(--field-edge); border-radius: .4rem; cursor: pointer; font-weight: 650; }
  #menu-toggle:focus-visible ~ .menu-label { outline: 2px solid var(--accent); outline-offset: 2px; }
  #menu-toggle:not(:checked) ~ .nav { display: none; }
  .nav-group.nav-foot { margin-top: .5rem; }
  .page-toolbar { padding: 0 0 .75rem; margin-bottom: 1rem; min-height: 0; }
  .toolbar-end { display: none; }
  .page-head { flex-direction: column; }
  .page-head > a.button { align-self: flex-start; }
  .stat-chip { flex: 1 1 8rem; }
  .page-tabs { gap: 1.1rem; }
  .wide-card { grid-template-columns: 7rem minmax(0, 1fr); }
  .wide-card .cover-art { min-height: 9.5rem; }
  .event-list li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .game-hero { flex-direction: column; }
  .game-hero-cover { width: 100%; max-width: 22rem; }
  .onscreen { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
}
@media (max-width: 640px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
}
@media (max-width: 440px) {
  .card { padding: 1rem; }
  .game-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  .shell { display: block; }
  .shell > aside, .page-toolbar, .skip-link { display: none; }
  .shell > main { padding: 0; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}
