/* Timeslice product page.
 *
 * The page IS the demo: one simulated Mac that lives a scripted day as you scroll, built from the same
 * colours, spacing and copy as the real app. Nothing here is a screenshot or a video. */

:root {
  --bg: #0b0b0d;
  --ink: #f5f5f7;
  --ink-2: rgba(245, 245, 247, 0.62);
  --ink-3: rgba(245, 245, 247, 0.38);
  --line: rgba(255, 255, 255, 0.09);

  /* The app's own surfaces. */
  --win: #2c2c2e;
  --card: #1c1c1e;
  --card-2: #242426;
  --chip: rgba(255, 255, 255, 0.08);

  --blue: #0a84ff;
  --purple: #bf5af2;
  --orange: #ff9f0a;
  --teal: #64d2ff;
  --green: #30d158;
  --red: #ff453a;

  --radius: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; height: 1.7em; padding: 0 0.42em;
  font: 600 0.78em var(--sans);
  color: var(--ink);
  background: linear-gradient(#3a3a3c, #2c2c2e);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-width: 2px;
  border-radius: 6px;
  vertical-align: 0.08em;
}
kbd.down { background: var(--blue); border-color: #5aa9ff; transform: translateY(1px); }

/* ---------- top nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.nav .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.nav .brand img { width: 26px; height: 26px; }
.nav .badge {
  font: 600 11px var(--mono); color: var(--green);
  border: 1px solid rgba(48, 209, 88, 0.4); border-radius: 999px; padding: 2px 8px;
}
.nav .spacer { flex: 1; }
.nav a.link { color: var(--ink-2); }
.nav a.link:hover { color: var(--ink); text-decoration: none; }
.nav .cta {
  color: #000; background: var(--ink); padding: 6px 14px; border-radius: 999px; font-weight: 600;
}
.nav .cta:hover { text-decoration: none; opacity: 0.88; }

/* ---------- hero ---------- */
.hero {
  min-height: 88vh;
  display: grid; place-items: center;
  padding: 110px clamp(16px, 5vw, 64px) 20px;
  text-align: center;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(10, 132, 255, 0.22), transparent 70%),
    radial-gradient(700px 420px at 85% 30%, rgba(191, 90, 242, 0.16), transparent 70%);
}
.hero .icon { width: 108px; height: 108px; filter: drop-shadow(0 18px 40px rgba(10, 132, 255, 0.35)); }
.hero h1 {
  font: 700 clamp(48px, 9vw, 104px)/1 var(--display);
  letter-spacing: -0.035em;
  margin: 18px 0 14px;
  background: linear-gradient(180deg, #fff, #b8b8c0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(19px, 2.4vw, 26px); color: var(--ink-2); max-width: 760px; margin: 0 auto; }
.hero .lede b { color: var(--ink); font-weight: 600; }
.hero .meta { margin-top: 26px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pill {
  font-size: 13px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  background: rgba(255, 255, 255, 0.03);
}
.hero .scroll-hint { margin-top: 44px; color: var(--ink-3); font-size: 14px; }
.hero .scroll-hint span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- the story ---------- */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: clamp(20px, 3vw, 48px);
  padding: 0 clamp(16px, 4vw, 48px);
  max-width: 1480px; margin: 0 auto;
}
.stage-wrap { position: sticky; top: 76px; height: calc(100vh - 96px); display: grid; place-items: center; }
.chapters { padding: 20vh 0 30vh; }
.chapter {
  min-height: 78vh;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0.28; transition: opacity 0.45s ease;
}
.chapter.active { opacity: 1; }
.chapter .when { font: 600 13px var(--mono); color: var(--teal); letter-spacing: 0.04em; }
.chapter h2 { font: 700 clamp(26px, 2.8vw, 38px)/1.12 var(--display); letter-spacing: -0.02em; margin: 8px 0 14px; }
.chapter p { color: var(--ink-2); margin: 0 0 12px; }
.chapter p b { color: var(--ink); font-weight: 600; }
.chapter .keys { margin: 14px 0 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--ink-3); font-size: 14px; }
.chapter .control {
  margin-top: 14px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; color: var(--ink-2);
}
.chapter .control label { display: flex; justify-content: space-between; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.chapter input[type=range] { width: 100%; accent-color: var(--purple); }
.chapter .control .readout { display: flex; gap: 18px; margin-top: 10px; font-family: var(--mono); font-size: 13px; }
.chapter .control .readout b { color: var(--purple); font-size: 20px; }
.chapter button.toggle {
  font: 600 13px var(--sans); color: var(--ink); cursor: pointer;
  background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; margin-right: 6px;
}
.chapter button.toggle.on { background: var(--blue); border-color: transparent; }

/* ---------- the simulated Mac ---------- */
/* The stage is laid out at ONE design size and scaled to fit (see `fitStage` in the script), so every
 * pixel value inside it holds at any width instead of the menu bar wrapping on a phone. */
.stage-fit { width: 100%; max-width: 1040px; position: relative; }
.screen {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  width: 1040px; height: 650px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 10%, #3b2a6b 0%, transparent 55%),
    radial-gradient(120% 90% at 90% 90%, #0f4c75 0%, transparent 60%),
    linear-gradient(135deg, #1d1b3a, #0d1f33);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 120px rgba(0, 0, 0, 0.6);
  font-size: 12px;
}
.screen .dim {
  position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none;
  transition: opacity 1.2s ease; z-index: 40;
}
.screen.asleep .dim { opacity: 0.86; }

.menubar {
  position: absolute; inset: 0 0 auto 0; height: 26px; z-index: 30;
  display: flex; align-items: center; gap: 16px; padding: 0 12px;
  background: rgba(30, 30, 40, 0.42);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 12.5px; color: #fff;
}
.menubar .apple { font-size: 14px; }
.menubar .app { font-weight: 700; }
.menubar .muted { color: rgba(255, 255, 255, 0.82); }
.menubar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.ts-item {
  display: flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 5px;
  font-variant-numeric: tabular-nums; transition: background 0.3s ease;
}
.ts-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.ts-item.paused { background: rgba(255, 159, 10, 0.9); color: #000; }
.ts-item.idle .dot { background: rgba(255, 255, 255, 0.45); }
.ts-item.paused .dot { background: #000; }
.ts-item.flash { animation: flash 0.9s ease; }
@keyframes flash { 30% { background: rgba(10, 132, 255, 0.85); } }

/* background "work" window: the thing you never have to leave */
.editor {
  position: absolute; left: 4%; top: 9%; width: 62%; height: 78%;
  background: #1e1e1e; border-radius: 10px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden; transition: filter 0.4s ease, transform 0.6s ease;
}
.editor .chrome { height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #2a2a2a; }
.editor .chrome i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.editor .chrome .title { margin-left: 10px; color: rgba(255, 255, 255, 0.45); font-size: 11px; }
.editor pre {
  margin: 0; padding: 14px 16px; font: 11px/1.7 var(--mono); color: #9cdcfe; white-space: pre;
}
.editor pre .k { color: #c586c0; } .editor pre .s { color: #ce9178; } .editor pre .c { color: #6a9955; }
.editor pre .f { color: #dcdcaa; } .editor pre .t { color: #4ec9b0; }
.screen.focus-app .editor { filter: brightness(0.55) blur(1px); transform: scale(0.985); }

/* the Timeslice main window */
.tswin {
  position: absolute; right: 3%; top: 8%; width: 58%; height: 86%;
  background: var(--win); border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden; z-index: 10;
  opacity: 0; transform: translateY(18px) scale(0.98); transition: opacity 0.5s ease, transform 0.5s ease;
  display: flex; flex-direction: column;
}
.tswin.show { opacity: 1; transform: none; }
.tswin .chrome {
  height: 30px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border-bottom: 1px solid var(--line); font-weight: 600; color: rgba(255,255,255,0.8);
}
.tswin .chrome i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.tswin .chrome span { margin-left: 8px; }
.tswin .tabs { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex: none; }
.tswin .tabs b {
  font-weight: 600; font-size: 11px; color: rgba(255,255,255,0.7); padding: 3px 10px; border-radius: 6px;
}
.tswin .tabs b.on { background: rgba(255,255,255,0.1); color: #fff; }
.tswin .body { padding: 10px; overflow: hidden; flex: 1; display: flex; flex-direction: column; gap: 9px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.tile { background: var(--card); border-radius: 9px; padding: 8px 10px; }
.tile .lab { font-size: 10px; color: rgba(255,255,255,0.7); }
.tile .val { font: 600 19px/1.25 var(--display); font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 9.5px; color: var(--ink-3); }
.tile .bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.6s ease; }

.section-title { font: 700 11.5px var(--sans); margin: 2px 0 0; }
.timeline { background: var(--card); border-radius: 9px; padding: 8px 10px 6px; }
.lanes { position: relative; }
.lane { position: relative; height: 20px; margin: 3px 0 3px 46px; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.lane .who { position: absolute; left: -46px; top: 3px; font-size: 9px; color: var(--ink-3); width: 42px; text-align: right; }
.lane .seg { position: absolute; top: 2px; height: 16px; border-radius: 3px; transition: width 0.25s linear; }
.lane .seg.run { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.65); }
.hours { position: relative; margin-left: 46px; height: 12px; font-size: 8.5px; color: var(--ink-3); }
.hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.nowline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--red); z-index: 2; }

.went { background: var(--card); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.went .row { display: grid; grid-template-columns: 90px 1fr 46px; align-items: center; gap: 8px; font-size: 10.5px; }
.went .row .nm { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.went .row .nm i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.went .row .track { height: 9px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.went .row .track i { display: block; height: 100%; border-radius: 5px; transition: width 0.6s ease; }
.went .row .t { text-align: right; font-family: var(--mono); color: var(--ink-2); font-size: 10px; }

.alloc { background: var(--card); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.alloc .row { display: grid; grid-template-columns: 96px 46px 1fr 38px; align-items: center; gap: 8px; font-size: 10.5px; }
.alloc .row .per { color: var(--ink-3); font-size: 9.5px; }
.alloc .row .track { position: relative; height: 13px; background: rgba(255,255,255,0.07); border-radius: 7px; overflow: hidden; }
.alloc .row .track i { display: block; height: 100%; border-radius: 7px; transition: width 0.6s ease; }
.alloc .row .track b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 8.5px var(--mono); color: #fff; text-shadow: 0 0 3px rgba(0,0,0,0.85), 0 0 1px #000;
}
.alloc .row .track u { position: absolute; top: -1px; bottom: -1px; width: 2px; background: #fff; opacity: 0.8; }
.alloc .row .goal { font-family: var(--mono); color: var(--ink-3); font-size: 10px; text-align: right; }

/* ---------- overlays ---------- */
.palette {
  position: absolute; left: 50%; top: 24%; width: 46%; z-index: 25;
  transform: translate(-50%, -8px) scale(0.97); opacity: 0; pointer-events: none;
  background: rgba(14, 14, 16, 0.94); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6); transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}
.palette.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.palette .q { display: flex; align-items: center; gap: 8px; padding: 11px 13px; font-size: 15px; border-bottom: 1px solid var(--line); }
.palette .q .glass { opacity: 0.5; }
.palette .q .caret { display: inline-block; width: 1.5px; height: 1.05em; background: var(--blue); vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.palette .q .ph { color: var(--ink-3); }
.palette .rows { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.palette .r { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 7px; font-size: 12.5px; }
.palette .r.sel { background: rgba(10, 132, 255, 0.86); }
.palette .r i { width: 7px; height: 7px; border-radius: 50%; }
.palette .r .grp { font-size: 10px; padding: 1px 6px; border-radius: 99px; background: var(--chip); color: var(--ink-2); }
.palette .r .tm { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.palette .r.create i { background: none; color: var(--green); width: auto; height: auto; font-style: normal; font-weight: 700; }
.palette .dest { display: flex; gap: 5px; padding: 4px 13px 8px; }
.palette .dest span { font-size: 10px; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--ink-2); }
.palette .dest span.on { background: rgba(10, 132, 255, 0.8); color: #fff; }
.palette .foot { display: flex; gap: 12px; padding: 7px 13px; border-top: 1px solid var(--line); font-size: 10px; color: var(--ink-3); }

.hud {
  position: absolute; left: 50%; top: 50%; z-index: 26;
  transform: translate(-50%, -50%) scale(0.94); opacity: 0; pointer-events: none;
  display: flex; gap: 10px; padding: 14px; border-radius: 18px;
  background: rgba(20, 20, 24, 0.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hud.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hud .card {
  width: 92px; padding: 10px 8px; border-radius: 12px; text-align: center; font-size: 11px;
  color: rgba(255,255,255,0.7); transition: background 0.15s ease, transform 0.15s ease;
}
.hud .card i { display: block; width: 36px; height: 36px; border-radius: 10px; margin: 0 auto 7px; }
.hud .card.sel { background: rgba(255,255,255,0.14); color: #fff; transform: scale(1.06); }
.hud .card.run i { box-shadow: 0 0 0 2px #fff; }

.prompt {
  position: absolute; z-index: 41; width: 38%; padding: 14px 16px; border-radius: 14px;
  background: rgba(10, 10, 12, 0.92); border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease, transform 0.35s ease;
}
.prompt.center { left: 31%; top: 34%; transform: scale(0.96); }
.prompt.corner { right: 2%; top: 9%; width: 36%; transform: translateY(-10px); }
.prompt.show { opacity: 1; transform: none; }
.prompt h4 { margin: 0 0 5px; font-size: 13.5px; }
.prompt p { margin: 0 0 12px; font-size: 11.5px; color: var(--ink-2); }
.prompt .btns { display: flex; gap: 6px; justify-content: flex-end; }
.prompt .btns span { font-size: 11px; padding: 4px 11px; border-radius: 7px; background: var(--chip); }
.prompt .btns span.primary { background: var(--blue); }
.prompt .btns span.pressed { outline: 2px solid #fff; outline-offset: 1px; }

.toast {
  position: absolute; right: 2%; top: 9%; z-index: 27; width: 34%;
  padding: 10px 12px; border-radius: 12px; font-size: 11px;
  background: rgba(30, 30, 34, 0.92); border: 1px solid rgba(255,255,255,0.1);
  opacity: 0; transform: translateY(-8px); transition: all 0.35s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast b { display: block; font-size: 12px; margin-bottom: 2px; }
.toast span { color: var(--ink-2); }

/* ---------- the iPhone ---------- */
.phone {
  position: absolute; left: 6%; bottom: -4%; width: 21%; aspect-ratio: 9 / 19.2; z-index: 28;
  border-radius: 13% / 6%; background: #000; padding: 1.1%;
  box-shadow: 0 0 0 1.5px #3a3a3c, 0 30px 80px rgba(0,0,0,0.7);
  opacity: 0; transform: translateY(40px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.phone.show { opacity: 1; transform: none; }
.phone .scr {
  position: relative; height: 100%; border-radius: 11% / 5%; overflow: hidden;
  background: linear-gradient(180deg, #101014, #17171c);
  padding: 22% 7% 0; font-size: 7.5px;
}
.phone .island {
  position: absolute; left: 50%; top: 2.2%; transform: translateX(-50%);
  width: 34%; height: 4.2%; border-radius: 99px; background: #000;
  display: flex; align-items: center; justify-content: space-between; padding: 0 6%;
  transition: width 0.5s cubic-bezier(.2,.9,.2,1); overflow: hidden;
  font-size: 7px; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap;
}
.phone .island.live { width: 82%; }
.phone .island .l { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.3s ease 0.2s; }
.phone .island .l i { width: 6px; height: 6px; border-radius: 50%; }
.phone .island .r { opacity: 0; transition: opacity 0.3s ease 0.2s; color: var(--green); font-family: var(--mono); }
.phone .island.live .l, .phone .island.live .r { opacity: 1; }
.phone h5 { margin: 0 0 6px; font-size: 11px; }
.phone .prow {
  display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 6px;
  background: rgba(255,255,255,0.06); margin-bottom: 4px;
}
.phone .prow i { width: 5px; height: 5px; border-radius: 50%; }
.phone .prow small { color: var(--ink-3); font-size: 6px; display: block; }
.phone .prow .t { margin-left: auto; font-family: var(--mono); font-size: 6.5px; color: var(--ink-2); }
.phone .prow.run { background: rgba(48, 209, 88, 0.16); box-shadow: inset 0 0 0 1px rgba(48,209,88,0.4); }
.phone .prow.run .t { color: var(--green); }

/* ---------- try it ---------- */
.tryit {
  max-width: 1180px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px) 60px;
}
.tryit h2, .under h2, .install h2 {
  font: 700 clamp(30px, 4vw, 52px)/1.08 var(--display); letter-spacing: -0.025em; margin: 0 0 12px;
}
.tryit .intro, .under .intro { color: var(--ink-2); max-width: 720px; margin: 0 0 30px; }
.play {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px;
  background: var(--win); border-radius: 16px; padding: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 30px 90px rgba(0,0,0,0.55);
}
.play .mb {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px;
  padding: 6px 10px; border-radius: 9px; background: rgba(0,0,0,0.35); font-size: 13px;
}
.play .mb .ts-item { font-size: 13px; }
.play .mb .speed { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: 12px; }
.play .mb .speed button, .play .mini button {
  font: 600 12px var(--sans); color: var(--ink); background: var(--chip); border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 9px; cursor: pointer;
}
.play .mb .speed button.on { background: var(--blue); border-color: transparent; }
.play .list { display: flex; flex-direction: column; gap: 5px; }
.play .task {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  background: var(--card); cursor: pointer; user-select: none; font-size: 14px;
  border: 1px solid transparent; transition: border-color 0.15s ease, background 0.15s ease;
}
.play .task:hover { border-color: rgba(255,255,255,0.12); }
.play .task.run { background: rgba(48, 209, 88, 0.1); border-color: rgba(48, 209, 88, 0.45); }
.play .task i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.play .task .ago { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.play .task .t { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; min-width: 64px; text-align: right; }
.play .task.run .t { color: var(--green); }
.play .task .btn {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 132, 255, 0.18); color: var(--blue); font-size: 11px;
}
.play .task.run .btn { background: rgba(48, 209, 88, 0.2); color: var(--green); }
.play .add { display: flex; gap: 6px; margin-top: 6px; }
.play .add input {
  flex: 1; font: 14px var(--sans); color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; outline: none;
}
.play .add input:focus { border-color: var(--blue); }
.play .mini { display: flex; flex-direction: column; gap: 10px; }
.play .hint { font-size: 12.5px; color: var(--ink-3); }
.play .hint kbd { font-size: 11px; }
.play .tiles .val { font-size: 22px; }
.play .tiles .lab { font-size: 11px; }
.play .tiles .sub { font-size: 10.5px; }
.play .timeline .lane { height: 26px; }
.play .timeline .lane .seg { height: 22px; }
.play .went .row { font-size: 12px; grid-template-columns: 110px 1fr 56px; }
.play .went .row .t { font-size: 11.5px; }

/* the try-it HUD floats over the panel */
.play-wrap { position: relative; }
.play-wrap .hud, .play-wrap .palette { position: absolute; }
.play-wrap .palette { top: 18%; width: 52%; }
.play-wrap .palette .q input {
  flex: 1; font: 16px var(--sans); color: var(--ink); background: transparent; border: 0; outline: none;
}

/* ---------- under the hood / install ---------- */
.under { max-width: 1180px; margin: 0 auto; padding: 80px clamp(16px, 4vw, 48px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.cell {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 18px;
}
.cell .big { font: 700 32px/1.1 var(--display); letter-spacing: -0.02em; }
.cell h3 { margin: 4px 0 6px; font-size: 16px; }
.cell p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.cell code { font: 12.5px var(--mono); color: var(--teal); }
.install { max-width: 980px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 110px; text-align: center; }
.install pre {
  text-align: left; margin: 22px auto; max-width: 720px; padding: 18px 20px; border-radius: var(--radius);
  background: #111114; border: 1px solid var(--line); font: 14px/1.75 var(--mono); color: #d7d7de; overflow-x: auto;
}
.install pre .c { color: #6a9955; }
.install .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.btn-big {
  font-weight: 600; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: #000;
}
.btn-big.ghost { background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,0.25); }
.btn-big:hover { text-decoration: none; opacity: 0.88; }
footer { text-align: center; color: var(--ink-3); font-size: 13px; padding: 30px 16px 50px; border-top: 1px solid var(--line); }

/* ---------- smaller screens: the stage rides above each chapter instead of beside it ---------- */
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .stage-wrap { top: 58px; height: auto; padding: 8px 0; z-index: 5; background: var(--bg); }
  .chapters { padding: 4vh 0 10vh; }
  .chapter { min-height: 62vh; }
  .play { grid-template-columns: 1fr; }
  .nav a.link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================================================
 * v2: the pieces rebuilt from the app's own SwiftUI, at its point sizes (1pt = 1 design px on the stage).
 * Sources: QuickAddPanel (palette), SwitchHUD (switcher + committed), PromptPanel (prompts, quiet, toast),
 * StatusBarController (menu-bar title: "name · H:MM:SS" before a timer icon; orange pill when paused).
 * ===================================================================================================== */

/* menu bar item */
.ts-item { gap: 5px; font-variant-numeric: tabular-nums; }
.ts-item .timer { width: 14px; height: 14px; flex: none; }
.ts-item .dot { display: none; }
.ts-item.paused { background: #ff9f0a; color: #000; }
.ts-item.icon-only #mb-ts-text { display: none; }

/* stage caption under the screen */
.stage-caption { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-3); min-height: 1.4em; }
.stage-caption b { color: var(--ink-2); font-weight: 600; }

/* the real window: a screenshot of v1.0 at its real size (the 2x capture shown at 720 CSS px = 720pt) */
.stage-wrap { position: sticky; }
.realwin {
  position: absolute; left: 50%; top: 50%; z-index: 12;
  transform: translate(-50%, -48%) scale(0.98); opacity: 0; pointer-events: none;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.12);
  transition: opacity 0.45s ease, transform 0.45s ease;
  background: #2c2c2e;
}
.realwin.show { opacity: 1; transform: translate(-50%, -50%); }
.realwin.from-menubar { transform-origin: 85% 0%; transform: translate(-50%, -50%) scale(0.18); opacity: 0; transition: transform 0.7s cubic-bezier(.2,.9,.2,1), opacity 0.35s ease; }
.realwin.from-menubar.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
/* The WHOLE window, never cropped: sized by height so all 720 x 949 pt of it fits, as on your screen. A crop
 * hid where a section sat inside the window, which made the Planner in particular hard to place. */
.realwin { width: auto; height: min(949px, calc(100vh - 190px)); aspect-ratio: 1440 / 1898; max-width: 100%; }
.realwin img { width: 100%; height: 100%; display: block; object-fit: contain; }
.stage-fit { transition: opacity 0.45s ease, filter 0.45s ease; }
.stage-wrap.zoomed .stage-fit { opacity: 0.22; filter: blur(2px); }
.stage-wrap.zoomed .stage-caption { position: absolute; bottom: 14px; left: 0; right: 0; }

/* palette — QuickAddPanel: 460x340, black 0.9, radius 16 */
.palette {
  width: 460px; top: 120px; border-radius: 16px;
  background: rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.12);
}
.palette .q { padding: 14px 16px; gap: 9px; border: 0; font: 400 19px var(--display); }
.palette .q .glass { width: 17px; height: 17px; color: rgba(255,255,255,0.5); opacity: 1; display: flex; }
.palette .q .glass svg { width: 100%; height: 100%; }
.palette .sep { height: 1px; background: rgba(255,255,255,0.09); }
.palette .rows { padding: 6px 6px; gap: 0; }
.palette .r { padding: 9px 12px; gap: 10px; border-radius: 8px; font-size: 13.5px; }
.palette .r.sel { background: rgba(10,132,255,0.85); }
.palette .r i { width: 9px; height: 9px; }
.palette .r .grp { font-size: 10px; padding: 1px 6px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
.palette .r .tm { font-size: 11px; color: rgba(255,255,255,0.6); width: 58px; text-align: right; }
.palette .r.create .plus {
  width: 13px; height: 13px; border-radius: 50%; background: #30d158; color: #000; flex: none;
  display: grid; place-items: center; font: 700 10px/1 var(--sans);
}
.palette .dest { padding: 2px 14px 8px; gap: 6px; }
.palette .dest span { font-size: 11px; padding: 3px 7px; border-radius: 99px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45); display: inline-flex; align-items: center; gap: 4px; }
.palette .dest span i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.palette .dest span.on { background: rgba(10,132,255,0.75); color: #fff; }
.palette .foot { padding: 9px 16px; border: 0; font-size: 10px; color: rgba(255,255,255,0.45); gap: 12px; }
.palette .foot kbd {
  min-width: 0; height: auto; padding: 1px 4px; border: 0; border-radius: 3px;
  background: rgba(255,255,255,0.12); font: 10px var(--mono); vertical-align: 0;
}

/* switcher — SwitchHUD.SwitcherList: 440 wide, rows 44, black 0.9, radius 20 */
.switcher {
  position: absolute; left: 50%; top: 50%; z-index: 26; width: 440px;
  transform: translate(-50%, -50%) scale(0.96); opacity: 0; pointer-events: none;
  padding: 16px 16px 26px; border-radius: 20px;
  background: rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  transition: opacity 0.16s ease, transform 0.16s ease;
  display: flex; flex-direction: column; gap: 5px;
}
.switcher.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.switcher .row {
  display: flex; align-items: center; gap: 11px; padding: 9px 14px; border-radius: 10px;
  font: 500 14px var(--display); color: rgba(255,255,255,0.55); transition: background 0.1s ease;
}
.switcher .row i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.switcher .row .grp { font-size: 10px; padding: 1px 5px; border-radius: 99px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.35); }
.switcher .row .live { width: 6px; height: 6px; border-radius: 50%; background: #30d158; }
.switcher .row .t { margin-left: auto; font: 500 12px var(--mono); color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; }
.switcher .row.run .t { color: #30d158; }
.switcher .row.sel { background: #0a84ff; box-shadow: 0 0 16px rgba(10,132,255,0.5); color: #fff; font-size: 17px; font-weight: 700; }
.switcher .row.sel i { width: 12px; height: 12px; }
.switcher .row.sel .grp { font-size: 11px; color: rgba(255,255,255,0.6); }
.switcher .row.sel .t { font-size: 14px; color: rgba(255,255,255,0.9); }
.switcher .row.sel.run .t { color: #30d158; }
.switcher .hint { position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font: 500 10px var(--display); color: rgba(255,255,255,0.5); }

/* committed — SwitchHUD.CommittedHUD: 260x90, ultraThinMaterial, radius 16 */
.committed {
  position: absolute; left: 50%; top: 50%; z-index: 26; width: 260px; height: 90px;
  transform: translate(-50%, -50%) scale(0.96); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px;
  background: rgba(60,60,66,0.72); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.08); transition: opacity 0.2s ease, transform 0.2s ease;
}
.committed.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.committed i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.committed small { display: block; font-size: 11px; color: rgba(255,255,255,0.55); }
.committed b { display: block; font: 600 17px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.committed .play { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: #30d158; color: #000; display: grid; place-items: center; font-size: 11px; }

/* prompts — PromptPanel: alert 400x156 r18, quiet 420x112 top-right, toast 420x64 */
.prompt { padding: 20px; border-radius: 18px; background: rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.12); }
.prompt.center { width: 400px; height: 156px; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96); display: flex; flex-direction: column; }
.prompt.center.show { transform: translate(-50%, -50%); }
.prompt.corner { width: 420px; right: 16px; top: 42px; padding: 16px; display: flex; flex-direction: column; }
.prompt#prompt-break { height: 112px; }
.prompt.toast { height: 64px; justify-content: center; }
.prompt h4 { font: 600 15px var(--display); margin: 0 0 6px; color: #fff; }
.prompt.corner h4 { margin-bottom: 4px; }
.prompt p { font-size: 13px; color: rgba(255,255,255,0.7); margin: 0; }
.prompt.corner p { font-size: 11px; }
.prompt .btns { margin-top: auto; gap: 8px; }
.prompt .btns span { font-size: 13px; padding: 5px 13px; border-radius: 7px; background: rgba(255,255,255,0.14); }
.prompt.corner .btns span { font-size: 12px; padding: 3px 10px; }
.prompt .btns span.primary { background: #0a84ff; }
.prompt .btns span.pressed { filter: brightness(1.35); }

/* the keyboard, as you'd be pressing it */
.keys-overlay {
  position: absolute; left: 50%; bottom: 22px; z-index: 35; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; opacity: 0; transition: opacity 0.2s ease;
  padding: 10px 14px; border-radius: 16px; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.keys-overlay.show { opacity: 1; }
.keys-overlay .k {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 9px; display: grid; place-items: center;
  font: 600 16px var(--sans); color: rgba(255,255,255,0.85);
  background: linear-gradient(#3d3d40, #2a2a2d); border: 1px solid rgba(255,255,255,0.14); border-bottom-width: 3px;
  transition: transform 0.07s ease, background 0.07s ease, border-color 0.07s ease;
}
.keys-overlay .k.held { background: linear-gradient(#2b6fd6, #1f5bbd); border-color: #5aa9ff; color: #fff; }
.keys-overlay .k.tap { transform: translateY(2px); border-bottom-width: 1px; background: linear-gradient(#ffffff, #d8d8dd); color: #000; }
.keys-overlay .plus { color: rgba(255,255,255,0.4); font-size: 15px; }
.keys-overlay .count { font: 600 13px var(--mono); color: rgba(255,255,255,0.6); min-width: 26px; }

/* the try-it task list, as the real Tasks tab draws a row */
.play .task { gap: 9px; padding: 9px 12px; font-size: 14px; }
.play .task .grip { width: 6px; height: 12px; opacity: 0.25; background-image: radial-gradient(circle, #fff 1px, transparent 1.3px); background-size: 3px 4px; }
.play .task .icons { display: flex; gap: 6px; margin-left: 4px; }
.play .task .icons span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.play .task .icons .p { background: rgba(10,132,255,0.2); color: #0a84ff; }
.play .task.run .icons .p { background: rgba(48,209,88,0.22); color: #30d158; }
.play .task .icons .r { background: rgba(255,159,10,0.18); color: #ff9f0a; }
.play .task .icons .f { background: rgba(48,209,88,0.15); color: #30d158; }
.play .task .icons .a { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
.play .task .btn { display: none; }
.play-wrap .switcher { top: 46%; }
.play-wrap .palette { left: 50%; transform: translate(-50%, -8px) scale(0.97); }
.play-wrap .palette.show { transform: translate(-50%, 0) scale(1); }

/* typing: a train of keys sliding left through a fixed centre, newest struck */
.keys-overlay .train { display: flex; gap: 8px; }
.keys-overlay .train .k { transition: opacity 0.25s ease, transform 0.07s ease; }

/* the real iPhone, in a frame */
.phone { width: 236px; left: 5%; bottom: auto; top: 46px; aspect-ratio: 1206 / 2622; padding: 7px; border-radius: 40px; }
.phone .scr { padding: 0; border-radius: 34px; background: #000; }
.phone .scr img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* every device, one timeline: three lanes on one shared clock */
.devices {
  position: absolute; inset: 60px 34px 40px; z-index: 22; opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  transition: opacity 0.4s ease;
}
.devices.show { opacity: 1; }
.devices .drive { order: -1; }
.devices .dev {
  display: grid; grid-template-columns: 150px 236px 1fr; align-items: center; gap: 14px;
  background: rgba(20,20,24,0.92); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 12px 16px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.devices .dev.live { border-color: rgba(48,209,88,0.7); box-shadow: 0 0 0 1px rgba(48,209,88,0.5), 0 0 26px rgba(48,209,88,0.18); }
.devices .dhead b { font: 600 15px var(--display); } .devices .dhead small { margin-left: 8px; color: rgba(255,255,255,0.45); font-size: 11px; }
.devices .dmb { height: 22px; display: flex; align-items: center; padding: 0 8px; border-radius: 6px; background: rgba(255,255,255,0.05); font-size: 12px; }
.devices .dmb .ts-item { padding: 1px 7px; border-radius: 5px; }
.devices .dmb .ts-item.paused { background: #ff9f0a; color: #000; }
.devices .dmb .ts-item.idle { color: rgba(255,255,255,0.4); }
.devices .dlane { position: relative; height: 30px; border-radius: 5px; background: rgba(255,255,255,0.04); overflow: hidden; }
.devices .dlane span { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; }
.devices .dlane span.run { box-shadow: 0 0 0 1.5px #fff; }
.devices .drive {
  align-self: center; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.6); font-size: 13px;
  padding: 9px 16px; border-radius: 99px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
}
.devices .drive svg { width: 26px; height: 26px; color: #64d2ff; }
.devices .drive.pulse svg { animation: pulse 0.9s ease; }
@keyframes pulse { 40% { transform: scale(1.25); color: #fff; } }
.devices .dhours { position: relative; height: 14px; margin: 0 16px 0 calc(16px + 150px + 14px + 236px + 14px); font-size: 10px; color: rgba(255,255,255,0.4); }
.devices .dhours span { position: absolute; transform: translateX(-50%); }
