/* Memy investor demo. Colours come from the desktop client's warm mapping and the
   watch demo spec; motion from the unified ladder (one curve, 120/200/300/450 ms,
   exit one step down). Paper never bounces; only the snail moves. */

@font-face {
  font-family: "New Tegomin";
  src: url("assets/NewTegomin-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ground: #f3eee3;
  --canvas: #f6f5f2;
  --surface: #fcfbf8;
  --inset: #efede8;
  --line: #ded8cf;
  --line-soft: #e9e3d8;
  --ink: #2b2620;
  --ink-2: #4f473f;
  --ink-3: #6b6258;
  --ink-4: #958b7f;
  --caramel: #a0582a;
  --caramel-ink: #9a5a24;
  --caramel-soft: #f2e4d4;
  --gel-top: #edb985;
  --gel-mid: #d88f52;
  --gel-bot: #c77a3d;
  --gel-text: #2a160a;
  --done: #4e7a3c;
  --done-soft: #e7efdf;
  --minus: #9c4a3c;
  --minus-soft: #f6e4df;
  --warn: #a06512;

  --cabin: #17182b;
  --cabin-card: #23253f;
  --cabin-dim: #1d1e34;
  --cabin-fill: #34365a;
  --cream: #f2ecdf;
  --cream-2: #dcd6e8;
  --lavender: #a9a5bd;
  --lamp: #e0a066;
  --done-dark: #8fbf7a;

  --ease: cubic-bezier(0.14, 0.04, 0.26, 1);
  --t-feedback: 120ms;
  --t-rise: 200ms;
  --t-sheet: 300ms;
  --t-stage: 450ms;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-display: "New Tegomin", "Iowan Old Style", Georgia, serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-round: "SF Pro Rounded", ui-rounded, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-snap-type: y proximity;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--ground) url("assets/paper.webp") repeat;
  background-size: 720px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; }

/* ───────────── frame: wordmark, chapter rail, key hint ───────────── */

.brand {
  position: fixed;
  top: 20px;
  left: 28px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t-sheet) var(--ease);
}
.brand img { width: 30px; height: auto; }
body.is-night .brand { color: var(--cream); }

.rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 22px;
  color: var(--ink-3);
  text-decoration: none;
  font-size: 12px;
}
.rail a span {
  opacity: 0;
  transform: translateX(4px);
  transition: opacity var(--t-rise) var(--ease), transform var(--t-rise) var(--ease);
  white-space: nowrap;
}
.rail:hover a span { opacity: 1; transform: none; }
.rail a i {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  transition: background var(--t-feedback) var(--ease), height var(--t-sheet) var(--ease);
}
.rail a.current i { background: var(--caramel); height: 18px; }
.rail a.current { color: var(--ink); }
body.is-night .rail a { color: var(--lavender); }
body.is-night .rail a i { background: var(--cabin-fill); }
body.is-night .rail a.current i { background: var(--lamp); }
body.is-night .rail a.current { color: var(--cream); }

.keys {
  position: fixed;
  left: 28px;
  bottom: 20px;
  z-index: 40;
  font-size: 12px;
  color: var(--ink-4);
  display: flex;
  gap: 14px;
}
.keys kbd {
  font-family: var(--font-ui);
  font-size: 11px;
  border: 0.5px solid var(--line);
  border-bottom-width: 1.5px;
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 4px;
  color: var(--ink-3);
  background: var(--surface);
}
body.is-night .keys { color: var(--lavender); }
body.is-night .keys kbd { background: var(--cabin-card); border-color: var(--cabin-fill); color: var(--cream-2); }

/* ───────────── stages ───────────── */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(290px, 26%) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 72px 64px 64px 72px;
}
.stage.night {
  background: var(--cabin);
  color: var(--cream);
}

.copy { max-width: 420px; }
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--caramel-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.eyebrow .time {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink);
}
.night .eyebrow { color: var(--lamp); }
.night .eyebrow .time { color: var(--cream); }

.copy h2 {
  margin: 14px 0 0;
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.copy p {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}
.night .copy p { color: var(--cream-2); }

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.proof li {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.proof li.planned {
  background: transparent;
  border: 1px dashed var(--ink-4);
  color: var(--ink-3);
}
.night .proof li { background: var(--cabin-card); border-color: var(--cabin-fill); color: var(--cream-2); }

.replay {
  margin-top: 26px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--t-feedback) var(--ease);
}
.replay:hover { color: var(--caramel-ink); }
.replay svg { width: 14px; height: 14px; }
.night .replay { color: var(--lavender); }
.night .replay:hover { color: var(--lamp); }

/* A scene is drawn at a fixed size and scaled to fit, so every device keeps its
   real proportions on a projector and on a phone. */
.fit { position: relative; width: 100%; }
.fit > .canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* ───────────── animation roles ───────────── */

.rise { opacity: 0; transform: translateY(6px); transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease); }
.rise.on { opacity: 1; transform: none; transition-duration: var(--t-rise); }

.rise-lg { opacity: 0; transform: translateY(14px); transition: opacity var(--t-sheet) var(--ease), transform var(--t-sheet) var(--ease); }
.rise-lg.on { opacity: 1; transform: none; transition-duration: var(--t-stage); }

.fade { opacity: 0; transition: opacity var(--t-feedback) var(--ease); }
.fade.on { opacity: 1; transition-duration: var(--t-rise); }

.drop { opacity: 0; transform: translateY(-10px); transition: opacity var(--t-rise) var(--ease), transform var(--t-rise) var(--ease); }
.drop.on { opacity: 1; transform: none; transition-duration: var(--t-sheet); }

.emerge {
  opacity: 0;
  transform: translateY(-44px) scale(0.9);
  transform-origin: 50% 0;
  transition: opacity var(--t-sheet) var(--ease), transform var(--t-sheet) var(--ease);
}
.emerge.on { opacity: 1; transform: none; transition-duration: var(--t-stage); }

/* Height that opens without a jump: grid rows from 0fr to 1fr. */
.unfold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-sheet) var(--ease); }
.unfold > * { overflow: hidden; min-height: 0; }
.unfold.on { grid-template-rows: 1fr; }

.stage.resetting *, .stage.resetting *::before, .stage.resetting *::after { transition: none !important; }

/* ───────────── hero ───────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  padding-top: 96px;
}
.hero .lead { max-width: 960px; position: relative; }
.hero .lead .peek {
  position: absolute;
  width: 88px;
  top: -58px;
  left: 50%;
  margin-left: -44px;
}
.hero .eyebrow { justify-content: center; }
.hero h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero .sub {
  margin: 18px auto 0;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--ink-2);
  line-height: 1.6;
}
.hero .fit { max-width: 1160px; margin-top: 44px; }

.hub-tile {
  position: absolute;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 560;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.06);
}
.hub-tile .mono {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--inset);
  color: var(--ink-2);
}
.hub-tile small { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.hub-group {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--caramel-ink);
}
.hub-core {
  position: absolute;
  left: 400px;
  top: 172px;
  width: 300px;
  height: 116px;
  border-radius: 22px;
  background: var(--surface) url("assets/paper.webp");
  background-size: 360px;
  border: 0.5px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(70, 44, 20, 0.35), 0 1px 0 #fff inset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.hub-core img { width: 70px; }
.hub-core b { font-family: var(--font-display); font-weight: 400; font-size: 40px; display: block; line-height: 1; }
.hub-core span { font-size: 14px; color: var(--ink-3); }
.hub-lines path {
  fill: none;
  stroke: #cdbfac;
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 900ms var(--ease);
}
.hub-lines.on path { stroke-dashoffset: 0; }
.hub-dot {
  fill: var(--caramel);
  opacity: 0;
}
.hub-lines.on ~ .hub-dots .hub-dot { opacity: 0.85; }

/* ───────────── cast ───────────── */

.cast { grid-template-columns: minmax(300px, 30%) minmax(0, 1fr); }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.person {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-items: center;
}
.avatar {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 16px;
  color: #fff;
}
.person b { font-size: 16px; font-weight: 620; }
.person span { font-size: 13px; color: var(--ink-3); }
.person.machine { border-style: dashed; border-color: var(--ink-4); background: transparent; }
.spaces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.space-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--caramel-soft);
  color: var(--caramel-ink);
  font-weight: 560;
}
.space-chip i { width: 7px; height: 7px; border-radius: 2px; background: currentColor; opacity: 0.7; }

.av-robin { background: #8a6a4a; }
.av-alex { background: #5f6f86; }
.av-mei { background: #9a6f73; }
.av-jordan { background: #6f7f5f; }
.av-sam { background: #8d8478; }
.av-bot { background: var(--cabin); }

/* ───────────── macOS: MacBook screen and windows ───────────── */

.win {
  position: absolute;
  border-radius: 17px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.22), 0 18px 40px rgba(0, 0, 0, 0.4);
}
.win.app { border-radius: 17px; }
.lights { display: flex; gap: 9px; }
.lights i { width: 14px; height: 14px; border-radius: 7px; background: #ff5f57; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15) inset; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.term { background: #1e1e1e; color: #e8e3da; }
.term .bar {
  height: 32px;
  background: #2d2c2b;
  display: flex;
  align-items: center;
  padding: 0 9px;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #c9c5bf;
  border-bottom: 0.5px solid #111;
}
.term .bar .lights { margin-right: 6px; }
.term .bar .folder { width: 15px; height: 12px; flex: none; }
.term .bar .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term pre {
  margin: 0;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.term .ln { display: block; min-height: 1.62em; }
.term .dim { color: #8f8a82; }
.term .bul { color: #e8e3da; }
.term .lamp { color: var(--lamp); }
.term .ok { color: #9fcf86; }
.term .minus { background: rgba(196, 90, 70, 0.22); color: #f0b6a8; }
.term .plus { background: rgba(120, 180, 100, 0.2); color: #bfe3a8; }
.term .prompt-box {
  display: block;
  margin: 6px 0;
  padding: 8px 12px;
  border: 1px solid #6a5e50;
  color: #e8e3da;
}
.term .choice-on { color: #1e1e1e; background: var(--lamp); padding: 0 6px; }
.term .choice { padding: 0 6px; color: #b9b3aa; }
.caret::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  background: #e8e3da;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* The recall card: a slip of watercolour paper with a clean native outline. */
.recall {
  position: absolute;
  z-index: 25;
  width: 620px;
  left: 50%;
  margin-left: -310px;
  top: 34px;
  padding: 14px 18px 14px;
  border-radius: 18px;
  background: #fbf7ef url("assets/paper.webp");
  background-size: 420px;
  box-shadow: 0 0 0 0.5px rgba(80, 56, 30, 0.22), 0 18px 40px -8px rgba(40, 24, 8, 0.38);
  color: var(--ink);
}
.recall .snail {
  position: absolute;
  width: 74px;
  left: 28px;
  top: -44px;
  pointer-events: none;
}
.recall .snail.wiggle { animation: antenna 1.6s var(--ease) 1; transform-origin: 50% 100%; }
@keyframes antenna { 0%, 100% { transform: none; } 20% { transform: rotate(-2.5deg); } 40% { transform: rotate(1.5deg); } 60% { transform: rotate(-1deg); } }
.recall .head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.recall .body { margin-top: 6px; font-size: 16.5px; line-height: 1.5; }
.recall code, .mem code, .doc code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--caramel-ink);
  background: rgba(160, 88, 42, 0.09);
  padding: 0 3px;
  border-radius: 4px;
}
.recall .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recall.open .clamp { -webkit-line-clamp: unset; }
.recall .meta { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.recall .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-3);
}
.gel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 650;
  color: var(--gel-text);
  background: linear-gradient(180deg, var(--gel-top), var(--gel-mid) 55%, var(--gel-bot));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 -1px 0 rgba(90, 40, 10, 0.25) inset, 0 1px 2px rgba(90, 40, 10, 0.25);
  transition: filter var(--t-feedback) var(--ease);
}
.gel.pressed { filter: brightness(0.86); }

/* App windows on paper (⌘⇧4 style captures). */
.app .titlebar {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  border-bottom: 0.5px solid var(--line-soft);
  background: var(--surface);
}
.app.paper { background: #f8f4ec url("assets/paper.webp"); background-size: 720px; }
.app.paper .titlebar { background: transparent; border-bottom: 0; }

.sidebar {
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 226px;
  padding: 50px 10px 12px;
  border-radius: 12px;
  background: rgba(235, 228, 216, 0.72);
  box-shadow: 0 0 0 0.5px rgba(80, 56, 30, 0.12);
  font-size: 13.5px;
}
.sidebar .lights { position: absolute; top: 14px; left: 14px; }
.sidebar .grp { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin: 16px 8px 4px; }
.sidebar .item { padding: 6px 8px; border-radius: 7px; color: var(--ink); display: flex; justify-content: space-between; }
.sidebar .item.sel { background: rgba(255, 255, 255, 0.78); font-weight: 600; }
.sidebar .item small { color: var(--ink-3); }
.sidebar .foot { position: absolute; bottom: 14px; left: 18px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.sidebar .foot img { width: 22px; }

/* ───────────── chapter 2: documents ───────────── */

.doc {
  position: absolute;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 8px 22px -10px rgba(40, 24, 8, 0.3);
  padding: 30px 30px;
  font-family: "Iowan Old Style", "Times New Roman", "Songti SC", serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: #2a2a2a;
}
.doc h4 { margin: 0; font-family: var(--font-ui); font-size: 17px; font-weight: 700; color: #1d1d1f; }
.doc .sm { font-family: var(--font-ui); font-size: 11.5px; color: #77716a; margin: 4px 0 14px; }
.doc p { margin: 0 0 10px; }
.doc mark {
  background: linear-gradient(transparent 0, transparent 100%);
  color: inherit;
  padding: 1px 2px;
  border-radius: 3px;
  transition: background-color var(--t-sheet) var(--ease);
}
.doc mark.on { background-color: rgba(224, 160, 102, 0.34); }
.doc .pg { position: absolute; right: 18px; bottom: 12px; font-family: var(--font-ui); font-size: 11px; color: #9a948c; }

.file {
  position: absolute;
  z-index: 10;
  width: 92px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
  transition: transform var(--t-stage) var(--ease), opacity var(--t-rise) var(--ease);
}
.file .sheet {
  width: 64px;
  height: 80px;
  margin: 0 auto 6px;
  border-radius: 4px 14px 4px 4px;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.16), 0 10px 18px -8px rgba(40, 24, 8, 0.4);
  display: grid;
  place-items: end center;
  padding-bottom: 10px;
  font-size: 10px;
  font-weight: 800;
  color: #3e6aa8;
  letter-spacing: 0.04em;
}
.dropzone {
  position: absolute;
  border: 1.5px dashed var(--caramel);
  border-radius: 14px;
  background: rgba(242, 228, 212, 0.55);
  display: grid;
  place-items: center;
  color: var(--caramel-ink);
  font-size: 14px;
  font-weight: 600;
}

.mem {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 2px 10px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
}
.mem .ic { width: 18px; height: 18px; color: var(--caramel-ink); margin-top: 1px; }
.mem .tx { font-size: 15.5px; line-height: 1.45; }
.mem .mt { grid-column: 2; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  border-radius: 5px;
  padding: 1px 6px;
}
.tag.decision { background: var(--caramel-soft); color: var(--caramel-ink); }
.tag.todo { background: var(--done-soft); color: var(--done); }
.evidence {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--caramel-ink);
}
.evidence svg { width: 12px; height: 12px; }

/* ───────────── chapter 3: mail + assistant ───────────── */

.mail .titlebar { gap: 16px; }
.mail .titlebar .tool { width: 20px; height: 20px; color: var(--ink-3); }
.field { display: flex; gap: 10px; padding: 10px 22px; border-bottom: 0.5px solid var(--line-soft); font-size: 13.5px; }
.field span { color: var(--ink-3); width: 58px; }
.mail-body { padding: 18px 22px; font-size: 14.5px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; }
.cite {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--caramel-ink);
  background: var(--caramel-soft);
  border-radius: 6px;
  padding: 2px 8px;
  margin-top: 6px;
}
.cite svg { width: 12px; height: 12px; }
.assist {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  border-left: 0.5px solid var(--line-soft);
  background: var(--canvas);
  display: flex;
  flex-direction: column;
}
.assist .hd { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 0.5px solid var(--line-soft); font-size: 13.5px; font-weight: 620; }
.assist .hd small { font-weight: 400; color: var(--ink-3); }
.assist .log { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 88%; font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border-radius: 14px; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--surface); border-bottom-right-radius: 5px; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 0.5px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.ai.blocked { background: var(--inset); }
.lockline { display: flex; gap: 6px; align-items: center; color: var(--ink-2); font-weight: 600; }
.lockline svg { width: 14px; height: 14px; }

.toast {
  position: absolute;
  width: 380px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(252, 251, 248, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 0.5px rgba(80, 56, 30, 0.2), 0 14px 30px -10px rgba(40, 24, 8, 0.35);
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 2px 10px;
  font-size: 13px;
}
.toast img { width: 30px; grid-row: span 2; }
.toast b { font-weight: 650; }
.toast span { color: var(--ink-2); }

/* ───────────── chapter 4: Safari + admin ───────────── */

.safari .tb {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 0.5px solid #e5e5e5;
}
.cap {
  height: 36px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  background: #f4f4f4;
  color: #555;
}
.cap svg { width: 17px; height: 17px; }
.addr {
  position: absolute;
  left: 50%;
  width: 366px;
  margin-left: -183px;
  height: 36px;
  border-radius: 18px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  color: #1d1d1f;
}
.addr svg { width: 14px; height: 14px; color: #666; }
.safari .tb .end { margin-left: auto; display: flex; gap: 10px; }

.admin { position: absolute; inset: 52px 0 0 0; display: grid; grid-template-columns: 196px 1fr; background: var(--canvas); }
.admin nav { border-right: 0.5px solid var(--line); padding: 16px 10px; font-size: 13.5px; background: var(--inset); }
.admin nav .org { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.admin nav .org i {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-style: normal; font-weight: 700; color: #fff; background: #4f6f78; font-size: 14px;
}
.admin nav .org b { display: block; font-size: 13.5px; }
.admin nav .org small { color: var(--ink-3); font-size: 11.5px; }
.admin nav .item { padding: 7px 8px; border-radius: 7px; }
.admin nav .item.sel { background: var(--surface); font-weight: 620; box-shadow: 0 0 0 0.5px var(--line); }
.admin main { padding: 18px 22px; overflow: hidden; }
.admin h3 { margin: 0; font-size: 21px; font-weight: 680; }
.deploy {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 0.5px solid var(--line);
  font-size: 12.5px;
}
.deploy .okdot { width: 8px; height: 8px; border-radius: 4px; background: var(--done); }
.deploy b { font-weight: 650; margin-right: 6px; }
.deploy .pill { padding: 2px 8px; border-radius: 999px; background: var(--inset); color: var(--ink-2); }
.deploy .pill.ok { background: var(--done-soft); color: var(--done); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--surface); border: 0.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat small { font-size: 11.5px; color: var(--ink-3); }
.stat b { display: block; font-family: var(--font-round); font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 250px; gap: 12px; margin-top: 12px; }
.panel { background: var(--surface); border: 0.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel .ph { padding: 10px 12px; font-size: 13px; font-weight: 650; border-bottom: 0.5px solid var(--line); display: flex; justify-content: space-between; }
.panel .ph small { font-weight: 400; color: var(--ink-3); }
table.matrix { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.matrix th { font-weight: 600; color: var(--ink-3); font-size: 11.5px; text-align: left; padding: 7px 8px; border-bottom: 0.5px solid var(--line); }
.matrix td { padding: 6px 8px; border-bottom: 0.5px solid var(--line-soft); vertical-align: middle; }
.matrix tr:last-child td { border-bottom: 0; }
.who { display: flex; gap: 8px; align-items: center; }
.who .avatar { width: 26px; height: 26px; font-size: 11px; grid-row: auto; }
.who b { font-weight: 600; display: block; font-size: 12.5px; }
.who small { color: var(--ink-3); font-size: 11px; }
.perm { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--inset); color: var(--ink-2); transition: background-color var(--t-feedback) var(--ease), color var(--t-feedback) var(--ease); }
.perm.rw { background: var(--caramel-soft); color: var(--caramel-ink); font-weight: 600; }
.perm.none { background: none; color: var(--ink-4); }
.perm.revoked { background: var(--minus-soft); color: var(--minus); text-decoration: line-through; }
.perm.hot { box-shadow: 0 0 0 2px var(--caramel); }
.expiry { white-space: nowrap; font-size: 10.5px; color: var(--warn); background: rgba(160, 101, 18, 0.1); padding: 0 5px; border-radius: 4px; margin-left: 4px; }
.audit .row { display: grid; grid-template-columns: 22px 1fr; gap: 0 8px; padding: 8px 12px; border-bottom: 0.5px solid var(--line-soft); font-size: 12px; line-height: 1.4; }
.audit .row:last-child { border-bottom: 0; }
.audit .row svg { width: 16px; height: 16px; color: var(--ink-3); margin-top: 1px; }
.audit .row b { font-weight: 650; }
.audit .row time { color: var(--ink-3); float: right; font-variant-numeric: tabular-nums; }
.audit .row span { color: var(--ink-2); }
.cursor {
  position: absolute;
  z-index: 50;
  width: 18px;
  height: 22px;
  transition: transform 900ms var(--ease), opacity var(--t-rise) var(--ease);
  pointer-events: none;
}

/* ───────────── iPhone ───────────── */

.iphone .status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 34px 0 46px;
  font-size: 17px;
  font-weight: 640;
  z-index: 6;
  background: linear-gradient(var(--canvas) 70%, rgba(246, 245, 242, 0));
}
.iphone .status .sys { display: flex; gap: 6px; align-items: center; }
.iphone .status svg { height: 13px; }
.island {
  position: absolute;
  top: 11px;
  left: 50%;
  height: 37px;
  width: 126px;
  margin-left: -63px;
  border-radius: 19px;
  background: #000;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 8px;
  color: var(--lamp);
  font-weight: 700;
  font-size: 15px;
  transition: width var(--t-sheet) var(--ease), margin-left var(--t-sheet) var(--ease);
}
.island.on { width: 188px; margin-left: -94px; }
.island img { width: 30px; opacity: 0; transition: opacity var(--t-rise) var(--ease); }
.island .n { opacity: 0; font-variant-numeric: tabular-nums; transition: opacity var(--t-rise) var(--ease); }
.island.on img, .island.on .n { opacity: 1; }

.reader { position: absolute; inset: 0; padding: 70px 22px 0; transition: transform 6s linear; }
.reader.on { transform: translateY(-70px); }
.reader .kicker { font-size: 13px; font-weight: 700; color: var(--caramel-ink); letter-spacing: 0.05em; }
.reader h5 { margin: 6px 0 12px; font-family: "Iowan Old Style", Georgia, "Songti SC", serif; font-size: 30px; line-height: 1.15; font-weight: 600; }
.reader .pic { height: 210px; border-radius: 16px; background: linear-gradient(160deg, #c9d4cf, #9fb2ae 45%, #7d8f9b); margin-bottom: 14px; position: relative; overflow: hidden; }
.reader .pic::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -30px; height: 120px; border-radius: 50%; background: #6c7f74; }
.reader p { font-family: "Iowan Old Style", Georgia, serif; font-size: 17px; line-height: 1.55; color: #3a3631; margin: 0 0 12px; }

.ios-note {
  position: absolute;
  z-index: 9;
  left: 12px;
  right: 12px;
  top: 58px;
  padding: 13px 14px;
  border-radius: 24px;
  background: rgba(250, 247, 241, 0.86);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.7) inset, 0 10px 30px -6px rgba(40, 24, 8, 0.35);
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 1px 10px;
  font-size: 15px;
}
.ios-note .ic { grid-row: span 3; width: 38px; height: 38px; border-radius: 9px; background: #f3eee3 url("assets/paper.webp"); background-size: 120px; display: grid; place-items: center; }
.ios-note .ic img { width: 32px; }
.ios-note .top { display: flex; justify-content: space-between; font-weight: 650; }
.ios-note .top small { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.ios-note .t { font-family: var(--font-display); font-size: 19px; }
.ios-note .b { color: var(--ink-2); font-size: 14px; }

/* ───────────── Apple Watch ───────────── */

.wscreen {
  position: absolute;
  inset: 0;
  padding: 16px 14px;
  opacity: 0;
  transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease);
  transform: translateY(6px);
}
.wscreen.on { opacity: 1; transform: none; transition-duration: var(--t-rise); }
.wscreen .clock { text-align: right; font-size: 15px; font-weight: 640; color: var(--cream); }
.wscreen .clock.lampy { display: flex; justify-content: space-between; }
.wscreen .clock.lampy span { color: var(--lamp); }
.wface .time { font-family: var(--font-round); font-size: 64px; font-weight: 600; letter-spacing: -0.02em; text-align: center; line-height: 1; margin-top: 10px; color: var(--cream); }
.wface .inline { text-align: center; font-size: 13px; color: var(--lamp); font-weight: 600; }
.wface .comps { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
.ring { position: relative; width: 62px; height: 62px; }
.ring svg { position: absolute; inset: 0; }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-round); font-weight: 700; font-size: 20px; color: var(--cream); }
.ring .c small { font-size: 11px; color: var(--lavender); font-weight: 600; }
.ring .lbl { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 9px; font-weight: 700; color: var(--lavender); }
.seg { transition: stroke var(--t-sheet) var(--ease); }
.wcard { margin-top: 8px; border-radius: 18px; background: var(--cabin-card); padding: 12px; }
.wcard .ey { font-size: 11px; font-weight: 700; color: var(--lamp); letter-spacing: 0.06em; }
.wcard .cmd { margin-top: 6px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.4; color: var(--cream); }
.wcard .pj { margin-top: 6px; font-size: 12px; color: var(--lavender); }
.wbtn {
  margin-top: 8px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 650;
}
.wbtn.gel { width: 100%; padding: 0; font-size: 15px; }
.wbtn.sec { background: #2a2a30; color: var(--cream); }
.wbtn svg { width: 18px; height: 18px; }
.wrec { text-align: center; padding-top: 30px; }
.wrec img { width: 92px; margin: 0 auto; }
.wrec .big { font-family: var(--font-display); font-size: 22px; margin-top: 12px; }
.wrec .s { font-size: 13px; color: var(--lavender); margin-top: 4px; }
.wmac { padding-top: 10px; }
.wmac img { width: 58px; margin: 6px auto 0; }
.wmac .t { text-align: center; font-size: 15px; line-height: 1.35; margin-top: 8px; }

.tap-waves { position: absolute; pointer-events: none; }
.tap-waves i {
  position: absolute;
  inset: 0;
  border-radius: 74px;
  border: 1.5px solid var(--caramel);
  opacity: 0;
}
.tap-waves.on i { animation: wave 900ms var(--ease) 1 both; }
.tap-waves.on i:nth-child(2) { animation-delay: 160ms; }
@keyframes wave { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.14); } }

.pinch {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--line);
  box-shadow: 0 8px 18px -10px rgba(40, 24, 8, 0.35);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.pinch .fingers { position: relative; width: 34px; height: 20px; }
.pinch .fingers i { position: absolute; top: 3px; width: 14px; height: 14px; border-radius: 7px; background: var(--caramel); }
.pinch .fingers i:first-child { left: 0; opacity: 0.55; }
.pinch .fingers i:last-child { right: 0; }
.pinch.on .fingers i:first-child { animation: pinchL 1000ms var(--ease) 1 both; }
.pinch.on .fingers i:last-child { animation: pinchR 1000ms var(--ease) 1 both; }
@keyframes pinchL { 0%, 50%, 100% { transform: none; } 22%, 72% { transform: translateX(9px); } }
@keyframes pinchR { 0%, 50%, 100% { transform: none; } 22%, 72% { transform: translateX(-9px); } }

.flight path { fill: none; stroke: var(--caramel); stroke-width: 1.5; stroke-dasharray: 2 6; opacity: 0.55; }
.flyer {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 6px;
  background: var(--caramel);
  box-shadow: 0 0 0 5px rgba(160, 88, 42, 0.18);
  offset-distance: 0%;
  opacity: 0;
  transition: offset-distance 700ms var(--ease), opacity var(--t-feedback) var(--ease);
}
.flyer.on { offset-distance: 100%; opacity: 1; }

.device-label { position: absolute; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.04em; }

/* ───────────── chapter 6: night ───────────── */

.night .term { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.5); }
.idcard {
  position: absolute;
  border-radius: 22px;
  background: var(--cabin-card);
  padding: 18px;
  color: var(--cream);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5);
}
.idcard .ey { font-size: 11.5px; font-weight: 700; color: var(--lamp); letter-spacing: 0.07em; }
.idcard .nm { font-family: var(--font-display); font-size: 24px; margin-top: 6px; }
.idcard dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.idcard dt { color: var(--lavender); }
.idcard dd { margin: 0; text-align: right; }
.idcard .count { font-family: var(--font-mono); color: var(--lamp); font-variant-numeric: tabular-nums; }
.idcard img { width: 120px; margin: 16px auto 0; opacity: 0.95; }

/* ───────────── chapter 7: next morning ───────────── */

.mini {
  position: absolute;
  width: 330px;
  height: 356px;
  border-radius: 14px;
  overflow: visible;
}
.mini .who-line { display: flex; gap: 8px; align-items: center; padding: 10px 14px; font-size: 12.5px; color: #c9c5bf; }
.mini .who-line .avatar { width: 22px; height: 22px; font-size: 10px; grid-row: auto; }
.mini.light .who-line { color: var(--ink-2); }
.kept {
  position: absolute;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-2);
}
.kept b { font-family: var(--font-round); font-size: 44px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.kept .plus { color: var(--done); font-weight: 650; }

/* ───────────── ecosystem cards ───────────── */

.eco {
  display: block;
  padding: 96px 0 72px;
  overflow: hidden;
}
.eco .copy { max-width: 760px; margin: 0 auto; text-align: center; padding: 0 24px; }
.eco .copy h2 { font-size: clamp(30px, 3.4vw, 48px); }
.eco .eyebrow { justify-content: center; }
.viewport { margin-top: 48px; overflow: hidden; }
.track {
  display: flex;
  gap: 24px;
  padding: 24px 80px 36px;
  width: max-content;
  will-change: transform;
}
.card {
  width: 360px;
  flex: none;
  outline: none;
}
.collage {
  position: relative;
  height: calc(300px * var(--k, 1));
  border-radius: 26px;
  overflow: hidden;
  background: var(--surface);
  border: 0.5px solid var(--line);
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.05);
  transition: box-shadow var(--t-sheet) var(--ease), border-color var(--t-sheet) var(--ease);
}
.card.planned .collage { background: transparent; border: 1.5px dashed var(--ink-4); }
.card.live .collage { box-shadow: 0 24px 44px -24px rgba(60, 36, 14, 0.4); border-color: #d2c8ba; }
.cam {
  position: absolute;
  left: 0;
  top: 0;
  width: 360px;
  height: 300px;
  transform-origin: 0 0;
  transform: scale(var(--k, 1));
  transition: transform var(--t-stage) var(--ease);
}
.card.live .cam { transform: scale(calc(var(--k, 1) * 1.04)) translate(-1.923%, -1.923%); }
.layer {
  position: absolute;
  transform: translate(calc(var(--px, 0) * var(--d, 0) * 1px), calc(var(--py, 0) * var(--d, 0) * 1px));
  transition: transform var(--t-stage) var(--ease);
}
.pop {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease);
}
.card.live .pop {
  opacity: 1;
  transform: none;
  transition-duration: var(--t-rise);
  transition-delay: calc(var(--i, 0) * 70ms + 120ms);
}
.card h3 { margin: 18px 4px 0; font-size: 20px; font-weight: 660; display: flex; align-items: center; gap: 10px; }
.card h3 small { font-size: 12.5px; font-weight: 600; color: var(--caramel-ink); background: var(--caramel-soft); border-radius: 999px; padding: 2px 9px; }
.card.planned h3 small { background: none; border: 1px dashed var(--ink-4); color: var(--ink-3); }
.card p { margin: 8px 4px 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* Collage parts: small, crisp, real-looking fragments. */
.frag { background: var(--surface); border-radius: 14px; box-shadow: 0 0 0 0.5px rgba(80, 56, 30, 0.18), 0 10px 22px -10px rgba(40, 24, 8, 0.3); overflow: hidden; }
.frag.paper { background: #fbf7ef url("assets/paper.webp"); background-size: 320px; }
.frag .fh { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 0.5px solid var(--line-soft); font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.frag .fh .lights i { width: 7px; height: 7px; }
.frag .fh .lights { gap: 4px; margin-right: 4px; }
.frag .row { padding: 7px 10px; border-bottom: 0.5px solid var(--line-soft); font-size: 11.5px; line-height: 1.35; }
.frag .row small { display: block; color: var(--ink-3); font-size: 10px; margin-top: 2px; }
.mini-phone { width: 104px; height: 214px; border-radius: 22px; background: #1a1a1c; padding: 4px; box-shadow: 0 0 0 1px #8f8a84, 0 14px 24px -12px rgba(40, 24, 8, 0.45); }
.mini-phone .s { width: 100%; height: 100%; border-radius: 18px; background: var(--canvas); overflow: hidden; padding: 22px 7px 0; position: relative; }
.mini-phone .s::before { content: ""; position: absolute; top: 5px; left: 50%; width: 32px; height: 10px; margin-left: -16px; border-radius: 5px; background: #000; }
.mini-watch { width: 86px; height: 102px; border-radius: 26px; background: linear-gradient(145deg, #4a4846, #222120); padding: 6px; box-shadow: 0 12px 20px -10px rgba(40, 24, 8, 0.5); }
.mini-watch .s { width: 100%; height: 100%; border-radius: 20px; background: #000; color: var(--cream); display: grid; place-items: center; text-align: center; font-size: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: 0 0 0 0.5px var(--line), 0 6px 14px -8px rgba(40, 24, 8, 0.35);
  white-space: nowrap;
}
.chip.car { background: var(--caramel-soft); color: var(--caramel-ink); box-shadow: 0 6px 14px -8px rgba(40, 24, 8, 0.35); }
.chip.ok { background: var(--done-soft); color: var(--done); }
.server {
  width: 150px;
  border-radius: 12px;
  background: linear-gradient(180deg, #3a3836, #232220);
  padding: 10px;
  display: grid;
  gap: 6px;
  box-shadow: 0 16px 26px -14px rgba(40, 24, 8, 0.55);
}
.server i { display: flex; align-items: center; gap: 6px; height: 18px; border-radius: 4px; background: #2d2c2a; padding: 0 6px; }
.server i::before { content: ""; width: 5px; height: 5px; border-radius: 3px; background: var(--done-dark); }
.server i::after { content: ""; flex: 1; height: 2px; background: #45423e; border-radius: 1px; }

/* ───────────── closing ───────────── */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.closing img { width: 140px; }
.closing h2 {
  margin: 20px 0 0;
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.closing .wm { margin-top: 28px; font-family: var(--font-display); font-size: 28px; }
.closing .wm span { font-family: var(--font-ui); font-size: 15px; color: var(--ink-3); margin-left: 12px; }

/* ───────────── narrow screens ───────────── */

@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 84px 16px 48px;
    align-content: center;
  }
  .copy { max-width: none; }
  .hero h1 { font-size: 28px; }
  .hero .sub { font-size: 15px; }
  .hero .fit { margin-top: 28px; }
  .copy p { font-size: 16px; }
  .rail, .keys { display: none; }
  .brand { top: 16px; left: 16px; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .person { padding: 12px; grid-template-columns: 36px 1fr; gap: 2px 10px; }
  .person .avatar { width: 36px; height: 36px; font-size: 14px; }
  .person b { font-size: 14.5px; }
  .viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .viewport::-webkit-scrollbar { display: none; }
  .track { padding: 16px 16px 28px; transform: none !important; }
  .card { width: min(320px, 82vw); scroll-snap-align: center; }
  .eco { padding: 72px 0 48px; }
}

.file-move { transition: transform var(--t-stage) var(--ease); }
.file-move.on { transform: translate(300px, -330px) scale(0.92); }
.cursor.on { transform: translate(var(--tx, 0), var(--ty, 0)); }
.pb1.resolved { opacity: 0.45; transition: opacity var(--t-rise) var(--ease); }

/* agent marks from Magpie (see assets/agents/LICENSE.magpie) */
.agent-ico { width: 18px; height: 18px; flex: none; display: inline-block; }
.agent-ico.mono { background: var(--ink); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.hub-tile { font-size: 13.5px; gap: 7px; padding: 0 8px; white-space: nowrap; }
.hub-tile.planned { background: transparent; border: 1px dashed var(--ink-4); color: var(--ink-3); box-shadow: none; }
.hub-legend { position: absolute; display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.hub-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hub-legend i { width: 18px; height: 12px; border-radius: 4px; background: var(--surface); border: 0.5px solid var(--line); }
.hub-legend i.dash { background: transparent; border: 1px dashed var(--ink-4); }
.hub-core { left: 400px; top: 196px; }

/* ───────────── the receipt the notch prints (mirrors ReceiptCapsule.swift) ───────────── */

@font-face {
  font-family: "Chill Bitmap";
  src: url("assets/ChillBitmap_7px.ttf") format("truetype");
  font-display: swap;
}
.printer-wrap {
  position: absolute;
  z-index: 25;
  width: 185px;
  transform-origin: 50% 0;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.2)) drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.12));
}
.printer { position: relative; height: 0; overflow: hidden; transform-origin: 50% 0; }
.slip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 0 11px;
  color: rgba(35, 32, 28, 0.9);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.06), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.05)),
    #f9f8f4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% calc(100% - 3.5px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent 0deg, #000 1deg 89deg, transparent 90deg) bottom / 7px 3.5px repeat-x;
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - 3.5px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent 0deg, #000 1deg 89deg, transparent 90deg) bottom / 7px 3.5px repeat-x;
}
.slip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/paper.webp") 0 0 / 360px;
  mix-blend-mode: multiply;
  opacity: 0.1;
  pointer-events: none;
}
.slip > * { position: relative; }
.printer .shade {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 9px;
  background: linear-gradient(rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.slip .top { display: none; }
.slip.expanded .top { display: block; }
.slip.expanded .foot-head { display: none; }
.slip .only-expanded { display: none; }
.slip.expanded .only-expanded { display: block; }
.slip.expanded span.only-expanded { display: inline; }
.r-head { padding-top: 12px; }
.r-head .l { display: flex; align-items: center; gap: 6px; }
.r-head img { width: 20px; opacity: 0.95; }
.dots { font-family: "Chill Bitmap", ui-monospace, monospace; letter-spacing: 2.5px; }
.r-head .dots { font-size: 12px; }
.r-head time { margin-left: auto; font-size: 10px; color: rgba(35, 32, 28, 0.56); }
.r-head .proj { font-size: 10px; color: rgba(35, 32, 28, 0.56); margin-top: 2px; }
.perf { height: 1px; margin: 8px 0; background: repeating-linear-gradient(90deg, rgba(35, 32, 28, 0.4) 0 3px, transparent 3px 5.5px); }
.dbl { height: 3px; margin: 8px 0; border-top: 0.75px solid rgba(35, 32, 28, 0.4); border-bottom: 0.75px solid rgba(35, 32, 28, 0.4); }
.r-item { display: flex; gap: 5px; font-size: 12px; line-height: 1.45; padding-bottom: 6px; }
.r-item b { color: rgba(35, 32, 28, 0.56); }
.r-item.faded { color: rgba(35, 32, 28, 0.56); }
.slip code { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; }
.r-sum { font-size: 12.5px; font-weight: 500; line-height: 1.45; }
.r-tot b { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
.r-tot span { display: block; font-size: 12px; font-weight: 500; margin-top: 3px; }
.r-tot small { display: block; font-size: 10.5px; color: rgba(35, 32, 28, 0.56); margin-top: 3px; }
.r-foot { display: flex; justify-content: space-between; font-size: 8px; color: rgba(35, 32, 28, 0.56); padding-bottom: 15.5px; }
.r-foot .dots { letter-spacing: 2px; }
.r-foot .open { letter-spacing: 0.5px; }

.editor { background: #fcfbf8; }
.editor .bar { height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); border-bottom: 0.5px solid var(--line-soft); }
.editor pre { margin: 0; padding: 12px 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: #2f2a24; }
.editor .row { display: block; padding: 0 12px; white-space: pre; }
.editor .row i { font-style: normal; color: #b0a796; display: inline-block; width: 26px; }
.editor .kw { color: #8a4a8a; }
.editor .fn { color: #3a6a9a; }
.editor .st { color: #9a5a24; }
.editor .row.changed { background: rgba(120, 170, 95, 0.16); }
.swap .new { display: none; }
.swap.on .old { display: none; }
.swap.on .new { display: inline; }
.with-ai { display: inline-flex; align-items: center; gap: 4px; }
.with-ai .agent-ico { margin-left: 2px; }
.who-line .agent-ico { margin-left: 2px; }
.chip .agent-ico { margin-right: 1px; }
.slot { position: absolute; z-index: 26; width: 217px; height: 8px; border-radius: 4px; background: #0b0b0c; }
.r-tot b.solo { font-size: 13px; }
.mini .who-line { position: relative; }
.mini-receipt {
  width: 190px;
  padding: 0 10px 14px;
  color: rgba(35, 32, 28, 0.9);
  background: #f9f8f4;
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, 0.28);
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% calc(100% - 3.5px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent 0deg, #000 1deg 89deg, transparent 90deg) bottom / 7px 3.5px repeat-x;
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - 3.5px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent 0deg, #000 1deg 89deg, transparent 90deg) bottom / 7px 3.5px repeat-x;
}
.mini-receipt .r-head time { font-size: 9px; }
.layer:has(> .mini-receipt) { filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.2)); }

/* ───────────── Safari 27 toolbar ───────────── */
.safari .tb { padding: 0 12px 0 19px; }
.safari .tb .lights { margin-right: 4px; }
.addr { justify-content: flex-start; padding: 0 12px; gap: 8px; }
.addr span { flex: 1; text-align: center; }
.addr .reader-ico { width: 15px; height: 15px; color: #777; }

/* ───────────── iPhone 18 Pro, 6.3": 402×874 pt screen, about 16 pt to the body edge ───────────── */
.iphone {
  position: absolute;
  width: 434px;
  height: 906px;
  border-radius: 78px;
  padding: 4px;
  transform-origin: 0 0;
  /* Glacier aluminium unibody: a lit rim, darker toward the edges */
  background: linear-gradient(135deg, #e7ebee 0%, #b9c0c6 22%, #eef1f3 48%, #a9b0b7 76%, #dde2e6 100%);
  box-shadow:
    0 0 0 0.5px rgba(60, 64, 70, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 40px 60px -36px rgba(40, 32, 24, 0.45);
}
.iphone .glass {
  width: 100%;
  height: 100%;
  border-radius: 74px;
  padding: 12px;
  background: #050506;
  box-shadow: inset 0 0 0 1px #2a2b2e;
}
.iphone .scr {
  position: relative;
  width: 402px;
  height: 874px;
  border-radius: 62px;
  overflow: hidden;
  background: var(--canvas);
}
.iphone .btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #9aa1a8, #d9dee2); }
.iphone .btn.action { left: -3px; top: 168px; height: 34px; }
.iphone .btn.vol-up { left: -3px; top: 236px; height: 62px; }
.iphone .btn.vol-down { left: -3px; top: 312px; height: 62px; }
.iphone .btn.side { right: -3px; top: 262px; height: 96px; background: linear-gradient(270deg, #9aa1a8, #d9dee2); }
.iphone .btn.camctl { right: -2px; top: 560px; height: 58px; width: 3px; background: #c6ccd1; }
.iphone .status { height: 56px; padding: 18px 32px 0 52px; font-size: 17px; align-items: flex-start; }
.iphone .status .sys { margin-top: 2px; }
.island { top: 12px; width: 124px; height: 36px; margin-left: -62px; border-radius: 18px; padding: 0 12px 0 6px; }
.island.on { width: 196px; margin-left: -98px; }
.island img { width: 28px; }
.home-ind { position: absolute; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: rgba(0, 0, 0, 0.82); z-index: 9; }
.reader { padding-top: 72px; }

/* ───────────── Apple Watch Series 12, 46 mm: 208×248 pt display in a 40×46 mm case ───────────── */
.watch {
  position: absolute;
  width: 262px;
  height: 302px;
  border-radius: 82px;
  padding: 9px;
  /* Space Gray aluminium */
  background: linear-gradient(140deg, #8a8d91 0%, #4e5155 30%, #6c6f73 55%, #3c3e41 80%, #74777b 100%);
  box-shadow: 0 0 0 0.5px rgba(20, 20, 22, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 30px 44px -26px rgba(30, 24, 16, 0.55);
}
.watch .glass {
  width: 100%;
  height: 100%;
  border-radius: 74px;
  padding: 18px;
  background: radial-gradient(120% 90% at 30% 0%, #1b1c1f 0%, #050506 55%);
  box-shadow: inset 0 0 0 1px #2c2d30;
}
.watch .dsp {
  position: relative;
  width: 208px;
  height: 248px;
  border-radius: 54px;
  overflow: hidden;
  background: #000;
  color: var(--cream);
}
.watch .crown {
  position: absolute;
  right: -15px;
  top: 64px;
  width: 17px;
  height: 46px;
  border-radius: 5px;
  background: repeating-linear-gradient(180deg, #7d8085 0 2px, #55585c 2px 3.5px);
  box-shadow: inset -2px 0 2px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.5);
}
.watch .crown::after { content: ""; position: absolute; right: 0; top: 16px; width: 4px; height: 14px; border-radius: 2px; background: #c4503c; opacity: 0; }
.watch .sidebtn { position: absolute; right: -4px; top: 134px; width: 6px; height: 74px; border-radius: 3px; background: linear-gradient(90deg, #3e4044, #6a6d71); }
.band {
  position: absolute;
  width: 180px;
  height: 110px;
  border-radius: 34px 34px 0 0;
  background: linear-gradient(90deg, #b9ab98, #d6cab9 40%, #cbbfae 70%, #a99c8a);
  -webkit-mask: linear-gradient(to top, #000 45%, transparent);
  mask: linear-gradient(to top, #000 45%, transparent);
}
.band.bottom { border-radius: 0 0 34px 34px; -webkit-mask: linear-gradient(to bottom, #000 45%, transparent); mask: linear-gradient(to bottom, #000 45%, transparent); }
.tap-waves i { border-radius: 84px; }
.wscreen { padding: 14px 14px; }
.wface .time { font-size: 60px; }
.wcard .cmd { font-size: 12px; white-space: nowrap; }

/* ───────────── tokens: a two-bar magnitude comparison, one series, labelled directly ───────────── */
.tk-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 1000px;
  padding: 26px 30px 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 0.5px solid var(--line);
}
.tk-title { font-size: 15px; font-weight: 650; color: var(--ink); }
.tk-title small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.tk-row { display: grid; grid-template-columns: 90px 1fr 64px; align-items: center; gap: 14px; margin-top: 22px; }
.tk-name { font-size: 15px; color: var(--ink-2); }
.tk-track { height: 30px; position: relative; }
.tk-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 30px;
  width: 0;
  border-radius: 0 4px 4px 0;
  transition: width var(--t-stage) var(--ease);
}
.tk-bar.full { background: #b9b0a4; }
.tk-bar.memy { background: var(--caramel); }
.tk-bar.full.on { width: 100%; }
.tk-bar.memy.on { width: calc(100% * 1.54 / 12.2); }
.tk-val { font-family: var(--font-round); font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tk-note { margin: 18px 0 0 104px; font-size: 14px; color: var(--ink-2); }
.tk-stats { position: absolute; left: 0; top: 262px; width: 1000px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tk-stat { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 0.5px solid var(--line); }
.tk-stat b { display: block; font-family: var(--font-round); font-size: 40px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; color: var(--ink); }
.tk-stat span { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; }
.tk-stat small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.tk-src { position: absolute; left: 0; top: 452px; width: 1000px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.tk-row { grid-template-columns: 90px 1fr; padding-right: 70px; }
.tk-val { position: absolute; top: 50%; margin-top: -14px; line-height: 28px; }
.band {
  width: 156px;
  height: 118px;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.35) 0 2.5px, transparent 3px) 0 0 / 100% 22px repeat-y,
    linear-gradient(90deg, #26272a, #3d3f43 30%, #34363a 70%, #232427);
}
.band.bottom { background: linear-gradient(90deg, #26272a, #3d3f43 30%, #34363a 70%, #232427); }
.wrec .big { font-size: 19px; white-space: nowrap; }
.ios-note { grid-template-columns: 38px 1fr; padding: 12px 14px; font-size: 15px; }
.ios-note .t { font-family: var(--font-ui); font-size: 15px; font-weight: 600; }
.ios-note .b { font-size: 15px; color: var(--ink-2); }
.ios-note .top { font-size: 15px; }
.island.on { width: 180px; margin-left: -90px; }

/* ───────────── MacBook Pro 14": 1512×982 pt display, 186×32 pt notch at x 663 ───────────── */
.mac-cam { position: absolute; inset: 0; transform-origin: 795px 20px; transition: transform 800ms var(--ease); }
.mac-cam.on { transform: scale(1.6); }
.fit.clip { overflow: hidden; }
.mbp14 { position: absolute; left: 0; top: 0; width: 1590px; }
.mbp14 .lid {
  position: relative;
  margin: 0 19px;
  padding: 20px 20px 25px;
  border-radius: 30px 30px 12px 12px;
  background: #0a0a0b;
  /* Space Black aluminium rim */
  box-shadow: 0 0 0 3px #2f3033, 0 0 0 3.5px rgba(0, 0, 0, 0.6), inset 0 0 0 1px #1c1c1e;
}
.mbp14 .screen { position: relative; width: 1512px; height: 982px; overflow: hidden; border-radius: 10px 10px 0 0; }
.mbp14 .wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 78% 18%, rgba(240, 200, 160, 0.85), transparent 60%),
    radial-gradient(80% 60% at 12% 85%, rgba(150, 160, 190, 0.8), transparent 65%),
    radial-gradient(60% 50% at 55% 70%, rgba(220, 170, 140, 0.55), transparent 70%),
    linear-gradient(170deg, #efe3d2, #d8cbbf 55%, #b9b6c8);
}
.mbp14 .notch { position: absolute; z-index: 30; left: 663px; top: 0; width: 186px; height: 32px; background: #0a0a0b; border-radius: 0 0 9px 9px; }
.mbp14 .menubar {
  position: relative;
  z-index: 20;
  height: 33px;
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 0 18px 0 20px;
  font-size: 13px;
  color: #1d1d1f;
  background: none;
}
.mbp14 .menubar b { font-weight: 700; }
.mbp14 .menubar .apple { width: 14px; height: 17px; margin: -2px 2px 0 0; }
.mbp14 .menubar .right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.mbp14 .menubar .right svg { width: 17px; height: 13px; }
.mbp14 .menubar .right .mb-batt { width: 25px; height: 12px; }
.mbp14 .menubar .right .mb-cc { width: 16px; height: 16px; }
.mbp14 .menubar .mb-snail { width: 19px; opacity: 0.85; }
.mbp14 .term pre { font-size: 13px; }
.mbp14 .printer-wrap { width: 186px; }
.mbp14 .base {
  position: relative;
  height: 22px;
  margin-top: -2px;
  border-radius: 2px 2px 18px 18px / 2px 2px 14px 14px;
  background: linear-gradient(#5a5b5f 0, #3a3b3e 3px, #2a2b2d 60%, #1c1d1f);
}
.mbp14 .base i { position: absolute; left: 50%; top: 0; width: 168px; height: 7px; margin-left: -84px; border-radius: 0 0 9px 9px; background: linear-gradient(#1d1e20, #2c2d30); }
/* the memory server: a small aluminium box, drawn like the other fragments */
.box {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 26px;
  background: linear-gradient(150deg, #f4f4f2, #d9d8d4 55%, #c9c7c2);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(0, 0, 0, 0.08), 0 14px 24px -12px rgba(40, 24, 8, 0.45), 0 0 0 0.5px rgba(80, 70, 60, 0.3);
}
.box .logo { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; opacity: 0.35; }
.box .logo img { width: 34px; }
.box .led { position: absolute; left: 50%; bottom: 12px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 3px; background: var(--done-dark); box-shadow: 0 0 6px var(--done-dark); }
.dash-ui { background: #17182b; color: var(--cream); }
.dash-ui .du-h { padding: 8px 10px 4px; font-size: 10.5px; font-weight: 700; color: var(--lamp); letter-spacing: 0.04em; }
.dash-ui .du-b { padding: 0 10px 10px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.dash-ui .du-b span { font-size: 10.5px; font-weight: 400; color: var(--lavender); }

.hub-core > div { display: flex; flex-direction: column; gap: 8px; }
.hub-core span { letter-spacing: 0.08em; }

/* Dynamic Island, compact Live Activity: leading and trailing views snug
   against the camera (HIG: 52.33×36.67 pt each on a 393 pt screen) */
.island { display: grid; grid-template-columns: 0 1fr 0; padding: 0; width: 125px; height: 37px; margin-left: -62.5px; top: 11px; border-radius: 19px;
  transition: width var(--t-sheet) var(--ease), margin-left var(--t-sheet) var(--ease), grid-template-columns var(--t-sheet) var(--ease); }
.island.on { width: 230px; margin-left: -115px; grid-template-columns: 52px 1fr 52px; }
.island .lead, .island .trail { display: flex; align-items: center; overflow: hidden; }
.island .lead { justify-content: flex-end; padding-right: 2px; }
.island .trail { justify-content: flex-start; padding-left: 2px; }
.island .lead img { width: 30px; }
.island .n { font-size: 15px; font-weight: 600; color: var(--lamp); }
/* status bar items centred in the ears either side of the island */
.iphone .status { padding: 0; height: 59px; align-items: stretch; }
.iphone .status > span:first-child { width: 86px; display: flex; align-items: center; justify-content: center; padding: 0 0 2px 10px; font-family: -apple-system, "SF Pro Text", sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.iphone .status .sys { width: 86px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px 2px 0; }
.iphone .status .sys svg:nth-child(1) { width: 17px; }
.iphone .status .sys svg:nth-child(2) { width: 16px; }
.iphone .status .sys svg:nth-child(3) { width: 26px; }
.hub-dot.live { fill: var(--caramel); opacity: 0; }

/* the wordmark sits on frosted glass so it never reads over a heading */
.brand {
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  padding: 0 28px;
  background: rgba(243, 238, 227, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0.5px 0 rgba(80, 60, 40, 0.12);
  transition: background-color var(--t-sheet) var(--ease), color var(--t-sheet) var(--ease);
}
body.is-night .brand { background: rgba(23, 24, 43, 0.6); box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.08); }
@media (max-width: 900px) {
  .brand { height: 52px; padding: 0 16px; top: 0; left: 0; }
}
.fit.clip { border-radius: 20px; }
/* a projector at 1280×720: the hero still fits on one screen */
@media (min-width: 901px) and (max-height: 820px) {
  .hero { padding-top: 70px; padding-bottom: 24px; }
  .hero h1 { font-size: clamp(30px, 6.2vh, 52px); margin-top: 10px; }
  .hero .sub { margin-top: 10px; font-size: 16px; }
  .hero .fit { margin-top: 20px; }
}
