/* ---------- Fonts (self-hosted: no requests to Google) ---------- */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* Chomp Games */

:root {
  --black: #0b0b0b;
  --grey-900: #141414;
  --grey-800: #1e1e1e;
  --grey-700: #2c2c2c;
  --grey-500: #8f8f8f;   /* 5.7:1 on the darkest backgrounds (WCAG AA) */
  --grey-300: #a8a8a8;
  --white: #ededed;
  --lime: #b4f000;

  --sans: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--lime); color: var(--black); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 14px 20px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-primary { background: var(--lime); color: var(--black); border-color: var(--lime); }
.btn-primary:hover { background: transparent; color: var(--lime); }

.btn-ghost { border-color: var(--grey-700); color: var(--white); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn-sm { padding: 9px 14px; font-size: 12px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 11, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: transform 0.3s ease, border-color 0.3s;
}

.site-header.scrolled { border-bottom-color: var(--grey-800); }
.site-header.hidden { transform: translateY(-100%); }

.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.wordmark span { color: var(--lime); }

nav { display: flex; align-items: center; gap: 30px; }

nav > a:not(.btn) {
  position: relative;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey-300);
  transition: color 0.15s;
}

nav > a:not(.btn):hover { color: var(--lime); }
nav > a.active { color: var(--white); }

nav > a:not(.btn)::before {
  content: "";
  position: absolute;
  left: -12px;
  top: calc(50% - 2px);
  width: 5px;
  height: 5px;
  background: var(--lime);
  transform: scale(0);
  transition: transform 0.2s;
}

nav > a.active::before { transform: scale(1); }

.menu-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--white);
  background: none;
  border: 1px solid var(--grey-700);
  padding: 8px 12px;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  /* fills the screen so nothing below shows until you scroll */
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  display: flex;
  align-items: center;
}

.grid {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}

.hero-inner {
  position: relative;
  padding-top: 64px;
  padding-bottom: 112px;
}

.label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--lime);
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(48px, 8.5vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 28px;
}

.glitch { color: var(--lime); }

/* ---------- Chomp heading ---------- */

@property --b1 { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --b2 { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --b3 { syntax: "<number>"; inherits: false; initial-value: 0; }

.chomp-title .g { color: var(--lime); }
.chomp-title .g .glitch { color: var(--white); }

.o-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

/* Each bite is three overlapping circles cut out of the "o" */
.o {
  display: inline-block;
  --s: 0.011em;
  -webkit-mask:
    radial-gradient(circle calc(var(--b1) * 9 * var(--s)) at 99% 58%, #0000 97%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -2.78 * var(--s)) calc(58% + 8.56 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -7.28 * var(--s)) calc(58% + 5.29 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -9.00 * var(--s)) calc(58% + 0.00 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -7.28 * var(--s)) calc(58% + -5.29 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -2.78 * var(--s)) calc(58% + -8.56 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 9 * var(--s)) at 52% 33%, #0000 97%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + 8.56 * var(--s)) calc(33% + 2.78 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + 5.29 * var(--s)) calc(33% + 7.28 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + 0.00 * var(--s)) calc(33% + 9.00 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + -5.29 * var(--s)) calc(33% + 7.28 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + -8.56 * var(--s)) calc(33% + 2.78 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 9 * var(--s)) at 8% 84%, #0000 97%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + -3.37 * var(--s)) calc(84% + -8.34 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 2.18 * var(--s)) calc(84% + -8.73 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 6.89 * var(--s)) calc(84% + -5.79 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 8.98 * var(--s)) calc(84% + -0.63 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 7.63 * var(--s)) calc(84% + 4.77 * var(--s)), #0000 96%, #000);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle calc(var(--b1) * 9 * var(--s)) at 99% 58%, #0000 97%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -2.78 * var(--s)) calc(58% + 8.56 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -7.28 * var(--s)) calc(58% + 5.29 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -9.00 * var(--s)) calc(58% + 0.00 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -7.28 * var(--s)) calc(58% + -5.29 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b1) * 6.2 * var(--s)) at calc(99% + -2.78 * var(--s)) calc(58% + -8.56 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 9 * var(--s)) at 52% 33%, #0000 97%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + 8.56 * var(--s)) calc(33% + 2.78 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + 5.29 * var(--s)) calc(33% + 7.28 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + 0.00 * var(--s)) calc(33% + 9.00 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + -5.29 * var(--s)) calc(33% + 7.28 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b2) * 6.2 * var(--s)) at calc(52% + -8.56 * var(--s)) calc(33% + 2.78 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 9 * var(--s)) at 8% 84%, #0000 97%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + -3.37 * var(--s)) calc(84% + -8.34 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 2.18 * var(--s)) calc(84% + -8.73 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 6.89 * var(--s)) calc(84% + -5.79 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 8.98 * var(--s)) calc(84% + -0.63 * var(--s)), #0000 96%, #000),
    radial-gradient(circle calc(var(--b3) * 6.2 * var(--s)) at calc(8% + 7.63 * var(--s)) calc(84% + 4.77 * var(--s)), #0000 96%, #000);
  mask-composite: intersect;
  transition: --b1 0.12s ease-out, --b2 0.12s ease-out, --b3 0.12s ease-out;
}

.o.hit { animation: squash 0.45s cubic-bezier(0.3, 1.8, 0.5, 1); }

@keyframes squash {
  0%   { transform: scale(1.12, 0.84); }
  40%  { transform: scale(0.94, 1.08); }
  100% { transform: none; }
}

.o.regrow {
  transition: --b1 0.5s cubic-bezier(0.3, 1.6, 0.5, 1), --b2 0.5s cubic-bezier(0.3, 1.6, 0.5, 1), --b3 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
  animation: regrow 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes regrow {
  0% { transform: scale(0.7); }
  100% { transform: none; }
}

/* The jaws: positioned at the bite, rotated to come in from the right direction */
.jaws-pos {
  position: absolute;
  left: var(--jx, 98%);
  top: var(--jy, 46%);
  width: 0;
  height: 0;
  transform: rotate(var(--ja, 0deg));
  pointer-events: none;
}

.jaws {
  position: absolute;
  left: -0.1em;
  top: -0.33em;
  width: 0.78em;
  height: 0.66em;
  opacity: 0;
  filter: drop-shadow(0 0 0.04em rgba(0, 0, 0, 0.8));
}

.jaw {
  position: absolute;
  left: 0;
  width: 100%;
  height: 46%;
  background: var(--lime);
}

.jaw::after {
  content: "";
  position: absolute;
  left: 0.05em;
  right: 0.08em;
  height: 0.12em;
  background-size: 0.155em 0.16em;
  background-repeat: repeat-x;
}

.jaw.up {
  top: 0;
  transform-origin: 85% 100%;
  border-radius: 0.3em 0.1em 0.04em 0.06em / 0.24em 0.1em 0.04em 0.06em;
}

.jaw.up::after {
  top: 100%;
  background-image: radial-gradient(circle at 50% 0, var(--white) 0.07em, transparent 0.074em);
}

.jaw.down {
  bottom: 0;
  transform-origin: 85% 0;
  border-radius: 0.06em 0.04em 0.1em 0.3em / 0.06em 0.04em 0.1em 0.24em;
}

.jaw.down::after {
  bottom: 100%;
  background-image: radial-gradient(circle at 50% 100%, var(--white) 0.07em, transparent 0.074em);
}

/* little eye on the upper jaw */
.jaw.up::before {
  content: "";
  position: absolute;
  right: 0.16em;
  top: 0.06em;
  width: 0.07em;
  height: 0.07em;
  border-radius: 50%;
  background: var(--black);
}

.o-wrap.chomping.by-dino .jaws.dino { animation: lunge 0.9s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
.o-wrap.chomping.by-dino .jaw.up { animation: jaw-up 0.9s ease forwards; }
.o-wrap.chomping.by-dino .jaw.down { animation: jaw-down 0.9s ease forwards; }

@keyframes lunge {
  0%   { opacity: 0; transform: translateX(0.7em) scale(0.6); }
  20%  { opacity: 1; transform: translateX(0.42em) scale(1); }
  48%  { transform: translateX(0.4em); }
  60%  { transform: translateX(0) scale(1.05); }
  70%  { transform: translateX(0.02em) scale(1); }
  82%  { opacity: 1; transform: translateX(0.05em); }
  100% { opacity: 0; transform: translateX(0.8em) scale(0.7); }
}

@keyframes jaw-up {
  0%, 12% { transform: rotate(0); }
  45%     { transform: rotate(38deg); }
  58%     { transform: rotate(-6deg); }
  64%     { transform: rotate(3deg); }
  70%, 100% { transform: rotate(0); }
}

@keyframes jaw-down {
  0%, 12% { transform: rotate(0); }
  45%     { transform: rotate(-38deg); }
  58%     { transform: rotate(6deg); }
  64%     { transform: rotate(-3deg); }
  70%, 100% { transform: rotate(0); }
}

/* ---------- Chomp the shark ---------- */

.chomp-title { position: relative; }

.jaws.shark {
  left: -0.12em;
  top: -0.36em;
  width: 1em;
  height: 0.7em;
  filter: drop-shadow(0 0 0.03em rgba(0, 0, 0, 0.9));
}

.sjaw {
  position: absolute;
  left: 0;
  width: 100%;
  background: #fdf5dc;
}

/* upper jaw: pointed snout with triangle teeth, like the logo */
.sjaw.top {
  top: 0;
  height: 56%;
  clip-path: polygon(0 76%, 5% 52%, 14% 30%, 28% 14%, 48% 4%, 72% 1%, 90% 5%, 100% 16%, 100% 76%, 74% 76%, 66% 100%, 58% 76%, 50% 100%, 42% 76%, 34% 100%, 26% 76%, 18% 100%, 11% 76%);
}

.sjaw.bottom {
  bottom: 0;
  height: 48%;
  transform-origin: 100% 0;
  clip-path: polygon(14% 30%, 21% 0, 29% 30%, 37% 0, 45% 30%, 53% 0, 61% 30%, 69% 0, 76% 30%, 100% 30%, 100% 70%, 86% 92%, 56% 100%, 30% 88%, 14% 62%);
}

.sjaw .eye {
  position: absolute;
  left: 32%;
  top: 34%;
  width: 0.065em;
  height: 0.065em;
  border-radius: 50%;
  background: var(--black);
}

.sjaw .gills {
  position: absolute;
  left: 78%;
  top: 24%;
  width: 0.12em;
  height: 0.16em;
  border-left: 0.025em solid var(--lime);
  border-right: 0.025em solid var(--lime);
  border-radius: 40%;
}

.shark-fin {
  position: absolute;
  left: 50%;
  top: -0.2em;
  width: 0.24em;
  height: 0.24em;
  background: #fdf5dc;
  clip-path: polygon(0 100%, 52% 0, 64% 8%, 100% 100%);
}

.o-wrap.chomping.by-shark .jaws.shark { animation: shark-lunge 0.9s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
.o-wrap.chomping.by-shark .sjaw.bottom { animation: shark-jaw 0.9s ease forwards; }

@keyframes shark-lunge {
  0%   { opacity: 0; transform: translateX(0.9em) scale(0.6); }
  18%  { opacity: 1; transform: translateX(0.55em) scale(1.05); }
  46%  { transform: translateX(0.5em) scale(1); }
  58%  { transform: translateX(-0.02em) scale(1.08); }
  68%  { transform: translateX(0.02em) scale(1); }
  82%  { opacity: 1; transform: translateX(0.06em); }
  100% { opacity: 0; transform: translateX(1em) scale(0.7); }
}

@keyframes shark-jaw {
  0%, 12% { transform: rotate(0); }
  44%     { transform: rotate(-30deg); }
  57%     { transform: rotate(5deg); }
  63%     { transform: rotate(-3deg); }
  70%, 100% { transform: rotate(0); }
}

/* the fin cutting along the heading before the bite */
.fin-water {
  position: absolute;
  left: 0;
  bottom: var(--water, -0.06em);
  width: 100%;
  height: 0.42em;
  overflow: hidden;
  pointer-events: none;
}

.fin {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0.34em;
  height: 0.36em;
  opacity: 0;
}

.fin::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fdf5dc;
  clip-path: polygon(0 100%, 34% 30%, 60% 0, 66% 8%, 100% 100%);
}

.fin::after {
  content: "";
  position: absolute;
  left: 80%;
  bottom: 0;
  width: 0.7em;
  height: 0.025em;
  background: repeating-linear-gradient(90deg, var(--lime) 0 0.08em, transparent 0.08em 0.14em);
  opacity: 0.8;
}

.fin-water.swimming .fin { animation: fin-swim 1.05s cubic-bezier(0.45, 0, 0.4, 1) forwards; }

@keyframes fin-swim {
  0%   { opacity: 0; transform: translate(var(--from), 0.1em); }
  12%  { opacity: 1; transform: translate(calc(var(--from) - 0.2em), 0); }
  30%  { transform: translate(calc(var(--from) * 0.72 + var(--to) * 0.28), 0.03em); }
  50%  { transform: translate(calc(var(--from) * 0.45 + var(--to) * 0.55), 0); }
  72%  { opacity: 1; transform: translate(var(--to), 0.02em); }
  100% { opacity: 1; transform: translate(var(--to), 0.46em); }
}

.crumb {
  position: absolute;
  left: var(--jx);
  top: var(--jy);
  width: var(--size, 0.055em);
  height: var(--size, 0.055em);
  border-radius: 40%;
  background: var(--white);
  pointer-events: none;
  animation: crumb 0.9s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}

.crumb.lime { background: var(--lime); }

@keyframes crumb {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.pow {
  position: absolute;
  left: var(--jx);
  top: var(--jy);
  font-size: 0.2em;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--lime);
  -webkit-text-stroke: 0.06em var(--black);
  paint-order: stroke fill;
  pointer-events: none;
  animation: pow 0.8s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

@keyframes pow {
  0%   { opacity: 0; transform: translate(-50%, -50%) translate(var(--px), var(--py)) scale(0.2) rotate(var(--pr)); }
  25%  { opacity: 1; transform: translate(-50%, -50%) translate(var(--px), var(--py)) scale(1.15) rotate(var(--pr)); }
  45%  { transform: translate(-50%, -50%) translate(var(--px), var(--py)) scale(1) rotate(var(--pr)); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--px), calc(var(--py) - 0.4em)) scale(1) rotate(var(--pr)); }
}

.chomp-title.shake { animation: shake 0.32s ease; }

@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-3px, 2px) rotate(-0.4deg); }
  40% { transform: translate(3px, -1px) rotate(0.3deg); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(1px, 0); }
}

.lede {
  max-width: 520px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--grey-300);
  margin-bottom: 40px;
}

/* ---------- Featured ---------- */

.featured { padding-bottom: 40px; }

.feature {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  padding: 56px;
  border: 1px solid var(--grey-800);
  background: var(--grey-900);
  overflow: hidden;
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  border: 1px solid var(--grey-700);
}

.feature-head .label { margin: 0; }

.feature-title { margin-bottom: 20px; }

.feature-title img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
}

.feature-text {
  color: var(--grey-300);
  max-width: 480px;
  margin-bottom: 24px;
}

.feature-points {
  margin-bottom: 28px;
  font-size: 15px;
}

.feature-points li {
  position: relative;
  padding: 6px 0 6px 20px;
}

.feature-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--lime);
}

.feature-meta {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 32px;
  margin: 0 0 32px;
  padding: 16px 0;
  border-top: 1px solid var(--grey-800);
  border-bottom: 1px solid var(--grey-800);
}

.feature-meta dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
}

.feature-meta dd { margin: 2px 0 0; font-size: 15px; }

/* Phone screenshots */

.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: center;
}

.shot.phone {
  margin: 0;
  aspect-ratio: 520 / 1193;
  border-radius: 18px;
  border: 1px solid var(--grey-700);
  background: #2a2a2a;
}

.phone:nth-child(2) { position: relative; top: -28px; }

/* Icon-only card art */

.shot.icon-shot { background: #1d1d1d; }

.shot.icon-shot img {
  inset: 0;
  margin: auto;
  width: auto;
  height: 100%;
}

/* ---------- Sections ---------- */

.section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.section + .section { position: relative; }

/* Dividers aligned to the content edge, not the padded wrapper */
.section + .section::before,
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 1px;
  background: var(--grey-800);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}

.kicker {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--white);
}

.section-note { color: var(--grey-500); font-size: 16px; }

.count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey-500);
}

.index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--lime);
}

/* ---------- Screenshot frames ---------- */

.shot {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.25s ease-out, border-color 0.25s;
  will-change: transform;
}

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot > span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-500);
}

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(180, 240, 0, 0.07), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.shot:hover::after { opacity: 1; }

.shot.loading img,
.shot.loading > span { visibility: hidden; }

.shot.loading,
.sk {
  background: linear-gradient(90deg, var(--grey-900) 0%, var(--grey-800) 50%, var(--grey-900) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------- Studio ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: start;
}

.studio-text {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--grey-800);
}

.stats div {
  padding: 18px 0;
  border-bottom: 1px solid var(--grey-800);
}

.stats div:nth-child(odd) { padding-right: 16px; }

.stats dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
  margin-bottom: 4px;
}

.stats dd { margin: 0; font-size: 18px; font-weight: 500; }

.tech {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  margin-top: 72px;
  padding: 24px 0;
  border-top: 1px solid var(--grey-800);
  border-bottom: 1px solid var(--grey-800);
}

.tech-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-500);
}

.tech ul { display: flex; flex-wrap: wrap; gap: 12px 40px; }

.tech li {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--grey-300);
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--grey-800);
}

.services li {
  padding: 32px 32px 8px 0;
}

.services li + li {
  padding-left: 32px;
  border-left: 1px solid var(--grey-800);
}

.services h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 16px 0 10px;
}

.services p { color: var(--grey-300); font-size: 16px; }

/* ---------- Contact ---------- */

.contact-title {
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 56px;
}

.routes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.route {
  padding: 28px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  transition: border-color 0.2s;
}

.route:hover { border-color: var(--grey-700); }

.route h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }

.route p { color: var(--grey-300); font-size: 15px; margin-bottom: 28px; }

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.email-row a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--lime);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.email-row a:hover { border-color: var(--lime); }

.copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey-300);
  background: transparent;
  border: 1px solid var(--grey-700);
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy:hover,
.copy.done { color: var(--lime); border-color: var(--lime); }
.copy.failed { color: var(--white); border-color: var(--white); }

/* ---------- Game pages ---------- */

.game-hero { padding-top: 48px; padding-bottom: 24px; }

.back {
  display: inline-block;
  margin-bottom: 48px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey-500);
  transition: color 0.15s;
}

.back::before { content: "\2190"; margin-right: 8px; }
.back:hover { color: var(--lime); }

.game-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.game-title { margin-bottom: 24px; }

.game-title img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
}

.game-title-text {
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.phones-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 440px;
  justify-self: end;
  width: 100%;
}

.phones-2 .phone:nth-child(2) { top: 40px; }

.game-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 72px 0 0;
  border-top: 1px solid var(--grey-800);
  border-bottom: 1px solid var(--grey-800);
}

.game-facts div { padding: 18px 16px 18px 0; }

.game-facts dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
  margin-bottom: 4px;
}

.game-facts dd { margin: 0; font-size: 15px; }

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
  align-items: start;
}

.prose p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--grey-300);
  margin-bottom: 18px;
}

.prose p:first-of-type { color: var(--white); }

.prose h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.about-grid .feature-points { margin: 0; }

.about-grid .feature-points li {
  border-bottom: 1px solid var(--grey-800);
  padding: 10px 0 10px 20px;
}

.about-grid .feature-points li::before { top: 19px; }

.powerups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.powerups li {
  padding: 28px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
}

.powerups img { width: 56px; height: 56px; margin-bottom: 20px; }
.powerups h3 { font-size: 20px; margin-bottom: 6px; }
.powerups p { color: var(--grey-300); font-size: 15px; }

.screens {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.screens .phone:nth-child(even) { top: 32px; }

.screens-section { padding-bottom: 128px; }

.screens-wide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.timeline { border-left: 1px solid var(--grey-700); }

.timeline li {
  position: relative;
  padding: 0 0 28px 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 7px;
  width: 7px;
  height: 7px;
  background: var(--grey-500);
}

.timeline li.next::before { background: var(--lime); }

.timeline span {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--lime);
  margin-bottom: 4px;
}

.timeline p { color: var(--grey-300); font-size: 16px; }

.credits-lead {
  font-size: 22px;
  margin-bottom: 40px;
}

.credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.credits {
  padding: 28px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
}

.credits h3 { font-size: 18px; margin-bottom: 16px; }

.credits dl { margin: 0; }

.credits dl div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--grey-800);
}

.credits dt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-500);
  padding-top: 3px;
}

.credits dd { margin: 0; font-size: 15px; color: var(--grey-300); }

.next-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.next-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: color 0.2s;
}

.next-title::after { content: " \2192"; color: var(--lime); }
.next-link:hover .next-title { color: var(--lime); }

/* ---------- Star In The Making sky ---------- */

.sky-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(to bottom, #060607 0%, #0b0b0c 50%, #19191b 100%);
}

.sky-stars {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 130%;
  transform: translateY(calc(var(--p, 0) * -18%));
}

.mtn {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  will-change: transform;
}

/* back to front; nearer layers start lower so they rise faster */
.mtn.m1 { height: 62vh; background-image: url("../images/sitm-mountain-1.png"); transform: translateY(calc((1 - var(--p, 0)) * 52vh)); }
.mtn.m2 { height: 54vh; background-image: url("../images/sitm-mountain-2.png"); transform: translateY(calc((1 - var(--p, 0)) * 62vh)); }
.mtn.m3 { height: 44vh; background-image: url("../images/sitm-mountain-3.png"); transform: translateY(calc((1 - var(--p, 0)) * 74vh)); }
.mtn.m4 { height: 30vh; background-image: url("../images/sitm-mountain-4.png"); transform: translateY(calc((1 - var(--p, 0)) * 88vh)); }

/* footer sits on the mountains */
.sitm-page .site-footer { background: rgba(11, 11, 11, 0.45); border-top-color: transparent; }

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 96px;
}

.legal-title {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
}

.legal-lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--grey-300);
  margin-bottom: 40px;
}

.legal-summary {
  padding: 28px 32px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-left: 3px solid var(--lime);
  margin-bottom: 56px;
}

.legal-summary h2 { margin-top: 0; }

.legal-summary li {
  position: relative;
  padding: 6px 0 6px 20px;
}

.legal-summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--lime);
}

.legal section { margin-bottom: 48px; }

.legal h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.legal h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.legal section p {
  color: var(--grey-300);
  margin-bottom: 14px;
}

.legal a:not(.back) {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal a:not(.back):hover { text-decoration-thickness: 2px; }

/* ---------- Game page: section links ---------- */

nav.page-nav {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  padding: 0;
  background: none;
  border: 0;
}

nav.page-nav > a:not(.btn) {
  width: auto;
  padding: 10px 0;
  font-size: 13px;
}

/* ---------- Game page: soundtrack ---------- */

.soundtrack {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}

.album img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--grey-800);
}

.album-info { margin-top: 18px; }
.album-info h3 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 4px; }
.album-info p { color: var(--grey-300); font-size: 15px; }
.album-info .album-credit { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--grey-500); }

.tracks {
  border-top: 1px solid var(--grey-800);
}

.track {
  display: grid;
  grid-template-columns: 44px 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-800);
}

.track-play {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--grey-700);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.track-play:hover { border-color: var(--lime); color: var(--lime); }
.track-play .i-pause { display: none; }
.track.is-playing .track-play { background: var(--lime); border-color: var(--lime); color: var(--black); }
.track.is-playing .track-play .i-play { display: none; }
.track.is-playing .track-play .i-pause { display: block; }

.track-num { font-family: var(--mono); font-size: 12px; color: var(--grey-500); }

.track-title { font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.track.is-current .track-title { color: var(--lime); }

.track-time { font-family: var(--mono); font-size: 12px; color: var(--grey-300); }

.track-dl {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-300);
  border-bottom: 1px solid transparent;
}

.track-dl:hover { color: var(--lime); }

/* tiny equaliser on the playing track */
.eq { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.track.is-playing .eq { display: inline-flex; }
.eq i { width: 3px; height: 100%; background: var(--lime); animation: eq 0.9s ease-in-out infinite; transform-origin: bottom; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }

@keyframes eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.now-playing {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
}

.now-playing[hidden] { display: none; }

.np-title { display: block; font-size: 14px; color: var(--grey-300); margin-bottom: 8px; }

.np-bar { display: flex; align-items: center; gap: 12px; }
.np-time, .np-dur { font-family: var(--mono); font-size: 12px; color: var(--grey-300); min-width: 34px; }

.np-seek {
  flex: 1;
  height: 24px;
  accent-color: var(--lime);
  cursor: pointer;
}

.player-note { margin-top: 16px; font-size: 13px; color: var(--grey-500); }

/* ---------- Game page: changelog ---------- */

.changelog { border-left: 1px solid var(--grey-700); }

.release {
  position: relative;
  padding: 0 0 32px 28px;
}

.release::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  background: var(--grey-500);
}

.release.upcoming::before { background: var(--lime); }

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 8px;
}

.version {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--lime);
}

.release-date { font-family: var(--mono); font-size: 12px; color: var(--grey-500); }

.release p,
.release li { color: var(--grey-300); font-size: 16px; }

.release ul li {
  position: relative;
  padding: 3px 0 3px 16px;
}

.release ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 2px;
  background: var(--grey-500);
}

@media (max-width: 760px) {
  .soundtrack { grid-template-columns: 1fr; gap: 28px; }
  .album { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
  .album-info { margin-top: 0; }
  .track { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; }
  .track-num { display: none; }
  .track-size { display: none; }
  .track-title { font-size: 15px; }
}

/* ---------- Project tiles (until there are screenshots) ---------- */

.shot.tile-art {
  background:
    radial-gradient(circle at 1px 1px, var(--grey-800) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--grey-900);
}

.shot.tile-art > .tile-mark {
  font-family: var(--sans);
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--lime);
}

.shot.tile-hero { aspect-ratio: 4 / 3; border-radius: 12px; }
.shot.tile-hero > .tile-mark { font-size: clamp(96px, 14vw, 180px); }

.changelog-wide { max-width: 760px; }

.inline-link {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--grey-800);
  background: var(--grey-900);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 56px;
}

.footer-logo img { display: block; width: 160px; height: auto; }

.footer-brand p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--grey-500);
}

.footer-cols { display: flex; gap: 72px; }

.footer-cols h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
  margin-bottom: 16px;
}

.footer-cols li { margin-bottom: 8px; }

.footer-cols a {
  font-size: 15px;
  color: var(--grey-300);
  transition: color 0.15s;
}

.footer-cols a:hover { color: var(--lime); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
  position: relative;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-500);
}

.footer-bottom a:hover { color: var(--lime); }

/* ---------- Focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- Scroll reveal ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s var(--ease) var(--d, 0ms),
    transform 0.9s var(--ease) var(--d, 0ms);
}

html.js [data-reveal].in { opacity: 1; transform: none; }
html.js.is-loading [data-reveal].in { opacity: 0; transform: translateY(32px); }

/* ---------- Loading skeleton ---------- */

.skeleton {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  pointer-events: none;
  overflow: hidden;
}

html.is-loading .skeleton { opacity: 1; visibility: visible; }
html.is-loading body { overflow: hidden; }

.sk-nav { display: flex; align-items: center; gap: 30px; }
.sk-logo { width: 140px; height: 16px; }
.sk-link { width: 52px; height: 10px; }
.sk-btn { width: 84px; height: 32px; }
.sk-btn.lg { width: 132px; height: 44px; }

.sk-hero { padding-top: 220px; padding-bottom: 88px; }
.sk-label { width: 180px; height: 12px; margin-bottom: 28px; }
.sk-title { width: min(720px, 85%); height: clamp(48px, 8vw, 100px); margin-bottom: 32px; }
.sk-text { width: min(460px, 90%); height: 16px; margin-bottom: 40px; }
.sk-buttons { display: flex; gap: 12px; }
.sk-feature { aspect-ratio: 21 / 9; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .studio-grid { grid-template-columns: 1fr; gap: 48px; }
  .services { grid-template-columns: 1fr; }
  .services li, .services li + li { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--grey-800); }
  .routes { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; padding: 40px; gap: 48px; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .game-hero-grid, .about-grid, .credits-grid { grid-template-columns: 1fr; gap: 40px; }
  .phones-2 { justify-self: center; max-width: 320px; }
  .powerups { grid-template-columns: 1fr; }
  .screens { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 40px; margin-right: -20px; padding-right: 20px; }
  .screens .phone { flex: 0 0 46%; scroll-snap-align: start; }
  .screens-wide { grid-template-columns: 1fr; }
  .credits dl div { grid-template-columns: 1fr; gap: 2px; }
  .game-facts { margin-top: 48px; }
  .section + .section::before, .footer-bottom::before { left: 20px; right: 20px; }
  nav > a:not(.btn)::before { left: auto; right: 0; }

  .menu-toggle { display: block; }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--black);
    border-bottom: 1px solid var(--grey-800);
    display: none;
  }

  nav.open { display: flex; }
  nav > a:not(.btn) { padding: 12px 0; font-size: 15px; width: 100%; }
  nav .btn { margin-top: 12px; }

  .sk-nav .sk-link { display: none; }

  .hero-inner { padding-top: 40px; padding-bottom: 104px; }
  .sk-hero { padding-top: 140px; }
  .lede { font-size: 18px; }

  .featured { padding-bottom: 16px; }
  .sk-feature { aspect-ratio: 4 / 3; }
  .feature { padding: 28px 20px; }
  .feature-meta { grid-template-columns: repeat(2, auto); gap: 16px 32px; }
  .phones { gap: 10px; }
  .shot.phone { border-radius: 12px; }
  .phone:nth-child(2) { top: -14px; }

  .section { padding-top: 64px; padding-bottom: 64px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .tech { margin-top: 48px; }

  .footer-top { flex-direction: column; }
  .footer-cols { gap: 40px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Reduced motion ----------
   Follows the device setting unless the person picked "Reduce" or "Allow"
   in the accessibility panel (data-motion on <html>). */

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) { scroll-behavior: auto; }
  html:not([data-motion="full"]) *,
  html:not([data-motion="full"]) *::before,
  html:not([data-motion="full"]) *::after { transition: none !important; animation: none !important; }
  html:not([data-motion="full"]) [data-reveal] { opacity: 1 !important; transform: none !important; }
  html:not([data-motion="full"]) .mtn,
  html:not([data-motion="full"]) .sky-stars { transform: none !important; }
}

html[data-motion="reduce"] { scroll-behavior: auto; }
html[data-motion="reduce"] *,
html[data-motion="reduce"] *::before,
html[data-motion="reduce"] *::after { transition: none !important; animation: none !important; }
html[data-motion="reduce"] [data-reveal] { opacity: 1 !important; transform: none !important; }
html[data-motion="reduce"] .mtn,
html[data-motion="reduce"] .sky-stars { transform: none !important; }


/* ---------- Accessibility settings ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--lime);
  color: var(--black);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.skip-link:focus { top: 12px; }

main:focus { outline: none; }

/* keep the header on screen while something in it has keyboard focus */
.site-header:focus-within { transform: none; }

.o-wrap:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 6px;
  border-radius: 6px;
}

/* Text size: scales the whole layout, like browser zoom */
html[data-text="125"] :is(.site-header, main, .site-footer, .a11y-panel) { zoom: 1.25; }
html[data-text="150"] :is(.site-header, main, .site-footer, .a11y-panel) { zoom: 1.5; }

/* Reading fonts (downloaded only when chosen, see @font-face below) */
html[data-font="lexend"] { --sans: "Lexend", system-ui, sans-serif; --mono: "Lexend", system-ui, sans-serif; }
html[data-font="atkinson"] { --sans: "Atkinson Hyperlegible", system-ui, sans-serif; --mono: "Atkinson Hyperlegible", system-ui, sans-serif; }
html[data-font="opendyslexic"] { --sans: "OpenDyslexic", "Lexend", system-ui, sans-serif; --mono: "OpenDyslexic", "Lexend", system-ui, sans-serif; }

/* Reading fonts are self-hosted too. Browsers only download a font file
   when something on the page actually uses it, so these cost nothing
   until a visitor picks one in the accessibility panel. */
@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
/* Only the Regular file is included; the browser thickens it for bold text and headings */
@font-face {
  font-family: "OpenDyslexic";
  src: url("../fonts/opendyslexic-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Extra spacing: the WCAG 1.4.12 text-spacing values */
html[data-spacing="wide"] :is(p, li, a, dt, dd, h1, h2, h3, h4, label, legend, button, span:not(.glitch)) {
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
  line-height: 1.5 !important;
}

html[data-spacing="wide"] p { margin-bottom: 2em; }
html[data-spacing="wide"] .legal-lede,
html[data-spacing="wide"] .lede { margin-bottom: 2em; }

/* High contrast: from the panel, or from the device unless the person chose "Standard" */
html[data-contrast="high"] {
  --grey-300: #f2f2f2;
  --grey-500: #d6d6d6;
  --grey-700: #a0a0a0;
  --grey-800: #707070;
  --white: #ffffff;
}

html[data-contrast="high"] a:not(.btn):not(.wordmark):not(.footer-logo):not(.project-link):not(.next-link):not(.skip-link) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-contrast: more) {
  html:not([data-contrast="normal"]) {
    --grey-300: #f2f2f2;
    --grey-500: #d6d6d6;
    --grey-700: #a0a0a0;
    --grey-800: #707070;
    --white: #ffffff;
  }
  html:not([data-contrast="normal"]) a:not(.btn):not(.wordmark):not(.footer-logo):not(.project-link):not(.next-link):not(.skip-link) {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* Windows high contrast and other forced-colour modes */
@media (forced-colors: active) {
  .grid, .sky-stars, .mtn, .progress { display: none; }
  .btn, .copy, .a11y-toggle, .route, .project-link, .feature { border: 1px solid CanvasText; }
  .jaws, .fin-water, .pow, .crumb { display: none; }
}

/* The settings button (in the header) */
.header-inner { gap: 16px; }
.header-inner .wordmark { margin-right: auto; }

.a11y-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--lime);
  background: transparent;
  border: 1px solid var(--grey-700);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.a11y-toggle:hover { border-color: var(--lime); }

.a11y-toggle:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* The panel */
.a11y-panel {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  color: var(--white);
  background: var(--grey-900);
  border: 1px solid var(--grey-700);
  border-radius: 12px;
  font-family: var(--sans);
}

.a11y-panel::backdrop { background: rgba(0, 0, 0, 0.6); }

.a11y-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 24px;
}

.a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.a11y-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.a11y-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--grey-700);
  border-radius: 8px;
  cursor: pointer;
}

.a11y-close:hover { border-color: var(--lime); color: var(--lime); }

.a11y-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey-300);
}

.a11y-panel fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.a11y-panel legend {
  padding: 0;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-300);
}

/* segmented radio buttons */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}

.seg input,
.font-list input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.seg label {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 14px;
  text-align: center;
  color: var(--white);
  border: 1px solid var(--grey-700);
  border-radius: 8px;
  cursor: pointer;
}

.seg label:hover { border-color: var(--grey-300); }

.seg input:checked + label {
  color: var(--black);
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 700;
}

.seg input:focus-visible + label,
.font-list input:focus-visible + label {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.font-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.font-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--grey-700);
  border-radius: 8px;
  cursor: pointer;
}

.font-list label:hover { border-color: var(--grey-300); }

.font-list .font-name { font-size: 16px; }
.font-list .font-hint { font-size: 12px; color: var(--grey-300); text-align: right; }

.font-list input:checked + label {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}

.font-list input:checked + label .font-name::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  vertical-align: 2px;
  background: var(--lime);
}

.a11y-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.a11y-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--lime);
  cursor: pointer;
}

.a11y-check label { font-size: 15px; cursor: pointer; }

.a11y-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--grey-800);
}

.a11y-actions .btn { min-height: 44px; }

.a11y-status {
  min-height: 1em;
  font-size: 13px;
  color: var(--grey-300);
}

@media (max-width: 760px) {
  .a11y-toggle { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .a11y-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .menu-toggle { min-height: 44px; }
  .a11y-inner { padding: 20px; gap: 16px; }
}


/* ---------- 404 page ---------- */

.notfound {
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 96px;
  padding-bottom: 96px;
}

.nf-code {
  font-size: clamp(120px, 26vw, 300px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--white);
  margin-bottom: 32px;
}

/* Bubbles drifting up behind the page (js/bubbles.js) */
.nf-bubbles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* One bite out of the 0, using the heading's bite mask */
.nf-o {
  color: var(--lime);
  --b1: 1;
  animation: nf-bite 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) 0.6s backwards;
}

@keyframes nf-bite {
  from { --b1: 0; }
  to   { --b1: 1; }
}

.nf-title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.nf-title .g { color: var(--lime); }

.nf-lede {
  max-width: 520px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--grey-300);
  margin-bottom: 36px;
}

.nf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.nf-links {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--grey-700);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-family: var(--mono);
  font-size: 13px;
}

.nf-links a { color: var(--grey-500); transition: color 0.15s; }
.nf-links a:hover { color: var(--lime); }

/* ---------- Workflow Toolkit: logo tile and downloads ---------- */

.shot.tile-logo { background: #1d2023; }
.shot.tile-logo img { position: static; width: auto; height: 72%; max-width: 72%; object-fit: contain; }

.downloads { max-width: 820px; border-top: 1px solid var(--grey-800); }
.download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--grey-800);
}
.download h3 { font-size: 18px; font-weight: 700; }
.download p { color: var(--grey-300); font-size: 15px; margin-top: 4px; }
.download-meta { font-family: var(--mono); font-size: 12px; color: var(--grey-500); }
.changelog-more { margin-top: 8px; }

/* ---------- Workflow Toolkit: documentation (sidebar layout from the old docs site) ---------- */

.docs-hero { padding-bottom: 40px; }

.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-bottom: 96px;
}

.docs-side { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
.docs-toc summary { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey-500); cursor: pointer; list-style: none; margin-bottom: 12px; }
.docs-toc summary::-webkit-details-marker { display: none; }
/* Reset the site header's nav rules for this in-page list */
nav.docs-nav {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: none;
  border: 0;
  border-left: 1px solid var(--grey-800);
}
.docs-group {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 0 6px 16px;
}
.docs-group:first-child { padding-top: 0; }
nav.docs-nav > a:not(.btn) {
  width: auto;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--grey-300);
  padding: 5px 0 5px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
}
nav.docs-nav > a:not(.btn)::before { content: none; }
nav.docs-nav > a:not(.btn):hover { color: var(--white); }
nav.docs-nav > a.current { color: var(--lime); border-left-color: var(--lime); }

.docs-body { max-width: 780px; }
.docs-section { padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--grey-800); }
.docs-section:last-child { border-bottom: 0; margin-bottom: 0; }
.docs-body h2 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 20px; }
.docs-body h3 { font-size: 21px; font-weight: 700; margin: 36px 0 12px; }
.docs-body h4 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.docs-body p { color: var(--grey-300); }
.docs-body p + p { margin-top: 12px; }
.docs-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  padding: 1px 6px;
  color: var(--white);
}
.docs-note { font-family: var(--mono); font-size: 12px; color: var(--grey-500) !important; margin-bottom: 12px; }

.docs-callout { margin-top: 20px; padding: 16px 20px; border: 1px solid var(--grey-700); border-left: 3px solid var(--lime); background: var(--grey-900); }
.docs-callout strong { color: var(--white); }
.docs-callout-warn { border-left-color: #ff8a3d; }

.docs-install { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 8px; }
.docs-install .btn { margin-top: 18px; }
.docs-steps { counter-reset: step; }
.docs-steps li { counter-increment: step; position: relative; padding: 5px 0 5px 32px; color: var(--grey-300); font-size: 16px; }
.docs-steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; font-family: var(--mono); font-size: 12px; color: var(--lime); }

.docs-syntax { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.docs-syntax div { border: 1px solid var(--grey-800); padding: 12px 14px; }
.docs-syntax dt { margin-bottom: 6px; }
.docs-syntax dd { margin: 0; font-size: 14px; color: var(--grey-300); }

.tool { border: 1px solid var(--grey-800); background: var(--grey-900); padding: 22px 24px; margin-top: 16px; }
.tool dl { margin: 0; display: grid; gap: 10px; }
.tool dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.tool dt { font-family: var(--mono); font-size: 12px; color: var(--grey-500); padding-top: 3px; }
.tool dd { margin: 0; color: var(--grey-300); font-size: 16px; }
.tool dd code { white-space: normal; word-break: break-word; }

/* Colour-coded labels from the old release notes, with words so colour isn't the only cue */
.docs-key li { display: flex; align-items: baseline; gap: 14px; padding: 6px 0; color: var(--grey-300); font-size: 16px; }
.tag, .sev {
  flex: none;
  display: inline-block;
  min-width: 82px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  text-align: center;
}
.tag-add, .sev-low { color: var(--lime); }
.tag-fix, .sev-high { color: #ff8a3d; }
.tag-rework { color: #5cc8ff; }
.tag-removed, .sev-critical { color: #ff5c5c; }
.sev-medium { color: #ffd23d; }

.notes { margin-top: 8px; }
.notes .release ul li { display: flex; align-items: baseline; gap: 12px; padding-left: 0; }
.notes .release ul li::before { content: none; }
.notes .release p + ul { margin-top: 8px; }
.release-note { font-size: 14px !important; color: var(--grey-500) !important; margin-top: 8px; }

@media (max-width: 960px) {
  .docs { grid-template-columns: 1fr; gap: 32px; }
  .docs-side { position: static; max-height: none; border: 1px solid var(--grey-800); padding: 16px 18px; }
  .docs-toc summary { margin-bottom: 0; }
  .docs-toc[open] summary { margin-bottom: 12px; }
  .docs-install { grid-template-columns: 1fr; }
  .docs-syntax { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .tool dl div { grid-template-columns: 1fr; gap: 2px; }
  .download { grid-template-columns: 1fr; }
  .notes .release ul li, .docs-key li { flex-direction: column; gap: 4px; }
}

/* ---------- Workflow Toolkit: screenshot preview ---------- */

.wt-preview {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--grey-800);
  border-radius: 14px;
  overflow: hidden;
  background: var(--grey-900);
}

.wt-tabs { display: flex; flex-direction: column; border-right: 1px solid var(--grey-800); padding: 10px; gap: 4px; }

.wt-tab {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--grey-300);
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 16px 16px 16px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wt-tab:hover { background: var(--grey-800); color: var(--white); }
.wt-tab[aria-selected="true"] { background: var(--black); border-color: var(--grey-700); color: var(--white); box-shadow: inset 3px 0 0 var(--lime); }
.wt-tab:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.wt-tab-num { font-family: var(--mono); font-size: 12px; color: var(--grey-500); padding-top: 3px; }
.wt-tab[aria-selected="true"] .wt-tab-num { color: var(--lime); }
.wt-tab-text { display: flex; flex-direction: column; gap: 3px; }
.wt-tab-name { font-size: 17px; font-weight: 700; line-height: 1.25; }
.wt-tab-desc { font-size: 14px; line-height: 1.4; color: var(--grey-500); }

.wt-panels { min-width: 0; }
.wt-panel { display: flex; flex-direction: column; height: 100%; }
.wt-panel[hidden] { display: none; }
.wt-panel + .wt-panel { border-top: 1px solid var(--grey-800); }
.wt-preview.ready .wt-panel + .wt-panel { border-top: 0; }

.wt-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: clamp(360px, 52vw, 600px);
  padding: 28px;
  background:
    radial-gradient(circle at 1px 1px, var(--grey-800) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--black);
  cursor: zoom-in;
}
.wt-stage img {
  display: block;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--grey-800);
  transition: opacity 0.18s, transform 0.18s;
}
.wt-stage.swapping img { opacity: 0; transform: scale(0.985); }
.wt-stage::after {
  content: "Click to enlarge";
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey-500);
  opacity: 0;
  transition: opacity 0.15s;
}
.wt-stage:hover::after, .wt-stage:focus-visible::after { opacity: 1; }
.wt-stage:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }

.wt-panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-top: 1px solid var(--grey-800);
}
.wt-caption { color: var(--grey-300); font-size: 15px; max-width: 52ch; }

.wt-thumbs { display: flex; gap: 10px; flex: none; }
.wt-thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 92px;
  padding: 0;
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--grey-500);
}
.wt-thumb img {
  width: 92px;
  height: 58px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid var(--grey-700);
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}
.wt-thumb span { font-family: var(--mono); font-size: 11px; text-align: center; }
.wt-thumb:hover img { opacity: 1; }
.wt-thumb[aria-pressed="true"] img { opacity: 1; border-color: var(--lime); }
.wt-thumb[aria-pressed="true"] span { color: var(--white); }
.wt-thumb:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 960px) {
  .wt-preview { grid-template-columns: 1fr; }
  .wt-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--grey-800); scrollbar-width: none; }
  .wt-tab { flex: none; width: auto; padding: 10px 14px; }
  .wt-tab[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--lime); }
  .wt-tab-desc { display: none; }
  .wt-panel-foot { flex-direction: column; align-items: flex-start; }
  .wt-stage { padding: 18px; }
}

@media (max-width: 560px) {
  .wt-stage { height: 420px; }
  .wt-thumb, .wt-thumb img { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .wt-stage img, .wt-tab, .wt-thumb img { transition: none; }
}
html[data-motion="reduce"] .wt-stage img { transition: none; }

/* ---------- Workflow Toolkit: screenshot viewer ---------- */

.wt-lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
}
.wt-lightbox::backdrop { background: rgba(5, 5, 5, 0.9); backdrop-filter: blur(4px); }
.wt-lb-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 56px 24px 24px;
}
.wt-lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; max-height: 100%; }
.wt-lb-figure img {
  display: block;
  max-width: min(1200px, calc(100vw - 160px));
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--grey-800);
  animation: wt-lb-in 0.2s var(--ease);
}
.wt-lb-figure figcaption { display: flex; gap: 16px; align-items: baseline; max-width: 70ch; font-size: 15px; color: var(--grey-300); text-align: center; }
.wt-lb-count { font-family: var(--mono); font-size: 12px; color: var(--grey-500); white-space: nowrap; }

.wt-lb-close, .wt-lb-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--white);
  background: var(--grey-900);
  border: 1px solid var(--grey-700);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.wt-lb-close:hover, .wt-lb-nav:hover { border-color: var(--lime); color: var(--lime); }
.wt-lb-close:focus-visible, .wt-lb-nav:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.wt-lb-close { position: absolute; top: 12px; right: 16px; }
.wt-lightbox.single .wt-lb-nav { visibility: hidden; }

@keyframes wt-lb-in { from { opacity: 0; transform: scale(0.97); } }

@media (max-width: 760px) {
  .wt-lb-inner { padding: 64px 12px 16px; gap: 8px; }
  .wt-lb-figure img { max-width: calc(100vw - 112px); max-height: calc(100vh - 170px); }
  .wt-lb-nav { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .wt-lb-figure img { animation: none; } }
html[data-motion="reduce"] .wt-lb-figure img { animation: none; }

/* ---------- Chomp Editor page ---------- */


.shot.ce-card-shot img { object-position: left top; }

.shot.ce-hero-shot { border-radius: 12px; cursor: zoom-in; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.shot.ce-hero-shot img { object-position: left top; }

.ce-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--grey-800);
}
.ce-features li { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--grey-800); }
.ce-features li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--grey-800); }
.ce-features h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 8px; }
.ce-features p { color: var(--grey-300); font-size: 16px; }

.ce-langs { margin-top: 56px; }
.ce-langs ul { gap: 10px 28px; }
.ce-langs li { font-size: 16px; }

.ce-table-wrap { overflow-x: auto; margin-top: 40px; border: 1px solid var(--grey-800); border-radius: 12px; background: var(--grey-900); }
.about-grid .ce-table-wrap { margin-top: 0; }
.ce-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ce-table caption { text-align: left; padding: 16px 20px 6px; font-family: var(--mono); font-size: 12px; color: var(--grey-500); }
.ce-table th, .ce-table td { text-align: left; padding: 12px 20px; border-top: 1px solid var(--grey-800); vertical-align: top; }
.ce-table thead th { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--grey-500); border-top: 0; }
.ce-table tbody th { font-weight: 700; color: var(--white); white-space: nowrap; }
.ce-table td { color: var(--grey-300); }

.ce-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ce-shortcuts .tool { margin-top: 0; border-radius: 12px; }
.ce-shortcuts h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.ce-shortcuts .tool dl div { grid-template-columns: 150px minmax(0, 1fr); }
.ce-shortcuts .tool dt { color: var(--lime); }

.prose code { font-family: var(--mono); font-size: 0.9em; color: var(--white); background: var(--grey-800); padding: 1px 6px; border-radius: 4px; }

.ce-note { margin-top: 40px; padding: 18px 22px; border: 1px solid var(--grey-800); border-left: 3px solid var(--lime); border-radius: 8px; color: var(--grey-300); background: var(--grey-900); }

.wt-thumbs.ce-thumbs-wide { gap: 8px; }
.wt-thumbs.ce-thumbs-wide .wt-thumb, .wt-thumbs.ce-thumbs-wide .wt-thumb img { width: 76px; }
.wt-thumbs.ce-thumbs-wide .wt-thumb img { height: 48px; }

@media (max-width: 960px) {
  .ce-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-features li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .ce-features li:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--grey-800); }
  .ce-shortcuts { grid-template-columns: 1fr; }
  .wt-thumbs.ce-thumbs-wide { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .ce-features { grid-template-columns: 1fr; }
  .ce-features li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .ce-shortcuts .tool dl div { grid-template-columns: 1fr; gap: 2px; }
}
.ce-prose { max-width: 760px; }

/* Chomp Editor: RAM usage and downloads */
.ce-ram { margin-top: 32px; padding: 28px; border: 1px solid var(--grey-800); border-radius: 12px; background: var(--grey-900); }
.ce-ram h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.ce-ram-sub { color: var(--grey-500); font-size: 14px; margin-top: 6px; }
.ce-bars { display: grid; gap: 14px; margin-top: 24px; }
.ce-bar-row { display: grid; grid-template-columns: 240px minmax(0, 1fr) 80px; align-items: center; gap: 16px; }
.ce-bar-label { font-size: 15px; color: var(--grey-300); }
.ce-bar { height: 28px; background: var(--grey-800); border-radius: 6px; overflow: hidden; }
.ce-bar-fill { display: block; height: 100%; width: var(--w); background: var(--lime); border-radius: 6px; }
.ce-bar-fill.ce-bar-old { background: var(--grey-500); }
.ce-bar-value { font-family: var(--mono); font-size: 14px; text-align: right; color: var(--white); }
.ce-ram-callout { margin-top: 22px; color: var(--grey-300); font-size: 16px; }
.ce-ram-callout strong { color: var(--lime); }
.ce-ram-table td { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.ce-ram-notes { margin-top: 28px; }
.ce-ram-files, .ce-downloads { margin-top: 32px; }
.ce-note code.ce-hash { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--white); background: var(--grey-800); padding: 1px 6px; border-radius: 4px; }
.ce-note strong { color: var(--white); }

@media (max-width: 560px) {
  .ce-ram { padding: 20px; }
  .ce-bar-row { grid-template-columns: 1fr auto; }
  .ce-bar-label { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ce-table th, .ce-table td { padding: 10px 12px; }
  .ce-table tbody th { white-space: normal; min-width: 150px; }
  .ce-ram-table td { font-size: 13px; }
}
.shot.tile-logo.ce-icon-tile img { position: absolute; top: 14%; left: 50%; height: 72%; width: auto; max-width: none; aspect-ratio: 1 / 1; transform: translateX(-50%); border-radius: 10px; }

/* Download buttons on phones: keep them button-sized instead of stretching across the screen */
@media (max-width: 560px) {
  .download .btn { justify-self: start; justify-content: center; min-width: 140px; margin-top: 4px; }
}

/* The site is dark by design: tell phone browsers so they don't force their own light or "auto dark"
   colours onto buttons, and drop the native button look on the screenshot gallery controls. */
:root { color-scheme: dark; }
.wt-tab, .wt-thumb, .wt-lb-close, .wt-lb-nav, .ce-code-actions button {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.wt-tab, .wt-thumb { background-color: transparent; }
.wt-tab[aria-selected="true"] { background-color: var(--black); }
.wt-thumb span { color: var(--grey-500); }
.wt-thumb[aria-pressed="true"] span { color: var(--white); }

/* ---------- Spec line (status and facts above a page title) ----------
   Plain text separated by thin rules, not badges. Only the status
   is coloured, and only when the thing is out or launching. */

.spec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey-300);
}
.spec > span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 12px;
  vertical-align: -0.1em;
  background: var(--grey-700);
}
.spec-status.live { color: var(--lime); }
.feature-head .spec { margin: 0; }

/* ---------- Announcement link (homepage hero) ---------- */

.announce {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey-300);
  transition: color 0.15s;
}
.announce-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(180, 240, 0, 0.12);
}
.announce-arrow { color: var(--lime); transition: transform 0.2s var(--ease); }
.announce:hover { color: var(--white); }
.announce:hover .announce-arrow { transform: translateX(4px); }

.legal-updated { font-family: var(--mono); font-size: 13px; color: var(--grey-500); margin: -12px 0 24px; }

/* ---------- No eyebrows: labels in plain sentence case ---------- */

.feature-meta dt,
.stats dt,
.game-facts dt {
  font-family: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey-500);
}

.footer-cols h4,
.docs-toc summary {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--white);
}

.docs-group {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey-300);
}

.a11y-panel legend {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--white);
}

.tech-label {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.back {
  font-family: inherit;
  font-size: 15px;
}

/* ---------- Projects list (homepage "Games and tools") ----------
   An index of numbered rows instead of a card grid. On desktop a
   larger screenshot follows the cursor while you hover a row. */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--grey-800);
  counter-reset: none;
}
.project { border-bottom: 1px solid var(--grey-800); }

.project-link {
  position: relative;
  display: grid;
  grid-template-columns: 36px 64px minmax(0, 1fr) 170px 150px 24px;
  align-items: center;
  gap: 24px;
  padding: 22px 16px;
  transition: background-color 0.2s;
}
.project-link:hover,
.project-link:focus-visible { background: var(--grey-900); }

.project-num { font-family: var(--mono); font-size: 12px; color: var(--grey-500); }

.project-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--grey-700);
  background: #1d1d1d;
  display: grid;
  place-items: center;
}
.project-icon img { width: 100%; height: 100%; object-fit: cover; }
.project-icon picture { display: contents; }
.project-icon source { display: none; }
.project-icon.is-tile { background: #1d2023; }
.project-icon.is-tile img { width: 78%; height: 78%; object-fit: contain; }
.project-mark { font-weight: 800; font-size: 22px; letter-spacing: -0.04em; color: var(--lime); }

.project-main { display: grid; gap: 4px; min-width: 0; }
.project-name {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--white);
  transition: color 0.15s;
}
.project-link:hover .project-name { color: var(--lime); }
.project-blurb { font-size: 15px; color: var(--grey-300); }

.project-kind { display: grid; gap: 2px; font-size: 15px; color: var(--white); }
.project-platform { font-family: var(--mono); font-size: 12px; color: var(--grey-500); }

.project-status { font-family: var(--mono); font-size: 13px; color: var(--grey-300); text-align: right; }
.project-status.live { color: var(--lime); }

.project-arrow { color: var(--grey-500); display: grid; transition: transform 0.2s var(--ease), color 0.2s; }
.project-link:hover .project-arrow { color: var(--lime); transform: translateX(4px); }

/* Hover preview: positioned by js/script.js (--px / --py), desktop only */
.project-preview {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 300px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--grey-700);
  background: var(--grey-900);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--px, 0px), var(--py, 0px)) scale(0.92);
  transition: opacity 0.2s, transform 0.12s linear;
  display: none;
}
.project-preview.tall { width: 180px; aspect-ratio: 9 / 16; }
.project-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.project-preview picture { display: contents; }
.projects.can-preview .project-preview { display: block; }
.projects.can-preview .project-link.previewing .project-preview {
  opacity: 1;
  transform: translate(var(--px, 0px), var(--py, 0px)) scale(1);
}

@media (max-width: 960px) {
  .project-link { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 18px; padding: 20px 4px; }
  .project-num, .project-arrow { display: none; }
  .project-icon { width: 56px; height: 56px; grid-row: span 2; align-self: start; }
  .project-main { grid-column: 2 / 4; }
  .project-kind { grid-column: 2; display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
  .project-status { grid-column: 3; }
}

@media (forced-colors: active) {
  .project-preview { display: none !important; }
}

/* ---------- Contact page ---------- */

.contact-hero { padding-top: 48px; padding-bottom: 96px; }
.contact-hero .lede { margin-bottom: 48px; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.contact-form {
  padding: 32px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  display: grid;
  gap: 22px;
}

.field { display: grid; gap: 8px; }
.field label { font-family: var(--mono); font-size: 13px; color: var(--grey-300); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--white);
  background: var(--black);
  border: 1px solid var(--grey-700);
  border-radius: 0;
  padding: 13px 14px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--grey-300) 50%), linear-gradient(135deg, var(--grey-300) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--grey-500); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
  border-color: var(--lime);
}
.field [aria-invalid="true"] { border-color: #ff6b6b; }
.field-hint { font-size: 13px; color: var(--grey-500); }

/* Spam trap: off-screen, not display:none (some bots skip hidden fields) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.form-foot .btn[disabled] { opacity: 0.6; cursor: wait; }
.form-note { font-size: 14px; color: var(--grey-500); }
.form-note a { color: var(--grey-300); text-decoration: underline; text-underline-offset: 3px; }
.form-note a:hover { color: var(--lime); }

.form-status:empty { display: none; }
.form-status { padding: 14px 16px; font-size: 15px; border-left: 3px solid var(--lime); background: var(--black); }
.form-status.is-error { border-left-color: #ff6b6b; }

.contact-direct h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.contact-direct dl { display: grid; gap: 18px; border-top: 1px solid var(--grey-800); padding-top: 20px; }
.contact-direct dt { font-family: var(--mono); font-size: 13px; color: var(--grey-500); margin-bottom: 4px; }
.contact-direct dd { margin: 0; }
.contact-direct dd a { color: var(--white); word-break: break-all; }
.contact-direct dd a:hover { color: var(--lime); }

.contact-cta { margin: -24px 0 40px; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-form { padding: 22px; }
}

/* ---------- Guides ---------- */

.guide-meta { font-family: var(--mono); font-size: 13px; color: var(--grey-500); margin: -8px 0 24px; }

.guide code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--white);
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

.guide pre {
  margin: 0 0 18px;
  padding: 18px 20px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-left: 3px solid var(--lime);
  overflow-x: auto;
  tab-size: 4;
}
.guide pre code {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  line-height: 1.6;
  color: #d9d9d9;
  white-space: pre;
  overflow-wrap: normal;
}

.guide section ul,
.guide-tool ul { margin: 0 0 16px; padding-left: 20px; color: var(--grey-300); }
.guide section li,
.guide-tool li { margin-bottom: 8px; line-height: 1.55; }
.guide section li strong { color: var(--white); }

.guide-tool {
  margin: 56px 0 48px;
  padding: 28px 32px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
}
.guide-tool h2 { margin-top: 0; }
.guide-tool p { color: var(--grey-300); margin-bottom: 14px; }
.guide-tool .actions { margin-top: 20px; }
.legal .guide-tool .btn { text-decoration: none; }
.legal .guide-tool .btn-primary { color: var(--black); }
.legal .guide-tool .btn-primary:hover { color: var(--lime); }
.legal .guide-tool .btn-ghost { color: var(--white); }
.legal .guide-tool .btn-ghost:hover { color: var(--lime); }

.guide-more { border-top: 1px solid var(--grey-800); padding-top: 28px; }
.guide-more h2 { font-size: 20px; }
.guide-more ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.guide-index { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.legal .guide-index a {
  display: grid;
  gap: 6px;
  padding: 24px 28px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  text-decoration: none;
  color: var(--white);
  transition: border-color 0.15s;
}
.legal .guide-index a:hover { border-color: var(--lime); }
.guide-tag { font-family: var(--mono); font-size: 12px; color: var(--lime); }
.guide-index-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.guide-index-blurb { color: var(--grey-300); font-size: 16px; }

@media (max-width: 600px) {
  .guide-tool { padding: 22px; }
  .guide pre { padding: 14px; margin-left: -4px; margin-right: -4px; }
  .guide pre code { font-size: 12.5px; }
}
