/* The AI & MCP page (/mcp): Starling inside the assistant you already use. One story from top to bottom: what it
   looks like in a chat (the opening's conversation writes a score), what to ask (four cards: what you say, what you get), more
   requests, three steps to connect, questions, and the way in. The step-by-step guides live on /mcp/setup and keep
   their styles in styles.css. The opening's picker and film keep theirs there too (.mcp-picks, .mcp-go, .film-*).
   The list of more requests and the closing band are the Use cases page's (use-cases.css, .more-list, .uc-end). */

/* A conversation, drawn as the homepage draws Starling's: a panel a tone darker than the page, your words on ink,
   the reply on the panel with its score raised on white (home.css, .home .chat). */
.mcp-chat {
  --night-line: var(--hair-strong);
  --on-night: var(--ink);
  --on-night-muted: var(--muted);
  margin: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--layer-1);
}
.mcp-chat .chat-bar {
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--hair-strong);
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.mcp-chat .chat-conn {
  color: var(--muted);
}
.chat-host {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.chat-host .logo {
  width: 16px;
  height: 16px;
}
.chat-host .logo-claude {
  color: #d97757;
}
.mcp-chat .chat-log {
  gap: var(--space-4);
  padding: var(--space-5);
}
.mcp-chat .msg-user {
  border: 0;
  border-radius: var(--radius-md) var(--radius-md) var(--radius-xs) var(--radius-md);
  background: var(--ink);
  color: var(--paper);
}
.mcp-chat .msg-user .attach {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}
.mcp-chat .msg p {
  text-wrap: pretty;
}
.mcp-chat .avatar {
  padding: 0;
  border-radius: 0;
  background: none;
}
/* Starling keeps its paper in the dark: an ink bird on a dark page reads as a ghost. */
[data-theme="dark"] .mcp-chat .avatar {
  padding: 3px;
  border-radius: 50%;
  background: #fdfdfc;
}
.mcp-chat .msg-bot > div > p {
  padding-top: var(--space-1);
}
.mcp-chat .panel {
  border: 0;
  background: var(--white);
  box-shadow: var(--ring);
}
.mcp-chat .panel-head {
  border-bottom: 1px solid var(--hair-strong);
  background: none;
}
.mcp-chat .panel-head strong {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mcp-chat .panel-head span {
  font-variant-numeric: tabular-nums;
}
.mcp-chat .file-row {
  border: 0;
  border-radius: 0;
}
.mcp-chat .file-row + .file-row {
  border-top: 1px solid var(--hair-strong);
}

/* The opening: the words and the one way in on the left, the conversation on the right, both starting on one line. */
.mcp-hero {
  padding: clamp(24px, 3.2vw, 48px) 0 clamp(64px, 7vw, 96px);
}
.mcp-hero-grid {
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  grid-template-areas:
    "copy chat"
    "start chat";
  column-gap: clamp(32px, 5vw, 72px);
}
.mcp-hero-start {
  align-self: end;
}
.mcp-hero-kicker {
  margin-bottom: var(--space-5);
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mcp-hero-title em {
  color: inherit;
}
.mcp-hero-lede {
  max-width: 26em;
  color: var(--ink-soft);
}
.mcp-hero-chat {
  grid-area: chat;
}
.mcp-hero-chat .msg-bot {
  max-width: 100%;
}
/* The film is the reply: the score being written, on its own paper, then played back. */
.mcp-hero-chat .mcp-film {
  margin-top: var(--space-3);
}
.mcp-hero-chat .film-roll {
  background: var(--layer-2);
}
.mcp-hero-chat .mcp-film-caption {
  color: var(--muted);
}

/* What to ask: four requests, each a card that shows the words and the result. */
.mcp-ask {
  padding: clamp(64px, 7vw, 96px) 0 0;
}
.mcp-head {
  max-width: 780px;
}
.mcp-head .eyebrow {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mcp-head h2 {
  margin-top: var(--space-4);
  font-size: var(--display-2);
}
.mcp-head .section-lede {
  margin-top: var(--space-5);
  color: var(--ink-soft);
  text-wrap: pretty;
}
/* Four requests, all in view: each card names what it gives, then shows the words you say and what comes back. */
.ask-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}
.ask-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-items: start;
  gap: var(--space-5) var(--space-3);
  padding: var(--space-6);
}
.ask-card h3 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: baseline;
  margin-bottom: var(--space-2);
  font-size: 24px;
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.ask-num {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}
.ask-label {
  padding-top: var(--space-4);
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ask-said {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  justify-content: start;
  align-items: start;
  gap: var(--space-2) var(--space-3);
}
/* What was sent with the words: a recording, drawn as a file with its waveform so it reads as an upload. */
.ask-file {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 40px minmax(0, 168px);
  grid-template-areas:
    "icon wave"
    "icon name";
  align-items: center;
  gap: var(--space-1) var(--space-3);
  width: fit-content;
  max-width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--ring);
}
.ask-file-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.ask-file-icon .icon {
  width: 16px;
  height: 16px;
}
.ask-file-wave {
  grid-area: wave;
  width: 100%;
  height: 28px;
  fill: var(--ink);
}
.ask-file-name {
  grid-area: name;
  font: 500 12px / 1 var(--mono);
  color: var(--ink-soft);
}
.ask-file-meta {
  grid-area: name;
  justify-self: end;
  font: 500 12px / 1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.ask-card .msg-user {
  justify-self: start;
  max-width: 100%;
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-xs);
}
.ask-card .msg-user q {
  font-size: 16px;
  font-weight: 500;
  line-height: var(--lh-ui);
  quotes: none;
  text-wrap: pretty;
}
/* Copy sits beside the words, quiet until it is wanted. */
.public-page main .ask-copy {
  flex: none;
  margin-top: var(--space-1);
  min-height: 32px;
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 13px;
  color: var(--muted);
}
.public-page main .ask-copy:hover {
  background: var(--layer-2);
  color: var(--ink);
}
.ask-card .panel {
  min-width: 0;
}
.ask-card .panel-meta {
  align-self: center;
  font-size: 13px;
  color: var(--muted);
}

/* More requests: the Use cases page's list, each row opening the chosen assistant with the request written. */
.mcp-more.uc-more {
  padding-top: clamp(72px, 8vw, 112px);
}
.mcp-more .more-from {
  color: var(--ink);
}
.mcp-more .more-from::before {
  content: open-quote;
}
.mcp-more .more-from::after {
  content: close-quote;
}
.mcp-more .more-to {
  font-weight: 400;
  color: var(--ink-soft);
}
.mcp-more .more-list button {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.mcp-more-note {
  margin-top: var(--space-4);
  font-size: 14px;
  line-height: var(--lh-ui);
  color: var(--muted);
}

/* Three steps to connect, beside the one drawing of the page: Starling on a laptop that shows the assistants. */
.mcp-connect {
  padding: clamp(72px, 8vw, 112px) 0 0;
}
.connect-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  column-gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.connect-art {
  display: grid;
  justify-items: center;
  margin: 0;
}
.connect-art img {
  width: min(100%, 340px);
  height: auto;
}
/* The drawing is never inverted: in the dark it is a print on its own paper. */
[data-theme="dark"] .connect-art {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: #fff;
}
.connect-steps {
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hair-strong);
}
.connect-steps li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: baseline;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--hair-strong);
}
.connect-steps .ask-num {
  color: var(--accent-text);
}
.connect-steps h3 {
  font: 500 20px / var(--lh-snug) var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.connect-steps p {
  grid-column: 2;
  max-width: 34em;
  margin-top: var(--space-1);
  font-size: 15px;
  line-height: var(--lh-ui);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}
.connect-aside {
  margin-top: var(--space-4);
  font-size: 14px;
  line-height: var(--lh-ui);
  color: var(--muted);
}

.mcp-faq {
  padding-bottom: 0;
}
.mcp-faq .eyebrow {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Chinese titles are set in the sans, where a line of the opening needs less air than the printed capitals. */
:root:lang(zh) .mcp-hero-title {
  line-height: var(--lh-heading);
}
/* Chinese breaks between any two characters, so the opening's paragraph is as wide as 18 and a half characters: the
   lines then end on the commas and no phrase (说出你要什么) is cut. */
:root:lang(zh) .mcp-hero-lede {
  max-width: 18.5em;
}
:root:lang(zh) :is(.ask-card h3, .connect-steps h3) {
  font-weight: 600;
}

@media (max-width: 1180px) {
  .mcp-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "start"
      "chat";
  }
  .mcp-hero-chat {
    margin-top: var(--space-8);
  }
}
@media (max-width: 900px) {
  .connect-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ask-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .connect-art {
    order: 2;
    margin-top: var(--space-8);
  }
  .connect-art img {
    width: min(64%, 260px);
  }
}
@media (max-width: 600px) {
  .mcp-hero {
    padding-top: var(--space-2);
    padding-bottom: 0;
  }
  /* On a phone the first screen is the proof: one line of headline, then the chat with its film, whose title bar names
     the assistant and which shows what the paragraph says. The picks and button follow the chat; the dock appears
     only after the opening leaves view. */
  .mcp-hero-grid {
    grid-template-areas:
      "copy"
      "chat"
      "start";
  }
  :is(.mcp-hero-kicker, .mcp-hero-title .line + .line, .mcp-hero-lede) {
    display: none;
  }
  .mcp-hero-chat {
    margin-top: var(--space-3);
  }
  .mcp-hero-start {
    margin-top: var(--space-2);
  }
  /* Give the full animation the reply's width, keeping the controls directly below it. */
  .mcp-hero-chat .msg-bot > div {
    display: contents;
  }
  .mcp-hero-chat .msg-bot > div > p {
    grid-column: 2;
  }
  .mcp-hero-chat .mcp-film {
    grid-area: auto;
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .mcp-hero-chat .chat-log {
    gap: var(--space-2);
  }
  .mcp-chat .chat-log {
    padding: var(--space-3);
  }
  .mcp-chat .msg-bot {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: var(--space-2);
  }
  .mcp-chat .avatar {
    width: 24px;
    height: 24px;
  }
  .mcp-head h2 {
    margin-top: var(--space-3);
  }
  .ask-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-4);
  }
  .ask-card h3 {
    display: block;
    font-size: 20px;
  }
  .ask-card h3 .ask-num {
    display: block;
    margin-bottom: var(--space-2);
  }
  .ask-label {
    padding-top: var(--space-2);
  }
  /* The words take the card's width; Copy moves up beside "You say", quiet, so no request breaks to make room for it. */
  .ask-card > :not(.ask-label) {
    grid-column: 1 / -1;
  }
  .ask-said {
    display: contents;
  }
  .ask-said > * {
    grid-column: 1 / -1;
  }
  .public-page main .ask-card .ask-copy:not(.is-copied) {
    grid-area: 2 / 2;
    align-self: end;
    height: 44px;
    margin: -16px 0;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  /* What was saved goes under the buttons whole instead of breaking beside them. */
  .ask-card .panel-meta {
    flex: 0 1 auto;
    padding-left: 0;
    line-height: 32px;
    white-space: nowrap;
  }
  .mcp-chat .panel-score {
    padding: var(--space-3) var(--space-3) var(--space-1);
  }
  /* A request and what it gives stack: the request in ink, the result under it. */
  .mcp-more .more-head {
    display: none;
  }
  .mcp-more .more-list :is(a, button) {
    grid-template-columns: minmax(0, 1fr) 24px;
    row-gap: var(--space-1);
    padding: var(--space-4) 0;
    font-size: 16px;
  }
  .mcp-more .more-list .icon {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .mcp-more .more-to {
    grid-column: 1;
    font-size: 14px;
    color: var(--muted);
  }
  .connect-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}
/* On a phone the way in follows the reader: once no install button is on screen (mcp.js), the chosen assistant's button
   waits at the foot of the screen. It leaves again when the page's own button, or the footer, comes into view. */
.mcp-dock {
  display: none;
}
@media (max-width: 600px) {
  .mcp-dock {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    display: grid;
    padding: var(--space-3) var(--space-5) calc(var(--space-3) + env(safe-area-inset-bottom));
    background: var(--paper);
    box-shadow: 0 -1px 0 var(--hair);
    visibility: hidden;
    transform: translateY(100%);
    transition:
      transform 0.32s var(--ease-settle),
      visibility 0.32s;
  }
  .mcp-dock.is-shown {
    visibility: visible;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mcp-dock {
    transition: none;
  }
}
/* The setup guide (/mcp/setup): its eyebrow is the way back to this page. */
.eyebrow-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
  text-decoration: none;
}
.eyebrow-back .icon {
  width: 14px;
  height: 14px;
}
.eyebrow-back:hover {
  color: var(--ink);
}

/* On a wider screen the picks stay on one row beside the chat, in every edition. */
@media (min-width: 601px) {
  .mcp-picks {
    flex-wrap: nowrap;
  }
}

/* A pick is a link to its own button (/mcp#claude), which is already on the first screen: the page stays at the top. */
.mcp-go[id] {
  scroll-margin-top: 100vh;
}
