.contact-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 7rem 1.25rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  gap: 3rem;
}

.contact-intro h1 {
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  color: #11161d;
}

.contact-intro p {
  font-size: 1.05rem;
  line-height: 1.65;
}

.contact-kicker {
  color: #ed1c24;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.contact-chat {
  background: #11161d;
  color: #fff;
  padding: 1.5rem;
  min-height: 620px;
  border-radius: .8rem;
  box-shadow: 0 24px 70px #11161d22;
}

.contact-hidden {
  display: none !important;
}

.contact-human-gate {
  min-height: 620px;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: .8rem;
  background: #11161d;
  color: #fff;
  box-shadow: 0 24px 70px #11161d22;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .8rem;
}

.contact-human-gate h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.contact-human-gate p {
  max-width: 38rem;
  margin: 0 0 .6rem;
  color: #d6dbe2;
  line-height: 1.6;
}

.contact-human-check {
  width: min(100%, 320px);
  min-height: 70px;
  padding: 1rem 1.1rem;
  border: 1px solid #525963;
  border-radius: .45rem;
  background: #181e26;
  display: flex;
  align-items: center;
  gap: .85rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.contact-human-check:hover,
.contact-human-check:focus-within {
  border-color: #88919d;
  background: #202731;
}

.contact-human-check input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  accent-color: #2f3742;
}

.contact-human-check:has(input:disabled) {
  cursor: wait;
  opacity: .75;
}

#contactTurnstile {
  width: min(100%, 320px);
}

.contact-verification-error {
  color: #ff9b9f !important;
  font-size: .9rem;
}

.contact-transcript {
  height: 360px;
  max-height: 45vh;
  min-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: .35rem;
  scrollbar-gutter: stable;
}

.contact-bubble {
  padding: .72rem .9rem;
  margin: .55rem 0;
  max-width: 82%;
  font-size: .92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.contact-bubble.user {
  margin-left: auto;
  background: #2f3742;
  border-radius: .45rem 0 0 .45rem;
}

.contact-bubble.assistant {
  background: #242b34;
}

.contact-bubble.assistant.is-waiting {
  min-width: 3.7rem;
  color: #cbd5e1;
}

.contact-bubble.assistant.is-waiting::after {
  content: '•••';
  display: inline-block;
  letter-spacing: .18em;
  animation: contact-waiting 1s steps(4, end) infinite;
}

.contact-bubble.assistant.is-typing::after {
  content: '';
  display: inline-block;
  width: .25rem;
  height: 1em;
  margin-left: .18rem;
  border-right: 2px solid #f8fafc;
  vertical-align: -.12em;
  animation: contact-caret .72s steps(1, end) infinite;
}

#contactForm {
  font-size: .9rem;
}

#contactForm textarea,
#contactForm input {
  width: 100%;
  border: 1px solid #525963;
  background: #181e26;
  color: #fff;
  padding: .75rem;
  margin: .3rem 0 .8rem;
  font-size: .92rem;
  line-height: 1.45;
}

#contactForm textarea {
  height: 104px;
  min-height: 104px;
  max-height: 104px;
  resize: none;
  overflow-y: auto;
}

#contactForm button {
  border: 0;
  background: #2f3742;
  color: #fff;
  padding: .72rem 1.5rem;
  font-size: .9rem;
  font-weight: 700;
}

#contactForm button:hover,
#contactForm button:focus-visible {
  background: #3a4450;
}

#contactForm button:disabled {
  cursor: wait;
  opacity: .65;
}

.contact-pii {
  border-top: 1px solid #3a414b;
  padding-top: .8rem;
}

.contact-consent {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}

.contact-consent input {
  width: auto !important;
  margin-top: .2rem !important;
}

.contact-error {
  color: #ff9b9f;
}

.contact-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@keyframes contact-waiting {
  0%,
  100% { opacity: .35; }
  50% { opacity: 1; }
}

@keyframes contact-caret {
  0%,
  49% { opacity: 1; }
  50%,
  100% { opacity: 0; }
}

@media (max-width: 800px) {
  .contact-shell {
    grid-template-columns: 1fr;
    padding-top: 5rem;
    gap: 2rem;
  }

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

  .contact-human-gate {
    min-height: 360px;
  }

  .contact-transcript {
    height: 320px;
    max-height: 42vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-bubble.assistant.is-waiting::after,
  .contact-bubble.assistant.is-typing::after {
    animation: none !important;
  }
}
