.agent-page {
  background: var(--off-white);
}

.agent-hero {
  background: var(--navy);
  color: rgba(255,255,255,0.76);
  min-height: 100vh;
  padding: 118px 6% 72px;
  position: relative;
  overflow: hidden;
}

.agent-hero::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 62px 62px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.agent-hero::after {
  background: radial-gradient(ellipse at top right, rgba(90,159,170,0.22), transparent 58%);
  content: "";
  height: 110%;
  pointer-events: none;
  position: absolute;
  right: -18%;
  top: -28%;
  width: 68%;
}

.agent-hero__inner {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  margin: 0 auto;
  max-width: 1180px;
  position: relative;
  z-index: 1;
}

.agent-kicker {
  border: 1px solid rgba(200,184,154,0.32);
  color: var(--sand);
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
  padding: 0.34rem 0.75rem;
  text-transform: uppercase;
}

.agent-hero h1 {
  color: white;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 1.04;
  margin-bottom: 1rem;
  max-width: 820px;
}

.agent-hero h1 em {
  color: var(--sand);
  font-style: italic;
}

.agent-hero__intro {
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 650px;
}

.agent-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.agent-scope {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 1.8rem 0 0;
  max-width: 660px;
  padding: 0;
}

.agent-scope li {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.8rem 0.9rem;
}

.agent-chat {
  background: #101a2d;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  box-shadow: 0 30px 88px rgba(0,0,0,0.28);
  color: white;
  display: grid;
  grid-template-rows: auto minmax(280px, 46vh) auto auto auto;
  min-height: 590px;
  overflow: hidden;
}

.agent-chat__header {
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.1rem;
}

.agent-chat__eyebrow {
  color: var(--sand);
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
}

.agent-chat__header h2 {
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.agent-chat__status {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  color: rgba(255,255,255,0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.36rem 0.68rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.agent-chat__status[data-state="busy"] {
  color: var(--sand);
}

.agent-chat__status[data-state="error"] {
  color: #ffd5d5;
}

.agent-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  overflow-y: auto;
  padding: 1rem;
  scroll-behavior: smooth;
}

.agent-message {
  border-radius: 8px;
  font-size: 0.93rem;
  line-height: 1.6;
  max-width: min(88%, 620px);
  padding: 0.82rem 0.94rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-message--assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.86);
}

.agent-message--visitor {
  align-self: flex-end;
  background: var(--teal);
  color: white;
}

.agent-message--typing {
  color: rgba(255,255,255,0.58);
}

.agent-prompts {
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
}

.agent-prompts button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.48rem 0.7rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.agent-prompts button:hover,
.agent-prompts button:focus-visible {
  background: rgba(200,184,154,0.14);
  border-color: rgba(200,184,154,0.45);
  color: white;
}

.agent-lead {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.agent-lead summary {
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 800;
  list-style-position: inside;
  padding: 0.84rem 1rem;
}

.agent-lead__form {
  display: grid;
  gap: 0.7rem;
  padding: 0 1rem 1rem;
}

.agent-lead__grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-lead input,
.agent-lead textarea,
.agent-composer textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  outline: none;
  padding: 0.72rem 0.78rem;
  width: 100%;
}

.agent-lead textarea {
  min-height: 74px;
  resize: vertical;
}

.agent-composer textarea {
  min-height: 52px;
  max-height: 150px;
  resize: vertical;
}

.agent-lead input::placeholder,
.agent-lead textarea::placeholder,
.agent-composer textarea::placeholder {
  color: rgba(255,255,255,0.48);
}

.agent-lead input:focus,
.agent-lead textarea:focus,
.agent-composer textarea:focus {
  border-color: rgba(200,184,154,0.68);
  box-shadow: 0 0 0 3px rgba(200,184,154,0.12);
}

.agent-lead__bottom {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
}

.agent-lead__status {
  color: rgba(255,255,255,0.58);
  font-size: 0.78rem;
}

.agent-composer {
  align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem;
}

.agent-chat button,
.agent-composer button,
.agent-lead button {
  font-family: 'DM Sans', sans-serif;
}

.agent-send,
.agent-lead__submit {
  background: var(--sand);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  min-height: 44px;
  padding: 0.7rem 1rem;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.agent-send:hover,
.agent-lead__submit:hover,
.agent-send:focus-visible,
.agent-lead__submit:focus-visible {
  background: #d8c9aa;
  transform: translateY(-1px);
}

.agent-send:disabled,
.agent-prompts button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.agent-below {
  background: white;
  padding: 4.5rem 6%;
}

.agent-below__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  margin: 0 auto;
  max-width: 1100px;
}

.agent-below h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
}

.agent-below p,
.agent-below li {
  color: var(--text-light);
  line-height: 1.75;
}

.agent-below ul {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.agent-below li {
  border-bottom: 1px solid var(--mist);
  padding-bottom: 0.7rem;
}

[data-theme="dark"] .agent-below {
  background: #0e1520;
}

[data-theme="dark"] .agent-below p,
[data-theme="dark"] .agent-below li {
  color: rgba(255,255,255,0.74);
}

@media(max-width:1100px) {
  .agent-hero__inner,
  .agent-below__inner {
    grid-template-columns: 1fr;
  }

  .agent-chat {
    min-height: 560px;
  }
}

@media(max-width:700px) {
  .agent-hero {
    min-height: 0;
    padding: 94px 5% 42px;
  }

  .agent-hero__inner {
    gap: 1.4rem;
  }

  .agent-hero h1 {
    font-size: 2.15rem;
  }

  .agent-hero__intro {
    font-size: 1rem;
  }

  .agent-hero__actions a {
    justify-content: center;
    width: 100%;
  }

  .agent-scope,
  .agent-lead__grid {
    grid-template-columns: 1fr;
  }

  .agent-chat {
    border-radius: 8px;
    grid-template-rows: auto minmax(260px, 44vh) auto auto auto;
    min-height: 610px;
  }

  .agent-chat__header {
    align-items: flex-start;
  }

  .agent-chat__status {
    font-size: 0.66rem;
  }

  .agent-message {
    max-width: 94%;
  }

  .agent-composer {
    grid-template-columns: 1fr;
  }

  .agent-send {
    width: 100%;
  }

  .agent-below {
    padding: 3.5rem 5%;
  }
}
