/* The pages other than the homepage: product pages, developers, pricing, security, legal and 404. base.css comes
   first. Pictures of the product keep the product's own sans (Geist) on white, as the real messenger looks. */

:root {
  --hue: 33;
  --tint: #c4381f0f;
  --tint-border: #c4381f59;
  --glow: transparent;
  --highlight: 0 0 #0000;
  --shadow: 0 1px 0 #0000000d, 0 1.5rem 3rem -1.5rem #3b2a1659;
  --radius: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
}

.muted {
  color: var(--ink-2);
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--thread);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Sections */

section {
  padding-block: 5rem;
}

.section-heading {
  display: grid;
  max-width: 44rem;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.band {
  border-block: 1px solid var(--ink);
  background: var(--sheet);
}

.card,
.panel {
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: var(--sheet);
}

.badge {
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--thread);
  border-radius: 2px;
  color: var(--thread);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soon,
.live {
  margin-left: 0.375rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.live {
  background: #3d7a4f1f;
  color: var(--ok);
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 1.25rem;
  background: var(--ink);
  color: var(--code-ink);
  line-height: 1.7;
}

.cta {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

/* Syntax colors for the hand-highlighted code samples: Monokai Pro's. */
.tok-tag,
.tok-kw,
.tok-bad {
  color: #ff6188;
}

.tok-key {
  color: #78dce8;
}

.tok-str {
  color: #ffd866;
}

.tok-num {
  color: #ab9df2;
}

.tok-fn {
  color: #a9dc76;
}

.tok-dim {
  color: #939293;
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 0.75rem;
  }
}

@keyframes spin {
  to {
    rotate: 1turn;
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* A picture of the messenger inside a made-up customer's product, so visitors see what their customers would. */

.window {
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 0.875rem;
  background: var(--sheet);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule);
  background: oklch(0.25 0.02 70 / 0.02);
}

.window-url {
  margin-inline: auto;
  padding: 0.125rem 2.5rem;
  border-radius: 0.375rem;
  background: oklch(0.25 0.02 70 / 0.04);
  color: var(--ink-3);
  font-size: 0.75rem;
}

.pill {
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.75rem;
}

/* Light with a near-black accent, as the real messenger is by default (packages/widget/src/messenger.tsx). */

.messenger-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule);
}

.messenger-header strong {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
}

.messenger-avatar {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4375rem;
  background: var(--thread);
  color: #fff;
  place-items: center;
}

.messenger-avatar svg {
  width: 0.875rem;
  height: 0.875rem;
}

.avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 650;
  place-items: center;
}

.avatar.small {
  width: 1.75rem;
  height: 1.75rem;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.75rem;
}

/* Anchored to the bottom like a real chat, so older messages leave through the top. */
.messenger-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.625rem;
  overflow: hidden;
  padding: 1rem;
}

.bubble {
  max-width: 85%;
  padding: 0.5rem 0.8125rem;
  border-radius: 1rem;
  line-height: 1.45;
}

/* The visitor's words in a tint; the agent's reply as plain text, like a document rather than a chat bubble. */
.bubble.user {
  align-self: flex-end;
  background: oklch(0.55 0.17 33 / 0.2);
  color: var(--ink);
}

.bubble.agent {
  align-self: flex-start;
}

.bubble.agent:not(.teammate) {
  max-width: 100%;
  padding-inline: 0;
}

.tool-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.tool-step.running {
  background: linear-gradient(90deg, var(--ink-3) 40%, var(--ink) 50%, var(--ink-3) 60%) 0 0 / 200% 100%;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.4s linear infinite;
}

/* A check when done, a spinner while running. */
.glyph {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  background: var(--ok);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.running .glyph {
  border: 1.5px solid var(--ink-3);
  border-top-color: var(--ink);
  border-radius: 50%;
  background: none;
  mask: none;
  animation: spin 0.7s linear infinite;
}

.messenger-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0.75rem 0.75rem;
  padding: 0.375rem 0.375rem 0.375rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.875rem;
  background: #fff;
  color: var(--ink-3);
}

.messenger-input svg {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.375rem;
  border-radius: 0.5rem;
  background: var(--thread);
  color: #fff;
}

/* Panels and their parts, shared by the product pages */

.chapter-head {
  display: grid;
  align-items: end;
  gap: 1.5rem 4rem;
  margin-bottom: 3rem;
  grid-template-columns: 1.2fr 1fr;
}

.chapter-head.acting {
  margin-top: 5rem;
}

.chapter-head .lead {
  font-size: 1rem;
}

@media (max-width: 52rem) {
  .chapter-head {
    grid-template-columns: 1fr;
  }
}

.label {
  margin-bottom: 1.25rem;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.label span {
  margin-right: 0.5rem;
  color: var(--thread);
}

.panel.vignette {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 22rem;
  gap: 1.5rem;
  padding: 1.5rem;
  font-size: 0.875rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.chip {
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 0.375rem;
  background: oklch(0.25 0.02 70 / 0.03);
  color: var(--ink-2);
  font-size: 0.75rem;
}

.small-label {
  color: var(--ink-3);
  font-size: 0.75rem;
}

/* Tools */

.tools {
  align-items: start;
  grid-template-columns: 1fr 1fr;
}

.server {
  display: grid;
  gap: 1rem;
}

.server-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.server-head > span:nth-child(2) {
  display: grid;
  flex: 1;
  line-height: 1.35;
}

.server-head small {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.server-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  place-items: center;
}

.secret {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: #fff;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.secret code {
  flex: 1;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.lock {
  color: var(--thread);
  font-size: 0.75rem;
}

.lock::before {
  margin-right: 0.25rem;
  content: '🔒︎';
}

.setting {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
}

.setting > span:first-child {
  display: grid;
  flex: 1;
  gap: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.setting strong {
  font-weight: 550;
}

.setting small {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.switches {
  display: grid;
  gap: 0.5rem;
  margin-top: -0.5rem;
  font-size: 0.8125rem;
}

.switches > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.switch {
  position: relative;
  width: 1.75rem;
  height: 1rem;
  flex: none;
  border-radius: 999px;
  background: var(--rule-strong);
}

.switch::after {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--ink-2);
  content: '';
}

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

.switch.on::after {
  left: 0.875rem;
  background: #fff;
}

@media (max-width: 52rem) {
  .tools {
    grid-template-columns: 1fr;
  }
}

/* Skills */

.skill {
  display: grid;
  gap: 0.125rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.skill strong {
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 550;
}

.skill.active {
  border-color: oklch(0.55 0.17 33 / 0.35);
  background: oklch(0.55 0.17 33 / 0.08);
}

.skill.active strong {
  color: var(--ink);
}

.loaded {
  margin-left: 0.5rem;
  padding: 0 0.375rem;
  border-radius: 0.25rem;
  background: var(--thread-soft);
  color: var(--thread);
  font-size: 0.6875rem;
  font-weight: 500;
}

.skill-body {
  display: grid;
  gap: 0.625rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--ink);
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* Components */

.order-card {
  display: grid;
  width: 16rem;
  gap: 0.375rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: oklch(0.25 0.02 70 / 0.03);
  justify-items: start;
}

.order-card > span:first-child {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.order-eta {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.order-button {
  margin-top: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
  font-weight: 550;
}

/* Inbox */

.threads {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  padding: 0.75rem;
  border-right: 1px solid var(--rule);
}

.thread {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem;
  border-radius: 0.5rem;
}

.thread > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  line-height: 1.35;
}

.thread strong {
  font-size: 0.8125rem;
  font-weight: 550;
}

.thread small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread.active {
  background: oklch(0.25 0.02 70 / 0.06);
}

.who {
  padding: 0.0625rem 0.4375rem;
  border-radius: 999px;
  background: oklch(0.8 0.11 250 / 0.14);
  color: oklch(0.45 0.1 250);
  font-size: 0.6875rem;
}

.who.agent {
  background: var(--thread-soft);
  color: var(--thread);
}

.who.flag {
  background: oklch(0.8 0.14 75 / 0.14);
  color: oklch(0.5 0.11 70);
}

.conversation {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.conversation-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-replies {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* The customer on the left, the agent and the team on the right. */
.message {
  display: grid;
  max-width: 75%;
  gap: 0.375rem;
}

.message.mine {
  align-self: flex-end;
  justify-items: end;
}

.message small {
  color: var(--ink-3);
  font-size: 0.6875rem;
}

.conversation .bubble {
  max-width: none;
}

.conversation .bubble.user {
  background: var(--wash);
}

.bubble.teammate {
  border: 1px solid oklch(0.55 0.17 33 / 0.25);
  background: var(--thread-soft);
}

@media (max-width: 52rem) {
  .threads {
    display: none;
  }

  .message {
    max-width: 90%;
  }
}

/* Embed */

.editor-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.editor-tabs input {
  position: absolute;
  opacity: 0;
}

.editor-tabs label {
  padding: 0.75rem 1.125rem;
  border-right: 1px solid var(--rule);
  color: var(--ink-3);
  cursor: pointer;
}

.editor-tabs input:checked + label {
  background: var(--sheet);
  box-shadow: inset 0 -2px 0 var(--thread);
  color: var(--ink);
}

.editor-tabs input:focus-visible + label {
  outline: 2px solid var(--thread);
  outline-offset: -2px;
}

.preview {
  display: flex;
  flex-direction: column;
  margin: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
}

.preview-page {
  position: relative;
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 4.5rem;
}

.skeleton {
  height: 0.625rem;
  border-radius: 999px;
  background: oklch(0.25 0.02 70 / 0.07);
}

.skeleton.wide {
  width: 60%;
  height: 1rem;
}

.skeleton.short {
  width: 40%;
}

.skeleton.block {
  height: 6rem;
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  background: oklch(0.25 0.02 70 / 0.04);
}

/* The messenger's default layout: an ask bar along the bottom of the page. */
.ask-bar {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  width: min(22rem, calc(100% - 2rem));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  border: 1px solid #ececf0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 24px -8px oklch(0.3 0.03 60 / 0.2);
  color: #86868b;
  font-size: 0.8125rem;
}

.ask-bar kbd {
  margin-left: auto;
  padding: 0.0625rem 0.375rem;
  border: 1px solid #ececf0;
  border-radius: 0.3125rem;
  font-family: inherit;
  font-size: 0.6875rem;
}

.ask-bar svg {
  width: 1rem;
  height: 1rem;
  color: #1d1d1f;
}

@media (max-width: 52rem) {
  .preview {
    display: none;
  }
}

/* Closing */

.closing {
  padding-block: 5rem 6rem;
  border-top: 1px solid var(--ink);
  background: var(--sheet);
}

.closing .container {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.closing h2 {
  max-width: 16em;
}

.closing .lead {
  margin-top: 0;
}

.closing-note {
  max-width: 36rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

/* Not found page */

/* Fills most of the screen so the footer stays near the bottom. */
.not-found {
  display: grid;
  min-height: 75svh;
  align-content: center;
  text-align: center;
}

.not-found .container {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}

.not-found .actions {
  justify-content: center;
}

/* Pricing page */

.pricing-hero {
  padding-block: 4.5rem 2.5rem;
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-bottom: 2.5rem;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.875rem;
}

.toggle legend {
  float: left;
  margin-right: 0.75rem;
  color: var(--ink-2);
}

.segmented {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 0.25rem);
  background: var(--sheet);
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented label {
  padding: 0.375rem 0.875rem;
  white-space: nowrap;
  border-radius: var(--radius);
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
}

.segmented input:checked + label {
  background: var(--ink);
  color: var(--paper);
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.segmented .save {
  margin-left: 0.375rem;
  opacity: 0.75;
  font-size: 0.75rem;
}

@media (max-width: 40rem) {
  .toggle {
    flex-direction: column;
    gap: 0.5rem;
  }

  .toggle legend {
    float: none;
    margin: 0 0 0.5rem;
  }

  /* The AI usage options are too long for one line side by side on a phone. */
  .segmented {
    max-width: 100%;
  }

  .segmented label {
    padding-inline: 0.75rem;
    white-space: normal;
    text-align: center;
  }
}

.plans {
  display: grid;
  align-items: stretch;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
}

.plan.featured {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.plan-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.125rem;
}

.plan-price {
  display: grid;
  gap: 0.25rem;
  min-height: 5.25rem;
}

.amount {
  font-size: 2.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
}

.amount small {
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.plan-price .muted {
  font-size: 0.875rem;
}

.plan-usage {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--wash);
  font-size: 0.9375rem;
}

.plan-usage strong {
  display: block;
}

.plan-usage span {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.plan ul {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  list-style: none;
}

.plan li {
  display: flex;
  gap: 0.625rem;
}

.plan li::before {
  flex: none;
  width: 1.125rem;
  height: 1.5rem;
  background: var(--ink);
  content: '';
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.plan .button {
  width: 100%;
}

/* Prices for the chosen billing period and model usage. Each card holds all four; CSS shows one. */
.price {
  display: none;
}

body:has(#monthly:checked):has(#included:checked) .price.monthly.included,
body:has(#yearly:checked):has(#included:checked) .price.yearly.included,
body:has(#monthly:checked):has(#own-key:checked) .price.monthly.own-key,
body:has(#yearly:checked):has(#own-key:checked) .price.yearly.own-key {
  display: grid;
}

.usage {
  display: none;
}

body:has(#included:checked) .usage.included,
body:has(#own-key:checked) .usage.own-key {
  display: block;
}

/* A price in the comparison table, for the chosen billing period. */
.period {
  display: none;
}

body:has(#monthly:checked) .period.monthly,
body:has(#yearly:checked) .period.yearly {
  display: inline;
}

.fine-print {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
}

.weights {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.weight {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem;
}

.weight strong {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.weight span {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

thead th {
  font-weight: 600;
}

tbody th {
  color: var(--ink-2);
  font-weight: 400;
}

tbody tr.group th {
  padding-top: 2rem;
  color: var(--ink);
  font-weight: 600;
}

.faq {
  display: grid;
  max-width: 48rem;
  margin-inline: auto;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  padding-block: 1.25rem;
  cursor: pointer;
  font-weight: 550;
}

.faq details p {
  padding-bottom: 1.25rem;
  color: var(--ink-2);
}

/* Developers */

.docs-hero {
  padding-block: 4.5rem 2.5rem;
}

.docs-hero .section-heading {
  margin-bottom: 2rem;
}

.docs-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.your-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.25rem 1.5rem;
}

.your-key p {
  display: grid;
  gap: 0.25rem;
}

.your-key.signed-in {
  border-color: oklch(0.55 0.17 33 / 0.35);
}

.your-key code {
  color: var(--thread);
  overflow-wrap: anywhere;
}

.docs {
  display: grid;
  align-items: start;
  gap: 4rem;
  grid-template-columns: 12rem minmax(0, 1fr);
  padding-bottom: 2rem;
}

.docs-nav {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 0.25rem;
  padding-top: 3rem;
  font-size: 0.875rem;
}

.docs-nav a {
  padding-block: 0.25rem;
  color: var(--ink-2);
  text-decoration: none;
}

.docs-nav a:hover,
.docs-nav a[aria-current='page'] {
  color: var(--ink);
}

.docs-nav a[aria-current='page'] {
  font-weight: 600;
}

.docs-body {
  display: grid;
}

.doc {
  display: grid;
  gap: 1.25rem;
  padding-block: 3rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 4rem;
}

.doc:first-child {
  border-top: 0;
}

.doc h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.doc h3 {
  margin-top: 1rem;
  scroll-margin-top: 5rem;
}

.doc > p {
  max-width: 44rem;
  text-wrap: pretty;
}

.doc p code,
.doc td code,
.doc th code {
  color: var(--ink);
  font-size: 0.8125rem;
}

.doc a {
  color: var(--thread);
}

.code {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--ink);
}

.code-bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.code-bar > span {
  padding: 0.625rem 1.125rem;
}

.code-bar.editor-tabs label {
  padding-block: 0.625rem;
}

.copy {
  margin: 0 0.5rem 0 auto;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) - 0.125rem);
  background: transparent;
  color: var(--code-ink);
  cursor: pointer;
  font: inherit;
}

.copy:hover {
  border-color: var(--code-ink);
}

/* Prose, so it wraps rather than scrolling sideways. */
.code pre.prompt {
  white-space: pre-wrap;
}

.code pre {
  padding: 1.25rem 1.5rem;
  font-size: 0.8125rem;
}

.code:has(.editor-tabs) pre {
  display: none;
}

.code:has(.editor-tabs input:nth-of-type(1):checked) pre:nth-of-type(1),
.code:has(.editor-tabs input:nth-of-type(2):checked) pre:nth-of-type(2),
.code:has(.editor-tabs input:nth-of-type(3):checked) pre:nth-of-type(3) {
  display: block;
}

.options {
  min-width: 36rem;
  font-size: 0.875rem;
}

.options thead th {
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
}

.options tbody th {
  width: 1%;
  white-space: nowrap;
}

.options td {
  color: var(--ink-2);
}

@media (max-width: 52rem) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    padding-top: 1rem;
  }
}

/* Feature pages */

.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.feature {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.5rem;
}

.feature p,
.feature li {
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

.feature code,
.split code,
.step code {
  color: var(--ink);
  font-size: 0.8125rem;
}

.feature ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.125rem;
}

.number {
  color: var(--thread);
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* Text beside a picture of the product. */
.split {
  display: grid;
  align-items: center;
  gap: 2.5rem 4rem;
  grid-template-columns: 1fr 1.15fr;
}

.split + .split {
  margin-top: 6rem;
}

.split.flip > :first-child {
  order: 2;
}

.split-copy {
  display: grid;
  gap: 1rem;
}

.split-copy h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.split-copy p {
  color: var(--ink-2);
  text-wrap: pretty;
}

.checks {
  display: grid;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.9375rem;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--ink-2);
}

.checks strong {
  color: var(--ink);
  font-weight: 550;
}

.checks li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.125rem;
  height: 1.5rem;
  background: var(--thread);
  content: '';
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.split .panel {
  display: grid;
  min-width: 0;
  gap: 1rem;
  padding: 1.5rem;
  font-size: 0.875rem;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.flip > :first-child {
    order: 0;
  }
}

/* The steps of a reply, top to bottom along a line. */
.steps {
  display: grid;
  max-width: 52rem;
  margin: 0;
  padding: 0;
  counter-reset: step;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 0 0 3rem 3.5rem;
  counter-increment: step;
}

.step::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid oklch(0.55 0.17 33 / 0.35);
  border-radius: 50%;
  background: var(--paper);
  color: var(--thread);
  content: counter(step);
  font-family: var(--mono);
  font-size: 0.8125rem;
  place-items: center;
}

.step::after {
  position: absolute;
  z-index: -1;
  top: 2.25rem;
  bottom: 0;
  left: 1.125rem;
  width: 1px;
  background: linear-gradient(to bottom, oklch(0.55 0.17 33 / 0.35), var(--rule));
  content: '';
}

.step:last-child {
  padding-bottom: 0;
}

.step:last-child::after {
  display: none;
}

.step h3 {
  padding-top: 0.375rem;
  font-size: 1.25rem;
}

.step > p {
  max-width: 42rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

.step .panel {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.75rem;
  padding: 1.25rem;
  font-size: 0.875rem;
}

/* At a glance: a term on the left, its value on the right. */
.spec {
  display: grid;
  margin: 0;
  grid-template-columns: minmax(10rem, 1fr) 2fr;
}

.spec dt,
.spec dd {
  margin: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.spec dt {
  padding-right: 2rem;
  font-weight: 550;
}

.spec dd {
  color: var(--ink-2);
}

@media (max-width: 40rem) {
  .spec {
    grid-template-columns: 1fr;
  }

  .spec dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .spec dd {
    padding-top: 0.25rem;
  }
}

.related {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.related a {
  display: grid;
  gap: 0.375rem;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.related a:hover {
  border-color: var(--rule-strong);
}

.related strong {
  font-weight: 550;
}

.related strong::after {
  margin-left: 0.375rem;
  color: var(--thread);
  content: '→';
}

.related span {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.more {
  color: var(--thread);
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
}

/* Small pictures of the product on the feature pages, in the same voice as the home page's. */

.row-list {
  display: grid;
  gap: 0.5rem;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.row > span:first-child {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.125rem;
  line-height: 1.4;
}

.row strong {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 550;
}

.row small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 0.75rem;
  text-overflow: ellipsis;
}

.row.active {
  border-color: oklch(0.55 0.17 33 / 0.35);
  background: oklch(0.55 0.17 33 / 0.08);
}

.tag {
  /* Newsreader's descent is 0.235em deeper than the gap above its capitals, so the top padding makes up for it. */
  padding: 0.435em 0.5rem 0.2em;
  border-radius: 999px;
  background: var(--thread-soft);
  color: var(--thread);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.tag.plain {
  background: var(--wash);
  color: var(--ink-2);
}

.tag.warn {
  background: oklch(0.8 0.14 75 / 0.14);
  color: oklch(0.5 0.11 70);
}

.tag.bad {
  background: oklch(0.7 0.17 25 / 0.14);
  color: var(--thread);
}

/* A request the agent waits on, with the visitor's two choices. */
.approval {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.75rem;
  background: var(--sheet);
  box-shadow: var(--shadow), var(--highlight);
}

.approval-buttons {
  display: flex;
  gap: 0.5rem;
}

.approval-buttons span {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 550;
}

.approval-buttons span:first-child {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
}

/* An email, as a mail app shows it. */
.mail {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: oklch(0.25 0.02 70 / 0.02);
}

.mail-head {
  display: grid;
  gap: 0.125rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.mail-head strong {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 550;
}

.mail p {
  color: var(--ink-2);
}

.mail.draft {
  border-style: dashed;
  border-color: oklch(0.55 0.17 33 / 0.35);
}

/* The three messenger layouts, each in a small browser window. */
.layouts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.layout {
  display: grid;
  gap: 0.875rem;
  align-content: start;
}

.layout .preview {
  height: 14rem;
  margin: 0;
}

.layout .preview-page {
  height: 100%;
}

.layout p {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.mini-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  width: 42%;
  align-content: end;
  gap: 0.375rem;
  padding: 0.75rem;
  border-left: 1px solid #ececf0;
  background: #fff;
}

.mini-window {
  position: absolute;
  right: 0.75rem;
  bottom: 3.5rem;
  display: grid;
  width: 55%;
  height: 60%;
  align-content: end;
  gap: 0.375rem;
  padding: 0.625rem;
  border-radius: 0.625rem;
  background: #fff;
  box-shadow: 0 8px 24px -8px oklch(0.3 0.03 60 / 0.2);
}

.mini-panel i,
.mini-window i {
  height: 0.5rem;
  border-radius: 999px;
  background: #ededee;
}

.mini-panel i:nth-child(odd),
.mini-window i:nth-child(odd) {
  width: 70%;
  justify-self: end;
}

.mini-button {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px -8px oklch(0.3 0.03 60 / 0.2);
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
}

.stat {
  display: grid;
  gap: 0.125rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
}

.stat strong {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--ink-3);
  font-size: 0.75rem;
}

/* Legal pages */

.legal {
  padding-block: 4.5rem 5rem;
}

.legal .container {
  display: grid;
  align-items: start;
  gap: 4rem;
  grid-template-columns: 14rem minmax(0, 1fr);
}

.legal-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 3rem;
}

.legal-head h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
}

.prose {
  display: grid;
  max-width: 46rem;
  gap: 1rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

.prose h2 {
  margin-top: 2rem;
  color: var(--ink);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 5rem;
}

.prose h3 {
  margin-top: 0.75rem;
  color: var(--ink);
}

.prose ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.25rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 550;
}

.prose a {
  color: var(--thread);
}

.prose table {
  min-width: 34rem;
  font-size: 0.875rem;
}

.prose th {
  color: var(--ink);
}

.prose .table-wrap {
  margin-block: 0.5rem;
}

@media (max-width: 52rem) {
  .legal .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* Product pages */

.row.active,
.skill.active {
  border-color: var(--tint-border);
  background: var(--tint);
}

.product-hero {
  padding-block: 1.5rem 4rem;
}

.product-hero .container {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.product-hero h1 {
  max-width: 15em;
  margin-top: 1.5rem;
}

.product-hero .lead {
  max-width: 36rem;
  margin-top: 0;
  font-size: 1.25rem;
}

.product-hero .actions {
  margin-top: 0.5rem;
}

/* The page's own animated picture of the product, under the headline. */
.showcase {
  position: relative;
  width: 100%;
  margin: 3rem 0 0;
  text-align: left;
}

.showcase > .panel {
  display: grid;
  overflow: hidden;
  min-height: 24rem;
  gap: 1.25rem;
  padding: 1.5rem;
  border-color: var(--ink);
  background: var(--sheet);
  box-shadow: 6px 6px 0 var(--rule);
  font-family: var(--ui);
  font-size: 0.875rem;
}

.showcase .scene-caption {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-style: italic;
}

.columns {
  display: grid;
  align-items: start;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.feature:hover {
  border-color: var(--ink);
}

/* Big numbers. */
.numbers {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.numbers > div {
  display: grid;
  gap: 0.25rem;
  padding: 1.5rem;
  border-left: 1px solid var(--tint-border, var(--rule));
}

.numbers strong {
  color: var(--ink);
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 350;
  letter-spacing: -0.03em;
  line-height: 1;
}

.numbers span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* A row of words drifting sideways, such as the messenger's languages. */
.marquee {
  display: flex;
  overflow: hidden;
  gap: 0.75rem;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee > div {
  display: flex;
  flex: none;
  gap: 0.75rem;
}

.marquee span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: oklch(0.25 0.02 70 / 0.02);
  color: var(--ink-2);
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* What product.js plays starts hidden, unless the visitor asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-cue]:not([data-cue='add']):not(.played) {
    display: none;
  }

  .js [data-cue].played:not([data-cue='add']) {
    animation: rise 0.4s ease-out;
  }

  [data-scene] {
    transition: opacity 0.4s;
  }

  [data-scene].rewinding {
    opacity: 0;
  }

  .marquee > div {
    animation: drift 40s linear infinite;
  }

  .marquee.reverse > div {
    animation-direction: reverse;
  }

  /* The line between the steps fills in as it scrolls by, where the browser can tie animation to scrolling. */
  @supports (animation-timeline: view()) {
    .step::after {
      animation: fill linear both;
      animation-range: entry 20% cover 60%;
      animation-timeline: view();
      transform-origin: top;
    }
  }
}

@keyframes drift {
  to {
    translate: calc(-100% - 0.75rem) 0;
  }
}

@keyframes fill {
  from {
    scale: 1 0;
  }
}

/* Scenes: the animated pictures on the product pages. */

.scene-chat {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
}

.scene-chat .bubble {
  max-width: 90%;
}

.scene-chat .bubble.user {
  background: var(--wash);
}

.scene-chat .tool-step {
  font-size: 0.8125rem;
}

.two-up {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.pane {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: #fff;
}

.pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ink-3);
  font-size: 0.75rem;
}

@media (max-width: 52rem) {
  .two-up {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Article cards the agent searches: the ones it matches light up, the one it reads glows. */
.doc-grid {
  display: grid;
  gap: 0.625rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-card {
  display: grid;
  gap: 0.4375rem;
  padding: 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  transition:
    border-color 0.4s,
    background 0.4s,
    box-shadow 0.4s,
    opacity 0.4s;
}

.doc-card strong {
  font-size: 0.8125rem;
  font-weight: 550;
}

.doc-card small {
  color: var(--ink-3);
  font-size: 0.6875rem;
}

.doc-card i {
  height: 0.375rem;
  border-radius: 999px;
  background: oklch(0.25 0.02 70 / 0.07);
  transition: background 0.4s;
}

.doc-card i:nth-of-type(2) {
  width: 85%;
}

.doc-card i:nth-of-type(3) {
  width: 60%;
}

.searching .doc-card:not(.hit) {
  opacity: 0.4;
}

.doc-card.hit {
  border-color: var(--tint-border);
  background: var(--tint);
}

.doc-card.hit i:nth-of-type(2) {
  background: oklch(0.82 0.11 var(--hue) / 0.55);
}

.doc-card.read {
  box-shadow: 0 0 0 1px var(--thread);
}

/* A status that changes partway through a scene: .before shows until the scene adds .after-state. */
.after-state .before,
:not(.after-state) > .after {
  display: none;
}

.log {
  display: grid;
  gap: 0.625rem;
  font-size: 0.8125rem;
}

.log .tool-step {
  font-size: 0.8125rem;
}

.editor-mock {
  display: grid;
  gap: 0.875rem;
}

.toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.375rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.toolbar span {
  padding: 0.125rem 0.5rem;
  border-radius: 0.3125rem;
}

.toolbar span:first-child {
  background: oklch(0.25 0.02 70 / 0.06);
  color: var(--ink);
}

.typed-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose-lines {
  display: grid;
  gap: 0.5rem;
}

.prose-lines i {
  height: 0.5rem;
  border-radius: 999px;
  background: oklch(0.25 0.02 70 / 0.07);
}

.prose-lines i:nth-child(3n + 2) {
  width: 92%;
}

.prose-lines i:nth-child(3n) {
  width: 70%;
}

.prose-lines b {
  margin-top: 0.375rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 550;
}

/* Four small pictures of how the knowledge base can sit on a page. */
.kb-layouts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

.kb-layout {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.kb-layout code {
  color: var(--thread);
  font-size: 0.75rem;
}

.kb-layout .mini {
  display: grid;
  height: 7rem;
  align-content: start;
  gap: 0.375rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: oklch(0.25 0.02 70 / 0.03);
}

.mini i {
  height: 0.875rem;
  border-radius: 0.25rem;
  background: oklch(0.25 0.02 70 / 0.08);
}

.mini.cards {
  grid-template-columns: 1fr 1fr;
}

.mini.cards i {
  height: 2.5rem;
}

.mini.folders i {
  width: 60%;
  height: 0.5rem;
}

.mini.accordion i:nth-child(2) {
  height: 2.75rem;
  background: var(--tint, oklch(0.25 0.02 70 / 0.08));
  box-shadow: inset 0 0 0 1px var(--tint-border, transparent);
}

/* Home page links to the product pages */

.chapter-head .lead a {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--thread);
  text-decoration: none;
}

.chapter-head .lead a:hover {
  text-decoration: underline;
}

/* Actions page */

.act-flow {
  align-items: stretch;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 4.5rem minmax(0, 1fr);
}

/* The line between the messenger and your server; a dot runs along it while a call is on its way. */
.act-wire {
  position: relative;
  align-self: center;
  height: 1px;
  background: linear-gradient(to right, var(--rule-strong), var(--tint-border), var(--rule-strong));
}

.act-wire::after {
  position: absolute;
  top: -0.1875rem;
  left: 0;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--thread);
  box-shadow: 0 0 12px var(--thread);
  content: '';
  opacity: 0;
}

.act-wire.live::after {
  opacity: 1;
}

.act-wire span {
  position: absolute;
  top: -1.75rem;
  left: 50%;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.625rem;
  translate: -50% 0;
  white-space: nowrap;
}

.act-server {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.act-server .pane-title {
  margin-bottom: 0.5rem;
  font-family: inherit;
}

.act-line {
  display: block;
  color: var(--code-ink);
  overflow-wrap: anywhere;
}

.act-line.gap {
  margin-top: 0.625rem;
}

.approval .after {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.approval-title {
  display: grid;
  gap: 0.125rem;
}

.approval-title strong {
  font-weight: 550;
}

.approval-title small,
.approval dl {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.approval dl {
  display: grid;
  margin: 0;
  gap: 0.125rem 0.75rem;
  grid-template-columns: auto 1fr;
}

.approval dd {
  margin: 0;
  color: var(--ink-2);
}

.approval-buttons span {
  transition:
    transform 0.15s,
    box-shadow 0.3s;
}

.approval-buttons.press-allow span:first-child,
.approval-buttons.press-deny span:last-child {
  box-shadow: 0 0 0 3px var(--tint-border);
  transform: scale(0.95);
}

.approval.declined {
  border-color: oklch(0.7 0.17 25 / 0.35);
}

/* A signed user token, with the claims it carries. */
.act-token {
  display: block;
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--ink);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.act-token b {
  color: var(--thread);
  font-weight: 400;
}

.act-headers {
  display: grid;
  gap: 0.375rem;
}

.act-headers code {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  color: var(--thread);
  font-size: 0.75rem;
}

.act-headers code span {
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace {
  display: grid;
  gap: 0.5rem;
}

.trace-step {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
}

.trace-step > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
}

.trace-step pre {
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.6;
}

@media (prefers-reduced-motion: no-preference) {
  .act-wire.live::after {
    animation: wire 1.1s ease-in-out infinite;
  }
}

@keyframes wire {
  from {
    left: 0;
  }

  to {
    left: calc(100% - 0.4375rem);
  }
}

@media (max-width: 52rem) {
  .act-flow {
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .act-wire {
    display: none;
  }
}

/* Components page */

.cmp-stage {
  align-items: stretch;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.cmp-fields {
  display: grid;
  gap: 0.375rem;
}

.cmp-field {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

.cmp-field code {
  flex: 1;
  color: var(--ink);
  font-size: 0.8125rem;
}

.cmp-field small {
  color: var(--ink-3);
  font-size: 0.6875rem;
}

/* The order card the page draws, through its three states: as shown, while cancelling, cancelled. */
.cmp-card {
  display: grid;
  width: min(100%, 21rem);
  gap: 0.625rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.875rem;
  background: var(--sheet);
  box-shadow: var(--shadow), var(--highlight);
  transition: border-color 0.4s;
}

.cmp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cmp-card-head strong {
  font-weight: 600;
}

.cmp-progress {
  display: flex;
  gap: 0.25rem;
}

.cmp-progress i {
  height: 0.3125rem;
  flex: 1;
  border-radius: 999px;
  background: oklch(0.25 0.02 70 / 0.08);
  transition: background 0.4s;
}

.cmp-progress i:nth-child(-n + 2) {
  background: var(--thread);
}

.cmp-meta {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.cmp-actions {
  display: flex;
  gap: 0.5rem;
}

.cmp-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 550;
  transition:
    transform 0.15s,
    box-shadow 0.3s,
    opacity 0.3s;
}

.cmp-button.primary {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
}

.cmp-button.pressed {
  box-shadow: 0 0 0 3px var(--tint-border);
  transform: scale(0.95);
}

.cmp-card .s-pending,
.cmp-card .s-done {
  display: none;
}

.cmp-card.pending .s-idle,
.cmp-card.done .s-idle,
.cmp-card.done .s-pending {
  display: none;
}

.cmp-card.pending .s-pending,
.cmp-card.done .s-done {
  display: inline-flex;
}

.cmp-card.pending .cmp-button {
  opacity: 0.6;
}

.cmp-card.done {
  border-color: var(--tint-border);
}

.cmp-card.done .cmp-progress i {
  background: oklch(0.25 0.02 70 / 0.08);
}

.cmp-spinner {
  width: 0.75rem;
  height: 0.75rem;
  border: 1.5px solid var(--ink-3);
  border-top-color: var(--ink);
  border-radius: 50%;
}

.cmp-code {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--ink);
}

.cmp-code pre {
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  line-height: 1.7;
}

.cmp-code .act-line {
  display: block;
}

.cmp-preview {
  display: grid;
  min-height: 14rem;
  align-content: center;
  justify-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px dashed var(--tint-border);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 1px 1px, oklch(0.25 0.02 70 / 0.08) 1px, transparent 0) 0 0 / 1rem 1rem,
    #fff;
}

.cmp-values {
  width: min(100%, 21rem);
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
}

.cmp-toggle .after {
  display: none;
}

.cmp-toggle.after-state .before {
  display: none;
}

.cmp-toggle.after-state .after {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .cmp-card.pending .cmp-spinner {
    animation: spin 0.7s linear infinite;
  }
}

@media (max-width: 52rem) {
  .cmp-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Agent page */

.agt-stage {
  align-items: stretch;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.agt-brain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.agt-skills {
  display: grid;
  gap: 0.5rem;
}

.agt-skills .skill {
  transition:
    border-color 0.4s,
    background 0.4s,
    box-shadow 0.4s;
}

.agt-skills .skill.active {
  border-color: var(--tint-border);
  background: var(--tint);
}

.agt-skills .skill .loaded {
  display: none;
}

.agt-skills .skill.active .loaded {
  display: inline;
}

.agt-note {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.agt-languages {
  display: grid;
  gap: 0.75rem;
}

.agt-models {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agt-model {
  display: grid;
  gap: 0.375rem;
  padding: 1.25rem;
}

.agt-model strong {
  font-size: 1.125rem;
  font-weight: 600;
}

.agt-model p {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.agt-model.picked {
  border-color: var(--tint-border);
  background: var(--tint);
}

.agt-meter {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.agt-meter i {
  width: 1.5rem;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--thread);
}

.agt-meter i.off {
  background: oklch(0.25 0.02 70 / 0.08);
}

.agt-keys {
  display: grid;
  gap: 0.5rem;
}

.agt-keys .row code {
  color: var(--ink-3);
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: no-preference) {
  .agt-skills .skill.scan {
    animation: scan 0.6s ease-out;
  }
}

@keyframes scan {
  40% {
    border-color: var(--rule-strong);
    background: oklch(0.25 0.02 70 / 0.04);
  }
}

@media (max-width: 52rem) {
  .agt-stage,
  .agt-models {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Messenger page */

/* A cue that only changes another element takes no room. */
span[data-cue='add'][data-target] {
  display: none;
}

/* The light messenger, as it is by default on a customer's page. */
.mm,
.light-messenger {
  --foreground: #1d1d1f;
  --muted-foreground: #6e6e73;
  --faint-foreground: #86868b;
  --border: #ececf0;
  --border-strong: #dcdce1;
  --success: #86868b;
  --bk: oklch(0.55 0.16 var(--hue));
  background: #fff;
  color: #1d1d1f;
}

.mm .bubble.user,
.light-messenger .bubble.user {
  background: color-mix(in oklch, var(--bk) 12%, #fff);
}

/* The hero: one messenger that moves from the ask bar to the side panel to the corner button. */
.morph {
  display: grid;
  gap: 1.25rem;
}

.morph-page {
  position: relative;
  display: grid;
  height: 27rem;
  overflow: hidden;
  align-content: start;
  gap: 0.75rem;
  padding: 1.5rem;
}

.morph-page .skeleton {
  max-width: 52%;
}

.morph-page .skeleton.block {
  height: 8rem;
}

.mm {
  position: absolute;
  top: calc(100% - 3.75rem);
  left: calc(50% - min(11rem, 45%));
  width: min(22rem, 90%);
  height: 2.75rem;
  overflow: hidden;
  border: 1px solid #ececf0;
  border-radius: 0.875rem;
  box-shadow: 0 16px 40px -10px oklch(0.3 0.03 60 / 0.2);
  font-size: 0.8125rem;
  transition-duration: 0.75s;
  transition-property: top, left, width, height, border-radius;
  transition-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.morph.open .mm {
  top: calc(100% - 22.5rem);
  left: calc(50% - min(14.5rem, 46%));
  width: min(29rem, 92%);
  height: 21.5rem;
}

.morph.as-panel .mm {
  top: 0;
  left: 58%;
  width: 42%;
  height: 100%;
  border-radius: 0;
}

.morph.as-panel.as-bubble .mm {
  top: calc(100% - 4.25rem);
  left: calc(100% - 4.25rem);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.625rem;
}

.morph.as-panel.as-bubble.bubble-open .mm {
  top: 1rem;
  left: calc(100% - min(20rem, 88%) - 1rem);
  width: min(20rem, 88%);
  height: calc(100% - 6.25rem);
  border-radius: 1rem;
}

.mm > * {
  position: absolute;
  inset: 0;
  transition: opacity 0.35s;
}

.mm-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.875rem 0.625rem;
  color: #86868b;
  white-space: nowrap;
}

.mm-bar kbd {
  margin-left: auto;
  padding: 0.0625rem 0.375rem;
  border: 1px solid #ececf0;
  border-radius: 0.3125rem;
  font-family: inherit;
  font-size: 0.6875rem;
}

.mm svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: var(--bk);
}

.mm-icon {
  display: grid;
  background: var(--bk);
  place-items: center;
}

.mm-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #fff;
}

.mm-chat {
  display: flex;
  min-width: 17rem;
  flex-direction: column;
}

.mm-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #ececf0;
  font-weight: 600;
}

.mm-head .messenger-avatar {
  background: var(--bk);
}

.mm-head .messenger-avatar svg {
  color: #fff;
}

.mm-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  overflow: hidden;
  padding: 0.875rem;
}

.mm-body .bubble {
  max-width: 88%;
  padding: 0.4375rem 0.75rem;
}

.mm-body .approval {
  gap: 0.5rem;
  padding: 0.75rem;
  border-color: #ececf0;
  background: #fafafa;
  box-shadow: none;
}

.mm-body .approval strong {
  font-weight: 600;
}

.mm-body .approval small {
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.mm-body .approval-buttons span {
  border-color: #dcdce1;
  font-size: 0.75rem;
}

.mm-body .approval-buttons span:first-child {
  background: var(--bk);
  color: #fff;
}

.mm-input {
  margin: 0 0.75rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dcdce1;
  border-radius: 0.75rem;
  color: #86868b;
}

/* Which layer shows in which layout. */
.mm-chat,
.mm-icon,
.morph.open .mm-bar,
.morph.as-bubble:not(.bubble-open) .mm-chat {
  opacity: 0;
  pointer-events: none;
}

.morph.open .mm-chat,
.morph.as-bubble:not(.bubble-open) .mm-icon {
  opacity: 1;
}

.mm-close {
  position: absolute;
  top: calc(100% - 4.25rem);
  left: calc(100% - 4.25rem);
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: oklch(0.55 0.16 var(--hue));
  box-shadow: 0 12px 32px -8px oklch(0.3 0.03 60 / 0.2);
  color: #fff;
  opacity: 0;
  place-items: center;
  scale: 0.6;
  transition:
    opacity 0.3s 0.3s,
    scale 0.3s 0.3s;
}

.mm-close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.morph.bubble-open .mm-close {
  opacity: 1;
  scale: 1;
}

.morph-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.morph-tabs span {
  padding: 0.3125rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 0.8125rem;
  transition:
    color 0.4s,
    border-color 0.4s,
    background 0.4s;
}

.morph:not(.as-panel) .t-bar,
.morph.as-panel:not(.as-bubble) .t-panel,
.morph.as-bubble .t-bubble {
  border-color: var(--tint-border);
  background: var(--tint);
  color: var(--ink);
}

@media (max-width: 44rem) {
  .morph-page {
    height: 30rem;
  }

  .morph.as-panel .mm {
    left: 18%;
    width: 82%;
  }
}

/* Detecting a brand: the preview takes the color and logo it found. */
.light-messenger {
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
}

.light-messenger .messenger-avatar,
.light-messenger .messenger-input svg {
  background: #1d1d1f;
  transition: background 0.8s;
}

.light-messenger .bubble.user {
  background: #f3f3f5;
  transition: background 0.8s;
}

.branded .light-messenger .messenger-avatar,
.branded .light-messenger .messenger-input svg {
  background: oklch(0.66 0.18 42);
}

.branded .light-messenger .bubble.user {
  background: oklch(0.95 0.03 42);
}

.light-messenger .messenger-avatar svg {
  color: #fff;
}

.swatch {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.375rem;
  border-radius: 0.25rem;
  background: #1d1d1f;
  box-shadow: inset 0 0 0 1px oklch(0.25 0.02 70 / 0.2);
  vertical-align: -0.125rem;
  transition: background 0.8s;
}

.branded .swatch {
  background: oklch(0.66 0.18 42);
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field > span:first-child {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.input {
  min-height: 2.25rem;
  padding: 0.4375rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.5rem;
  background: #fff;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* The team joining live, and a reply waiting while the messenger is closed. */
.typing-dots {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.25rem;
  color: #86868b;
  font-size: 0.75rem;
}

.typing-dots i {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .typing-dots i {
    animation: blink 1.2s infinite;
  }

  .typing-dots i:nth-child(2) {
    animation-delay: 0.2s;
  }

  .typing-dots i:nth-child(3) {
    animation-delay: 0.4s;
  }
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.light-messenger .bubble.teammate {
  border: 0;
  background: color-mix(in oklch, oklch(0.55 0.16 var(--hue)) 10%, #fff);
}

.byline {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #86868b;
  font-size: 0.6875rem;
}

.byline .avatar.small {
  width: 1.25rem;
  height: 1.25rem;
  background: oklch(0.7 0.12 var(--hue));
  color: #fff;
  font-size: 0.625rem;
}

.closed-page {
  position: relative;
  min-height: 19rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: oklch(0.25 0.02 70 / 0.03);
}

.closed-page .skeleton {
  margin: 1.25rem 1.25rem 0;
}

.notice {
  position: absolute;
  right: 1rem;
  bottom: 5rem;
  display: flex;
  width: min(17rem, calc(100% - 2rem));
  gap: 0.625rem;
  padding: 0.875rem;
  border-radius: 0.875rem;
  background: #fff;
  box-shadow: 0 16px 40px -10px oklch(0.3 0.03 60 / 0.2);
  color: #1d1d1f;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.notice .avatar.small {
  background: oklch(0.7 0.12 var(--hue));
  color: #fff;
}

.notice small {
  display: block;
  color: #86868b;
  font-size: 0.6875rem;
}

.launcher {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: oklch(0.55 0.16 var(--hue));
  box-shadow: 0 12px 32px -8px oklch(0.3 0.03 60 / 0.2);
  color: #fff;
  place-items: center;
}

.launcher svg {
  width: 1.25rem;
  height: 1.25rem;
}

.unread {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--sheet);
  border-radius: 999px;
  background: var(--thread);
  font-size: 0.6875rem;
  font-weight: 650;
  place-items: center;
}

/* Conversations page */

.showcase > .panel.cv-inbox {
  min-height: 31rem;
  padding: 0;
  gap: 0;
  grid-template-columns: 17rem minmax(0, 1fr);
}

.cv-inbox .threads {
  align-content: start;
}

.cv-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.cv-tabs span {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  color: var(--ink-3);
}

.cv-tabs span:first-child {
  background: oklch(0.25 0.02 70 / 0.06);
  color: var(--ink);
}

.thread.cv-new {
  background: var(--tint);
  box-shadow: inset 2px 0 0 var(--thread);
}

.cv-inbox .conversation {
  min-height: 0;
}

.cv-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.875rem;
}

.cv-flag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid oklch(0.8 0.14 75 / 0.3);
  border-radius: 0.625rem;
  background: oklch(0.8 0.14 75 / 0.08);
  color: oklch(0.5 0.11 70);
  font-size: 0.8125rem;
}

.cv-flag .pill {
  border-color: oklch(0.8 0.14 75 / 0.35);
  color: inherit;
}

.cv-typing {
  align-self: flex-end;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.cv-typing::after {
  content: ' …';
}

.cv-hint {
  color: var(--ink-3);
  font-size: 0.75rem;
}

/* The agent switch turning off when a teammate takes over. */
.switch.on.off {
  background: var(--rule-strong);
}

.switch.on.off::after {
  left: 0.125rem;
  background: var(--ink-2);
}

.switch::after {
  transition: left 0.3s;
}

@media (max-width: 52rem) {
  .showcase > .panel.cv-inbox {
    grid-template-columns: minmax(0, 1fr);
  }

  .cv-inbox .threads {
    display: none;
  }
}

/* What the agent did: each step with what went in and what came back. */
.cv-trace {
  display: grid;
  gap: 0.5rem;
}

.cv-trace-step {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
}

.cv-trace-step pre {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.55;
}

.cv-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.75rem;
  background: var(--sheet);
  box-shadow: var(--shadow), var(--highlight);
  font-size: 0.8125rem;
}

.cv-toast > span:nth-child(2) {
  display: grid;
  flex: 1;
  line-height: 1.4;
}

.cv-toast small {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.cv-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.5rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.cv-search::before {
  color: var(--ink-3);
  content: '/';
}

.cv-people .row {
  transition: opacity 0.4s;
}

.cv-people.filtered .row:not(.match) {
  opacity: 0.25;
}

.cv-ptag {
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: oklch(0.7 0.12 var(--h) / 0.16);
  color: oklch(0.86 0.1 var(--h));
  font-size: 0.6875rem;
  white-space: nowrap;
}

.cv-live {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px oklch(0.76 0.15 155 / 0.2);
}

.cv-facts {
  display: grid;
  margin: 0;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
  grid-template-columns: auto 1fr;
}

.cv-facts dt {
  color: var(--ink-3);
}

.cv-facts dd {
  margin: 0;
  color: var(--ink-2);
}

.cv-country {
  margin-right: 0.375rem;
  padding: 0 0.3125rem;
  border-radius: 0.25rem;
  background: oklch(0.25 0.02 70 / 0.08);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
}

/* The notice a visitor sees above the closed messenger when your team writes first. */
.cv-site {
  position: relative;
  display: grid;
  min-height: 19rem;
  align-content: start;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}

.cv-notice {
  position: absolute;
  right: 1rem;
  bottom: 4.75rem;
  display: grid;
  width: min(17rem, calc(100% - 2rem));
  gap: 0.375rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: #fff;
  box-shadow: 0 12px 32px -8px oklch(0.3 0.03 60 / 0.2);
  color: #1d1d1f;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.cv-notice strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.cv-notice .avatar {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.6875rem;
}

.cv-launcher {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px -8px oklch(0.3 0.03 60 / 0.2);
}

.cv-launcher b {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--thread);
  color: #fff;
  font-size: 0.6875rem;
  place-items: center;
}

/* Analytics: conversations by day, the agent alone below and with your team on top. */
.cv-bars {
  display: flex;
  height: 9rem;
  align-items: end;
  gap: 0.375rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
}

.cv-bars span {
  display: flex;
  height: var(--h);
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.25rem 0.25rem 0 0;
  transform-origin: bottom;
  transition: scale 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cv-bars span::before {
  height: var(--t);
  background: oklch(0.8 0.11 250 / 0.55);
  content: '';
}

.cv-bars span::after {
  flex: 1;
  background: var(--thread);
  content: '';
}

.cv-legend {
  display: flex;
  gap: 1rem;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.cv-legend span::before {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.375rem;
  border-radius: 0.125rem;
  background: var(--thread);
  content: '';
}

.cv-legend span + span::before {
  background: oklch(0.8 0.11 250 / 0.7);
}

/* How it works page */

.hw-pipeline {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hw-node {
  position: relative;
  display: grid;
  gap: 0.375rem;
  justify-items: center;
  padding: 0.875rem 0.375rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  color: var(--ink-3);
  font-size: 0.6875rem;
  text-align: center;
  transition:
    border-color 0.4s,
    background 0.4s,
    box-shadow 0.4s;
}

.hw-node b {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: oklch(0.25 0.02 70 / 0.05);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  place-items: center;
  transition:
    background 0.4s,
    color 0.4s;
}

.hw-node strong {
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 550;
}

.hw-node:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -0.75rem;
  width: 0.75rem;
  height: 1px;
  background: var(--rule-strong);
  content: '';
  transition: background 0.4s;
}

.hw-node.lit {
  border-color: var(--tint-border);
  background: var(--tint);
}

.hw-node.lit b {
  background: var(--thread);
  color: var(--paper);
}

.hw-node.lit strong {
  color: var(--ink);
}

.hw-node.lit::after {
  background: var(--thread);
}

@media (max-width: 52rem) {
  .hw-pipeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hw-node::after {
    display: none;
  }
}

@media (max-width: 30rem) {
  .hw-pipeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hw-context .row {
  transition:
    border-color 0.4s,
    background 0.4s;
}

.hw-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.hw-dots i {
  width: 1.375rem;
  height: 1.375rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.375rem;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.hw-dots i.on {
  border-color: transparent;
  background: var(--thread);
}

.hw-dots i.next.on {
  background: oklch(0.8 0.11 250 / 0.8);
}

.steps .step .order-card {
  width: auto;
  max-width: 18rem;
}

/* Security page */

.sec-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.5rem;
  background: #fff;
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.sec-field > span {
  flex: 1;
}

.glyph.cross {
  background: var(--thread);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.sec-guards {
  display: grid;
  gap: 0.625rem;
}

.sec-guards .row {
  transition:
    border-color 0.4s,
    background 0.4s;
}

/* Where the messenger sits on your page: each box inside the one around it. */
.sec-layers {
  display: grid;
  gap: 0.75rem;
}

.sec-layer {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--rule-strong);
  border-radius: 0.75rem;
  font-size: 0.8125rem;
}

.sec-layer > p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-3);
}

.sec-layer > p strong {
  color: var(--ink);
  font-weight: 550;
}

.sec-layer.inner {
  border-style: solid;
  border-color: var(--tint-border);
  background: var(--tint);
}

.sec-layer.core {
  border-style: solid;
  border-color: var(--rule-strong);
  background: var(--sheet);
}

/* Actions, components and agent pages: lines a scene reveals from elsewhere with an add cue (data-add="on"). */
@media (prefers-reduced-motion: no-preference) {
  .js .hold:not(.on) {
    display: none;
  }

  .js .hold.on {
    animation: rise 0.4s ease-out;
  }
}

.cmp-field {
  transition:
    border-color 0.3s,
    background 0.3s;
}

.cmp-field.lit {
  border-color: var(--tint-border);
  background: var(--tint);
}

/* Email page */

/* The hero: an email in, the agent at work, a reply out, joined by lines that light up in turn. */
.flow {
  display: grid;
  align-items: start;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr) 3rem minmax(0, 1.15fr);
}

.flow .pane {
  min-height: 21rem;
}

.flow-link {
  position: relative;
  height: 2px;
  margin-top: 6rem;
  background: var(--rule);
}

.flow-link::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--thread), transparent) 0 0 / 50% 100% no-repeat;
  content: '';
  opacity: 0;
  transition: opacity 0.4s;
}

.flow.at-agent .flow-link.first::after,
.flow.at-reply .flow-link.second::after {
  opacity: 1;
}

.flow .mail {
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.8125rem;
}

.flow .mail p {
  line-height: 1.5;
}

.mail .quoted {
  padding-left: 0.625rem;
  border-left: 2px solid var(--rule-strong);
  color: var(--ink-3);
  font-size: 0.75rem;
}

.mail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.mail-actions .send {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 550;
  transition:
    scale 0.2s,
    background 0.3s;
}

.sent-state .send {
  background: var(--thread);
  scale: 0.94;
}

.mail-actions .ghost {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0.5rem;
  color: var(--ink-2);
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: no-preference) {
  .flow-link::after {
    animation: travel 1.4s linear infinite;
  }

  .js .flow .mail.played {
    animation: fly-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
}

@keyframes travel {
  from {
    background-position: -100% 0;
  }

  to {
    background-position: 200% 0;
  }
}

@keyframes fly-in {
  from {
    opacity: 0;
    rotate: -3deg;
    translate: -1.5rem -0.75rem;
  }
}

@media (max-width: 60rem) {
  .flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow .pane {
    min-height: 0;
  }

  .flow-link {
    width: 2px;
    height: 2rem;
    margin: 0 auto;
  }

  .flow-link::after {
    background: linear-gradient(180deg, transparent, var(--thread), transparent) 0 0 / 100% 50% no-repeat;
  }
}

/* Quoted history and signatures fading away as the agent reads only what's new. */
.stripping .strip {
  opacity: 0.25;
  text-decoration: line-through;
  text-decoration-color: var(--thread);
}

.strip {
  transition: opacity 0.6s;
}

.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tint-border);
  border-radius: 0.625rem;
  background: var(--tint);
}

.address code {
  color: var(--ink);
  font-size: 0.8125rem;
}

/* DNS records turning from Pending to Found. */
.dns {
  min-width: 0;
  font-size: 0.75rem;
}

.dns table {
  min-width: 26rem;
  font-size: 0.75rem;
}

.dns th,
.dns td {
  padding: 0.5rem 0.625rem;
}

.dns td code {
  color: var(--ink-2);
  font-size: 0.6875rem;
}

.cv-typing.cv-gone {
  display: none;
}

.cv-charts {
  margin-top: 1rem;
}

.cv-chart {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
}

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

.hw-stage {
  display: grid;
  gap: 1.25rem;
}

.step .bubble.user {
  justify-self: end;
}

.typing-dots.gone {
  display: none;
}

.cmp-card.pending.done .s-pending {
  display: none;
}

.features.compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.scene-chat.sec-compact {
  min-height: 0;
}

.tag.done {
  background: oklch(0.76 0.15 155 / 0.14);
  color: var(--ok);
}

@media (max-width: 40rem) {
  .dns table {
    min-width: 0;
  }
}

.cv-people .row > :first-child {
  flex: none;
}

.cv-people .row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.125rem;
  line-height: 1.4;
}

/* Scenes keep their height while they play, so older messages leave through the top. */
.showcase > .panel.cv-inbox {
  height: 33rem;
}

.cv-inbox .conversation,
.cv-body {
  min-height: 0;
  overflow: hidden;
}

.hw-stage .scene-chat {
  height: 24rem;
  min-height: 0;
  overflow: hidden;
}

.sec-field > .tag {
  flex: none;
}

@media (max-width: 30rem) {
  .hw-pipeline {
    gap: 0.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Only the number and name of each step fit on a phone. */
  .hw-node {
    padding: 0.625rem 0.25rem;
    font-size: 0;
  }
}

/* A note that must not be missed beside a setting, such as what draft mode does not hold back. */
p.callout {
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--thread);
  background: var(--thread-soft);
  color: var(--ink);
}
