/*
 * WhatsApp MCP, the first open tool. EMIAC's type, spacing and blue sky, with WhatsApp's green
 * used only as an accent. Every selector starts with .wa- so nothing here reaches another page.
 */
.wa-page {
  --wa-green: #25d366;
  --wa-deep: #0b7a4b;
  --wa-tint: #e7f8ee;
}

.wa-hero .pill {
  padding-left: 14px;
}

.wa-pill-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- The hero chat: an AI window asking WhatsApp, on a loop ---------- */
.wa-sky {
  display: grid;
  place-items: center;
}

.wa-chat {
  width: min(760px, 100%);
}

.wa-chat-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.wa-dots {
  display: inline-flex;
  gap: 6px;
}

.wa-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sheet-2);
}

.wa-chat-title {
  color: var(--ink);
  font-weight: 560;
}

.wa-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--wa-deep);
  font-size: 13px;
}

.wa-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa-green);
  box-shadow: 0 0 0 4px rgb(37 211 102 / 0.18);
}

.wa-chat-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 330px;
  padding: 28px clamp(18px, 4vw, 40px) 34px;
}

/* Shared by the hero chat and the use-case card */
.wa-ask {
  justify-self: end;
  max-width: 82%;
  min-height: 1.5em;
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
}

.wa-ask:empty {
  visibility: hidden;
}

.wa-call {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgb(37 211 102 / 0.35);
  border-radius: 999px;
  background: var(--wa-tint);
  font-size: 13px;
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.wa-call code {
  color: var(--wa-deep);
  font: 500 13px var(--mono);
}

.wa-call span {
  color: var(--muted);
}

.wa-answer {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.wa-answer p,
.wa-answer ul {
  margin: 0 0 10px;
}

.wa-answer ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.wa-answer b {
  color: var(--ink);
  font-weight: 600;
}

.wa-src {
  color: var(--muted);
  font-size: 13px;
}

.wa-draft,
.wa-msg,
.wa-alert {
  padding: 12px 16px;
  border-radius: 4px 16px 16px 16px;
  background: var(--wa-tint);
}

.wa-msg b,
.wa-alert b {
  display: block;
  margin-bottom: 2px;
  color: var(--wa-deep);
  font-size: 13px;
}

.wa-alert {
  border-left: 3px solid #e5484d;
  background: #fff4f4;
}

.wa-alert b {
  color: #c33b3f;
}

.wa-btns {
  display: flex;
  gap: 8px;
}

.wa-btns b,
.wa-btns span {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
}

.wa-btns b {
  background: var(--wa-deep);
  color: #fff;
}

.wa-btns span {
  border: 1px solid var(--line);
  color: var(--body);
}

.wa-table {
  width: 100%;
  margin-bottom: 8px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.wa-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.wa-table td + td {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

/* Between turns, the tool call and the answer wait out of sight */
[data-wa-phase='ask'] .wa-call,
[data-wa-phase='ask'] .wa-answer,
[data-wa-phase='call'] .wa-answer {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- Why it is different: a four-tile bento ---------- */
.wa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: var(--wrap);
  margin: 56px auto 0;
}

.wa-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-height: 260px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--sheet);
}

.wa-tile h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.wa-tile p {
  margin: 0;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.5;
}

.wa-tile-big {
  grid-row: span 2;
  background:
    radial-gradient(90% 70% at 100% 0%, rgb(37 211 102 / 0.28), transparent 60%),
    linear-gradient(160deg, #0f1f18, #0b1411);
  color: #fff;
}

.wa-tile-big p {
  color: rgb(255 255 255 / 0.72);
}

.wa-stat {
  margin-bottom: 26px;
  font: 500 clamp(88px, 11vw, 150px) / 1 var(--font);
  letter-spacing: -0.05em;
}

.wa-stat small {
  margin-left: 6px;
  color: var(--wa-green);
  font-size: 0.34em;
  letter-spacing: 0;
}

.wa-search {
  margin-bottom: auto;
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.05);
}

.wa-q {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.1);
  font: 500 14px var(--mono);
}

.wa-q svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.wa-q span {
  margin-left: auto;
  color: var(--wa-green);
  font: 400 12.5px var(--font);
}

.wa-search ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wa-search li {
  padding: 7px 12px;
  color: rgb(255 255 255 / 0.7);
  font-size: 14px;
}

.wa-search li b {
  display: block;
  color: #fff;
  font-size: 12.5px;
  font-weight: 560;
}

.wa-tile-wide {
  grid-column: span 2;
}

.wa-logos {
  display: flex;
  gap: 10px;
  margin-bottom: auto;
}

.wa-logos img {
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.08);
  object-fit: contain;
}

.wa-switch {
  position: relative;
  width: 64px;
  height: 36px;
  margin-bottom: auto;
  border-radius: 999px;
  background: var(--wa-deep);
}

.wa-switch i {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}

.wa-local {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: auto;
}

.wa-local i {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: 500 13px var(--mono);
  font-style: normal;
}

/* ---------- Use cases: the pinned card rewrites for each step ---------- */
.wa-card {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 540px;
  padding: 26px;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(17 17 17 / 0.06),
    0 30px 70px -40px rgb(0 30 70 / 0.4);
}

/* ---------- How it connects: three nodes on a live wire ---------- */
.wa-flow {
  display: grid;
  grid-template-columns: 1fr 90px 1fr 90px 1fr;
  align-items: stretch;
  max-width: 1080px;
  margin: 56px auto 0;
}

.wa-node {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 20px;
  border-radius: var(--radius);
  background: var(--sheet);
  text-align: center;
}

.wa-node b {
  font-size: 18px;
}

.wa-node > span:last-child {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.wa-node-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.08);
}

.wa-node-ais {
  display: flex;
  gap: 4px;
  width: auto;
  padding: 0 12px;
}

.wa-node-core {
  background:
    radial-gradient(120% 90% at 85% 0%, rgb(61 138 224 / 0.3), transparent 60%),
    linear-gradient(180deg, #d6e6fb 0%, #eef4fd 100%);
}

.wa-wire {
  position: relative;
  align-self: center;
  height: 2px;
  background: var(--line);
}

.wa-wire::after {
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wa-green);
  content: '';
  animation: wa-pulse 2.2s var(--ease) infinite;
}

.wa-wire + .wa-node + .wa-wire::after {
  background: var(--brand-hi);
  animation-delay: 1.1s;
}

@keyframes wa-pulse {
  from {
    left: 0;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  to {
    left: calc(100% - 8px);
    opacity: 0;
  }
}

/* ---------- Set up by us: three steps ---------- */
.wa-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 0;
  list-style: none;
}

.wa-steps li {
  padding: 28px;
  border-top: 2px solid var(--ink);
}

.wa-steps span {
  display: block;
  margin-bottom: 18px;
  color: var(--brand);
  font: 500 14px var(--mono);
}

.wa-steps b {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.wa-steps p {
  margin: 8px 0 0;
  color: var(--body);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .wa-wire::after {
    animation: none;
  }
}

@media (max-width: 900px) {
  .wa-grid {
    grid-template-columns: 1fr;
  }

  .wa-tile-big {
    grid-row: auto;
  }

  .wa-tile-wide {
    grid-column: auto;
  }

  .wa-tile {
    min-height: 0;
  }

  .wa-logos,
  .wa-switch,
  .wa-local {
    margin-bottom: 18px;
  }

  .wa-search {
    margin-bottom: 24px;
  }

  .wa-flow {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .wa-wire {
    width: 2px;
    height: 44px;
    justify-self: center;
  }

  .wa-wire::after {
    display: none;
  }

  .wa-steps {
    grid-template-columns: 1fr;
  }

  .wa-chat-body {
    min-height: 360px;
  }

  .wa-uses .pinned-stage {
    height: min(430px, 54svh);
    padding: 14px;
  }

  .wa-card {
    gap: 10px;
    padding: 16px;
  }

  .wa-card .wa-ask {
    max-width: 92%;
  }

  .wa-answer,
  .wa-ask {
    font-size: 15px;
  }
}
