/* ============================================================
   Gaming brand: the home page, set like an issue of a hobby
   magazine (templates/gaming/home.html). Loaded only there, after
   gaming.css, and built from its tokens and components.

   1. Issue: chapter numbering
   2. Cover
   3. In this issue (contents)
   4. Chapter heads
   5. News: the editorial grid
   6. Painter of the month: the spread
   7. Fresh from the bench: mosaic / filmstrip
   8. The armoury: item cards and inventory slots
   9. Choose your painter: character select
   10. Opening soon, and the one way on
   11. Motion
   ============================================================ */

/* ---- 1. Issue ----------------------------------------------- */
/* Chapters are numbered by CSS counters, so the contents and the folios agree whichever
   chapters are left out. */
.gm-issue { counter-reset: chapter toc; }
.gm-ch { counter-increment: chapter; scroll-margin-top: calc(var(--gm-header-h) + 0.5rem); padding-block: clamp(2.5rem, 6vw, 4rem); }
.gm-ch-soon, .gm-ch-cta, .gm-ch-comps { counter-increment: none; }
.gm-folio::before { content: counter(chapter, decimal-leading-zero); }

/* ---- 2. Cover ----------------------------------------------- */
.gm-cv { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--gm-line); background:
  radial-gradient(ellipse 70% 90% at 85% 0%, rgba(201, 171, 115, 0.10), transparent 60%),
  radial-gradient(ellipse 60% 80% at 0% 100%, rgba(103, 198, 173, 0.07), transparent 60%),
  var(--gm-ground); }
.gm-cv-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.gm-cv-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(11, 10, 9, 0.78) 0%, rgba(11, 10, 9, 0.15) 24%, rgba(11, 10, 9, 0.25) 46%, rgba(11, 10, 9, 0.92) 78%, var(--gm-ground) 100%),
  linear-gradient(90deg, rgba(11, 10, 9, 0.70) 0%, rgba(11, 10, 9, 0) 60%); }
.gm-cv-inner { position: relative; display: flex; flex-direction: column; gap: 2rem; padding-block: 1.25rem clamp(2rem, 5vw, 3.5rem); }
.gm-cv-photo .gm-cv-inner { min-height: clamp(34rem, 82vh, 46rem); justify-content: space-between; }

/* The masthead plate: dateline over a rule, then the strapline. */
.gm-cv-dateline { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 0.9rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gm-brass-dim);
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gm-brass); }
.gm-cv-issue { color: var(--gm-text); }
.gm-cv-strap { margin: 0; max-width: 22ch; font: 600 clamp(1.05rem, 2.2vw, 1.35rem)/1.3 var(--gm-font-display); letter-spacing: 0.04em; color: var(--gm-bone); }

.gm-cv-body { display: grid; gap: 1.75rem; align-items: end; }
.gm-cv-story { max-width: 44rem; }
.gm-cv-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 0.9rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gm-brass); }
.gm-cv-kicker span { padding: 0.25rem 0.55rem; border-radius: var(--gm-r-xs); background: var(--gm-brass); color: var(--gm-on-accent); letter-spacing: 0.14em; }
.gm-cv-title { margin: 0; font: 700 clamp(2.1rem, 6.2vw, 4.25rem)/1.02 var(--gm-font-display); letter-spacing: 0.005em; color: var(--gm-bone);
  text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55); }
.gm-cv-title a { color: inherit; text-decoration: none; }
.gm-cv-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; text-decoration-color: var(--gm-brass); }
.gm-cv-standfirst { margin: 1rem 0 0; max-width: 36rem; font-size: clamp(1rem, 1.6vw, 1.1875rem); line-height: 1.55; color: var(--gm-text); }
.gm-cv-meta { margin: 0.9rem 0 0; font-size: 0.8125rem; color: var(--gm-muted); }
.gm-cv-photo .gm-cv-meta { color: var(--gm-text); }
.gm-cv-go { margin: 1.4rem 0 0; }
.gm-cv-btn { background: rgba(11, 10, 9, 0.55); }

/* Cover lines: what else is inside, in the corner of the cover. */
.gm-cv-lines { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.gm-cv-lines a { display: block; padding: 0.75rem 0.9rem 0.8rem; border-left: 2px solid var(--gm-brass); background: rgba(11, 10, 9, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 0 var(--gm-r-sm) var(--gm-r-sm) 0;
  color: var(--gm-bone); text-decoration: none; font: 600 0.9375rem/1.35 var(--gm-font-body); }
.gm-cv-lines a span { display: block; margin-bottom: 0.2rem; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gm-brass); }
.gm-cv-lines a:hover { border-left-color: var(--gm-verdigris); background: rgba(11, 10, 9, 0.88); }
.gm-cv-lede { margin: 0; max-width: 38rem; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.6; color: var(--gm-text); }

/* No picture: a typographic cover, the strapline set big. */
.gm-cv:not(.gm-cv-photo) .gm-cv-inner { padding-block: 1.25rem clamp(2.5rem, 6vw, 4rem); }
.gm-cv:not(.gm-cv-photo) .gm-cv-strap { max-width: 18ch; font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.05; letter-spacing: 0.01em; }
.gm-cv:not(.gm-cv-photo) .gm-cv-story { padding-top: 1.75rem; border-top: 1px solid var(--gm-line); }
.gm-cv:not(.gm-cv-photo) .gm-cv-title { font-size: clamp(1.6rem, 4vw, 2.5rem); }

@media (max-width: 719px) {
  .gm-cv-lines { display: none; }
  .gm-cv-photo .gm-cv-inner { min-height: 0; }
  .gm-cv-photo .gm-cv-body { padding-top: clamp(13rem, 58vw, 20rem); }
  .gm-cv-dateline span:first-child { letter-spacing: 0.16em; }
}
@media (min-width: 1000px) {
  .gm-cv-body { grid-template-columns: minmax(0, 1fr) 18rem; gap: 3rem; }
}

/* ---- 3. In this issue --------------------------------------- */
.gm-toc { border-bottom: 1px solid var(--gm-line); background: var(--gm-ground-alt); }
.gm-toc-inner { display: grid; gap: 0.75rem; padding-block: 1.1rem; }
.gm-toc-title { margin: 0; font: 700 0.75rem/1.2 var(--gm-font-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gm-brass); }
.gm-toc-list { display: flex; gap: 0.5rem; margin: 0 calc(-1 * var(--gm-gutter)); padding: 0 var(--gm-gutter) 0.25rem; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gm-gutter); scrollbar-width: thin; }
.gm-toc-list li { counter-increment: toc; flex: 0 0 auto; scroll-snap-align: start; }
.gm-toc-list a { display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; align-items: baseline; min-width: 11rem; height: 100%;
  padding: 0.6rem 0.85rem 0.65rem; border: 1px solid var(--gm-line); border-radius: var(--gm-r-sm); background: var(--gm-card);
  color: var(--gm-bone); text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease; }
.gm-toc-list a::before { content: counter(toc, decimal-leading-zero); grid-row: span 2; font: 700 1.5rem/1 var(--gm-font-display); color: var(--gm-brass); }
.gm-toc-what { font-weight: 600; font-size: 0.875rem; }
.gm-toc-tease { font-size: 0.75rem; color: var(--gm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; }
.gm-toc-list a:hover { border-color: var(--gm-brass-dim); background: var(--gm-raised); }
@media (min-width: 1000px) {
  .gm-toc-list { margin: 0; padding: 0; overflow: visible; }
  .gm-toc-list li { flex: 1 1 0; }
  .gm-toc-list a { min-width: 0; }
}

/* ---- 4. Chapter heads --------------------------------------- */
.gm-ch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); }
.gm-ch-head-ruled { padding-bottom: 0.9rem; border-bottom: 1px solid var(--gm-line); }
.gm-folio { margin: 0; font: 700 0.875rem/1 var(--gm-font-display); color: var(--gm-brass); letter-spacing: 0.06em;
  padding: 0.3rem 0.45rem; border: 1px solid var(--gm-brass-dim); border-radius: var(--gm-r-xs); align-self: center; }
.gm-ch-title { margin: 0; font: 700 clamp(1.6rem, 3.6vw, 2.4rem)/1.1 var(--gm-font-display); color: var(--gm-bone); }
.gm-ch-head > .gm-btn { margin-left: auto; }
.gm-ch-sub { flex-basis: 100%; margin: 0.25rem 0 0; max-width: 40rem; color: var(--gm-muted); line-height: 1.6; }
.gm-ch-head-center { flex-direction: column; align-items: center; text-align: center; }
.gm-ch-head-center .gm-ch-sub { margin-inline: auto; }

/* ---- 5. News ------------------------------------------------ */
.gm-reads { display: grid; gap: 2rem; }
.gm-read { position: relative; }
.gm-read-title { margin: 0; font-family: var(--gm-font-display); font-weight: 700; color: var(--gm-bone); text-wrap: balance; }
.gm-read-title a { color: inherit; text-decoration: none; }
.gm-read-title a::after { content: ""; position: absolute; inset: 0; }
.gm-read-title a:focus-visible { outline: none; }
.gm-read-title a:focus-visible::after { outline: 2px solid var(--gm-focus); outline-offset: 4px; border-radius: var(--gm-r-sm); }
.gm-read:hover .gm-read-title a { text-decoration: underline; text-decoration-color: var(--gm-brass); text-underline-offset: 0.15em; }
.gm-read-media { display: block; overflow: hidden; border-radius: var(--gm-r); background: var(--gm-sunken); }
.gm-read-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gm-read .gm-kicker { margin-bottom: 0.4rem; }

.gm-read-lead .gm-read-media { aspect-ratio: 16 / 9; margin-bottom: 1.1rem; }
.gm-read-lead .gm-read-title { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; }
.gm-read-standfirst { margin: 0.7rem 0 0.8rem; max-width: 40rem; color: var(--gm-text); line-height: 1.6; }

.gm-shorts { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: short; }
.gm-shorts > li { counter-increment: short; border-top: 1px solid var(--gm-line); }
.gm-shorts > li:last-child { border-bottom: 1px solid var(--gm-line); }
.gm-read-short { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; align-items: start; padding-block: 1rem; }
.gm-read-short .gm-read-media { aspect-ratio: 1; border-radius: var(--gm-r-sm); }
.gm-read-short:not(:has(.gm-read-media)) { grid-template-columns: minmax(0, 1fr); }
.gm-read-short .gm-read-title { font-size: 1.0625rem; line-height: 1.3; margin-bottom: 0.4rem; }
.gm-read-short .gm-kicker::before { content: counter(short, decimal-leading-zero); color: var(--gm-faint); letter-spacing: 0.06em; }
@media (min-width: 900px) {
  .gm-reads { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: start; }
  .gm-reads-one { grid-template-columns: minmax(0, 1fr); }
  .gm-reads-one .gm-read-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 2.5rem; align-items: center; }
  .gm-reads-one .gm-read-lead .gm-read-media { grid-row: span 5; margin: 0; }
  .gm-shorts > li:first-child { border-top: 0; }
  .gm-shorts > li:first-child .gm-read-short { padding-top: 0; }
}

/* ---- 6. Painter of the month: the spread -------------------- */
.gm-spread-wrap { background: linear-gradient(180deg, var(--gm-ground), var(--gm-ground-alt) 30%, var(--gm-ground-alt) 70%, var(--gm-ground)); }
.gm-spread { position: relative; display: grid; border: 1px solid var(--gm-brass-dim); border-radius: var(--gm-r-lg); overflow: hidden;
  background: var(--gm-card); box-shadow: var(--gm-shadow-lift); }
.gm-spread-plate { position: relative; margin: 0; background: var(--gm-sunken); }
.gm-spread-plate a { display: block; height: 100%; }
.gm-spread-plate img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gm-spread-plate figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.1rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(11, 10, 9, 0.88)); color: var(--gm-bone); font-size: 0.875rem; font-weight: 600; }
.gm-spread-plate figcaption span { display: block; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gm-brass); }

.gm-spread-page { display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 3rem); }
.gm-spread-head { align-items: center; margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gm-muted); }
.gm-spread-label { color: var(--gm-brass); }
.gm-spread-headline { margin: 0; font: 700 clamp(1.75rem, 3.8vw, 2.75rem)/1.08 var(--gm-font-display); color: var(--gm-bone); text-wrap: balance; }
.gm-pullquote { position: relative; margin: 0; padding: 0.25rem 0 0 2.6rem; }
.gm-pullquote::before { content: "\201C"; position: absolute; left: -0.1rem; top: -0.55rem; font: 700 4.25rem/1 var(--gm-font-display); color: var(--gm-brass); }
.gm-pullquote p { margin: 0; font-size: clamp(1.0625rem, 1.7vw, 1.25rem); line-height: 1.6; font-style: italic; color: var(--gm-text); }
.gm-spread-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding-top: 1.1rem; border-top: 1px solid var(--gm-line); }
.gm-spread-byline p { margin: 0; display: grid; line-height: 1.35; }
.gm-spread-byline strong { color: var(--gm-bone); font-family: var(--gm-font-display); font-size: 1.0625rem; }
.gm-spread-byline p span { font-size: 0.8125rem; color: var(--gm-muted); }
.gm-spread-byline .gm-btn { margin-left: auto; }
.gm-spread-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.25rem 0 0; padding: 0; list-style: none; }
.gm-spread-strip a { display: block; overflow: hidden; border-radius: var(--gm-r-sm); border: 1px solid var(--gm-line); }
.gm-spread-strip img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.gm-spread-strip a:hover { border-color: var(--gm-brass); }
@media (min-width: 900px) {
  .gm-spread { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gm-spread-text { grid-template-columns: minmax(0, 1fr); }
  /* The gutter between the two pages. */
  .gm-spread:not(.gm-spread-text)::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2.5rem; transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.35) 48%, rgba(201, 171, 115, 0.25) 50%, rgba(0, 0, 0, 0.2) 52%, transparent); pointer-events: none; }
  .gm-spread-plate img { aspect-ratio: auto; min-height: 32rem; max-height: 40rem; }
  .gm-spread-page { padding-left: clamp(2.5rem, 4vw, 3.5rem); }
}

/* ---- 7. Fresh from the bench -------------------------------- */
.gm-mosaic { display: flex; gap: 0.75rem; margin: 0 calc(-1 * var(--gm-gutter)); padding: 0 var(--gm-gutter) 0.5rem; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gm-gutter); scrollbar-width: thin; }
.gm-mosaic > li { flex: 0 0 72%; scroll-snap-align: start; }
.gm-tile { position: relative; display: block; height: 100%; overflow: hidden; border-radius: var(--gm-r); background: var(--gm-sunken); color: var(--gm-bone); text-decoration: none; }
.gm-tile img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gm-tile-cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 0.1rem; padding: 2.5rem 0.9rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(11, 10, 9, 0.9) 70%); }
.gm-tile-title { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.gm-tile-by { font-size: 0.75rem; color: var(--gm-text); }
.gm-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none; transition: box-shadow 160ms ease; }
.gm-tile:hover::after { box-shadow: inset 0 0 0 2px var(--gm-brass); }
@media (min-width: 720px) {
  .gm-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
}
@media (min-width: 1000px) {
  /* Six pieces: two big plates either side of four small ones. */
  .gm-mosaic:has(> li:nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 13rem; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(2) { grid-column: 3; grid-row: 1; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(3) { grid-column: 4; grid-row: 1; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(4) { grid-column: 3; grid-row: 2; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(5) { grid-column: 4; grid-row: 2; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(6) { grid-column: 5 / 7; grid-row: 1 / 3; }
  .gm-mosaic:has(> li:nth-child(6):last-child) img { aspect-ratio: auto; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(n+2):nth-child(-n+5) .gm-tile-cap { padding: 1.75rem 0.7rem 0.6rem; }
  .gm-mosaic:has(> li:nth-child(6):last-child) > li:nth-child(n+2):nth-child(-n+5) .gm-tile-title { font-size: 0.8125rem; }
}

/* ---- 8. The armoury ----------------------------------------- */
.gm-armoury { background:
  radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201, 171, 115, 0.07), transparent 70%),
  repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.015) 79px 80px),
  var(--gm-sunken);
  border-block: 1px solid var(--gm-line); }

/* An item card: notched corners, a coloured edge for its tier, and its stats in boxes. */
.gm-loot { --notch: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
.gm-item { --tier: var(--gm-verdigris); --tier-line: var(--gm-verdigris-line);
  position: relative; display: flex; flex-direction: column; height: 100%; padding: 1px; color: var(--gm-bone); text-decoration: none;
  background: linear-gradient(160deg, var(--tier-line), var(--gm-line) 40%, var(--gm-line) 70%, var(--tier-line));
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch)); }
.gm-item-pick { --tier: var(--gm-brass); --tier-line: var(--gm-brass); }
.gm-item > span { background: var(--gm-card); }
.gm-item-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  clip-path: polygon(calc(var(--notch) - 1px) 0, 100% 0, 100% 100%, 0 100%, 0 calc(var(--notch) - 1px)); }
.gm-item-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gm-item-media::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--tier); }
.gm-item-body { flex: 1; display: flex; flex-direction: column; gap: 0.55rem; padding: 0.8rem 0.85rem 0.9rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--notch) + 1px), calc(100% - var(--notch) + 1px) 100%, 0 100%); }
.gm-item-tier { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tier); }
.gm-item-title { font: 700 1rem/1.25 var(--gm-font-display); color: var(--gm-bone); }
.gm-item-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin-top: auto; }
.gm-stat { display: grid; gap: 0.1rem; padding: 0.35rem 0.5rem; border: 1px solid var(--gm-line); border-radius: var(--gm-r-xs); background: var(--gm-sunken); min-width: 0; }
.gm-stat-k { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gm-faint); }
.gm-stat-v { font-size: 0.875rem; font-weight: 700; color: var(--gm-bone); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-stat-kind { font-size: 0.75rem; font-weight: 600; color: var(--gm-text); }
.gm-stat-kind i { color: var(--gm-faint); font-size: 0.7rem; }
.gm-stat-na { font-size: 0.75rem; font-weight: 600; color: var(--gm-muted); }
.gm-item:hover { --tier-line: var(--tier); }
.gm-item:focus-visible { outline: none; }
.gm-loot li:has(.gm-item:focus-visible) { outline: 2px solid var(--gm-focus); outline-offset: 3px; border-radius: var(--gm-r-xs); }
@media (min-width: 900px) { .gm-loot { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; } .gm-item-body { padding: 0.95rem 1rem 1.05rem; } }
@media (max-width: 419px) { .gm-item-stats { grid-template-columns: minmax(0, 1fr); } .gm-item-title { font-size: 0.9375rem; } }

/* The shelves as inventory slots. */
.gm-slots { margin-top: clamp(2rem, 4vw, 2.75rem); }
.gm-slots-title { margin: 0 0 0.9rem; font: 700 0.75rem/1.2 var(--gm-font-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gm-brass); }
.gm-slots ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.gm-slots a { display: flex; align-items: center; gap: 0.75rem; min-height: 3.75rem; padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border: 1px solid var(--gm-line); border-radius: var(--gm-r-sm); background: var(--gm-card); color: var(--gm-bone); text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease; }
.gm-slots a:hover { border-color: var(--gm-verdigris-line); background: var(--gm-raised); }
.gm-slot-icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; overflow: hidden;
  border: 1px solid var(--gm-brass-dim); border-radius: var(--gm-r-xs); background: var(--gm-sunken); color: var(--gm-brass); }
.gm-slot-icon img { width: 100%; height: 100%; object-fit: cover; }
.gm-slot-name { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9375rem; }
.gm-slot-count { flex: none; min-width: 1.75rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--gm-raised); text-align: center;
  font-size: 0.75rem; font-weight: 700; color: var(--gm-text); font-variant-numeric: tabular-nums; }

/* ---- 9. Choose your painter --------------------------------- */
.gm-roster { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.gm-hero { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--gm-line); border-radius: var(--gm-r-lg); background: var(--gm-card);
  transition: border-color 200ms ease, box-shadow 200ms ease; }
.gm-hero-portrait { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--gm-sunken); }
.gm-hero-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gm-hero-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(27, 24, 21, 0.95)); }
.gm-hero-portrait .gm-pill { position: absolute; z-index: 1; top: 0.75rem; left: 0.75rem; background: rgba(11, 10, 9, 0.82); }
.gm-hero-body { display: flex; flex-direction: column; gap: 0.85rem; flex: 1; padding: 0 1.1rem 1.1rem; }
.gm-hero-id { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 0.75rem; margin-top: -1.9rem; }
.gm-hero-id .gm-avatar { width: 4rem; height: 4rem; border-color: var(--gm-card); outline-color: var(--gm-brass); }
.gm-hero-name { margin: 0; font: 700 1.25rem/1.2 var(--gm-font-display); color: var(--gm-bone); }
.gm-hero-name a { color: inherit; text-decoration: none; }
.gm-hero-name a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.gm-hero-name a:focus-visible { outline: none; }
.gm-hero-class { margin: 0.15rem 0 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gm-brass); }
.gm-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--gm-line); border-radius: var(--gm-r-sm); background: var(--gm-sunken); }
.gm-hero-stats > div { padding: 0.5rem 0.4rem; text-align: center; }
.gm-hero-stats > div + div { border-left: 1px solid var(--gm-line); }
.gm-hero-stats dt { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gm-faint); }
.gm-hero-stats dd { margin: 0.15rem 0 0; font-weight: 700; color: var(--gm-bone); font-variant-numeric: tabular-nums; }
.gm-hero-stats dd span[aria-hidden] { color: var(--gm-brass); }
.gm-hero-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--gm-verdigris); }
.gm-hero:hover, .gm-hero:focus-within { border-color: var(--gm-brass); box-shadow: 0 0 0 1px var(--gm-brass-dim), var(--gm-shadow-lift); }
.gm-hero:focus-within { outline: 2px solid var(--gm-focus); outline-offset: 3px; }
.gm-roster-more { margin: 1.5rem 0 0; text-align: center; }
@media (min-width: 640px) { .gm-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .gm-roster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } .gm-hero-portrait { aspect-ratio: 4 / 4.2; } }
@media (min-width: 640px) and (max-width: 999px) { .gm-roster > li:nth-child(3):last-child { grid-column: 1 / -1; } }

/* ---- 10. Opening soon, and the one way on ------------------- */
.gm-soon { position: relative; max-width: 40rem; margin-inline: auto; padding: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--gm-brass-dim); border-radius: var(--gm-r-lg); text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(201, 171, 115, 0.08), transparent 70%), var(--gm-card); }
.gm-soon::before { content: ""; position: absolute; inset: 0.4rem; border: 1px dashed var(--gm-line); border-radius: calc(var(--gm-r-lg) - 0.3rem); pointer-events: none; }
.gm-soon-stamp { display: inline-block; margin: 0 0 1rem; padding: 0.3rem 0.75rem; border: 1px solid var(--gm-brass); border-radius: var(--gm-r-xs);
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gm-brass); transform: rotate(-2deg); }
.gm-soon h2 { margin: 0 0 0.75rem; font: 700 clamp(1.75rem, 4vw, 2.5rem)/1.1 var(--gm-font-display); color: var(--gm-bone); }
.gm-soon p { margin: 0 auto; max-width: 30rem; color: var(--gm-text); line-height: 1.6; }
.gm-soon .gm-soon-stamp { margin-bottom: 1rem; }
.gm-soon-link { margin-top: 1.25rem !important; }

.gm-ch-cta { padding-top: 0; }
.gm-cta { display: grid; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--gm-line);
  border-top: 2px solid var(--gm-brass); border-radius: var(--gm-r-lg);
  background: radial-gradient(ellipse 50% 120% at 100% 50%, rgba(103, 198, 173, 0.08), transparent 70%), var(--gm-card); }
.gm-cta-title { margin: 0; font: 700 clamp(1.6rem, 3.5vw, 2.25rem)/1.1 var(--gm-font-display); color: var(--gm-bone); }
.gm-cta-text { margin: 0.5rem 0 0; color: var(--gm-muted); line-height: 1.6; max-width: 34rem; }
.gm-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.gm-cta-alt { font-size: 0.9375rem; }
@media (min-width: 900px) { .gm-cta { grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; } }
@media (max-width: 479px) { .gm-cta-actions .gm-btn { width: 100%; } }

/* ---- 11. Motion --------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .gm-tile img, .gm-hero-portrait img, .gm-read-media img, .gm-item-media img { transition: transform 400ms ease; }
  .gm-tile:hover img, .gm-hero:hover .gm-hero-portrait img, .gm-read:hover .gm-read-media img, .gm-item:hover .gm-item-media img { transform: scale(1.04); }
  .gm-hero:hover, .gm-hero:focus-within { transform: translateY(-3px); }
  .gm-hero { transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease; }
  html:focus-within { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .gm-toc-list a, .gm-slots a, .gm-tile::after, .gm-hero { transition: none; }
}

/* ── From Legion Comps: a plain, separate section, adults only ───────────── */
.gm-ch-comps { border-top: 1px solid var(--gm-line); background: var(--gm-ground-alt); }
.gm-comps-ctas { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.gm-comps-cta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.25rem; padding: 0.8rem 1rem;
  border: 1px solid var(--gm-line); border-radius: var(--gm-r-sm); background: var(--gm-card); color: var(--gm-bone); font-weight: 600; text-decoration: none; }
.gm-comps-cta:hover { border-color: var(--gm-brass-dim); background: var(--gm-raised); }
.gm-comps-sub { margin: 0 0 1rem; font: 700 0.75rem/1.2 var(--gm-font-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gm-brass); }
.gm-comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.gm-comp { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--gm-line); border-radius: var(--gm-r); background: var(--gm-card); }
.gm-comp-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--gm-sunken); }
.gm-comp-body { display: flex; flex-direction: column; flex: 1; align-items: flex-start; gap: 0.5rem; padding: 1rem; }
.gm-comp-title { margin: 0; font: 700 1.125rem/1.25 var(--gm-font-display); color: var(--gm-bone); }
.gm-comp-facts, .gm-comp-terms { margin: 0; font-size: 0.8125rem; color: var(--gm-muted); }
.gm-comp-body .gm-btn { margin-top: auto; }
.gm-ch-comps[data-variant="plain"] { padding-block: 1.25rem; }
.gm-comps-plain { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--gm-muted); }
.gm-comps-plain a { color: var(--gm-text); text-decoration: underline; text-underline-offset: 0.15em; }
