/*
 * Retro Game Room — web skin.
 *
 * A port of the app's design system (`src/theme/`) to plain CSS. Every value
 * below is lifted from there rather than eyeballed, so the site and the app
 * stay the same object: change a token in the app and the matching custom
 * property here is the one line to follow it.
 *
 * Source map:
 *   --c-*        src/theme/colors.ts
 *   --sp-*       src/theme/spacing.ts
 *   --f-*        src/theme/typography.ts
 *   sign/flicker src/theme/effects.ts
 *
 * Two deliberate differences from the app, both noted where they occur:
 *
 * 1. The app sets its type in Android's `monospace` and its sign in
 *    `sans-serif`/`cursive`, because those are the system faces Android ships.
 *    `typography.ts` records that the sign *wants* Baloo 2 ExtraBold and
 *    Dancing Script, and that the mono role is Roboto Mono in practice. The
 *    web can load all three, so it does — this is the app's intended
 *    lettering, not a different one.
 *
 * 2. Prose runs at the menu lightbox's scale (body 16, headings 20) rather
 *    than the app's 12/13, which are sized for glanceable UI. Pages meant to
 *    be read use the reading size.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  /* Palette — colors.ts `palette`. */
  --c-bg: #0d0604;
  --c-bg-deep: #060302;
  --c-panel: rgba(20, 9, 5, 0.96);
  --c-text: #ffeee2;
  --c-muted: #a8917f;
  --c-accent: #ffb020;
  --c-accent-soft: #ffd98a;
  --c-accent-bright: #fff0cc;
  --c-orange: #ff8c1a;
  --c-orange-hot: #ffbe86;
  --c-red: #ff2d20;
  --c-red-soft: #ff9a8e;
  --c-red-deep: #8c1c0d;
  --c-yellow: #ffe14d;
  --c-bulb: #fff3d6;
  --c-good: #5cff9d;

  /* Semantic roles — colors.ts `surface` / `border` / `content`. */
  --c-surface: var(--c-bg);
  --c-surface-tile: rgba(0, 0, 0, 0.52);
  --c-surface-control: rgba(0, 0, 0, 0.42);
  --c-veil: rgba(10, 4, 2, 0.86);
  --c-border: rgba(255, 140, 26, 0.28);
  --c-border-strong: rgba(255, 140, 26, 0.45);
  --c-label: rgba(255, 140, 26, 0.8);

  /* Spacing — spacing.ts, a 4px step. */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-xxl: 32px;
  --sp-xxxl: 48px;

  /* Radii — spacing.ts `radius`. Hard-edged on purpose: rounded reads modern. */
  --r-sharp: 2px;
  --r-default: 3px;

  /* §36: minimum interactive size. */
  --touch: 48px;

  /* Fonts — see the note at the top of this file. */
  --f-mono: "Roboto Mono", ui-monospace, "DejaVu Sans Mono", "Courier New", monospace;
  --f-display: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --f-script: "Dancing Script", cursive;

  /* Type scale. Roles from typography.ts; prose at the lightbox's 1.3x. */
  --f-title: 15px;
  --f-heading: 20px;
  --f-body: 16px;
  --f-small: 12px;
  --f-button: 12px;
  --f-tile: 11px;
  --f-label: 10px;

  /* The reading measure for a page of prose. */
  --measure: 68ch;

  /*
   * How large a game's artwork is drawn, at any screen size.
   *
   * The same number on a phone and a laptop by design — a cabinet's sign is
   * the thing the lineup is for, and it should not shrink just because the
   * rack got narrower. What gives way on a narrow screen is the room around
   * it, not the drawing.
   *
   * 76 is the 89 before it, less 15%. Because both layouts cap the artwork
   * against this one value, changing it here is the whole of the change — the
   * phone and the laptop move together and cannot drift apart.
   */
  --motif-size: 76px;
}

/* §36 / §23: one switch that stills everything that moves. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ base */

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

html {
  /* The warm base shows for the instant before the canvas paints, so the page
     never flashes an unstyled white ground — the same reason `styles.screen`
     carries a background colour in the app. */
  background: var(--c-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-mono);
  font-size: var(--f-body);
  line-height: 1.55;
  letter-spacing: 0.06em;
  color: var(--c-text);
  background: transparent;
  /* Room for the fixed marquees top and bottom. */
  padding: calc(var(--sp-lg) + 16px) 0;
  overflow-x: hidden;
}

/* The cabinet ground and the lit squares over it. Two canvases, exactly as
   `ArcadeBackground` splits them: one painted once, one repainted per frame. */
#ground,
#glows {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

#glows {
  z-index: -1;
}

/*
 * Scanlines — effects.ts `scanlines`, the legacy `body::after`.
 * 1px of dark every 3px, the whole layer at half opacity.
 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9; /* layers.crt */
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0 1px,
    transparent 1px 3px
  );
}

/* --------------------------------------------------------------- marquee */

/*
 * The chase bulbs along a cabinet's marquee — `MarqueeLights`.
 *
 * The row is built by arcade.js, which also writes the keyframes: how wide the
 * lit band is depends on how many bulbs fit, and that is only known once the
 * viewport is measured.
 */
.marquee {
  position: fixed;
  left: 0;
  right: 0;
  height: 16px; /* BULB_HALO */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  z-index: 8;
  pointer-events: none;
}

.marquee--top {
  top: var(--sp-xs);
}

.marquee--bottom {
  bottom: var(--sp-xs);
}

.bulb {
  position: relative;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  opacity: 0.62;
  will-change: opacity, transform;
}

/* The bloom behind the filament — a larger, dimmer disc, layered rather than
   cast, because the app's Android shadow cannot be tinted. */
.bulb::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 140, 26, 0.35);
}

.bulb::after {
  content: "";
  width: 6px; /* BULB_CORE */
  height: 6px;
  border-radius: 50%;
  background: var(--c-bulb);
}

/* ---------------------------------------------------------------- layout */

.shell {
  width: min(100% - 2 * var(--sp-lg), 1080px);
  margin: 0 auto;
}

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding: var(--sp-lg) 0 var(--sp-md);
  flex-wrap: wrap;
}

/* The cabinet standing to the left of its own name, as on the hub. */
.lockup {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  text-decoration: none;
}

/* ------------------------------------------------------------------- nav */

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 var(--sp-md);
  font-size: var(--f-button);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-text);
  background: var(--c-surface-control);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sharp);
  transition: background 120ms linear, border-color 120ms linear, color 120ms linear;
}

/*
 * colors.ts notes that the legacy web skin's `:hover` was ported to Android as
 * a *pressed* state. Coming back to the web, the pressed state is ported back
 * to hover — so the two platforms agree on what a lit control looks like.
 */
.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 140, 26, 0.18);
  border-color: rgba(255, 140, 26, 0.6);
  color: var(--c-accent-bright);
  outline: none;
}

.nav a[aria-current="page"] {
  background: rgba(255, 45, 32, 0.22);
  border-color: rgba(255, 45, 32, 0.65);
  color: var(--c-red);
}

/* The hamburger, for viewports too narrow for a row of six labels. It is the
   same three-bar mark the app draws in the hub's top-left corner. */
.nav-toggle {
  display: none;
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--c-accent);
}

.nav-toggle span {
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-panel);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-default);
    padding: var(--sp-sm);
  }

  .nav[data-open="true"] {
    display: flex;
  }

  /* Centred, like the app's drawer rows. */
  .nav a {
    justify-content: center;
    border: 0;
    background: none;
  }
}

/* ------------------------------------------------------------- neon sign */

/*
 * "Game Room" against "RETRO" — `NeonSign` and the `neon` ramps in effects.ts.
 *
 * The app has to stack a copy of the glyph per glow stop, because React Native
 * allows one text shadow per element. CSS allows the whole four-stop ramp on
 * one element, which is what the ramp was ported *from* — so this is the
 * original expression of it, not an approximation.
 *
 * Two stacked copies remain, for a different reason: the tubes flicker, and
 * the bloom has to die faster than the lettering during a dip
 * (`FLICKER_GLOW_FALLOFF`). The glow copy carries the halo with a transparent
 * fill; the core copy carries the filament.
 */
.sign {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  --sign-size: 48px; /* SIGN_TITLE */
}

.sign--small {
  --sign-size: 34px;
}

.sign__line {
  position: relative;
  display: block;
  white-space: nowrap;
}

.sign__line > span {
  display: block;
  grid-area: 1 / 1;
}

/* Both copies occupy the same cell, so they sit exactly on top of each other. */
.sign__line {
  display: grid;
}

.sign__glow {
  color: transparent; /* the shadows are drawn from the glyph's alpha mask */
}

/* "RETRO" — the blue tube. */
.sign__main {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--sign-size);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.sign__main .sign__glow {
  text-shadow:
    0 0 8px #7fe8ff,
    0 0 14px #33c3ff,
    0 0 24px #0084ff;
  animation: flicker-main-glow 4000ms linear infinite;
}

.sign__main .sign__core {
  color: #eafcff;
  text-shadow: 0 0 3px #eafcff;
  -webkit-text-stroke: 1px #0084ff;
  paint-order: stroke fill;
  animation: flicker-main 4000ms linear infinite;
}

/*
 * "Game Room" — the pink tube, tucked up under RETRO's baseline and hung
 * askew. The lift, nudge and tilt are `NeonSign`'s, in ems of the script's own
 * size so the whole lockup scales from one number.
 */
.sign__script {
  font-family: var(--f-script);
  font-weight: 700;
  font-size: calc(var(--sign-size) * 0.576); /* SCRIPT_RATIO */
  line-height: 1.5;
  margin-top: -0.6em; /* SCRIPT_LIFT */
  margin-left: 0.4em; /* SCRIPT_NUDGE */
  transform: rotate(-7deg); /* SCRIPT_TILT */
}

.sign__script .sign__glow {
  text-shadow:
    0 0 7px #ff9ee9,
    0 0 13px #ff4fd8,
    0 0 22px #e800c2;
  animation: flicker-script-glow 5000ms linear infinite;
}

.sign__script .sign__core {
  color: #fff0fb;
  text-shadow: 0 0 3px #fff0fb;
  animation: flicker-script 5000ms linear infinite;
}

/*
 * The flicker — effects.ts `flicker`, keyframe for keyframe.
 *
 * Two hard stutters close together and one shallow sag much later; it is the
 * irregularity that sells it. The two tubes run on 4s and 5s, which share no
 * useful common multiple, so they drift against each other rather than falling
 * into a pattern.
 *
 * Each has a `-glow` twin at the squared values — at the 0.4 trough the halo
 * drops to 0.16 while the letters hold at 0.4, so the bloom dies first.
 */
@keyframes flicker-main {
  0%, 15% { opacity: 1; }
  16% { opacity: 0.4; }
  17% { opacity: 1; }
  18% { opacity: 0.4; }
  19%, 45% { opacity: 1; }
  46% { opacity: 0.75; }
  100% { opacity: 1; }
}

@keyframes flicker-main-glow {
  0%, 15% { opacity: 1; }
  16% { opacity: 0.16; }
  17% { opacity: 1; }
  18% { opacity: 0.16; }
  19%, 45% { opacity: 1; }
  46% { opacity: 0.5625; }
  100% { opacity: 1; }
}

@keyframes flicker-script {
  0%, 30% { opacity: 1; }
  31% { opacity: 0.5; }
  32% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes flicker-script-glow {
  0%, 30% { opacity: 1; }
  31% { opacity: 0.25; }
  32% { opacity: 1; }
  100% { opacity: 1; }
}

/* The stars scattered around the sign — `SparkleField`, four-point and small. */
.sparkle {
  position: absolute;
  width: calc(var(--sign-size) * 0.12);
  height: calc(var(--sign-size) * 0.12);
  pointer-events: none;
  background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 4px #7fd7ff);
  animation: twinkle 3200ms ease-in-out infinite;
}

.sparkle--alt {
  background: #ffd6f7;
  filter: drop-shadow(0 0 4px #ff4fd8);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1) rotate(45deg); }
}

/* -------------------------------------------------------------- sections */

.hero {
  text-align: center;
  padding: var(--sp-xxl) 0 var(--sp-xl);
}

.tagline {
  margin: 0;
  color: var(--c-orange);
  font-size: var(--f-title);
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

/* The dedication from the app's launch screen, set as it is there: sentence
   case, centred, four lines held by explicit breaks. */
.dedication {
  margin: var(--sp-xl) auto 0;
  max-width: 44ch;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.55;
}

.panel {
  background: var(--c-panel);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-default);
  padding: var(--sp-xl);
  /* effects.ts `glow.panel` — a wide, faint halo around a lit surface. */
  box-shadow: 0 0 40px rgba(255, 140, 26, 0.14);
}

.page {
  max-width: var(--measure);
  margin: 0 auto var(--sp-xxl);
}

/* 40px below the header, at the user's asking (2026-09-24) — on top of the
   header's own bottom padding, and not a spacing token: the scale has 32 and 48.
   Only where the box comes straight after the header; on the home page the
   hero sits between them and already has its own space. */
main > .page:first-child {
  margin-top: 40px;
}

.page h1,
.section-title {
  font-family: var(--f-mono);
  font-size: var(--f-heading);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  /* effects.ts `glow.heading`. */
  text-shadow: 0 0 14px rgba(255, 176, 32, 0.4);
  margin: 0 0 var(--sp-lg);
}

.page h2 {
  font-size: var(--f-title);
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--c-label);
  margin: var(--sp-xl) 0 var(--sp-sm);
}

.page p {
  margin: 0 0 var(--sp-lg);
}

.page a {
  color: var(--c-accent);
  text-decoration-color: rgba(255, 176, 32, 0.4);
  text-underline-offset: 3px;
}

.page a:hover,
.page a:focus-visible {
  color: var(--c-accent-bright);
}

.lede {
  color: var(--c-accent-soft);
}

.updated {
  font-size: var(--f-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 var(--sp-xl);
}

/* ------------------------------------------------------------ game grid */

.grid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-md);
  margin: var(--sp-xxl) 0 var(--sp-lg);
  flex-wrap: wrap;
}

.count {
  font-size: var(--f-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.games {
  display: grid;
  /*
   * The column minimum is set by the caption, not by the artwork any more.
   *
   * It was raised to 200 to clear a 176px plate; at 136 the plate no longer
   * needs it, and this is now simply how wide a tile has to be before a name
   * like "Rock Paper Scissors" and a sentence of description stop reading as a
   * column of two-word lines. Drop it to fit more cabinets per row.
   */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
 * One cabinet in the rack — `GameCard`.
 *
 * Each tile is edged and lettered in its own assigned bulb colour (`gameLights`),
 * so the grid reads as a row of lit machines rather than as artwork inside
 * house chrome. The screen inside is dark until the pointer is on the tile,
 * which is the app's rule exactly: a grid of signs all burning at once has no
 * focus in it, and lighting only what is touched gives the tile somewhere to
 * answer.
 */
.game {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  align-items: center;
  text-align: center;
  padding: var(--sp-md);
  background: var(--c-surface-tile);
  border: 1px solid var(--tile-light, var(--c-border));
  border-radius: var(--r-default);
  transition: box-shadow 140ms linear, transform 140ms linear;
}

.game:hover,
.game:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(255, 45, 32, 0.34), 0 0 6px rgba(255, 140, 26, 0.3);
}

/*
 * The square the artwork sits in — `GameCard`'s motif block.
 *
 * Padded rather than sized to the drawing: the bloom needs room reserved
 * whether the sign is currently lit or not, which is what stops the artwork
 * resizing at the moment a tile lights. In the app that reservation is about
 * 22% of the square, so it is that here too.
 */
.game__plate {
  width: 100%;
  /*
   * The square as a whole, tracking `--motif-size`: 136 is the 76px icon plus
   * the 22% reservation on each side, and it moves whenever that does.
   *
   * The padding stays a percentage rather than a fixed inset, so the room kept
   * for the bloom scales with the drawing instead of leaving a large empty
   * square around a small icon.
   */
  max-width: 136px;
  aspect-ratio: 1;
  padding: 22%;
  display: grid;
  place-items: center;
}

/*
 * The motif itself — the app's vector geometry, drawn by the browser.
 *
 * Unlit it is the filament colour (`arcade.bulbOn`), the same flat warm white
 * every tile carries in the app. It lights in the tile's own bulb on hover,
 * because a grid of nineteen signs all burning at once has no focus in it:
 * lighting only what the pointer is on is what gives the tile somewhere to
 * answer.
 */
.game__motif {
  width: 100%;
  height: 100%;
  /*
   * The drawn size of the artwork, capped here rather than left to fall out of
   * the plate's width and padding.
   *
   * 99px is what the plate above resolves to on a laptop — 176 less its 22%
   * reservation on each side. Naming it makes the icon one number instead of a
   * product of two, which is what lets the narrow layout below reach the same
   * size from a much smaller tile: it takes the padding down until 99 fits,
   * and this stops the icon overshooting once there is room to spare.
   */
  max-width: var(--motif-size);
  max-height: var(--motif-size);
  color: var(--c-bulb);
  overflow: visible;
  transition: color 140ms linear, filter 140ms linear;
}

/*
 * The bloom. Skia blurs three widened copies of every path; one drop-shadow
 * stack reads the same — faint and wide outside, tight and bright at the core
 * — and the compositor already knows how to run it.
 */
.game:hover .game__motif,
.game:focus-within .game__motif {
  color: #fff;
  filter:
    drop-shadow(0 0 2px var(--tile-light))
    drop-shadow(0 0 5px var(--tile-light))
    drop-shadow(0 0 11px var(--tile-light));
}

.game__title {
  /*
   * The app's `tile` role, up a quarter — 11px becomes 13.75.
   *
   * Written as a multiple of the token rather than as a flat 14, because the
   * role is what it is: 11 is the size a name has to be to fit a third of a
   * 360dp phone in the app's grid, and this page is not that grid. Keeping the
   * multiplier visible says the caption is the app's tile type at a web size,
   * not a different decision.
   *
   * The tracking is in ems, so it scales with this on its own and the letters
   * keep the role's rhythm.
   */
  font-size: calc(var(--f-tile) * 1.25);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tile-light, var(--c-accent));
}

.game__desc {
  font-size: var(--f-small);
  line-height: 1.5;
  color: var(--c-muted);
  margin: 0;
}

/*
 * The rack on a phone — two cabinets to a row, at the artwork's full size.
 *
 * 600px is not an arbitrary breakpoint: it is `WIDE_SCREEN` in the app's hub,
 * the width at which it stops being a phone layout and takes more columns. The
 * two now agree on where that line is.
 *
 * Everything here exists to buy the 99px icon back out of a 160px tile. A
 * 360dp phone gives each tile about 144px of content, so the gap, the tile's
 * padding and — most of all — the plate's bloom reservation all come down
 * until the drawing fits. The reservation is the one that can afford it: on
 * the web the bloom is a `drop-shadow`, and nothing here clips it, so the
 * padding is matching the app's proportions rather than preventing anything.
 */
@media (max-width: 600px) {
  .games {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
  }

  .game {
    padding: var(--sp-sm);
    gap: var(--sp-xs);
  }

  /* 10%: at 360px that leaves 115px of inner plate, which the icon's own cap
     trims back to 99 — and even a 320px phone lands on 99 exactly. */
  .game__plate {
    padding: 10%;
  }

  /*
   * Three lines, then an ellipsis.
   *
   * A grid row is as tall as its tallest tile, and in a 144px column Birdy
   * Fly's two sentences run to seven lines while Jigsaw's runs to four — which
   * would leave half the rack as white space under the short ones. The app's
   * own tile carries no description at all; this keeps most of it and keeps
   * the rows even.
   */
  .game__desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }
}

/* -------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 var(--sp-lg);
  font-family: var(--f-mono);
  font-size: var(--f-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-text);
  background: var(--c-surface-control);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sharp);
  cursor: pointer;
  transition: background 120ms linear, border-color 120ms linear, color 120ms linear;
}

.btn:hover,
.btn:focus-visible {
  background: rgba(255, 140, 26, 0.18);
  border-color: rgba(255, 140, 26, 0.6);
  color: var(--c-accent-bright);
}

/* interactive.primary — amber, and lit. */
.btn--primary {
  background: rgba(255, 176, 32, 0.16);
  border-color: rgba(255, 176, 32, 0.6);
  color: var(--c-accent-soft);
  box-shadow: 0 0 12px rgba(255, 140, 26, 0.2), inset 0 1px 0 rgba(255, 176, 32, 0.22);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: rgba(255, 176, 32, 0.3);
  border-color: var(--c-accent);
  color: var(--c-accent-bright);
}

/* --------------------------------------------------------------- footer */

.site-foot {
  margin-top: var(--sp-xxxl);
  padding: var(--sp-xl) 0 var(--sp-xxl);
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md) var(--sp-xl);
  align-items: center;
  justify-content: space-between;
  font-size: var(--f-small);
  color: var(--c-muted);
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

.site-foot a {
  color: var(--c-muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  color: var(--c-accent);
}

/* The Facebook mark — in Facebook's own colours (colors.ts `brand`), set in
   the SVG itself. A 48px target around a 28px mark, as in the app (§36). */
.site-foot .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
}

.site-foot .social:hover,
.site-foot .social:focus-visible {
  background: rgba(255, 140, 26, 0.16);
}

/* Skip link — §36. Off-screen until focused. */
.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--sp-lg);
  top: var(--sp-lg);
  z-index: 30;
  padding: var(--sp-sm) var(--sp-md);
  background: var(--c-panel);
  border: 1px solid var(--c-border-strong);
  color: var(--c-accent);
}

/* --------------------------------------------------------- pixel sprite */

/*
 * The pixel-art cabinet — `ArcadeCabinet` / `PixelArt`.
 *
 * Drawn by arcade.js into a single element's `box-shadow`, one shadow per lit
 * cell. That keeps it one DOM node at any size and, unlike an image, keeps the
 * cells on whole pixels — pixel art wants its grid aligned.
 */
.cabinet {
  width: 1px;
  height: 1px;
  flex: none;
  /* The sprite is drawn down and to the right of the origin, so the box is
     nudged back into place by half its own size. */
  transform: translate(0, 0);
}
