/* HEXCLAIM: Kinset — kit box (lid) and assembly sheet. Colours: Kinset 32 only. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth.woff2") format("woff2-variations"),
       url("/fonts/archivo-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext-wdth.woff2") format("woff2-variations"),
       url("/fonts/archivo-latin-ext-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink-1: #010f20;
  --ink-2: #0a202e;
  --ink-3: #193242;
  --steel-1: #2b4472;
  --steel-2: #255d86;
  --steel-3: #6bc2e8;
  --ground-2: #7f818e;
  --ground-3: #b1b1bd;
  --light-1: #dacdba;
  --light-2: #ece4d3;
  --light-3: #f8f4ea;
  --vector-1: #7f2521;
  --vector-2: #b93a0e;
  --vector-3: #e47925;
  --latch-1: #1d6971;
  --latch-2: #4fb6b4;
  --latch-3: #8adad1;
  --mass-1: #6e442a;
  --mass-2: #bc863e;
  --mass-3: #c6ad6f;
  --gold: #eeb032;

  /* The sheet's spot ink. Choosing an expedition reprints the sheet in its colour. */
  --spot: var(--steel-2);
  --spot-fill: var(--steel-3);

  --face: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --sheet-max: 76rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:lang(zh-Hans) {
  --face: "Archivo", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

:lang(zh-Hans) .title-block h1,
:lang(zh-Hans) .title-block h2 { max-width: none; letter-spacing: 0; }
:lang(zh-Hans) .step h3,
:lang(zh-Hans) .lid-claim { letter-spacing: 0; }

/* Chinese headings break at spaces and punctuation only, so a balanced line never splits a word. */
:lang(zh-Hans) .title-block h1,
:lang(zh-Hans) .title-block h2,
:lang(zh-Hans) .step h3,
:lang(zh-Hans) .dossiers-head h3,
:lang(zh-Hans) .faq h3,
:lang(zh-Hans) .flap h2,
:lang(zh-Hans) .lid-claim { word-break: keep-all; overflow-wrap: anywhere; }

[data-spot="mass"]   { --spot: var(--mass-1);   --spot-fill: var(--mass-2); }
[data-spot="vector"] { --spot: var(--vector-2); --spot-fill: var(--vector-3); }
[data-spot="latch"]  { --spot: var(--latch-1);  --spot-fill: var(--latch-2); }

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink-1);
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-3) var(--ink-1);
}

body {
  margin: 0;
  font-family: var(--face);
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--light-2);
  background: var(--ink-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--steel-3); color: var(--ink-1); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--steel-3);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--light-3);
  color: var(--ink-1);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ───────────────────────── The lid ───────────────────────── */

/* The lid never runs past the first screen: the art is 16:9 at most and gives up height to the
   band below it, however many lines the claim takes in each language. */
.lid {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: max(100svh, 36rem);
  background: var(--ink-1);
  isolation: isolate;
}

.lid-art {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  align-self: stretch;
}

.lid-art > picture,
.lid-art > picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lid-art > picture img {
  object-fit: cover;
  object-position: 50% 35%;
}

/* Darken the sky band so the logo and nav hold their contrast. */
.lid-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(1 15 32 / 0.82) 0%, rgb(1 15 32 / 0.35) 34%, rgb(1 15 32 / 0) 52%),
    linear-gradient(to top, rgb(1 15 32 / 0.9) 0%, rgb(1 15 32 / 0) 14%);
  pointer-events: none;
}

.lid-top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  font-stretch: 85%;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lid-top nav ul,
.langs {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lid-top a {
  text-decoration: none;
  color: var(--light-2);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.lid-top a:hover { border-color: currentColor; color: var(--light-3); }
.step-index { display: flex; align-items: center; gap: 0.5rem; }
.step-index a:first-child { margin-right: 0.35rem; }
.step-index .idx {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1.5px solid rgb(236 228 211 / 0.55);
  font-stretch: 100%;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.step-index .idx:hover { border-color: var(--light-3); background: rgb(236 228 211 / 0.1); }
.step-no:hover { background: var(--ink-1); color: var(--light-3); }
[data-spot] .step-no:hover { background: var(--ink-1); border-color: var(--ink-1); }
.langs a[aria-current="true"] { color: var(--light-3); border-color: var(--light-3); }

.lid-logo img { width: 100%; height: auto; }
.lid-logo {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: clamp(3.4rem, 4.6vw, 5rem);
  translate: -50% 0;
  width: clamp(18rem, 32vw, 34rem);
  margin: 0;
  filter: drop-shadow(0 0.4rem 1.4rem rgb(1 15 32 / 0.7));
}

/* The side of the box: contents, colour guide, music, the action. */
.lid-band {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.25rem 1.75rem;
  padding: 1.1rem var(--gutter) 1.2rem;
  background: var(--ink-2);
  border-top: 1px solid var(--ink-3);
}

.lid-claim {
  margin: 0;
  font-size: clamp(1.3rem, 1.75vw, 1.65rem);
  line-height: 1.2;
  max-width: 30ch;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--light-3);
}

.lid-contents {
  margin: 0.4rem 0 0;
  font-stretch: 80%;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ground-3);
}

/* Paint guide: the three plastics in faction order (Mass left, Vector centre, Latch right). */
.paint-guide {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: center;
}

.paint-guide li {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light-1);
}

.paint-guide li::before {
  content: "";
  width: 2.6rem;
  aspect-ratio: 1.1547;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--chip);
}
.paint-guide .mass   { --chip: var(--mass-2); }
.paint-guide .vector { --chip: var(--vector-3); translate: 0 -0.5rem; }
.paint-guide .latch  { --chip: var(--latch-2); }

.lid-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.steam-plate {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0.85rem 1.4rem 0.9rem;
  background: var(--gold);
  color: var(--ink-1);
  border-radius: 3px;
  box-shadow: 0 0.7rem 1.4rem -0.7rem rgb(0 0 0 / 0.7), 0 1px 0 rgb(255 255 255 / 0.35) inset;
  text-decoration: none;
  line-height: 1.1;
}
.steam-plate strong {
  font-size: 1.05rem;
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.plate-text { display: grid; gap: 0.1rem; }
.steam-plate small {
  font-size: 0.85rem;
  font-weight: 600;
  font-stretch: 85%;
  letter-spacing: 0.04em;
}
.steam-plate svg { flex: none; width: 1.25rem; height: 1.25rem; transition: translate 0.35s var(--ease-out); }
a.steam-plate { transition: translate 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out); }
a.steam-plate:hover {
  translate: 0 -2px;
  box-shadow: 0 1.1rem 1.8rem -0.8rem rgb(0 0 0 / 0.7), 0 1px 0 rgb(255 255 255 / 0.35) inset;
}
a.steam-plate:hover svg { translate: 0 3px; }
a.steam-plate:active { translate: 0 0; }
a.steam-plate:focus-visible { outline-color: var(--light-3); }

.music {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem 0.55rem 0.75rem;
  background: transparent;
  color: var(--light-2);
  border: 1px solid var(--ground-2);
  border-radius: 3px;
  font: inherit;
  font-stretch: 85%;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.music:hover { border-color: var(--light-2); background: rgb(236 228 211 / 0.06); }
.music svg { width: 1.15rem; height: 1.15rem; flex: none; }
.music .when-on { display: none; }
.music[aria-pressed="true"] { border-color: var(--latch-3); }
.music[aria-pressed="true"] .when-on { display: inline; }
.music[aria-pressed="true"] .when-off { display: none; }

/* ───────────────────────── The assembly sheet ───────────────────────── */

.sheet {
  --line: var(--ink-1);
  position: relative;
  color: var(--ink-1);
  background-color: var(--light-3);
  /* Registration grid printed faintly on the sheet. */
  background-image:
    linear-gradient(rgb(1 15 32 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(1 15 32 / 0.045) 1px, transparent 1px);
  background-size: 2rem 2rem;
  padding: clamp(3rem, 7vw, 6.5rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}

.sheet ::selection { background: var(--spot); color: var(--light-3); }
.sheet :focus-visible { outline-color: var(--spot); }

.sheet-inner { max-width: var(--sheet-max); margin-inline: auto; }

/* Title block, as printed in the corner of every assembly sheet. */
.title-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: end;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 3px solid var(--line);
}

.title-block h1,
.title-block h2 {
  margin: 0;
  max-width: 18ch;
  /* Sized so «Tres expediciones» and "Three expeditions" hold on one line beside the parts key. */
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.98;
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.title-block p {
  margin: 1.2rem 0 0;
  max-width: 54ch;
  font-size: 1.2rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.parts-key {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1.5px solid var(--line);
  font-stretch: 80%;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 15rem;
}
.parts-key div { display: flex; justify-content: space-between; gap: 1.5rem; }
.parts-key dt { color: rgb(1 15 32 / 0.68); }
.parts-key dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Steps: the step numerals are part of the heading, as on a real sheet. */
.step {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3rem, 6vw, 5rem);
  border-bottom: 1.5px solid var(--line);
  scroll-margin-top: 1rem;
}
.step:last-of-type { border-bottom: 0; }

.step h3 {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.04;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.step-no {
  color: inherit;
  text-decoration: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  margin-top: -0.25rem;
  border: 3px solid var(--line);
  background: var(--light-3);
  font-size: 1.9rem;
  font-weight: 900;
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
[data-spot] .step-no { background: var(--spot); color: var(--light-3); border-color: var(--spot); }

.step-copy p { margin: 1.1rem 0 0; max-width: 40ch; text-wrap: pretty; }
.step-figures { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; min-width: 0; }

/* Whichever side of a step is shorter stays in view while the other scrolls past. */
@media (min-width: 64.01rem) {
  .step-copy, .step > .diagram, .step-figures { position: sticky; top: 1.5rem; align-self: start; }
}
.step-copy p:first-of-type { margin-top: 1.4rem; }

.note {
  font-stretch: 85%;
  font-size: 0.95rem;
  color: rgb(1 15 32 / 0.72);
}

.callout {
  color: var(--spot);
  font-weight: 700;
  transition: color 0.5s var(--ease-out);
}

/* ── Step 1: the sprues ── */

.sprues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Vector sits top/centre in every faction layout. */
.sprues > li { min-width: 0; }
.sprues > li:nth-child(2) { margin-top: -1.75rem; }

.sprue {
  --plastic: var(--light-1);
  --plastic-ink: var(--ink-1);
  --runner: 5px;
  --frame-ink: var(--ink-1);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-1);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: translate 0.55s var(--ease-out);
}
.sprue[data-faction="mass"]   { --plastic: var(--mass-2);   --plastic-ink: var(--mass-1); }
.sprue[data-faction="vector"] { --plastic: var(--vector-3); --plastic-ink: var(--vector-2); }
.sprue[data-faction="latch"]  { --plastic: var(--latch-2);  --plastic-ink: var(--latch-1); }

.sprue-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

/* Runner tag with the sprue letter, as moulded on a real frame. */
.sprue-tag {
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 1.7rem;
  padding-inline: 0.35rem;
  border: 2px solid var(--ink-1);
  border-radius: 5px;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  transition: background-color 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}

.sprue-name {
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Paint guide chip: the plastic this sprue is moulded in. */
.paint {
  width: 1.1rem;
  aspect-ratio: 1.1547;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--plastic);
}

.sprue-head small {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The frame: an outer runner, a window part held by side gates, a cross runner, four parts on gates. */
.runner-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 0.9rem;
  border: var(--runner) solid var(--frame-ink);
  border-radius: 16px;
  transition: border-color 0.45s var(--ease-out), background-color 0.45s var(--ease-out), box-shadow 0.55s var(--ease-out);
}

.part-window {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 2px solid var(--frame-ink);
  background: var(--ink-2);
  transition: border-color 0.45s var(--ease-out);
}
.part-window::before,
.part-window::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(0.9rem + 2px);
  height: 4px;
  translate: 0 -50%;
  background: var(--frame-ink);
  transition: background-color 0.45s var(--ease-out);
}
.part-window::before { right: 100%; }
.part-window::after { left: 100%; }

.sprue-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.sprue-crop picture { display: contents; }
.sprue-crop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  scale: 1.22;
  transform-origin: 50% 92%;
  filter: grayscale(1) brightness(1.2) contrast(1.05);
  opacity: 0.92;
  transition: filter 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}

/* Cross runner, joined to the outer frame on both sides and to the window by a gate. */
.runner-bar {
  position: relative;
  height: var(--runner);
  margin: 1.1rem -0.9rem 0;
  background: var(--frame-ink);
  transition: background-color 0.45s var(--ease-out);
}
.runner-bar::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 4px;
  height: 1.1rem;
  translate: -50% 0;
  background: var(--frame-ink);
  transition: background-color 0.45s var(--ease-out);
}

.parts-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  padding-top: 0.75rem;
}
.part-deck {
  position: relative;
  display: grid;
}
.part-deck::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 3px;
  height: 0.75rem;
  translate: -50% 0;
  background: var(--frame-ink);
  transition: background-color 0.45s var(--ease-out);
}
.part-deck .hex {
  display: grid;
  place-items: center;
  aspect-ratio: 1.1547;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--frame-ink);
  font-size: 0.85rem;
  font-weight: 800;
  font-stretch: 85%;
  font-variant-numeric: tabular-nums;
  color: var(--light-3);
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

.sprue-recipe {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* A faction's two traits, set as a parts label: what it is made of and how it fights. */
.sprue-traits,
.dossier .traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  font-stretch: 85%;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sprue-traits span,
.dossier .traits span { display: inline-flex; align-items: flex-start; gap: 0.45em; }
/* Each trait carries its own hexagon, so a wrapped line never starts with a separator. */
.sprue-traits span::before,
.dossier .traits span::before {
  content: "";
  flex: none;
  width: 0.6em;
  margin-top: 0.5em;
  aspect-ratio: 1.1547;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--frame-ink, var(--spot));
  transition: background-color 0.5s var(--ease-out);
}
.sprue-traits { margin-top: 0.55rem; font-size: 0.85rem; }

.sprue:hover .sprue-crop img { filter: grayscale(0.4); opacity: 1; }
.sprue:hover { --frame-ink: var(--steel-1); }

/* Selection: the chosen sprue rises and takes its plastic. The others recede through the
   frame and the image only, so their text keeps full contrast. */
.sprues[data-chosen] .sprue:not([aria-pressed="true"]) { --frame-ink: var(--ground-3); }
.sprues[data-chosen] .sprue:not([aria-pressed="true"]) .sprue-crop img { opacity: 0.6; }
.sprues[data-chosen] .sprue:not([aria-pressed="true"]) .sprue-tag { border-color: var(--ground-3); }
.sprues[data-chosen] .sprue:not([aria-pressed="true"]) .part-deck .hex { color: var(--ink-1); }

.sprue[aria-pressed="true"] { translate: 0 -0.75rem; --frame-ink: var(--plastic-ink); }
.sprue[aria-pressed="true"] .runner-frame {
  background: color-mix(in srgb, var(--plastic) 12%, var(--light-3));
  box-shadow: 0 1.6rem 2.6rem -1.6rem rgb(1 15 32 / 0.55);
}
.sprue[aria-pressed="true"] .sprue-tag { border-color: var(--plastic-ink); background: var(--plastic); }
.sprue[aria-pressed="true"] .sprue-crop img { filter: none; opacity: 1; }
.sprue[aria-pressed="true"] .part-deck .hex { background: var(--plastic); color: var(--ink-1); }

.chosen-line {
  min-height: 1.6em;
  margin: 1.6rem 0 0;
  font-weight: 700;
  color: var(--spot);
}

/* ── The three expeditions: one dossier per faction, decal on the faction's side ── */

.dossiers {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-bottom: 1.5px solid var(--line);
}

.dossiers-head {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 1rem clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.dossiers-head h3 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.04;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.dossiers-head p { margin: 0; max-width: 46ch; }

/* Each dossier prints in its own faction ink through the shared [data-spot] tokens. */
.dossier {
  display: grid;
  gap: 1.5rem clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1.5px dashed rgb(1 15 32 / 0.35);
  scroll-margin-top: 1.5rem;
}
.dossier[data-faction="vector"] { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem) minmax(0, 1fr); grid-template-areas: "id decal hero"; }
.dossier[data-faction="mass"]   { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "decal id hero"; }
.dossier[data-faction="latch"]  { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 22rem); grid-template-areas: "id hero decal"; }

/* The decal: full-colour art on clear film with a cut line around it. */
.decal {
  grid-area: decal;
  margin: 0;
  padding: 0.6rem;
  border: 1.5px dashed var(--spot);
  border-radius: 16px;
  transition: border-color 0.5s var(--ease-out);
}
.decal img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 5px;
}

.dossier-id { grid-area: id; }
.dossier-hero { grid-area: hero; }

.dossier h4 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.95;
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--spot);
}
.dossier h4 .sprue-tag {
  border-color: var(--spot);
  color: var(--ink-1);
  background: var(--spot-fill);
  font-size: 1.2rem;
  height: 2.2rem;
  min-width: 2.5rem;
  letter-spacing: 0;
}

.dossier .traits { margin: 0.9rem 0 0; font-size: 0.95rem; }
.dossier .playstyle { margin: 0.7rem 0 0; max-width: 36ch; text-wrap: pretty; }

/* The hero signs the quote: its name, then what it is to the faction. */
.hero-name {
  margin: 1rem 0 0;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}
.hero-name span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--spot);
  transition: color 0.5s var(--ease-out);
}
.hero-line { margin: 0.6rem 0 0; max-width: 36ch; }

.hero-quote {
  margin: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}
.hero-quote p {
  margin: 0;
  max-width: 26ch;
  font-size: clamp(1.2rem, 1.75vw, 1.65rem);
  line-height: 1.4;
  font-weight: 600;
  font-stretch: 92%;
}

.music.on-paper {
  margin-top: 1.4rem;
  color: var(--ink-1);
  border-color: var(--ink-1);
}
.music.on-paper:hover { background: rgb(1 15 32 / 0.06); border-color: var(--spot); }
.music.on-paper[aria-pressed="true"] { border-color: var(--spot); color: var(--spot); }

/* ── Diagrams (steps 2–4) ── */

.diagram {
  margin: 0;
}
.diagram svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.diagram figcaption {
  margin-top: 1rem;
  font-stretch: 85%;
  font-size: 0.95rem;
  color: rgb(1 15 32 / 0.72);
}
.diagram .ink   { stroke: var(--ink-1); fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.diagram .thin  { stroke: var(--ink-1); fill: none; stroke-width: 1.25; }
.diagram .paper { fill: var(--light-3); }
.diagram .spot  { stroke: var(--spot); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.5s var(--ease-out); }
.diagram .spot-fill { fill: var(--spot-fill); transition: fill 0.5s var(--ease-out); }
.diagram .solid { fill: var(--ink-1); }
.diagram .core  { fill: var(--gold); stroke: var(--ink-1); stroke-width: 2.5; }
.diagram text {
  paint-order: stroke;
  stroke: var(--light-3);
  stroke-width: 5px;
  stroke-linejoin: round;
  font-family: var(--face);
  font-size: 15px;
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: 0.04em;
  fill: var(--ink-1);
}
.diagram .label-spot { fill: var(--spot); }
.diagram .leader { stroke: var(--spot); fill: none; stroke-width: 1.25; transition: stroke 0.5s var(--ease-out); }
.diagram .ink-leader { stroke: var(--ink-1); }
.diagram .ghost { stroke: var(--spot); fill: none; stroke-width: 2; stroke-dasharray: 3 4; transition: stroke 0.5s var(--ease-out); }
.diagram .umbra { fill: rgb(1 15 32 / 0.07); }
.diagram .hatch { stroke: rgb(1 15 32 / 0.3); stroke-width: 1.2; }

/* Numbered callouts: a badge on the drawing, and the same number in the legend above it. */
.diagram .badge circle { fill: var(--light-3); stroke: var(--spot); stroke-width: 2.5; transition: stroke 0.5s var(--ease-out); }
.diagram .badge text {
  stroke: none;
  font-size: 15px;
  font-weight: 800;
  font-stretch: 100%;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  fill: var(--spot);
  transition: fill 0.5s var(--ease-out);
}
.callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  counter-reset: callout;
  font-stretch: 85%;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--spot);
  transition: color 0.5s var(--ease-out);
}
.callouts li { display: flex; align-items: center; gap: 0.5rem; counter-increment: callout; }
.callouts li::before {
  content: counter(callout);
  display: grid;
  place-items: center;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  font-stretch: 100%;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* A capture of the real game, framed like the photo of the finished model on a kit sheet. */
.shot { margin: 0; }
.shot a { display: block; border-radius: 5px; }
.shot img { width: 100%; height: auto; border: 3px solid var(--line); border-radius: 5px; }
.shot figcaption {
  margin-top: 0.8rem;
  font-stretch: 85%;
  font-size: 0.95rem;
  color: rgb(1 15 32 / 0.72);
}

.wins {
  display: grid;
  gap: 1rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.wins li {
  text-wrap: pretty;
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.8rem;
  align-items: baseline;
}
.wins li::before {
  content: "";
  width: 1.1rem;
  aspect-ratio: 1.1547;
  translate: 0 0.15rem;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--spot);
  transition: background-color 0.5s var(--ease-out);
}
.wins strong { font-weight: 800; }

/* ── Questions: the sheet answers the reader before the parts list ── */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3rem, 6vw, 5rem);
  border-top: 1.5px solid var(--line);
}
.faq h3 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.04;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.faq-list { margin: 0; }
.faq-list > div { padding-block: 1rem; border-bottom: 1.5px solid var(--line); }
.faq-list > div:first-child { padding-top: 0; }
.faq-list dt { font-weight: 800; font-stretch: 105%; }
.faq-list dd { margin: 0.35rem 0 0; max-width: 60ch; text-wrap: pretty; }

/* ── Parts list at the foot of the sheet ── */

.parts-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  margin-top: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 3px solid var(--line);
}
.parts-list h3 {
  margin: 0 0 1rem;
  font-size: 1.55rem;
  font-weight: 850;
  font-stretch: 112%;
}
.parts-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.parts-list li {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}
.parts-list li::before {
  content: "";
  flex: none;
  width: 0.7rem;
  aspect-ratio: 1.1547;
  translate: 0 -0.1rem;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--spot);
  transition: background-color 0.5s var(--ease-out);
}
.press-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding: 0.8rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: 3px;
  font-weight: 800;
  font-stretch: 105%;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.press-link:hover { background: var(--ink-1); color: var(--light-3); }
.press-link svg { width: 1.1rem; height: 1.1rem; }

/* Credits: the fact sheet's table, one row per credit. */
.facts.credits { border-top: 0; }
.facts.credits dd span { display: block; max-width: 65ch; }

/* 404: a sheet with one line on it. */
.title-block.missing { grid-template-columns: minmax(0, 1fr); padding-block: clamp(2rem, 8vw, 6rem); border-bottom: 0; }
.title-block.missing .press-link { margin-top: 2rem; }

/* ───────────────────────── The follow block (the box's end flap) ───────────────────────── */

.flap {
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  background: var(--ink-2);
  border-top: 1px solid var(--ink-3);
  scroll-margin-top: 0;
}
.flap-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--sheet-max);
  margin-inline: auto;
}
.flap h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--light-3);
}
.flap-copy p { margin: 1.1rem 0 0; max-width: 36ch; font-size: 1.2rem; line-height: 1.5; text-wrap: pretty; }
.flap-copy .steam-plate { margin-top: 1.8rem; }

/* The channels: rows of a parts table, each one a whole link. */
.channels { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink-3); }
.channels a {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto 1.25rem;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--ink-3);
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.ch-name { font-size: 1.2rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; color: var(--light-3); }
.ch-handle { font-stretch: 85%; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; color: var(--ground-3); }
.channels svg { width: 1.25rem; height: 1.25rem; color: var(--ground-3); transition: translate 0.3s var(--ease-out), color 0.3s var(--ease-out); }
/* Each network's own mark, in the page's ink and never in brand colours. */
.channels .brand { width: 1.4rem; height: 1.4rem; color: var(--light-2); }
.channels a:hover { background: rgb(236 228 211 / 0.06); border-color: var(--ground-2); }
.channels a:hover svg:not(.brand) { translate: 2px -2px; color: var(--light-3); }
.channels a:hover .brand { color: var(--light-3); }

/* ───────────────────────── Footer (the box bottom) ───────────────────────── */

.box-bottom {
  padding: 2.5rem var(--gutter) 3rem;
  background: var(--ink-1);
  color: var(--ground-3);
  font-size: 0.95rem;
}
.box-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  max-width: var(--sheet-max);
  margin-inline: auto;
}
.box-bottom p { margin: 0; max-width: 60ch; }
.box-bottom .mark { width: 2.2rem; height: auto; }
.box-bottom a:hover { color: var(--light-3); }

/* Social accounts: a plain inline list, in the footer by name, in the press facts with the handle. */
.socials { display: inline-flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; margin: 0; padding: 0; list-style: none; }
.socials a { display: inline-flex; align-items: center; gap: 0.4rem; }
.socials .brand { flex: none; width: 1.05rem; height: 1.05rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; }
.follow { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; max-width: 60ch; }
.socials .handle { font-stretch: 85%; color: rgb(1 15 32 / 0.74); }

/* ───────────────────────── Press page ───────────────────────── */

.press-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  background: var(--ink-1);
  font-stretch: 85%;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.press-top .home img { width: 11rem; height: auto; }
.press-top a { text-decoration: none; color: var(--light-2); }
.press-top .langs a { padding-block: 0.4rem; border-bottom: 1px solid transparent; }
.press-top .langs a[aria-current="true"] { color: var(--light-3); border-color: var(--light-3); }

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
  border-top: 3px solid var(--line);
}
.facts dt, .facts dd {
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1.5px solid var(--line);
}
.facts dt {
  padding-right: 2.5rem;
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.press-section {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1.5px solid var(--line);
}
.press-section:last-of-type { border-bottom: 0; }
.press-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.05;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.press-section .body > :first-child { margin-top: 0; }
.press-section .body p { max-width: 65ch; }
.press-section blockquote {
  margin: 0;
  padding-left: 1.2rem;
  border-left: 1px solid var(--line);
  max-width: 65ch;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.downloads a {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 2px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out);
}
.downloads a:hover { background: rgb(1 15 32 / 0.05); }
.downloads .thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--ink-1);
  overflow: hidden;
}
/* Logos are sized by height and centred; no object-fit, which drops some filtered SVGs in Chrome. */
.downloads .thumb img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  translate: -50% -50%;
}
.downloads .thumb.full img { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; translate: none; object-fit: cover; }
.downloads .thumb.light { background: var(--light-1); }
.downloads strong { font-weight: 800; }
.downloads small { display: block; font-stretch: 85%; color: rgb(1 15 32 / 0.7); font-variant-numeric: tabular-nums; }

/* ───────────────────────── Responsive ───────────────────────── */

/* The paint guide is printed only where the box side is long enough for it; below this width it
   would squeeze the claim and take height from the art. */
@media (max-width: 80rem) {
  .lid-band { grid-template-columns: minmax(0, 1fr) auto; }
  .paint-guide { display: none; }
}

@media (max-width: 64rem) {
  .lid-actions { flex-direction: column; align-items: stretch; }
  .step, .press-section, .dossiers-head, .title-block, .faq { grid-template-columns: minmax(0, 1fr); }
  .title-block h1, .title-block h2 { max-width: none; }
  .dossier[data-faction] {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    grid-template-areas: "decal id" "decal hero";
    align-items: start;
  }
  .step-copy p { max-width: 60ch; }
}

@media (max-width: 44rem) {
  /* Phone: the nav sits on ink above the 4:5 art; the logo lands in the art's clear sky band. */
  .lid { max-height: none; }
  .lid-art { aspect-ratio: auto; padding-top: 2.9rem; }
  /* The art gives up its lowest strip, already under the band's shade, when the screen is short,
     so the plate stays inside the first screen. */
  .lid-art > picture {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    max-height: max(24.5rem, calc(100svh - 14.5rem));
  }
  .lid-art > picture img { position: absolute; inset: 0; object-position: 50% 0%; }
  .step-index .idx { display: none; }
  .lid-top { flex-wrap: wrap; row-gap: 0.4rem; padding-block: 0.8rem; }
  .lid-top nav ul, .langs { gap: 1rem; }
  .lid-logo { top: 3.6rem; width: min(15rem, 60vw); }
  .diagram text { font-size: 25px; }
  .diagram .badge { scale: 1.45; }
  /* The band's parts line up in one column so the action follows the claim, inside the first screen. */
  .lid-band { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 1.1rem 1.8rem; }
  .lid-band > div:first-child, .lid-actions { display: contents; }
  .lid-claim { order: 1; }
  .lid-band .steam-plate { order: 2; justify-content: center; padding-inline: 1rem; text-align: center; }
  .lid-band .steam-plate strong { font-stretch: 104%; letter-spacing: 0.01em; white-space: nowrap; }
  .lid-contents { order: 3; margin: 0; }
  .lid-band .music { order: 4; justify-content: center; }
  /* A little less width in the face keeps the title to three even lines on a phone. */
  .title-block h1, .title-block h2 { font-size: clamp(1.7rem, 8.2vw, 2.4rem); font-stretch: 108%; }
  .parts-key { min-width: 0; }
  /* Sprues become compact rows: the frame on the left, what the faction does on the right. */
  .sprues { grid-template-columns: minmax(0, 1fr); gap: 1.9rem; }
  .sprues > li:nth-child(2) { margin-top: 0; order: -1; }
  .sprue {
    --runner: 4px;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 1rem;
    align-items: start;
  }
  .sprue[aria-pressed="true"] { translate: none; }
  .sprue-head { grid-column: 1 / -1; }
  .runner-frame { grid-row: 2 / span 2; padding: 0.55rem; }
  .part-window::before, .part-window::after { width: calc(0.55rem + 2px); height: 3px; }
  .runner-bar { margin: 0.8rem -0.55rem 0; }
  .runner-bar::before { height: 0.8rem; width: 3px; }
  .parts-row { gap: 0.3rem; padding-top: 0.6rem; }
  .part-deck::before { height: 0.6rem; width: 2px; }
  .part-deck .hex { letter-spacing: -0.02em; }
  .sprue-recipe { margin-top: 0; }
  .parts-list { grid-template-columns: minmax(0, 1fr); }
  .flap-inner { grid-template-columns: minmax(0, 1fr); }
  .dossier[data-faction] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "decal" "id" "hero";
  }
  .decal { max-width: 20rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .sprues[data-chosen] .sprue[aria-pressed="true"] { translate: none; }
}
