/* Kettlehum website styles.
   Source file: tools/build_site.py copies it into upload/assets/ with a
   content hash in its name, and swaps every asset placeholder for a picture
   or font reference for the real (fingerprinted) address of that file.
   Colours come only from Warm Static's palette (WarmStatic/scripts/core/pal.gd).
   Text colour pairs are all at least 4.5:1. No inline styles anywhere: the
   site's Content-Security-Policy forbids them.

   Pixel art: every sprite is drawn by tools/art_site.py at 1 art pixel =
   1 image pixel. --px is how many screen pixels one art pixel becomes, and
   it is always a whole number, so the art stays crisp. Animations move only
   transform (sprite strips stepped with steps()) or opacity, so they never
   cause layout work, and they all stop under prefers-reduced-motion. */

@font-face {
  font-family: "Static Mono";
  src: url("/assets/static-mono.0737bd302b.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Warm Static palette */
  --ink: #1A1830;
  --plum-dark: #2B2140;
  --plum: #3D2F57;
  --plum-light: #5B4778;
  --night-blue: #3A3A52;
  --rain-blue: #4A5D9E;
  --rain-light: #7B8FD1;
  --sky-haze: #A9B6E8;
  --amber: #FFB35C;
  --amber-light: #FFD08A;
  --amber-dark: #D9822B;
  --cream: #F4E4C1;
  --cream-dark: #E2CDA0;
  --paper-shadow: #C9B48A;
  --white-warm: #FFF8EC;
  --walnut: #7A4E35;
  --walnut-dark: #53331F;
  --walnut-light: #A0704D;
  --phosphor: #6EE7C8;
  --phosphor-dark: #2F8F7E;
  --neon-pink: #FF6FA3;
  --neon-pink-dark: #B8406E;

  /* roles */
  --page: var(--plum-dark);
  --text: var(--cream);
  --text-soft: var(--sky-haze);
  --link: var(--phosphor);
  --focus: var(--phosphor);
  --gutter: 16px;
  --side-l: max(var(--gutter), env(safe-area-inset-left));
  --side-r: max(var(--gutter), env(safe-area-inset-right));
  --body-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pixel-font: "Static Mono", ui-monospace, Menlo, Consolas, monospace;

  color-scheme: dark;
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The page is a column: header, main, footer. main takes any spare height,
   so on a short page (the 404) the footer still sits at the bottom. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

.site-head,
.site-foot {
  flex: none;
}

/* a hyphenated word that should never split at its hyphen ("lo-fi") */
.nb {
  white-space: nowrap;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* Pixel art: scale by whole numbers, keep the pixels square and sharp. */
.px {
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

h1,
h2,
h3,
.pixel {
  font-family: var(--pixel-font);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  -webkit-font-smoothing: none;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

/* where the browser can, no word is left alone on a paragraph's last line
   (short display lines use "balance" instead, set on their own classes) */
p {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  /* a soft amber flash where a finger lands */
  -webkit-tap-highlight-color: rgba(255, 179, 92, 0.28);
}

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--side-l);
  padding-right: var(--side-r);
}

.narrow {
  max-width: 760px;
}

/* ---------- skip link ---------- */
.skip {
  position: absolute;
  left: 8px;
  top: -200px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  text-decoration: none;
  border: 2px solid var(--ink);
}

.skip:focus {
  top: 8px;
  outline-color: var(--white-warm);
}

/* ---------- header: one slim row on every screen ---------- */
.site-head {
  position: relative;
  background-color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, rgba(61, 47, 87, 0.35) 0 1px, transparent 1px 4px);
  border-bottom: 4px solid var(--walnut-dark);
  padding-top: env(safe-area-inset-top);
}

.site-nav ul {
  --nav-gap: 4px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0 var(--nav-gap);
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.site-nav li:first-child {
  margin-right: auto;
}

/* A small pixel dot between the page links (as in the footer), so on a
   small phone "Warm Static" and "Privacy" never read as one phrase. It
   sits in the middle of the space the two links already leave. */
.site-nav li + li + li {
  --sep: var(--nav-gap);   /* the space between this link and the one before */
  position: relative;
}

.site-nav li + li + li::before {
  content: "";
  position: absolute;
  left: calc(var(--sep) / -2 - 2px);
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  background: var(--walnut-light);
  pointer-events: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: 48px;
  padding: 4px 10px;
  color: var(--cream);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  -webkit-font-smoothing: none;
}

.site-nav a:hover {
  color: var(--amber-light);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav a:active {
  color: var(--amber);
}

.site-nav a[aria-current="page"],
.site-nav a[aria-current="true"] {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-decoration-color: var(--amber);
  text-underline-offset: 0.35em;
}

/* The 32 px kettle at 1x (whole pixels only). */
.site-nav .brand {
  padding-left: 0;
}

.brand img {
  display: block;
  width: 32px;
  height: 32px;
}

.brand[aria-current="page"] {
  text-decoration: none;
}

.brand[aria-current="page"] .brand-name {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-decoration-color: var(--amber);
  text-underline-offset: 0.35em;
}

.w1 {
  color: var(--amber);
}

.w2 {
  color: var(--phosphor);
}

/* Small phones: the kettle alone stands for "Kettlehum home" (the words
   stay for screen readers); on the home page the big name is just below. */
@media (max-width: 479px) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-nav a {
    padding: 4px 8px;
  }
}

/* The narrowest phones: every pixel counts. The kettle's tap area is the
   44 px minimum, and the page links lose a little padding, so there is
   room for a clear space (and the dot) between "Warm Static" and "Privacy". */
@media (max-width: 339px) {
  .site-nav ul {
    --nav-gap: 0px;
  }

  .site-nav a {
    padding: 4px;
  }

  .site-nav .brand {
    min-width: 44px;
  }

  .site-nav li + li + li {
    --sep: 12px;
    margin-left: 12px;
  }
}

/* ---------- shared panels ---------- */
.section {
  padding: 40px 0 8px;
}

.section-title {
  font-size: 30px;
  color: var(--amber);
  text-shadow: 0 3px 0 var(--walnut-dark);
  margin-bottom: 20px;
}

.kicker {
  display: block;
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  color: var(--phosphor);
  margin: 0 0 6px;
  -webkit-font-smoothing: none;
}

.lede {
  font-size: 1.125rem;
  max-width: 62ch;
}

.soft {
  color: var(--text-soft);
}

/* Postcard paper: warm white, an ink edge, a dashed inner line and a hard
   pixel shadow. Text on it is ink (16:1); links are rain blue (5.9:1). */
.paper {
  position: relative;
  background: var(--white-warm);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 24px 20px;
  --link: var(--rain-blue);
  --focus: var(--plum);
}

.paper::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed var(--cream-dark);
  pointer-events: none;
}

.paper > * {
  position: relative;
}

.paper h2,
.paper h3 {
  color: var(--plum);
}

.paper .soft {
  color: var(--plum);
}

.paper a:not(.btn) {
  color: var(--rain-blue);
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 20px;
  margin-top: 1.4em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

/* ---------- buttons and the "coming soon" badge ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 16px 0 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 18px;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: inset -4px -4px 0 var(--amber-dark), 4px 4px 0 var(--ink);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  -webkit-font-smoothing: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--amber-light);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* pressed: the button sinks into its shadow, like a real key */
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: inset -4px -4px 0 var(--amber-dark), 2px 2px 0 var(--ink);
}

.btn .arrow {
  font-family: var(--pixel-font);
}

.btn--quiet {
  background: var(--white-warm);
  box-shadow: inset -4px -4px 0 var(--cream-dark), 4px 4px 0 var(--ink);
}

.btn--quiet:hover {
  background: var(--cream);
}

.btn--quiet:active {
  box-shadow: inset -4px -4px 0 var(--cream-dark), 2px 2px 0 var(--ink);
}

/* Not a link: a dashed, flat label, so it never looks pressable. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 9px 16px;
  background: var(--cream);
  color: var(--ink);
  border: 2px dashed var(--plum);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  -webkit-font-smoothing: none;
}

.soon .lamp {
  align-self: flex-start;
  color: var(--walnut);
}

.soon .soon-text {
  text-wrap: balance;
}

.testers {
  margin: 8px 0 0;
  text-wrap: balance;
}

.testers a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}

/* =====================================================================
   Home: the room. A rainy night window with the name painted on the glass,
   a sill of cosy things (a lamp, a valve radio, a plant, the kettle
   steaming on a stove, a tiny TV, a mug, a sleeping cat whose tail hangs
   over the edge), and wood panelling below with the welcome.
   ===================================================================== */
.room {
  --px: 3px;
  --sl: max(8px, env(safe-area-inset-left));
  --sr: max(8px, env(safe-area-inset-right));
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: [full-start] var(--sl) [win-start] minmax(0, 1fr) [win-end] var(--sr) [full-end];
  grid-template-rows: [r1] auto [r2] auto [r3] calc(8 * var(--px)) [r4] auto [r5];
  padding-top: 12px;
  background-color: var(--plum-dark);
  background-image: url("/assets/wallpaper.d2813f1ac6.png");
  background-size: calc(12 * var(--px)) calc(12 * var(--px));
  image-rendering: pixelated;
}

/* --- the window --- */
.window {
  grid-column: win-start / win-end;
  grid-row: r1 / r3;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-style: solid;
  border-width: calc(6 * var(--px)) calc(6 * var(--px)) 0;
  border-image-source: url("/assets/window-frame.04d3306f7c.png");
  border-image-slice: 6;
  border-image-repeat: stretch;
  background-color: var(--ink);
  background-image: url("/assets/skyline.3780cdcc2c.png"), url("/assets/sky.9ae3670d46.png");
  background-repeat: repeat-x, repeat-x;
  background-position: 0 100%, 0 100%;
  background-size: calc(96 * var(--px)) calc(30 * var(--px)), calc(4 * var(--px)) calc(96 * var(--px));
  background-clip: padding-box;
}

.window > span {
  position: absolute;
  display: block;
  pointer-events: none;
}

.w-moon {
  top: calc(-1 * var(--px));
  right: calc(9 * var(--px));
  width: calc(14 * var(--px));
  height: calc(14 * var(--px));
  background: url("/assets/moon.2d6373fe49.png") 0 0 / 100% 100% no-repeat;
}

/* Rain: each layer is one tile taller than the glass and slides down by
   exactly one tile, in whole art pixels, so the loop has no seam. */
.w-rain {
  left: 0;
  right: 0;
  top: calc(-64 * var(--px));
  bottom: 0;
  background-size: calc(64 * var(--px)) calc(64 * var(--px));
  will-change: transform;
}

.w-rain--far {
  background-image: url("/assets/rain-far.77dec004f2.png");
  animation: s-rain 2.4s steps(32) infinite;
}

.w-rain--near {
  background-image: url("/assets/rain-near.cbcbd27331.png");
  background-position: calc(23 * var(--px)) 0;
  animation: s-rain 1.3s steps(16) infinite;
}

@keyframes s-rain {
  to { transform: translateY(calc(64 * var(--px))); }
}

/* the transom: a glazing bar across the top, split into three small panes */
.w-transom {
  top: 0;
  left: 0;
  right: 0;
  height: calc(17 * var(--px));
  background-image: url("/assets/bar-h.82dda78d82.png"), url("/assets/bar-v.6f0bb61254.png"), url("/assets/bar-v.6f0bb61254.png");
  background-repeat: repeat-x, repeat-y, repeat-y;
  background-position: 0 100%, 33.333% 0, 66.667% 0;
  background-size: var(--px) calc(5 * var(--px)), calc(4 * var(--px)) var(--px), calc(4 * var(--px)) var(--px);
}

.w-drops {
  inset: calc(17 * var(--px)) 0 0;
  background: url("/assets/drops.3f834d5e60.png") 0 0 / calc(44 * var(--px)) calc(38 * var(--px)) repeat;
}

/* --- the name, painted on the glass (real text) --- */
.sign {
  grid-column: win-start / win-end;
  grid-row: r1 / r2;
  position: relative;
  z-index: 3;
  text-align: center;
  padding: calc(25 * var(--px)) 16px calc(30 * var(--px));
}

.wordmark {
  font-size: 50px;
  line-height: 1.1;
  margin: 0 0 10px;
  text-shadow: 0 4px 0 var(--walnut-dark), 0 0 22px rgba(255, 179, 92, 0.45);
}

.wordmark .w2 {
  text-shadow: 0 4px 0 var(--phosphor-dark), 0 0 22px rgba(110, 231, 200, 0.5);
}

.tagline {
  margin: 0 auto;
  max-width: 16ch;
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  color: var(--cream);
  text-shadow: 0 2px 0 var(--ink);
  text-wrap: balance;
  -webkit-font-smoothing: none;
}

@media (max-width: 359px) {
  .wordmark {
    font-size: 40px;
  }
}

/* --- the sill and the things on it --- */
.sill {
  grid-column: full-start / full-end;
  grid-row: r3 / r4;
  position: relative;
  z-index: 4;
  height: calc(10 * var(--px));
  background: url("/assets/sill.b989baddc5.png") 0 0 / calc(8 * var(--px)) calc(10 * var(--px)) repeat-x;
}

.panelling {
  grid-column: full-start / full-end;
  grid-row: r3 / r5;
  z-index: 0;
  background-color: var(--walnut-dark);
  background-image: url("/assets/skirting.42d567bc7d.png"), url("/assets/panelling.edb4866f54.png");
  background-repeat: repeat-x, repeat;
  background-position: 0 100%, 0 0;
  background-size: calc(8 * var(--px)) calc(9 * var(--px)), calc(32 * var(--px)) calc(40 * var(--px));
}

.things {
  grid-column: full-start / full-end;
  grid-row: r2 / r3;
  align-self: end;
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(2 * var(--px));
  padding: 0 calc(3 * var(--px));
  margin-bottom: calc(-3 * var(--px));
  pointer-events: none;
}

.s-thing {
  position: relative;
  display: block;
  flex: none;
}

.s-thing span {
  position: absolute;
  display: block;
}

/* A sprite strip: the inner span holds every frame side by side and slides
   one frame at a time (steps), inside a frame-sized window. */
.s-anim {
  overflow: hidden;
}

.s-anim > span {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  will-change: transform;
}

@keyframes s-strip {
  to { transform: translateX(-100%); }
}

@keyframes s-glow {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* lamp: 16x30, with a soft halo that breathes */
.s-lamp {
  width: calc(16 * var(--px));
  height: calc(30 * var(--px));
}

.s-lamp-body {
  inset: 0;
  background: url("/assets/lamp.88f723d933.png") 0 0 / 100% 100% no-repeat;
}

.s-lamp-glow {
  left: calc(-22 * var(--px));
  top: calc(-10 * var(--px));
  width: calc(60 * var(--px));
  height: calc(52 * var(--px));
  background: url("/assets/lamp-glow.ada1cd3ef9.png") 0 0 / 100% 100% no-repeat;
  animation: s-glow 6s ease-in-out infinite alternate;
}

/* valve radio: 22x24; the dial and valves glow, little notes drift up */
.s-radio {
  width: calc(22 * var(--px));
  height: calc(24 * var(--px));
}

.s-radio-body {
  inset: 0;
  background: url("/assets/radio.2884a73577.png") 0 0 / 100% 100% no-repeat;
}

.s-radio-glow {
  z-index: 1;
  left: calc(-6 * var(--px));
  top: calc(-6 * var(--px));
  width: calc(34 * var(--px));
  height: calc(36 * var(--px));
  background: url("/assets/radio-glow.1b5d2b538f.png") 0 0 / 100% 100% no-repeat;
  animation: s-glow 4.2s ease-in-out infinite alternate;
}

.s-notes {
  left: calc(11 * var(--px));
  top: calc(-17 * var(--px));
  width: calc(14 * var(--px));
  height: calc(18 * var(--px));
}

.s-notes > span {
  width: 1600%;
  background-image: url("/assets/notes-sheet.611016d5f1.png");
  animation: s-strip 5.6s steps(16) infinite;
}

/* the kettle on a camping stove: 32x40, 6 flame frames */
.s-stove {
  width: calc(32 * var(--px));
  height: calc(40 * var(--px));
}

.s-stove-body {
  inset: 0;
}

.s-stove-body > span {
  width: 600%;
  background-image: url("/assets/stove-sheet.ce5f2f965c.png");
  animation: s-strip 1.2s steps(6) infinite;
}

/* The steam never stops: 24 frames that loop with no jump (a puff leaves
   the spout every 3 frames and takes all 24 to rise and fade), then a 25th
   frame, the still wisp shown under reduced motion. */
.s-steam {
  left: calc(-4 * var(--px));
  top: calc(-27 * var(--px));
  width: calc(24 * var(--px));
  height: calc(40 * var(--px));
}

.s-steam > span {
  width: 2500%;
  background-image: url("/assets/steam-sheet.88e84fcb34.png");
  animation: s-steam 3s steps(24) infinite;
}

@keyframes s-steam {
  to { transform: translateX(calc(-100% * 24 / 25)); }
}

/* the little TV with a heart (Warm Static's icon, in miniature) */
.s-tv {
  width: calc(22 * var(--px));
  height: calc(22 * var(--px));
}

.s-tv > span {
  width: 400%;
  background-image: url("/assets/tv-sheet.e5b461bdd5.png");
  animation: s-strip 3.2s steps(4) infinite;
}

.s-plant {
  width: calc(12 * var(--px));
  height: calc(18 * var(--px));
  background: url("/assets/plant.0548b2d618.png") 0 0 / 100% 100% no-repeat;
}

.s-books {
  width: calc(18 * var(--px));
  height: calc(14 * var(--px));
  background: url("/assets/books.a986151254.png") 0 0 / 100% 100% no-repeat;
}

.s-mug {
  width: calc(11 * var(--px));
  height: calc(10 * var(--px));
  background: url("/assets/mug.61635f8a33.png") 0 0 / 100% 100% no-repeat;
}

/* The cat: asleep, breathing slowly (2 frames, 4.6 s). */
.s-cat {
  width: calc(30 * var(--px));
  height: calc(16 * var(--px));
}

.s-cat-body {
  inset: 0;
}

.s-cat-body > span {
  width: 200%;
  background-image: url("/assets/cat-sheet.471543b29a.png");
  animation: s-breathe 4.6s steps(1, end) infinite;
}

@keyframes s-breathe {
  0% { transform: translateX(0); }
  45% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Little z's drift up from its head, forever (16 frames, 8 s): two at a
   time at most, each popping up small, growing and cooling to blue. */
.s-zzz {
  left: calc(5 * var(--px));
  top: calc(-21 * var(--px));
  width: calc(14 * var(--px));
  height: calc(22 * var(--px));
}

.s-zzz > span {
  width: 1600%;
  background-image: url("/assets/zzz-sheet.1a238ad5f7.png");
  animation: s-strip 8s steps(16) infinite;
}

/* Its tail hangs over the sill's edge and keeps moving, forever, on its
   own uneven 12-second rhythm, so it never looks mechanical: a long rest,
   a lazy sway right and left, a rest, a small sway, a slow curl up and
   down, a little flick. 9 poses (art_site.TAIL_POSES): 0 rest, 1-3 left,
   4-6 right, 7-8 curl. Each keyframe holds its pose until the next one
   (steps(1, end)), so long gaps are pauses and short ones are movement. */
.s-cat-tail {
  left: calc(17 * var(--px));
  top: calc(13 * var(--px));
  width: calc(18 * var(--px));
  height: calc(30 * var(--px));
}

.s-cat-tail > span {
  width: 900%;
  background-image: url("/assets/tail-sheet.de9f81a4f5.png");
  animation: s-tail 12s steps(1, end) infinite;
}

@keyframes s-tail {
  0% { transform: translateX(0); }
  16% { transform: translateX(calc(-400% / 9)); }
  17.5% { transform: translateX(calc(-500% / 9)); }
  19% { transform: translateX(calc(-600% / 9)); }
  22% { transform: translateX(calc(-500% / 9)); }
  23.5% { transform: translateX(calc(-400% / 9)); }
  25% { transform: translateX(0); }
  26.5% { transform: translateX(calc(-100% / 9)); }
  28% { transform: translateX(calc(-200% / 9)); }
  29.5% { transform: translateX(calc(-300% / 9)); }
  32.5% { transform: translateX(calc(-200% / 9)); }
  34% { transform: translateX(calc(-100% / 9)); }
  35.5% { transform: translateX(0); }
  52% { transform: translateX(calc(-400% / 9)); }
  54% { transform: translateX(calc(-500% / 9)); }
  57% { transform: translateX(calc(-400% / 9)); }
  59% { transform: translateX(0); }
  72% { transform: translateX(calc(-700% / 9)); }
  74.5% { transform: translateX(calc(-800% / 9)); }
  80% { transform: translateX(calc(-700% / 9)); }
  82.5% { transform: translateX(0); }
  91% { transform: translateX(calc(-100% / 9)); }
  92.5% { transform: translateX(0); }
  100% { transform: translateX(0); }
}

/* what fits on the sill at each width (the rest wait in the cupboard) */
.s-books,
.s-mug,
.s-tv,
.s-plant {
  display: none;
}

@media (max-width: 359px) {
  .s-lamp {
    display: none;
  }
}

@media (min-width: 390px) {
  .s-plant {
    display: block;
  }
}

/* Phones from 360 px: the little heart TV (Warm Static's own icon, in
   miniature) takes the radio's place, so phones see it too. They are the
   same size, so the sill still fits. (Below 360 the radio stays: with the
   lamp put away there, its glow is the room's warm light.) */
@media (min-width: 360px) and (max-width: 599px) {
  .s-radio {
    display: none;
  }

  .s-tv {
    display: block;
  }
}

/* --- the welcome, on the wood panelling under the sill --- */
.welcome {
  grid-column: win-start / win-end;
  grid-row: r4 / r5;
  position: relative;
  z-index: 3;
  padding: calc(26 * var(--px)) 8px calc(9 * var(--px) + 32px);
  text-align: center;
}

.welcome .intro {
  max-width: 34ch;
  margin: 0 auto 20px;
  color: var(--cream);
  font-size: 1.125rem;
  text-shadow: 0 1px 0 var(--ink);
  text-wrap: balance;
}

.welcome-go {
  margin: 0;
}

.welcome .btn .arrow {
  display: inline-block;
}

/* tablets and up (still stacked) */
@media (min-width: 600px) {
  .room {
    --px: 4px;
    --sl: max(24px, env(safe-area-inset-left));
    --sr: max(24px, env(safe-area-inset-right));
    padding-top: 24px;
  }

  .wordmark {
    font-size: 80px;
    text-shadow: 0 6px 0 var(--walnut-dark), 0 0 30px rgba(255, 179, 92, 0.45);
  }

  .wordmark .w2 {
    text-shadow: 0 6px 0 var(--phosphor-dark), 0 0 30px rgba(110, 231, 200, 0.5);
  }

  .tagline {
    font-size: 30px;
    max-width: none;
  }

  .sign {
    padding-bottom: calc(28 * var(--px));
  }

  .s-tv {
    display: block;
  }

  .welcome {
    padding-top: calc(12 * var(--px));
  }
}

@media (min-width: 760px) {
  .s-books,
  .s-mug {
    display: block;
  }
}

/* Wide: the name on the left of the glass, the things on the right.
   Laptops and desktops, tablets on their side, and phones on their side. */
@media (min-width: 1024px), (min-width: 640px) and (max-height: 540px) and (orientation: landscape) {
  .room {
    grid-template-columns:
      [full-start] minmax(var(--sl), 1fr)
      [win-start] minmax(0, 32rem)
      [mid] minmax(0, 42rem)
      [win-end] minmax(var(--sr), 1fr)
      [full-end];
    grid-template-rows: [r1] auto [r3] calc(8 * var(--px)) [r4] auto [r5];
  }

  .window {
    grid-row: r1 / r3;
  }

  .sign {
    grid-column: win-start / mid;
    grid-row: r1 / r3;
    align-self: start;
    text-align: left;
    padding: calc(24 * var(--px)) 0 calc(14 * var(--px)) calc(6 * var(--px) + 28px);
  }

  .tagline {
    margin: 0;
  }

  .things {
    grid-column: mid / win-end;
    grid-row: r1 / r3;
    justify-content: flex-end;
    padding-right: calc(10 * var(--px));
    padding-top: calc(64 * var(--px));
  }

  .sill {
    grid-column: win-start / win-end;
    margin: 0 calc(-4 * var(--px));
  }

  .panelling {
    grid-row: r3 / r5;
  }

  .welcome {
    grid-column: win-start / win-end;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
    text-align: left;
    padding: calc(16 * var(--px)) calc(40 * var(--px)) 40px calc(6 * var(--px) + 28px);
  }

  .welcome .intro {
    margin: 0;
    max-width: 40ch;
  }
}

/* laptops 1024-1279: a step smaller so everything fits beside the name */
@media (min-width: 1024px) and (max-width: 1279px) {
  .room {
    --px: 3px;
  }

  .wordmark {
    font-size: 70px;
  }
}

@media (min-width: 1024px) {
  .s-books,
  .s-mug {
    display: none;
  }
}

@media (min-width: 1440px) {
  .s-books {
    display: block;
  }
}

/* phones on their side: 2x art and smaller words, so the name, the scene
   and the welcome all fit on the first screen */
@media (min-width: 640px) and (max-height: 540px) and (orientation: landscape) {
  .room {
    --px: 2px;
    padding-top: 12px;
  }

  .wordmark {
    font-size: 50px;
    text-shadow: 0 4px 0 var(--walnut-dark), 0 0 20px rgba(255, 179, 92, 0.45);
  }

  .wordmark .w2 {
    text-shadow: 0 4px 0 var(--phosphor-dark), 0 0 20px rgba(110, 231, 200, 0.5);
  }

  .tagline {
    font-size: 20px;
  }

  .sign {
    padding: calc(22 * var(--px)) 0 calc(10 * var(--px)) calc(6 * var(--px) + 20px);
  }

  .welcome {
    padding: calc(20 * var(--px)) 24px 24px calc(6 * var(--px) + 20px);
  }

  .s-books,
  .s-mug {
    display: block;
  }
}

/* =====================================================================
   Home: the games, each a spotlight card
   ===================================================================== */
.games {
  padding-top: 40px;
}

.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-list > li + li {
  margin-top: 56px;
}

.spot-card {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.spot-art {
  margin: 0;
  background: var(--ink);
  border-bottom: 2px solid var(--ink);
  line-height: 0;
}

.spot-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 256 / 125;
}

.spot-body {
  padding: 0 20px 22px;
}

.spot-body .stamp {
  position: absolute;
  top: -22px;
  right: 14px;
  width: 40px;
  height: 48px;
  transform: rotate(4deg);
}

.no-art .spot-body {
  padding-top: 24px;
}

.no-art .spot-icon {
  margin-top: 0;
}

.spot-head {
  margin-bottom: 10px;
}

/* the app icon sits over the bottom edge of the feature art */
.spot-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin-top: -34px;
  margin-bottom: 14px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--ink);
}

.spot-name {
  margin: 0;
}

.spot-name .l1 {
  display: block;
  font-size: 30px;
}

.spot-name .l2 {
  display: block;
  font-size: 20px;
  margin-top: 2px;
}

/* a one-line name is still a full-height tap target */
.spot-name.one-line a {
  display: inline-block;
  padding: 4px 0;
}

.paper .spot-name a {
  color: var(--plum);
  text-decoration-color: var(--amber-dark);
}

.paper .spot-name a:hover {
  color: var(--ink);
}

.game-tagline {
  font-size: 1.125rem;
  text-wrap: balance;
}

.spot-body .game-tagline {
  font-weight: 600;
  margin-bottom: 8px;
}

.spot-body p {
  margin-bottom: 8px;
}

.spot-body .blurb {
  max-width: 60ch;
}

/* promise chips: a pixel tick and a few words each */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 14px 0 6px;
  padding: 0;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 10px 4px 6px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.chips img {
  flex: none;
  width: 20px;
  height: 20px;
}

/* a few true numbers, like a store listing: one bar, split by dashes */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 14px 0 6px;
  padding: 0;
  background: var(--plum);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px 10px;
  color: var(--cream);
  line-height: 1.2;
}

.facts li:nth-child(even) {
  border-left: 2px dashed var(--plum-light);
}

.facts li:nth-child(n+3) {
  border-top: 2px dashed var(--plum-light);
}

.facts strong {
  font-family: var(--pixel-font);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--amber);
  -webkit-font-smoothing: none;
}

.facts span {
  font-size: 0.875rem;
}

.spot-actions .actions {
  margin-top: 18px;
}

/* the screenshots under the card ("Inside the shop") */
.peek-inside {
  margin-top: 44px;
}

.strip-title {
  font-size: 30px;
  color: var(--amber);
  text-shadow: 0 3px 0 var(--walnut-dark);
  margin: 0 0 4px;
}

.shot-hint {
  margin: 0 0 14px;
}

.hint-mouse {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .hint-touch {
    display: none;
  }

  .hint-mouse {
    display: inline;
  }
}

/* "Swipe for more." stays together on one line */
.hint-swipe {
  white-space: nowrap;
}

/* from 900 px the strip shows all eight at once: nothing to swipe */
@media (min-width: 900px) {
  .hint-swipe {
    display: none;
  }
}

/* Phones: a strip that swipes sideways; about two and a half pictures
   show, so it obviously scrolls. */
.strip {
  list-style: none;
  display: flex;
  gap: 14px;
  margin: 0 calc(-1 * var(--side-r)) 0 calc(-1 * var(--side-l));
  padding: 6px var(--side-r) 18px var(--side-l);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--side-l);
  scrollbar-width: thin;
  scrollbar-color: var(--plum-light) transparent;
}

/* position: relative keeps each link's hidden "(open the larger view)"
   text inside the scroller, so it can never widen the page */
.strip li,
.gallery li {
  position: relative;
  scroll-margin: calc(96px + env(safe-area-inset-top)) 0 24px;
}

/* The thumbnail links get the same margin, so whatever brings one into
   view (closing the viewer, or reaching it with the Tab key) keeps it
   clear of the sticky section bar on the Warm Static page. */
.strip .shot-link,
.gallery .shot-link {
  scroll-margin: calc(96px + env(safe-area-inset-top)) 0 24px;
}

.strip li {
  flex: 0 0 40%;
  max-width: 190px;
  scroll-snap-align: start;
}

/* each screenshot sits in a little pixel phone */
.shot-link {
  display: block;
  line-height: 0;
  padding: 10px 4px;
  background: var(--ink);
  border: 2px solid var(--plum-light);
  box-shadow: 4px 4px 0 var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.shot-link::before {
  content: "";
  display: block;
  width: 24%;
  height: 2px;
  margin: -6px auto 4px;
  background: var(--plum-light);
}

.shot-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  background: var(--plum);
}

.shot-link:hover {
  border-color: var(--amber);
}

.shot-link:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* the picture you just looked at, back in the strip */
.was-viewed > .shot-link,
li:target > .shot-link {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber), 4px 4px 0 var(--ink);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shot-link {
    transition: transform 0.15s steps(2, end), box-shadow 0.15s steps(2, end);
  }

  .shot-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
  }
}

.shot-cap {
  margin: 10px 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--cream);
}

/* The trailer: a 9:16 video in the same little pixel phone as the
   screenshots, with what it shows beside it (below it on phones). It never
   plays by itself. */
.trailer {
  display: grid;
  gap: 18px;
  margin: 8px 0 34px;
}

.trailer-frame {
  justify-self: center;
  width: min(100%, 340px);
  line-height: 0;
  padding: 12px 5px;
  background: var(--ink);
  border: 2px solid var(--plum-light);
  box-shadow: 4px 4px 0 var(--ink);
}

.trailer-frame::before {
  content: "";
  display: block;
  width: 24%;
  height: 2px;
  margin: -7px auto 5px;
  background: var(--plum-light);
}

.trailer-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  background: var(--ink);
}

/* The keyboard lands on the player's own buttons, inside the video, where
   the page's :focus-visible can't reach: ring the whole video while any of
   them has focus, like every other focused thing on the site. */
.trailer-video:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.trailer-cap {
  margin: 0;
  max-width: 62ch;
}

.trailer-cap > p {
  margin: 0 0 6px;
}

.trailer-contents {
  margin-top: 12px;
}

.trailer-contents[open] summary {
  margin-bottom: 14px;
}

.trailer-contents ol {
  margin: 0;
  padding-left: 1.4em;
}

.trailer-contents li + li {
  margin-top: 8px;
}

@media (min-width: 720px) {
  .trailer {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
  }

  .trailer-frame {
    justify-self: start;
  }
}

/* the game page: a grid of all the screenshots */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =====================================================================
   Home: from the workbench (the latest update and the Sneak Peek)
   ===================================================================== */
.bench-grid {
  display: grid;
  gap: 28px;
  margin-top: 8px;
}

.card-kicker {
  margin: 0 0 8px;
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  color: var(--plum);
  -webkit-font-smoothing: none;
}

.blueprint .card-kicker {
  color: var(--white-warm);
}

.ticket-more {
  margin: 0;
}

.bench .ticket .ticket-more {
  padding: 0 20px 18px;
}

.ticket-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.soft-n {
  color: var(--plum);
}

.bench .peek-card ul {
  margin: 0 0 12px;
}

.bench .blueprint a {
  color: var(--white-warm);
}

.bench .blueprint .plans {
  color: var(--white-warm);
  margin: 12px 0 0;
}

.kicker-row {
  margin: 0;
}

/* =====================================================================
   The game page
   ===================================================================== */
.game-head {
  padding: 24px 0 8px;
}

/* 776 = the picture at exactly 3x (768) plus the 4 px border on each side,
   so on screens 824 px and wider every source pixel is 3x3 screen pixels.
   The bottom margin leaves room for the 16 px frame and shadow below it. */
.hero-frame {
  margin: 8px 0 44px;
  max-width: 776px;
  border: 4px solid var(--ink);
  outline: 4px solid var(--walnut);
  outline-offset: 0;
  box-shadow: 0 0 0 8px var(--walnut-dark), 8px 8px 0 8px var(--ink);
  background: var(--ink);
  line-height: 0;
}

.hero-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 256 / 125;
}

.title-block {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* Below 360 px, "Warm Static:" (12 characters at 30 px) doesn't fit
   beside the icon, so the icon sits above the title instead. */
@media (max-width: 359px) {
  .title-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

.title-text > :last-child {
  margin-bottom: 0;
}

.head-actions .actions {
  margin-top: 20px;
}

.title-block .game-icon {
  display: block;
  width: 64px;
  height: 64px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.game-title {
  margin: 0 0 10px;
  color: var(--amber);
  text-shadow: 0 3px 0 var(--walnut-dark);
}

.game-title .l1 {
  display: block;
  font-size: 30px;
}

.game-title .l2 {
  display: block;
  font-size: 20px;
  color: var(--phosphor);
  text-shadow: 0 2px 0 var(--phosphor-dark);
  margin-top: 4px;
}

.title-block .game-tagline {
  font-size: 1.1875rem;
  margin: 0 0 4px;
}

.platforms {
  color: var(--text-soft);
  margin: 0;
}

.head-actions .btn--quiet {
  background: var(--plum);
  color: var(--cream);
  border-color: var(--cream);
  box-shadow: inset -4px -4px 0 var(--plum-dark), 4px 4px 0 var(--ink);
}

.head-actions .soon {
  background: var(--plum);
  color: var(--cream);
  border-color: var(--sky-haze);
}

.head-actions .soon .lamp {
  color: var(--neon-pink);
}

/* On-this-page links: a bar that sticks to the top while you scroll. On
   phones and portrait tablets it is one row that scrolls sideways, and a
   soft fade on the right hints that there is more. If the browser reports
   a notch or status bar at the top (env(safe-area-inset-top), 0 in normal
   browser tabs), the bar's ink extends under it and the links sit below. */
.toc {
  position: sticky;
  top: 0;
  padding-top: env(safe-area-inset-top);
  z-index: 20;
  margin-top: 24px;
  background: var(--ink);
  border-top: 2px solid var(--walnut-dark);
  border-bottom: 4px solid var(--walnut-dark);
}

.toc .wrap {
  padding-left: 0;
  padding-right: 0;
}

.toc ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 8px var(--side-r) 8px var(--side-l);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding: 0 var(--side-l);
  scrollbar-width: none;
}

.toc ul::-webkit-scrollbar {
  display: none;
}

.toc li {
  flex: none;
  scroll-snap-align: start;
}

.toc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(to right, rgba(26, 24, 48, 0), var(--ink));
  pointer-events: none;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  background: var(--plum);
  color: var(--cream);
  border: 2px solid var(--plum-light);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  -webkit-font-smoothing: none;
  -webkit-tap-highlight-color: transparent;
}

.toc a:hover {
  border-color: var(--amber);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.toc a:active {
  background: var(--plum-light);
}

/* the section you jumped to: its link gets an amber edge and underline */
main:has(#about:target) .toc a[href="#about"],
main:has(#gadgets:target) .toc a[href="#gadgets"],
main:has(#features:target) .toc a[href="#features"],
main:has(#trailer:target) .toc a[href="#trailer"],
main:has(#screenshots:target) .toc a[href="#screenshots"],
main:has(#faq:target) .toc a[href="#faq"],
main:has(#updates:target) .toc a[href="#updates"],
main:has(#coming-next:target) .toc a[href="#coming-next"],
main:has(#links:target) .toc a[href="#links"] {
  border-color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 3px;
}

/* sections stop below the sticky bar when you jump to them (the bar is
   66 px tall on every screen; tools/preview_site.py probe checks that each
   heading lands at least 16 px below it) */
.game .section {
  scroll-margin-top: calc(72px + env(safe-area-inset-top));
}

/* ---------- promises ---------- */
.promises {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.promises li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  background: var(--plum);
  color: var(--cream);
  border: 2px solid var(--plum-light);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.promises img {
  flex: none;
  width: 30px;
  height: 30px;
}

.promises + .facts {
  margin-top: 16px;
}

/* ---------- features ---------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.features li {
  position: relative;
  padding-left: 26px;
}

.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 10px;
  height: 10px;
  background: var(--amber);
  border: 2px solid var(--walnut-dark);
}

.features strong {
  display: block;
  color: var(--plum);
}

/* ---------- the gadgets you restore (a game's "gadgets" in site.json) ----
   Each gadget sits on its own little bench: the game's own lit 32x24 sprite
   on a dark tile with a wooden shelf, at exactly 3x on phones and 4x from
   600 px, so every pixel stays square. An amber tag numbers the benches in
   the order you unlock them (decoration: the list is an <ol>). Phones: the
   bench beside the words (below 360 px the name beside the bench and the
   line under both); from 1024 px, two columns. The words start level with
   the top of the bench, so names in the same row always line up. */
.gadgets {
  list-style: none;
  margin: 4px 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  counter-reset: gadget;
}

.paper.gadget {
  counter-increment: gadget;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 16px;
  padding: 18px 16px;
}

.gadget-bench {
  position: relative;
  align-self: start;
  padding: 14px 8px 8px;
  background: var(--ink);
  border: 2px solid var(--ink);
  /* the shelf the gadget stands on: walnut with a lighter top edge */
  box-shadow: inset 0 -6px 0 var(--walnut), inset 0 -8px 0 var(--walnut-light);
  line-height: 0;
}

.gadget-bench img {
  display: block;
  width: 96px;
  height: 72px;
}

.gadget-bench::before {
  content: counter(gadget);
  content: counter(gadget) / "";
  position: absolute;
  top: -10px;
  left: -10px;
  min-width: 28px;
  padding: 0 4px;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
  -webkit-font-smoothing: none;
}

.gadget h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.3;
}

.gadget p {
  margin: 0;
}

.gadgets-more {
  max-width: 62ch;
  margin: 0;
}

/* the narrowest phones: the name beside the bench, the line under both */
@media (max-width: 359px) {
  .paper.gadget {
    row-gap: 12px;
  }

  .gadget-text {
    display: contents;
  }

  .gadget h3 {
    align-self: center;
    margin: 0;
  }

  .gadget p {
    grid-column: 1 / -1;
  }
}

@media (min-width: 600px) {
  .paper.gadget {
    column-gap: 22px;
    padding: 20px 22px;
  }

  .gadget-bench {
    padding: 16px 10px 8px;
  }

  .gadget-bench img {
    width: 128px;
    height: 96px;
  }
}

@media (min-width: 1024px) {
  .gadgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 24px;
  }
}

/* ---------- common questions (a game's "faq" in site.json) ----------
   Always open: each question is a heading, each answer a short paragraph.
   From 760 px they flow down two newspaper-style columns (read down the
   left, then the right), so an odd number of questions or a long answer
   never leaves an empty cell or a tall gap beside a short one. */
.paper.faq {
  display: block;
}

.faq-item {
  break-inside: avoid;
}

.faq-item + .faq-item {
  margin-top: 22px;
}

.faq h3 {
  margin: 0 0 6px;
  color: var(--plum);
  font-family: var(--body-font);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-font-smoothing: auto;
}

.faq p {
  margin: 0;
}

@media (min-width: 760px) {
  /* (the 22 px gap above a question that starts the right-hand column is
     dropped by the browser there, so both columns start level) */
  .paper.faq {
    columns: 2;
    column-gap: 40px;
  }
}

/* ---------- updates (repair tickets) ---------- */
.updates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.paper.ticket {
  padding: 0;
}

.ticket-head {
  padding: 18px 20px 12px;
  border-bottom: 2px dashed var(--paper-shadow);
}

.ticket-head h3 {
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 6px;
}

.ver {
  display: inline-block;
  margin-right: 8px;
  padding: 0 8px;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  -webkit-font-smoothing: none;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0;
  color: var(--plum);
  font-size: 0.9375rem;
}

.ticket ul {
  margin: 0;
  padding: 14px 20px 18px 40px;
  list-style: square;
}

.ticket li + li {
  margin-top: 6px;
}

.latest {
  display: inline-block;
  padding: 2px 8px;
  background: var(--plum);
  color: var(--cream);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  -webkit-font-smoothing: none;
}

.older {
  margin-top: 24px;
}

.older summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px;
  cursor: pointer;
  background: var(--plum);
  border: 2px solid var(--plum-light);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  list-style: none;
  -webkit-font-smoothing: none;
}

.older summary::-webkit-details-marker {
  display: none;
}

/* The arrow is decoration: the "/ ''" part gives it empty alt text, so
   screen readers say only "Older updates". The first line is a fallback for
   browsers that don't know that syntax. */
.older summary::before {
  content: "\2192";
  content: "\2192" / "";
  color: var(--amber);
}

.older[open] summary::before {
  content: "\2193";
  content: "\2193" / "";
}

.older summary:hover {
  border-color: var(--amber);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.older[open] summary {
  margin-bottom: 24px;
}

/* ---------- coming next ---------- */
.peek-intro {
  max-width: 62ch;
}

.peek {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.peek-card {
  padding: 22px 20px 20px;
}

.peek-card h3 {
  font-size: 20px;
  margin: 12px 0 10px;
}

.peek-card ul {
  margin: 0;
  padding-left: 20px;
  list-style: square;
}

.peek-card p {
  margin: 0;
}

.label {
  display: inline-block;
  padding: 3px 10px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  -webkit-font-smoothing: none;
}

/* The first card is a blueprint, like the game's own Sneak Peek. */
.blueprint {
  background-color: var(--rain-blue);
  background-image:
    linear-gradient(rgba(169, 182, 232, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 182, 232, 0.22) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--white-warm);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  /* the keyboard focus ring: warm white on blue (5.9:1), not the paper's plum */
  --focus: var(--white-warm);
}

.blueprint::before {
  border-color: rgba(255, 248, 236, 0.45);
}

.blueprint h3 {
  color: var(--white-warm);
}

.blueprint .label {
  background: var(--amber);
}

.plans {
  text-wrap: balance;
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  color: var(--amber);
  margin: 8px 0 6px;
  -webkit-font-smoothing: none;
}

/* ---------- links ---------- */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li + li {
  margin-top: 4px;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}

/* "Questions or feedback? Email ...": a plain mail link, tall enough for a
   thumb, that may break anywhere on the narrowest phones */
.contact {
  margin: 0 0 10px;
}

.mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

/* =====================================================================
   Plain pages (privacy, 404)
   ===================================================================== */
.page-head {
  padding: 36px 0 20px;
}

.page-title {
  font-size: 30px;
  color: var(--amber);
  text-shadow: 0 3px 0 var(--walnut-dark);
  margin: 0;
}

.ticks {
  list-style: none;
  padding: 0;
}

.ticks li {
  position: relative;
  padding-left: 30px;
}

.ticks li + li {
  margin-top: 4px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 20px;
  height: 20px;
  background-image: url("/assets/check.6d2398ae07.png");
  background-size: 20px 20px;
  image-rendering: pixelated;
}

.updated {
  margin-top: 1.5em;
  color: var(--plum);
  font-size: 0.9375rem;
}

/* The 404 page sits in the middle of the screen, however tall it is. */
main.middle {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Top and bottom only, so .wrap keeps its side gutters on phones. */
.lost {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 64px;
}

/* "Nothing on this channel": the little TV, showing static, on a shelf */
.lost-tv {
  --px: 6px;
  position: relative;
  width: calc(22 * var(--px));
  height: calc(22 * var(--px));
  margin: 0 auto calc(6 * var(--px) + 12px);
}

.lost-tv::after {
  content: "";
  position: absolute;
  left: calc(-12 * var(--px));
  right: calc(-12 * var(--px));
  bottom: calc(-3 * var(--px));
  height: calc(3 * var(--px));
  background: var(--walnut);
  border-top: var(--px) solid var(--walnut-light);
  box-shadow: 0 var(--px) 0 var(--walnut-dark);
}

.s-static {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.lost-tv::after {
  z-index: 2;
}

.s-static > span {
  width: 500%;
  background-image: url("/assets/static-sheet.3b4df63e67.png");
  /* slow and soft: about two and a half changes a second, never a flicker */
  animation: s-static 1.6s steps(4) infinite;
}

@keyframes s-static {
  to { transform: translateX(-80%); }
}

.lost .page-title {
  margin-bottom: 16px;
}

.lost p {
  text-wrap: balance;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.lost .actions {
  justify-content: center;
}

.lost .btn--quiet {
  background: var(--plum);
  color: var(--cream);
  border-color: var(--cream);
  box-shadow: inset -4px -4px 0 var(--plum-dark), 4px 4px 0 var(--ink);
}

/* =====================================================================
   The screenshot viewer
   Without JavaScript it is pure CSS: each big picture is a #view-...
   target, the viewer shows while one is targeted, and swiping is native
   scroll snapping. viewer.js (optional) adds the "js-viewer" class and
   opens it with "is-open" instead; see theme/viewer.js.
   ===================================================================== */
.viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, rgba(61, 47, 87, 0.3) 0 1px, transparent 1px 4px);
  color: var(--cream);
}

html:not(.js-viewer) .viewer:has(.slide:target),
.viewer.is-open {
  display: block;
}

html:not(.js-viewer):has(.slide:target),
html.viewer-open {
  overflow: hidden;
}

.viewer-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.viewer-track::-webkit-scrollbar {
  display: none;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding:
    max(8px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}

.v-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
}

.v-back,
.v-close,
.v-prev,
.v-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.2;
  text-decoration: none;
  -webkit-font-smoothing: none;
  -webkit-tap-highlight-color: transparent;
}

.v-back {
  padding: 4px 12px 4px 4px;
  color: var(--cream);
  white-space: nowrap;
}

.v-back:hover {
  color: var(--amber-light);
  text-decoration: underline;
}

.v-back:active {
  color: var(--amber);
}

.v-short {
  display: none;
}

/* the tiniest phones: "Back to screenshots" becomes "Screenshots" on
   screen (the full words stay for screen readers) */
@media (max-width: 339px) {
  .v-long {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .v-short {
    display: inline;
  }
}

.v-close {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: inset -3px -3px 0 var(--amber-dark), 3px 3px 0 #000;
  font-size: 30px;
}

.v-close:hover {
  background: var(--amber-light);
}

.v-close:active {
  transform: translate(2px, 2px);
  box-shadow: inset -3px -3px 0 var(--amber-dark), 1px 1px 0 #000;
}

.v-fig {
  margin: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.v-fig img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  aspect-ratio: 9 / 16;
  border: 2px solid var(--ink);
  outline: 2px solid var(--plum-light);
  background: var(--plum);
}

.v-fig figcaption {
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.3;
  text-align: center;
  color: var(--cream);
  text-wrap: balance;
  -webkit-font-smoothing: none;
}

.v-count {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  background: var(--amber);
  color: var(--ink);
  white-space: nowrap;
}

.v-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.v-prev,
.v-next {
  flex: 1 1 0;
  max-width: 200px;
  padding: 6px 14px;
  background: var(--plum);
  color: var(--cream);
  border: 2px solid var(--plum-light);
  box-shadow: 3px 3px 0 #000;
  white-space: nowrap;
}

.v-prev:hover,
.v-next:hover {
  border-color: var(--amber);
  text-decoration: underline;
}

a.v-prev:active,
a.v-next:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
  background: var(--plum-light);
}

.v-prev.is-off,
.v-next.is-off {
  visibility: hidden;
}

.v-ico {
  font-size: 24px;
  line-height: 1;
}

/* wide or short screens: Previous and Next sit beside the picture */
@media (min-width: 760px), (orientation: landscape) and (max-height: 540px) {
  .slide {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 16px;
  }

  .v-top {
    grid-column: 1 / -1;
  }

  .v-nav {
    display: contents;
  }

  .v-prev,
  .v-next {
    grid-row: 2;
    align-self: center;
    flex: none;
    width: auto;
  }

  .v-prev {
    grid-column: 1;
  }

  .v-fig {
    grid-column: 2;
    grid-row: 2;
  }

  .v-next {
    grid-column: 3;
  }
}

@media (min-width: 1100px) {
  .slide {
    padding-left: max(12px, calc((100% - 1040px) / 2));
    padding-right: max(12px, calc((100% - 1040px) / 2));
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .v-top {
    min-height: 52px;
  }

  .v-fig {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: auto minmax(0, 14em);
    justify-content: center;
    gap: 16px;
  }

  .v-fig figcaption {
    text-align: left;
  }
}

/* Browsers without :has() and without the script: the big pictures simply
   sit on the page as a swipeable row. */
@supports not selector(:has(a)) {
  html:not(.js-viewer) .viewer {
    display: block;
    position: static;
    height: 80vh;
  }
}

/* =====================================================================
   A game's own privacy policy (/sky-slabs/privacy/) and the testers page
   ===================================================================== */
.page-head .kicker {
  margin: 0 0 4px;
}

.page-head .kicker a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
}

.policy-date {
  margin: 8px 0 0;
}

.policy-list {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.policy-list li + li {
  margin-top: 6px;
}

.policy-list li::marker {
  color: var(--walnut);
}

/* a link inside a sentence of the policy: tall enough for a thumb */
.policy p a,
.policy li a,
.testers-page .prose li a,
.policy-more a {
  padding: 12px 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.policy-more {
  margin: 24px 0 0;
}

/* an email address inside a running sentence stays a plain inline link
   (its padding above makes it tall enough), so it doesn't open odd gaps
   between lines; the tall box is only for a contact line on its own */
.policy p .mail,
.policy li .mail,
.testers-page .prose li .mail {
  display: inline;
  min-height: 0;
}

.testers-intro {
  margin: 0 0 24px;
}

.steps {
  margin: 0 0 8px;
  padding-left: 1.5em;
}

.steps li {
  padding-left: 4px;
}

.steps li + li {
  margin-top: 10px;
}

.steps li::marker {
  font-family: var(--pixel-font);
  color: var(--walnut);
}

.tester-go {
  margin: 18px 0 4px;
}

.testers-games {
  padding: 40px 0 36px;
}

.tester-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

@media (min-width: 720px) {
  .tester-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tester-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.tester-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--ink);
}

.tester-card h3 {
  margin: 0;
  font-size: 20px;
}

.paper .tester-card h3 a,
.tester-card h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--plum);
  text-decoration-color: var(--amber-dark);
}

.tester-card .game-tagline {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.tester-card .soon {
  margin-top: 6px;
}

.tester-card .soft {
  margin: 14px 0 0;
}

/* =====================================================================
   Sky Slabs' accent (class accent-sky on its pages, its home card and its
   testers card). Only a few colours change, taken from the game's own
   sunset art: peach, coral and a clear sky blue; the layout, the pixel
   font and the panels stay the studio's. Text pairs stay at least 4.5:1:
   peach #FFC7A6 on the plum page is 11:1, sky blue #9FD3FF 10:1.
   ===================================================================== */
.accent-sky {
  --sky-peach: #FFC7A6;
  --sky-coral: #F08A6E;
  --sky-coral-dark: #8E4234;
  --sky-blue: #9FD3FF;
}

body.accent-sky {
  --link: var(--sky-blue);
  --focus: var(--sky-blue);
}

body.accent-sky .paper {
  --focus: var(--plum);
}

.accent-sky .game-head {
  background: linear-gradient(to bottom, #45386B, rgba(43, 33, 64, 0));
}

.accent-sky .game-title,
.accent-sky .section-title,
.accent-sky .page-title {
  color: var(--sky-peach);
  text-shadow: 0 3px 0 var(--sky-coral-dark);
}

.accent-sky .kicker {
  color: var(--sky-blue);
}

.accent-sky .hero-frame {
  outline-color: var(--sky-coral);
  box-shadow: 0 0 0 8px var(--sky-coral-dark), 8px 8px 0 8px var(--ink);
}

.accent-sky .head-actions .soon .lamp {
  color: var(--sky-peach);
}

.accent-sky .features li::before {
  background: var(--sky-coral);
  border-color: var(--sky-coral-dark);
}

.accent-sky .plans {
  color: var(--sky-peach);
}

.accent-sky .paper .plans,
.paper.accent-sky .plans {
  color: var(--sky-coral-dark);
}

.paper.accent-sky .spot-name a,
.paper.accent-sky.tester-card h3 a {
  text-decoration-color: var(--sky-coral);
}

.spot-card.accent-sky .spot-art {
  background: #F0A88E;
}

/* Sky Slabs' feature art has its tagline painted along the bottom, so its
   icon sits just below the art instead of over its edge */
.spot-card.accent-sky .spot-icon {
  margin-top: 18px;
}

/* ---------- footer ---------- */
.site-foot {
  margin-top: 48px;
  background: var(--ink);
  border-top: 4px solid var(--walnut);
  box-shadow: 0 -4px 0 var(--walnut-dark);
  color: var(--cream);
  padding: 20px 0 max(28px, calc(env(safe-area-inset-bottom) + 16px));
  font-size: 1rem;
}

/* The copyright on the left, the links on the right. The links stay
   together on one line, so a separator dot is never left hanging when the
   footer wraps on a small phone. */
.site-foot p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
}

.foot-links {
  display: inline-flex;
  align-items: center;
  gap: 0 10px;
  white-space: nowrap;
}

.site-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  text-decoration-color: var(--amber);
}

.site-foot a:hover {
  color: var(--amber-light);
}

.site-foot .sep {
  color: var(--sky-haze);
}

/* ---------- larger screens ---------- */
@media (min-width: 400px) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .facts li + li {
    border-left: 2px dashed var(--plum-light);
  }

  .facts li:nth-child(n+3) {
    border-top: 0;
  }
}

@media (min-width: 600px) {
  :root {
    --gutter: 24px;
  }

  body {
    font-size: 1.125rem;
  }

  .section-title,
  .page-title,
  .strip-title {
    font-size: 40px;
    text-shadow: 0 4px 0 var(--walnut-dark);
  }

  .paper {
    padding: 32px 32px;
  }

  .spot-body {
    padding: 0 32px 28px;
  }

  .spot-icon {
    width: 128px;
    height: 128px;
    margin-top: -64px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .spot-body .stamp {
    width: 60px;
    height: 72px;
    top: -30px;
  }

  .spot-name .l1 {
    font-size: 40px;
  }

  .spot-name .l2 {
    font-size: 30px;
  }

  .strip li {
    flex-basis: 26%;
  }

  .title-block {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 24px;
  }

  .head-actions {
    padding-left: 152px;
  }

  .title-block .game-icon {
    width: 128px;
    height: 128px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .game-title .l1 {
    font-size: 50px;
  }

  .game-title .l2 {
    font-size: 30px;
    text-shadow: 0 3px 0 var(--phosphor-dark);
  }

  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-head {
    padding: 22px 32px 14px;
  }

  .ticket ul {
    padding: 16px 32px 22px 52px;
  }

  .bench .ticket .ticket-more {
    padding: 0 32px 22px;
  }

  .lost-tv {
    --px: 8px;
  }
}

@media (min-width: 760px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* From 880 px a short bar's links (up to 832 px of them, like Sky Slabs'
   five) fit on one line, so the bar stops scrolling sideways. (Below that it
   must stay one scrolling row: wrapped onto two rows it would be 118 px tall
   and cover the headings you jump to. A longer bar is toc--long, below.) */
@media (min-width: 880px) {
  .toc .wrap {
    padding-left: var(--side-l);
    padding-right: var(--side-r);
  }

  .toc ul {
    flex-wrap: wrap;
    overflow: visible;
    padding-left: 0;
    padding-right: 0;
  }

  .toc::after {
    display: none;
  }
}

/* A longer bar (class toc--long, set by the build when its links need more
   than 832 px, like Warm Static's nine) stays one row that scrolls sideways
   up to 1199 px, as on phones. From 1200 px all its links fit in one row
   (the build makes sure of that), centred under the header, so it never
   wraps onto a second row that would cover the headings. */
@media (min-width: 880px) and (max-width: 1199px) {
  /* the scrolling row spans the whole bar, as on phones, so the fade on the
     right sits over the link that's cut off and shows there's more */
  .toc--long .wrap {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .toc--long ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-left: var(--side-l);
    padding-right: var(--side-r);
  }

  .toc--long::after {
    display: block;
  }
}

@media (min-width: 1200px) {
  .toc--long .wrap {
    max-width: none;
  }

  .toc--long ul {
    flex-wrap: nowrap;
    justify-content: center;
  }
}

/* Wide screens: the hero sits on the left, with its outer wooden frame
   (8 px) lined up with the icon and title below it. 832 = 776 + 8 + 2 x 24. */
@media (min-width: 832px) {
  .hero-frame {
    margin-left: 8px;
  }
}

@media (min-width: 900px) {
  /* the strip becomes one filmstrip of all eight */
  .strip {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    margin: 18px 0 0;
    padding: 4px 4px 8px 0;
    overflow: visible;
  }

  .strip li {
    max-width: none;
  }

  /* the card: words on the left, the actions in a column on the right */
  .spot-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
    column-gap: 40px;
  }

  .spot-body > * {
    grid-column: 1;
  }

  .spot-body > .spot-actions {
    grid-column: 2;
    grid-row: 2 / span 6;
    align-self: start;
    padding-top: 24px;
  }

  .spot-actions .actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
  }

  .bench-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
  }
}

/* Tablets (760-1023 px) keep the 2-column promises and stacked Coming next
   cards; three or four columns would squeeze their words onto many lines.
   1024 is the narrowest width where the "In a future update" label fits on
   one line in a third-width card. */
@media (min-width: 1024px) {
  .peek {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promises {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .promises li {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* The 404 on a phone held sideways: the TV and its shelf sit beside the
   words (at 4 px per art pixel), so the heading and both buttons fit on the
   first screen. */
@media (orientation: landscape) and (max-height: 540px) {
  .lost {
    max-width: 880px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 32px;
    text-align: left;
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .lost > * {
    grid-column: 2;
  }

  .lost .lost-tv {
    --px: 4px;
    grid-column: 1;
    grid-row: 1 / span 3;
    margin: 0 calc(12 * var(--px)) calc(3 * var(--px));
  }

  .lost p {
    margin-left: 0;
  }

  .lost .actions {
    justify-content: flex-start;
  }
}

/* Short screens (phones on their side): the section bar doesn't stick, so
   it never takes a big bite out of the little height there is. */
@media (max-height: 500px) {
  .toc {
    position: relative;
  }

  .game .section {
    scroll-margin-top: 0;
  }
}

/* Smooth scrolling to sections, unless motion is turned down. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Calm by request: no movement at all, and each sprite rests on a nice
   still frame (the cat's tail at rest, the steam as one soft wisp). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .s-steam > span {
    transform: translateX(calc(-100% * 24 / 25));
  }

  .s-static > span {
    transform: translateX(-80%);
  }

  /* the still picture: only the far, fine rain on the glass; the radio
     keeps one note and the cat its "z Z" (their first frames) */
  .window .w-rain--near {
    display: none;
  }
}

/* Windows high-contrast mode: keep edges and focus visible. */
@media (forced-colors: active) {
  .btn,
  .soon,
  .toc a,
  .label,
  .ver,
  .chips li,
  .v-close,
  .v-prev,
  .v-next {
    border: 2px solid CanvasText;
  }

  .paper::before {
    display: none;
  }
}

@media print {
  .site-head,
  .site-foot,
  .toc,
  .skip,
  .window,
  .things,
  .sill,
  .panelling,
  .viewer {
    display: none;
  }

  .room {
    background: none;
  }

  body,
  .paper {
    background: #FFF8EC;
    color: #1A1830;
    box-shadow: none;
  }
}
