.agent-page {
  max-width: 1180px;
}
.agent-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.agent-heading h1 {
  max-width: 22ch;
}
.agent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}
.agent-guide {
  position: sticky;
  top: 1.5rem;
}
.agent-guide h2,
.agent-welcome h2 {
  font-size: 1.2rem;
}
.agent-guide ul {
  padding-left: 1.2rem;
}
.agent-guide li {
  margin-bottom: 0.75rem;
}
.agent-guide p {
  line-height: 1.6;
}
.agent-main,
.agent-answer,
.agent-service {
  min-width: 0;
}
.agent-conversation,
.agent-answer {
  display: grid;
  gap: 1rem;
}
.agent-conversation {
  margin-bottom: 1rem;
}
.agent-history-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.agent-history-tools p {
  flex: 1 1 240px;
  margin: 0;
}
.agent-history-tools form {
  margin: 0;
}
.agent-suggestions,
.agent-slots,
.agent-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.agent-suggestions button {
  background: #edf5f2;
  color: #194e40;
  border: 1px solid #aac8bd;
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
}
.agent-user {
  background: #e8f1ed;
  border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
  padding: 1rem 1.25rem;
  margin-left: 1rem;
  overflow-wrap: anywhere;
}
.agent-user p,
.agent-reply p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agent-reply {
  border-left: 4px solid #1d5747;
}
.agent-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.agent-service {
  padding: 0;
  overflow: hidden;
}
.agent-service img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.agent-service-body {
  padding: 1.2rem;
  overflow-wrap: anywhere;
}
.agent-service h3 {
  font-size: 1.2rem;
}
.agent-demo {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: #fff0ce;
  color: #6c4300;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.agent-slots .button {
  min-width: 72px;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
}
.agent-card-links {
  margin-top: 1rem;
}
.agent-card-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-underline-offset: 0.2em;
}
.agent-composer {
  display: grid;
  gap: 0.8rem;
}
.agent-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 100px;
  font: inherit;
}
.agent-composer > label {
  font-weight: 700;
}
.agent-composer > .check-row {
  font-weight: 400;
}
.agent-send-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.agent-send-row span {
  font-size: 0.9rem;
}
.agent-footnote {
  padding: 0.6rem;
}
.agent-trap {
  display: none;
}
@media (max-width: 900px) {
  .agent-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .agent-guide {
    position: static;
  }
}
@media (max-width: 600px) {
  .agent-heading {
    display: block;
  }
  .agent-heading > a {
    margin-top: 1rem;
  }
  .agent-results {
    grid-template-columns: minmax(0, 1fr);
  }
  .agent-user {
    margin-left: 0.5rem;
  }
  .agent-send-row {
    flex-direction: column;
    align-items: stretch;
  }
  .agent-composer {
    padding: 1rem;
  }
}
@media (forced-colors: active) {
  .agent-user,
  .agent-reply,
  .agent-demo {
    border: 1px solid CanvasText;
  }
}
