/* Cosplay. One rule per thing. Shared rules first, then what only desktop does, then what only a phone does. */

/* ---------- tokens ---------- */
:root {
  --stage: #FBFAF8; --stage-2: #F3F1EC; --stage-3: #E9E6DF;
  --paper: #FFFFFF; --paper-2: #F6F5F2;
  --ink: #17181C; --ink-1: #33353B; --ink-2: #5C5F66; --ink-3: #8A8C92;
  --accent: #DE4593; --accent-ink: #C03E80; --accent-soft: rgba(222,69,147,.1); --accent-glow: rgba(222,69,147,.22);
  --go: #2FAC66;
  --line: rgba(23,24,28,.08); --line-stage: rgba(23,24,28,.14);
  --frame: #17181C;
  --display: 'Gabarito', 'Arial Black', sans-serif; --sans: 'DM Sans', system-ui, sans-serif;
  --spring: cubic-bezier(.2,.9,.3,1.3); --out: cubic-bezier(.2,.7,.2,1);
  --lift: 0 16px 40px -16px rgba(11,13,18,.22);
  --surface: rgba(23,24,28,.04); --surface-2: rgba(23,24,28,.08); --ring: rgba(23,24,28,.2);
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: var(--stage); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
img { display: block; }
a { color: inherit; }
h1, h2, .wordmark { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
main { position: relative; z-index: 1; max-width: 1220px; margin: 0 auto; padding: 0 32px 100px; }

/* ---------- shared pieces ---------- */
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-stage); color: var(--ink); border: 0; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .2s, translate .2s; }
.ghost:hover { background: var(--stage-2); }
.ghost:disabled { background: none; color: var(--ink-3); cursor: default; }
.primary { background: var(--accent-ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .2s; }
.primary:hover { background: var(--accent); }
.kicker { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }
.sub { color: var(--ink-2); line-height: 1.55; font-size: 15px; }

/* ---------- props. a few shapes on the first screen ---------- */
.props { position: absolute; top: 0; left: 0; right: 0; height: 100vh; pointer-events: none; z-index: 0; overflow: hidden; }
.prop { position: absolute; display: block; opacity: .8; animation: float 9s ease-in-out infinite; }
.p1 { width: 34px; height: 64px; border: 3px solid var(--accent); border-radius: 10px; top: 12%; left: 6%; rotate: -14deg; }
.p2 { width: 46px; height: 46px; background: var(--stage-3); border-radius: 50%; top: 22%; right: 8%; animation-delay: -3s; }
.p3 { width: 60px; height: 20px; background: var(--accent); border-radius: 999px; top: 58%; left: 4%; rotate: 18deg; animation-delay: -5s; }
.p4 { width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 40px solid var(--stage-3); top: 70%; right: 5%; rotate: 24deg; animation-delay: -1s; }
.p5 { width: 28px; height: 52px; border: 3px solid var(--stage-3); border-radius: 8px; top: 40%; right: 3%; rotate: 12deg; animation-delay: -7s; }
.p6 { width: 18px; height: 18px; background: var(--stage-3); top: 84%; left: 12%; rotate: 45deg; animation-delay: -2s; }
.p7 { width: 14px; height: 14px; background: var(--accent); border-radius: 50%; top: 8%; left: 48%; animation-delay: -4s; }
.p8 { width: 40px; height: 40px; border: 3px solid var(--accent); border-radius: 50%; top: 92%; right: 30%; animation-delay: -6s; }
body:has(#run:not([hidden])) .props, body:has(#report:not([hidden])) .props { display: none; }

/* ---------- top bar ---------- */
.top { position: relative; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 20px 32px 0; }
.backbtn { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-stage); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.backbtn:hover { background: var(--stage-2); }
.wordmark { font-size: 24px; color: var(--ink); text-decoration: none; }
#live { position: relative; display: flex; align-items: center; gap: 8px; margin-left: 12px; margin-right: auto; }
.run-actions { position: relative; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.acts-more { display: contents; }
.run-actions .more { display: none; }
.top .newrun { margin-left: 4px; }

/* a run still going, pinned in the top bar */
.livepill { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-stage); color: var(--ink); text-decoration: none; border: 0; border-radius: 999px; padding: 5px 14px 5px 6px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: translate .2s; }
.livepill:hover { background: var(--stage-2); }
.lp-cast { display: flex; }
.livepill .lp-cast .bot { --size: 26px; margin-right: -8px; box-shadow: 0 0 0 2px var(--paper); }
.livepill .lp-cast .bot:last-child { margin-right: 0; }
.lp-bar { width: 64px; height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-left: 6px; }
.lp-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1s linear; }
.livepill.done .lp-bar i { background: var(--go); }
.lp-txt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.livelist { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line-stage); padding: 8px; border-radius: var(--r-m); box-shadow: var(--lift); min-width: 280px; }
.livelist .livepill { background: none; box-shadow: none; }
.livelist .livepill:hover { background: var(--surface); }

/* ---------- the bots. the app icon itself ---------- */
.bot { --size: 64px; position: relative; display: inline-grid; place-items: center; width: var(--size); height: var(--size); border-radius: 24%; background: none; box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .25s ease, scale .35s var(--spring), opacity .25s ease; }
.bot img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.bot.blank { background: var(--stage-3); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: calc(var(--size) * .36); }
.bot i { position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; font-style: normal; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink-2); pointer-events: none; opacity: 0; transition: opacity .2s, color .2s; }
.bot.small { --size: 44px; }
.bot.named i { opacity: 1; }

/* picking. a ring, a check, the name, a pop, and the rest step back */
.lineup .bot::after { content: ''; position: absolute; inset: -8px -8px -30px; border-radius: 30%; }
.lineup .bot::before { content: ''; position: absolute; top: -5px; right: -5px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: var(--accent) var(--check) center / 13px no-repeat; box-shadow: 0 0 0 3px var(--stage); scale: 0; transition: scale .4s var(--spring); }
.lineup .bot.off { box-shadow: 0 0 0 1px var(--line); }
.lineup .bot:not(.off) { box-shadow: 0 0 0 3px var(--accent), 0 0 0 8px var(--accent-glow); }
.lineup .bot:not(.off)::before { scale: 1; }
.lineup .bot:not(.off) i { opacity: 1; color: var(--accent-ink); font-weight: 700; }
.lineup:has(.bot:not(.off)) .bot.off { opacity: .55; }
.lineup .bot:hover { scale: 1.1; opacity: 1; }
.lineup .bot:hover i { opacity: 1; }
.lineup .bot:active { scale: .9; }

/* ---------- home ---------- */
.hero { position: relative; }
.hero h1 { position: relative; z-index: 1; }
.hero h1 .who { display: inline-block; color: var(--accent-ink); transition: opacity .22s ease, translate .22s ease; }
.hero h1 .who.out { opacity: 0; translate: 0 6px; }
.lede { position: relative; z-index: 1; line-height: 1.5; color: var(--ink-2); }
.try { position: relative; z-index: 1; margin-top: 18px; background: none; border: 1px solid var(--line-stage); color: var(--ink); font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .2s; }
.try:hover { background: var(--stage-2); }

/* the box. the whole thing is the input */
.composer { position: relative; z-index: 3; width: min(680px, 100%); background: var(--paper); color: var(--ink); border: 1px solid var(--line-stage); transition: border-color .2s; border-radius: var(--r-l); padding: 18px 18px 12px; display: grid; gap: 14px; text-align: left; box-shadow: var(--lift); cursor: text; }
.composer:focus-within { border-color: var(--ring); }
.ce { outline: none; min-height: 84px; padding: 4px 4px 8px; font-size: 17px; line-height: 1.5; }
.ce:empty::after { content: attr(data-empty); color: var(--ink-3); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; cursor: default; }
.bar .left, .bar .right { display: flex; align-items: center; gap: 8px; }
.cast-bots { display: flex; align-items: center; gap: 6px; min-height: 34px; flex-wrap: wrap; }
.cast-bots .bot { --size: 34px; box-shadow: 0 0 0 2px var(--accent); animation: popin .3s var(--spring) both; }
.cast-bots .bot.landed { animation: land .25s var(--spring); }
.cast-bots .bot i { display: none; }
.cast-bots .bot:hover { scale: 1.08; box-shadow: 0 0 0 2px var(--ink); }
.cast-bots.nudge { animation: nudge .6s ease; }
.lineup.nudge { animation: nudge .6s ease; }
.dock-hint { font-size: 14px; color: var(--ink-3); padding-left: 4px; }
.tool { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-stage); background: none; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; transition: background .2s, border-color .2s; }
.tool:hover { background: var(--stage-2); border-color: var(--ring); }
.addrow { display: flex; gap: 8px; max-width: 240px; }
.addrow input { flex: 1; min-width: 0; border: 1px solid var(--line-stage); border-radius: 999px; padding: 6px 12px; font-size: 14px; background: var(--paper); color: var(--ink); }
.addrow input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.addrow .tool { width: auto; padding: 0 12px; font-size: 13px; font-weight: 700; }
.plat-pick { display: flex; gap: 4px; }
.plat-pick button { width: 36px; height: 36px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.plat-pick button:hover { color: var(--ink); background: var(--stage-2); }
.plat-pick button.on { background: var(--stage-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-stage); }
.send { height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent-ink); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .2s, scale .25s var(--spring); }
.send:hover { background: var(--accent); scale: 1.04; }
.send:disabled { opacity: .5; cursor: default; scale: 1; }

/* ---------- the example and a run. a title, then the answer ---------- */
.show { padding: 48px 0 0; text-align: center; }
.show-head { display: flex; flex-direction: column; align-items: center; }
#finished { padding-top: 96px; }
.show .kicker { margin-bottom: 12px; }
.show h2 { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.15; max-width: 720px; margin: 0 auto; }
.show .sub { max-width: 560px; margin: 16px auto 0; }
#run-sub:empty { display: none; }
.tabs { display: inline-flex; gap: 4px; margin-top: 32px; background: var(--stage-2); border-radius: 999px; padding: 4px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 36px; background: none; border: 0; border-radius: 999px; padding: 0 16px 0 12px; font-size: 14px; color: var(--ink-2); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(11,13,18,.1), inset 0 0 0 1px var(--line); }
.tapline { margin: 24px 0 0; font-size: 14px; color: var(--ink-3); }

/* the tiles. one per app */
.tiles { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 24px 32px; padding: 40px 0 20px; }
.tiles:has(> .slot.working) { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 56px 40px; align-items: start; padding: 64px 0 40px; }
.tiles:has(> .compare) { display: block; padding: 0; margin-top: 56px; }
#finished .tiles { margin-top: 64px; }
.slot { position: relative; display: flex; flex-direction: column; gap: 14px; width: 240px; animation: walkon .7s var(--spring) both; }
.slot.web { width: 400px; }
.slot:nth-child(2) { animation-delay: .08s; }
.slot:nth-child(3) { animation-delay: .16s; }
.slot:nth-child(4) { animation-delay: .24s; }
.slot .frame { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: calc(54px * var(--k, 1)); background: var(--frame); padding: 6px; box-shadow: 0 20px 40px -16px rgba(11,13,18,.35); transition: translate .5s var(--spring), box-shadow .4s ease; }
.slot .frame .clip { position: absolute; inset: 6px; border-radius: calc(54px * var(--k, 1) - 6px); overflow: hidden; background: #fff; }
.slot .frame iframe { display: block; width: 390px; height: 844px; border: 0; transform-origin: top left; background: #fff; }
.slot.web .frame { aspect-ratio: 1280 / 800; border-radius: var(--r-m); padding: 0; background: #fff; }
.slot.web .frame .clip { inset: 0; border-radius: var(--r-m); }
.slot:hover .frame { translate: 0 -8px; box-shadow: 0 30px 60px -20px rgba(11,13,18,.4); }
.slot .frame .bot { position: absolute; top: -14px; left: -14px; z-index: 3; --size: 56px; box-shadow: 0 0 0 3px var(--stage); }
.slot .frame .bot i { top: 50%; left: calc(100% + 10px); translate: 0 -50%; background: #fff; color: var(--ink); padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.slot .frame.paused .bot i { opacity: 0; }
.slot .frame.live::after { content: 'Live'; position: absolute; top: 10px; right: 10px; z-index: 2; pointer-events: none; font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: #fff; color: var(--ink); padding: 3px 8px; border-radius: 999px; }
.slot .frame.live.paused::after { content: 'Yours'; }
.slot .label { padding: 16px 4px 0; display: grid; gap: 6px; text-align: center; }
.slot .label .row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.slot h3 { font-family: var(--display); font-size: 18px; font-weight: 800; }
.slot h3 span { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.slot .mini { display: flex; justify-content: center; gap: 5px; }
.slot .mini span { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-2); cursor: pointer; transition: background .2s, border-color .2s; }
.slot .mini span:hover { border-color: var(--ink); }
.slot .mini span.on { background: var(--accent); border-color: var(--accent); }
.notesbtn { border: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-stage); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s, translate .2s; }
.notesbtn:hover { background: var(--stage-2); translate: 0 -1px; }

/* the burst when an app finishes */
.burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.burst i { position: absolute; width: 10px; height: 10px; border-radius: 2px; animation: fly .9s cubic-bezier(.1,.8,.3,1) forwards; }

/* ---------- an app at work. its icon, one line, a meter, the real screens it is reading ---------- */
.slot.working { width: auto; text-align: left; }
.room { display: flex; flex-direction: column; gap: 16px; }
.room .who { display: flex; align-items: center; gap: 14px; }
.room .who .bot { --size: 56px; flex: none; cursor: default; }
.room .line { display: grid; gap: 2px; min-width: 0; }
.room .name { font-family: var(--display); font-size: 20px; font-weight: 800; }
.room .say { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
/* while it works, a light passes through what it is doing */
.slot.working:not(.failed) .say { background: linear-gradient(90deg, var(--ink-2) 35%, var(--ink) 50%, var(--ink-2) 65%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 1.8s linear infinite; }
.room .meter { display: flex; align-items: center; gap: 12px; }
.room .meter .track { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.room .meter .fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #F2A3CB, var(--accent)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; transition: width 1s linear; }
.room .clock { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
/* the real screens it read. equal tiles in a grid, three tall across for a phone brief, two wide across for web */
.room .fan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.room .fan.web { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room .fan.empty { margin-top: 0; }
.room .fan .none { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.room .shot { position: relative; padding: 0; border: 0; border-radius: var(--r-s); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line-stage); cursor: pointer; animation: tilein .4s var(--spring) both; transition: translate .2s var(--out); }
.room .shot img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; }
.room .fan.web .shot img { aspect-ratio: 16 / 10; }
.room .shot.still { animation: none; }
.room .shot:hover { translate: 0 -3px; }
.room .shot .more { position: absolute; right: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot.failed .room { gap: 14px; }
.slot.failed .whyfail { font-size: 14px; line-height: 1.5; color: var(--ink-1); }
.slot.failed .retry { align-self: flex-start; }

/* ---------- the result. one app on stage, its guide beside it, the rest one tap away ---------- */
.compare { max-width: 1120px; margin: 0 auto; text-align: left; }
.cast-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px; margin: 0 0 40px; border-bottom: 1px solid var(--line); }
.ctab { display: inline-flex; align-items: center; gap: 10px; margin-bottom: -1px; padding: 0 2px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ink-2); font-size: 16px; font-weight: 600; cursor: pointer; transition: color .2s, border-color .2s; }
.ctab:hover { color: var(--ink); }
.ctab.on { color: var(--ink); border-bottom-color: var(--accent); }
.ctab .bot { --size: 28px; cursor: inherit; }
.ctab .bot i { display: none; }
.ctab.failed { color: var(--ink-3); }
.ctab.failed:hover { color: var(--ink); }
.cmp-busy { display: flex; justify-content: center; padding: 10px 0 30px; }
.cmp-busy .slot.working { width: 460px; }
.compare.web .cmp-busy .slot.working { width: 560px; }
.cmp-body { display: grid; align-items: stretch; }
.cmp-left { position: relative; display: flex; flex-direction: column; align-items: center; gap: 32px; min-width: 0; }
.cmp-left::before { content: ''; position: absolute; left: 50%; top: 45%; translate: -50% -50%; width: 120%; height: 90%; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }

/* the phone, or the browser window */
.phone { position: relative; border-radius: calc(54px * var(--k, 1)); background: var(--stage-2); padding: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-stage), 0 30px 60px -24px rgba(11,13,18,.3); }
.phone .clip { position: absolute; inset: 6px; border-radius: calc(54px * var(--k, 1) - 6px); overflow: hidden; background: #fff; }
.phone iframe { display: block; width: 390px; height: 844px; border: 0; transform-origin: top left; background: #fff; }
.phone .chrome { display: none; }
.phone.web { border-radius: var(--r-m); padding: 0; background: #fff; box-shadow: 0 0 0 1px var(--line-stage), 0 30px 60px -24px rgba(11,13,18,.35); }
.phone.web .clip { inset: 36px 0 0; border-radius: 0; }
.phone.web .chrome { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; background: var(--stage-2); }
.phone.web .chrome span { width: 11px; height: 11px; border-radius: 50%; background: var(--stage-3); }
.phone.web .chrome i { flex: 1; min-width: 0; font-style: normal; font-size: 12px; color: var(--ink-3); margin-left: 10px; background: #fff; border-radius: 6px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare .clip iframe { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.compare .clip iframe.on { opacity: 1; pointer-events: auto; }

/* back, the dots, next */
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper .ghost { min-width: 72px; }
.stepper .next { background: var(--accent-ink); color: #fff; box-shadow: none; }
.stepper .next:hover { background: var(--accent); }
.stepper .next:disabled { background: none; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-stage); }
.dots { display: flex; gap: 8px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ring); cursor: pointer; transition: background .2s, border-color .2s, scale .2s; }
.dots span:hover { border-color: var(--ink); }
.dots span.on { background: var(--accent); border-color: var(--accent); scale: 1.2; }
.dots span.wait { opacity: .3; cursor: default; }

/* the guide. this screen, what to pull, the real screens it came from */
.guide { display: flex; flex-direction: column; gap: 24px; }
.g-say { color: var(--ink); }
.g-step { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.g-name { font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.15; margin: 0 0 16px; }
.g-why { font-size: 17px; line-height: 1.6; color: var(--ink-1); }
.g-pull { display: flex; flex-direction: column; gap: 8px; }
.g-pulltag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.g-pulltext { font-size: 16px; line-height: 1.6; color: var(--ink-1); }
.g-srclabel { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.g-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.g-strip img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 6px; cursor: pointer; box-shadow: 0 0 0 1px var(--line-stage); transition: translate .2s ease; }
.g-strip img:hover { translate: 0 -3px; }
.g-strip:not([data-shape]) { visibility: hidden; }
.g-strip[data-shape=wide] { grid-template-columns: repeat(3, 1fr); }
.g-strip[data-shape=wide] img { aspect-ratio: 1280 / 800; }
.g-strip[data-shape=wide] img:nth-child(n+4) { display: none; }
/* what the app thinks. under the flow, the full width of it, no boxes */
.g-more { grid-column: 1 / -1; contain: inline-size; display: grid; gap: 40px; margin-top: 24px; padding-top: 40px; border-top: 1px solid var(--line); }
.g-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.g-pushtext { display: grid; gap: 12px; max-width: 680px; }
.g-pushtext b { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.g-pushtext span { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.g-principles { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 56px; }
.g-principles li { break-inside: avoid; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; margin-bottom: 32px; }
.g-n { font-family: var(--display); font-size: 15px; font-weight: 800; line-height: 1.6; color: var(--accent-ink); }
.g-principles p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.g-principles b { font-weight: 500; color: var(--ink); }
.g-strip a.txt { color: var(--ink); font-size: 13px; background: var(--surface-2); padding: 6px 10px; border-radius: 999px; text-decoration: none; }

/* ---------- your runs ---------- */
#runs { padding: 40px 0 60px; max-width: 900px; margin: 0 auto; }
#runs .kicker { text-align: center; margin-bottom: 16px; }
#runlist { display: grid; gap: 10px; }
.runrow { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--paper); border: 1px solid var(--line-stage); color: var(--ink); padding: 12px 18px; border-radius: var(--r-m); text-align: left; cursor: pointer; transition: background .2s, border-color .2s, translate .2s; }
.runrow:hover { border-color: var(--ring); translate: 0 -1px; }
.runrow .cast { display: flex; gap: 4px; }
.runrow .cast .bot { --size: 30px; box-shadow: 0 0 0 2px var(--paper); cursor: inherit; }
.runrow .cast .bot i { display: none; }
.runrow .what { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runrow .when { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* ---------- the big viewer. one flow, its notes beside it ---------- */
#stage { position: fixed; inset: 0; z-index: 10; background: rgba(14,13,18,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: grid; grid-template-columns: 1fr 420px; }
.close { position: absolute; top: 14px; left: 18px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; transition: background .2s, rotate .2s; }
.close:hover { background: var(--paper-2); rotate: 90deg; }
.stage-left { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; min-width: 0; min-height: 0; height: 100vh; }
.notes { background: #fff; color: var(--ink); padding: 70px 30px 30px; overflow: auto; }
.notes .kicker { color: var(--ink-3); }
.notes .who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.notes h2 { font-size: 24px; line-height: 1.2; margin: 0 0 22px; }
.notes h3 { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.n-screen { background: var(--paper-2); border-radius: var(--r-m); padding: 14px 16px; margin: 0 0 26px; }
.n-screen h4 { font-family: var(--display); font-size: 16px; font-weight: 800; }
.n-screen p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.notes ul { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.notes li { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
#n-change-text { margin: 0 0 26px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.studied a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); border-radius: 10px; padding: 4px; margin: -4px; transition: background .15s; }
.studied a:hover { background: var(--paper-2); }
.studied a img { width: 56px; height: 56px; object-fit: cover; object-position: top; border-radius: var(--r-s); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.studied a b { font-size: 14px; font-weight: 700; display: block; }
.studied a span span { font-size: 12px; color: var(--accent-ink); }
.studied li.nothumb a { grid-template-columns: 1fr; }

/* ---------- a real screen, big. dark room, arrows at the sides, the screen is the link ---------- */
#lightbox { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 72px 1fr 72px; grid-template-rows: 64px 1fr; align-items: center; justify-items: center; padding: 0 0 28px; background: rgba(14,13,18,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lb-top { grid-column: 1 / -1; grid-row: 1; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px; color: #fff; font-size: 14px; }
.lb-who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.lb-who .bot { --size: 30px; cursor: default; }
.lb-who .bot i { display: none; }
.lb-n { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.7); }
.lb-acts { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.lb-open { color: #fff; background: rgba(255,255,255,.14); text-decoration: none; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 999px; }
.lb-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s; }
.lb-close:hover { background: rgba(255,255,255,.26); }
.lb-arrow { grid-row: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; transition: background .2s; }
.lb-arrow:hover { background: rgba(255,255,255,.26); }
.lb-arrow:disabled { opacity: .25; cursor: default; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-pic { grid-column: 2; grid-row: 2; display: block; max-height: calc(100vh - 92px); max-width: 100%; animation: popin .3s var(--spring) both; }
.lb-pic img { max-height: calc(100vh - 92px); max-width: 100%; height: auto; width: auto; border-radius: var(--r-m); background: #fff; }
a.lb-pic { cursor: pointer; }

/* ---------- the report. one page per app, printable ---------- */
#report { background: #fff; color: var(--ink); min-height: 100vh; padding: 0 0 60px; }
.rep { max-width: 980px; margin: 0 auto; padding: 24px 32px; }
.rep-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.rep-top .ghost { background: var(--paper-2); color: var(--ink); }
.rep-top .ghost:hover { background: rgba(20,18,26,.12); }
.rep-head .kicker { color: var(--accent-ink); }
.rep-head h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin: 6px 0 14px; }
.rep-brief { font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 760px; margin: 0 0 8px; }
.rep-brief b { color: var(--ink); }
.rep-meta { font-size: 13px; color: var(--ink-3); margin: 0 0 40px; }
.rep-app { border-top: 1px solid var(--line); padding: 32px 0 8px; break-inside: avoid; page-break-inside: avoid; }
.rep-who { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.rep-who .bot { box-shadow: 0 0 0 1px var(--line); cursor: default; }
.rep-who .bot i { display: none; }
.rep-who h2 { font-size: 24px; }
.rep-title { font-size: 17px; font-weight: 600; margin: 0 0 20px; color: var(--ink-2); }
.rep-note { font-weight: 500; color: var(--accent-ink); }
.rep-screens { display: grid; grid-template-columns: repeat(auto-fill, 180px); gap: 24px 16px; margin: 0 0 32px; }
.rep-screens.web { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rep-screens figure { margin: 0; }
.rep-screens .rep-frame { width: 100%; }
.rep-screens figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.rep-body { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.rep-frame { position: relative; width: 300px; border-radius: calc(54px * var(--k, 1)); overflow: hidden; border: 6px solid var(--stage-2); background: #fff; box-shadow: 0 0 0 1px var(--line-stage); }
.rep-frame.web { width: 100%; border: 1px solid var(--line); border-radius: var(--r-m); }
.rep-frame iframe { display: block; border: 0; transform-origin: top left; }
.rep-notes h3 { font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 8px; }
.rep-notes ol, .rep-notes ul { margin: 0 0 22px; padding-left: 18px; display: grid; gap: 8px; }
.rep-notes li, .rep-notes p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rep-notes p { margin: 0 0 22px; }
.rep-notes li b { color: var(--ink); }
.rep-src { list-style: none; padding: 0; }
.rep-src a { color: var(--accent-ink); }
@media print {
  body { background: #fff; }
  .top, .props, #lineup, .rep-top { display: none !important; }
  #report, .rep { padding: 0; max-width: none; }
  .rep-app { page-break-before: always; padding-top: 0; border: 0; }
  .rep-app:first-of-type { page-break-before: auto; }
}

/* ---------- motion ---------- */
.ghostbot { position: fixed; z-index: 50; pointer-events: none; transition: left .3s var(--out), top .3s var(--out), width .3s var(--out), height .3s var(--out); }
@keyframes float { 50% { translate: 0 -14px; } }
@keyframes drift { 0%, 100% { translate: 0 0; } 33% { translate: 6px -10px; } 66% { translate: -5px 6px; } }
@keyframes popin { from { scale: .3; opacity: 0; } }
@keyframes picked { 0% { scale: 1; } 45% { scale: 1.22; } 100% { scale: 1; } }
@keyframes land { 0% { scale: 1.3; } 100% { scale: 1; } }
@keyframes nudge { 0%, 100% { translate: 0 0; } 25% { translate: -6px 0; } 50% { translate: 6px 0; } 75% { translate: -4px 0; } }
@keyframes walkon { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes breathe { 50% { opacity: .5; } }
@keyframes tilein { from { scale: .6; rotate: -4deg; } }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }

/* ========== desktop. the bots float around the box, the flow sits beside its guide ========== */
@media (min-width: 761px) {
  .hero { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14vh 0 60px; }
  .hero h1 { font-size: clamp(34px, 4.6vw, 60px); max-width: 900px; margin: 0 0 14px; }
  .lede { font-size: 17px; max-width: 620px; margin: 0 0 30px; }
  .lineup { position: absolute; inset: 0; pointer-events: none; }
  .lineup .bot { position: absolute; left: var(--x); top: var(--y); --size: calc(64px * var(--k, 1)); pointer-events: auto; }
  .lineup .bot.pop { animation: popin .5s var(--spring) both, drift 7s ease-in-out infinite; animation-delay: 0s, calc(-1 * var(--d, 0s)); }
  .lineup .bot:not(.off) { animation: picked .5s var(--spring), drift 7s ease-in-out infinite; animation-delay: 0s, calc(-1 * var(--d, 0s)); }
  .lineup .bot:hover { animation-play-state: paused; }
  .lineup .bot i { top: calc(100% + 10px); background: var(--paper); box-shadow: 0 0 0 1px var(--line-stage); color: var(--ink); padding: 4px 10px; border-radius: 999px; }
  .cmp-body { grid-template-columns: auto minmax(0, 440px); justify-content: center; gap: 48px; }
  /* the card starts at the top of the phone, the real screens end at its bottom */
  .guide { padding-bottom: 68px; }
  .g-src { margin-top: auto; }
  .cmp-left { min-width: 300px; }
  .compare.web .cmp-body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (min-width: 1100px) {
  .compare.web .cmp-body { grid-template-columns: auto minmax(0, 380px); justify-content: center; gap: 48px; }
}

/* ========== phone. the title leads, the apps sit in a grid like a home screen, the box waits in thumb reach ========== */
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .props { display: none; }
  main { padding: 0 16px 60px; }
  .top { padding: 12px 20px 0; gap: 10px; }
  .wordmark { font-size: 22px; }
  .top:has(.backbtn:not([hidden])) .wordmark { display: none; }

  .hero, #finished, #runs { max-width: 440px; margin-left: auto; margin-right: auto; }
  .hero { min-height: calc(100svh - 56px); display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 28px 4px calc(20px + env(safe-area-inset-bottom)); }
  .hero h1 { font-size: 40px; line-height: 1.04; margin: 0 0 14px; }
  /* the app name gets its own line, so a long name never pushes the grid */
  .hero h1 .who { display: block; }
  .lede { font-size: 17px; max-width: 32ch; margin: 0; }
  .try { display: none; }

  .lineup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 0; justify-items: center; margin: 40px 0 36px; }
  .lineup .bot { --size: 60px; }
  .lineup .bot.pop { animation: popin .5s var(--spring) both; }
  .lineup .bot:not(.off) { animation: picked .5s var(--spring); }
  .lineup .bot i { opacity: 1; font-size: 11px; top: calc(100% + 7px); }
  .lineup #addtoggle { position: relative; width: 60px; height: 60px; border: 1.5px dashed var(--ring); background: none; color: var(--ink); font-size: 26px; border-radius: 24%; }
  .lineup #addtoggle::after { content: 'Add'; position: absolute; top: calc(100% + 7px); left: 50%; translate: -50% 0; font-size: 11px; font-weight: 600; color: var(--ink-2); }
  .hero > .addrow { max-width: none; margin: -8px 0 24px; }
  .hero > .addrow input { height: 48px; padding: 0 18px; font-size: 16px; }
  .hero > .addrow .tool { height: 48px; padding: 0 20px; font-size: 15px; }

  .composer { margin-top: auto; }
  .ce { min-height: 76px; font-size: 16px; }
  .bar { border-top: 1px solid var(--line-stage); padding-top: 12px; flex-wrap: nowrap; }
  .bar .left { display: none; }
  .bar .right { width: 100%; justify-content: space-between; }
  .plat-pick button { width: 44px; height: 44px; }
  .send { flex: 1; min-height: 46px; margin-left: 6px; }

  .show { padding-top: 56px; text-align: left; }
  .show-head { align-items: flex-start; }
  .show h2 { font-size: 24px; line-height: 1.2; margin: 0; }
  .show .sub { margin: 8px 0 0; font-size: 14px; }
  #runs { padding-top: 56px; }
  #runs .kicker { text-align: left; }

  .tiles { gap: 0 20px; padding: 16px 0 20px; }
  .slot, .slot.web, .cmp-busy .slot.working, .compare.web .cmp-busy .slot.working { width: 100%; }
  .room .who { gap: 12px; }
  .room .who .bot { --size: 52px; }

  #run .show { padding-top: 22px; }
  #finished { padding-top: 80px; }
  #finished .tiles { margin-top: 40px; }
  .tabs button { height: 40px; }
  .cast-tabs { justify-content: flex-start; flex-wrap: nowrap; gap: 28px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 32px; padding: 2px 16px 0; width: calc(100% + 32px); }
  .cast-tabs::-webkit-scrollbar { display: none; }
  .ctab { flex: none; }
  .cmp-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cmp-left { width: 100%; }
  .guide { gap: 16px; }
  .g-name { font-size: 22px; margin-bottom: 12px; }
  .g-why, .g-pulltext { font-size: 16px; }
  .g-more { margin-top: 8px; padding-top: 32px; gap: 32px; }
  .g-pushtext b { font-size: 22px; }
  .g-principles { columns: 1; }
  .g-principles li { margin-bottom: 24px; }
  .tiles:has(> .slot.working) { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; }
  .stepper { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; width: 100%; justify-content: space-between; background: rgba(251,250,248,.86); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 8px; border-radius: 999px; }
  .stepper .ghost { min-height: 44px; min-width: 88px; }

  .runrow { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 12px; padding: 14px; }
  .runrow .cast { grid-row: 1 / 3; }
  .runrow .cast .bot + .bot { margin-left: -10px; }
  .runrow .what { grid-column: 2; white-space: normal; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .runrow .when { grid-column: 2; font-size: 12px; }

  #live { position: static; margin-left: 6px; }
  .livepill { padding: 4px 10px 4px 5px; gap: 6px; }
  .livepill .lp-txt { display: none; }
  .livepill .lp-bar { width: 36px; margin-left: 2px; }
  .livelist { left: 16px; right: 16px; min-width: 0; }
  .livelist .livepill .lp-txt { display: inline; }
  .livelist .livepill .lp-bar { width: 56px; }

  .run-actions { gap: 6px; }
  .run-actions .more { display: inline-flex; width: 38px; height: 36px; padding: 0; font-size: 18px; letter-spacing: 1px; }
  .top .newrun { margin-left: 0; }
  .acts-more { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 2px; background: var(--paper); border: 1px solid var(--line-stage); padding: 8px; border-radius: var(--r-m); box-shadow: var(--lift); min-width: 200px; }
  .run-actions.open .acts-more { display: flex; }
  .acts-more .ghost { background: none; box-shadow: none; color: var(--ink); justify-content: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 15px; }
  .acts-more .ghost:hover { background: var(--stage-2); }

  #stage { grid-template-columns: 1fr; overflow: auto; }
  .stage-left { height: 100svh; }
  .notes { padding: 24px 20px 40px; }

  #lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 56px minmax(0, 1fr) 76px; padding: 0; }
  .lb-top { padding: 0 12px; grid-template-columns: 1fr auto; }
  .lb-top .lb-n { display: none; }
  .lb-who span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .lb-open { padding: 7px 12px; font-size: 12px; }
  .lb-pic { grid-column: 1 / -1; max-height: calc(100svh - 140px); max-width: calc(100vw - 24px); }
  .lb-pic img { max-height: calc(100svh - 140px); max-width: calc(100vw - 24px); }
  .lb-arrow { grid-row: 3; width: 48px; height: 48px; }
  .lb-prev { grid-column: 1; justify-self: end; margin-right: 10px; }
  .lb-next { grid-column: 2; justify-self: start; margin-left: 10px; }

  .rep { padding: 16px; }
  .rep-top { position: sticky; top: 0; z-index: 5; background: #fff; margin: 0 -16px 20px; padding: 10px 16px; }
  .rep-top .ghost, .rep-top .primary { font-size: 13px; padding: 8px 12px; }
  .rep-body { grid-template-columns: 1fr; gap: 20px; }
  .rep-frame { width: min(300px, 100%); margin: 0 auto; }
  .rep-screens:not(.web) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
