/* KLSX — direction "Colour chapters" (seed 623590824): a stack of system folders opens into
   full-bleed colour chapters. One face (Jost), square corners, one magenta accent. */

@font-face {
  font-family: "Jost";
  src: url("fonts/jost-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f7f5;
  --surface: #ebebe8;
  --ink: #000000;
  --soft: #3a3a38;
  --muted: #5e5e5a;
  --dark: #141414;
  --paper: #f7f7f5;
  --accent: #d0106f;
  --accent-ink: #ffffff;

  /* One colour per system, the folder and the chapter. */
  --f-ps1: #97aaf6;
  --f-gb: #bbf697;
  --f-gba: #6ef8fb;
  --f-n64: #fed878;
  --f-psp: #ffab96;

  --font: "Jost", system-ui, -apple-system, sans-serif;
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 10vw, 10rem);

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(16px, 1.7vw, 24px);
  --section: clamp(96px, 11vw, 176px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { position: absolute; left: var(--m); top: 12px; z-index: 10; width: auto; height: auto; margin: 0; clip: auto; background: var(--paper); color: var(--ink); padding: 10px 16px; }
[data-i="0"] { --i: 0; } [data-i="1"] { --i: 1; } [data-i="2"] { --i: 2; } [data-i="3"] { --i: 3; }

/* Display type: Jost bold capitals, tight. */
.hero-title, .h-section, .h-faq, .close-title {
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.9;
}
.h-two, .h-three, .extras-clause, .sys-name { font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

/* Buttons: square, one fill. */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 14px 28px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 500; font-size: var(--step-body); text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.button:hover { background: var(--ink); color: var(--paper); }
.button:active { transform: translateY(2px); }
.button-ink { background: var(--ink); color: var(--paper); }
.button-ink:hover { background: var(--accent); color: var(--accent-ink); }
.button-accent:hover { background: var(--paper); color: var(--ink); }

/* ---------- Bar ---------- */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 var(--m);
  color: var(--paper);
}
.bar-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--step-body); letter-spacing: 0.02em; text-decoration: none; }
.bar-mark img { width: 32px; height: 32px; image-rendering: pixelated; }
.bar-link { position: absolute; right: var(--m); font-size: var(--step-small); text-underline-offset: 4px; }
.bar-link:hover { color: var(--f-gb); }

/* ---------- Hero: the folder stack ---------- */
.hero { background: var(--dark); color: var(--paper); overflow: hidden; }
.hero-title, .hero-sub { text-align: center; margin-left: auto; margin-right: auto; }
.hero-title { padding-top: clamp(104px, 15svh, 150px); font-size: var(--step-display); max-width: 14ch; }
.hero-sub { margin-top: 28px; max-width: 46ch; padding: 0 var(--m); font-size: var(--step-lead); line-height: 1.35; }

.folders { width: 86%; margin: clamp(56px, 9svh, 96px) auto 0; padding-top: 40px; }
.folder { position: relative; display: block; height: 64px; text-decoration: none; color: var(--ink); }
.folder-tab {
  position: absolute; bottom: 100%; height: 40px; padding: 0 30px;
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: var(--step-small); font-weight: 500; color: var(--ink); text-decoration: none;
  background: inherit;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
  transition: transform 200ms var(--ease);
}
a.folder:hover .folder-tab, a.folder:focus-visible .folder-tab, .folder-front a.folder-tab:hover { transform: translateY(-6px); }
a.folder:hover { filter: brightness(1.05); }
.f-psp { background: var(--f-psp); } .f-psp .folder-tab { left: 74%; }
.f-n64 { background: var(--f-n64); } .f-n64 .folder-tab { left: 53%; }
.f-gba { background: var(--f-gba); } .f-gba .folder-tab { left: 28%; }
.f-ps1 { background: var(--f-ps1); } .f-ps1 .folder-tab { left: 8%; }
.f-gb { background: var(--f-gb); }
.folder-front { height: auto; }
.folder-front .folder-tab { left: 0; }
.folder-body { padding: 32px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; align-items: start; }
.folder-action { grid-column: 1 / 5; display: grid; gap: 16px; justify-items: start; }
.folder-note { font-size: var(--step-small); max-width: 30ch; }
.folder-shot { grid-column: 5 / 13; justify-self: end; width: min(100%, 760px); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: start; }
.folder-shot img { width: 100%; background: var(--dark); }

/* ---------- How it works: one bar ---------- */
.how { padding: var(--section) var(--m); background: var(--bg); }
.h-section { font-size: var(--step-head); }
.stages-bar { margin-top: 64px; display: flex; gap: 6px; height: 22vh; min-height: 150px; }
.seg { padding: 20px; min-width: 20%; }
.seg-a { flex: 1 1 0; background: var(--f-gb); }
.seg-b { flex: 1 1 0; background: var(--f-n64); }
.seg-c { flex: 6.2 1 0; background: var(--f-ps1); }
.seg-time { font-size: var(--step-lead); font-weight: 500; line-height: 1.1; }
.seg-text { display: none; }
.seg-notes { margin-top: 18px; display: flex; gap: 6px; }
.seg-notes li { font-size: var(--step-body); line-height: 1.4; min-width: 20%; padding-right: 20px; }
.seg-note-a, .seg-note-b { flex: 1 1 0; }
.seg-note-c { flex: 6.2 1 0; }
.seg-notes li { max-width: none; }
.seg-note-c { max-width: 30ch; }

/* ---------- Systems: tabs and bands ---------- */
.systems { --field: var(--f-gb); background: var(--field); padding: var(--section) var(--m); min-height: 90svh; transition: background-color 280ms var(--ease); }
.systems[data-field="ps1"] { --field: var(--f-ps1); }
.systems[data-field="gb"] { --field: var(--f-gb); }
.systems[data-field="gba"] { --field: var(--f-gba); }
.systems[data-field="n64"] { --field: var(--f-n64); }
.systems[data-field="psp"] { --field: var(--f-psp); }
.systems.is-dragging { outline: 6px solid var(--ink); outline-offset: -18px; }
.systems-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.h-two { font-size: var(--step-head); max-width: 14ch; }
.h-two .soft { color: var(--soft); display: block; }
.sorter { display: grid; gap: 10px; justify-items: end; text-align: right; }
.sorter-help { font-size: var(--step-small); max-width: 34ch; }
.sorter-pick:has(+ input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }

.sorter-result { margin-top: 40px; background: var(--ink); color: var(--paper); padding: 24px 28px; display: grid; gap: 14px; }
.sorter-result[hidden] { display: none; }
.sr-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 24px; }
.sr-file { font-weight: 500; overflow-wrap: anywhere; }
.sr-path { font-weight: 500; }
.sr-note { grid-column: 2; font-size: var(--step-small); color: #d6d6d2; }
.sr-clear { justify-self: start; background: none; border: 0; padding: 0; font-size: var(--step-small); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; color: var(--paper); }

.systems-body { margin-top: 56px; display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 40px; align-items: start; }
.sys-tabs { display: grid; gap: 6px; }
.sys-tab {
  min-height: 64px; padding: 10px 16px; border: 0; text-align: left; cursor: pointer;
  font-size: var(--step-body); font-weight: 500; line-height: 1.2; color: var(--ink);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.sys-tab[data-system="ps1"] { background: var(--f-ps1); }
.sys-tab[data-system="gb"] { background: var(--f-gb); }
.sys-tab[data-system="gba"] { background: var(--f-gba); }
.sys-tab[data-system="n64"] { background: var(--f-n64); }
.sys-tab[data-system="psp"] { background: var(--f-psp); }
.sys-tab:hover { transform: translateX(4px); }
.sys-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.sys-tab:focus-visible { outline-color: var(--ink); }
.sys-panel + .sys-panel { margin-top: 48px; }
.js .sys-panel + .sys-panel { margin-top: 0; }
.js .sys-panel[hidden] { display: none; }
.sys-name { font-size: var(--step-lead); margin-bottom: 16px; }
.js .sys-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bands { display: grid; gap: 4px; }
.band {
  display: grid; grid-template-columns: minmax(110px, 18%) minmax(0, 1fr); column-gap: 24px;
  min-height: 76px; padding: 16px 20px; align-items: baseline;
  background: color-mix(in srgb, var(--field) 55%, #ffffff);
}
.band:nth-child(even) { background: color-mix(in srgb, var(--field) 30%, #ffffff); }
.band dt { font-size: var(--step-lead); font-weight: 500; line-height: 1.2; }
.band dd { font-size: var(--step-body); font-weight: 500; line-height: 1.4; }
.band-note { display: block; margin-top: 4px; font-size: var(--step-small); font-weight: 400; color: var(--soft); max-width: 62ch; }

/* ---------- Showcase: iPhone Duo ---------- */
.duo { background: var(--f-n64); display: grid; grid-template-columns: 1fr 1fr; min-height: 88svh; }
.duo-plate { display: flex; align-items: center; padding: 40px; }
.duo-frame { position: relative; width: 100%; aspect-ratio: 1; background: var(--dark); overflow: hidden; }
.duo-frame img {
  position: absolute; inset: 7% 0; margin: auto; height: 86%; width: auto; max-width: 92%;
  opacity: 0; transform: scale(0.98); transition: opacity 240ms var(--ease), transform 320ms var(--ease);
}
.duo-frame img.is-on { opacity: 1; transform: none; }
.duo-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 56px var(--m) 40px 0; }
.duo-views { display: flex; gap: 28px; flex-wrap: wrap; }
.duo-view { background: none; border: 0; padding: 4px 0; font-size: var(--step-lead); font-weight: 500; color: var(--soft); cursor: pointer; text-decoration: none; }
.duo-view[aria-selected="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.duo-view:hover { color: var(--ink); }
.duo-text p { max-width: 44ch; }
.h-three { font-size: var(--step-head); }
.duo-text p { margin-top: 32px; font-size: var(--step-body); }
.duo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cell { display: flex; align-items: center; min-height: 72px; padding: 0 24px; text-decoration: none; font-weight: 500; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.cell-ink { background: var(--ink); color: var(--paper); }
.cell-ink:hover { background: var(--accent); }
.cell-tone { background: color-mix(in srgb, var(--f-n64) 60%, #ffffff); }
.cell-tone:hover { background: var(--paper); }

/* ---------- Controls: a fixed screen, live settings ---------- */
.controls { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); background: var(--bg); }
.controls-field {
  grid-column: 1 / 7; position: sticky; top: 0; height: 100svh;
  background: var(--f-gba); display: flex; align-items: center; justify-content: center; padding: var(--m);
}
.controls-copy { grid-column: 8 / 13; padding: 72px var(--m) 25vh 0; }
.controls-copy .h-three { max-width: 12ch; }
.block { margin-top: 40vh; max-width: 44ch; }
.block:first-of-type { margin-top: 18vh; }
.block-line { font-size: var(--step-lead); font-weight: 500; line-height: 1.2; }
.block p + p { margin-top: 12px; }
.block-shot { margin-top: 24px; width: 100%; background: var(--dark); }

.seg-control { margin-top: 20px; display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface); padding: 4px; }
.seg-control label { position: relative; cursor: pointer; }
.seg-control input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-control span { display: block; padding: 10px 16px; min-height: 44px; font-size: var(--step-small); font-weight: 500; transition: background-color 160ms var(--ease); }
.seg-control input:checked + span { background: var(--ink); color: var(--paper); }
.seg-control label:hover span { background: var(--bg); }
.seg-control input:checked + span, .seg-control label:hover input:checked + span { background: var(--ink); }
.seg-control input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.range { margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; font-size: var(--step-small); font-weight: 500; }
.range span { grid-column: 1 / -1; }
.range output { min-width: 4ch; text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: var(--surface); }
input[type="range"]::-moz-range-track { height: 8px; background: var(--surface); }
input[type="range"]::-moz-range-progress { height: 8px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; background: var(--accent); border: 0; }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; background: var(--accent); border: 0; border-radius: 0; }

.switch { margin-top: 20px; display: inline-flex; align-items: center; gap: 14px; min-height: 44px; cursor: pointer; font-size: var(--step-small); font-weight: 500; }
.switch input { -webkit-appearance: none; appearance: none; margin: 0; width: 52px; height: 30px; background: var(--surface); position: relative; cursor: pointer; transition: background-color 160ms var(--ease); }
.switch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; background: var(--ink); transition: transform 180ms var(--ease), background-color 160ms var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(22px); background: var(--paper); }

/* The screen (an interface fragment: the app's own look). */
.screen {
  --pad-opacity: 0.8;
  position: relative; width: min(100%, 600px); aspect-ratio: 1.42; background: #000; color: #fff;
  overflow: hidden; border-radius: 18px; /* taste-skill-ignore: the device screen's own corners */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.screen-game { position: relative; grid-column: 2; height: 74%; aspect-ratio: 10 / 9; transition: height 260ms var(--ease); }
.screen:not(.is-beside) .screen-game { height: 100%; }
.screen.has-pad .screen-game { height: 100%; }
.screen-frame { width: 100%; height: 100%; image-rendering: pixelated; }
.screen[data-filter="smooth"] .screen-frame { image-rendering: auto; }
.screen-lines { position: absolute; inset: 0; display: none; background: url("scanlines.png") repeat; background-size: 100% calc(100% / 144); pointer-events: none; }
.screen[data-filter="scanlines"] .screen-lines { display: block; }
.screen-fps {
  position: absolute; top: 6px; left: 6px; padding: 2px 7px; display: none;
  font-size: 11px; font-weight: 500; background: rgba(0, 0, 0, 0.6); color: #fff; /* taste-skill-ignore: the app's frame-rate badge */
  border-radius: 6px; /* taste-skill-ignore: the app's frame-rate badge */
}
.screen.has-fps .screen-fps { display: block; }
.pad { position: absolute; top: 0; bottom: 0; width: 26%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; opacity: var(--pad-opacity); transition: opacity 200ms var(--ease); }
.pad-left { left: 0; } .pad-right { right: 0; }
.screen.has-pad .pad { opacity: 0; }
.dpad { width: 104px; height: 104px; }
.pad-right { flex-direction: row; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10px 14px; }
.face {
  width: 54px; height: 54px; display: grid; place-items: center;
  background: #262626; border: 2px solid #8e8e8e; border-radius: 50%; /* taste-skill-ignore: the app's touch buttons */
  font-size: 24px; font-weight: 500; color: #d77ac4;
}
.face-b { transform: translateY(22px); }
.pill {
  padding: 5px 12px; background: #262626; border: 1.5px solid #8e8e8e; border-radius: 999px; /* taste-skill-ignore: the app's small buttons */
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #fff;
}
.pad-right .pill { margin-top: 30px; }
.screen-menu {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px;
  display: grid; align-content: center; justify-items: center; gap: 4px; opacity: var(--pad-opacity);
  background: #262626; border: 1.5px solid #8e8e8e; border-radius: 50%; /* taste-skill-ignore: the app's menu button */
}
.screen-menu span { width: 14px; height: 2px; background: #fff; }
.screen-note { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 500; opacity: 0; transition: opacity 200ms var(--ease); }
.screen.has-pad .screen-note { opacity: 0.8; }

/* ---------- Extras: drag through the add-ons ---------- */
.extras { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; min-height: 88svh; }
.extras-left { background: var(--f-psp); padding: 56px var(--m) 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.extras-clause { font-size: var(--step-head); max-width: 11ch; min-height: 2em; }
.extras-sub { max-width: 36ch; font-size: var(--step-body); }
.extras-right { background: var(--dark); display: flex; align-items: center; justify-content: center; padding: 56px var(--m) 40px; }
.extras-track { grid-column: 1 / -1; background: var(--dark); color: var(--paper); padding: 20px var(--m) 32px; }
.extras-track input[type="range"]::-webkit-slider-runnable-track { background: #3a3a38; }
.extras-track input[type="range"]::-moz-range-track { background: #3a3a38; }
.extras-track input[type="range"]::-moz-range-progress { background: var(--paper); }
.extras-track input[type="range"]::-webkit-slider-thumb { width: 32px; height: 32px; margin-top: -12px; }
.extras-names { margin-top: 8px; display: grid; grid-template-columns: repeat(4, 1fr); font-size: var(--step-body); }
.extras-names li { color: #a8a8a4; transition: color 200ms var(--ease); }
.extras-names li:nth-child(2) { text-align: center; padding-right: 8%; }
.extras-names li:nth-child(3) { text-align: center; padding-left: 8%; }
.extras-names li:nth-child(4) { text-align: right; }
.extras-names li.is-on { color: var(--paper); }

/* The add-on sheet (an interface fragment in the app's look). */
.sheet { width: min(100%, 440px); background: #1c1c1e; color: #fff; padding: 22px 18px 26px; border-radius: 22px; /* taste-skill-ignore: an iOS sheet */ }
.sheet-title { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 18px; }
.sheet-stage { display: none; }
.sheet-stage.is-on { display: block; animation: sheet-in 200ms var(--ease); }
@keyframes sheet-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-head { font-size: 13px; color: #9a9aa0; padding: 0 14px 8px; }
.sheet-list { background: #2c2c2e; border-radius: 12px; /* taste-skill-ignore: an iOS grouped list */ }
.sheet-list li { position: relative; padding: 12px 14px; font-size: 16px; }
.sheet-list li + li { box-shadow: inset 0 1px 0 #3a3a3c; } /* taste-skill-ignore: iOS list separators */
.sheet-list li.is-picked::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 13px; border: solid #3f7cf0; border-width: 0 2.5px 2.5px 0; transform: translateY(-65%) rotate(45deg); }
.sheet-foot { font-size: 13px; color: #9a9aa0; padding: 10px 14px 0; line-height: 1.4; }

/* ---------- Questions: a band per question ---------- */
.faq-head { background: var(--accent); color: var(--accent-ink); min-height: 40svh; display: flex; align-items: flex-end; padding: 40px var(--m); }
.h-faq { font-size: var(--step-display); }
.qa { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 56px var(--m); background: var(--bg); }
.qa:nth-child(odd) { background: var(--surface); }
.qa h3 { grid-column: 1 / 6; font-size: var(--step-lead); font-weight: 700; line-height: 1.2; max-width: 22ch; }
.qa p, .qa-answer { grid-column: 7 / 13; max-width: 58ch; }
.qa-answer p { max-width: none; }
.qa-shot { margin-top: 28px; width: min(100%, 300px); }
.qa p a { color: var(--accent); text-underline-offset: 4px; }

/* ---------- Close: the idea again, inverted ---------- */
.close { background: var(--ink); color: var(--paper); padding: clamp(96px, 16svh, 176px) var(--m) 40px; display: flex; flex-direction: column; gap: clamp(96px, 16svh, 176px); }
.close-title { font-size: var(--step-display); max-width: 12ch; }
.close-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.close-line { font-size: var(--step-lead); max-width: 34ch; line-height: 1.3; }

/* ---------- Footer: tiles ---------- */
.footer { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding: 8px; background: var(--bg); }
.tile { padding: 22px; min-height: 220px; text-decoration: none; }
.tile-statement { grid-column: 1 / 5; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.tile-line { font-size: var(--step-lead); line-height: 1.25; font-weight: 500; }
.tile-legal { font-size: var(--step-small); color: var(--soft); }
.tile-nav { grid-column: 5 / 8; background: var(--f-gb); }
.tile-nav ul { display: grid; gap: 8px; }
.tile-nav a { text-underline-offset: 4px; }
.tile-nav a:hover { color: var(--accent); }
.tile-version { grid-column: 8 / 10; background: var(--f-ps1); display: flex; flex-direction: column; gap: 4px; font-size: var(--step-small); }
.tile-credit { margin-top: auto; }
.tile-credit a { text-underline-offset: 3px; }
.tile-mail { grid-column: 10 / 13; background: var(--f-n64); display: flex; align-items: flex-end; font-size: var(--step-lead); font-weight: 500; overflow-wrap: anywhere; }
.tile-mail a { text-underline-offset: 5px; }
.tile-word { grid-column: 1 / 9; min-height: 320px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; }
.tile-word span { font-size: clamp(5rem, 18vw, 17rem); font-weight: 700; letter-spacing: -0.03em; line-height: 0.8; }
.tile-go { grid-column: 9 / 13; min-height: 320px; background: var(--accent); color: var(--accent-ink); display: flex; flex-direction: column; justify-content: space-between; font-size: var(--step-lead); font-weight: 500; transition: background-color 160ms var(--ease); }
.tile-go svg { align-self: flex-end; width: 56px; height: 56px; transition: transform 200ms var(--ease); }
.tile-go:hover { background: var(--ink); }
.tile-go:hover svg { transform: translate(4px, -4px); }

/* ---------- 404 ---------- */
.lost-page { background: var(--dark); color: var(--paper); }
.lost { min-height: 100svh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; padding: var(--m); max-width: 1100px; margin: 0 auto; }
.lost-mark { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; text-decoration: none; }
.lost-mark img { image-rendering: pixelated; }
.lost-title { font-size: var(--step-display); font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.9; }
.lost-sub { font-size: var(--step-lead); max-width: 36ch; }

/* ---------- Entrances ---------- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .is-in [data-rise], .js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise] { opacity: 1; transform: none; transition: none; }
  .duo-frame img, .screen-game, .folder-tab, .systems { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1020px) {
  .folders { width: 92%; }
  .folder-action { grid-column: 1 / -1; }
  .folder-shot { grid-column: 1 / -1; }
  .duo { grid-template-columns: 1fr; }
  .duo-copy { padding: 0 var(--m) 48px; }
  .controls { display: block; }
  .controls-field { position: sticky; top: 0; height: 46svh; z-index: 1; }
  .controls-copy { padding: 56px var(--m) 96px; }
  .block, .block:first-of-type { margin-top: 64px; }
  .qa h3, .qa p, .qa-answer { grid-column: 1 / -1; }
  .qa > p, .qa-answer { margin-top: 14px; }
  .tile-statement { grid-column: 1 / -1; min-height: 0; } .tile-nav { grid-column: 1 / 4; }
  .tile-version { grid-column: 4 / 9; } .tile-mail { grid-column: 9 / 13; font-size: var(--step-body); }
  .tile-word, .tile-go { grid-column: 1 / -1; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  .bar { height: 60px; justify-content: space-between; }
  .bar-link { position: static; }
  .hero-title { padding-top: 96px; font-size: 12.5vw; max-width: 7ch; }
  .hero-sub { font-size: var(--step-lead); }
  .folders { width: 100%; margin-top: 48px; }
  .folder { height: 52px; }
  .folder-tab { height: 32px; padding: 0 20px; }
  .f-psp .folder-tab { left: auto; right: 0; }
  .f-n64 .folder-tab { left: 30%; }
  .f-gba .folder-tab { left: auto; right: 4%; }
  .f-ps1 .folder-tab { left: 0; }
  .folder-front .folder-tab { left: 30%; }
  .folder-body { padding: 20px 16px; display: block; }
  .folder-action { justify-items: stretch; }
  .folder-action .button { width: 100%; }
  .folder-shot { margin-top: 24px; }

  .stages-bar { flex-direction: column; height: auto; }
  .seg { min-height: 72px; padding: 14px 16px; }
  .seg-a, .seg-b { flex: none; }
  .seg-c { flex: none; min-height: 24svh; }
  .seg-notes { display: none; }
  .seg-text { display: block; margin-top: 6px; font-size: var(--step-body); font-weight: 400; }

  .systems-head { flex-direction: column; align-items: stretch; }
  .sorter { justify-items: stretch; text-align: left; }
  .sorter-pick { width: 100%; }
  .systems-body { display: block; margin-top: 40px; }
  .sys-tabs { position: sticky; top: 0; z-index: 2; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 0; background: var(--field); }
  .sys-tab { min-height: 52px; padding: 6px 4px; font-size: var(--step-small); text-align: center; }
  .sys-tab:hover { transform: none; }
  .sys-panels { margin-top: 12px; }
  .band { grid-template-columns: 1fr; row-gap: 4px; padding: 16px; }
  .sr-row { grid-template-columns: 1fr; }
  .sr-note { grid-column: 1; }

  .duo-plate { padding: 16px; }
  .duo-actions { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }

  .controls-field { height: 42svh; padding: 12px; }
  .screen { width: 100%; border-radius: 12px; } /* taste-skill-ignore: the device screen's own corners */
  .dpad { width: 64px; height: 64px; }
  .face { width: 34px; height: 34px; font-size: 15px; }
  .pill { font-size: 8px; padding: 3px 8px; }
  .screen-menu { width: 26px; height: 26px; }
  .pad { gap: 12px; }

  .extras { grid-template-columns: 1fr; grid-template-rows: auto; }
  .extras-right { order: 1; min-height: 46svh; padding: 24px 16px; }
  .extras-track { order: 2; }
  .extras-left { order: 3; }
  .extras-clause { font-size: var(--step-head); }
  .extras-names { grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: var(--step-small); }
  .extras-names li:nth-child(n) { text-align: left; padding: 0; }

  .faq-head { min-height: 30svh; }
  .h-faq { font-size: 12.5vw; }
  .qa { padding: 32px 20px; }

  .close-title { font-size: 12.5vw; max-width: none; }
  .close-row { flex-direction: column; align-items: stretch; }
  .close-row .button { width: 100%; }

  .footer { grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; grid-template-areas: "nav mail" "version version" "statement statement" "word word" "go go"; }
  .tile { min-height: 0; padding: 20px; }
  .tile-nav { grid-area: nav; } .tile-mail { grid-area: mail; font-size: var(--step-body); }
  .tile-version { grid-area: version; } .tile-statement { grid-area: statement; }
  .tile-word { grid-area: word; min-height: 160px; }
  .tile-go { grid-area: go; min-height: 160px; }
  .tile-word span { font-size: 30vw; }
}
