/*
 * The MCP page (`mcp.html` → /mcp/), told by the scroll one thing at a time. In home.js's system
 * and page.css's opening. The hero's window turns between Claude, ChatGPT and any MCP app (`.turn`).
 * Connect in a minute shows one app's six steps (`data-app`), each with its window as that app
 * draws it today (`.jw`); Then just ask walks six questions. Both are home.js `data-story`s on wide
 * screens; on phones the steps follow one another and the questions walk by themselves (mcp.js).
 */

/* ─── The opening ──────────────────────────────────────────────────────── */
.mcp-hero {
  grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
  min-height: 100svh;
}

/* The promise in two lines, at a section heading's size: the link below is the hero, not the words */
.mcp-hero h1 {
  font-size: var(--h2);
  line-height: var(--h2-lh);
}

.mcp-hero .page-art {
  height: clamp(560px, calc(100svh - 200px), 720px);
}

.mcp-hero .lede {
  max-width: 460px;
}

/* The apps it works with: one line, each name led by its own logo, bare, in its own colour */
.with {
  margin-top: var(--s5);
  font-size: 15px;
  line-height: 26px;
  color: var(--text-2);
  text-wrap: pretty;
}

.with :is(a, span) {
  white-space: nowrap;
}

.with :is(img, svg) {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0 6px 0 3px;
  vertical-align: -4px;
}

/* Each app's own logo, bare: Claude's coral as it is; ChatGPT's mark is black on a white square
   (chatgpt.png), so the square is multiplied away into the paper */
.with [data-app-pick='gpt'] img {
  mix-blend-mode: multiply;
}

.with svg {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.with a {
  font-weight: 560;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 5px;
  transition: text-decoration-color 200ms ease-out;
}

.with a:hover {
  text-decoration-color: var(--text);
}

/* Clario's link: one dark pill, its mark, the address, and the page's one press */
.pill {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: fit-content;
  max-width: 100%;
  margin-top: var(--s7);
  padding: 6px 6px 6px 8px;
  border-radius: var(--r-pill);
  background: var(--ink);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 10%) inset,
    0 18px 40px rgb(22 22 26 / 22%);
  color: #fafafa;
}

.pill-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
}

.pill-mark svg {
  width: 24px;
  height: 24px;
}

.pill code {
  min-width: 0;
  overflow: hidden;
  font: 15px / 22px var(--font-mono);
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

.pill button {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: var(--s2);
  border: 0;
  border-radius: 50%;
  background: #fafafa;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms var(--ease),
    background-color 160ms var(--ease);
}

.pill button:hover {
  transform: scale(1.06);
}

.pill button:active {
  transform: scale(0.94);
}

.pill button svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill .i-done,
.pill[data-done] .i-copy {
  display: none;
}

.pill[data-done] .i-done {
  display: block;
}

.pill[data-done] button {
  background: #8fd19e;
}

.pill-note {
  margin-top: var(--s3);
  padding-left: var(--s4);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

.mcp-hero .stage {
  position: absolute;
  inset: var(--s7) 0 var(--s7) var(--s7);
  display: grid;
  align-items: center;
}

.mcp-hero .turn {
  width: min(640px, calc(100% - var(--s7)));
  height: min(480px, 100%);
}

/* ─── Turns: three of a kind share one place, one shown at a time ──────── */
.turn {
  display: grid;
}

.turn > * {
  grid-area: 1 / 1;
  animation: turn 9s infinite;
}

.turn > :nth-child(2) {
  animation-delay: -6s;
}

.turn > :nth-child(3) {
  animation-delay: -3s;
}

/* Three seconds each: in, held, out, and only then the next one in */
@keyframes turn {
  0% {
    opacity: 0;
    translate: 0 10px;
  }

  3%,
  30% {
    opacity: 1;
    translate: 0 0;
  }

  33.3%,
  100% {
    opacity: 0;
    translate: 0 0;
  }
}

/* ─── A window, in the look of the app it is ───────────────────────────── */
.win {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--lift-shadow);
  font: 15px / 22px var(--font-sans);
}

.win-top {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 10px var(--s4);
  font-size: 13px;
  line-height: 18px;
}

.win-top img {
  border-radius: 5px;
}

.win-top span {
  margin-left: auto;
  opacity: 0.72;
}

.win-in {
  display: grid;
  flex: 1;
  grid-template-columns: 128px minmax(0, 1fr);
  min-height: 0;
}

.win-side {
  display: grid;
  align-content: start;
  gap: var(--s2);
  padding: var(--s4) var(--s3);
  font-size: 13px;
  line-height: 18px;
}

.win-side:empty {
  display: none;
}

.win-side:empty + .win-main {
  grid-column: 1 / -1;
  place-content: center;
}

.win-side i {
  height: 8px;
  margin: 6px var(--s2);
  border-radius: var(--r-pill);
  background: currentcolor;
  opacity: 0.1;
}

.win-side i:nth-of-type(even) {
  width: 60%;
}

.s-new {
  padding: 6px var(--s2);
  border-radius: 8px;
  font-weight: 560;
}

.s-h {
  margin-top: var(--s2);
  padding: 0 var(--s2);
  font-size: 12px;
  opacity: 0.78;
}

.win-main {
  display: grid;
  align-content: start;
  gap: var(--s3);
  padding: var(--s6);
}

/* A chat: the question, the call to Clario, the answer, and the box to type in */
.win-main:has(.msgs) {
  grid-template-rows: 1fr auto;
}

.msgs {
  display: grid;
  align-content: start;
  gap: var(--s3);
}

.you {
  justify-self: end;
  text-wrap: pretty;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
}

.tool {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  line-height: 18px;
}

.tool img {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.said {
  font-size: 16px;
  line-height: 25px;
}

.serif {
  font-family: var(--font-display);
}

.input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px var(--s4);
  border-radius: 16px;
  font-size: 14px;
  opacity: 0.9;
}

.input span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 600;
}

/* The agent's mark: a prompt in a dark tile */
svg.agent rect {
  fill: #27272a;
}

svg.agent path {
  fill: none;
  stroke: #fafafa;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Claude: warm paper, ink, its coral */
.win-claude {
  background: #faf9f5;
  color: #141413;
}

.win-claude .win-top {
  border-bottom: 1px solid #e8e6dc;
}

.win-claude .win-side {
  background: #f5f4ed;
  color: #3d3d3a;
}

.win-claude :is(.you, .tool, .s-new) {
  background: #ebe9df;
}

.win-claude .tool {
  color: #5e5d59;
}

.win-claude .input {
  background: #fff;
  box-shadow: 0 0 0 1px #e8e6dc;
}

.win-claude .input span {
  background: #c96442;
  color: #fff;
}

/* ChatGPT: white, soft greys, black pills */
.win-gpt {
  background: #fff;
  color: #0d0d0d;
}

.win-gpt .win-top {
  border-bottom: 1px solid #ececec;
}

.win-gpt .win-side {
  background: #f9f9f9;
  color: #0d0d0d;
}

.win-gpt :is(.you, .tool, .s-new) {
  background: #f0f0f0;
}

.win-gpt .you {
  border-radius: 24px;
}

.win-gpt .tool {
  color: #5d5d5d;
}

.win-gpt .input {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 0 0 1px #e5e5e5;
}

.win-gpt .input span {
  background: #0d0d0d;
  color: #fff;
}

/* Any MCP app: a dark editor, its agent beside the code */
.win-agent {
  background: #18181b;
  color: #e4e4e7;
}

.win-agent .win-top {
  background: #111113;
  border-bottom: 1px solid #27272a;
}

.win-agent .win-side {
  background: #111113;
  color: #a1a1aa;
}

.win-agent :is(.you, .input, .s-new) {
  background: #27272a;
}

.win-agent .you {
  justify-self: stretch;
  max-width: none;
  border-radius: 8px;
}

.win-agent .input {
  border-radius: 10px;
}

.win-agent .input span {
  background: #e4e4e7;
  color: #18181b;
}

.win-agent .tool {
  border-radius: 6px;
  background: rgb(143 209 158 / 12%);
  color: #8fd19e;
  font-family: var(--font-mono);
}

/* ─── Connect in a minute: Claude or ChatGPT, then one step per screen ─────── */
.how {
  padding: var(--section) 0;
  background: var(--white);
}

.stories .how {
  height: 600vh;
  padding: 0;
}

.stories .pin {
  position: sticky;
  top: 0;
  display: grid;
  align-items: center;
  height: 100vh;
  padding-top: 64px;
}

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr;
  gap: var(--s7) var(--s9);
}

.how-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4) var(--s6);
  grid-column: 1 / -1;
}

/* Which app: two tabs, the chosen one ink */
.pick {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--paper);
}

.pick button {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 8px 16px 8px 10px;
  border: 0;
  font: 560 15px / 22px var(--font-sans);
  color: var(--text-2);
  cursor: pointer;
  border-radius: var(--r-pill);
  background: none;
  transition:
    background 300ms var(--ease),
    color 300ms var(--ease);
}

.pick button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--white);
}

.pick img {
  border-radius: 5px;
}

/* Six thin marks: how far along, without naming what is ahead */
.marks {
  display: flex;
  gap: 6px;
  margin-left: auto;
  padding: 0;
  list-style: none;
}

.marks li {
  width: 28px;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--line-2);
  transition: background-color 400ms var(--ease);
}

.marks li.on {
  background: var(--ink);
}

/* One app's words at a time */
.how[data-app='claude'] .for-gpt,
.how[data-app='gpt'] .for-claude {
  display: none;
}

/* Wide screens: every step shares one place, and the scroll crosses them over */
.stories .beat,
.stories .scene {
  grid-row: 2;
  transition:
    opacity 200ms ease-out,
    translate 200ms ease-out,
    scale 200ms ease-out,
    visibility 0s 200ms;
}

.stories .beat.now,
.stories .scene.now {
  transition:
    opacity 500ms var(--ease) 180ms,
    translate 600ms var(--ease) 180ms,
    scale 700ms var(--ease) 180ms,
    visibility 0s;
}

.stories .beat {
  grid-column: 1;
  align-self: center;
}

.stories .scene {
  grid-column: 2;
}

.stories .beat:not(.now) {
  visibility: hidden;
  opacity: 0;
  translate: 0 16px;
}

.stories .scene:not(.now) {
  visibility: hidden;
  opacity: 0;
  scale: 0.98;
}

/* The step's number sits in its heading's line, lighter, so the order is read without a label */
.beat h3 {
  font-size: var(--h2);
  line-height: var(--h2-lh);
  letter-spacing: -0.025em;
}

.num {
  margin-right: 0.4em;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}

.beat .line {
  text-wrap: pretty;
  max-width: 420px;
  margin-top: var(--s4);
  font-size: var(--lede);
  line-height: var(--lede-lh);
  color: var(--text-2);
}

.beat .line b {
  font-weight: 600;
  color: var(--text);
}

.beat .pill,
.beat .open {
  margin-top: var(--s6);
}

.pill-sm {
  padding-left: var(--s5);
  box-shadow: 0 12px 28px rgb(22 22 26 / 18%);
}

/* The app's own page, opened straight from here */
.open {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 12px 18px 12px 22px;
  border-radius: var(--r-pill);
  background: var(--ink);
  font: 560 16px / 24px var(--font-sans);
  color: var(--white);
  text-decoration: none;
  transition: translate 200ms var(--ease);
}

.open:hover {
  translate: 0 -1px;
}

.open svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* Beside each step: one window, on dusk */
.scene {
  display: grid;
  place-items: center;
  height: min(600px, calc(100vh - 220px));
  padding: var(--s7);
  border-radius: var(--r-md);
  background: var(--night) url('/art/dusk.webp') center / cover;
}

.linkcard {
  display: grid;
  gap: var(--s3);
  width: min(100%, 460px);
  padding: var(--s6);
  border-radius: 14px;
  background: var(--night);
  color: #ededef;
  box-shadow: var(--lift-shadow);
}

.linkcard .k {
  font: 560 var(--label) / var(--label-lh) var(--font-sans);
  color: #a6a6ae;
}

.linkcard .u {
  font: 17px / 26px var(--font-mono);
  overflow-wrap: anywhere;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  padding: 6px var(--s3);
  border-radius: var(--r-pill);
  background: rgb(143 209 158 / 16%);
  font: 560 14px / 20px var(--font-sans);
  color: #8fd19e;
}

.chip svg {
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.now .chip {
  animation: pop 500ms var(--ease) 500ms both;
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.8;
  }
}

/* ─── The app, in a browser window, as it looks today (dark) ────────────── */
.jw {
  --bg: #262624;
  --side: #1f1e1d;
  --fg: #f0eee6;
  --mute: #9c9a92;
  --rule: rgb(255 255 255 / 8%);
  --field: #30302e;
  --hot: #d97757;

  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 600px);
  height: min(100%, 440px);
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--lift-shadow);
  font: 13px / 20px var(--font-sans);
  color: var(--fg);
}

.jw-gpt {
  --bg: #212121;
  --side: #181818;
  --fg: #ececec;
  --mute: #a3a3a3;
  --field: #303030;
  --hot: #ececec;
}

.jw-clario {
  --bg: #f5f4f0;
  --fg: #16161a;
  --mute: #6b6b73;
  --rule: rgb(22 22 26 / 8%);
  --hot: #16161a;
}

.jw-url {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #121212;
  color: #c7c7c7;
}

.jw-url i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a3a;
}

.jw-url span {
  flex: 1;
  margin: 0 var(--s7) 0 var(--s4);
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: #262626;
  font-size: 12px;
  text-align: center;
}

/* A skeleton list behind whatever is being pressed */
.rows {
  display: grid;
  gap: var(--s3);
}

.rows p {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: var(--s3);
}

.rows i {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #4a6cf7;
}

.rows p:nth-child(2) i {
  background: #e0a03b;
}

.rows p:nth-child(3) i {
  background: #3fa772;
}

.rows p:nth-child(4) i {
  background: #c25bd1;
}

.rows s {
  width: 70%;
  height: 8px;
  border-radius: 4px;
  background: var(--rule);
}

.rows p:nth-child(even) s {
  width: 52%;
}

/* What to press: lit, and breathing while it waits */
.hot {
  box-shadow: 0 0 0 2px var(--hot);
}

.now .hot {
  animation: ping 1.6s var(--ease) 600ms infinite;
}

@keyframes ping {
  0%,
  100% {
    box-shadow: 0 0 0 2px var(--hot);
  }

  50% {
    box-shadow:
      0 0 0 2px var(--hot),
      0 0 0 7px rgb(217 119 87 / 22%);
  }
}

/* Claude's plugins page */
.cp {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--s4);
  flex: 1;
  padding: var(--s6);
}

.cp-h {
  font-size: 24px;
  line-height: 30px;
}

.cp-bar,
.gp-bar {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.cp-search,
.gp-search {
  flex: 1;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--field);
  color: var(--mute);
}

.cp-tabs {
  display: flex;
  color: var(--mute);
}

.cp-tabs b {
  padding: 5px 10px;
  border-radius: 7px;
  font-weight: 500;
}

.cp-tabs .on {
  background: var(--field);
  color: var(--fg);
}

.cp-add,
.gp-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 5px 12px;
  border-radius: 7px;
  background: #e8e6dc;
  font-weight: 500;
  color: #1f1e1d;
}

.cp-add svg,
.gp-add svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
}

.cp-sec {
  margin-top: var(--s2);
  font-weight: 500;
  color: var(--mute);
}

/* An app's Add menu, open under its button */
.menu {
  position: absolute;
  top: 98px;
  right: var(--s6);
  display: grid;
  gap: 2px;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  background: #30302e;
  box-shadow:
    0 0 0 1px var(--rule),
    0 16px 32px rgb(0 0 0 / 40%);
}

.menu p {
  padding: 7px 10px;
  border-radius: 8px;
}

.menu .hot {
  background: rgb(255 255 255 / 8%);
}

.now .menu {
  animation: drop 400ms var(--ease) 250ms both;
}

@keyframes drop {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

/* A dialog over the dimmed page, the link typing itself in */
.dim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 45%);
}

.dlg {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  gap: var(--s3);
  width: min(88%, 400px);
  padding: var(--s5);
  border-radius: 14px;
  background: var(--bg);
  box-shadow:
    0 0 0 1px var(--rule),
    0 24px 48px rgb(0 0 0 / 50%);
  translate: -50% -50%;
}

.dlg-h {
  font-size: 18px;
  line-height: 24px;
}

.fld {
  display: grid;
  gap: 4px;
}

.fld span {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
}

.fld em {
  font-style: normal;
  color: var(--fg);
}

.fld b {
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--field);
  font-weight: 400;
  white-space: nowrap;
}

.fld.hot {
  box-shadow: none;
  animation: none;
}

.fld.hot b {
  box-shadow: 0 0 0 1.5px var(--hot);
}

.type {
  display: inline-block;
  overflow: hidden;
  max-width: 100%;
  vertical-align: bottom;
}

.now .type {
  animation: typing 1.4s steps(36) 600ms both;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

.dlg-more {
  color: var(--mute);
}

.tick {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.tick i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--fg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%23212121' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain;
}

.acts {
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  margin-top: var(--s2);
}

.acts span {
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--rule);
}

.acts .go {
  background: #e8e6dc;
  font-weight: 500;
  color: #1f1e1d;
  box-shadow: none;
}

.now .acts .go {
  animation: press 600ms var(--ease) 2.2s both;
}

@keyframes press {
  50% {
    scale: 0.94;
  }
}

/* ChatGPT's plugins page: Customize on the left, pills everywhere */
.gp {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  flex: 1;
}

.gp-side {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: var(--s4) var(--s3);
  background: var(--side);
}

.gp-side p {
  padding: 5px 8px;
  border-radius: 8px;
}

.gp-side .gp-t {
  font-weight: 600;
}

.gp-side .on {
  background: var(--field);
}

.gp-side .gp-s {
  margin-top: var(--s2);
  color: var(--mute);
}

.gp-side i {
  height: 8px;
  margin: 6px 8px;
  border-radius: 4px;
  background: var(--rule);
}

.gp-main {
  display: grid;
  align-content: start;
  gap: var(--s3);
  padding: var(--s5);
}

.gp-h {
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.gp-sub {
  color: var(--mute);
}

.gp-bar {
  margin-bottom: var(--s2);
}

.gp-search,
.gp-add,
.gp .acts span {
  border-radius: var(--r-pill);
}

.gp-search {
  overflow: hidden;
  background: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 0 0 1px var(--rule);
}

.gp-add,
.gp .acts .go {
  background: #ececec;
  color: #0d0d0d;
}

.gp .menu {
  top: 150px;
  right: var(--s5);
  background: #2a2a2a;
}

.gp .fld b {
  border-radius: 10px;
}

.now .gp-add.hot {
  animation-name: ping-white;
}

@keyframes ping-white {
  0%,
  100% {
    box-shadow: 0 0 0 2px var(--hot);
  }

  50% {
    box-shadow:
      0 0 0 2px var(--hot),
      0 0 0 7px rgb(236 236 236 / 18%);
  }
}

/* Clario's own sign-in page, as the app opens it */
.ok {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--s3);
  flex: 1;
  padding: var(--s6) var(--s8);
  text-align: center;
}

/* The app's tile, a wire of three dots, Clario's dark tile: the sign-in page's own pair */
.ok-pair {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.ok-pair .tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 0 0 1px var(--rule),
    0 6px 16px -8px rgb(0 0 0 / 30%);
}

.ok-pair .dark {
  background: #111113;
  color: #fff;
}

.ok-pair .dark svg {
  width: 24px;
  height: 24px;
}

.wire {
  display: flex;
  gap: 4px;
}

.wire i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mute);
}

.ok-h {
  margin-top: var(--s2);
  font: 370 22px / 28px var(--font-display);
}

.ok-lead {
  max-width: 340px;
  color: var(--mute);
}

.ok-btn {
  margin-top: var(--s2);
  padding: 9px 22px;
  border-radius: var(--r-pill);
  background: #16161a;
  font-weight: 560;
  color: #fff;
}

.ok-btn.hot {
  box-shadow: 0 0 0 2px #16161a;
}

.now .ok-btn.hot {
  animation-name: ping-ink;
}

@keyframes ping-ink {
  0%,
  100% {
    box-shadow: 0 0 0 2px #16161a;
  }

  50% {
    box-shadow:
      0 0 0 2px #16161a,
      0 0 0 7px rgb(22 22 26 / 14%);
  }
}

.ok-or {
  color: var(--mute);
}

/* The first question, answered from Clario */
.chat {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: var(--s3);
  flex: 1;
  padding: var(--s6);
  font-size: 14px;
  line-height: 21px;
}

.chat .you {
  background: var(--field);
}

.chat .tool {
  background: var(--field);
  color: var(--mute);
}

.chat .said {
  font-size: 15px;
  line-height: 23px;
}

.jw-claude .said {
  font-family: var(--font-display);
}

.chat .reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  background: var(--field);
  color: var(--mute);
}

.jw-gpt .chat .reply,
.jw-gpt .chat .you {
  border-radius: 22px;
}

.reply svg,
.input svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat .reply span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hot);
  font-weight: 600;
  color: var(--bg);
}

.now .chat > * {
  animation: rise-in 600ms var(--ease) both;
}

.now .chat > :nth-child(2) {
  animation-delay: 500ms;
}

.now .chat > :nth-child(3) {
  animation-delay: 1s;
}

/* ─── Then just ask: the questions on the left, Claude answering the chosen one on tide ── */
.stories .asks {
  height: 500vh;
  padding: 0;
}

.stories .asks .head + * {
  margin-top: var(--s6);
}

.ask-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--s7);
}

/* One question at a time, in the steps' voice, and six marks: where you are, and a way to jump */
.ask-say {
  display: grid;
  align-content: center;
}

.ask-marks {
  display: flex;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.ask-marks li {
  position: relative;
  width: 36px;
  height: 3px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line-2);
}

.ask-marks li::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.ask-marks li.on::after {
  transform: scaleX(1);
}

/* Wide screens: the current mark fills as the scroll reads through it (home.js `--through`) */
.stories .ask-marks li.now::after {
  transform: scaleX(clamp(0, calc(var(--through, 0) - var(--k)), 1));
}

/* Phones: it fills with the clock while the questions walk by themselves */
[data-playing] .ask-marks li.now::after {
  animation: ask-fill var(--cycle) linear both;
}

@keyframes ask-fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.ask-marks li:nth-child(1) {
  --k: 0;
}

.ask-marks li:nth-child(2) {
  --k: 1;
}

.ask-marks li:nth-child(3) {
  --k: 2;
}

.ask-marks li:nth-child(4) {
  --k: 3;
}

.ask-marks li:nth-child(5) {
  --k: 4;
}

.ask-marks li:nth-child(6) {
  --k: 5;
}

/* The mark is thin; what is pressed is the space around it */
.ask-marks button {
  position: absolute;
  inset: -12px -3px;
  border: 0;
  background: none;
  cursor: pointer;
}

.ask-marks li:has(button:hover) {
  background: var(--text-3);
}

.ask-beat {
  grid-area: 2 / 1;
  margin-top: var(--s6);
  transition:
    opacity 200ms ease-out,
    translate 200ms ease-out,
    visibility 0s 200ms;
}

.ask-beat.now {
  transition:
    opacity 500ms var(--ease) 180ms,
    translate 600ms var(--ease) 180ms,
    visibility 0s;
}

.js .ask-beat:not(.now) {
  visibility: hidden;
  opacity: 0;
  translate: 0 16px;
}

.ask-art {
  display: grid;
  place-items: center;
  height: min(520px, calc(100vh - 330px));
  padding: var(--s7);
}

.ask-win {
  width: min(100%, 560px);
}

.ask-main {
  display: grid;
  gap: var(--s5);
  padding: var(--s6);
}

.ask-a {
  display: grid;
  grid-area: 1 / 1;
  align-content: start;
  gap: var(--s3);
  min-height: 280px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 200ms ease-out,
    visibility 0s 200ms;
}

.ask-a.now {
  opacity: 1;
  visibility: visible;
  transition: opacity 500ms var(--ease) 180ms;
}

.ask-a.now > * {
  animation: rise-in 600ms var(--ease) both;
}

.ask-a.now > :nth-child(2) {
  animation-delay: 350ms;
}

.ask-a.now > :nth-child(3) {
  animation-delay: 700ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

.ask-main .input {
  grid-area: 2 / 1;
}

/* An answer drawn as Clario draws it: rows, ticks, times, a quote */
.a-card {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s2);
  padding: var(--s4);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px #e8e6dc;
  font-size: 14px;
  line-height: 20px;
}

.a-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid #efede6;
}

.a-meta span,
.a-hit time,
.a-slot time,
.a-who time {
  color: #6b6a63;
}

.a-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s2);
}

.a-who time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.a-mark {
  width: 7px;
  height: 7px;
  rotate: 45deg;
  background: #c96442;
}

.box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-shadow: 0 0 0 1.5px #b9b6ab inset;
}

.a-row em {
  font-style: normal;
  font-size: 12px;
  color: #c96442;
}

.a-row.done {
  color: #6b6a63;
  text-decoration: line-through;
}

.a-row.done .box {
  background: #5d9b6a;
  box-shadow: none;
}

.a-row.done em {
  color: #5d9b6a;
  text-decoration: none;
}

.a-hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s3);
}

.a-hit + .a-hit {
  padding-top: var(--s2);
  border-top: 1px solid #efede6;
}

.a-hit span {
  grid-column: 1;
  color: #5e5d59;
}

.a-hit time {
  grid-area: 1 / 2;
  font-size: 12px;
}

.a-hit mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgb(201 100 66 / 18%);
  color: inherit;
}

.a-slot {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  padding: 6px 0;
}

.a-slot time {
  font-variant-numeric: tabular-nums;
}

.a-slot b {
  font-weight: 500;
}

.a-slot em {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: #f3f1ea;
  font-style: normal;
  font-size: 12px;
  color: #6b6a63;
}

.a-slot em.on {
  background: rgb(93 155 106 / 14%);
  color: #3f7a4c;
}

.a-quote .serif {
  font-size: 18px;
  line-height: 27px;
}

.a-who {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.a-who i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c96442;
  font: 600 12px / 1 var(--font-sans);
  color: #fff;
}

.a-who time {
  margin-left: auto;
}

@media (width <= 1100px) {
  .mcp-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .mcp-hero .page-art {
    height: 520px;
  }

  .ask-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Where nothing pins, the steps follow one another down the page, each above its window */
@media (width <= 860px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s5);
  }

  .marks {
    display: none;
  }

  .beat {
    margin-top: var(--s7);
  }

  .beat h3 {
    font-size: var(--h3);
    line-height: var(--h3-lh);
  }

  .scene {
    height: 440px;
    margin-inline: calc(-1 * var(--gutter));
    padding: var(--s5) var(--s4);
    border-radius: 0;
  }

  .jw {
    height: 100%;
  }

  .cp-tabs b:not(.on) {
    display: none;
  }
}

@media (width <= 720px) {
  .mcp-hero .page-art {
    height: 460px;
  }

  /* The painting runs off the page's right edge; the window stays on the screen */
  .mcp-hero .stage {
    inset: var(--s5) auto var(--s5) var(--s4);
    width: calc(100vw - 2 * var(--gutter) - 32px);
  }

  .win-in {
    grid-template-columns: minmax(0, 1fr);
  }

  .win-side {
    display: none;
  }

  .win-main {
    padding: var(--s4);
  }

  .pill code {
    font-size: 13px;
  }

  .pill {
    gap: var(--s2);
  }

  .ask-art {
    height: auto;
    margin-inline: calc(-1 * var(--gutter));
    padding: var(--s6) var(--s4);
    border-radius: 0;
  }

  .ask-main {
    padding: var(--s4);
  }

  .ask-a {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beat,
  .scene,
  .ask-beat,
  .ask-a,
  .pick button {
    transition: none;
  }

  .turn > *,
  .now :is(.chip, .type, .hot, .menu, .acts .go),
  .now .chat > *,
  .ask-a.now > * {
    animation: none;
  }

  /* Without motion, the first of each turn shows */
  .turn > :not(:first-child) {
    visibility: hidden;
  }
}

/* ─── What the browser draws: focus rings and selection, in the page's ink ── */
.mcp :is(a, button):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.mcp .pill button:focus-visible,
.mcp .open:focus-visible {
  outline-offset: 4px;
}

.mcp .ask-marks button:focus-visible {
  outline-offset: -8px;
  border-radius: var(--r-pill);
}

.mcp ::selection {
  background: rgb(22 22 26 / 14%);
  color: var(--ink);
}
