/* Clones website. The page is the plaster around the game's apartment (the hero picture's own margin colour,
   so the flat sits on the page with no frame). Ink is the game's night, links are oak, the clone's code is
   the bathroom teal. Speech bubbles are drawn like the game's: white, a pixel outline, notched corners.
   Light only (the owner, 2026-11-22). No web fonts and no scripts. */

:root {
  color-scheme: light;
  --plaster: #e6dfd2;
  --plaster-lit: #f1ece3;
  --ink: #2a2536;
  --ink-dim: #5e566a;
  --line: rgba(42, 37, 54, 0.16);
  --oak: #8c4a1e;
  --rug: #b0432d;
  --teal: #1d6e5c;
  --bubble: #fffdf8;
  --px: 3px;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font: 18px/1.55 var(--text);
  overflow-wrap: break-word;
}

a { color: var(--oak); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .skip:focus { outline: 3px solid var(--teal); outline-offset: 3px; }

em, i { font-style: normal; }
img { max-width: 100%; height: auto; }

.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 {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--bubble); padding: 8px 14px; z-index: 2;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wide { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* masthead */
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; max-width: 1100px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 21px/1 var(--round); }
.brand img { border-radius: 9px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 600; }
.nav a { color: var(--ink-dim); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* type */
h1, h2, h3 { font-family: var(--round); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(35px, 8vw, 76px); font-weight: 800; margin: 0 0 20px; }
h2 { font-size: clamp(30px, 4.6vw, 42px); font-weight: 800; margin: 0 0 16px; }
h3 { font-size: 19px; font-weight: 750; margin: 28px 0 6px; }
p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 6px; }
li::marker { color: var(--ink-dim); }
strong { font-weight: 700; }

.lede { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.45; max-width: 34em; }
.muted { color: var(--ink-dim); }
.small { font-size: 15px; }

/* speech bubbles, like the game's */
.bubble {
  margin: 0;
  background: var(--bubble);
  color: var(--ink);
  font: 750 clamp(15px, 1.7vw, 20px)/1.25 var(--round);
  padding: 0.5em 0.8em;
  box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink),
              calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink);
  position: relative;
  width: max-content;
  max-width: min(22em, 80vw);
}
.bubble::after {
  content: "";
  position: absolute;
  top: calc(100% + var(--px));
  left: var(--tail, 50%);
  width: calc(4 * var(--px));
  height: calc(3 * var(--px));
  margin-left: calc(-2 * var(--px));
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 33.3%, 75% 33.3%, 75% 66.6%, 50% 66.6%, 50% 100%, 25% 100%, 25% 33.3%, 0 33.3%);
}

/* game pictures */
.scene { position: relative; margin: 0; }
.scene img { display: block; width: 100%; image-rendering: pixelated; }
.scene .bubble { position: absolute; transform: translateX(-50%); }

/* hero: the whole flat, page-wide */
.home .wrap { max-width: 1100px; }
.hero__text { padding-top: 48px; padding-bottom: 8px; }
/* Edge to edge: the walls run off the sides of the screen, so the flat never shows a cut end. */
.scene--hero { max-width: 1920px; margin: 8px auto 0; }
.bubble--hero { left: 47.5%; bottom: calc(62% + 4 * var(--px)); }

/* how a clone is made: a real sequence */
.steps { list-style: none; counter-reset: make; margin: 24px 0 0; padding: 0; display: grid; gap: 28px; }
.steps li { counter-increment: make; margin: 0; }
.steps h3 { margin: 0 0 6px; }
/* the same pixel tiles as the escape plan's steps */
.steps h3::before {
  content: counter(make);
  display: grid; place-items: center;
  width: 36px; height: 36px;
  margin: 0 0 16px var(--px);
  background: var(--bubble); color: var(--ink);
  font: 800 16px/1 var(--round);
  box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink),
              calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink);
}
.steps p { margin: 0; color: var(--ink-dim); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
@media (max-width: 759px) {
  .steps h3 { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
  .steps h3::before { flex: none; margin: 0 0 0 var(--px); }
}
.status { color: var(--ink-dim); font-weight: 600; margin-top: 4px; }


/* chapters */
.chapter { padding-top: 72px; }
.chapter p { max-width: 36em; }
.chapter > :last-child { margin-bottom: 0; }

.chapter--split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.scene--phone {
  border: 8px solid var(--ink); border-radius: 36px; overflow: hidden;
  max-width: 440px; width: 100%; justify-self: center;
  box-shadow: 10px 10px 0 rgba(42, 37, 54, 0.12);
}
.bubble--wake { left: 49.7%; bottom: calc(70.4% + 4 * var(--px)); }

@media (min-width: 860px) {
  .chapter { padding-top: 112px; }
  .chapter--split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; }
  .chapter--flip .scene { order: 2; }
  .chapter--split .chapter__text { max-width: 560px; }
}

/* the first minutes, as a conversation */
.talk { list-style: none; margin: 28px 0 0; padding: 0 var(--px); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 24px; }
.talk li { margin: 0; }
/* tails: the clone's from the left, yours from the right */
.talk li::after {
  content: "";
  position: absolute;
  top: calc(100% + var(--px));
  width: calc(4 * var(--px));
  height: calc(3 * var(--px));
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 33.3%, 75% 33.3%, 75% 66.6%, 50% 66.6%, 50% 100%, 25% 100%, 25% 33.3%, 0 33.3%);
}
.talk__clone::after { left: 16px; }
.talk__you::after { right: 16px; }
.talk__clone, .talk__you {
  font: 750 17px/1.3 var(--round);
  padding: 0.5em 0.8em;
  width: max-content; max-width: 100%;
  position: relative;
}
.talk__clone {
  background: var(--bubble);
  box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink),
              calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink);
}
.talk__you { justify-self: end; background: var(--ink); color: var(--bubble); box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink), calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink); }
.talk__clone::before { content: "The clone: "; }
.talk__you::before { content: "You: "; }
.talk li::before { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the escape plan: a real sequence */
.plan { list-style: none; counter-reset: step; margin: 28px 0 24px; padding: 0; display: grid; gap: 10px; }
.plan li {
  counter-increment: step;
  margin: 0;
  display: flex; align-items: center; gap: 14px;
  font: 750 18px/1.25 var(--round);
}
.plan li::before {
  content: counter(step);
  flex: none;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--bubble); color: var(--ink);
  font: 800 16px/1 var(--round);
  box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink),
              calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink);
}
.plan li:last-child::before { background: var(--rug); color: var(--bubble); }

@media (min-width: 760px) {
  .plan { grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
  .plan::before {
    content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: var(--px);
    background: repeating-linear-gradient(90deg, var(--ink) 0 9px, transparent 9px 15px);
  }
  .plan li { flex-direction: column; text-align: center; gap: 12px; font-size: 16px; padding: 0 6px; position: relative; }
}

.chapter .bubble--inline { --tail: 26px; margin: 28px 0 24px var(--px); max-width: calc(100% - 2 * var(--px)); }

/* pranks and what the clone says the next time */
.pranks { margin: 24px 0 22px; display: grid; gap: 0; }
.pranks div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.pranks div:last-child { border-bottom: 1px solid var(--line); }
.pranks dt { font: 750 17px/1.35 var(--round); }
.pranks dd { margin: 0; color: var(--ink-dim); }
.pranks dd::before { content: "“"; }
.pranks dd::after { content: "”"; }

/* facts */
.facts { margin: 8px 0 0; }
.facts div { padding: 18px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font: 750 19px/1.3 var(--round); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink-dim); max-width: 38em; }
@media (min-width: 760px) {
  .facts div { display: grid; grid-template-columns: 13em 1fr; gap: 24px; }
  .facts dt { margin: 0; }
}

.home main { padding-bottom: 96px; }

/* inner pages (privacy, takedown, 404) */
main.wrap { padding-top: 40px; padding-bottom: 72px; }
.page-head { margin-bottom: 8px; }
.page-head p { margin: 0; }
main.wrap h2 { font-size: clamp(25px, 3.6vw, 30px); margin: 48px 0 12px; }

.cards { display: grid; gap: 12px; margin: 16px 0 18px; padding: 0; list-style: none; }
.card { margin: 0; padding: 18px 20px; background: var(--plaster-lit); border: 1px solid var(--line); }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.card p { margin: 0; color: var(--ink-dim); }
.card p + p { margin-top: 8px; }
.card--lamp { border: 0; box-shadow: 0 calc(-1 * var(--px)) 0 var(--oak), 0 var(--px) 0 var(--oak), calc(-1 * var(--px)) 0 0 var(--oak), var(--px) 0 0 var(--oak); background: var(--bubble); }
.card--lamp h3 { color: var(--oak); }

.quote { margin: 14px 0 18px; padding: 14px 18px; background: var(--bubble); border-left: 4px solid var(--teal); }
.quote p { margin: 0; }
.quote p + p { margin-top: 8px; }

.code { font: 700 0.95em/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.06em; color: var(--teal); }

.toc { margin: 24px 0 8px; padding: 16px 20px; background: var(--plaster-lit); border: 1px solid var(--line); }
.toc ul { margin: 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 24px; font-size: 16px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }

table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 700; }
td:first-child { width: 38%; }
td { color: var(--ink-dim); }
td:first-child { color: var(--ink); }

.lost { text-align: center; padding-top: 72px; }
.lost img { border-radius: 22px; margin-bottom: 18px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--ink-dim); }
.footer .wrap { max-width: 1100px; }
.footer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 12px; padding: 0; list-style: none; font-weight: 600; }
.footer a { color: var(--ink-dim); }
.footer a:hover, .footer a[aria-current="page"] { color: var(--ink); }
.footer p { margin: 0 0 6px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .bubble--hero { left: 56.25%; bottom: calc(59.1% + 4 * var(--px)); }
  .masthead__row { flex-wrap: wrap; gap: 10px; }
  .nav { width: 100%; }
  .nav ul { gap: 4px 18px; font-size: 15px; }
  .pranks div { grid-template-columns: 1fr; gap: 2px; }
  td:first-child { width: 42%; }
}
