:root {
  color: #221820;
  background: #f7f0e8;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 12% 12%,
      rgba(239, 71, 111, 0.17),
      transparent 30rem
    ),
    linear-gradient(145deg, #fffaf3, #efe7df);
}

button,
textarea,
input {
  font: inherit;
}

a {
  color: #a51d43;
  text-underline-offset: 0.18em;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: 56px;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(34, 24, 32, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 30px 0 10px;
  color: #a51d43;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow.danger {
  color: #a21c2f;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.lede {
  max-width: 34rem;
  margin: 26px 0 18px;
  color: #695b64;
  font-size: 1.08rem;
  line-height: 1.65;
}

.docs-link {
  font-weight: 700;
}

.chat-panel,
.approval-card {
  border: 1px solid rgba(34, 24, 32, 0.13);
  border-radius: 28px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 24px 80px rgba(74, 43, 57, 0.12);
}

.chat-panel {
  overflow: hidden;
}

.messages {
  height: min(54vh, 550px);
  min-height: 360px;
  overflow-y: auto;
  padding: 30px;
}

.message {
  width: fit-content;
  max-width: 86%;
  margin-bottom: 22px;
  padding: 14px 17px;
  border-radius: 18px 18px 18px 5px;
  background: #f1e9e4;
}

.message.user {
  margin-left: auto;
  border-radius: 18px 18px 5px 18px;
  color: white;
  background: #292027;
}

.message.pending {
  opacity: 0.6;
}
.message p {
  margin: 4px 0 0;
  line-height: 1.48;
  white-space: pre-wrap;
}
.message-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.66;
}

.suggestions {
  display: flex;
  gap: 8px;
  padding: 0 22px 18px;
  overflow-x: auto;
}

.suggestions button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(34, 24, 32, 0.14);
  border-radius: 999px;
  color: #5e4d58;
  background: transparent;
  cursor: pointer;
}

.suggestions button:hover {
  border-color: #ef476f;
  color: #a51d43;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid rgba(34, 24, 32, 0.1);
}

.composer textarea,
.approval-card input {
  width: 100%;
  border: 1px solid rgba(34, 24, 32, 0.2);
  border-radius: 14px;
  padding: 13px 14px;
  color: inherit;
  background: white;
  outline: none;
}

.composer textarea:focus,
.approval-card input:focus {
  border-color: #ef476f;
  box-shadow: 0 0 0 3px rgba(239, 71, 111, 0.13);
}

.composer button,
.approval-card button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: white;
  background: #ef476f;
  font-weight: 800;
  cursor: pointer;
}

.composer button:disabled,
.suggestions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.privacy-note {
  margin: 0;
  padding: 0 22px 20px;
  color: #877982;
  font-size: 0.76rem;
}

.action-review {
  max-width: 96%;
  margin: 0 0 24px;
  padding: 20px;
  border: 2px solid rgba(165, 29, 67, 0.28);
  border-radius: 18px;
  background: #fffaf6;
  box-shadow: 0 10px 28px rgba(74, 43, 57, 0.09);
}

.action-review h2 {
  margin: 7px 0 8px;
  font-size: 1.25rem;
}
.action-review h3 {
  margin: 18px 0 6px;
  font-size: 1.08rem;
}
.action-review h4 {
  margin: 14px 0 5px;
}
.action-review p {
  color: #665861;
  line-height: 1.5;
}
.action-target {
  display: grid;
  gap: 6px;
  margin: 16px 0;
}
.action-target div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(34, 24, 32, 0.09);
}
.action-target dt {
  color: #877982;
}
.action-target dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.survey-review {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(34, 24, 32, 0.14);
  border-radius: 12px;
  background: white;
}
.survey-review summary {
  cursor: pointer;
  font-weight: 800;
}
.survey-review-section {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid rgba(34, 24, 32, 0.09);
}
.survey-review-section ol {
  padding-left: 24px;
}
.survey-review-section ol > li {
  margin: 12px 0;
  padding-left: 4px;
  line-height: 1.45;
}
.survey-review-section ul {
  margin-top: 7px;
  padding-left: 22px;
  color: #665861;
}
.question-meta {
  display: block;
  margin-top: 3px;
  color: #877982;
  font-size: 0.78rem;
  text-transform: capitalize;
}
.action-meta,
.action-expiry {
  font-size: 0.8rem;
}
.action-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}
.action-controls button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}
.action-controls button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.action-cancel {
  border: 1px solid rgba(34, 24, 32, 0.18) !important;
  color: #5e4d58;
  background: transparent;
}
.action-confirm {
  color: white;
  background: #a51d43;
}
.action-warning {
  background: #8a1628;
}

.approval-body {
  display: grid;
  place-items: center;
  padding: 30px;
}
.approval-card {
  width: min(620px, 100%);
  padding: clamp(26px, 7vw, 58px);
}
.approval-card h1 {
  margin-top: 14px;
  font-size: clamp(2.2rem, 8vw, 4.2rem);
  line-height: 1;
}
.approval-card p,
.approval-card li {
  color: #665861;
  line-height: 1.6;
}
.approval-card form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.approval-card label {
  display: grid;
  gap: 7px;
  font-weight: 750;
}
.approval-card button {
  min-height: 50px;
}
.approval-card .danger-button {
  background: #a21c2f;
}
.approval-card .confirm-line {
  grid-template-columns: auto 1fr;
  align-items: start;
  font-weight: 500;
  line-height: 1.45;
}
.approval-card .confirm-line input {
  width: 1rem;
  margin-top: 0.25rem;
}
.fine-print {
  font-size: 0.82rem;
}
.approval-card dl {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}
.approval-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(34, 24, 32, 0.09);
}
.approval-card dt {
  color: #877982;
}
.approval-card dd {
  margin: 0;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 28px 0;
  }
  .hero h1 {
    font-size: clamp(3.1rem, 17vw, 5rem);
  }
  .messages {
    height: 48vh;
  }
}

.form-error {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(162, 28, 47, 0.35);
  border-radius: 12px;
  color: #a21c2f !important;
  background: rgba(162, 28, 47, 0.07);
  font-size: 0.9rem;
}
