@font-face {
  font-family: "Young Serif";
  src: url("/assets/YoungSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens (tokens.json v1). Afternoon = light, Evening = dark ---------- */
:root {
  color-scheme: light dark;

  --surface-100: #fbf6ef;
  --surface-200: #f3e8e1;
  --line: #e3d3cb;
  --line-strong: #8f7684;
  --ink: #2a1a26;
  --ink-muted: #6b5563;
  --rose-500: #ce7d94;
  --rose-200: #f6dfe5;
  --rose-700: #9a4862;
  --on-rose: #2a1a26;
  --plum-900: #41133f;
  --on-plum: #fbf6ef;
  --lamp-400: #f2b36e;
  --pothos-600: #2a7442;
  --terracotta-600: #a8462a;
  --focus-ring: var(--rose-700);

  --shadow-window: 0 1px 2px rgba(42,26,38,0.10), 0 18px 44px rgba(42,26,38,0.20);
  --shadow-key: 0 1px 0 rgba(42,26,38,0.20), 0 3px 8px rgba(42,26,38,0.10);

  --font-display: "Young Serif", ui-serif, Georgia, serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-icon: 22.5%;

  /* Keycap chips are cream in both lights, like the keycap renders. */
  --key-face: var(--surface-100);
  --key-ink: var(--ink);
  --key-edge: var(--line-strong);

  --gutter: var(--space-4);
  --section-gap: var(--space-12);
  --ease-sash: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-100: #1a1119;
    --surface-200: #261a25;
    --line: #3a2938;
    --line-strong: #7d6878;
    --ink: #f6ece6;
    --ink-muted: #bba6b4;
    --rose-500: #d88aa1;
    --rose-200: #4a2340;
    --rose-700: #e8a9bb;
    --on-rose: #2a1a26;
    --plum-900: #41133f;
    --on-plum: #fbf6ef;
    --lamp-400: #f2b36e;
    --pothos-600: #6cc28a;
    --terracotta-600: #f08a66;
    --focus-ring: var(--rose-700);

    --shadow-window: 0 1px 2px rgba(0,0,0,0.50), 0 18px 44px rgba(0,0,0,0.55);
    --shadow-key: 0 1px 0 rgba(0,0,0,0.60), 0 3px 8px rgba(0,0,0,0.40);

    /* Cream key face (on-plum paper) with dark ink (on-rose), same in both themes. */
    --key-face: var(--on-plum);
    --key-ink: var(--on-rose);
    --key-edge: var(--on-plum);
  }
}

@media (min-width: 640px) {
  :root { --gutter: var(--space-8); }
}
@media (min-width: 1024px) {
  :root { --gutter: var(--space-12); --section-gap: var(--space-16); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--surface-100);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 23px;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--rose-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
strong { font-weight: 600; }
::selection { background: var(--rose-200); color: var(--ink); }
a, button { -webkit-tap-highlight-color: transparent; }

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.display-xl, .display-l, .display-m, .display-s, .wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
}
.display-xl { font-size: 64px; line-height: 68px; letter-spacing: -0.01em; }
.display-l  { font-size: 44px; line-height: 50px; letter-spacing: -0.01em; }
.display-m  { font-size: 30px; line-height: 36px; }
.display-s  { font-size: 22px; line-height: 28px; }
.display-xl, .display-l { text-wrap: balance; }

@media (max-width: 639px) {
  /* One step down the display scale on phones. */
  .display-xl { font-size: 44px; line-height: 50px; }
  .display-l  { font-size: 30px; line-height: 36px; letter-spacing: 0; }
}

.title { font-size: 17px; line-height: 22px; font-weight: 600; }
.body-s { font-size: 13px; line-height: 18px; }
.caption { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--ink-muted); }
.label {
  font-size: 11px; line-height: 14px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--rose-700);
  margin-bottom: var(--space-3);
}
.muted { color: var(--ink-muted); }
.measure { max-width: 34em; }
p { text-wrap: pretty; }
.stack > * + * { margin-top: var(--space-4); }

/* ---------- Lockup ---------- */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-s);
}
.lockup:hover { text-decoration: none; }
/* Cropped icon has a 1px clear edge around the squircle: 54/52 × 1.1em. */
.lockup img { height: 1.142em; width: auto; }

/* ---------- Buttons and keys ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: 600 15px/23px var(--font-text);
  text-decoration: none;
  border-radius: var(--radius-m);
  cursor: pointer;
}
.btn-primary {
  background: var(--rose-500);
  color: var(--on-rose);
  padding: var(--space-3) var(--space-6);
  border: 0;
  box-shadow: var(--shadow-key);
  transition: transform 150ms var(--ease-sash), box-shadow 150ms var(--ease-sash);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-key), 0 6px 16px rgba(42,26,38,0.12); text-decoration: none; }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-key); }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: var(--space-1) var(--space-3);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}
.btn-quiet:hover { background: var(--surface-200); }

.keys { display: inline-flex; align-items: center; gap: var(--space-2); vertical-align: middle; }
kbd { font-family: var(--font-text); }
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-s);
  background: var(--key-face);
  color: var(--key-ink);
  border: 1px solid var(--key-edge);
  box-shadow: var(--shadow-key);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
}
.key-on {
  background: var(--rose-500);
  color: var(--on-rose);
  border-color: var(--rose-500);
}
.key-lit {
  box-shadow: var(--shadow-key), 0 0 0 3px color-mix(in srgb, var(--lamp-400) 45%, transparent), 0 0 18px 2px color-mix(in srgb, var(--lamp-400) 55%, transparent);
}
/* One chip holding a whole shortcut, like a menu's shortcut column. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-s);
  background: var(--key-face);
  color: var(--key-ink);
  border: 1px solid var(--key-edge);
  box-shadow: var(--shadow-key);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
}

/* ---------- Header + hero ---------- */
.site-header { padding-top: var(--space-8); }
.hero {
  display: grid;
  gap: var(--space-12);
  padding-top: var(--space-12);
  padding-bottom: var(--section-gap);
  align-items: center;
}
.hero-copy h1 { margin-bottom: var(--space-6); }
.lead {
  font-size: 17px;
  line-height: 26px;
  color: var(--ink-muted);
  max-width: 28em;
}
.cta { margin-top: var(--space-8); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.hero-art img {
  width: 100%;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-window);
  background: var(--rose-500);
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); padding-top: var(--space-16); }
  .hero-art { justify-self: end; width: 100%; max-width: 520px; }
}
@media (max-width: 899px) {
  .hero-art { max-width: 520px; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-gap); }
.section-head { margin-bottom: var(--space-12); }
.section-head h2 + p { margin-top: var(--space-4); }
.split { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-16); }
  .split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .split.flip > :first-child { order: 2; }
}
.intro h2 { margin-bottom: var(--space-6); }

/* Two keys and an arrow */
.frame {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-window);
  background: var(--surface-200);
}
.rule {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}
.steps {
  margin-top: var(--space-12);
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
}
.step {
  background: var(--surface-200);
  border-radius: var(--radius-l);
  padding: var(--space-6);
}
.step .caption { display: block; margin-bottom: var(--space-4); }
.step .keys { margin-bottom: var(--space-6); }
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--ink-muted); }
.after-note { margin-top: var(--space-6); }

/* The others make room: diagram */
.room-fig figcaption { margin-top: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.room-fig figcaption p { flex: 1 1 18em; color: var(--ink-muted); }
.room { position: relative; padding: 9% 0; }
.room-arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.room-arcs path { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.room-arcs .arc-a { stroke: var(--rose-700); }
.room-arcs .arc-b { stroke: var(--ink-muted); stroke-dasharray: 2 9; }
.room-arcs .head-a { stroke: var(--rose-700); }
.room-arcs .head-b { stroke: var(--ink-muted); }
.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.screen-bar {
  position: absolute; inset: 0 0 auto 0; height: 7%;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 0 3%;
  background: var(--surface-100);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.screen-bar svg { width: 14px; height: 14px; }
.screen-bar span { width: 18px; height: 4px; border-radius: 2px; background: var(--line); }
.screen-dock {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  height: 8%; padding: 0 1.4%;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.screen-dock span { height: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--line); }
.win {
  position: absolute;
  top: 11%;
  height: 74%;
  width: 46.25%;
  display: flex;
  flex-direction: column;
  background: var(--surface-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  transition: transform 400ms var(--ease-sash);
}
.win-a { left: 2.5%; z-index: 2; }
.win-b { left: 51.25%; z-index: 1; transition-duration: 360ms; transition-delay: 40ms; }
.room.is-start .win { transition: none; }
.room.is-start .win-a { transform: translateX(105.4%); }
.room.is-start .win-b { transform: translateX(-105.4%); }
.win-bar {
  flex: 0 0 auto; height: 22px;
  display: flex; align-items: center; gap: 5px; padding: 0 9px;
  background: var(--surface-200);
  border-bottom: 1px solid var(--line);
}
.win-bar i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line-strong); }
.win-a .win-bar { background: var(--rose-500); border-bottom-color: var(--rose-500); }
.win-a .win-bar i { border-color: var(--on-rose); opacity: 0.55; }
.win-body {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
}
.win-body p { font-size: 13px; line-height: 18px; font-weight: 500; }
.win-body .keys { gap: var(--space-1); }
.win-body .key { min-width: 26px; height: 26px; padding: 0 6px; }
@media (max-width: 479px) {
  .win-body { padding: var(--space-3); }
  .win-bar { height: 16px; padding: 0 7px; gap: 4px; }
  .win-bar i { width: 5px; height: 5px; }
  .win-body .key { min-width: 22px; height: 22px; padding: 0 4px; }
  .screen-bar svg { width: 11px; height: 11px; }
  .screen-bar span { width: 12px; height: 3px; }
  .screen-dock { gap: 4px; }
}

/* More ways */
.rows { border-bottom: 1px solid var(--line); }
.row {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-6);
  border-top: 1px solid var(--line);
}
.row h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.row p { max-width: 38em; }
@media (min-width: 760px) {
  .row { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-8); }
}
.touches { margin-top: var(--space-12); }
.touches ul { display: grid; gap: var(--space-4); }
@media (min-width: 760px) {
  .touches ul { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-8); }
  .touches li { grid-column: span 2; }
  .touches li:nth-child(n+4) { grid-column: span 3; }
}
.touches li { color: var(--ink-muted); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.touches .after { margin-top: var(--space-4); }

/* Always find your way back */
.panel {
  background: var(--surface-200);
  border-radius: var(--radius-l);
  padding: var(--space-8) var(--space-6);
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: var(--space-16); gap: var(--space-16); }
}
.ways { margin-top: var(--space-8); display: grid; gap: var(--space-6); }
.ways dt { margin-bottom: var(--space-1); }
.ways dd { color: var(--ink-muted); }
.find-art {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: var(--surface-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}
.fa-bar {
  height: 32px;
  display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4);
  padding: 0 var(--space-4);
  background: var(--surface-200);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.fa-bar > span:not(.fa-glyph) { width: 22px; height: 5px; border-radius: 3px; background: var(--line); }
.fa-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 24px; border-radius: var(--radius-s);
  background: var(--rose-500);
  color: var(--on-rose);
}
.fa-glyph svg { width: 18px; height: 18px; }
.fa-pointer {
  align-self: flex-end;
  width: 30px;
  margin-right: 54px;
  margin-top: 6px;
  color: var(--rose-700);
}
.fa-pointer svg { display: block; width: 30px; height: 30px; }
.fa-bubble {
  align-self: flex-end;
  margin-top: 2px;
  margin-right: var(--space-6);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-m);
  background: var(--surface-200);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px; line-height: 18px; font-weight: 500;
}
.fa-center {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}
.fa-center p { max-width: 17em; color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.fa-dock-wrap { display: flex; justify-content: center; padding-bottom: var(--space-4); }
.fa-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--space-3));
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 2px var(--space-2);
  border-radius: var(--radius-s);
  background: var(--surface-200);
  border: 1px solid var(--line);
  font-size: 11px; line-height: 14px; font-weight: 500;
}
.fa-dock {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.fa-dock > span { width: 52px; height: 52px; border-radius: var(--radius-icon); background: var(--line); }
.fa-dock > .fa-app { position: relative; width: 72px; height: 72px; border-radius: 0; background: none; }
.fa-dock .fa-app img { width: 72px; height: 72px; }
.fa-dock .fa-app::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--ink-muted);
}

/* FAQ */
.faq-grid { display: grid; gap: var(--space-8); }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-16); align-items: start; }
  .faq-grid > div:first-child { position: sticky; top: var(--space-8); }
}
.faq { border-bottom: 1px solid var(--line); }
.faq > div { padding-block: var(--space-6); border-top: 1px solid var(--line); }
.faq dt { margin-bottom: var(--space-2); }
.faq dd { color: var(--ink-muted); max-width: 38em; }

/* Price */
.pro-tag {
  display: inline-flex; align-items: center;
  font: 600 11px/14px var(--font-text); letter-spacing: 0.02em;
  color: var(--rose-700); background: var(--rose-200);
  padding: 3px var(--space-2); border-radius: var(--radius-m);
}
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: calc(var(--space-3) - 1px) var(--space-6);
}
.btn-outline:hover { background: var(--surface-100); text-decoration: none; }
.plans { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan {
  background: var(--surface-200); border-radius: var(--radius-l);
  padding: var(--space-8) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-6);
}
@media (min-width: 900px) { .plan { padding: var(--space-12); } }
.plan-head { display: grid; gap: var(--space-2); }
.plan-price { display: flex; align-items: baseline; gap: var(--space-2); }
.plan ul { display: grid; gap: var(--space-3); flex: 1; }
.plan li { color: var(--ink-muted); padding-left: var(--space-6); position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em;
  width: 9px; height: 5px; border-left: 2px solid var(--pothos-600); border-bottom: 2px solid var(--pothos-600);
  transform: rotate(-45deg);
}
.plan .btn { align-self: flex-start; }
.plan-note { margin-top: var(--space-6); }

/* Footer */
.site-footer { padding-block: var(--space-12) var(--space-16); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line);
}
.footer-inner .lockup { font-size: 22px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); color: var(--ink-muted); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn-primary:hover { transform: none; }
  [data-replay] { display: none !important; }
}

/* ---------- Added by build.py: footer links and plain pages ---------- */
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); width: 100%; }
.footer-nav a { color: var(--ink-muted); }
.footer-nav a:hover { color: var(--ink); }
.page { padding-block: var(--space-12) var(--space-16); }
.page .prose { max-width: 38em; }
.page h1 { margin-top: var(--space-2); }
.page .legal-date { margin-top: var(--space-3); }
.page .lead-s { font-size: 19px; line-height: 28px; margin-top: var(--space-8); }
.page h2.title { margin-top: var(--space-12); margin-bottom: var(--space-3); }
.page p + p { margin-top: var(--space-4); }
.page .btn { margin-top: var(--space-8); }
.page .table-wrap { overflow-x: auto; margin-top: var(--space-6); margin-bottom: var(--space-4); }
.page table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 22px; }
.page th, .page td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3); border-top: 1px solid var(--line); }
.page table:has(thead th:nth-child(4)) { min-width: 34em; }
.page thead th { border-top: 0; color: var(--ink-muted); font-weight: 600; }
.page tbody th { font-weight: 600; }
.page .steps-list { margin-top: var(--space-4); padding-left: 1.4em; }
.page .steps-list li + li { margin-top: var(--space-2); }
.page code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }
.page:has(table) .prose { max-width: 48em; }
.page .table-hint { display: none; margin-top: var(--space-6); }
@media (max-width: 600px) {
  .page .table-hint { display: block; }
  .page .table-hint + .table-wrap { margin-top: var(--space-2); }
  .page tbody th, .page thead th:first-child { position: sticky; left: 0; background: var(--surface-100); max-width: 7.5em; }
}
